delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/03/23/15:43:35

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Mon, 23 Mar 2009 21:43:06 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: strtold, isnormal
Message-ID: <20090323204306.GZ9322@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <75cc17ac0903230840t48e206ccscf86a843fb1c3868 AT mail DOT gmail DOT com> <20090323154439 DOT GV9322 AT calimero DOT vinschen DOT de> <20090323154946 DOT GW9322 AT calimero DOT vinschen DOT de> <75cc17ac0903231305yb0ec066kefddbb24fdbcd986 AT mail DOT gmail DOT com> <416096c60903231319t644a76bfid3f4ecf8badbde21 AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <416096c60903231319t644a76bfid3f4ecf8badbde21@mail.gmail.com>
User-Agent: Mutt/1.5.19 (2009-02-20)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Mar 23 20:19, Andy Koppe wrote:
> >> Oh, btw., the isnormal macro exists in math.h.
> >
> > Thanks.  But for some reason it's not getting picked up:
> >
> > gcc -c -I. -I/usr/local/include -I/home/reynolds-gregg/include
> > -I/usr/local/include -DNDEBUG -D_GNU_SOURCE=1 -D_REENTRANT
> > -D__EXTENSIONS__ -D_TC_PREFIX="\"/usr/local\""
> > -D_TC_INCLUDEDIR="\"/usr/local/include\""
> > -D_TC_LIBDIR="\"/usr/local/lib\"" -D_TC_BINDIR="\"/usr/local/bin\""
> > -D_TC_LIBEXECDIR="\"/usr/local/libexec\""
> > -D_TC_APPINC="\"-I/usr/local/include\""
> > -D_TC_APPLIBS="\"-L/usr/local/lib -ltokyocabinet -lbz2 -lz -lpthread
> > -lm -lc \"" -I/usr/include -std=c99 -Wall -fPIC -fsigned-char -O2
> > tcutil.c
> >
> > result:
> >
> > tcutil.c:4948: warning: implicit declaration of function `isnormal'
> 
> isnormal() and a load of other things are guarded by
> '#if !defined(__STRICT_ANSI__)' in math.h, and __STRICT_ANSI__ does
> get defined for -std=c99.
> 
> It's definitely in the C99 standard though, so either the header is
> wrong or __STRICT_ANSI__ shouldn't be defined.

It's a bug in the math.h header which is fixed in CVS, so the patch
will be in Cygwin 1.7.  The old header guards the functions with

  #if !defined(__STRICT_ANSI__) || defined(__cplusplus)

The latest version of math.h guards them correctly with

  #if !defined(__STRICT_ANSI__) || defined(__cplusplus) || __STDC_VERSION__ >= 199901L

We don't update the 1.5.x release anymore, so I suggest either to
give Cygwin 1.7 a test, or to tweak your math.h locally for now.


Corinna

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

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

- Raw text -


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