Karim Belabas on Wed, 01 Feb 2006 13:50:47 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: PARI and C99 |
[ was Re: Some functions from paridecl.h are not implemented ] * Benjamin Benninghofen [2006-01-31 21:37]: > > A simple workaround is to use something like > > env CFLAGS="-std=c99" Configure > > Hope this helps > > I tried this on another machine under Fedora Core 4 (32 Bit) and > that solved the problem. > > However compiling PARI with -std=c99 generated the following > warnings (containing strange special characters): ? > /usr/bin/gcc -c -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer -fno-gcse-after-reload -std=c99 -I. -I../src/headers -I../src/language -I/usr/include -o gp.o ../src/gp/gp.c > ../src/gp/gp.c: In function ???is_interactive???: > ../src/gp/gp.c:1357: warning: implicit declaration of function ???fileno??? > 1) no idea about the special characters, a minor problem in your local configuration. 2) the glibc headers abstain from declaring certain functions when a strict conformance mode is specified. Specificaly, /usr/include/stdio.h, contain (essentially) #ifdef __USE_POSIX extern int fileno (FILE *__stream) __THROW; #endif /* Use POSIX. */ In /usr/include/features.h, we see that -std=c99 will not define __USE_POSIX (which would be defined otherwise), only the more restrictive __USE_ISOC99. fileno is in POSIX but not in ISO C99... So you can either ignore the warnings or use suitable variants, like gcc -std=c99 -D_POSIX_C_SOURCE=200112L Cheers, K.B. -- Karim Belabas Tel: (+33) (0)5 40 00 26 17 Universite Bordeaux 1 Fax: (+33) (0)5 40 00 69 50 351, cours de la Liberation http://www.math.u-bordeaux.fr/~belabas/ F-33405 Talence (France) http://pari.math.u-bordeaux.fr/ [PARI/GP]