public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Keith Thompson <keithsthompson@gmail.com>
To: cygwin@cygwin.com
Cc: Keith Thompson <Keith.S.Thompson@gmail.com>
Subject: <sys/types.h> incorrectly define macro "howmany"
Date: Fri, 20 Nov 2015 11:25:00 -0000	[thread overview]
Message-ID: <CAAHpriMXnYa1Ly+c9AKk7kE4QuaxMGykJuxpFPSQmimz=GKy-Q@mail.gmail.com> (raw)

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

             reply	other threads:[~2015-11-20 11:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-20 11:25 Keith Thompson [this message]
2015-11-20 12:00 ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAHpriMXnYa1Ly+c9AKk7kE4QuaxMGykJuxpFPSQmimz=GKy-Q@mail.gmail.com' \
    --to=keithsthompson@gmail.com \
    --cc=Keith.S.Thompson@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).