This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


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

need to define _ISOC99_SOURCE



Hi,

When compiling util-linux-2.10m on current glibc, I get warnings like this:

col.c: In function `main':
col.c:180: warning: implicit declaration of function `getwchar'
col.c:317: warning: implicit declaration of function `putwchar'
colcrt.c: In function `main':
colcrt.c:117: warning: implicit declaration of function `getwc'
colcrt.c: In function `pflush':
colcrt.c:229: warning: implicit declaration of function `fputws'
colcrt.c:230: warning: implicit declaration of function `putwchar'
rev.c: In function `main':
rev.c:100: warning: implicit declaration of function `fgetws'
rev.c:118: warning: comparison between pointer and integer
rev.c:128: warning: implicit declaration of function `putwchar'
ul.c: In function `put1wc':
ul.c:56: warning: implicit declaration of function `putwchar'
ul.c: In function `filter':
ul.c:184: warning: implicit declaration of function `getwc'

The header <wchar.h> declares these functions and macros only when
__USE_ISOC99 is defined.

What is the justification for requiring users to define special flags
like _ISOC99_SOURCE ? These fgetwc etc functions were contained already
in ANSI C Amendment 1, more than 5 years ago, and have been reaffirmed
in ISO C 99, more than 6 months ago.

The older __USE_ISOC9X defines were justified because the declarations
could still change at that time. But now the standard is finalized and
frozen.

Do you intend to make _ISOC99_SOURCE the default in 1 or 2 years ?
If so, then I'm asking: what is the benefit of not defining it now ?

Or will gcc-3.0 define __STDC_VERSION__ >= 199901L, thus making the
issue moot?

           Bruno

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