summaryrefslogtreecommitdiff
path: root/include/stdlib.h
AgeCommit message (Collapse)Author
2010-02-25Consistently use __printflike and __scanflike.joerg
2009-11-15Don't define wchar_t for c++; it is native in the language. From Alexanderchristos
Nasonov
2009-07-20Add a fast, platform independent hash function to libc.joerg
The algorithm used is the Jenkins hash. The name (mi_vector_hash) reflects the nature of the hash function. Add glue for libc ATF tests and include a test case to make sure that (mis)alignment and endianess are handled correctly. Bump libc minor to 169.
2009-01-20cleanup after devmajor_t:drochner
-since getdevmajor(3) is now binary compatible again with <=5.0 there is no need to rename, I've just left a __getdevmajor50 symbol temporarily for those who track -current -update manpage
2009-01-20Change major()/minor() to return 32-bit types again, calleddrochner
devmajor_t/devminor_t, as proposed on tech-kern. This avoids 64-bit arithmetics and 64-bit printf formats in parts of the kernel where it is not really useful, and helps clarity.
2009-01-11merge christos-time_tchristos
2008-06-21Use __builtin_alloc() with pcc.gmcgarry
2008-04-07RANDOM_MAX: don't rely on integer overflow.yamt
2008-04-01everyone else assumes that defining "_XOPEN_SOURCE" means XPG4.2,drochner
so remove comparisions against the numerical values "3" or "4"
2008-02-28add RANDOM_MAX define from anon ymouschristos
2008-02-02Add csetexpandtc()christos
2007-12-24change some __attribute__s to __keywordsperry
2007-12-14humanize_number was the only function in <util.h> that is not in libutil.christos
Move it to stdlib.h and add dehumanize_number.
2007-11-19Enable posix_memalign().ad
2007-04-22The alloca() arg type check is broken (cpp do not do string comparisions)ragge
so make it marginally less broken so that it works with other compilers than gcc. Probably the check can be removed, I doubt anyone will try to use gcc1 anymore.
2006-03-15Add strtof(3) and strtold(3); welcome libc 12.137.kleink
2005-12-26u_intN_t -> uintN_tperry
2005-12-24__const__ -> constperry
This is in an __attribute__ so it isn't really necessary, but it gets it out of the listing of __keyword__s...
2005-09-26Move getenv_r() to the local section.kleink
2005-09-25Add getenv_r and ttyname_rchristos
2005-09-13compat code reorgchristos
2005-06-11Add a macro __MKTEMP_OK__ that renames mktemp() to _mktemp() for uses thatchristos
have been checked, so that the linker does not warn us. There are valid uses for mktemp() such as for creating filenames that are going to be targets of the rename system call. Discussed with lukem.
2005-02-03de-__P -- the hack is long since useless. Discussed with christos,perry
matt, kleink, others. Approved by christos.
2004-12-16Add a function called getdevmajor().atatat
It tells you the major device number for whatever character or block device you ask it. This is sort of the inverse of devname(3) but not quite, since it's backed by the kernel (sysctl's kern.drivers information) and not a database cobbled together from the contents of the filesystem.
2004-05-27Add unix/98 pty function prototypes.christos
2004-04-23more const sprinkling on cget* suggested by kleink.christos
2004-04-23constify the db name vector argument.christos
2003-08-07Move UCB-licensed code from 4-clause to 3-clause licence.agc
Patches provided by Joel Baker in PR 22270, verified by myself.
2003-07-08Do not give names to the parameters in function prototypes (those nameskristerw
reduces the usefulness of the gcc -Wshadow flag).
2003-04-28Add a new feature-test macro, _NETBSD_SOURCE. If this is definedbjh21
by the application, all NetBSD interfaces are made visible, even if some other feature-test macro (like _POSIX_C_SOURCE) is defined. <sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE, _POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve existing behaviour. This has two major advantages: + Programs that require non-POSIX facilities but define _POSIX_C_SOURCE can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS. + It makes most of the #ifs simpler, in that they're all now ORs of the various macros, rather than having checks for (!defined(_ANSI_SOURCE) || !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place. I've tried not to change the semantics of the headers in any case where _NETBSD_SOURCE wasn't defined, but there were some places where the current semantics were clearly mad, and retaining them was harder than correcting them. In particular, I've mostly normalised things so that _ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE, _XOPEN_SOURCE and _NETBSD_SOURCE in that order. Tested by building for vax, encouraged by thorpej, and uncontested in tech-userlevel for a week.
2003-04-14Well, _The_ Open Group.kleink
2003-04-14Use the real TOG specification name for references.kleink
2003-04-071003.1-2001 has introduced unsetenv() which differs from the currentkleink
implementation in not permitting a "name=value" argument. * Add a conforming __unsetenv13() and do function renaming for unsetenv(); preserve old symbol with old behavior. * Make visible setenv() and unsetenv() for 1003.1-2001 feature selection macros; resolves PR standards/20479.
2003-03-01Add _Exit(), for C99 and POSIX-2001.bjh21
Proposed on tech-userlevel to a resounding silence in April last year.
2002-11-29add strsuftoll(3) and strsuftollx(3) - parse a string for a numberlukem
with an optional suffix, product (two numbers separated by `x'), and provide range checking
2002-05-24add arc4random(3). from openbsditojun
2001-03-28Don't declare qdiv() when qdiv_t wasn't defined previously; fixes PR lib/11557kleink
from Richard Earnshaw.
2001-03-21Sprinkle some restrict qualifiers.kleink
2001-03-10add prototypes for shquote() and shquotev()cgd
2001-02-19add prototypes for getprogname and setprognamecgd
2000-12-20deal with bsearch duplicate declaration.christos
2000-11-15Move fmtcheck() prototype to stdio.h. It makes more sense to declare itbriggs
with the formatting functions with which it is meant to be used. Thanks to Klaus Klein for "encouraging" me to make this change.
2000-10-20Add {__,}fmtcheck(), a function specified by Bill Sommerfeld to checkbriggs
a user-supplied format string against a fallback format string to ensure that they will consume arguments of the same type. libc minor bump for new API entry point.
2000-10-03Allow format-arg checking for setproctitlesommerfeld
2000-08-10ISO/IEC 9899:1999: MB_CUR_MAX expands to a positive integer expression withkleink
type size_t (not int). (Incompatible ABI change, ignored due to a window of just two days.)
2000-08-08Preparation for the future introduction of multibyte locale.tshiozak
- MB_LEN_MAX is increased to 32. - To ensure binary compatibility for old executables under multibyte locale, versioned setlocale is added. - __mb_len_cur definision is added in setlocale.c and enable it in stdlib.h . It is also important for multibyte locale stuffs, but I just forgot.
2000-03-06Add ISO C99 long long integer general utility interfaces; partially addresseskleink
PR standards/9482.
2000-01-10Move <null.h> to <sys/null.h> for the purpose of avoiding conflicts due tokleink
std C headers including it, and a kernel module written in C++ would benfit as well.
1999-12-22For the benefit of G++'s null pointer constant implementation, #define NULLkleink
as __null with egcs 1.0 (GCC 2.90) and above. As several headers are affected by this change, move the definition into a new header file, <null.h>, to ease maintenance.
1999-02-06Add l64a_r(), a reentrant version of l64a(); found in the Multithreadingkleink
Extension of SVID4.