Re: [PATCH 0/5] Support building bison with MSVC

Akim Demaille <[email protected]>
Newsgroups gmane.comp.parsers.bison.patches
Message-ID <[email protected]>
Hi Maarten,

> Le 1 août 2020 à 15:42, Anonymous Maarten <[email protected]> a écrit :
> 
>> Is this really the name I should use to refer to you, in the commit
>> messages and in THANKS?
> 
> You can use: Maarten De Braekeleer <[email protected]>

Thanks.


> I traced the max definition coming from Windows SDK's stdlib.h.
> It's not included through windows.h, so NOMINMAX does nothing.

:(

> I renamed the functions to max_int because there was precedent in
> other source files where this was done too.

You did well.

> The CHAR and INT rename fix the following errors:
> ```
> src/parse-gram.h(130): error C2365: 'CHAR': redefinition; previous
> definition was 'typedef'
> C:\Program Files (x86)\Windows
> Kits\10\include\10.0.17763.0\um\winnt.h(431): note: see declaration of
> 'CHAR'
> src/parse-gram.h(130): error C2086: 'gram_tokentype CHAR': redefinition
> src/parse-gram.h(130): note: see declaration of 'CHAR'
> src/parse-gram.h(143): error C2365: 'INT': redefinition; previous
> definition was 'typedef'
> C:\Program Files (x86)\Windows
> Kits\10\include\10.0.17763.0\shared\minwindef.h(176): note: see
> declara
> tion of 'INT'
> src/parse-gram.h(143): error C2086: 'gram_tokentype INT': redefinition
> ```
> They are typedefs.

Gosh, I hate these guys...

> I don't see any obvious way to circumvent their definition..
> 
> The accept rename is caused by gnulib including winsock.h for
> emulating unistd.h.
> There are probably other include paths.

Argl.

>>> In the first patch, I hid the inclusion of 2 files behind a macro.
>>> I haven't checked whether these missing files can be provided through
>>> gnulib.
>> 
>> It appears there is.  I'm looking into this right now.
> 
> Thanks!

I was interrupted, I'll try to do that soon.  I'd like to release 3.7.1
tomorrow :(
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.