comparison lib/setenv.c @ 17326:bb52d9cece01

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.
author Paul Eggert <eggert@cs.ucla.edu>
date Mon, 11 Feb 2013 14:58:56 -0800
parents e542fd46ad6f
children 344018b6e5d7
comparison
equal deleted inserted replaced
17325:0fb629c87fb5 17326:bb52d9cece01
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
16 16
17 #if !_LIBC 17 #if !_LIBC
18 /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
19 optimizes away the name == NULL test below. */
20 # define _GL_ARG_NONNULL(params)
21
18 # define _GL_USE_STDLIB_ALLOC 1 22 # define _GL_USE_STDLIB_ALLOC 1
19 # include <config.h> 23 # include <config.h>
20 #endif 24 #endif
21
22 /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
23 optimizes away the name == NULL test below. */
24 #define _GL_ARG_NONNULL(params)
25 25
26 #include <alloca.h> 26 #include <alloca.h>
27 27
28 /* Specification. */ 28 /* Specification. */
29 #include <stdlib.h> 29 #include <stdlib.h>