summaryrefslogtreecommitdiffstats
path: root/lib/libc (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix *longjmp() return values.miod2003-01-043-59/+57
|
* Adapt to recent changes in libc/libc_r wrt weak symbols, so that programsmiod2003-01-026-50/+66
| | | | | | | can link against libc without unresolved symbols again. Anyone who correctly guessed that my m88k hard drive has been recovered, wins a strawberry lollipop.
* Rename cerror to __cerror and curbrk to __curbrk, to avoid namespacemiod2003-01-029-41/+42
| | | | pollution. Conforming to art@'s evil plans.
* Begone.miod2003-01-023-94/+0
|
* Handle things like "%%m" correctly; closes PR 3057millert2003-01-021-1/+6
| | | | OK miod@
* Typosmiod2003-01-023-13/+13
|
* Catch EISDIR in execvp() and friends so that if a directory appearsmillert2002-12-311-1/+2
| | | | in PATH that matches the name to be executed we skip it; Andy Isaacson
* Unbreak for bigendian, identical diff as Theo's.drahn2002-12-231-2/+3
|
* o Ansi function headersmillert2002-12-237-305/+263
| | | | | | | | o Add __BEGIN_DECLS/__END_DECLS to include files o Safe macros o Remove useless variable assignment in the End function of *hl.c o Some minor KNF, needs more From Dan Weeks
* Make SysV-style shared memory and semaphore limits sysctl'able.millert2002-12-171-1/+87
| | | | | | | | | | | | Instead of allocating a static amount of memory for the data structures via valloc() in allocsys(), allocate things dynamically using pool(9) when possible and malloc(9) when not. The various members of struct seminfo and struct shminfo are in kern.seminfo and kern.shminfo respectively (not all members of kern.seminfo are changable). The data structures used still leave something to be desired but things are not made worse in that respect by this commit.
* Casting to unsigned int in isfoo() causes problems on alpha andmillert2002-12-151-12/+12
| | | | | | | sparc64. Change cast back to unsigned char but do a bitwise AND with 0xff to avoid any sign extension weirdness and to make it impossible for us to overflow _C_ctype_. The bitwise AND is probably not needed and may be removed later if this does not trigger compiler bugs.
* more writeable -> writable by torhhenning2002-12-152-4/+4
|
* Instead of doing "if (c == EOF) return 0;" use the hook ('?') operatormillert2002-12-141-35/+13
| | | | | instead to make these one-liners. Works around a compiler bug on vax that affects both the libc and inline versions identically.
* Less stupid check for 7-bit ascii in toupper/tolowermillert2002-12-133-9/+7
| | | | Remove useless check for EOF in isascii
* Cast to unsigned int, not unsigned char, since what is being cast is anmillert2002-12-133-17/+17
| | | | int, not a char.
* Convert ctype.h macros into inline functions. This fixes the issues wemillert2002-12-112-4/+6
| | | | | | currently have with the macro versions and makes the ctype.h versions 100% identical to what is in libc. Discussed with pjanzen@ and OK'd by deraadt@.
* Make x_handy in XDR u_int, not int since there are places in themillert2002-12-111-9/+15
| | | | | | | | code that assign a u_int value to x_handy. However, this means that we need to be careful checking for overflow as we can no longer subtract a value and check the result for < 0. We reorder the expression instead to avoid this problem (basic algebra). deraadt@ OK
* use proper __findenv() prototype; millert@ okmickey2002-12-102-8/+8
|
* Document BSD behavior of accepting '-' within optstring as long asmillert2002-12-101-5/+25
| | | | | | | | it is not the fist character of optstring (since that would conflict with GNU semantics). Update the bit on "W;" within optstring when called as getopt (not getopt_long) to current reality.
* When doing permutation, only treat "-" as an option if it was specifiedmillert2002-12-101-4/+5
| | | | in optstring. Problem noticed by Theo.
* bug fixetoh2002-12-101-3/+3
|
* Fix pasto, spotted by lebel@millert2002-12-081-2/+2
|
* In BUGS section, append a warning to not use '-' as the first charactermillert2002-12-081-3/+13
| | | | of optstring to avoid a semantic conflict with GNU getopt.
* SUS (and apparently 1003.1-2001) say to check optstring for NULLmillert2002-12-082-4/+9
|
* If we are passed "-" in argv and the user didn't specify '-' in optstring,millert2002-12-081-6/+10
| | | | return -1 like POSIX requires.
* BSD getopt() supports '-' in the optstring so we should too.millert2002-12-081-8/+15
| | | | This is used by a few programs such as man and su.
* Fix pasto in last commit.millert2002-12-071-3/+3
|
* For getopt_long_only() we *do* want to match single-character optionsmillert2002-12-071-41/+36
| | | | | as shortcuts for long ones, but only if this would not conflict with a short option in optstring. Now binutils gas works.
* In srandomdev(), if we can't access /dev/arandom, use the sysctl() instead.millert2002-12-061-10/+27
| | | | | We don't want to use the sysctl() by default since we are reading more than just a few bytes of entropy when setting up the state.
* Fix two compatibility issues with our getopt_long_only() vs. the GNU version:millert2002-12-061-28/+61
| | | | | | | | | | | | | | o Check for long options even when not at the beginning of an option. For instance, if -a is a short option w/o an arg and -static is a boolean long option then -astatic is valid for getopt_long_only(). o If a potential long argument does not match longopts and the first character is not a short option, print a warning and skip the rest of the argument. Also clean up some trailing whitespace and change return value of parse_long_options() from -2 to -1 when unmatched and in long_only mode. With these fixes the binutils ld seems happy with our getopt_long_only()
* Correctly handle -Wlong_arg (no space between -W and long_arg) when "W;"millert2002-12-051-6/+8
| | | | is in optstring.
* Reorganize this so that getopt_only_only() works correctly.millert2002-12-051-221/+208
| | | | | | | | In order for getopt_only_only() to work we need to check for long options before short ones. I have merged getopt_internal and getopt_long_internal into a single function with the actual long args parsing broken out into a separate function. This also simplifies the flow of control.
* make getopt_long and getopt_long_only protos match getopt.hmillert2002-12-051-3/+3
|
* Add "RETURN VALUES" sectionsmillert2002-12-042-2/+52
|
* .Xr getopt_longmillert2002-12-041-1/+2
|
* Whoops, add missing #ifdef REPLACE_GETOPTmillert2002-12-031-2/+4
|
* fix typomillert2002-12-031-1/+1
|
* GNU-like getopt_long() from NetBSD with changes by me to supportmillert2002-12-033-8/+845
| | | | | | | | getopt_long_only(). At some point this should replace the BSD getopt(3) but we are not there yet. While I am here add protection from the multiple getopt() definitions due to conflicting standards.
* Crank all library major numbers. Needed due to the fact that wemillert2002-12-031-2/+2
| | | | | | | | now build libraries with propolice enabled. Without this, existing binaries (such as ports/packages) that link with any system library other than libc will fail with an undefined symbol of "___guard" (__guard on ELF). Pointed out by markus@ and discussed with deraadt@
* Document getlogin_r()millert2002-12-022-3/+29
|
* Add ecvt(), fcvt() and gcvt() for standard compliance and legacy code.millert2002-12-025-9/+396
|
* KNFderaadt2002-12-021-6/+6
|
* Import propolice (http://www.trl.ibm.com/projects/security/ssp), a stackmiod2002-12-023-2/+92
| | | | | | | | | | | | | | | attack protection scheme, into gcc. This protection is enabled by default. It can be turned off by using the -fno-stack-protector flag. Code by Hiroaki Etoh (etoh at jp dot ibm dot com); work on openbsd-specific integration by fgsch@, deraadt@ and myself; tests by fgsch@, naddy@ and myself; beer drinking by myself. Please note that system upgrades with this new code will require a new libc and ld.so to be build and installed before the propolice-enabled compiler can be installed.
* fd sharing was re-enabled quite awhile ago.brad2002-11-281-6/+1
|
* Honour malloc_junk ('J') with realloc(3), and fix page_dir shrink update.tdeval2002-11-271-6/+11
|
* Mention the net.inet.tcp.ecn sysctl.wcobb2002-11-251-1/+4
| | | | ok kjc@
* Warn if atexit(3) fails. Change some tabs to spaces. Usecloder2002-11-251-5/+5
| | | | | | STDERR_FILENO instead of 2. OK millert@
* "The contents is" -> "The contents are"cloder2002-11-241-2/+2
|
* Zero out the reserved fields of struct gmonhdr rather than leavingcloder2002-11-241-1/+2
| | | | | | stack garbage in them. From FreeBSD. OK deraadt@
* Fix comment: s/trailing NULL/trailing NUL/, no code changes.cloder2002-11-241-2/+2
|