History log of /netbsd-current/lib/libc/include/extern.h
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.29 19-Jan-2024 christos

more extern decls


# 1.28 03-Jan-2024 christos

tidy up some extern declarations


# 1.27 04-Apr-2023 christos

PR/57250: Martin Husemann: dtoa mishandles infinite doubles on 32bit big
endian machines. When long double support was added, the old code was kept
for the regular double code. This code was never used because WIDE_DOUBLE
was always defined in the Makefile. Remove that old code, and conditionalize
the WIDE_DOUBLE code based on if long doubles are different than doubles on
the specific platform.


Revision tags: netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.26 15-May-2020 joerg

branches: 1.26.6;
Hook up proper fork lock handling for malloc:
- lock all relevant mutexes just before fork
- unlock all mutexes just after fork in the parent
- full reinit non-spinlocks in the child
This is not using the normal pthread_atfork interface to ensure order of
operation, malloc is used as implementation detail too often.


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base
# 1.25 12-Jan-2017 christos

put back strerror_ss, it will be used shortly.


# 1.24 12-Jan-2017 christos

Add strerror_ss_r to be used by syslog_ss


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.23 19-Aug-2013 joerg

branches: 1.23.8;
Add strerror_l.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.22 04-May-2013 christos

move prototypes to stdio.h


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.21 11-Oct-2012 christos

take care of the signal safe syslog calls which are not exposed.


# 1.20 12-Sep-2012 manu

branches: 1.20.2;
setcontext() used to be incompatible with -lpthread since it affected
the TLS pointer, therefore wrecking the pthread environement.

Some ports had _UC_TLSBASE flag or equivalent (_UC_UNIQUE on alpha)
that controlled whether setcontext() would change the TLS pointer.
This change let libpthread override setcontext() with its own version
that unsets _UC_TLSBASE, enabling safe usage of setcontext() with
-lpthread.

We also have the following required changes here:
- rename alpha's _UC_UNIQUE into _UC_TLSBASE
- add _UC_TLSBASE definition in header file for all ports
(powerpc, sh3, sparc and sparc64 lack the implementation for now)
- introduce a libc stub that can be overriden for setcontext()
- modify MD libcs swapcontext() implementations so that they use the
setcontext() libc stub instead of doing a plain system call.

While we are there:
- document various MD _UC_* flags in header file
- add libc and libpthread tests for swapcontext() behavior
(hopefully helpful to spot MD problems introduced with this change)

Future work:
- Deciding whether kernel support or _UC_TLSBASE should be added for
powerpc, sh3, sparc and sparc64 is left to portmasters
sparc64

Approved by core@


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.19 19-Sep-2011 joerg

branches: 1.19.2;
Mark _resumecontext as dead. ANSIfy all declarations for it.


# 1.18 17-Jul-2011 joerg

Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211
# 1.17 21-Oct-2009 snj

Remove 3rd and 4th clauses in christos' license. OK christos.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base christos-time_t-nbase christos-time_t-base
# 1.16 31-Oct-2008 christos

branches: 1.16.2;
Import syslogd SoC project by Martin Schuette:
- new syslog protocol api syslogp(3) that supports structured data
and draft-rfc timestamps
- reliable tcp connections with queueing
- encrypted connections


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 mjf-devfs2-base wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase cube-autoconf-base matt-armv6-base hpcarm-cleanup-base
# 1.15 04-Dec-2007 christos

move decls for _malloc_{pre,post}fork() to extern.h


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-mips64-base wrstuden-fixsa-base netbsd-4-base
# 1.14 22-Nov-2006 christos

branches: 1.14.8;
Don't expose _ss functions for 4.0. Requested by core.


Revision tags: abandoned-netbsd-4-base
# 1.13 17-May-2006 christos

PR/24324: Arne H Juul: Re-implement seekdir/telldir using a pointer of
locations per directory instead of a global hash table to avoid memory
leak issues, and incorrect results.


# 1.12 24-Feb-2006 drochner

complete constification of the sysctl() user side


# 1.11 16-Feb-2006 christos

- s/notyet/WIDE_DOUBLE/
- Add a little more glue for WIDE_DOUBLE; not done yet.
- s/def FLOATING_POINT/ndef NO_FLOATING_POINT/ to reduce diffs with FreeBSD.
- fix memory leak where each double formatted leaked 24 by calling __freedtoa()
appropriately. the new gdtoa keeps a list of memory chunks allocated by
malloc(), and it must maintained properly by calling __freedtoa() on the
results of __dtoa() Hi Klaus!
- in vfwprintf() make cvt return char * and convert it using __mbsconv(),
instead of having it return wchar_t *.

