Home | History | Annotate | Download | only in include
History log of /src/include/stdlib.h
RevisionDateAuthorComments
 1.130  02-Mar-2025  riastradh libc: New _r variants of heapsort, mergesort, qsort.

Also kheapsort_r for kernel/standalone use.

These variants allow the caller to pass a cookie through to the
comparison function, e.g. if you want to sort an array of indices
into a buffer.

qsort_r is new in POSIX.1-2024; the others are obvious analogues of
our nonstandard extensions for heapsort and mergesort.

PR lib/58931: qsort_r() missing
 1.129  17-Feb-2025  nia stdlib: Move mkostemp out of the _OPENBSD_SOURCE block.
 1.128  02-Nov-2024  nia libc: Expose mkostemp(3) to POSIX.1-2024 applications.
 1.127  11-Oct-2024  riastradh stdlib.h: Expose reallocarray only for POSIX 2024 or NetBSD/OpenBSD.

reallocarray(3) is new in POSIX 2024, so it should not be exposed if
you ask for an older POSIX standard like _POSIX_C_SOURCE=200809L.

PR standards/58741
 1.126  09-Sep-2024  riastradh stdlib.h: Use same test for def. of lldiv_t as for decl. of lldiv(3).

The !_ANSI_SOURCE conditional was a leftover from before we had
_NETBSD_SOURCE in sys/featuretest.h already defined conditionally on
!_ANSI_SOURCE.

So just nix the !_ANSI_SOURCE part -- and while here, reorder and
reformat the conditional around lldiv_t so it matches the conditional
around lldiv(3) byte-for-byte, just to make it more obvious.

PR standards/56402: Definition of lldiv_t with ANSI_SOURCE and
POSIX_SOURCE
 1.125  28-Oct-2022  wiz branches: 1.125.2;
put reallocarray() in the public namespace

reallocarray() will be part of the next POSIX release, see
https://austingroupbugs.net/view.php?id=1218

adapt an errno value to match POSIX expectations

As discussed on tech-userlevel
 1.124  05-Oct-2022  nia Remove hacky gcc2-specific alloca definition.
 1.123  03-Jul-2021  christos PR/56250: Michael Forney: mkstemp/mkdtemp not declared with
_POSIX_C_SOURCE=200809L
 1.122  26-May-2020  joerg Avoid depending on namespace pollution in stdlib.h.
 1.121  05-Jan-2019  maya We can make a stronger guarantee than __pure.
abs/labs don't read global memory.

Make GCC 9 happier.
 1.120  15-Aug-2018  martin PR standards/53525: move getsubopt() to stdlib.h
 1.119  07-Oct-2017  christos branches: 1.119.2; 1.119.4;
remove recallocarray
 1.118  07-Oct-2017  christos add recallocarray (used by openssh-7.6)
 1.117  01-Jul-2016  christos add hmac(3)
 1.116  07-Nov-2015  nros Add the C11 function aligned_alloc to libc.
 1.115  17-Feb-2015  joerg Move reallocarray under _OPENBSD_SOURCE where it belongs.
 1.114  17-Feb-2015  joerg Introduce reallocarr(3) for easy (re)allocation of memory with overflow
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.
 1.113  05-Feb-2015  christos add reallocarray
 1.112  18-Jan-2015  christos remove restrict to match with OpenBSD prototype (Kamil Rytarowski)
 1.111  16-Jan-2015  christos Add strtonum protected with _OPENBSD_SOURCE
 1.110  18-Jun-2014  christos add mkostemp{s,} mkstemps from FreeBSD
 1.109  12-Jun-2014  christos rename to 60
 1.108  12-Jun-2014  christos fix srandom and initstate signatures (from enh at google)
 1.107  08-Jan-2014  christos branches: 1.107.2;
add ptsname_r
 1.106  26-Apr-2013  christos add at_quick_exit and quick_exit
 1.105  26-Apr-2013  joerg Provide the long long routines for C++11 code.
 1.104  19-Apr-2013  joerg Add MB_CUR_MAX_L.
 1.103  18-Apr-2013  joerg Add mblen_l, mbstowcs_l, wctomb_l, mbtowc_l and wcstombs_l.
 1.102  18-Apr-2013  joerg Add strtof_l, strtod_l and strtold_l.
 1.101  16-Apr-2013  joerg Add strtol_l and friends. Switch _citrus_bcs_strtol to use plain
strtol_l unless in tools mode. Add note to retire the BCS code on the
next libc major bump.
 1.100  21-Jun-2012  christos branches: 1.100.2;
sprinkle restrict in realpath(3)
 1.99  03-Jun-2012  joerg Switch device database to cdb(5). Rework ttyname(3) and ttyname_r(3) to
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.
 1.98  20-Apr-2012  christos PR/46360: YAMAMOTO Takashi: Restore NetBSD-5 compatibility with putenv()
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.
 1.97  16-Mar-2011  christos branches: 1.97.4; 1.97.6;
remove commaize_number.
 1.96  15-Mar-2011  pooka put in a proto for commaize_number()
(nb. doing this purely as the minimum work solution to get a working build)
 1.95  04-Feb-2011  christos add arc4random_{buf,uniform}, from OpenBSD.
 1.94  22-Dec-2010  jruoho branches: 1.94.2;
Use __constfunc(3) instead of __attribute__((const)) directly.
 1.93  01-Oct-2010  christos make putenv POSIX compliant.
 1.92  01-Jun-2010  plunky later versions of pcc may define __GNUC__ for compatibility reasons, so
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
 1.91  25-Feb-2010  joerg Consistently use __printflike and __scanflike.
 1.90  15-Nov-2009  christos branches: 1.90.2;
Don't define wchar_t for c++; it is native in the language. From Alexander
Nasonov
 1.89  20-Jul-2009  joerg Add a fast, platform independent hash function to libc.
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.
 1.88  20-Jan-2009  drochner cleanup after devmajor_t:
-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
 1.87  20-Jan-2009  drochner Change major()/minor() to return 32-bit types again, called
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.
 1.86  11-Jan-2009  christos merge christos-time_t
 1.85  21-Jun-2008  gmcgarry branches: 1.85.4; 1.85.6; 1.85.12;
Use __builtin_alloc() with pcc.
 1.84  07-Apr-2008  yamt branches: 1.84.4; 1.84.6;
RANDOM_MAX: don't rely on integer overflow.
 1.83  01-Apr-2008  drochner everyone else assumes that defining "_XOPEN_SOURCE" means XPG4.2,
so remove comparisions against the numerical values "3" or "4"
 1.82  28-Feb-2008  christos add RANDOM_MAX define from anon ymous
 1.81  02-Feb-2008  christos branches: 1.81.2;
Add csetexpandtc()
 1.80  24-Dec-2007  perry change some __attribute__s to __keywords
 1.79  14-Dec-2007  christos humanize_number was the only function in <util.h> that is not in libutil.
Move it to stdlib.h and add dehumanize_number.
 1.78  19-Nov-2007  ad Enable posix_memalign().
 1.77  22-Apr-2007  ragge branches: 1.77.4;
The alloca() arg type check is broken (cpp do not do string comparisions)
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.
 1.76  15-Mar-2006  kleink Add strtof(3) and strtold(3); welcome libc 12.137.
 1.75  26-Dec-2005  perry u_intN_t -> uintN_t
 1.74  24-Dec-2005  perry __const__ -> const
This is in an __attribute__ so it isn't really necessary, but it gets
it out of the listing of __keyword__s...
 1.73  26-Sep-2005  kleink Move getenv_r() to the local section.
 1.72  25-Sep-2005  christos Add getenv_r and ttyname_r
 1.71  13-Sep-2005  christos compat code reorg
 1.70  11-Jun-2005  christos Add a macro __MKTEMP_OK__ that renames mktemp() to _mktemp() for uses that
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.
 1.69  03-Feb-2005  perry de-__P -- the hack is long since useless. Discussed with christos,
matt, kleink, others. Approved by christos.
 1.68  16-Dec-2004  atatat Add a function called getdevmajor().

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.
 1.67  27-May-2004  christos Add unix/98 pty function prototypes.
 1.66  23-Apr-2004  christos more const sprinkling on cget* suggested by kleink.
 1.65  23-Apr-2004  christos constify the db name vector argument.
 1.64  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22270, verified by myself.
 1.63  08-Jul-2003  kristerw Do not give names to the parameters in function prototypes (those names
reduces the usefulness of the gcc -Wshadow flag).
 1.62  28-Apr-2003  bjh21 Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
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.
 1.61  14-Apr-2003  kleink Well, _The_ Open Group.
 1.60  14-Apr-2003  kleink Use the real TOG specification name for references.
 1.59  07-Apr-2003  kleink 1003.1-2001 has introduced unsetenv() which differs from the current
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.
 1.58  01-Mar-2003  bjh21 Add _Exit(), for C99 and POSIX-2001.
