bug-gnulib
[Top][All Lists]
Advanced

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

Re: putenv with mingw32


From: Ben Pfaff
Subject: Re: putenv with mingw32
Date: Sun, 07 Dec 2008 16:11:34 -0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Brian Dessent <address@hidden> writes:

> MinGW implements access to 'environ' as a macro in stdlib.h, one which
> gets the environment pointer through a function call.  However, that
> macro is not enabled if __STRICT_ANSI__ is set, and -std=c99 sets
> __STRICT_ANSI__.  So one workaround would be to drop -std=c99, or add
> -U__STRICT_ANSI__ to CFLAGS but that seems rather lame.

Is there a particular reason that you want to use -std=c99?  To
me, it seems odd to request C99-only semantics from the compiler
and then try to use features that are not part of C99
(e.g. environ).

I would use -std=gnu99 in this case.
-- 
"Unix... is not so much a product
 as it is a painstakingly compiled oral history
 of the hacker subculture."
--Neal Stephenson





reply via email to

[Prev in Thread] Current Thread [Next in Thread]