summaryrefslogtreecommitdiff
path: root/lib/setenv.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-02-11 14:58:56 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2013-02-11 14:59:20 -0800
commit49adc7288d58c1db38d72be52d719e987f71233a (patch)
treef18c93c5691507a3cf0cfff2dd5abdee42711d77 /lib/setenv.c
parentd704fa2c9fda8c29635b346165a1f2802644cffa (diff)
downloadgnulib-49adc7288d58c1db38d72be52d719e987f71233a.tar.gz
unsetenv etc.: port to Solaris 11 + GNU Emacs
* lib/canonicalize-lgpl.c, lib/getaddrinfo.c, lib/getdelim.c: * lib/glob.c, lib/random_r.c, lib/setenv.c, lib/tsearch.c: * lib/unsetenv.c (_GL_ARG_NONNULL): Define before including <config.h>. GNU Emacs's <config.h> includes <stdlib.h> (which is not a great idea but is too painful to fix right now), and without this gnulib change <stdlib.h> was defining _GL_ARG_NONNULL incorrectly when compiling unsetenv.c on Solaris 11. Fix the problem for unsetenv.c, and fix other similar occurrences.
Diffstat (limited to 'lib/setenv.c')
-rw-r--r--lib/setenv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/setenv.c b/lib/setenv.c
index d7851a8b7a..995a0f26a1 100644
--- a/lib/setenv.c
+++ b/lib/setenv.c
@@ -15,14 +15,14 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#if !_LIBC
+/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
+ optimizes away the name == NULL test below. */
+# define _GL_ARG_NONNULL(params)
+
# define _GL_USE_STDLIB_ALLOC 1
# include <config.h>
#endif
-/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
- optimizes away the name == NULL test below. */
-#define _GL_ARG_NONNULL(params)
-
#include <alloca.h>
/* Specification. */