delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/11/20/06:25:34

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:date:message-id:subject:from:to
:cc:content-type; q=dns; s=default; b=nT318RAePTkP2f01Edcpr68iYl
NdM9QroaNrkkCfesXJJgBW8tbv7tovIv/NSk6Iu9N/Cct8gUH28K+20Q+nV9hsbn
udqySe71N032E4LIle2cb0ygz8bdjISXR1Fc98VoDcaTAoO5aA898zXgRemkUWUm
dT6D6cZixAHG07YM0=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:date:message-id:subject:from:to
:cc:content-type; s=default; bh=as0KuUy5XUupFo+xZ5FVJJBdsDQ=; b=
n1bbadmPjjJuo2RVgfJsvC5LvcdVRAMGlc6ziuVO76nb2vNJZB1r1PAug2wVaOdD
gMzKfcoIvsH3wmAF2o3luxzMfyZ2VarUcL7/YT1kQ4YbpSOkGl+tAE/v0dIMlcNI
F6k8fSdZzMLsVUeDKpSIZBST+ZsflTG71pXrGo6rL+U=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-qg0-f53.google.com
MIME-Version: 1.0
X-Received: by 10.140.131.74 with SMTP id 71mr13371467qhd.51.1448018714572; Fri, 20 Nov 2015 03:25:14 -0800 (PST)
Date: Fri, 20 Nov 2015 03:25:14 -0800
Message-ID: <CAAHpriMXnYa1Ly+c9AKk7kE4QuaxMGykJuxpFPSQmimz=GKy-Q@mail.gmail.com>
Subject: <sys/types.h> incorrectly define macro "howmany"
From: Keith Thompson <keithsthompson AT gmail DOT com>
To: cygwin AT cygwin DOT com
Cc: Keith Thompson <Keith DOT S DOT Thompson AT gmail DOT com>

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 DOT S DOT Thompson AT gmail DOT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019