public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* <sys/types.h> incorrectly define macro "howmany"
@ 2015-11-20 11:25 Keith Thompson
  2015-11-20 12:00 ` Corinna Vinschen
  0 siblings, 1 reply; 2+ messages in thread
From: Keith Thompson @ 2015-11-20 11:25 UTC (permalink / raw)
  To: cygwin; +Cc: Keith Thompson

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: <sys/types.h> incorrectly define macro "howmany"
  2015-11-20 11:25 <sys/types.h> incorrectly define macro "howmany" Keith Thompson
@ 2015-11-20 12:00 ` Corinna Vinschen
  0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2015-11-20 12:00 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 527 bytes --]

On Nov 20 03:25, Keith Thompson wrote:
> The header file /usr/include/sys/types.h defines a macro called "howmany".

Incidentally, this is currently under discussion on the newlib list:
https://sourceware.org/ml/newlib/2015/msg00789.html
.
The RTEMS guys are testing my patch suggestion soon, hopefully, then
the updated headers will go into Cygwin 2.4.0.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-20 12:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-20 11:25 <sys/types.h> incorrectly define macro "howmany" Keith Thompson
2015-11-20 12:00 ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).