Mail Archives: djgpp-workers/2001/01/16/18:02:00
On Tue, 16 Jan 2001 11:55:59 +0200 (IST), you wrote:
> > I have not read up about locales so I am assuming that behaviour in
> > DJGPP should be according to the "C" locale.
>
> Yes, the C locale is the only one really supported by DJGPP.
FYI, there was also a URL for some patches posted to c.o.m.d recently
to add locale support to DJGPP, in case you missed it.
> Here's the full set of warning switches used by the library
> build; if you can compile without any warning or errors using those
> switches, you are okay.
>
> -Wall
> -Wbad-function-cast
> -Wcast-qual
> -Werror
> -Wmissing-declarations
> -Wmissing-prototypes
> -Wpointer-arith
> -Wshadow
> -Wstrict-prototypes
> -Wtraditional
> -Wwrite-strings
Compiles cleanly with all of those plus -O2.
> > [#7] In the "C" locale, the E and O modifiers are ignored
> > and the replacement strings for the following specifiers
> > are:
> > %c equivalent to ``%A %B %d %T %Y''.
> > %p one of ``am'' or ``pm''.
> > %x equivalent to ``%A %B %d %Y''.
>
> Ouch! This looks like a certain incompatibility with C89, where most
> implementations, including the "Standard C Library" by Plauger,
> generated a different output.
This is not established as fact yet. It is quite possible that the
standard changed to C89 compatibility between the last public draft
and the final revision.
FWIW, the test program I gave with the patches, has exact same
behaviour on my Linux setup as with DJGPP with the first patch only.
> DJ, these format modifiers (-, _, 0, and ^) don't exist in the C
> standard, AFAICS, and aren't documented in libc.info. Is this for
> compatibility with some other implementation? If so, which one?
They are listed in the glibc2 info docs, but not the man page.
--
[please cc replies if possible]
- Raw text -