* sysdeps/generic/libc-start.c [SHARED] (__libc_start_main): Don't
initialize __environ again.
+ * stdlib/Makefile: Add rules to build and run tst-putenv.
+ * stdlib/tst-putenv.c: New file.
+ * stdlib/tst-putenvmod.c: New file.
* sysdeps/unix/sysv/linux/init-first.c: Clean file up. Don't
define unnecessary wrappers or aliases of static functions.
-# Copyright (C) 1991-2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1991-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
tst-rand48 bug-strtod tst-setcontext test-a64l tst-qsort \
tst-system testmb2
+include ../Makeconfig
+
+ifeq ($(build-shared),yes)
+tests += tst-putenv
+endif
# Several mpn functions from GNU MP are used by the strtod function.
mpn-routines := inlines add_n addmul_1 cmp divmod_1 divrem udiv_qrnnd \
dbl2mpn ldbl2mpn \
mpn2flt mpn2dbl mpn2ldbl
aux += fpioconst mp_clz_tab
-distribute := $(distribute) $(mpn-headers) gen-mpn-copy fpioconst.h
+distribute := $(distribute) $(mpn-headers) gen-mpn-copy fpioconst.h \
+ tst-putenvmod.c
+
+tests-extras += tst-putenvmod
+extra-objs += tst-putenvmod.os
-generated += isomac isomac.out
+generated += isomac isomac.out tst-putenvmod.so
CFLAGS-bsearch.c = $(uses-callbacks)
CFLAGS-msort.c = $(uses-callbacks)
CFLAGS-system.c = -fexceptions
CFLAGS-fmtmsg.c = -fexceptions
-include ../Makeconfig
-
ifneq (,$(filter %REENTRANT, $(defines)))
CFLAGS-strfmon.c = -D_IO_MTSAFE_IO
CFLAGS-strfmon_l.c = -D_IO_MTSAFE_IO
$(objpfx)tst-fmtmsg.out: tst-fmtmsg.sh $(objpfx)tst-fmtmsg
$(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)stdlib/
+
+$(objpfx)tst-putenv: $(objpfx)tst-putenvmod.so
+
+$(objpfx)tst-putenvmod.so: $(objpfx)tst-putenvmod.os
+ $(build-module)
+CFLAGS-tst-putenvmod.c = -DNOT_IN_libc=1