summaryrefslogtreecommitdiffstats
path: root/include/stdlib.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Make putenv(), setenv() and unsetenv() standards compliant. Themillert2009-06-031-3/+3
| | | | | | standard explicitly disallows passing setenv a name with a '=' in it but historic BSD behavior is to allow this but to ignore the '=' and anything after it.
* - replace dtoa w/ David's gdtoa, version 2008-03-15martynas2008-09-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - provide proper dtoa locks - use the real strtof implementation - add strtold, __hdtoa, __hldtoa - add %a/%A support - don't lose precision in printf, don't round to double anymore - implement extended-precision versions of libc functions: fpclassify, isnan, isinf, signbit, isnormal, isfinite, now that the ieee.h is fixed - separate vax versions of strtof, and __hdtoa - add complex math support. added functions: cacos, casin, catan, ccos, csin, ctan, cacosh, casinh, catanh, ccosh, csinh, ctanh, cexp, clog, cabs, cpow, csqrt, carg, cimag, conj, cproj, creal, cacosf, casinf, catanf, ccosf, csinf, ctanf, cacoshf, casinhf, catanhf, ccoshf, csinhf, ctanhf, cexpf, clogf, cabsf, cpowf, csqrtf, cargf, cimagf, conjf, cprojf, crealf - add fdim, fmax, fmin - add log2. (adapted implementation e_log.c. could be more acruate & faster, but it's good enough for now) - remove wrappers & cruft in libm, supposed to work-around mistakes in SVID, etc.; use ieee versions. fixes issues in python 2.6 for djm@ - make _digittoint static - proper definitions for i386, and amd64 in ieee.h - sh, powerpc don't really have extended-precision - add missing definitions for mips64 (quad), m{6,8}k (96-bit) float.h for LDBL_* - merge lead to frac for m{6,8}k, for gdtoa to work properly - add FRAC*BITS & EXT_TO_ARRAY32 definitions in ieee.h, for hdtoa&ldtoa to use - add EXT_IMPLICIT_NBIT definition, which indicates implicit normalization bit - add regression tests for libc: fpclassify and printf - arith.h & gd_qnan.h definitions - update ieee.h: hppa doesn't have quad-precision, hppa64 does - add missing prototypes to gdtoaimp - on 64-bit platforms make sure gdtoa doesn't use a long when it really wants an int - etc., what i may have forgotten... - bump libm major, due to removed&changed symbols - no libc bump, since this is riding on djm's libc major crank from a day ago discussed with / requested by / testing theo, sthen@, djm@, jsg@, merdely@, jsing@, tedu@, brad@, jakemsr@, and others. looks good to millert@ parts of the diff ok kettenis@ this commit does not include: - man page changes
* remove recalloc; sloppy me; ok deraadt@otto2008-06-241-2/+1
|
* Remove obsolete (and erroneous) #if statement that caused all compilersragge2008-06-201-6/+2
| | | | except for gcc to get the wrong prototype. Ok millert@
* Add strtof() to libc, some ports seem to like it. Currently it's a simplelandry2008-06-131-1/+2
| | | | | | | call to strtod() with bounding check. Discussed with pyr@ and otto@ ok otto@ deraadt@
* diff from djm@ committed at his request:otto2008-03-161-1/+5
| | | | | | | | | | | | | | introduce two new APIs for requesting strong random numbers: arc4random_buf() - fill an arbitrary memory range with random numbers arc4random_uniform() - return a uniformly distributed random number below a specified upper bound, avoiding the bias that comes from a naive "arc4random() % upper_bound" construction. these mirror similarly-named functions in the kernel; lots of discussion deraadt@ mcbride@
* add recaloc(3)millert2007-09-031-1/+2
|
* add lldiv prototype; ok deraadt@djm2006-09-171-1/+3
|
* after we changed mode_t to be an int, the devname() man page wasderaadt2006-03-311-2/+2
| | | | updated but the function itself never was; ok millert
* Add lldiv(), imaxabs(), imaxdiv(), strtoimax() and strtoumax()millert2006-01-131-2/+9
|
* Adapt things to use __type_t instead of _BSD_TYPE_T_millert2006-01-061-11/+9
| | | | | Add new sys/_types.h header Include machine/_types.h or sys/_types.h where applicable
* First step in include files overhaul. Use __FOO_VISIBLE (as definedmillert2005-12-131-45/+78
| | | | | in sys/cdefs.h) instead of _FOO_SOURCE. Also fix several namespace pollution issues, including the byte order defines. OK deraadt@
* mktemp(3) et al. go in stdlib.h, not unistd.h. While there be moremillert2005-05-271-1/+5
| | | | explicit about mktemp(3) in the man page.
* major abi changes:espie2005-05-111-2/+3
| | | | | | | | | | | | | | | | | | * introduce the mbstate_t typedef. impacts gnu libiconv, which has already been taken care of. * Prepare for mb stuff to really exist, replace macro MB_CUR_MAX with an external variable __mb_cur_max (impacts libX11 and various ports). * use mbstate in all the mb <-> wchar functions with state. * add a stub iswctype function allowing some ports to compile. bash and gdiff are missing wcscoll, and need to be told there's no i18n until this is fixed. Discussed and matthieu, otto, millert, kettenis, deraadt. Major libc bump
* Update strtonum() protormillert2004-08-031-3/+3
|
* strtonum prototypetedu2004-05-031-1/+3
|
* Add _Exit(3) as per C99. Discussed with espie@ some time ago.millert2004-05-031-1/+2
|
* Prototype llabs(3). Forgotten commit gathering bit rot in my tree...millert2004-01-211-1/+3
|
* add __bounded__ attributes for userland headers; enabled with -Wboundedavsm2003-08-011-3/+5
| | | | ok deraadt@
* backout the __bounded__ attributes for a while; requested by deraadt@avsm2003-06-261-5/+3
|
* Mark various standard library functions with the __bounded__ attribute.avsm2003-06-261-3/+5
| | | | | You must have an up-to-date gcc for this! deraadt@ ok
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* GNU-like getopt_long() from NetBSD with changes by me to supportmillert2002-12-031-1/+4
| | | | | | | | 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.
* Add ecvt(), fcvt() and gcvt() for standard compliance and legacy code.millert2002-12-021-1/+4
|
* Add prototype for atoll(3). I must have forgotten to commit this bitmillert2002-12-021-1/+2
| | | | when I committed atoll(3).
* NULL is now 0L so it is the same size as a pointer.millert2002-10-251-2/+2
| | | | OK mickey@ and discussed with deraadt@
* Replace strtou?q() with the more standard strtou?ll(), using weakmillert2002-06-291-1/+5
| | | | aliases to fake up strtou?q(). espie@ OK.
* Revert local changes that snuck in to the last commit.millert2002-02-201-8/+1
|
* Some user header files may define an abs macro which will cause amillert2002-02-201-1/+17
| | | | | | | syntax error if the #define happens before stdlib.h is included. If abs is #defined, #undef and issue a warning. This is similar to what Tru64 UNIX does and is effectively the same as what happens on Solaris (though on Solaris the real abs() is a macro).
* Manual cleanup of remaining userland __P use (excluding packages maintained outside the tree)millert2002-02-171-14/+11
|
* Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.millert2002-02-161-82/+82
|
* Ghostscript port refused to build with 'printf' in thekrw2001-11-041-2/+2
| | | | | | __attribute__ statement. Using '__printf__' makes it happy. ok millert@ miod@
* Mention printf-like attributes for setproctitle().miod2001-11-011-2/+3
| | | | millert@ espie@ ok
* Add new cgetusedb() function to toggle reading of .db files in getcap(3).millert2001-06-181-1/+2
| | | | | | Needed for cap_mkdb to really DRT when given several input files or an output file with a different name from the input file. cvs: ----------------------------------------------------------------------
* Add srandomdev() from FreeBSD for use by sendmail and others.millert2000-04-031-1/+2
|
* In ANSI C++, wchar_t is a builtin. gcc 2.95.1 handles that correctly.espie1999-11-271-1/+4
| | | | | Redefining it as a typedef is an error, as it prevents overloading on e.g., int/wchar_t separately.
* Define NULL to be __null for C++: better quality of implementation.espie1999-06-111-1/+5
| | | | | | __null is a magic constant of integral type that converts to a null pointer as should be, but warns for ambiguity when used to resolved an overload between an integral type and a pointer type.
* constify getcap(3). This fixes a warning in libcurses and doesn'tmillert1999-02-251-8/+8
| | | | | really change the API since those parameters that was been constified really are not modified by getcap(3) routines.
* Add thread-safety to libc, so that libc_r will build (on i386 at least).d1998-11-201-1/+2
| | | | | | | | | | | | | All POSIX libc api now there (to P1003.1c/D10) (more md stuff is needed for other libc/arch/*) (setlogin is no longer a special syscall) Add -pthread option to gcc (that makes it use -lc_r and -D_POSIX_THREADS). Doc some re-entrant routines Add libc_r to intro(3) dig() uses some libc srcs and an extra -I was needed there. Add more md stuff to libc_r. Update includes for the pthreads api Update libc_r TODO
* More XPG4.2 --millert1998-02-071-4/+4
| | | | | setstate takes a const parameter don't ever spew to stderr, just return NULL
* size_t n in initstate(); XPGderaadt1998-02-061-2/+2
|
* for XPG, do not use special typedef typesderaadt1997-12-091-2/+2
|
* Well, as we are heading for a release people are encouraged to rebuild theirniklas1997-09-211-0/+1
| | | | | entire trees for testing anyway, I might as well do this intrusive touching of include files now. Added openBSD tags.
* arc4random() number generator, for use with things like RPC xid's.dm1996-12-281-0/+4
|
* abort() and exit() need __dead tags in stdlib.h; mike.long@analog.com;deraadt1995-12-301-3/+3
| | | | netbsd pr#1845
* initial import of NetBSD treederaadt1995-10-181-0/+197