Detection of stdio.h in gmp.h
James Antill
james at and.org
Fri Oct 17 20:14:31 CEST 2003
Patrick Pelissier <Patrick.Pelissier at loria.fr> writes:
> Hello,
>
> To detect if stdio.h is already defined in GMP, you use this code
> (in gmp.h):
[snip]
> It appears for me to be a hack. On some systems, it may not work,
> and it may change in the future.
>
>
> Why don't use this:
> #if defined (EOF)
> #define _GMP_H_HAVE_FILE 1
> #endif
>
> EOF should be defined only in stdio.h, and it is a standard constante, no?
Well I guess it's not unknown for people to define EOF themselves (at
least historically).
Looking at ISO 9899:1999 7.19.1.3 stdio.h has to (to be conforming)
define the following macros...
NULL
_IOFBF
_IOLBF
_IONBF
BUFSIZ
EOF
FOPEN_MAX
FILENAME_MAX
L_tmpnam
SEEK_CUR
SEEK_END
SEEK_SET
TMP_MAX
stderr
stdin
stdout
--
# James Antill -- james at and.org
:0:
* ^From: .*james at and\.org
/dev/null
More information about the gmp-devel
mailing list