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]

Re: strtold, isnormal

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 Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

Unsubscribe info:
Problem reports:

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