[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Broken build attributed to (un)defined environ
From: |
Bruno Haible |
Subject: |
Re: Broken build attributed to (un)defined environ |
Date: |
Thu, 27 May 2004 18:22:36 +0200 |
User-agent: |
KMail/1.5 |
Michael Schloh von Bennewitz wrote:
> Compiler: GCC 3.4.0
> CPPFLAGS: None
> CFLAGS: -O2 -pipe
> Make: GNU Make 3.80
> LDFLAGS: None
>
> $ ./configure --prefix=/openpkg-dev --with-libiconv-prefix=/openpkg-dev
> --with-included-gettext --disable-csharp --disable-shared [...]
> $ make
> [...]
> execute.c: In function `execute':
> execute.c:247: error: `environ' undeclared (first use in this function)
> execute.c:247: error: (Each undeclared identifier is reported only once
> execute.c:247: error: for each function it appears in.)
> make[3]: *** [execute.lo] Error 1
> ...
>
> The reason that gettext compiles fine on Solaris 9 becomes clear if you
> look at source file gettext-tools/lib/execute.c line #208.
Thanks for these details; here is a minimal patch.
Bruno
*** gettext-0.14.1/gettext-tools/lib/execute.c.bak 2004-01-05
11:48:31.000000000 +0100
--- gettext-0.14.1/gettext-tools/lib/execute.c 2004-05-27 18:19:15.000000000
+0200
***************
*** 61,66 ****
--- 61,70 ----
#endif
+ #ifndef HAVE_ENVIRON_DECL
+ extern char **environ;
+ #endif
+
#ifndef STDIN_FILENO
# define STDIN_FILENO 0
#endif
*** gettext-0.14.1/gettext-tools/lib/pipe-in.c.bak 2003-10-15
12:15:23.000000000 +0200
--- gettext-0.14.1/gettext-tools/lib/pipe-in.c 2004-05-27 18:19:15.000000000
+0200
***************
*** 60,65 ****
--- 60,69 ----
#endif
+ #ifndef HAVE_ENVIRON_DECL
+ extern char **environ;
+ #endif
+
#ifndef STDIN_FILENO
# define STDIN_FILENO 0
#endif
*** gettext-0.14.1/gettext-tools/lib/pipe-out.c.bak 2003-10-15
12:15:23.000000000 +0200
--- gettext-0.14.1/gettext-tools/lib/pipe-out.c 2004-05-27 18:19:15.000000000
+0200
***************
*** 60,65 ****
--- 60,69 ----
#endif
+ #ifndef HAVE_ENVIRON_DECL
+ extern char **environ;
+ #endif
+
#ifndef STDIN_FILENO
# define STDIN_FILENO 0
#endif
*** gettext-0.14.1/gettext-tools/lib/pipe-bidi.c.bak 2003-10-15
12:15:23.000000000 +0200
--- gettext-0.14.1/gettext-tools/lib/pipe-bidi.c 2004-05-27
18:19:15.000000000 +0200
***************
*** 60,65 ****
--- 60,69 ----
#endif
+ #ifndef HAVE_ENVIRON_DECL
+ extern char **environ;
+ #endif
+
#ifndef STDIN_FILENO
# define STDIN_FILENO 0
#endif