[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#565708: gcc-4.4: -D_XOPEN_SOURCE=600 does not make strcasecmp visible



Package: gcc-4.4
Version: 4.4.2-8
Severity: normal

SUSV3 lists strcasecmp() as an XSI extension, so it should be enabled by
setting _XOPEN_SOURCE to 600 before including string.h.  In GCC it is
not unless _BSD_SOURCE is also defined.

Test program:

        #include <string.h>
        
        int main (void)
        {
            return strcasecmp ("hello", "world");
        }
        
Compile results:

        $ gcc -std=c99 -D_XOPEN_SOURCE=600 test.c
        test.c: In function ‘main’:
        test.c:5: warning: implicit declaration of function ‘strcasecmp’
        $ gcc -std=c99 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE test.c

John Lindgren


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-2-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages gcc-4.4 depends on:
ii  binutils                      2.20-4     The GNU assembler, linker and bina
ii  cpp-4.4                       4.4.2-8    The GNU C preprocessor
ii  gcc-4.4-base                  4.4.2-8    The GNU Compiler Collection (base 
ii  libc6                         2.10.2-2   GNU C Library: Shared libraries
ii  libgcc1                       1:4.4.2-8  GCC support library
ii  libgomp1                      4.4.2-8    GCC OpenMP (GOMP) support library

Versions of packages gcc-4.4 recommends:
ii  libc6-dev                     2.10.2-2   GNU C Library: Development Librari

Versions of packages gcc-4.4 suggests:
pn  gcc-4.4-doc                   <none>     (no description available)
pn  gcc-4.4-locales               <none>     (no description available)
pn  gcc-4.4-multilib              <none>     (no description available)
pn  libcloog-ppl0                 <none>     (no description available)
pn  libgcc1-dbg                   <none>     (no description available)
pn  libgomp1-dbg                  <none>     (no description available)
pn  libmudflap0-4.4-dev           <none>     (no description available)
pn  libmudflap0-dbg               <none>     (no description available)
pn  libppl-c2                     <none>     (no description available)
pn  libppl7                       <none>     (no description available)

-- no debconf information




Reply to: