summaryrefslogtreecommitdiff
path: root/include/stdlib.h
AgeCommit message (Collapse)Author
2017-10-07remove recallocarraychristos
2017-10-07add recallocarray (used by openssh-7.6)christos
2016-07-01add hmac(3)christos
2015-11-07Add the C11 function aligned_alloc to libc.nros
2015-02-17Move reallocarray under _OPENBSD_SOURCE where it belongs.joerg
2015-02-17Introduce reallocarr(3) for easy (re)allocation of memory with overflowjoerg
checks. Compared to OpenBSD's reallocarray, makes it easier to avoid memory leaks on allocation failures and it doesn't depend on malloc(0) != NULL for correct error checking. Compared to plain realloc, it also avoids the problem of intermediate integer overflows. The trade-off is the use of void * to side step C type system with regard to generic pointer to pointer.
2015-02-05add reallocarraychristos
2015-01-18remove restrict to match with OpenBSD prototype (Kamil Rytarowski)christos
2015-01-16Add strtonum protected with _OPENBSD_SOURCEchristos
2014-06-18add mkostemp{s,} mkstemps from FreeBSDchristos
2014-06-12rename to 60christos
2014-06-12fix srandom and initstate signatures (from enh at google)christos
2014-01-08add ptsname_rchristos
2013-04-26add at_quick_exit and quick_exitchristos
2013-04-26Provide the long long routines for C++11 code.joerg
2013-04-19Add MB_CUR_MAX_L.joerg
2013-04-18Add mblen_l, mbstowcs_l, wctomb_l, mbtowc_l and wcstombs_l.joerg
2013-04-18Add strtof_l, strtod_l and strtold_l.joerg
2013-04-16Add strtol_l and friends. Switch _citrus_bcs_strtol to use plainjoerg
strtol_l unless in tools mode. Add note to retire the BCS code on the next libc major bump.
2012-06-21sprinkle restrict in realpath(3)christos
2012-06-03Switch device database to cdb(5). Rework ttyname(3) and ttyname_r(3) tojoerg
depend on new devname_r(3) as heart. Add /dev/pts magic directly to devname(3). While it can lead to returning non-existing paths, the behavior is more consistent that way. Drop caching layer in devname(3), it doesn't buy anything for the common case of having access to the database. Teach devname(3) proper fallback behavior of scanning /dev. Create both old-style and new-style database for now in /etc/rc.d/sysdb.
2012-04-20PR/46360: YAMAMOTO Takashi: Restore NetBSD-5 compatibility with putenv()christos
copying the passed string (which is not ToG compliant), instead of using it directly in the environment arrat as it should. Needs to be pulled up to NetBSd-6.
2011-03-16remove commaize_number.christos
2011-03-15put in a proto for commaize_number()pooka
(nb. doing this purely as the minimum work solution to get a working build)
2011-02-04add arc4random_{buf,uniform}, from OpenBSD.christos
2010-12-22Use __constfunc(3) instead of __attribute__((const)) directly.jruoho
2010-10-01make putenv POSIX compliant.christos
2010-06-01later versions of pcc may define __GNUC__ for compatibility reasons, soplunky
having a system definition for alloca is counter productive as it seems fairly common to use #ifdef __GNUC__ #define alloca .. #endif in user-headers (eg see usr.sbin/gspa/gspa/gspa_ass.h) So, defang this definition as we don't otherwise provide alloca on NetBSD
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.