summaryrefslogtreecommitdiffstats
path: root/include/stdlib.h
Commit message (Collapse)AuthorAgeFilesLines
* Make the first argument of getbsize a size_t* instead of an int*, as this is ↵markm2002-10-231-1/+1
| | | | what the quantity actually is. Fix an easy const while I'm here.
* Whitespace cleanup (half for fixing missing whitespace before `__restrict'bde2002-09-211-20/+21
| | | | | | again). Removed the second pair of banal comments about `quot' and `rem'.
* Use new visibility macros. Reorder some disordered declarations. Addwollman2002-09-211-52/+104
| | | | | | new 1003.1-2001 declarations, commented out in cases where we do not implement the function. Note that strtoq() and strtouq() are slated for deletion in 6.0. (2 of 5)
* Without fixing the namespace issues, add prototypes for the new _Exit()wollman2002-09-101-2/+5
| | | | and qsort_r() functions. Fix one other missorted declaration.
* Style: One space between "restrict" qualifier and "*".tjr2002-09-061-8/+8
|
* Add restrict qualifiers to the arguments of mbstowcs, mbtowc() andtjr2002-09-011-3/+3
| | | | wcstombs().
* o Merge <machine/ansi.h> and <machine/types.h> into a new headermike2002-08-211-11/+10
| | | | | | | | | | | | | | | | | | | | | called <machine/_types.h>. o <machine/ansi.h> will continue to live so it can define MD clock macros, which are only MD because of gratuitous differences between architectures. o Change all headers to make use of this. This mainly involves changing: #ifdef _BSD_FOO_T_ typedef _BSD_FOO_T_ foo_t; #undef _BSD_FOO_T_ #endif to: #ifndef _FOO_T_DECLARED typedef __foo_t foo_t; #define _FOO_T_DECLARED #endif Concept by: bde Reviewed by: jake, obrien
* - Add the 'restrict' qualifier to the function prototypes androbert2002-08-151-5/+5
| | | | | | | | definitions of the functions that convert strings to numbers and are defined by IEEE Std 1003-1.2001. - Use ANSI-C function definitions for all of the functions mentioned above plus strtouq and strtoq. - Update the prototypes in the manual pages.
* Don't define wchar_t if we are a C++ compiler.obrien2002-07-091-0/+2
| | | | PR: 31864, 40084
* Convince lint via the standard lint-comment /* LONGLONG */ to notmarkm2002-07-041-0/+5
| | | | whine about our (valid) "long long" usage.
* Const poison.phk2002-05-301-1/+1
| | | | Partially submitted by: wollman
* Constify _malloc_options.phk2002-04-241-1/+1
|
* Breath deep and take __P out of the system include files.imp2002-03-231-90/+88
| | | | | | # This appears to not break X11, but I'm having problems compiling the # glide part of the server with or without this patch, so I can't tell # for sure.
* const poison just like NetBSD.imp2002-03-221-7/+7
|
* Move user_from_uid to pwd.himp2002-02-141-2/+0
| | | | | | | | | | | | | Move group_from_gid to grp.h Remove from stdlib.h Make the prototypes match the code Fix rm and mv to include new files. NetBSD has these defined in those files, and others too that I've not done. Approved by: terminal room kabal Reviewed by: jhb, phk
* Revert 1.29. It breaks the build. Will figure out a better way to doimp2002-02-131-2/+2
| | | | this that doesn't break things.
* Make the user_from_uid and group_from_gid prototypes match the actualimp2002-02-131-2/+2
| | | | function definitions.
* Fix support for K&R C.mike2001-12-221-1/+1
| | | | MFC after: 3 days
* Oops, actually fix the namespace pollution for atoll() as the previousbde2001-11-291-4/+4
| | | | commit claimed to do.
* Fixed namespace pollution and/or breakage of K&R and C90 support related tobde2001-11-281-16/+21
| | | | | | | | | | | | | | | | | | | | | the following functions in the following commits: - atoll() in revs 1.23-1.25 - llabs() and lldiv() in revs 1.22 - strtoq() and strtouq() in revs 1.18 C99 functions must not be declared in C90/POSIX.1-1990 sections, and "long long" must not be exposed to compilers that don't support it. Fixed style bugs (mainly misindentation and disorder) related the following functions in the following commits: - atoll() in revs 1.23-1.25 - getprogname() in rev.1.21 - sranddev() in revs 1.19-1.20 - strtoq() and strtouq() in rev.1.13 - user_from_uid() in rev.1.1 Breakage of K&R and C90 support used to be avoided by conditializing the "long long"s for strtoq() and strtouq() on __STRICT_ANSI__, but the conditionals should have gone away in rev.1.13 when the "long long"s went away (the problem was moved to the places that declare quad_t and u_quad_t).
* Whitespace formattingache2001-11-281-1/+2
|
* Fix just added atoll prototypeache2001-11-281-1/+1
|
* Add atoll(3) to conform POSIX and C99ache2001-11-281-0/+1
|
* o Implement imaxabs(), imaxdiv(), llabs(), lldiv().mike2001-11-151-0/+13
| | | | | | | o Update abs(3), div(3), labs(3), ldiv(3) to reflect standards conformance and add additional references. Reviewed by: bde, wollman
* Introduce getprogname(3) and setprogname(3) library calls. These getdd2001-05-151-0/+3
| | | | | | | | | and set __progname, respectively. Discussed on: -arch (Feb 2001), -audit Reviewed by: -audit Approved by: kris Obtained from: (mostly) NetBSD
* Move sranddev() to !ANSI_SOURCE !POSIX_SOURCE sectionache2001-04-231-1/+1
| | | | Pointed out by: bde
* Add sranddev() prototypeache2001-04-231-0/+1
|
* Impliment the ISO-C99 strto[u]ll()obrien2001-02-271-0/+4
| | | | and rewrite strto[u]q() in terms of it.
* Make it possible to override the function which writes messages tophk2000-11-261-0/+3
| | | | | | | stderr in case of warnings and errors. Rename malloc_options to have a leading underscore, I belive I have been told that is more correct namespace wise.
* Fixed missing declaration of rand_r(3).bde1999-12-231-0/+2
|
* Little reorganization:dt1998-12-191-5/+3
| | | | | | | | | | - created internal names for fixed-size integral types, like __int32_t. They will be used to make several headers self-sufficient. - <stdlib.h> don't include <machine/types.h> anymore. - created <sys/inttypes.h>, which can be used as <inttypes.h>. - declaration of uoff_t and ufs_daddr_t moved to <sys/types.h>. Reviewed by: bde
* Add reallocf to the library. This function is simliar to realloc, butimp1998-09-141-0/+1
| | | | | | | | | | | | | when it returns NULL to indicate failure, it will also free the memory that was passed to it, if that was non-null. This does not change the semantics of realloc. A second commit will be done to commit the conversion of those places in the code that can safely use this to avoid memory leaks when confronted with low memory situations. Beaten-to-death-but-finally-approved-in: -current
* Change the return types for strtoq and strtouq to int64_t and u_int64_tjb1998-05-111-3/+2
| | | | | | | | | instead of long long and unsigned long long. Really they should be quad_t and u_quad_t, but that would require sys/types.h and this header only includes machine/types.h. The difference here is that int64_t and u_int64_t on alpha are long and unsigned long, not long long etc. This is required to pass gcc's type checking where long != long long even though they are the same size of alpha.
* Moved include of <sys/cdefs.h> earlier for the same reasons as movingbde1998-02-271-2/+2
| | | | | | it in <sys/types.h>. PR: 5785
* Move machine/types.h to non-standard sectionache1997-06-141-2/+3
| | | | | Change order of arc4* functions Pointed-by: bde
* Add arc4random family declarationache1997-06-141-0/+5
|
* Instead of copying fallback code over and over in each program,ache1997-06-141-1/+1
| | | | | | implement (better) falback code inside srandomdev() itself. Change return type from int to void (binary compatibility surprisely achieved). Userland code will be changed soon.
* Add srandomdev() prototypeache1997-03-231-0/+1
|
* Merge Lite2 changes -peter1997-03-111-10/+3
| | | | move getopt etc declarations from stdlib.h to unistd.h
* Don't use __dead or __pure in user code. They were obfuscationsbde1996-09-141-12/+6
| | | | | | for gcc >= 2.5 and no-ops for gcc >= 2.6. Converted to use __dead2 or __pure2 where it wasn't already done, except in math.h where use of __pure was mostly wrong.
* Fixed longstanding namespace convolution involving rune_t vs wchar_t.bde1996-05-011-3/+7
| | | | | | | | | | | If _ANSI_SOURCE or _POSIX_SOURCE is defined, then <ctype.h> had to be included before <stddef.h> or <stdlib.h> to get rune_t declared. Now rune_t is declared perfectly bogusly in all cases when <ctype.h> is included. This change breaks similar (but more convoluted) convolutions in the stddef.h in gcc distributions. Ports of gcc should avoid using the gcc headers.
* Don't declare rune_t, putenv() or setenv() if _POSIX_SOURCE is declared.bde1995-04-151-21/+19
| | | | | | | | | | | | | Previously they were only guarded by `#ifndef _ANSI_SOURCE'. They are neither ANSI nor POSIX nor std and should never have been declared here. Declare functions like abs() as having attribute `__pure2'. Declaring them as having type `__pure' has been a no-op for some time. Delete obsolete comment about stub locale functions. Use consistent formatting for the rand48 functions. These and about 30 other functions should never have been declared here either.
* Reviewed by: Bruce Evansats1994-11-211-0/+10
| | | | | Add prototypes for the *rand48 family here in the moment to get them running again.
* Declare functions that don't return as having attribute __dead2.bde1994-09-081-2/+2
|
* BSD 4.4 Lite Include Sourcesrgrimes1994-05-241-0/+175
OpenPOWER on IntegriCloud