This should fix the memory leaks people have been reporting (eg. in top etc.)


# 1.10 24-Jan-2006 christos

rename __func to _func_unlocked, and add their prototypes in extern.h
instead of exposing them in dirent.h. More locking consistency fixes.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-3-base netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.9 27-Sep-2003 matt

Constify the _-sigaction_sigtramp tramp argument.


# 1.8 18-Jan-2003 thorpej

Merge the nathanw_sa branch.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base
# 1.7 09-Jul-2002 thorpej

Add prototype for __sigaction_sigtramp(). This system call is used
only by libc internally, and thus does not need to be exported in
any other header file.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-4-PATCH003 netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base netbsd-1-4-PATCH002 wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.6 26-Mar-1999 sommerfe

branches: 1.6.12;
move __getcwd prototypes to libc-private header file.

XXX duplicate the prototype in getcwd regression test (which needs to
call the syscall directly for reasonably complete testing).


# 1.5 14-Jan-1999 kleink

* On architectures using ELF, and conditionally on those in transition, rename
_ASM_LABEL(cerror) and _ASM_LABEL(curbrk) to _C_LABEL(__cerror) and
_C_LABEL(__curbrk) (or their respective architecture-specific equivalents) to
avoid possible name clashes with identifiers used in user applications.
* Do the same for minbrk on all architectures to avoid a GCC-specific (and
on ELF architectures effectively useless) symbol reference renaming in MI code.


# 1.4 15-Nov-1998 christos

in the __str{error,signal} functions make the third argument size_t since
it is really a size. This does not affect the external interface, so there
should be no reason to bump the libc #


# 1.3 26-Jul-1998 mycroft

const poisoning.


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.2 16-Oct-1997 christos

Remove _tztab() declaration now that timezone() migrated to libcompat.


# 1.1 13-Jul-1997 christos

Add prototype declarations


# 1.28 03-Jan-2024 christos

tidy up some extern declarations


# 1.27 04-Apr-2023 christos

PR/57250: Martin Husemann: dtoa mishandles infinite doubles on 32bit big
endian machines. When long double support was added, the old code was kept
for the regular double code. This code was never used because WIDE_DOUBLE
was always defined in the Makefile. Remove that old code, and conditionalize
the WIDE_DOUBLE code based on if long doubles are different than doubles on
the specific platform.


Revision tags: netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.26 15-May-2020 joerg

branches: 1.26.6;
Hook up proper fork lock handling for malloc:
- lock all relevant mutexes just before fork
- unlock all mutexes just after fork in the parent
- full reinit non-spinlocks in the child
This is not using the normal pthread_atfork interface to ensure order of
operation, malloc is used as implementation detail too often.


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base
# 1.25 12-Jan-2017 christos

put back strerror_ss, it will be used shortly.


# 1.24 12-Jan-2017 christos

Add strerror_ss_r to be used by syslog_ss


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.23 19-Aug-2013 joerg

branches: 1.23.8;
Add strerror_l.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.22 04-May-2013 christos

move prototypes to stdio.h


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.21 11-Oct-2012 christos

take care of the signal safe syslog calls which are not exposed.


# 1.20 12-Sep-2012 manu

branches: 1.20.2;
setcontext() used to be incompatible with -lpthread since it affected
the TLS pointer, therefore wrecking the pthread environement.

Some ports had _UC_TLSBASE flag or equivalent (_UC_UNIQUE on alpha)
that controlled whether setcontext() would change the TLS pointer.
This change let libpthread override setcontext() with its own version
that unsets _UC_TLSBASE, enabling safe usage of setcontext() with
-lpthread.

We also have the following required changes here:
- rename alpha's _UC_UNIQUE into _UC_TLSBASE
- add _UC_TLSBASE definition in header file for all ports
(powerpc, sh3, sparc and sparc64 lack the implementation for now)
- introduce a libc stub that can be overriden for setcontext()
- modify MD libcs swapcontext() implementations so that they use the
setcontext() libc stub instead of doing a plain system call.

While we are there:
- document various MD _UC_* flags in header file
- add libc and libpthread tests for swapcontext() behavior
(hopefully helpful to spot MD problems introduced with this change)

