bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libc-config.h + cdefs.h


From: Paul Eggert
Subject: Re: libc-config.h + cdefs.h
Date: Tue, 5 Sep 2017 23:36:07 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

Gisle Vanem wrote:
The new files libc-config.h and cdefs.h, break MSVC in
several ways:
1) libc-config.h:
    # undef __inline

   '__inline' is a built-in reserved word used through-out the MS SDK.

'#undef X' is merely a preprocessor directive; it doesn't affect whether X is treated as a reserved word. So why is this a problem?

Hmm, is it because of the '#define __inline' to nothing later on? OK, I can see where that might be an issue. Should be fixed in the attached patch, which I installed into Gnulib.

2) MSVC doesn't accept this:
    #define libc_hidden_proto(name, attrs...)

    Why not simply?
    #define libc_hidden_proto(name, ...)

Thanks, that was merely a cut-and-paste from glibc, which can assume the GNU C extension of a name for the "...", and where I didn't notice the assumption. This also should be fixed in the attached patch.

I haven't tested this with MSVC since I don't use MSVC, so please give it a try.

PS. You write "several ways" but mention only 2 ways; are there other things that need fixing?

Attachment: 0001-libc-config-port-to-MSVC.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]