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

Bug#583077: marked as done (libc6-dev: unexplicaple warning when using putenv with -std=c99)



Your message dated Tue, 25 May 2010 10:53:50 +0200
with message-id <4BFB901E.8060809@aurel32.net>
and subject line Re: Bug#583077: libc6-dev: unexplicaple warning when using putenv with -std=c99
has caused the Debian Bug report #583077,
regarding libc6-dev: unexplicaple warning when using putenv with -std=c99
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
583077: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=583077
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libc6-dev
Version: 2.10.2-9
Severity: normal

I try to compile this:

#include <stdlib.h>
int main () {
        putenv("a=b");
}

And i point out that the include is there as reported by putenv(3) manpage.
But compiling it with:

$ gcc -std=c99 test.c 

I obtain:

test.c: In function ‘main’:
test.c:4: warning: implicit declaration of function ‘putenv’

I don't think this is right

Bye


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'experimental'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.34-vulcano (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libc6-dev depends on:
ii  libc-dev-bin                  2.10.2-9   Embedded GNU C Library: Developmen
ii  libc6                         2.10.2-9   Embedded GNU C Library: Shared lib
ii  linux-libc-dev                2.6.32-13  Linux support headers for userspac

Versions of packages libc6-dev recommends:
ii  gcc [c-compiler]              4:4.4.3-1  The GNU C compiler
ii  gcc-4.4 [c-compiler]          4.4.4-2    The GNU C compiler

Versions of packages libc6-dev suggests:
pn  glibc-doc                     <none>     (no description available)
ii  manpages-dev                  3.24-1     Manual pages about using GNU/Linux

-- no debconf information



--- End Message ---
--- Begin Message ---
Salvo Tomaselli a écrit :
> Package: libc6-dev
> Version: 2.10.2-9
> Severity: normal
> 
> I try to compile this:
> 
> #include <stdlib.h>
> int main () {
>         putenv("a=b");
> }
> 
> And i point out that the include is there as reported by putenv(3) manpage.
> But compiling it with:
> 
> $ gcc -std=c99 test.c 
> 
> I obtain:
> 
> test.c: In function ‘main’:
> test.c:4: warning: implicit declaration of function ‘putenv’
> 
> I don't think this is right
> 

It is, the manpage also says:

|  Feature Test Macro Requirements for glibc (see
| feature_test_macros(7)):
|
|      putenv(): _SVID_SOURCE || _XOPEN_SOURCE

As a consequence you should compile your file with -D_XOPEN_SOURCE or
-D_SVID_SOURCE.

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net


--- End Message ---

Reply to: