freebsd-nq/lib
Peter Wemm ce04fea445 Remove last remaining references to malloc/realloc and functions that
call them.  All the execX() libc functions should be vfork() safe now.
Specifically:
- execlp() does the argument count-and-build into a vector from alloca
    (like the others) - buildargv() is no longer used (and gone).
- execvp() uses alloca/strcpy rather than strdup().
- the ENOEXEC handler uses alloca rather than malloc.
- a couple of free() calls removed - alloca works on the local stack and
    the allocations are freed on function exit (which is why buildargv
    wasn't useful - it's alloca() context would disappear on return).
Along the way:
- If alloca() fails (can it?), set errno = ENOMEM explicitly.
- The ENOEXEC recovery routine that trys again with /bin/sh appeared to
    not be terminating the new argv[] array for /bin/sh, allowing it to
    walk off the end of the list.

I dithered a bit about using alloca() even more as it's most commonly
associated with gcc.  However, standalone portable (using malloc) and
machine-specific assembler alloca implementations appear to be available
on just about all the architectures we're likely to want to port to.
alloca will be the least of our problems if ever going to another compiler.
1999-03-23 16:40:34 +00:00
..
compat /usr/lib/compat -> /usr/lib/compat/aout 1998-09-26 11:54:02 +00:00
csu Add "-fkeep-inline-functions" to CFLAGS so that higher optimization 1999-03-15 21:56:54 +00:00
libalias Remove all diagnostics to stdout/stderr with #ifdef DEBUG 1999-03-09 23:44:00 +00:00
libatm libatm uses libmd; add it to the dependency list so that programs using 1998-10-11 04:41:43 +00:00
libbind Sigh, mkdep doesn't know about all the CFLAGS to pass during depend 1998-06-11 10:39:32 +00:00
libc Remove last remaining references to malloc/realloc and functions that 1999-03-23 16:40:34 +00:00
libc_r [ The author's description... ] 1999-03-23 05:07:56 +00:00
libcalendar .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq 1998-03-19 07:34:22 +00:00
libcam Fixed missing header in synopsis (<camlib.h> includes half the universe 1999-03-05 17:11:37 +00:00
libcom_err Remove definition of malloc and realloc. Instead include stdlib.h. 1998-09-11 05:39:08 +00:00
libcompat Correct typo. 1999-01-27 04:35:02 +00:00
libcrypt Simplified using new SYMLINKS macro, mainly to test this macro. The 1999-03-23 03:41:09 +00:00
libcurses Fix a curses bug exposed by the ":numbers" display of systat -iostat. 1998-10-12 16:32:32 +00:00
libdevstat Address our users in a civilized manner. (They may know better, but probably 1999-03-22 10:38:07 +00:00
libdisk More support for Alpha installs. 1999-01-29 11:39:24 +00:00
libedit Switch to using ".So" as the extension for PIC object files rather 1999-01-09 21:51:00 +00:00
libf2c Add an emply MAIN__() function. This avoid an unresolved reference error 1998-11-16 23:51:14 +00:00
libF77 Update to the most recent version. Among other things, this also solves 1999-02-03 17:23:49 +00:00
libfetch Fixed prototype for fetchParseURL(). 1999-03-05 18:45:32 +00:00
libftpio Correctly figure out that the remove cannot do passive mode. 1998-04-11 07:28:53 +00:00
libgnumalloc Don't install an elf libgnumalloc.so* in /usr/lib/compat.. No elf binaries 1998-10-11 04:18:30 +00:00
libI77 Update to the most recent version. Among other things, this also solves 1999-02-03 17:23:49 +00:00
libio Add a simple library for accessing i/o ports and memory on the alpha. 1998-12-12 18:05:06 +00:00
libipx Fixed printf format errors. 1998-06-30 18:06:23 +00:00
libkse [ The author's description... ] 1999-03-23 05:07:56 +00:00
libkvm make libkvm capable of dealing with a crashdump on alphas 1999-03-12 14:47:33 +00:00
libm Eliminate nested comment warning. 1998-10-11 17:14:56 +00:00
libmd add more MLINKS 1999-03-02 22:53:24 +00:00
libmytinfo Fixed CLEANFILES. 1998-12-27 15:04:33 +00:00
libncurses Add missing int to prototypes of mvaddstr and mvaddnstr. 1998-12-10 02:35:24 +00:00
libopie libopie also depends on libmd. Programs using libopie shouldn't have to 1998-10-11 04:45:50 +00:00
libpam Fix breakage for the static a.out case. The a.out linker doesn't 1999-01-22 12:43:42 +00:00
libpcap Fixed CLEANFILES. 1998-12-27 15:04:33 +00:00
libpthread [ The author's description... ] 1999-03-23 05:07:56 +00:00
libradius Allow an alternate to rad_send_request() for programs that 1999-02-05 11:23:44 +00:00
libresolv Don't build elf libresolv.so*, no elf freebsd binaries have used it ever. 1998-10-11 04:21:56 +00:00
librpcsvc Toss publickey.c in the attic and remove it from the Makefile. 1998-05-18 21:59:53 +00:00
libskey Fixed bitrot in synopsis (some const poisoning hadn't reached here). 1999-03-05 15:50:07 +00:00
libss Replace memory leaking instances of realloc with non-leaking reallocf. 1998-09-16 04:17:47 +00:00
libstand Remove float-point dependency from i386's version of setjmp()/longjmp(). 1999-02-12 17:22:30 +00:00
libtacplus Initial import of TACACS+ client library donated by Juniper Networks, Inc. 1998-11-13 00:54:26 +00:00
libtelnet Old stuff laying around: Don't use a function called getstr(), that has 1998-12-16 06:04:29 +00:00
libtermcap Deal with /usr/lib/compat/aout, and that we've been installing things 1998-10-11 04:39:56 +00:00
libutil Get the pid right if a stale lock file exists. 1999-03-11 09:09:20 +00:00
libvgl .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq 1998-03-19 07:34:22 +00:00
libwrap Build libwrap - the core to tcp_wrappers. 1999-03-14 17:56:11 +00:00
libxpg4 I have added the support for BIG5 encoding into libc/libxpg4/mklocale. 1998-08-15 12:51:49 +00:00
liby Don't install an elf liby.so[.2] in /usr/lib/compat. We have never had 1998-10-11 04:10:14 +00:00
libz Merge changes from vendor branch (1.1.1 -> 1.1.3) into mainline. 1999-01-10 09:53:51 +00:00
msun Disable building with alpha software completion options until we upgrade 1998-12-24 13:17:58 +00:00
ncurses/ncurses Renamed the generated include file keys.tries to keys.tries.h so 1998-03-20 16:50:08 +00:00
Makefile Build libwrap - the core to tcp_wrappers. 1999-03-14 17:56:11 +00:00
Makefile.inc