Proposed on tech-userlevel to a resounding silence in April last year.
 1.57  29-Nov-2002  lukem add strsuftoll(3) and strsuftollx(3) - parse a string for a number
with an optional suffix, product (two numbers separated by `x'), and
provide range checking
 1.56  24-May-2002  itojun add arc4random(3). from openbsd
 1.55  28-Mar-2001  kleink branches: 1.55.2;
Don't declare qdiv() when qdiv_t wasn't defined previously; fixes PR lib/11557
from Richard Earnshaw.
 1.54  21-Mar-2001  kleink Sprinkle some restrict qualifiers.
 1.53  10-Mar-2001  cgd add prototypes for shquote() and shquotev()
 1.52  19-Feb-2001  cgd branches: 1.52.2;
add prototypes for getprogname and setprogname
 1.51  20-Dec-2000  christos deal with bsearch duplicate declaration.
 1.50  15-Nov-2000  briggs Move fmtcheck() prototype to stdio.h. It makes more sense to declare it
with the formatting functions with which it is meant to be used. Thanks
to Klaus Klein for "encouraging" me to make this change.
 1.49  20-Oct-2000  briggs Add {__,}fmtcheck(), a function specified by Bill Sommerfeld to check
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.
 1.48  03-Oct-2000  sommerfeld Allow format-arg checking for setproctitle
 1.47  10-Aug-2000  kleink ISO/IEC 9899:1999: MB_CUR_MAX expands to a positive integer expression with
type size_t (not int).

(Incompatible ABI change, ignored due to a window of just two days.)
 1.46  08-Aug-2000  tshiozak Preparation for the future introduction of multibyte locale.
- 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.
 1.45  06-Mar-2000  kleink branches: 1.45.2; 1.45.4;
Add ISO C99 long long integer general utility interfaces; partially addresses
PR standards/9482.
 1.44  10-Jan-2000  kleink Move <null.h> to <sys/null.h> for the purpose of avoiding conflicts due to
std C headers including it, and a kernel module written in C++ would benfit
as well.
 1.43  22-Dec-1999  kleink For the benefit of G++'s null pointer constant implementation, #define NULL
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.
 1.42  06-Feb-1999  kleink Add l64a_r(), a reentrant version of l64a(); found in the Multithreading
Extension of SVID4.
 1.41  30-Jul-1998  mycroft __Namespace__ __protection__.
 1.40  28-Jul-1998  mycroft Sprinkle in some __attribute__((noreturn))s.
 1.39  27-Jul-1998  mycroft Actually, FreeBSD calls this mkdtemp(). No point in creating a new name.
 1.38  27-Jul-1998  mycroft Add a mktempdir(), like mkstemp(), but it creates a directory.
 1.37  27-Jul-1998  mycroft Slight rearrangement.
 1.36  27-Jul-1998  mycroft If __AUDIT__ is defined, remove some traditional interfaces: gets, sprintf,
vsprintf, tempnam, mktemp, getwd.
 1.35  27-Jul-1998  mycroft Mark more functions returning internal buffers for const auditing.
 1.34  26-Jul-1998  mycroft const poisoning.
 1.33  01-Jun-1998  kleink * Further name space protection reorganization: distinguish between various
issues of the XPG.
* Move setkey() prototype from <unistd.h> to this file. (XPG4)
* Move mkstemp(), mktemp(), ttyslot() and valloc() prototypes from <unistd.h>
to this file. (XPG4.2)
 1.32  11-May-1998  kleink Reorganize name space protection.
 1.31  04-Feb-1998  kleink Per XPG4.2, change the `n' argument of initstate() to size_t. (Since it was
recently changed from int to long (lite-2 import), I saw no reason to delay
this `alignment'.)
 1.30  02-Feb-1998  perry merge lite-2
 1.29  31-Jan-1998  thorpej Fix the prototypes for srandom() and initstate() after the libc/stdlib lite-2
merge (ints -> longs). The only platform on which this might have caused
a problem is the Alpha, and it happens to be safe because the first 6 arguments
are passed in registers on the Alpha (and are thus implicitly promoted to
longs anyhow).
 1.28  16-Oct-1997  christos devname is (dev_t, mode_t) not (int, int)
 1.27  14-Jul-1997  mikel some minor KNF
 1.26  13-Jul-1997  christos Add missing rand_r prototype
 1.25  27-Dec-1995  jtc Add __dead qualifier to abort() and exit(); PR 1845
 1.24  22-Mar-1995  jtc added prototype for qabs()
 1.23  21-Mar-1995  jtc Moved conditional #include of <sys/types.h> to near the top of file.
Defined qdiv_t typedef.
Declared qdiv function.
 1.22  17-Dec-1994  jtc fix typo
 1.21  16-Dec-1994  jtc add prototype for realpath()
 1.20  26-Oct-1994  cgd new RCS ID format.
 1.19  07-Aug-1994  jtc Add strtoq() & strtouq() declarations
 1.18  02-Jul-1994  deraadt add 3 protos
 1.17  16-Jun-1994  mycroft Update *sort() prototypes.
 1.16  21-May-1994  cgd add _BSD's to ansi types
 1.15  07-May-1994  jtc add new getopt(3) extern variable optreset
 1.14  14-Apr-1994  cgd setproctitle proto
 1.13  25-Jan-1994  cgd kill third arg to getbsize.
 1.12  25-Jan-1994  cgd getbsize takes a (somewhat bogus, IMO) third parameter
 1.11  24-Jan-1994  cgd add protos for getbsize() (in libutil) and the getcap routines (in libc)
 1.10  13-Nov-1993  jtc stdlib.h should define NULL -- Ansi C, Section 7.10.
 1.9  22-Oct-1993  jtc Fix typo in last checkin.
 1.8  22-Oct-1993  jtc Added prototypes for a64l() & l64a().
 1.7  13-Oct-1993  jtc Moved declarations for cfree, setenv, putenv and the rand48 family
into !_ANSI_SOURCE && !_POSIX_SOURCE conditional.
Added extern for getopt's optopt variable.
 1.6  11-Oct-1993  jtc #include <machine/ansi.h>, declare size_t typedef.
Only include <sys/types.h> if !_POSIX_SOURCE.
 1.5  07-Oct-1993  brezak Rand48 routines from martin@ntkupc1.tuwien.ac.at (Martin Birgmeier)
 1.4  01-Aug-1993  mycroft Add RCS identifiers.
 1.3  08-Jun-1993  brezak GCC2 defines alloca() differently.
 1.2  25-Mar-1993  cgd patch from rich murphy (rich@rice.edu) to fix alloca prototype
 1.1  21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2  02-Feb-1998  perry import lite-2
 1.1.1.1  21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.45.4.2  10-Aug-2000  kleink Pull up rev. 1.47 (approved by thorpej):
ISO/IEC 9899:1999: MB_CUR_MAX expands to a positive integer
expression with type size_t.
 1.45.4.1  09-Aug-2000  tshiozak pull up the following changes (approved by thorpej):
> cvs rdiff -r1.9 -r1.10 basesrc/include/locale.h
> cvs rdiff -r1.45 -r1.46 basesrc/include/stdlib.h
> cvs rdiff -r1.16 -r1.17 basesrc/lib/libc/locale/Makefile.inc
> cvs rdiff -r1.17 -r1.18 basesrc/lib/libc/locale/setlocale.c
> cvs rdiff -r0 -r1.2 basesrc/lib/libc/locale/setlocale_sb.c
> cvs rdiff -r1.6 -r1.7 syssrc/sys/arch/alpha/include/limits.h
> cvs rdiff -r1.1 -r1.2 syssrc/sys/arch/arm26/include/limits.h
> cvs rdiff -r1.7 -r1.8 syssrc/sys/arch/arm32/include/limits.h
> cvs rdiff -r1.14 -r1.15 syssrc/sys/arch/i386/include/limits.h
> cvs rdiff -r1.12 -r1.13 syssrc/sys/arch/m68k/include/limits.h
> cvs rdiff -r1.13 -r1.14 syssrc/sys/arch/mips/include/limits.h
> cvs rdiff -r1.10 -r1.11 syssrc/sys/arch/pc532/include/limits.h
> cvs rdiff -r1.6 -r1.7 syssrc/sys/arch/powerpc/include/limits.h
> cvs rdiff -r1.2 -r1.3 syssrc/sys/arch/sh3/include/limits.h
> cvs rdiff -r1.11 -r1.12 syssrc/sys/arch/sparc/include/limits.h
> cvs rdiff -r1.7 -r1.8 syssrc/sys/arch/sparc64/include/limits.h
> cvs rdiff -r1.9 -r1.10 syssrc/sys/arch/vax/include/limits.h
>
> Outline:
>
> Preparation for the future introduction of multibyte locale.
> - 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.
 1.45.2.1  28-May-2000  minoura Citrus Project XPG4DL, an implementation of I18N (locale) framework,
is imported.
 1.52.2.3  10-Dec-2002  thorpej Sync with HEAD.
 1.52.2.2  21-Jun-2002  nathanw Catch up to -current.
 1.52.2.1  08-Apr-2001  nathanw Merge trunk onto branch.
 1.55.2.1  26-Mar-2004  jmc Pullup rev 1.56 (requested by provos in ticket #1386)

Introduce bcrypt password scheme. Adds the arc4random API for creating
cryptographically strong random numbers.
 1.77.4.2  23-Mar-2008  matt sync with HEAD
 1.77.4.1  09-Jan-2008  matt sync with HEAD
 1.81.2.1  24-Mar-2008  keiichi sync with head.
 1.84.6.1  27-Jun-2008  simonb Sync with head.
 1.84.4.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.85.12.1  20-May-2011  bouyer Pull up following revision(s) (requested by joerg in ticket #1611):
include/inttypes.h: revision 1.7
include/stddef.h: revision 1.16
include/wchar.h: revision 1.28
include/stdlib.h: revision 1.90
Don't define wchar_t for c++; it is native in the language. From Alexander
Nasonov
 1.85.6.2  08-Nov-2008  christos changes for 64 bit time_t
 1.85.6.1  21-Jun-2008  christos file stdlib.h was added on branch christos-time_t on 2008-11-08 21:13:13 +0000
 1.85.4.1  20-May-2011  bouyer Pull up following revision(s) (requested by joerg in ticket #1611):
include/inttypes.h: revision 1.7
include/stddef.h: revision 1.16
include/wchar.h: revision 1.28
include/stdlib.h: revision 1.90
Don't define wchar_t for c++; it is native in the language. From Alexander
Nasonov
 1.90.2.3  22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.90.2.2  17-Aug-2010  uebayasi Sync with HEAD.
 1.90.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.94.2.1  08-Feb-2011  bouyer Sync with HEAD
 1.97.6.2  23-Jun-2012  riz Pull up following revision(s) (requested by joerg in ticket #328):
lib/libc/gen/devname.c: revision 1.22
distrib/sparc64/instfs/dot.profile: revision 1.7
distrib/i386/cdroms/install.sh: revision 1.3
tests/lib/libcurses/director/director.c: revision 1.10
lib/libc/include/reentrant.h: revision 1.15
distrib/amd64/cdroms/install.sh: revision 1.3
tests/include/t_paths.c: revision 1.12
share/man/man7/hier.7: revision 1.101
etc/rc.d/sysdb: revision 1.24
include/stdlib.h: revision 1.99
tests/lib/libcurses/Makefile: revision 1.3
distrib/sparc64/cdroms/installcd/install.sh: revision 1.3
distrib/i386/cdroms/Makefile.cdrom: revision 1.27
lib/libc/gen/ttyname.c: revision 1.25
usr.bin/tic/Makefile: revision 1.2
tools/compat/Makefile: revision 1.57
lib/libterminfo/compile.c: revision 1.7
lib/libc/gen/ttyname.c: revision 1.26
lib/libterminfo/compile.c: revision 1.8
tools/compat/Makefile: revision 1.59
tools/compat/cdbw.h: revision 1.1
distrib/i386/installimage/install.sh: revision 1.2
lib/libc/include/namespace.h: revision 1.154
usr.bin/tic/tic.c: revision 1.13
usr.bin/tic/tic.c: revision 1.14
usr.bin/tic/tic.c: revision 1.15
distrib/sets/lists/base/mi: revision 1.996
usr.bin/tic/tic.c: revision 1.16
usr.sbin/dev_mkdb/dev_mkdb.8: revision 1.13
usr.bin/tic/tic.c: revision 1.17
usr.bin/tic/tic.c: revision 1.18
tools/compat/cdbr.h: revision 1.1
distrib/sparc64/instfs/list: revision 1.25
usr.bin/tic/tic.c: revision 1.19
lib/libc/cdb/cdbw.c: revision 1.4
lib/libc/cdb/cdbw.3: revision 1.4
lib/libc/cdb/cdbw.3: revision 1.5
share/terminfo/Makefile: revision 1.3
usr.sbin/dev_mkdb/dev_mkdb.c: revision 1.29
usr.sbin/dev_mkdb/Makefile: revision 1.8
lib/libc/gen/ttyname.3: revision 1.23
lib/libc/gen/ttyname.3: revision 1.24
lib/libc/cdb/cdbr.c: revision 1.3
include/cdbw.h: revision 1.2
distrib/sparc64/cdroms/installcd/Makefile: revision 1.15
lib/libc/gen/devname.3: revision 1.12
tools/compat/compat_defs.h: revision 1.85
tools/compat/compat_defs.h: revision 1.86
lib/libterminfo/term_private.h: revision 1.10
lib/libterminfo/term.c: revision 1.14
usr.bin/tic/tic.1: revision 1.10
lib/libterminfo/term.c: revision 1.15
lib/libterminfo/Makefile.hash: revision 1.5
lib/libterminfo/term.c: revision 1.16
distrib/amd64/installimage/install.sh: revision 1.2
share/man/man5/rc.conf.5: revision 1.152
distrib/sets/lists/tests/mi: revision 1.472
distrib/amd64/cdroms/Makefile.cdrom: revision 1.7
include/paths.h: revision 1.41
bin/ps/ps.1: revision 1.101
lib/libterminfo/terminfo.5.in: revision 1.16
usr.bin/tic/tic.c: revision 1.20
lib/libterminfo/terminfo.5.in: revision 1.17
Prefer __printflike.
Use queue(3)
Replace linear lookup with hash table, reducing runtime by 60%.
Use e* from util.h.
One more strdup -> estrdup.
Maintain nalias and nterm on the fly.
Add void for ttyslot prototype.
Use memcmp in place of strncmp, since length is known to no longer than
either of the arguments.
Fix a number of memory leaks. Keep final loop of the cleanup in tic(1)
under #ifdef __VALGRIND__ though.
Add __predict_true / __predict_false definitions.
Add a special seeder for cdbw_output that gives stable results.
Hook up cdbw(3) for the tool build.
Prototype for cdbw_stable_seeder.
Provide a usable thr_once for !_REENTRANT
Switch device database to cdb(5). Rework ttyname(3) and ttyname_r(3) to
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.
Switch terminfo(3) to cdb(5).
Fix typos.
Make Alan Barrett happy and add ().
Add cdbr(3) support to tools/compat.
Bump date for previous.
Relax consistency to make it possible to match valid entries.
Prefix devname's buffer with /dev/ as ttyname is supposed to return the
full path. Reported by Dave Huang.
 1.97.6.1  07-May-2012  riz Pull up following revision(s) (requested by christos in ticket #222):
include/stdlib.h: revision 1.98
lib/libc/compat/stdlib/Makefile.inc: revision 1.3
lib/libc/compat/include/stdlib.h: revision 1.5
lib/libc/compat/stdlib/compat_putenv.c: revision 1.1
lib/libc/compat/stdlib/compat_putenv.c: revision 1.2
PR/46360: YAMAMOTO Takashi: Restore NetBSD-5 compatibility with putenv()
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.
use setenv so that we don't leak memory.
 1.97.4.3  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.97.4.2  30-Oct-2012  yamt sync with head
 1.97.4.1  23-May-2012  yamt sync with head.
 1.100.2.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.100.2.1  23-Jun-2013  tls resync from head
 1.107.2.1  10-Aug-2014  tls Rebase.
 1.119.4.1  10-Jun-2019  christos Sync with HEAD
 1.119.2.2  18-Jan-2019  pgoyette Synch with HEAD
 1.119.2.1  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.125.2.2  13-Oct-2024  martin Pull up following revision(s) (requested by riastradh in ticket #954):

include/stdlib.h: revision 1.127

stdlib.h: Expose reallocarray only for POSIX 2024 or NetBSD/OpenBSD.

reallocarray(3) is new in POSIX 2024, so it should not be exposed if
you ask for an older POSIX standard like _POSIX_C_SOURCE=200809L.

PR standards/58741
 1.125.2.1  11-Oct-2024  martin Pull up following revision(s) (requested by riastradh in ticket #951):

include/stdlib.h: revision 1.126

stdlib.h: Use same test for def. of lldiv_t as for decl. of lldiv(3).

The !_ANSI_SOURCE conditional was a leftover from before we had
_NETBSD_SOURCE in sys/featuretest.h already defined conditionally on
!_ANSI_SOURCE.

So just nix the !_ANSI_SOURCE part -- and while here, reorder and
reformat the conditional around lldiv_t so it matches the conditional
around lldiv(3) byte-for-byte, just to make it more obvious.

PR standards/56402: Definition of lldiv_t with ANSI_SOURCE and
POSIX_SOURCE

RSS XML Feed