Future work:
- Deciding whether kernel support or _UC_TLSBASE should be added for
powerpc, sh3, sparc and sparc64 is left to portmasters
sparc64

Approved by core@


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.19 19-Sep-2011 joerg

branches: 1.19.2;
Mark _resumecontext as dead. ANSIfy all declarations for it.


# 1.18 17-Jul-2011 joerg

Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211
# 1.17 21-Oct-2009 snj

Remove 3rd and 4th clauses in christos' license. OK christos.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base christos-time_t-nbase christos-time_t-base
# 1.16 31-Oct-2008 christos

branches: 1.16.2;
Import syslogd SoC project by Martin Schuette:
- new syslog protocol api syslogp(3) that supports structured data
and draft-rfc timestamps
- reliable tcp connections with queueing
- encrypted connections


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 mjf-devfs2-base wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase cube-autoconf-base matt-armv6-base hpcarm-cleanup-base
# 1.15 04-Dec-2007 christos

move decls for _malloc_{pre,post}fork() to extern.h


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-mips64-base wrstuden-fixsa-base netbsd-4-base
# 1.14 22-Nov-2006 christos

branches: 1.14.8;
Don't expose _ss functions for 4.0. Requested by core.


Revision tags: abandoned-netbsd-4-base
# 1.13 17-May-2006 christos

PR/24324: Arne H Juul: Re-implement seekdir/telldir using a pointer of
locations per directory instead of a global hash table to avoid memory
leak issues, and incorrect results.


# 1.12 24-Feb-2006 drochner

complete constification of the sysctl() user side


# 1.11 16-Feb-2006 christos

- s/notyet/WIDE_DOUBLE/
- Add a little more glue for WIDE_DOUBLE; not done yet.
- s/def FLOATING_POINT/ndef NO_FLOATING_POINT/ to reduce diffs with FreeBSD.
- fix memory leak where each double formatted leaked 24 by calling __freedtoa()
appropriately. the new gdtoa keeps a list of memory chunks allocated by
malloc(), and it must maintained properly by calling __freedtoa() on the
results of __dtoa() Hi Klaus!
- in vfwprintf() make cvt return char * and convert it using __mbsconv(),
instead of having it return wchar_t *.

This should fix the memory leaks people have been reporting (eg. in top etc.)


# 1.10 24-Jan-2006 christos

rename __func to _func_unlocked, and add their prototypes in extern.h
instead of exposing them in dirent.h. More locking consistency fixes.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-3-base netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.9 27-Sep-2003 matt

Constify the _-sigaction_sigtramp tramp argument.


# 1.8 18-Jan-2003 thorpej

Merge the nathanw_sa branch.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base
# 1.7 09-Jul-2002 thorpej

Add prototype for __sigaction_sigtramp(). This system call is used
only by libc internally, and thus does not need to be exported in
any other header file.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-4-PATCH003 netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base netbsd-1-4-PATCH002 wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.6 26-Mar-1999 sommerfe

branches: 1.6.12;
move __getcwd prototypes to libc-private header file.

XXX duplicate the prototype in getcwd regression test (which needs to
call the syscall directly for reasonably complete testing).


# 1.5 14-Jan-1999 kleink

* On architectures using ELF, and conditionally on those in transition, rename
_ASM_LABEL(cerror) and _ASM_LABEL(curbrk) to _C_LABEL(__cerror) and
_C_LABEL(__curbrk) (or their respective architecture-specific equivalents) to
avoid possible name clashes with identifiers used in user applications.
* Do the same for minbrk on all architectures to avoid a GCC-specific (and
on ELF architectures effectively useless) symbol reference renaming in MI code.


# 1.4 15-Nov-1998 christos

in the __str{error,signal} functions make the third argument size_t since
it is really a size. This does not affect the external interface, so there
should be no reason to bump the libc #


# 1.3 26-Jul-1998 mycroft

const poisoning.


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.2 16-Oct-1997 christos

Remove _tztab() declaration now that timezone() migrated to libcompat.


# 1.1 13-Jul-1997 christos

Add prototype declarations


# 1.27 04-Apr-2023 christos

PR/57250: Martin Husemann: dtoa mishandles infinite doubles on 32bit big
endian machines. When long double support was added, the old code was kept
for the regular double code. This code was never used because WIDE_DOUBLE
was always defined in the Makefile. Remove that old code, and conditionalize
the WIDE_DOUBLE code based on if long doubles are different than doubles on
the specific platform.


Revision tags: netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.26 15-May-2020 joerg

branches: 1.26.6;
Hook up proper fork lock handling for malloc:
- lock all relevant mutexes just before fork
- unlock all mutexes just after fork in the parent
- full reinit non-spinlocks in the child
This is not using the normal pthread_atfork interface to ensure order of
operation, malloc is used as implementation detail too often.


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base
# 1.25 12-Jan-2017 christos

put back strerror_ss, it will be used shortly.


# 1.24 12-Jan-2017 christos

Add strerror_ss_r to be used by syslog_ss


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.23 19-Aug-2013 joerg

branches: 1.23.8;
Add strerror_l.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.22 04-May-2013 christos

move prototypes to stdio.h


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.21 11-Oct-2012 christos

take care of the signal safe syslog calls which are not exposed.


# 1.20 12-Sep-2012 manu

branches: 1.20.2;
setcontext() used to be incompatible with -lpthread since it affected
the TLS pointer, therefore wrecking the pthread environement.

Some ports had _UC_TLSBASE flag or equivalent (_UC_UNIQUE on alpha)
that controlled whether setcontext() would change the TLS pointer.
This change let libpthread override setcontext() with its own version
that unsets _UC_TLSBASE, enabling safe usage of setcontext() with
-lpthread.

We also have the following required changes here:
- rename alpha's _UC_UNIQUE into _UC_TLSBASE
- add _UC_TLSBASE definition in header file for all ports
(powerpc, sh3, sparc and sparc64 lack the implementation for now)
- introduce a libc stub that can be overriden for setcontext()
- modify MD libcs swapcontext() implementations so that they use the
setcontext() libc stub instead of doing a plain system call.

While we are there:
- document various MD _UC_* flags in header file
- add libc and libpthread tests for swapcontext() behavior
(hopefully helpful to spot MD problems introduced with this change)

Future work:
- Deciding whether kernel support or _UC_TLSBASE should be added for
powerpc, sh3, sparc and sparc64 is left to portmasters
sparc64

Approved by core@


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.19 19-Sep-2011 joerg

branches: 1.19.2;
Mark _resumecontext as dead. ANSIfy all declarations for it.


# 1.18 17-Jul-2011 joerg

Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211
# 1.17 21-Oct-2009 snj

Remove 3rd and 4th clauses in christos' license. OK christos.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base christos-time_t-nbase christos-time_t-base
# 1.16 31-Oct-2008 christos

branches: 1.16.2;
Import syslogd SoC project by Martin Schuette:
- new syslog protocol api syslogp(3) that supports structured data
and draft-rfc timestamps
- reliable tcp connections with queueing
- encrypted connections


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 mjf-devfs2-base wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase cube-autoconf-base matt-armv6-base hpcarm-cleanup-base
# 1.15 04-Dec-2007 christos

move decls for _malloc_{pre,post}fork() to extern.h


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-mips64-base wrstuden-fixsa-base netbsd-4-base
# 1.14 22-Nov-2006 christos

branches: 1.14.8;
Don't expose _ss functions for 4.0. Requested by core.


Revision tags: abandoned-netbsd-4-base
# 1.13 17-May-2006 christos

PR/24324: Arne H Juul: Re-implement seekdir/telldir using a pointer of
locations per directory instead of a global hash table to avoid memory
leak issues, and incorrect results.


# 1.12 24-Feb-2006 drochner

complete constification of the sysctl() user side


# 1.11 16-Feb-2006 christos

- s/notyet/WIDE_DOUBLE/
- Add a little more glue for WIDE_DOUBLE; not done yet.
- s/def FLOATING_POINT/ndef NO_FLOATING_POINT/ to reduce diffs with FreeBSD.
- fix memory leak where each double formatted leaked 24 by calling __freedtoa()
appropriately. the new gdtoa keeps a list of memory chunks allocated by
malloc(), and it must maintained properly by calling __freedtoa() on the
results of __dtoa() Hi Klaus!
- in vfwprintf() make cvt return char * and convert it using __mbsconv(),
instead of having it return wchar_t *.

This should fix the memory leaks people have been reporting (eg. in top etc.)


# 1.10 24-Jan-2006 christos

rename __func to _func_unlocked, and add their prototypes in extern.h
instead of exposing them in dirent.h. More locking consistency fixes.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-3-base netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.9 27-Sep-2003 matt

Constify the _-sigaction_sigtramp tramp argument.


# 1.8 18-Jan-2003 thorpej

Merge the nathanw_sa branch.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base
# 1.7 09-Jul-2002 thorpej

Add prototype for __sigaction_sigtramp(). This system call is used
only by libc internally, and thus does not need to be exported in
any other header file.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-4-PATCH003 netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base netbsd-1-4-PATCH002 wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.6 26-Mar-1999 sommerfe

branches: 1.6.12;
move __getcwd prototypes to libc-private header file.

XXX duplicate the prototype in getcwd regression test (which needs to
call the syscall directly for reasonably complete testing).


# 1.5 14-Jan-1999 kleink

* On architectures using ELF, and conditionally on those in transition, rename
_ASM_LABEL(cerror) and _ASM_LABEL(curbrk) to _C_LABEL(__cerror) and
_C_LABEL(__curbrk) (or their respective architecture-specific equivalents) to
avoid possible name clashes with identifiers used in user applications.
* Do the same for minbrk on all architectures to avoid a GCC-specific (and
on ELF architectures effectively useless) symbol reference renaming in MI code.


# 1.4 15-Nov-1998 christos

in the __str{error,signal} functions make the third argument size_t since
it is really a size. This does not affect the external interface, so there
should be no reason to bump the libc #


# 1.3 26-Jul-1998 mycroft

const poisoning.


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.2 16-Oct-1997 christos

Remove _tztab() declaration now that timezone() migrated to libcompat.


# 1.1 13-Jul-1997 christos

Add prototype declarations


# 1.26 15-May-2020 joerg

Hook up proper fork lock handling for malloc:
- lock all relevant mutexes just before fork
- unlock all mutexes just after fork in the parent
- full reinit non-spinlocks in the child
This is not using the normal pthread_atfork interface to ensure order of
operation, malloc is used as implementation detail too often.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base
# 1.25 12-Jan-2017 christos

put back strerror_ss, it will be used shortly.


# 1.24 12-Jan-2017 christos

Add strerror_ss_r to be used by syslog_ss


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.23 19-Aug-2013 joerg

branches: 1.23.8;
Add strerror_l.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.22 04-May-2013 christos

move prototypes to stdio.h


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.21 11-Oct-2012 christos

take care of the signal safe syslog calls which are not exposed.


# 1.20 12-Sep-2012 manu

branches: 1.20.2;
setcontext() used to be incompatible with -lpthread since it affected
the TLS pointer, therefore wrecking the pthread environement.

Some ports had _UC_TLSBASE flag or equivalent (_UC_UNIQUE on alpha)
that controlled whether setcontext() would change the TLS pointer.
This change let libpthread override setcontext() with its own version
that unsets _UC_TLSBASE, enabling safe usage of setcontext() with
-lpthread.

We also have the following required changes here:
- rename alpha's _UC_UNIQUE into _UC_TLSBASE
- add _UC_TLSBASE definition in header file for all ports
(powerpc, sh3, sparc and sparc64 lack the implementation for now)
- introduce a libc stub that can be overriden for setcontext()
- modify MD libcs swapcontext() implementations so that they use the
setcontext() libc stub instead of doing a plain system call.

While we are there:
- document various MD _UC_* flags in header file
- add libc and libpthread tests for swapcontext() behavior
(hopefully helpful to spot MD problems introduced with this change)

Future work:
- Deciding whether kernel support or _UC_TLSBASE should be added for
powerpc, sh3, sparc and sparc64 is left to portmasters
sparc64

Approved by core@


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.19 19-Sep-2011 joerg

branches: 1.19.2;
Mark _resumecontext as dead. ANSIfy all declarations for it.


# 1.18 17-Jul-2011 joerg

Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211
# 1.17 21-Oct-2009 snj

Remove 3rd and 4th clauses in christos' license. OK christos.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base christos-time_t-nbase christos-time_t-base
# 1.16 31-Oct-2008 christos

branches: 1.16.2;
Import syslogd SoC project by Martin Schuette:
- new syslog protocol api syslogp(3) that supports structured data
and draft-rfc timestamps
- reliable tcp connections with queueing
- encrypted connections


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 mjf-devfs2-base wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase cube-autoconf-base matt-armv6-base hpcarm-cleanup-base
# 1.15 04-Dec-2007 christos

move decls for _malloc_{pre,post}fork() to extern.h


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-mips64-base wrstuden-fixsa-base netbsd-4-base
# 1.14 22-Nov-2006 christos

branches: 1.14.8;
Don't expose _ss functions for 4.0. Requested by core.


Revision tags: abandoned-netbsd-4-base
# 1.13 17-May-2006 christos

PR/24324: Arne H Juul: Re-implement seekdir/telldir using a pointer of
locations per directory instead of a global hash table to avoid memory
leak issues, and incorrect results.


# 1.12 24-Feb-2006 drochner

complete constification of the sysctl() user side


# 1.11 16-Feb-2006 christos

- s/notyet/WIDE_DOUBLE/
- Add a little more glue for WIDE_DOUBLE; not done yet.
- s/def FLOATING_POINT/ndef NO_FLOATING_POINT/ to reduce diffs with FreeBSD.
- fix memory leak where each double formatted leaked 24 by calling __freedtoa()
appropriately. the new gdtoa keeps a list of memory chunks allocated by
malloc(), and it must maintained properly by calling __freedtoa() on the
results of __dtoa() Hi Klaus!
- in vfwprintf() make cvt return char * and convert it using __mbsconv(),
instead of having it return wchar_t *.

This should fix the memory leaks people have been reporting (eg. in top etc.)


# 1.10 24-Jan-2006 christos

rename __func to _func_unlocked, and add their prototypes in extern.h
instead of exposing them in dirent.h. More locking consistency fixes.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-3-base netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.9 27-Sep-2003 matt

Constify the _-sigaction_sigtramp tramp argument.


# 1.8 18-Jan-2003 thorpej

Merge the nathanw_sa branch.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base
# 1.7 09-Jul-2002 thorpej

Add prototype for __sigaction_sigtramp(). This system call is used
only by libc internally, and thus does not need to be exported in
any other header file.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-4-PATCH003 netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base netbsd-1-4-PATCH002 wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.6 26-Mar-1999 sommerfe

branches: 1.6.12;
move __getcwd prototypes to libc-private header file.

XXX duplicate the prototype in getcwd regression test (which needs to
call the syscall directly for reasonably complete testing).


# 1.5 14-Jan-1999 kleink

* On architectures using ELF, and conditionally on those in transition, rename
_ASM_LABEL(cerror) and _ASM_LABEL(curbrk) to _C_LABEL(__cerror) and
_C_LABEL(__curbrk) (or their respective architecture-specific equivalents) to
avoid possible name clashes with identifiers used in user applications.
* Do the same for minbrk on all architectures to avoid a GCC-specific (and
on ELF architectures effectively useless) symbol reference renaming in MI code.


# 1.4 15-Nov-1998 christos

in the __str{error,signal} functions make the third argument size_t since
it is really a size. This does not affect the external interface, so there
should be no reason to bump the libc #


# 1.3 26-Jul-1998 mycroft

const poisoning.


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.2 16-Oct-1997 christos

Remove _tztab() declaration now that timezone() migrated to libcompat.


# 1.1 13-Jul-1997 christos

Add prototype declarations


# 1.25 12-Jan-2017 christos

put back strerror_ss, it will be used shortly.


# 1.24 12-Jan-2017 christos

Add strerror_ss_r to be used by syslog_ss


Revision tags: pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.23 19-Aug-2013 joerg

Add strerror_l.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.22 04-May-2013 christos

move prototypes to stdio.h


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.21 11-Oct-2012 christos

take care of the signal safe syslog calls which are not exposed.


# 1.20 12-Sep-2012 manu

branches: 1.20.2;
setcontext() used to be incompatible with -lpthread since it affected
the TLS pointer, therefore wrecking the pthread environement.

Some ports had _UC_TLSBASE flag or equivalent (_UC_UNIQUE on alpha)
that controlled whether setcontext() would change the TLS pointer.
This change let libpthread override setcontext() with its own version
that unsets _UC_TLSBASE, enabling safe usage of setcontext() with
-lpthread.

We also have the following required changes here:
- rename alpha's _UC_UNIQUE into _UC_TLSBASE
- add _UC_TLSBASE definition in header file for all ports
(powerpc, sh3, sparc and sparc64 lack the implementation for now)
- introduce a libc stub that can be overriden for setcontext()
- modify MD libcs swapcontext() implementations so that they use the
setcontext() libc stub instead of doing a plain system call.

