freebsd-dev/lib/libc
Sean Farley 9bab236702 Added environ-replacement detection. For programs that "clean" (i.e., su)
or replace (i.e., zdump) the environment after a call to setenv(), putenv()
or unsetenv() has been made, a few changes were made.
  - getenv() will return the value from the new environ array.
  - setenv() was split into two functions:  __setenv() which is most of the
    previous setenv() without checks on the name and setenv() which
    contains the checks before calling __setenv().
  - setenv(), putenv() and unsetenv() will unset all previous values and
    call __setenv() on all entries in the new environ array which in turn
    adds them to the end of the envVars array.  Calling __setenv() instead
    of setenv() is done to avoid the temporary replacement of the '=' in a
    string with a NUL byte.  Some strings may be read-only data.

Added more regression checks for clearing the environment array.

Replaced gettimeofday() with getrusage() in timing regression check for
better accuracy.

Fixed an off-by-one bug in __remove_putenv() in the use of memmove().  This
went unnoticed due to the allocation of double the number of environ
entries when building envVars.

Fixed a few spelling mistakes in the comments.

Reviewed by:	ache
Approved by:	wes
Approved by:	re (kensmith)
2007-07-20 23:30:13 +00:00
..
amd64 Classify mmap, lseek, pread, pwrite, truncate, ftruncate as pseudo 2007-07-04 23:23:01 +00:00
arm Fix remaining syntax errors (missing semicolons) 2007-07-05 17:42:00 +00:00
compat-43 Use C comments since we now preprocess these files with CPP. 2007-04-29 14:05:22 +00:00
db The usage of "info" in init_hash() is read-only, so constify 2007-05-25 09:57:48 +00:00
gdtoa Fix a rounding error. 2007-05-08 02:59:37 +00:00
gen Change the C wrappers for mmap/lseek/pread/pwrite/truncate/ftruncate to 2007-07-04 23:27:38 +00:00
gmon Remove .mcount from gmon's Symbol map and add it to the appropriate 2007-05-13 14:16:55 +00:00
i386 Classify mmap, lseek, pread, pwrite, truncate, ftruncate as pseudo 2007-07-04 23:23:01 +00:00
ia64 Classify mmap, lseek, pread, pwrite, truncate, ftruncate as pseudo 2007-07-04 23:23:01 +00:00
include Change the C wrappers for mmap/lseek/pread/pwrite/truncate/ftruncate to 2007-07-04 23:27:38 +00:00
inet Require users to provide a length information for inet_ntoa_r, 2007-06-14 07:13:28 +00:00
isc Merge BIND 9.4.1 into main chunk. 2007-06-03 17:20:27 +00:00
locale - Fix typo 2007-05-04 16:01:07 +00:00
nameser Merge BIND 9.4.1 into main chunk. 2007-06-03 17:20:27 +00:00
net - Modular congestion control, with RFC2581 being the default. 2007-07-14 09:36:28 +00:00
nls Use C comments since we now preprocess these files with CPP. 2007-04-29 14:05:22 +00:00
posix1e Some libc symbol map cleanups. 2007-05-31 13:01:34 +00:00
powerpc Classify mmap, lseek, pread, pwrite, truncate, ftruncate as pseudo 2007-07-04 23:23:01 +00:00
quad Fix a typo that prevented the quad symbols from being exported 2007-07-06 13:42:24 +00:00
regex Diff reduction against other *BSDs: ANSIfy function 2007-06-11 03:05:54 +00:00
resolv Merge BIND 9.4.1 into main chunk. 2007-06-03 17:20:27 +00:00
rpc Use an array of size NGROUP_MAX for the getgroups() call instead of NGRP. 2007-06-14 20:07:35 +00:00
softfloat Use C comments since we now preprocess these files with CPP. 2007-04-29 14:05:22 +00:00
sparc64 Classify mmap, lseek, pread, pwrite, truncate, ftruncate as pseudo 2007-07-04 23:23:01 +00:00
stdio Add rewind() to the list of functions which may fail and set errno 2007-06-18 02:13:04 +00:00
stdlib Added environ-replacement detection. For programs that "clean" (i.e., su) 2007-07-20 23:30:13 +00:00
stdtime Some libc symbol map cleanups. 2007-05-31 13:01:34 +00:00
string Use C comments since we now preprocess these files with CPP. 2007-04-29 14:05:22 +00:00
sys Take a sentence into the present by removing a reference to FreeBSD 3.0. 2007-07-14 19:23:29 +00:00
uuid Use C comments since we now preprocess these files with CPP. 2007-04-29 14:05:22 +00:00
xdr Use C comments since we now preprocess these files with CPP. 2007-04-29 14:05:22 +00:00
yp Use C comments since we now preprocess these files with CPP. 2007-04-29 14:05:22 +00:00
Makefile Use LDADD to add -lgcc to the end of linker command line. Using LDFLAGS 2007-05-19 16:38:39 +00:00
Versions.def Make sure FBSDprivate_1.0 is located at the end of the version 2007-04-29 16:14:17 +00:00