This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

<sys/types.h> incorrectly define macro "howmany"


The header file /usr/include/sys/types.h defines a macro called "howmany".

As a result, this strictly conforming program:

    #include <stdio.h>

    int howmany(void) {
        return 42;
    }

    int main(void) {
        printf("%d\n", howmany());
    }

fails to compile with "gcc -std=c11 -pedantic" (or "-std=c99", or "std=c90").

    $ uname -a
    CYGWIN_NT-10.0 IE11WIN10 2.2.1(0.289/5/3) 2015-08-20 11:42 x86_64 Cygwin
    $

-- 
Keith Thompson <Keith.S.Thompson@gmail.com>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]