While we are there:
- document various MD _UC_* flags in header file
- add libc and libpthread tests for swapcontext() behavior
(hopefully helpful to spot MD problems introduced with this change)

Future work:
- Deciding whether kernel support or _UC_TLSBASE should be added for
powerpc, sh3, sparc and sparc64 is left to portmasters
sparc64

Approved by core@


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.19 19-Sep-2011 joerg

branches: 1.19.2;
Mark _resumecontext as dead. ANSIfy all declarations for it.


# 1.18 17-Jul-2011 joerg

Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211
# 1.17 21-Oct-2009 snj

Remove 3rd and 4th clauses in christos' license. OK christos.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base christos-time_t-nbase christos-time_t-base
# 1.16 31-Oct-2008 christos

branches: 1.16.2;
Import syslogd SoC project by Martin Schuette:
- new syslog protocol api syslogp(3) that supports structured data
and draft-rfc timestamps
- reliable tcp connections with queueing
- encrypted connections


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 mjf-devfs2-base wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase cube-autoconf-base matt-armv6-base hpcarm-cleanup-base
# 1.15 04-Dec-2007 christos

move decls for _malloc_{pre,post}fork() to extern.h


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-mips64-base wrstuden-fixsa-base netbsd-4-base
# 1.14 22-Nov-2006 christos

branches: 1.14.8;
Don't expose _ss functions for 4.0. Requested by core.


Revision tags: abandoned-netbsd-4-base
# 1.13 17-May-2006 christos

PR/24324: Arne H Juul: Re-implement seekdir/telldir using a pointer of
locations per directory instead of a global hash table to avoid memory
leak issues, and incorrect results.


# 1.12 24-Feb-2006 drochner

complete constification of the sysctl() user side


# 1.11 16-Feb-2006 christos

- s/notyet/WIDE_DOUBLE/
- Add a little more glue for WIDE_DOUBLE; not done yet.
- s/def FLOATING_POINT/ndef NO_FLOATING_POINT/ to reduce diffs with FreeBSD.
- fix memory leak where each double formatted leaked 24 by calling __freedtoa()
appropriately. the new gdtoa keeps a list of memory chunks allocated by
malloc(), and it must maintained properly by calling __freedtoa() on the
results of __dtoa() Hi Klaus!
- in vfwprintf() make cvt return char * and convert it using __mbsconv(),
instead of having it return wchar_t *.

This should fix the memory leaks people have been reporting (eg. in top etc.)


# 1.10 24-Jan-2006 christos

rename __func to _func_unlocked, and add their prototypes in extern.h
instead of exposing them in dirent.h. More locking consistency fixes.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-3-base netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.9 27-Sep-2003 matt

Constify the _-sigaction_sigtramp tramp argument.


# 1.8 18-Jan-2003 thorpej

Merge the nathanw_sa branch.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base
# 1.7 09-Jul-2002 thorpej

Add prototype for __sigaction_sigtramp(). This system call is used
only by libc internally, and thus does not need to be exported in
any other header file.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-4-PATCH003 netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base netbsd-1-4-PATCH002 wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.6 26-Mar-1999 sommerfe

branches: 1.6.12;
move __getcwd prototypes to libc-private header file.

XXX duplicate the prototype in getcwd regression test (which needs to
call the syscall directly for reasonably complete testing).


# 1.5 14-Jan-1999 kleink

* On architectures using ELF, and conditionally on those in transition, rename
_ASM_LABEL(cerror) and _ASM_LABEL(curbrk) to _C_LABEL(__cerror) and
_C_LABEL(__curbrk) (or their respective architecture-specific equivalents) to
avoid possible name clashes with identifiers used in user applications.
* Do the same for minbrk on all architectures to avoid a GCC-specific (and
on ELF architectures effectively useless) symbol reference renaming in MI code.


# 1.4 15-Nov-1998 christos

in the __str{error,signal} functions make the third argument size_t since
it is really a size. This does not affect the external interface, so there
should be no reason to bump the libc #


# 1.3 26-Jul-1998 mycroft

const poisoning.


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.2 16-Oct-1997 christos

Remove _tztab() declaration now that timezone() migrated to libcompat.


# 1.1 13-Jul-1997 christos

Add prototype declarations