History log of /netbsd-current/lib/libc/string/Makefile.inc
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.90 08-Jun-2024 joerg

Redo l10n support in the strerror family.

Instead of opening the message catelog whenever strerror is called,
keep track of the translations in the locale cache. For the C locale,
the builtin sys_errlist is used directly. Other locales will open
the catalog file on the first strerror call and build a translation
table, so that further calls in this locale can just use an array
lookup.


# 1.89 11-Aug-2023 ryoon

Install strncpy.3 to fix build


# 1.88 11-Aug-2023 riastradh

strncpy(3), stpncpy(3): Split man page out of strcpy(3), stpcpy(3).

These are for substantively different purposes (fixed-width fields
with optional NUL padding vs NUL-terminated strings), so they don't
belong together.

Be more specific about the security issues.


# 1.87 01-Aug-2023 christos

Add companion mempcpy to wmempcpy, bump.


# 1.86 31-Jul-2023 christos

new gdb needs wmempcpy, give it to it.


Revision tags: netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.85 14-Apr-2021 mrg

for GCC, built memset.c with -fno-builtin. this avoids GCC 10 compiling
memset() and emitting calls to memset() where it seems code that looks
like what memset() does, which ends up recursing and blowing the stack.

this makes mips userland with GCC 10 work.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.84 25-Mar-2020 kre

Document strerror_l()

While here also document (but comment it out since it isn't
available - yet) strerror_lr(). To include that, simply
uncomment the relevant lines, and (twice I think) s/returns/return/
on lines just after currently commented out lines (that is, it
currently says, "A returns" after the comments are returned, we
need it to be "A and B return" - the "and B" appears when the comment
markers are removed, removing the 's' from returns must be done manually.

In addition to adding strerror_l() some additional enhancements were
made to the general strerror() doc.


Revision tags: netbsd-8-3-RELEASE netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE is-mlppp-base 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.83 12-Jan-2017 christos

branches: 1.83.14;
Add strerror_ss_r to be used by syslog_ss


Revision tags: pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.82 15-Oct-2016 kamil

Import wcsnlen(3) to libc

The wcsnlen(3) function conforms to POSIX.1-2008 and is an addition to the
ISO C standard.

size_t wcsnlen(const wchar_t *s, size_t maxlen);

The wcsnlen(3) function computes the number of wide-characters in a wide-
-string to which s points, not including NULL terminating wide-character
code and checking no more than maxlen wide-characters. This function never
examines wide-characters beyond a wide-string of maxlen size.


This function is a safer version of wcslen(3):

size_t wcslen(const wchar_t *s);


Update STANDARDS section of wmemchr(3) describing wide-character functions.


# 1.81 12-Oct-2016 christos

add strchrnul


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.80 24-Sep-2014 christos

branches: 1.80.2;
add strnstr from FreeBSD


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 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-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.79 19-Aug-2013 joerg

GC __indr_reference wrappers.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.78 24-Jun-2013 riastradh

Replace consttime_bcmp/explicit_bzero by consttime_memequal/explicit_memset.

consttime_memequal is the same as the old consttime_bcmp.
explicit_memset is to memset as explicit_bzero was to bcmp.

Passes amd64 release and i386/ALL, but I'm sure I missed some spots,
so please let me know.


# 1.77 24-Jun-2013 riastradh

Add consttime_bcmp(3) and explicit_bzero(3) to makefile and set lists.


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.76 30-Aug-2012 drochner

branches: 1.76.2;
Add "consttime_bcmp" and "explicit_bzero" functions for both kernel
abd userland, as proposed on tech-security, with explicit_bzero using
a volatile function pointer as suggested by Alan Barrett.
Both do what the name says. For userland, both are prefixed by "__"
to keep them out of the user namespace.
Change some memset/memcmp uses to the new functions where it makes
sense -- these are just some examples, more to come.


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 cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211
# 1.75 30-Jul-2009 dsl

branches: 1.75.6;
If SRCS contains any .S files then remove the corresponding .c file from
SRCS and add to LSRCS (for lint).
Change the 'string' Makefiles so that the arch/*/string/Makefile.inc
need only specify the .S files for that architecture and not the .c
files for all the files they don't override.


# 1.74 21-Jul-2009 joerg

Move popcount et al to src/common and add popcount32/popcount64.
Requested by rmind@. MD should now override popcount32/popcount64 and
provide the aliases as fitting.


# 1.73 21-Jul-2009 joerg

Add popcount(3) and the long and long long version. Name is inspired by
gnulib, the implementation goes back to the AMD Software Optimizer
guide. A number of platforms will want to replace the C version with
assembler code using native instructions.


# 1.72 18-Jul-2009 dsl

Remove index() and rindex() from the list (in comment)


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.71 01-May-2009 perry

Add versions of stpcpy(3), stpncpy(3), strnlen(3), all from FreeBSD.
These are defined in the latest POSIX

Also make related updates to documentation, mostly from FreeBSD,
though I cleaned a few other things up along the way.

Bump shlib_version.

We are still missing strcoll_l, strerror_l, strsignal, strxfrm_l to be
POSIX conformant.


# 1.70 10-Apr-2009 christos

add memrchr


# 1.69 11-Jan-2009 christos

branches: 1.69.2;
merge christos-time_t


Revision tags: christos-time_t-nbase christos-time_t-base
# 1.68 02-Jan-2009 tnozaki

Fixes PR lib/39662, shortcomings in LC_{MONETARY,NUMERIC,TIME,MESSAGES} db format.
ok'ed by core and releng.
(thanks for agc@, snj@ and i'm sorry for long time patience).

[libc]
- localeio.[ch] and lc*.[ch] in src/lib/libc/locale was replaced by
new locale-db implementation using citrus_db backend,
see src/lib/libc/citrus/citrus_lc_*.[ch].
- add citrus_bcs_strtou?l.c. don't use strtou?l locale implementation
internally, because they're locale-aware function.
- add some stubs for multi-locale issue, see {current,global}_locale.c.
- remove some obsolete file, setrunelocale.c, ___runetype_mb.c.
- remove __savectype() from ctypeio.[ch].

[tools]
- mklocale(1): add new option ``-t'' that generates new style
LC_{MONETARY,NUMERIC,TIME,MESSAGES} locale-db format.
- chrtbl(1): added ctypeio.[ch] for __savectype().

[locale-db]
- added en_US.US-ASCII locale.
- removed some shareable locale definition file:
en_US.US-ASCII -> en_US.ISO8859-1, en_US.UTF-8
zh_CN.eucCN -> zh_CN.GB18030
and more...see src/share/locale/*/Makefile.
- remove obsoleted locale sr_YU, added new locale sr_ME, sr_RS.
- change locale name ja_JP.ISO2022-JP* -> ja_JP.ISO-2022-JP*
for X11's locale.alias file alignments.
- fix regression test, wrong wcs?width(3), NAN/INF usage.

i tested release-build following arch:
i386, amd64, hpc{mips,arm,sh}, sparc64, vax.

citrus_lc_*.[ch] also can read old-plain-text style locale-db.
so that backward compatibility is keeped, but lc*.[ch] can't read
new citrus_db'ed locale-db and localeio.c never check sanity,
so forward compatibility is broken ;-<

old mklocale(1) doesn't know -t option, so you have to rebuild toolchain.


Revision tags: 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 matt-armv6-prevmlocking cube-autoconf-base matt-armv6-base matt-mips64-base hpcarm-cleanup-base
# 1.67 17-Feb-2007 wiz

branches: 1.67.18; 1.67.20;
Add strings(3), collecting information about strings.h.
Add Xr for it to string(3).

XXX: if someone could make a HISTORY section, I'd appreciate it


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase 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 wrstuden-fixsa-base netbsd-4-base
# 1.66 13-Oct-2006 tnozaki

PR/30809 added manpages of wcswcs(3) and wcscoll(3), wcsxfrm(3)
(wcs?width and wprintf are already in repository).


# 1.65 27-Aug-2006 dsl

fix xtos's pasto


# 1.64 26-Aug-2006 christos

PR/34238: Aleksey Cheusov: man pages for wcsdup, wcscasecmp and wcsncasecmp
functions


# 1.63 23-Aug-2006 christos

include one more new file.


# 1.62 22-Aug-2006 christos

PR/34238: Aleksey Cheusov: add wcsdup, wcscasecmp and wcsncasecmp functions


# 1.61 12-Aug-2006 christos

- Add strndup and stresep
- Use stresep so in fstab so that we can mount paths with white space in them.


Revision tags: abandoned-netbsd-4-base
# 1.60 03-Jun-2006 tnozaki

branches: 1.60.2;
fix lib/33476:
added following manpages (derived from FreeBSD),
wcwidth(3) wcswidth(3)
wcstol(3) wcstoll(3) wcstoimax(3)
wcstoul(3) wcstoull(3) wcstoumax(3)
and update doc/TODO.i18n.


# 1.59 20-Dec-2005 christos

Use reach-over sources from common/lib/libc


# 1.58 30-Jul-2005 christos

- Fix the remaining indr_references so that they define lint symbols.
- Add an internal symbol for strerror_r (thanks klaus for noticing)
- Remove internal __strerror


# 1.57 28-Jul-2005 christos

PR/30845: Luke Mewburn: strerror_r(3) missing
- Merge 4.4BSD strerror.3 man page changes that summarize information
for all the error printing functions. This makes the perror(3) page
obsolete.
- Implement all error functions in terms of strerror_r(), including
__strerror() which is not used internally. Can it be removed?
- Bump version for strerror_r


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-3-base
# 1.56 14-Mar-2005 perry

Fix stupid typo. I added memmem, not memmove.


# 1.55 13-Mar-2005 perry

add memmem


# 1.54 03-Jul-2004 junyoung

Add strcasestr(3), case insensitive version of strstr(3).
Bump libc minor.

From FreeBSD.


Revision tags: netbsd-2-0-base
# 1.53 05-Mar-2003 tshiozak

branches: 1.53.2;
changes related to lib/20576 and lib/20577.
- add wcstok() and wcswcs(),
- add wcstok(3),
- move btowc() and wctob() into each ctype modules,
- bump ctype interface ABI version,
- bump i18n modules' minor and
- update sets.
and fix a stupid bug in _RUNE_ISCACHED macro.


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 nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.52 17-Apr-2002 kleink

Need internal names for strlcat() and strlcpy().


# 1.51 24-Dec-2000 itojun

branches: 1.51.2;
split wide char section, just for readability/future possibility for .if


# 1.50 23-Dec-2000 itojun

move wcs* and wmem* from lib/libc/locale to lib/libc/string.


Revision tags: netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
# 1.49 08-Sep-1999 lukem

branches: 1.49.8;
add netbsd rcsid's
update for knf (return value on separate line to function name...)
check dst and src aren't null pointers before trying to use them
enable strlcat/strlcpy


Revision tags: netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.48 24-Feb-1999 drochner

branches: 1.48.2;
use ${ARCHDIR} instead of ${.CURDIR}/arch/${MACHINE_ARCH} where appropriate
libc builds on pmax again


# 1.47 14-Sep-1998 kleink

Install a link for strtok_r(3).


# 1.46 04-Aug-1998 perry

switch bzero to version in memset.c.
bzero.c is now a "#define BZERO//#include memset.c" type file.
Remove comment from Makefile about the fact that this is on the todo list.


# 1.45 04-Aug-1998 perry

Replace complicated and ugly makefile gook to make memmove,memcpy by
-Ding the bcopy.c source (and similarly strchr from index.c, strrchr
from rindex.c) with stub .c files for memmove, memcpy, strchr and
strrchr that simply #define the appropriate thing and #include the
appropriate .c file. Inspired by the way many m-d .S files handle the
same thing. This radically simplifies the Makefile.inc for libc/string
(and libkern).


# 1.44 30-Jan-1998 perry

note that bzero isn't yet being built from memset.c


# 1.43 30-Jan-1998 perry

update to lite-2


# 1.42 23-Jan-1998 cgd

Update various aspects of the special target builds which should
have been done (by others) a long time ago:
* fix PIC compilation to use new PIC flags,
* make them 'make -j N' safe.


# 1.41 22-Oct-1997 lukem

- use CPPFLAGS instead of CFLAGS
- use ${COMPILE.C} ... instead of ${CC} ${CFLAGS} -c ...


Revision tags: netbsd-1-3-base
# 1.40 09-Oct-1997 lukem

branches: 1.40.2;
rcsid police


# 1.39 23-Apr-1997 mrg

move str[fp]time into libc/time.


# 1.38 22-Dec-1996 cgd

add rules to build .ln files (memmove.ln, memcpy.ln, strchr.ln, strrchr.ln)
for objects built specially from other C files, when appropriate.


# 1.37 12-Nov-1996 jtc

Add strtok_r() for reentrant (thread-aware) programs


# 1.36 24-Sep-1996 matthias

Make it possible to have a md version of memccpy.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.35 20-Mar-1995 mycroft

Clarify a comment slightly.


# 1.34 20-Mar-1995 mycroft

Separate machine dependencies.


# 1.33 10-Feb-1995 cgd

list the files needed on the alpha.


# 1.32 22-Dec-1994 cgd

specify man pages the new way.


# 1.31 14-Nov-1994 dean

Include files for pmax


# 1.30 03-Sep-1994 jtc

__strerror() and __strsignal() have been broken out into their own files
and use message catalogs if NLS is defined.
Increased the size of char buffers used by strerror() and strsignal();
the error and signal strings may be much longer in some locales.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE
# 1.29 02-Aug-1994 jtc

branches: 1.29.2;
Add strsignal() function like on Solaris.
We might want to be able to retrieve a locale-specific signal description
(from a message catalog) and we need a function call API for that feature.


Revision tags: netbsd-1-0-base
# 1.28 06-Jul-1994 mycroft

We're supposed to include ${CPPFLAGS} when compiling .c files.


# 1.27 22-Jun-1994 cgd

add Boyer-Moore string search routines, from Bostic. man page
needs to be fixed for mandoc, and RCSID's need to be added.


# 1.26 25-Feb-1994 phil

Changing the ns32k stuff.


# 1.25 10-Dec-1993 mycroft

memcpy.S and memmove.S on i386 are now separate.


# 1.24 08-Dec-1993 mycroft

Add strchr.S and strrchr.S for m68k.


# 1.23 08-Dec-1993 pk

Added some Sparc sources.


# 1.22 07-Dec-1993 mycroft

Also a memcpy.S for m68k.


# 1.21 07-Dec-1993 mycroft

Remove -p flags from .so builds.


# 1.20 06-Dec-1993 mycroft

Add memmove.S to m68k assembler stuff.


# 1.19 06-Dec-1993 mycroft

Use assembler versions of m68k stuff.


# 1.18 06-Dec-1993 cgd

fix things so that memmove.so, et al., are built correctly on
machines w/o architecture-specific sources.


# 1.17 05-Dec-1993 briggs

Changed occurance of MACHINE_ARCH == "hp300" to MACHINE_ARCH == "m68k"


# 1.16 05-Dec-1993 cgd

get pc532 moved into ns32k; that's is MACHINE_ARCH


# 1.15 04-Dec-1993 cgd

update for .S and MACHINE_ARCH


# 1.14 18-Oct-1993 cgd

don't compiler strerror.c source here, and clean up.


# 1.13 07-Oct-1993 jtc

Moved strerror.[c3] from libc/stdio to libc/string.
Since perror is not permitted to change strerror()'s static buffer, I have
changed both functions to pass their own buffers to the new library-internal
function _strerror() that actually does the error message string look up.
Split strerror manpage into strerror and perror manpages.


# 1.12 07-Oct-1993 cgd

make an arch directory in libc, and move all machine dirs into it


# 1.11 05-Oct-1993 jtc

Add swab.c or swab.s, as appropriate, to each machines source list instead
of always using swab.c


# 1.10 17-Sep-1993 phil

pc532 specifics.


# 1.9 01-Aug-1993 mycroft

Add RCS identifiers.


Revision tags: netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base
# 1.8 17-Jun-1993 jtc

Add i386 assembly versions of bcmp & memcmp


# 1.7 17-Jun-1993 jtc

enable memset & memchr.


# 1.6 16-Jun-1993 mycroft

Actually, just make memcpy() an alias for memmove().


# 1.5 16-Jun-1993 mycroft

Oops. Forgot to update the Makefile.


# 1.4 16-Jun-1993 jtc

Added i386 assembly language versions of ffs, strcat, strcpy, and strlen.


# 1.3 15-Jun-1993 jtc

Added fast strcmp() and strncmp() routines.


# 1.2 07-May-1993 cgd

add assembly language version of index, rindex, strchr, and strrchr
supplied by J.T. Conklin <conklin@kaleida.com>


# 1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision


# 1.89 11-Aug-2023 ryoon

Install strncpy.3 to fix build


# 1.88 11-Aug-2023 riastradh

strncpy(3), stpncpy(3): Split man page out of strcpy(3), stpcpy(3).

These are for substantively different purposes (fixed-width fields
with optional NUL padding vs NUL-terminated strings), so they don't
belong together.

Be more specific about the security issues.


# 1.87 01-Aug-2023 christos

Add companion mempcpy to wmempcpy, bump.


# 1.86 31-Jul-2023 christos

new gdb needs wmempcpy, give it to it.


Revision tags: netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.85 14-Apr-2021 mrg

for GCC, built memset.c with -fno-builtin. this avoids GCC 10 compiling
memset() and emitting calls to memset() where it seems code that looks
like what memset() does, which ends up recursing and blowing the stack.

this makes mips userland with GCC 10 work.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.84 25-Mar-2020 kre

Document strerror_l()

While here also document (but comment it out since it isn't
available - yet) strerror_lr(). To include that, simply
uncomment the relevant lines, and (twice I think) s/returns/return/
on lines just after currently commented out lines (that is, it
currently says, "A returns" after the comments are returned, we
need it to be "A and B return" - the "and B" appears when the comment
markers are removed, removing the 's' from returns must be done manually.

In addition to adding strerror_l() some additional enhancements were
made to the general strerror() doc.


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE is-mlppp-base 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.83 12-Jan-2017 christos

branches: 1.83.14;
Add strerror_ss_r to be used by syslog_ss


Revision tags: pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.82 15-Oct-2016 kamil

Import wcsnlen(3) to libc

The wcsnlen(3) function conforms to POSIX.1-2008 and is an addition to the
ISO C standard.

size_t wcsnlen(const wchar_t *s, size_t maxlen);

The wcsnlen(3) function computes the number of wide-characters in a wide-
-string to which s points, not including NULL terminating wide-character
code and checking no more than maxlen wide-characters. This function never
examines wide-characters beyond a wide-string of maxlen size.


This function is a safer version of wcslen(3):

size_t wcslen(const wchar_t *s);


Update STANDARDS section of wmemchr(3) describing wide-character functions.


# 1.81 12-Oct-2016 christos

add strchrnul


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.80 24-Sep-2014 christos

branches: 1.80.2;
add strnstr from FreeBSD


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 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-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.79 19-Aug-2013 joerg

GC __indr_reference wrappers.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.78 24-Jun-2013 riastradh

Replace consttime_bcmp/explicit_bzero by consttime_memequal/explicit_memset.

consttime_memequal is the same as the old consttime_bcmp.
explicit_memset is to memset as explicit_bzero was to bcmp.

Passes amd64 release and i386/ALL, but I'm sure I missed some spots,
so please let me know.


# 1.77 24-Jun-2013 riastradh

Add consttime_bcmp(3) and explicit_bzero(3) to makefile and set lists.


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.76 30-Aug-2012 drochner

branches: 1.76.2;
Add "consttime_bcmp" and "explicit_bzero" functions for both kernel
abd userland, as proposed on tech-security, with explicit_bzero using
a volatile function pointer as suggested by Alan Barrett.
Both do what the name says. For userland, both are prefixed by "__"
to keep them out of the user namespace.
Change some memset/memcmp uses to the new functions where it makes
sense -- these are just some examples, more to come.


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 cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211
# 1.75 30-Jul-2009 dsl

branches: 1.75.6;
If SRCS contains any .S files then remove the corresponding .c file from
SRCS and add to LSRCS (for lint).
Change the 'string' Makefiles so that the arch/*/string/Makefile.inc
need only specify the .S files for that architecture and not the .c
files for all the files they don't override.


# 1.74 21-Jul-2009 joerg

Move popcount et al to src/common and add popcount32/popcount64.
Requested by rmind@. MD should now override popcount32/popcount64 and
provide the aliases as fitting.


# 1.73 21-Jul-2009 joerg

Add popcount(3) and the long and long long version. Name is inspired by
gnulib, the implementation goes back to the AMD Software Optimizer
guide. A number of platforms will want to replace the C version with
assembler code using native instructions.


# 1.72 18-Jul-2009 dsl

Remove index() and rindex() from the list (in comment)


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.71 01-May-2009 perry

Add versions of stpcpy(3), stpncpy(3), strnlen(3), all from FreeBSD.
These are defined in the latest POSIX

Also make related updates to documentation, mostly from FreeBSD,
though I cleaned a few other things up along the way.

Bump shlib_version.

We are still missing strcoll_l, strerror_l, strsignal, strxfrm_l to be
POSIX conformant.


# 1.70 10-Apr-2009 christos

add memrchr


# 1.69 11-Jan-2009 christos

branches: 1.69.2;
merge christos-time_t


Revision tags: christos-time_t-nbase christos-time_t-base
# 1.68 02-Jan-2009 tnozaki

Fixes PR lib/39662, shortcomings in LC_{MONETARY,NUMERIC,TIME,MESSAGES} db format.
ok'ed by core and releng.
(thanks for agc@, snj@ and i'm sorry for long time patience).

[libc]
- localeio.[ch] and lc*.[ch] in src/lib/libc/locale was replaced by
new locale-db implementation using citrus_db backend,
see src/lib/libc/citrus/citrus_lc_*.[ch].
- add citrus_bcs_strtou?l.c. don't use strtou?l locale implementation
internally, because they're locale-aware function.
- add some stubs for multi-locale issue, see {current,global}_locale.c.
- remove some obsolete file, setrunelocale.c, ___runetype_mb.c.
- remove __savectype() from ctypeio.[ch].

[tools]
- mklocale(1): add new option ``-t'' that generates new style
LC_{MONETARY,NUMERIC,TIME,MESSAGES} locale-db format.
- chrtbl(1): added ctypeio.[ch] for __savectype().

[locale-db]
- added en_US.US-ASCII locale.
- removed some shareable locale definition file:
en_US.US-ASCII -> en_US.ISO8859-1, en_US.UTF-8
zh_CN.eucCN -> zh_CN.GB18030
and more...see src/share/locale/*/Makefile.
- remove obsoleted locale sr_YU, added new locale sr_ME, sr_RS.
- change locale name ja_JP.ISO2022-JP* -> ja_JP.ISO-2022-JP*
for X11's locale.alias file alignments.
- fix regression test, wrong wcs?width(3), NAN/INF usage.

i tested release-build following arch:
i386, amd64, hpc{mips,arm,sh}, sparc64, vax.

citrus_lc_*.[ch] also can read old-plain-text style locale-db.
so that backward compatibility is keeped, but lc*.[ch] can't read
new citrus_db'ed locale-db and localeio.c never check sanity,
so forward compatibility is broken ;-<

old mklocale(1) doesn't know -t option, so you have to rebuild toolchain.


Revision tags: 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 matt-armv6-prevmlocking cube-autoconf-base matt-armv6-base matt-mips64-base hpcarm-cleanup-base
# 1.67 17-Feb-2007 wiz

branches: 1.67.18; 1.67.20;
Add strings(3), collecting information about strings.h.
Add Xr for it to string(3).

XXX: if someone could make a HISTORY section, I'd appreciate it


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase 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 wrstuden-fixsa-base netbsd-4-base
# 1.66 13-Oct-2006 tnozaki

PR/30809 added manpages of wcswcs(3) and wcscoll(3), wcsxfrm(3)
(wcs?width and wprintf are already in repository).


# 1.65 27-Aug-2006 dsl

fix xtos's pasto


# 1.64 26-Aug-2006 christos

PR/34238: Aleksey Cheusov: man pages for wcsdup, wcscasecmp and wcsncasecmp
functions


# 1.63 23-Aug-2006 christos

include one more new file.


# 1.62 22-Aug-2006 christos

PR/34238: Aleksey Cheusov: add wcsdup, wcscasecmp and wcsncasecmp functions


# 1.61 12-Aug-2006 christos

- Add strndup and stresep
- Use stresep so in fstab so that we can mount paths with white space in them.


Revision tags: abandoned-netbsd-4-base
# 1.60 03-Jun-2006 tnozaki

branches: 1.60.2;
fix lib/33476:
added following manpages (derived from FreeBSD),
wcwidth(3) wcswidth(3)
wcstol(3) wcstoll(3) wcstoimax(3)
wcstoul(3) wcstoull(3) wcstoumax(3)
and update doc/TODO.i18n.


# 1.59 20-Dec-2005 christos

Use reach-over sources from common/lib/libc


# 1.58 30-Jul-2005 christos

- Fix the remaining indr_references so that they define lint symbols.
- Add an internal symbol for strerror_r (thanks klaus for noticing)
- Remove internal __strerror


# 1.57 28-Jul-2005 christos

PR/30845: Luke Mewburn: strerror_r(3) missing
- Merge 4.4BSD strerror.3 man page changes that summarize information
for all the error printing functions. This makes the perror(3) page
obsolete.
- Implement all error functions in terms of strerror_r(), including
__strerror() which is not used internally. Can it be removed?
- Bump version for strerror_r


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-3-base
# 1.56 14-Mar-2005 perry

Fix stupid typo. I added memmem, not memmove.


# 1.55 13-Mar-2005 perry

add memmem


# 1.54 03-Jul-2004 junyoung

Add strcasestr(3), case insensitive version of strstr(3).
Bump libc minor.

From FreeBSD.


Revision tags: netbsd-2-0-base
# 1.53 05-Mar-2003 tshiozak

branches: 1.53.2;
changes related to lib/20576 and lib/20577.
- add wcstok() and wcswcs(),
- add wcstok(3),
- move btowc() and wctob() into each ctype modules,
- bump ctype interface ABI version,
- bump i18n modules' minor and
- update sets.
and fix a stupid bug in _RUNE_ISCACHED macro.


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 nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.52 17-Apr-2002 kleink

Need internal names for strlcat() and strlcpy().


# 1.51 24-Dec-2000 itojun

branches: 1.51.2;
split wide char section, just for readability/future possibility for .if


# 1.50 23-Dec-2000 itojun

move wcs* and wmem* from lib/libc/locale to lib/libc/string.


Revision tags: netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
# 1.49 08-Sep-1999 lukem

branches: 1.49.8;
add netbsd rcsid's
update for knf (return value on separate line to function name...)
check dst and src aren't null pointers before trying to use them
enable strlcat/strlcpy


Revision tags: netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.48 24-Feb-1999 drochner

branches: 1.48.2;
use ${ARCHDIR} instead of ${.CURDIR}/arch/${MACHINE_ARCH} where appropriate
libc builds on pmax again


# 1.47 14-Sep-1998 kleink

Install a link for strtok_r(3).


# 1.46 04-Aug-1998 perry

switch bzero to version in memset.c.
bzero.c is now a "#define BZERO//#include memset.c" type file.
Remove comment from Makefile about the fact that this is on the todo list.


# 1.45 04-Aug-1998 perry

Replace complicated and ugly makefile gook to make memmove,memcpy by
-Ding the bcopy.c source (and similarly strchr from index.c, strrchr
from rindex.c) with stub .c files for memmove, memcpy, strchr and
strrchr that simply #define the appropriate thing and #include the
appropriate .c file. Inspired by the way many m-d .S files handle the
same thing. This radically simplifies the Makefile.inc for libc/string
(and libkern).


# 1.44 30-Jan-1998 perry

note that bzero isn't yet being built from memset.c


# 1.43 30-Jan-1998 perry

update to lite-2


# 1.42 23-Jan-1998 cgd

Update various aspects of the special target builds which should
have been done (by others) a long time ago:
* fix PIC compilation to use new PIC flags,
* make them 'make -j N' safe.


# 1.41 22-Oct-1997 lukem

- use CPPFLAGS instead of CFLAGS
- use ${COMPILE.C} ... instead of ${CC} ${CFLAGS} -c ...


Revision tags: netbsd-1-3-base
# 1.40 09-Oct-1997 lukem

branches: 1.40.2;
rcsid police


# 1.39 23-Apr-1997 mrg

move str[fp]time into libc/time.


# 1.38 22-Dec-1996 cgd

add rules to build .ln files (memmove.ln, memcpy.ln, strchr.ln, strrchr.ln)
for objects built specially from other C files, when appropriate.


# 1.37 12-Nov-1996 jtc

Add strtok_r() for reentrant (thread-aware) programs


# 1.36 24-Sep-1996 matthias

Make it possible to have a md version of memccpy.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.35 20-Mar-1995 mycroft

Clarify a comment slightly.


# 1.34 20-Mar-1995 mycroft

Separate machine dependencies.


# 1.33 10-Feb-1995 cgd

list the files needed on the alpha.


# 1.32 22-Dec-1994 cgd

specify man pages the new way.


# 1.31 14-Nov-1994 dean

Include files for pmax


# 1.30 03-Sep-1994 jtc

__strerror() and __strsignal() have been broken out into their own files
and use message catalogs if NLS is defined.
Increased the size of char buffers used by strerror() and strsignal();
the error and signal strings may be much longer in some locales.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE
# 1.29 02-Aug-1994 jtc

branches: 1.29.2;
Add strsignal() function like on Solaris.
We might want to be able to retrieve a locale-specific signal description
(from a message catalog) and we need a function call API for that feature.


Revision tags: netbsd-1-0-base
# 1.28 06-Jul-1994 mycroft

We're supposed to include ${CPPFLAGS} when compiling .c files.


# 1.27 22-Jun-1994 cgd

add Boyer-Moore string search routines, from Bostic. man page
needs to be fixed for mandoc, and RCSID's need to be added.


# 1.26 25-Feb-1994 phil

Changing the ns32k stuff.


# 1.25 10-Dec-1993 mycroft

memcpy.S and memmove.S on i386 are now separate.


# 1.24 08-Dec-1993 mycroft

Add strchr.S and strrchr.S for m68k.


# 1.23 08-Dec-1993 pk

Added some Sparc sources.


# 1.22 07-Dec-1993 mycroft

Also a memcpy.S for m68k.


# 1.21 07-Dec-1993 mycroft

Remove -p flags from .so builds.


# 1.20 06-Dec-1993 mycroft

Add memmove.S to m68k assembler stuff.


# 1.19 06-Dec-1993 mycroft

Use assembler versions of m68k stuff.


# 1.18 06-Dec-1993 cgd

fix things so that memmove.so, et al., are built correctly on
machines w/o architecture-specific sources.


# 1.17 05-Dec-1993 briggs

Changed occurance of MACHINE_ARCH == "hp300" to MACHINE_ARCH == "m68k"


# 1.16 05-Dec-1993 cgd

get pc532 moved into ns32k; that's is MACHINE_ARCH


# 1.15 04-Dec-1993 cgd

update for .S and MACHINE_ARCH


# 1.14 18-Oct-1993 cgd

don't compiler strerror.c source here, and clean up.


# 1.13 07-Oct-1993 jtc

Moved strerror.[c3] from libc/stdio to libc/string.
Since perror is not permitted to change strerror()'s static buffer, I have
changed both functions to pass their own buffers to the new library-internal
function _strerror() that actually does the error message string look up.
Split strerror manpage into strerror and perror manpages.


# 1.12 07-Oct-1993 cgd

make an arch directory in libc, and move all machine dirs into it


# 1.11 05-Oct-1993 jtc

Add swab.c or swab.s, as appropriate, to each machines source list instead
of always using swab.c


# 1.10 17-Sep-1993 phil

pc532 specifics.


# 1.9 01-Aug-1993 mycroft

Add RCS identifiers.


Revision tags: netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base
# 1.8 17-Jun-1993 jtc

Add i386 assembly versions of bcmp & memcmp


# 1.7 17-Jun-1993 jtc

enable memset & memchr.


# 1.6 16-Jun-1993 mycroft

Actually, just make memcpy() an alias for memmove().


# 1.5 16-Jun-1993 mycroft

Oops. Forgot to update the Makefile.


# 1.4 16-Jun-1993 jtc

Added i386 assembly language versions of ffs, strcat, strcpy, and strlen.


# 1.3 15-Jun-1993 jtc

Added fast strcmp() and strncmp() routines.


# 1.2 07-May-1993 cgd

add assembly language version of index, rindex, strchr, and strrchr
supplied by J.T. Conklin <conklin@kaleida.com>


# 1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision


# 1.89 11-Aug-2023 ryoon

Install strncpy.3 to fix build


# 1.88 11-Aug-2023 riastradh

strncpy(3), stpncpy(3): Split man page out of strcpy(3), stpcpy(3).

These are for substantively different purposes (fixed-width fields
with optional NUL padding vs NUL-terminated strings), so they don't
belong together.

Be more specific about the security issues.


# 1.87 01-Aug-2023 christos

Add companion mempcpy to wmempcpy, bump.


# 1.86 31-Jul-2023 christos

new gdb needs wmempcpy, give it to it.


Revision tags: netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.85 14-Apr-2021 mrg

for GCC, built memset.c with -fno-builtin. this avoids GCC 10 compiling
memset() and emitting calls to memset() where it seems code that looks
like what memset() does, which ends up recursing and blowing the stack.

this makes mips userland with GCC 10 work.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.84 25-Mar-2020 kre

Document strerror_l()

While here also document (but comment it out since it isn't
available - yet) strerror_lr(). To include that, simply
uncomment the relevant lines, and (twice I think) s/returns/return/
on lines just after currently commented out lines (that is, it
currently says, "A returns" after the comments are returned, we
need it to be "A and B return" - the "and B" appears when the comment
markers are removed, removing the 's' from returns must be done manually.

In addition to adding strerror_l() some additional enhancements were
made to the general strerror() doc.


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE is-mlppp-base 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.83 12-Jan-2017 christos

branches: 1.83.14;
Add strerror_ss_r to be used by syslog_ss


Revision tags: pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.82 15-Oct-2016 kamil

Import wcsnlen(3) to libc

The wcsnlen(3) function conforms to POSIX.1-2008 and is an addition to the
ISO C standard.

size_t wcsnlen(const wchar_t *s, size_t maxlen);

The wcsnlen(3) function computes the number of wide-characters in a wide-
-string to which s points, not including NULL terminating wide-character
code and checking no more than maxlen wide-characters. This function never
examines wide-characters beyond a wide-string of maxlen size.


This function is a safer version of wcslen(3):

size_t wcslen(const wchar_t *s);


Update STANDARDS section of wmemchr(3) describing wide-character functions.


# 1.81 12-Oct-2016 christos

add strchrnul


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.80 24-Sep-2014 christos

branches: 1.80.2;
add strnstr from FreeBSD


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 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-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.79 19-Aug-2013 joerg

GC __indr_reference wrappers.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.78 24-Jun-2013 riastradh

Replace consttime_bcmp/explicit_bzero by consttime_memequal/explicit_memset.

consttime_memequal is the same as the old consttime_bcmp.
explicit_memset is to memset as explicit_bzero was to bcmp.

Passes amd64 release and i386/ALL, but I'm sure I missed some spots,
so please let me know.


# 1.77 24-Jun-2013 riastradh

Add consttime_bcmp(3) and explicit_bzero(3) to makefile and set lists.


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.76 30-Aug-2012 drochner

branches: 1.76.2;
Add "consttime_bcmp" and "explicit_bzero" functions for both kernel
abd userland, as proposed on tech-security, with explicit_bzero using
a volatile function pointer as suggested by Alan Barrett.
Both do what the name says. For userland, both are prefixed by "__"
to keep them out of the user namespace.
Change some memset/memcmp uses to the new functions where it makes
sense -- these are just some examples, more to come.


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 cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211
# 1.75 30-Jul-2009 dsl

branches: 1.75.6;
If SRCS contains any .S files then remove the corresponding .c file from
SRCS and add to LSRCS (for lint).
Change the 'string' Makefiles so that the arch/*/string/Makefile.inc
need only specify the .S files for that architecture and not the .c
files for all the files they don't override.


# 1.74 21-Jul-2009 joerg

Move popcount et al to src/common and add popcount32/popcount64.
Requested by rmind@. MD should now override popcount32/popcount64 and
provide the aliases as fitting.


# 1.73 21-Jul-2009 joerg

Add popcount(3) and the long and long long version. Name is inspired by
gnulib, the implementation goes back to the AMD Software Optimizer
guide. A number of platforms will want to replace the C version with
assembler code using native instructions.


# 1.72 18-Jul-2009 dsl

Remove index() and rindex() from the list (in comment)


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.71 01-May-2009 perry

Add versions of stpcpy(3), stpncpy(3), strnlen(3), all from FreeBSD.
These are defined in the latest POSIX

Also make related updates to documentation, mostly from FreeBSD,
though I cleaned a few other things up along the way.

Bump shlib_version.

We are still missing strcoll_l, strerror_l, strsignal, strxfrm_l to be
POSIX conformant.


# 1.70 10-Apr-2009 christos

add memrchr


# 1.69 11-Jan-2009 christos

branches: 1.69.2;
merge christos-time_t


Revision tags: christos-time_t-nbase christos-time_t-base
# 1.68 02-Jan-2009 tnozaki

Fixes PR lib/39662, shortcomings in LC_{MONETARY,NUMERIC,TIME,MESSAGES} db format.
ok'ed by core and releng.
(thanks for agc@, snj@ and i'm sorry for long time patience).

[libc]
- localeio.[ch] and lc*.[ch] in src/lib/libc/locale was replaced by
new locale-db implementation using citrus_db backend,
see src/lib/libc/citrus/citrus_lc_*.[ch].
- add citrus_bcs_strtou?l.c. don't use strtou?l locale implementation
internally, because they're locale-aware function.
- add some stubs for multi-locale issue, see {current,global}_locale.c.
- remove some obsolete file, setrunelocale.c, ___runetype_mb.c.
- remove __savectype() from ctypeio.[ch].

[tools]
- mklocale(1): add new option ``-t'' that generates new style
LC_{MONETARY,NUMERIC,TIME,MESSAGES} locale-db format.
- chrtbl(1): added ctypeio.[ch] for __savectype().

[locale-db]
- added en_US.US-ASCII locale.
- removed some shareable locale definition file:
en_US.US-ASCII -> en_US.ISO8859-1, en_US.UTF-8
zh_CN.eucCN -> zh_CN.GB18030
and more...see src/share/locale/*/Makefile.
- remove obsoleted locale sr_YU, added new locale sr_ME, sr_RS.
- change locale name ja_JP.ISO2022-JP* -> ja_JP.ISO-2022-JP*
for X11's locale.alias file alignments.
- fix regression test, wrong wcs?width(3), NAN/INF usage.

i tested release-build following arch:
i386, amd64, hpc{mips,arm,sh}, sparc64, vax.

citrus_lc_*.[ch] also can read old-plain-text style locale-db.
so that backward compatibility is keeped, but lc*.[ch] can't read
new citrus_db'ed locale-db and localeio.c never check sanity,
so forward compatibility is broken ;-<

old mklocale(1) doesn't know -t option, so you have to rebuild toolchain.


Revision tags: 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 matt-armv6-prevmlocking cube-autoconf-base matt-armv6-base matt-mips64-base hpcarm-cleanup-base
# 1.67 17-Feb-2007 wiz

branches: 1.67.18; 1.67.20;
Add strings(3), collecting information about strings.h.
Add Xr for it to string(3).

XXX: if someone could make a HISTORY section, I'd appreciate it


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase 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 wrstuden-fixsa-base netbsd-4-base
# 1.66 13-Oct-2006 tnozaki

PR/30809 added manpages of wcswcs(3) and wcscoll(3), wcsxfrm(3)
(wcs?width and wprintf are already in repository).


# 1.65 27-Aug-2006 dsl

fix xtos's pasto


# 1.64 26-Aug-2006 christos

PR/34238: Aleksey Cheusov: man pages for wcsdup, wcscasecmp and wcsncasecmp
functions


# 1.63 23-Aug-2006 christos

include one more new file.


# 1.62 22-Aug-2006 christos

PR/34238: Aleksey Cheusov: add wcsdup, wcscasecmp and wcsncasecmp functions


# 1.61 12-Aug-2006 christos

- Add strndup and stresep
- Use stresep so in fstab so that we can mount paths with white space in them.


Revision tags: abandoned-netbsd-4-base
# 1.60 03-Jun-2006 tnozaki

branches: 1.60.2;
fix lib/33476:
added following manpages (derived from FreeBSD),
wcwidth(3) wcswidth(3)
wcstol(3) wcstoll(3) wcstoimax(3)
wcstoul(3) wcstoull(3) wcstoumax(3)
and update doc/TODO.i18n.


# 1.59 20-Dec-2005 christos

Use reach-over sources from common/lib/libc


# 1.58 30-Jul-2005 christos

- Fix the remaining indr_references so that they define lint symbols.
- Add an internal symbol for strerror_r (thanks klaus for noticing)
- Remove internal __strerror


# 1.57 28-Jul-2005 christos

PR/30845: Luke Mewburn: strerror_r(3) missing
- Merge 4.4BSD strerror.3 man page changes that summarize information
for all the error printing functions. This makes the perror(3) page
obsolete.
- Implement all error functions in terms of strerror_r(), including
__strerror() which is not used internally. Can it be removed?
- Bump version for strerror_r


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-3-base
# 1.56 14-Mar-2005 perry

Fix stupid typo. I added memmem, not memmove.


# 1.55 13-Mar-2005 perry

add memmem


# 1.54 03-Jul-2004 junyoung

Add strcasestr(3), case insensitive version of strstr(3).
Bump libc minor.

From FreeBSD.


Revision tags: netbsd-2-0-base
# 1.53 05-Mar-2003 tshiozak

branches: 1.53.2;
changes related to lib/20576 and lib/20577.
- add wcstok() and wcswcs(),
- add wcstok(3),
- move btowc() and wctob() into each ctype modules,
- bump ctype interface ABI version,
- bump i18n modules' minor and
- update sets.
and fix a stupid bug in _RUNE_ISCACHED macro.


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 nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.52 17-Apr-2002 kleink

Need internal names for strlcat() and strlcpy().


# 1.51 24-Dec-2000 itojun

branches: 1.51.2;
split wide char section, just for readability/future possibility for .if


# 1.50 23-Dec-2000 itojun

move wcs* and wmem* from lib/libc/locale to lib/libc/string.


Revision tags: netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
# 1.49 08-Sep-1999 lukem

branches: 1.49.8;
add netbsd rcsid's
update for knf (return value on separate line to function name...)
check dst and src aren't null pointers before trying to use them
enable strlcat/strlcpy


Revision tags: netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.48 24-Feb-1999 drochner

branches: 1.48.2;
use ${ARCHDIR} instead of ${.CURDIR}/arch/${MACHINE_ARCH} where appropriate
libc builds on pmax again


# 1.47 14-Sep-1998 kleink

Install a link for strtok_r(3).


# 1.46 04-Aug-1998 perry

switch bzero to version in memset.c.
bzero.c is now a "#define BZERO//#include memset.c" type file.
Remove comment from Makefile about the fact that this is on the todo list.


# 1.45 04-Aug-1998 perry

Replace complicated and ugly makefile gook to make memmove,memcpy by
-Ding the bcopy.c source (and similarly strchr from index.c, strrchr
from rindex.c) with stub .c files for memmove, memcpy, strchr and
strrchr that simply #define the appropriate thing and #include the
appropriate .c file. Inspired by the way many m-d .S files handle the
same thing. This radically simplifies the Makefile.inc for libc/string
(and libkern).


# 1.44 30-Jan-1998 perry

note that bzero isn't yet being built from memset.c


# 1.43 30-Jan-1998 perry

update to lite-2


# 1.42 23-Jan-1998 cgd

Update various aspects of the special target builds which should
have been done (by others) a long time ago:
* fix PIC compilation to use new PIC flags,
* make them 'make -j N' safe.


# 1.41 22-Oct-1997 lukem

- use CPPFLAGS instead of CFLAGS
- use ${COMPILE.C} ... instead of ${CC} ${CFLAGS} -c ...


Revision tags: netbsd-1-3-base
# 1.40 09-Oct-1997 lukem

branches: 1.40.2;
rcsid police


# 1.39 23-Apr-1997 mrg

move str[fp]time into libc/time.


# 1.38 22-Dec-1996 cgd

add rules to build .ln files (memmove.ln, memcpy.ln, strchr.ln, strrchr.ln)
for objects built specially from other C files, when appropriate.


# 1.37 12-Nov-1996 jtc

Add strtok_r() for reentrant (thread-aware) programs


# 1.36 24-Sep-1996 matthias

Make it possible to have a md version of memccpy.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.35 20-Mar-1995 mycroft

Clarify a comment slightly.


# 1.34 20-Mar-1995 mycroft

Separate machine dependencies.


# 1.33 10-Feb-1995 cgd

list the files needed on the alpha.


# 1.32 22-Dec-1994 cgd

specify man pages the new way.


# 1.31 14-Nov-1994 dean

Include files for pmax


# 1.30 03-Sep-1994 jtc

__strerror() and __strsignal() have been broken out into their own files
and use message catalogs if NLS is defined.
Increased the size of char buffers used by strerror() and strsignal();
the error and signal strings may be much longer in some locales.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE
# 1.29 02-Aug-1994 jtc

branches: 1.29.2;
Add strsignal() function like on Solaris.
We might want to be able to retrieve a locale-specific signal description
(from a message catalog) and we need a function call API for that feature.


Revision tags: netbsd-1-0-base
# 1.28 06-Jul-1994 mycroft

We're supposed to include ${CPPFLAGS} when compiling .c files.


# 1.27 22-Jun-1994 cgd

add Boyer-Moore string search routines, from Bostic. man page
needs to be fixed for mandoc, and RCSID's need to be added.


# 1.26 25-Feb-1994 phil

Changing the ns32k stuff.


# 1.25 10-Dec-1993 mycroft

memcpy.S and memmove.S on i386 are now separate.


# 1.24 08-Dec-1993 mycroft

Add strchr.S and strrchr.S for m68k.


# 1.23 08-Dec-1993 pk

Added some Sparc sources.


# 1.22 07-Dec-1993 mycroft

Also a memcpy.S for m68k.


# 1.21 07-Dec-1993 mycroft

Remove -p flags from .so builds.


# 1.20 06-Dec-1993 mycroft

Add memmove.S to m68k assembler stuff.


# 1.19 06-Dec-1993 mycroft

Use assembler versions of m68k stuff.


# 1.18 06-Dec-1993 cgd

fix things so that memmove.so, et al., are built correctly on
machines w/o architecture-specific sources.


# 1.17 05-Dec-1993 briggs

Changed occurance of MACHINE_ARCH == "hp300" to MACHINE_ARCH == "m68k"


# 1.16 05-Dec-1993 cgd

get pc532 moved into ns32k; that's is MACHINE_ARCH


# 1.15 04-Dec-1993 cgd

update for .S and MACHINE_ARCH


# 1.14 18-Oct-1993 cgd

don't compiler strerror.c source here, and clean up.


# 1.13 07-Oct-1993 jtc

Moved strerror.[c3] from libc/stdio to libc/string.
Since perror is not permitted to change strerror()'s static buffer, I have
changed both functions to pass their own buffers to the new library-internal
function _strerror() that actually does the error message string look up.
Split strerror manpage into strerror and perror manpages.


# 1.12 07-Oct-1993 cgd

make an arch directory in libc, and move all machine dirs into it


# 1.11 05-Oct-1993 jtc

Add swab.c or swab.s, as appropriate, to each machines source list instead
of always using swab.c


# 1.10 17-Sep-1993 phil

pc532 specifics.


# 1.9 01-Aug-1993 mycroft

Add RCS identifiers.


Revision tags: netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base
# 1.8 17-Jun-1993 jtc

Add i386 assembly versions of bcmp & memcmp


# 1.7 17-Jun-1993 jtc

enable memset & memchr.


# 1.6 16-Jun-1993 mycroft

Actually, just make memcpy() an alias for memmove().


# 1.5 16-Jun-1993 mycroft

Oops. Forgot to update the Makefile.


# 1.4 16-Jun-1993 jtc

Added i386 assembly language versions of ffs, strcat, strcpy, and strlen.


# 1.3 15-Jun-1993 jtc

Added fast strcmp() and strncmp() routines.


# 1.2 07-May-1993 cgd

add assembly language version of index, rindex, strchr, and strrchr
supplied by J.T. Conklin <conklin@kaleida.com>


# 1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision


# 1.87 01-Aug-2023 christos

Add companion mempcpy to wmempcpy, bump.


# 1.86 31-Jul-2023 christos

new gdb needs wmempcpy, give it to it.


Revision tags: netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.85 14-Apr-2021 mrg

for GCC, built memset.c with -fno-builtin. this avoids GCC 10 compiling
memset() and emitting calls to memset() where it seems code that looks
like what memset() does, which ends up recursing and blowing the stack.

this makes mips userland with GCC 10 work.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.84 25-Mar-2020 kre

Document strerror_l()

While here also document (but comment it out since it isn't
available - yet) strerror_lr(). To include that, simply
uncomment the relevant lines, and (twice I think) s/returns/return/
on lines just after currently commented out lines (that is, it
currently says, "A returns" after the comments are returned, we
need it to be "A and B return" - the "and B" appears when the comment
markers are removed, removing the 's' from returns must be done manually.

In addition to adding strerror_l() some additional enhancements were
made to the general strerror() doc.


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE is-mlppp-base 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.83 12-Jan-2017 christos

branches: 1.83.14;
Add strerror_ss_r to be used by syslog_ss


Revision tags: pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.82 15-Oct-2016 kamil

Import wcsnlen(3) to libc

The wcsnlen(3) function conforms to POSIX.1-2008 and is an addition to the
ISO C standard.

size_t wcsnlen(const wchar_t *s, size_t maxlen);

The wcsnlen(3) function computes the number of wide-characters in a wide-
-string to which s points, not including NULL terminating wide-character
code and checking no more than maxlen wide-characters. This function never
examines wide-characters beyond a wide-string of maxlen size.


This function is a safer version of wcslen(3):

size_t wcslen(const wchar_t *s);


Update STANDARDS section of wmemchr(3) describing wide-character functions.


# 1.81 12-Oct-2016 christos

add strchrnul


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.80 24-Sep-2014 christos

branches: 1.80.2;
add strnstr from FreeBSD


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 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-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.79 19-Aug-2013 joerg

GC __indr_reference wrappers.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.78 24-Jun-2013 riastradh

Replace consttime_bcmp/explicit_bzero by consttime_memequal/explicit_memset.

consttime_memequal is the same as the old consttime_bcmp.
explicit_memset is to memset as explicit_bzero was to bcmp.

Passes amd64 release and i386/ALL, but I'm sure I missed some spots,
so please let me know.


# 1.77 24-Jun-2013 riastradh

Add consttime_bcmp(3) and explicit_bzero(3) to makefile and set lists.


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.76 30-Aug-2012 drochner

branches: 1.76.2;
Add "consttime_bcmp" and "explicit_bzero" functions for both kernel
abd userland, as proposed on tech-security, with explicit_bzero using
a volatile function pointer as suggested by Alan Barrett.
Both do what the name says. For userland, both are prefixed by "__"
to keep them out of the user namespace.
Change some memset/memcmp uses to the new functions where it makes
sense -- these are just some examples, more to come.


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 cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211
# 1.75 30-Jul-2009 dsl

branches: 1.75.6;
If SRCS contains any .S files then remove the corresponding .c file from
SRCS and add to LSRCS (for lint).
Change the 'string' Makefiles so that the arch/*/string/Makefile.inc
need only specify the .S files for that architecture and not the .c
files for all the files they don't override.


# 1.74 21-Jul-2009 joerg

Move popcount et al to src/common and add popcount32/popcount64.
Requested by rmind@. MD should now override popcount32/popcount64 and
provide the aliases as fitting.


# 1.73 21-Jul-2009 joerg

Add popcount(3) and the long and long long version. Name is inspired by
gnulib, the implementation goes back to the AMD Software Optimizer
guide. A number of platforms will want to replace the C version with
assembler code using native instructions.


# 1.72 18-Jul-2009 dsl

Remove index() and rindex() from the list (in comment)


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.71 01-May-2009 perry

Add versions of stpcpy(3), stpncpy(3), strnlen(3), all from FreeBSD.
These are defined in the latest POSIX

Also make related updates to documentation, mostly from FreeBSD,
though I cleaned a few other things up along the way.

Bump shlib_version.

We are still missing strcoll_l, strerror_l, strsignal, strxfrm_l to be
POSIX conformant.


# 1.70 10-Apr-2009 christos

add memrchr


# 1.69 11-Jan-2009 christos

branches: 1.69.2;
merge christos-time_t


Revision tags: christos-time_t-nbase christos-time_t-base
# 1.68 02-Jan-2009 tnozaki

Fixes PR lib/39662, shortcomings in LC_{MONETARY,NUMERIC,TIME,MESSAGES} db format.
ok'ed by core and releng.
(thanks for agc@, snj@ and i'm sorry for long time patience).

[libc]
- localeio.[ch] and lc*.[ch] in src/lib/libc/locale was replaced by
new locale-db implementation using citrus_db backend,
see src/lib/libc/citrus/citrus_lc_*.[ch].
- add citrus_bcs_strtou?l.c. don't use strtou?l locale implementation
internally, because they're locale-aware function.
- add some stubs for multi-locale issue, see {current,global}_locale.c.
- remove some obsolete file, setrunelocale.c, ___runetype_mb.c.
- remove __savectype() from ctypeio.[ch].

[tools]
- mklocale(1): add new option ``-t'' that generates new style
LC_{MONETARY,NUMERIC,TIME,MESSAGES} locale-db format.
- chrtbl(1): added ctypeio.[ch] for __savectype().

[locale-db]
- added en_US.US-ASCII locale.
- removed some shareable locale definition file:
en_US.US-ASCII -> en_US.ISO8859-1, en_US.UTF-8
zh_CN.eucCN -> zh_CN.GB18030
and more...see src/share/locale/*/Makefile.
- remove obsoleted locale sr_YU, added new locale sr_ME, sr_RS.
- change locale name ja_JP.ISO2022-JP* -> ja_JP.ISO-2022-JP*
for X11's locale.alias file alignments.
- fix regression test, wrong wcs?width(3), NAN/INF usage.

i tested release-build following arch:
i386, amd64, hpc{mips,arm,sh}, sparc64, vax.

citrus_lc_*.[ch] also can read old-plain-text style locale-db.
so that backward compatibility is keeped, but lc*.[ch] can't read
new citrus_db'ed locale-db and localeio.c never check sanity,
so forward compatibility is broken ;-<

old mklocale(1) doesn't know -t option, so you have to rebuild toolchain.


Revision tags: 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 matt-armv6-prevmlocking cube-autoconf-base matt-armv6-base matt-mips64-base hpcarm-cleanup-base
# 1.67 17-Feb-2007 wiz

branches: 1.67.18; 1.67.20;
Add strings(3), collecting information about strings.h.
Add Xr for it to string(3).

XXX: if someone could make a HISTORY section, I'd appreciate it


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase 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 wrstuden-fixsa-base netbsd-4-base
# 1.66 13-Oct-2006 tnozaki

PR/30809 added manpages of wcswcs(3) and wcscoll(3), wcsxfrm(3)
(wcs?width and wprintf are already in repository).


# 1.65 27-Aug-2006 dsl

fix xtos's pasto


# 1.64 26-Aug-2006 christos

PR/34238: Aleksey Cheusov: man pages for wcsdup, wcscasecmp and wcsncasecmp
functions


# 1.63 23-Aug-2006 christos

include one more new file.


# 1.62 22-Aug-2006 christos

PR/34238: Aleksey Cheusov: add wcsdup, wcscasecmp and wcsncasecmp functions


# 1.61 12-Aug-2006 christos

- Add strndup and stresep
- Use stresep so in fstab so that we can mount paths with white space in them.


Revision tags: abandoned-netbsd-4-base
# 1.60 03-Jun-2006 tnozaki

branches: 1.60.2;
fix lib/33476:
added following manpages (derived from FreeBSD),
wcwidth(3) wcswidth(3)
wcstol(3) wcstoll(3) wcstoimax(3)
wcstoul(3) wcstoull(3) wcstoumax(3)
and update doc/TODO.i18n.


# 1.59 20-Dec-2005 christos

Use reach-over sources from common/lib/libc


# 1.58 30-Jul-2005 christos

- Fix the remaining indr_references so that they define lint symbols.
- Add an internal symbol for strerror_r (thanks klaus for noticing)
- Remove internal __strerror


# 1.57 28-Jul-2005 christos

PR/30845: Luke Mewburn: strerror_r(3) missing
- Merge 4.4BSD strerror.3 man page changes that summarize information
for all the error printing functions. This makes the perror(3) page
obsolete.
- Implement all error functions in terms of strerror_r(), including
__strerror() which is not used internally. Can it be removed?
- Bump version for strerror_r


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-3-base
# 1.56 14-Mar-2005 perry

Fix stupid typo. I added memmem, not memmove.


# 1.55 13-Mar-2005 perry

add memmem


# 1.54 03-Jul-2004 junyoung

Add strcasestr(3), case insensitive version of strstr(3).
Bump libc minor.

From FreeBSD.


Revision tags: netbsd-2-0-base
# 1.53 05-Mar-2003 tshiozak

branches: 1.53.2;
changes related to lib/20576 and lib/20577.
- add wcstok() and wcswcs(),
- add wcstok(3),
- move btowc() and wctob() into each ctype modules,
- bump ctype interface ABI version,
- bump i18n modules' minor and
- update sets.
and fix a stupid bug in _RUNE_ISCACHED macro.


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 nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.52 17-Apr-2002 kleink

Need internal names for strlcat() and strlcpy().


# 1.51 24-Dec-2000 itojun

branches: 1.51.2;
split wide char section, just for readability/future possibility for .if


# 1.50 23-Dec-2000 itojun

move wcs* and wmem* from lib/libc/locale to lib/libc/string.


Revision tags: netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
# 1.49 08-Sep-1999 lukem

branches: 1.49.8;
add netbsd rcsid's
update for knf (return value on separate line to function name...)
check dst and src aren't null pointers before trying to use them
enable strlcat/strlcpy


Revision tags: netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.48 24-Feb-1999 drochner

branches: 1.48.2;
use ${ARCHDIR} instead of ${.CURDIR}/arch/${MACHINE_ARCH} where appropriate
libc builds on pmax again


# 1.47 14-Sep-1998 kleink

Install a link for strtok_r(3).


# 1.46 04-Aug-1998 perry

switch bzero to version in memset.c.
bzero.c is now a "#define BZERO//#include memset.c" type file.
Remove comment from Makefile about the fact that this is on the todo list.


# 1.45 04-Aug-1998 perry

Replace complicated and ugly makefile gook to make memmove,memcpy by
-Ding the bcopy.c source (and similarly strchr from index.c, strrchr
from rindex.c) with stub .c files for memmove, memcpy, strchr and
strrchr that simply #define the appropriate thing and #include the
appropriate .c file. Inspired by the way many m-d .S files handle the
same thing. This radically simplifies the Makefile.inc for libc/string
(and libkern).


# 1.44 30-Jan-1998 perry

note that bzero isn't yet being built from memset.c


# 1.43 30-Jan-1998 perry

update to lite-2


# 1.42 23-Jan-1998 cgd

Update various aspects of the special target builds which should
have been done (by others) a long time ago:
* fix PIC compilation to use new PIC flags,
* make them 'make -j N' safe.


# 1.41 22-Oct-1997 lukem

- use CPPFLAGS instead of CFLAGS
- use ${COMPILE.C} ... instead of ${CC} ${CFLAGS} -c ...


Revision tags: netbsd-1-3-base
# 1.40 09-Oct-1997 lukem

branches: 1.40.2;
rcsid police


# 1.39 23-Apr-1997 mrg

move str[fp]time into libc/time.


# 1.38 22-Dec-1996 cgd

add rules to build .ln files (memmove.ln, memcpy.ln, strchr.ln, strrchr.ln)
for objects built specially from other C files, when appropriate.


# 1.37 12-Nov-1996 jtc

Add strtok_r() for reentrant (thread-aware) programs


# 1.36 24-Sep-1996 matthias

Make it possible to have a md version of memccpy.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.35 20-Mar-1995 mycroft

Clarify a comment slightly.


# 1.34 20-Mar-1995 mycroft

Separate machine dependencies.


# 1.33 10-Feb-1995 cgd

list the files needed on the alpha.


# 1.32 22-Dec-1994 cgd

specify man pages the new way.


# 1.31 14-Nov-1994 dean

Include files for pmax


# 1.30 03-Sep-1994 jtc

__strerror() and __strsignal() have been broken out into their own files
and use message catalogs if NLS is defined.
Increased the size of char buffers used by strerror() and strsignal();
the error and signal strings may be much longer in some locales.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE
# 1.29 02-Aug-1994 jtc

branches: 1.29.2;
Add strsignal() function like on Solaris.
We might want to be able to retrieve a locale-specific signal description
(from a message catalog) and we need a function call API for that feature.


Revision tags: netbsd-1-0-base
# 1.28 06-Jul-1994 mycroft

We're supposed to include ${CPPFLAGS} when compiling .c files.


# 1.27 22-Jun-1994 cgd

add Boyer-Moore string search routines, from Bostic. man page
needs to be fixed for mandoc, and RCSID's need to be added.


# 1.26 25-Feb-1994 phil

Changing the ns32k stuff.


# 1.25 10-Dec-1993 mycroft

memcpy.S and memmove.S on i386 are now separate.


# 1.24 08-Dec-1993 mycroft

Add strchr.S and strrchr.S for m68k.


# 1.23 08-Dec-1993 pk

Added some Sparc sources.


# 1.22 07-Dec-1993 mycroft

Also a memcpy.S for m68k.


# 1.21 07-Dec-1993 mycroft

Remove -p flags from .so builds.


# 1.20 06-Dec-1993 mycroft

Add memmove.S to m68k assembler stuff.


# 1.19 06-Dec-1993 mycroft

Use assembler versions of m68k stuff.


# 1.18 06-Dec-1993 cgd

fix things so that memmove.so, et al., are built correctly on
machines w/o architecture-specific sources.


# 1.17 05-Dec-1993 briggs

Changed occurance of MACHINE_ARCH == "hp300" to MACHINE_ARCH == "m68k"


# 1.16 05-Dec-1993 cgd

get pc532 moved into ns32k; that's is MACHINE_ARCH


# 1.15 04-Dec-1993 cgd

update for .S and MACHINE_ARCH


# 1.14 18-Oct-1993 cgd

don't compiler strerror.c source here, and clean up.


# 1.13 07-Oct-1993 jtc

Moved strerror.[c3] from libc/stdio to libc/string.
Since perror is not permitted to change strerror()'s static buffer, I have
changed both functions to pass their own buffers to the new library-internal
function _strerror() that actually does the error message string look up.
Split strerror manpage into strerror and perror manpages.


# 1.12 07-Oct-1993 cgd

make an arch directory in libc, and move all machine dirs into it


# 1.11 05-Oct-1993 jtc

Add swab.c or swab.s, as appropriate, to each machines source list instead
of always using swab.c


# 1.10 17-Sep-1993 phil

pc532 specifics.


# 1.9 01-Aug-1993 mycroft

Add RCS identifiers.


Revision tags: netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base
# 1.8 17-Jun-1993 jtc

Add i386 assembly versions of bcmp & memcmp


# 1.7 17-Jun-1993 jtc

enable memset & memchr.


# 1.6 16-Jun-1993 mycroft

Actually, just make memcpy() an alias for memmove().


# 1.5 16-Jun-1993 mycroft

Oops. Forgot to update the Makefile.


# 1.4 16-Jun-1993 jtc

Added i386 assembly language versions of ffs, strcat, strcpy, and strlen.


# 1.3 15-Jun-1993 jtc

Added fast strcmp() and strncmp() routines.


# 1.2 07-May-1993 cgd

add assembly language version of index, rindex, strchr, and strrchr
supplied by J.T. Conklin <conklin@kaleida.com>


# 1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision


# 1.87 01-Aug-2023 christos

Add companion mempcpy to wmempcpy, bump.


# 1.86 31-Jul-2023 christos

new gdb needs wmempcpy, give it to it.


Revision tags: netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.85 14-Apr-2021 mrg

for GCC, built memset.c with -fno-builtin. this avoids GCC 10 compiling
memset() and emitting calls to memset() where it seems code that looks
like what memset() does, which ends up recursing and blowing the stack.

this makes mips userland with GCC 10 work.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.84 25-Mar-2020 kre

Document strerror_l()

While here also document (but comment it out since it isn't
available - yet) strerror_lr(). To include that, simply
uncomment the relevant lines, and (twice I think) s/returns/return/
on lines just after currently commented out lines (that is, it
currently says, "A returns" after the comments are returned, we
need it to be "A and B return" - the "and B" appears when the comment
markers are removed, removing the 's' from returns must be done manually.

In addition to adding strerror_l() some additional enhancements were
made to the general strerror() doc.


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE is-mlppp-base 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.83 12-Jan-2017 christos

branches: 1.83.14;
Add strerror_ss_r to be used by syslog_ss


Revision tags: pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.82 15-Oct-2016 kamil

Import wcsnlen(3) to libc

The wcsnlen(3) function conforms to POSIX.1-2008 and is an addition to the
ISO C standard.

size_t wcsnlen(const wchar_t *s, size_t maxlen);

The wcsnlen(3) function computes the number of wide-characters in a wide-
-string to which s points, not including NULL terminating wide-character
code and checking no more than maxlen wide-characters. This function never
examines wide-characters beyond a wide-string of maxlen size.


This function is a safer version of wcslen(3):

size_t wcslen(const wchar_t *s);


Update STANDARDS section of wmemchr(3) describing wide-character functions.


# 1.81 12-Oct-2016 christos

add strchrnul


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.80 24-Sep-2014 christos

branches: 1.80.2;
add strnstr from FreeBSD


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 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-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.79 19-Aug-2013 joerg

GC __indr_reference wrappers.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.78 24-Jun-2013 riastradh

Replace consttime_bcmp/explicit_bzero by consttime_memequal/explicit_memset.

consttime_memequal is the same as the old consttime_bcmp.
explicit_memset is to memset as explicit_bzero was to bcmp.

Passes amd64 release and i386/ALL, but I'm sure I missed some spots,
so please let me know.


# 1.77 24-Jun-2013 riastradh

Add consttime_bcmp(3) and explicit_bzero(3) to makefile and set lists.


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.76 30-Aug-2012 drochner

branches: 1.76.2;
Add "consttime_bcmp" and "explicit_bzero" functions for both kernel
abd userland, as proposed on tech-security, with explicit_bzero using
a volatile function pointer as suggested by Alan Barrett.
Both do what the name says. For userland, both are prefixed by "__"
to keep them out of the user namespace.
Change some memset/memcmp uses to the new functions where it makes
sense -- these are just some examples, more to come.


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 cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211
# 1.75 30-Jul-2009 dsl

branches: 1.75.6;
If SRCS contains any .S files then remove the corresponding .c file from
SRCS and add to LSRCS (for lint).
Change the 'string' Makefiles so that the arch/*/string/Makefile.inc
need only specify the .S files for that architecture and not the .c
files for all the files they don't override.


# 1.74 21-Jul-2009 joerg

Move popcount et al to src/common and add popcount32/popcount64.
Requested by rmind@. MD should now override popcount32/popcount64 and
provide the aliases as fitting.


# 1.73 21-Jul-2009 joerg

Add popcount(3) and the long and long long version. Name is inspired by
gnulib, the implementation goes back to the AMD Software Optimizer
guide. A number of platforms will want to replace the C version with
assembler code using native instructions.


# 1.72 18-Jul-2009 dsl

Remove index() and rindex() from the list (in comment)


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.71 01-May-2009 perry

Add versions of stpcpy(3), stpncpy(3), strnlen(3), all from FreeBSD.
These are defined in the latest POSIX

Also make related updates to documentation, mostly from FreeBSD,
though I cleaned a few other things up along the way.

Bump shlib_version.

We are still missing strcoll_l, strerror_l, strsignal, strxfrm_l to be
POSIX conformant.


# 1.70 10-Apr-2009 christos

add memrchr


# 1.69 11-Jan-2009 christos

branches: 1.69.2;
merge christos-time_t


Revision tags: christos-time_t-nbase christos-time_t-base
# 1.68 02-Jan-2009 tnozaki

Fixes PR lib/39662, shortcomings in LC_{MONETARY,NUMERIC,TIME,MESSAGES} db format.
ok'ed by core and releng.
(thanks for agc@, snj@ and i'm sorry for long time patience).

[libc]
- localeio.[ch] and lc*.[ch] in src/lib/libc/locale was replaced by
new locale-db implementation using citrus_db backend,
see src/lib/libc/citrus/citrus_lc_*.[ch].
- add citrus_bcs_strtou?l.c. don't use strtou?l locale implementation
internally, because they're locale-aware function.
- add some stubs for multi-locale issue, see {current,global}_locale.c.
- remove some obsolete file, setrunelocale.c, ___runetype_mb.c.
- remove __savectype() from ctypeio.[ch].

[tools]
- mklocale(1): add new option ``-t'' that generates new style
LC_{MONETARY,NUMERIC,TIME,MESSAGES} locale-db format.
- chrtbl(1): added ctypeio.[ch] for __savectype().

[locale-db]
- added en_US.US-ASCII locale.
- removed some shareable locale definition file:
en_US.US-ASCII -> en_US.ISO8859-1, en_US.UTF-8
zh_CN.eucCN -> zh_CN.GB18030
and more...see src/share/locale/*/Makefile.
- remove obsoleted locale sr_YU, added new locale sr_ME, sr_RS.
- change locale name ja_JP.ISO2022-JP* -> ja_JP.ISO-2022-JP*
for X11's locale.alias file alignments.
- fix regression test, wrong wcs?width(3), NAN/INF usage.

i tested release-build following arch:
i386, amd64, hpc{mips,arm,sh}, sparc64, vax.

citrus_lc_*.[ch] also can read old-plain-text style locale-db.
so that backward compatibility is keeped, but lc*.[ch] can't read
new citrus_db'ed locale-db and localeio.c never check sanity,
so forward compatibility is broken ;-<

old mklocale(1) doesn't know -t option, so you have to rebuild toolchain.


Revision tags: 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 matt-armv6-prevmlocking cube-autoconf-base matt-armv6-base matt-mips64-base hpcarm-cleanup-base
# 1.67 17-Feb-2007 wiz

branches: 1.67.18; 1.67.20;
Add strings(3), collecting information about strings.h.
Add Xr for it to string(3).

XXX: if someone could make a HISTORY section, I'd appreciate it


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase 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 wrstuden-fixsa-base netbsd-4-base
# 1.66 13-Oct-2006 tnozaki

PR/30809 added manpages of wcswcs(3) and wcscoll(3), wcsxfrm(3)
(wcs?width and wprintf are already in repository).


# 1.65 27-Aug-2006 dsl

fix xtos's pasto


# 1.64 26-Aug-2006 christos

PR/34238: Aleksey Cheusov: man pages for wcsdup, wcscasecmp and wcsncasecmp
functions


# 1.63 23-Aug-2006 christos

include one more new file.


# 1.62 22-Aug-2006 christos

PR/34238: Aleksey Cheusov: add wcsdup, wcscasecmp and wcsncasecmp functions


# 1.61 12-Aug-2006 christos

- Add strndup and stresep
- Use stresep so in fstab so that we can mount paths with white space in them.


Revision tags: abandoned-netbsd-4-base
# 1.60 03-Jun-2006 tnozaki

branches: 1.60.2;
fix lib/33476:
added following manpages (derived from FreeBSD),
wcwidth(3) wcswidth(3)
wcstol(3) wcstoll(3) wcstoimax(3)
wcstoul(3) wcstoull(3) wcstoumax(3)
and update doc/TODO.i18n.


# 1.59 20-Dec-2005 christos

Use reach-over sources from common/lib/libc


# 1.58 30-Jul-2005 christos

- Fix the remaining indr_references so that they define lint symbols.
- Add an internal symbol for strerror_r (thanks klaus for noticing)
- Remove internal __strerror


# 1.57 28-Jul-2005 christos

PR/30845: Luke Mewburn: strerror_r(3) missing
- Merge 4.4BSD strerror.3 man page changes that summarize information
for all the error printing functions. This makes the perror(3) page
obsolete.
- Implement all error functions in terms of strerror_r(), including
__strerror() which is not used internally. Can it be removed?
- Bump version for strerror_r


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-3-base
# 1.56 14-Mar-2005 perry

Fix stupid typo. I added memmem, not memmove.


# 1.55 13-Mar-2005 perry

add memmem


# 1.54 03-Jul-2004 junyoung

Add strcasestr(3), case insensitive version of strstr(3).
Bump libc minor.

From FreeBSD.


Revision tags: netbsd-2-0-base
# 1.53 05-Mar-2003 tshiozak

branches: 1.53.2;
changes related to lib/20576 and lib/20577.
- add wcstok() and wcswcs(),
- add wcstok(3),
- move btowc() and wctob() into each ctype modules,
- bump ctype interface ABI version,
- bump i18n modules' minor and
- update sets.
and fix a stupid bug in _RUNE_ISCACHED macro.


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 nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.52 17-Apr-2002 kleink

Need internal names for strlcat() and strlcpy().


# 1.51 24-Dec-2000 itojun

branches: 1.51.2;
split wide char section, just for readability/future possibility for .if


# 1.50 23-Dec-2000 itojun

move wcs* and wmem* from lib/libc/locale to lib/libc/string.


Revision tags: netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
# 1.49 08-Sep-1999 lukem

branches: 1.49.8;
add netbsd rcsid's
update for knf (return value on separate line to function name...)
check dst and src aren't null pointers before trying to use them
enable strlcat/strlcpy


Revision tags: netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.48 24-Feb-1999 drochner

branches: 1.48.2;
use ${ARCHDIR} instead of ${.CURDIR}/arch/${MACHINE_ARCH} where appropriate
libc builds on pmax again


# 1.47 14-Sep-1998 kleink

Install a link for strtok_r(3).


# 1.46 04-Aug-1998 perry

switch bzero to version in memset.c.
bzero.c is now a "#define BZERO//#include memset.c" type file.
Remove comment from Makefile about the fact that this is on the todo list.


# 1.45 04-Aug-1998 perry

Replace complicated and ugly makefile gook to make memmove,memcpy by
-Ding the bcopy.c source (and similarly strchr from index.c, strrchr
from rindex.c) with stub .c files for memmove, memcpy, strchr and
strrchr that simply #define the appropriate thing and #include the
appropriate .c file. Inspired by the way many m-d .S files handle the
same thing. This radically simplifies the Makefile.inc for libc/string
(and libkern).


# 1.44 30-Jan-1998 perry

note that bzero isn't yet being built from memset.c


# 1.43 30-Jan-1998 perry

update to lite-2


# 1.42 23-Jan-1998 cgd

Update various aspects of the special target builds which should
have been done (by others) a long time ago:
* fix PIC compilation to use new PIC flags,
* make them 'make -j N' safe.


# 1.41 22-Oct-1997 lukem

- use CPPFLAGS instead of CFLAGS
- use ${COMPILE.C} ... instead of ${CC} ${CFLAGS} -c ...


Revision tags: netbsd-1-3-base
# 1.40 09-Oct-1997 lukem

branches: 1.40.2;
rcsid police


# 1.39 23-Apr-1997 mrg

move str[fp]time into libc/time.


# 1.38 22-Dec-1996 cgd

add rules to build .ln files (memmove.ln, memcpy.ln, strchr.ln, strrchr.ln)
for objects built specially from other C files, when appropriate.


# 1.37 12-Nov-1996 jtc

Add strtok_r() for reentrant (thread-aware) programs


# 1.36 24-Sep-1996 matthias

Make it possible to have a md version of memccpy.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.35 20-Mar-1995 mycroft

Clarify a comment slightly.


# 1.34 20-Mar-1995 mycroft

Separate machine dependencies.


# 1.33 10-Feb-1995 cgd

list the files needed on the alpha.


# 1.32 22-Dec-1994 cgd

specify man pages the new way.


# 1.31 14-Nov-1994 dean

Include files for pmax


# 1.30 03-Sep-1994 jtc

__strerror() and __strsignal() have been broken out into their own files
and use message catalogs if NLS is defined.
Increased the size of char buffers used by strerror() and strsignal();
the error and signal strings may be much longer in some locales.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE
# 1.29 02-Aug-1994 jtc

branches: 1.29.2;
Add strsignal() function like on Solaris.
We might want to be able to retrieve a locale-specific signal description
(from a message catalog) and we need a function call API for that feature.


Revision tags: netbsd-1-0-base
# 1.28 06-Jul-1994 mycroft

We're supposed to include ${CPPFLAGS} when compiling .c files.


# 1.27 22-Jun-1994 cgd

add Boyer-Moore string search routines, from Bostic. man page
needs to be fixed for mandoc, and RCSID's need to be added.


# 1.26 25-Feb-1994 phil

Changing the ns32k stuff.


# 1.25 10-Dec-1993 mycroft

memcpy.S and memmove.S on i386 are now separate.


# 1.24 08-Dec-1993 mycroft

Add strchr.S and strrchr.S for m68k.


# 1.23 08-Dec-1993 pk

Added some Sparc sources.


# 1.22 07-Dec-1993 mycroft

Also a memcpy.S for m68k.


# 1.21 07-Dec-1993 mycroft

Remove -p flags from .so builds.


# 1.20 06-Dec-1993 mycroft

Add memmove.S to m68k assembler stuff.


# 1.19 06-Dec-1993 mycroft

Use assembler versions of m68k stuff.


# 1.18 06-Dec-1993 cgd

fix things so that memmove.so, et al., are built correctly on
machines w/o architecture-specific sources.


# 1.17 05-Dec-1993 briggs

Changed occurance of MACHINE_ARCH == "hp300" to MACHINE_ARCH == "m68k"


# 1.16 05-Dec-1993 cgd

get pc532 moved into ns32k; that's is MACHINE_ARCH


# 1.15 04-Dec-1993 cgd

update for .S and MACHINE_ARCH


# 1.14 18-Oct-1993 cgd

don't compiler strerror.c source here, and clean up.


# 1.13 07-Oct-1993 jtc

Moved strerror.[c3] from libc/stdio to libc/string.
Since perror is not permitted to change strerror()'s static buffer, I have
changed both functions to pass their own buffers to the new library-internal
function _strerror() that actually does the error message string look up.
Split strerror manpage into strerror and perror manpages.


# 1.12 07-Oct-1993 cgd

make an arch directory in libc, and move all machine dirs into it


# 1.11 05-Oct-1993 jtc

Add swab.c or swab.s, as appropriate, to each machines source list instead
of always using swab.c


# 1.10 17-Sep-1993 phil

pc532 specifics.


# 1.9 01-Aug-1993 mycroft

Add RCS identifiers.


Revision tags: netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base
# 1.8 17-Jun-1993 jtc

Add i386 assembly versions of bcmp & memcmp


# 1.7 17-Jun-1993 jtc

enable memset & memchr.


# 1.6 16-Jun-1993 mycroft

Actually, just make memcpy() an alias for memmove().


# 1.5 16-Jun-1993 mycroft

Oops. Forgot to update the Makefile.


# 1.4 16-Jun-1993 jtc

Added i386 assembly language versions of ffs, strcat, strcpy, and strlen.


# 1.3 15-Jun-1993 jtc

Added fast strcmp() and strncmp() routines.


# 1.2 07-May-1993 cgd

add assembly language version of index, rindex, strchr, and strrchr
supplied by J.T. Conklin <conklin@kaleida.com>


# 1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision


# 1.85 14-Apr-2021 mrg

for GCC, built memset.c with -fno-builtin. this avoids GCC 10 compiling
memset() and emitting calls to memset() where it seems code that looks
like what memset() does, which ends up recursing and blowing the stack.

this makes mips userland with GCC 10 work.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.84 25-Mar-2020 kre

Document strerror_l()

While here also document (but comment it out since it isn't
available - yet) strerror_lr(). To include that, simply
uncomment the relevant lines, and (twice I think) s/returns/return/
on lines just after currently commented out lines (that is, it
currently says, "A returns" after the comments are returned, we
need it to be "A and B return" - the "and B" appears when the comment
markers are removed, removing the 's' from returns must be done manually.

In addition to adding strerror_l() some additional enhancements were
made to the general strerror() doc.


Revision tags: netbsd-9-1-RELEASE is-mlppp-base 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.83 12-Jan-2017 christos

branches: 1.83.14;
Add strerror_ss_r to be used by syslog_ss


Revision tags: pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.82 15-Oct-2016 kamil

Import wcsnlen(3) to libc

The wcsnlen(3) function conforms to POSIX.1-2008 and is an addition to the
ISO C standard.

size_t wcsnlen(const wchar_t *s, size_t maxlen);

The wcsnlen(3) function computes the number of wide-characters in a wide-
-string to which s points, not including NULL terminating wide-character
code and checking no more than maxlen wide-characters. This function never
examines wide-characters beyond a wide-string of maxlen size.


This function is a safer version of wcslen(3):

size_t wcslen(const wchar_t *s);


Update STANDARDS section of wmemchr(3) describing wide-character functions.


# 1.81 12-Oct-2016 christos

add strchrnul


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.80 24-Sep-2014 christos

branches: 1.80.2;
add strnstr from FreeBSD


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 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-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.79 19-Aug-2013 joerg

GC __indr_reference wrappers.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.78 24-Jun-2013 riastradh

Replace consttime_bcmp/explicit_bzero by consttime_memequal/explicit_memset.

consttime_memequal is the same as the old consttime_bcmp.
explicit_memset is to memset as explicit_bzero was to bcmp.

Passes amd64 release and i386/ALL, but I'm sure I missed some spots,
so please let me know.


# 1.77 24-Jun-2013 riastradh

Add consttime_bcmp(3) and explicit_bzero(3) to makefile and set lists.


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.76 30-Aug-2012 drochner

branches: 1.76.2;
Add "consttime_bcmp" and "explicit_bzero" functions for both kernel
abd userland, as proposed on tech-security, with explicit_bzero using
a volatile function pointer as suggested by Alan Barrett.
Both do what the name says. For userland, both are prefixed by "__"
to keep them out of the user namespace.
Change some memset/memcmp uses to the new functions where it makes
sense -- these are just some examples, more to come.


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 cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211
# 1.75 30-Jul-2009 dsl

branches: 1.75.6;
If SRCS contains any .S files then remove the corresponding .c file from
SRCS and add to LSRCS (for lint).
Change the 'string' Makefiles so that the arch/*/string/Makefile.inc
need only specify the .S files for that architecture and not the .c
files for all the files they don't override.


# 1.74 21-Jul-2009 joerg

Move popcount et al to src/common and add popcount32/popcount64.
Requested by rmind@. MD should now override popcount32/popcount64 and
provide the aliases as fitting.


# 1.73 21-Jul-2009 joerg

Add popcount(3) and the long and long long version. Name is inspired by
gnulib, the implementation goes back to the AMD Software Optimizer
guide. A number of platforms will want to replace the C version with
assembler code using native instructions.


# 1.72 18-Jul-2009 dsl

Remove index() and rindex() from the list (in comment)


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.71 01-May-2009 perry

Add versions of stpcpy(3), stpncpy(3), strnlen(3), all from FreeBSD.
These are defined in the latest POSIX

Also make related updates to documentation, mostly from FreeBSD,
though I cleaned a few other things up along the way.

Bump shlib_version.

We are still missing strcoll_l, strerror_l, strsignal, strxfrm_l to be
POSIX conformant.


# 1.70 10-Apr-2009 christos

add memrchr


# 1.69 11-Jan-2009 christos

branches: 1.69.2;
merge christos-time_t


Revision tags: christos-time_t-nbase christos-time_t-base
# 1.68 02-Jan-2009 tnozaki

Fixes PR lib/39662, shortcomings in LC_{MONETARY,NUMERIC,TIME,MESSAGES} db format.
ok'ed by core and releng.
(thanks for agc@, snj@ and i'm sorry for long time patience).

[libc]
- localeio.[ch] and lc*.[ch] in src/lib/libc/locale was replaced by
new locale-db implementation using citrus_db backend,
see src/lib/libc/citrus/citrus_lc_*.[ch].
- add citrus_bcs_strtou?l.c. don't use strtou?l locale implementation
internally, because they're locale-aware function.
- add some stubs for multi-locale issue, see {current,global}_locale.c.
- remove some obsolete file, setrunelocale.c, ___runetype_mb.c.
- remove __savectype() from ctypeio.[ch].

[tools]
- mklocale(1): add new option ``-t'' that generates new style
LC_{MONETARY,NUMERIC,TIME,MESSAGES} locale-db format.
- chrtbl(1): added ctypeio.[ch] for __savectype().

[locale-db]
- added en_US.US-ASCII locale.
- removed some shareable locale definition file:
en_US.US-ASCII -> en_US.ISO8859-1, en_US.UTF-8
zh_CN.eucCN -> zh_CN.GB18030
and more...see src/share/locale/*/Makefile.
- remove obsoleted locale sr_YU, added new locale sr_ME, sr_RS.
- change locale name ja_JP.ISO2022-JP* -> ja_JP.ISO-2022-JP*
for X11's locale.alias file alignments.
- fix regression test, wrong wcs?width(3), NAN/INF usage.

i tested release-build following arch:
i386, amd64, hpc{mips,arm,sh}, sparc64, vax.

citrus_lc_*.[ch] also can read old-plain-text style locale-db.
so that backward compatibility is keeped, but lc*.[ch] can't read
new citrus_db'ed locale-db and localeio.c never check sanity,
so forward compatibility is broken ;-<

old mklocale(1) doesn't know -t option, so you have to rebuild toolchain.


Revision tags: 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 matt-armv6-prevmlocking cube-autoconf-base matt-armv6-base matt-mips64-base hpcarm-cleanup-base
# 1.67 17-Feb-2007 wiz

branches: 1.67.18; 1.67.20;
Add strings(3), collecting information about strings.h.
Add Xr for it to string(3).

XXX: if someone could make a HISTORY section, I'd appreciate it


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase 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 wrstuden-fixsa-base netbsd-4-base
# 1.66 13-Oct-2006 tnozaki

PR/30809 added manpages of wcswcs(3) and wcscoll(3), wcsxfrm(3)
(wcs?width and wprintf are already in repository).


# 1.65 27-Aug-2006 dsl

fix xtos's pasto


# 1.64 26-Aug-2006 christos

PR/34238: Aleksey Cheusov: man pages for wcsdup, wcscasecmp and wcsncasecmp
functions


# 1.63 23-Aug-2006 christos

include one more new file.


# 1.62 22-Aug-2006 christos

PR/34238: Aleksey Cheusov: add wcsdup, wcscasecmp and wcsncasecmp functions


# 1.61 12-Aug-2006 christos

- Add strndup and stresep
- Use stresep so in fstab so that we can mount paths with white space in them.


Revision tags: abandoned-netbsd-4-base
# 1.60 03-Jun-2006 tnozaki

branches: 1.60.2;
fix lib/33476:
added following manpages (derived from FreeBSD),
wcwidth(3) wcswidth(3)
wcstol(3) wcstoll(3) wcstoimax(3)
wcstoul(3) wcstoull(3) wcstoumax(3)
and update doc/TODO.i18n.


# 1.59 20-Dec-2005 christos

Use reach-over sources from common/lib/libc


# 1.58 30-Jul-2005 christos

- Fix the remaining indr_references so that they define lint symbols.
- Add an internal symbol for strerror_r (thanks klaus for noticing)
- Remove internal __strerror


# 1.57 28-Jul-2005 christos

PR/30845: Luke Mewburn: strerror_r(3) missing
- Merge 4.4BSD strerror.3 man page changes that summarize information
for all the error printing functions. This makes the perror(3) page
obsolete.
- Implement all error functions in terms of strerror_r(), including
__strerror() which is not used internally. Can it be removed?
- Bump version for strerror_r


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-3-base
# 1.56 14-Mar-2005 perry

Fix stupid typo. I added memmem, not memmove.


# 1.55 13-Mar-2005 perry

add memmem


# 1.54 03-Jul-2004 junyoung

Add strcasestr(3), case insensitive version of strstr(3).
Bump libc minor.

From FreeBSD.


Revision tags: netbsd-2-0-base
# 1.53 05-Mar-2003 tshiozak

branches: 1.53.2;
changes related to lib/20576 and lib/20577.
- add wcstok() and wcswcs(),
- add wcstok(3),
- move btowc() and wctob() into each ctype modules,
- bump ctype interface ABI version,
- bump i18n modules' minor and
- update sets.
and fix a stupid bug in _RUNE_ISCACHED macro.


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 nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.52 17-Apr-2002 kleink

Need internal names for strlcat() and strlcpy().


# 1.51 24-Dec-2000 itojun

branches: 1.51.2;
split wide char section, just for readability/future possibility for .if


# 1.50 23-Dec-2000 itojun

move wcs* and wmem* from lib/libc/locale to lib/libc/string.


Revision tags: netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
# 1.49 08-Sep-1999 lukem

branches: 1.49.8;
add netbsd rcsid's
update for knf (return value on separate line to function name...)
check dst and src aren't null pointers before trying to use them
enable strlcat/strlcpy


Revision tags: netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.48 24-Feb-1999 drochner

branches: 1.48.2;
use ${ARCHDIR} instead of ${.CURDIR}/arch/${MACHINE_ARCH} where appropriate
libc builds on pmax again


# 1.47 14-Sep-1998 kleink

Install a link for strtok_r(3).


# 1.46 04-Aug-1998 perry

switch bzero to version in memset.c.
bzero.c is now a "#define BZERO//#include memset.c" type file.
Remove comment from Makefile about the fact that this is on the todo list.


# 1.45 04-Aug-1998 perry

Replace complicated and ugly makefile gook to make memmove,memcpy by
-Ding the bcopy.c source (and similarly strchr from index.c, strrchr
from rindex.c) with stub .c files for memmove, memcpy, strchr and
strrchr that simply #define the appropriate thing and #include the
appropriate .c file. Inspired by the way many m-d .S files handle the
same thing. This radically simplifies the Makefile.inc for libc/string
(and libkern).


# 1.44 30-Jan-1998 perry

note that bzero isn't yet being built from memset.c


# 1.43 30-Jan-1998 perry

update to lite-2


# 1.42 23-Jan-1998 cgd

Update various aspects of the special target builds which should
have been done (by others) a long time ago:
* fix PIC compilation to use new PIC flags,
* make them 'make -j N' safe.


# 1.41 22-Oct-1997 lukem

- use CPPFLAGS instead of CFLAGS
- use ${COMPILE.C} ... instead of ${CC} ${CFLAGS} -c ...


Revision tags: netbsd-1-3-base
# 1.40 09-Oct-1997 lukem

branches: 1.40.2;
rcsid police


# 1.39 23-Apr-1997 mrg

move str[fp]time into libc/time.


# 1.38 22-Dec-1996 cgd

add rules to build .ln files (memmove.ln, memcpy.ln, strchr.ln, strrchr.ln)
for objects built specially from other C files, when appropriate.


# 1.37 12-Nov-1996 jtc

Add strtok_r() for reentrant (thread-aware) programs


# 1.36 24-Sep-1996 matthias

Make it possible to have a md version of memccpy.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.35 20-Mar-1995 mycroft

Clarify a comment slightly.


# 1.34 20-Mar-1995 mycroft

Separate machine dependencies.


# 1.33 10-Feb-1995 cgd

list the files needed on the alpha.


# 1.32 22-Dec-1994 cgd

specify man pages the new way.


# 1.31 14-Nov-1994 dean

Include files for pmax


# 1.30 03-Sep-1994 jtc

__strerror() and __strsignal() have been broken out into their own files
and use message catalogs if NLS is defined.
Increased the size of char buffers used by strerror() and strsignal();
the error and signal strings may be much longer in some locales.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE
# 1.29 02-Aug-1994 jtc

branches: 1.29.2;
Add strsignal() function like on Solaris.
We might want to be able to retrieve a locale-specific signal description
(from a message catalog) and we need a function call API for that feature.


Revision tags: netbsd-1-0-base
# 1.28 06-Jul-1994 mycroft

We're supposed to include ${CPPFLAGS} when compiling .c files.


# 1.27 22-Jun-1994 cgd

add Boyer-Moore string search routines, from Bostic. man page
needs to be fixed for mandoc, and RCSID's need to be added.


# 1.26 25-Feb-1994 phil

Changing the ns32k stuff.


# 1.25 10-Dec-1993 mycroft

memcpy.S and memmove.S on i386 are now separate.


# 1.24 08-Dec-1993 mycroft

Add strchr.S and strrchr.S for m68k.


# 1.23 08-Dec-1993 pk

Added some Sparc sources.


# 1.22 07-Dec-1993 mycroft

Also a memcpy.S for m68k.


# 1.21 07-Dec-1993 mycroft

Remove -p flags from .so builds.


# 1.20 06-Dec-1993 mycroft

Add memmove.S to m68k assembler stuff.


# 1.19 06-Dec-1993 mycroft

Use assembler versions of m68k stuff.


# 1.18 06-Dec-1993 cgd

fix things so that memmove.so, et al., are built correctly on
machines w/o architecture-specific sources.


# 1.17 05-Dec-1993 briggs

Changed occurance of MACHINE_ARCH == "hp300" to MACHINE_ARCH == "m68k"


# 1.16 05-Dec-1993 cgd

get pc532 moved into ns32k; that's is MACHINE_ARCH


# 1.15 04-Dec-1993 cgd

update for .S and MACHINE_ARCH


# 1.14 18-Oct-1993 cgd

don't compiler strerror.c source here, and clean up.


# 1.13 07-Oct-1993 jtc

Moved strerror.[c3] from libc/stdio to libc/string.
Since perror is not permitted to change strerror()'s static buffer, I have
changed both functions to pass their own buffers to the new library-internal
function _strerror() that actually does the error message string look up.
Split strerror manpage into strerror and perror manpages.


# 1.12 07-Oct-1993 cgd

make an arch directory in libc, and move all machine dirs into it


# 1.11 05-Oct-1993 jtc

Add swab.c or swab.s, as appropriate, to each machines source list instead
of always using swab.c


# 1.10 17-Sep-1993 phil

pc532 specifics.


# 1.9 01-Aug-1993 mycroft

Add RCS identifiers.


Revision tags: netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base
# 1.8 17-Jun-1993 jtc

Add i386 assembly versions of bcmp & memcmp


# 1.7 17-Jun-1993 jtc

enable memset & memchr.


# 1.6 16-Jun-1993 mycroft

Actually, just make memcpy() an alias for memmove().


# 1.5 16-Jun-1993 mycroft

Oops. Forgot to update the Makefile.


# 1.4 16-Jun-1993 jtc

Added i386 assembly language versions of ffs, strcat, strcpy, and strlen.


# 1.3 15-Jun-1993 jtc

Added fast strcmp() and strncmp() routines.


# 1.2 07-May-1993 cgd

add assembly language version of index, rindex, strchr, and strrchr
supplied by J.T. Conklin <conklin@kaleida.com>


# 1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision


# 1.84 25-Mar-2020 kre

Document strerror_l()

While here also document (but comment it out since it isn't
available - yet) strerror_lr(). To include that, simply
uncomment the relevant lines, and (twice I think) s/returns/return/
on lines just after currently commented out lines (that is, it
currently says, "A returns" after the comments are returned, we
need it to be "A and B return" - the "and B" appears when the comment
markers are removed, removing the 's' from returns must be done manually.

In addition to adding strerror_l() some additional enhancements were
made to the general strerror() doc.


Revision tags: 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.83 12-Jan-2017 christos

Add strerror_ss_r to be used by syslog_ss


Revision tags: pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.82 15-Oct-2016 kamil

Import wcsnlen(3) to libc

The wcsnlen(3) function conforms to POSIX.1-2008 and is an addition to the
ISO C standard.

size_t wcsnlen(const wchar_t *s, size_t maxlen);

The wcsnlen(3) function computes the number of wide-characters in a wide-
-string to which s points, not including NULL terminating wide-character
code and checking no more than maxlen wide-characters. This function never
examines wide-characters beyond a wide-string of maxlen size.


This function is a safer version of wcslen(3):

size_t wcslen(const wchar_t *s);


Update STANDARDS section of wmemchr(3) describing wide-character functions.


# 1.81 12-Oct-2016 christos

add strchrnul


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.80 24-Sep-2014 christos

branches: 1.80.2;
add strnstr from FreeBSD


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 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-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.79 19-Aug-2013 joerg

GC __indr_reference wrappers.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.78 24-Jun-2013 riastradh

Replace consttime_bcmp/explicit_bzero by consttime_memequal/explicit_memset.

consttime_memequal is the same as the old consttime_bcmp.
explicit_memset is to memset as explicit_bzero was to bcmp.

Passes amd64 release and i386/ALL, but I'm sure I missed some spots,
so please let me know.


# 1.77 24-Jun-2013 riastradh

Add consttime_bcmp(3) and explicit_bzero(3) to makefile and set lists.


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.76 30-Aug-2012 drochner

branches: 1.76.2;
Add "consttime_bcmp" and "explicit_bzero" functions for both kernel
abd userland, as proposed on tech-security, with explicit_bzero using
a volatile function pointer as suggested by Alan Barrett.
Both do what the name says. For userland, both are prefixed by "__"
to keep them out of the user namespace.
Change some memset/memcmp uses to the new functions where it makes
sense -- these are just some examples, more to come.


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 cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211
# 1.75 30-Jul-2009 dsl

branches: 1.75.6;
If SRCS contains any .S files then remove the corresponding .c file from
SRCS and add to LSRCS (for lint).
Change the 'string' Makefiles so that the arch/*/string/Makefile.inc
need only specify the .S files for that architecture and not the .c
files for all the files they don't override.


# 1.74 21-Jul-2009 joerg

Move popcount et al to src/common and add popcount32/popcount64.
Requested by rmind@. MD should now override popcount32/popcount64 and
provide the aliases as fitting.


# 1.73 21-Jul-2009 joerg

Add popcount(3) and the long and long long version. Name is inspired by
gnulib, the implementation goes back to the AMD Software Optimizer
guide. A number of platforms will want to replace the C version with
assembler code using native instructions.


# 1.72 18-Jul-2009 dsl

Remove index() and rindex() from the list (in comment)


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.71 01-May-2009 perry

Add versions of stpcpy(3), stpncpy(3), strnlen(3), all from FreeBSD.
These are defined in the latest POSIX

Also make related updates to documentation, mostly from FreeBSD,
though I cleaned a few other things up along the way.

Bump shlib_version.

We are still missing strcoll_l, strerror_l, strsignal, strxfrm_l to be
POSIX conformant.


# 1.70 10-Apr-2009 christos

add memrchr


# 1.69 11-Jan-2009 christos

branches: 1.69.2;
merge christos-time_t


Revision tags: christos-time_t-nbase christos-time_t-base
# 1.68 02-Jan-2009 tnozaki

Fixes PR lib/39662, shortcomings in LC_{MONETARY,NUMERIC,TIME,MESSAGES} db format.
ok'ed by core and releng.
(thanks for agc@, snj@ and i'm sorry for long time patience).

[libc]
- localeio.[ch] and lc*.[ch] in src/lib/libc/locale was replaced by
new locale-db implementation using citrus_db backend,
see src/lib/libc/citrus/citrus_lc_*.[ch].
- add citrus_bcs_strtou?l.c. don't use strtou?l locale implementation
internally, because they're locale-aware function.
- add some stubs for multi-locale issue, see {current,global}_locale.c.
- remove some obsolete file, setrunelocale.c, ___runetype_mb.c.
- remove __savectype() from ctypeio.[ch].

[tools]
- mklocale(1): add new option ``-t'' that generates new style
LC_{MONETARY,NUMERIC,TIME,MESSAGES} locale-db format.
- chrtbl(1): added ctypeio.[ch] for __savectype().

[locale-db]
- added en_US.US-ASCII locale.
- removed some shareable locale definition file:
en_US.US-ASCII -> en_US.ISO8859-1, en_US.UTF-8
zh_CN.eucCN -> zh_CN.GB18030
and more...see src/share/locale/*/Makefile.
- remove obsoleted locale sr_YU, added new locale sr_ME, sr_RS.
- change locale name ja_JP.ISO2022-JP* -> ja_JP.ISO-2022-JP*
for X11's locale.alias file alignments.
- fix regression test, wrong wcs?width(3), NAN/INF usage.

i tested release-build following arch:
i386, amd64, hpc{mips,arm,sh}, sparc64, vax.

citrus_lc_*.[ch] also can read old-plain-text style locale-db.
so that backward compatibility is keeped, but lc*.[ch] can't read
new citrus_db'ed locale-db and localeio.c never check sanity,
so forward compatibility is broken ;-<

old mklocale(1) doesn't know -t option, so you have to rebuild toolchain.


Revision tags: 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 matt-armv6-prevmlocking cube-autoconf-base matt-armv6-base matt-mips64-base hpcarm-cleanup-base
# 1.67 17-Feb-2007 wiz

branches: 1.67.18; 1.67.20;
Add strings(3), collecting information about strings.h.
Add Xr for it to string(3).

XXX: if someone could make a HISTORY section, I'd appreciate it


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase 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 wrstuden-fixsa-base netbsd-4-base
# 1.66 13-Oct-2006 tnozaki

PR/30809 added manpages of wcswcs(3) and wcscoll(3), wcsxfrm(3)
(wcs?width and wprintf are already in repository).


# 1.65 27-Aug-2006 dsl

fix xtos's pasto


# 1.64 26-Aug-2006 christos

PR/34238: Aleksey Cheusov: man pages for wcsdup, wcscasecmp and wcsncasecmp
functions


# 1.63 23-Aug-2006 christos

include one more new file.


# 1.62 22-Aug-2006 christos

PR/34238: Aleksey Cheusov: add wcsdup, wcscasecmp and wcsncasecmp functions


# 1.61 12-Aug-2006 christos

- Add strndup and stresep
- Use stresep so in fstab so that we can mount paths with white space in them.


Revision tags: abandoned-netbsd-4-base
# 1.60 03-Jun-2006 tnozaki

branches: 1.60.2;
fix lib/33476:
added following manpages (derived from FreeBSD),
wcwidth(3) wcswidth(3)
wcstol(3) wcstoll(3) wcstoimax(3)
wcstoul(3) wcstoull(3) wcstoumax(3)
and update doc/TODO.i18n.


# 1.59 20-Dec-2005 christos

Use reach-over sources from common/lib/libc


# 1.58 30-Jul-2005 christos

- Fix the remaining indr_references so that they define lint symbols.
- Add an internal symbol for strerror_r (thanks klaus for noticing)
- Remove internal __strerror


# 1.57 28-Jul-2005 christos

PR/30845: Luke Mewburn: strerror_r(3) missing
- Merge 4.4BSD strerror.3 man page changes that summarize information
for all the error printing functions. This makes the perror(3) page
obsolete.
- Implement all error functions in terms of strerror_r(), including
__strerror() which is not used internally. Can it be removed?
- Bump version for strerror_r


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-3-base
# 1.56 14-Mar-2005 perry

Fix stupid typo. I added memmem, not memmove.


# 1.55 13-Mar-2005 perry

add memmem


# 1.54 03-Jul-2004 junyoung

Add strcasestr(3), case insensitive version of strstr(3).
Bump libc minor.

From FreeBSD.


Revision tags: netbsd-2-0-base
# 1.53 05-Mar-2003 tshiozak

branches: 1.53.2;
changes related to lib/20576 and lib/20577.
- add wcstok() and wcswcs(),
- add wcstok(3),
- move btowc() and wctob() into each ctype modules,
- bump ctype interface ABI version,
- bump i18n modules' minor and
- update sets.
and fix a stupid bug in _RUNE_ISCACHED macro.


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 nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.52 17-Apr-2002 kleink

Need internal names for strlcat() and strlcpy().


# 1.51 24-Dec-2000 itojun

branches: 1.51.2;
split wide char section, just for readability/future possibility for .if


# 1.50 23-Dec-2000 itojun

move wcs* and wmem* from lib/libc/locale to lib/libc/string.


Revision tags: netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
# 1.49 08-Sep-1999 lukem

branches: 1.49.8;
add netbsd rcsid's
update for knf (return value on separate line to function name...)
check dst and src aren't null pointers before trying to use them
enable strlcat/strlcpy


Revision tags: netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.48 24-Feb-1999 drochner

branches: 1.48.2;
use ${ARCHDIR} instead of ${.CURDIR}/arch/${MACHINE_ARCH} where appropriate
libc builds on pmax again


# 1.47 14-Sep-1998 kleink

Install a link for strtok_r(3).


# 1.46 04-Aug-1998 perry

switch bzero to version in memset.c.
bzero.c is now a "#define BZERO//#include memset.c" type file.
Remove comment from Makefile about the fact that this is on the todo list.


# 1.45 04-Aug-1998 perry

Replace complicated and ugly makefile gook to make memmove,memcpy by
-Ding the bcopy.c source (and similarly strchr from index.c, strrchr
from rindex.c) with stub .c files for memmove, memcpy, strchr and
strrchr that simply #define the appropriate thing and #include the
appropriate .c file. Inspired by the way many m-d .S files handle the
same thing. This radically simplifies the Makefile.inc for libc/string
(and libkern).


# 1.44 30-Jan-1998 perry

note that bzero isn't yet being built from memset.c


# 1.43 30-Jan-1998 perry

update to lite-2


# 1.42 23-Jan-1998 cgd

Update various aspects of the special target builds which should
have been done (by others) a long time ago:
* fix PIC compilation to use new PIC flags,
* make them 'make -j N' safe.


# 1.41 22-Oct-1997 lukem

- use CPPFLAGS instead of CFLAGS
- use ${COMPILE.C} ... instead of ${CC} ${CFLAGS} -c ...


Revision tags: netbsd-1-3-base
# 1.40 09-Oct-1997 lukem

branches: 1.40.2;
rcsid police


# 1.39 23-Apr-1997 mrg

move str[fp]time into libc/time.


# 1.38 22-Dec-1996 cgd

add rules to build .ln files (memmove.ln, memcpy.ln, strchr.ln, strrchr.ln)
for objects built specially from other C files, when appropriate.


# 1.37 12-Nov-1996 jtc

Add strtok_r() for reentrant (thread-aware) programs


# 1.36 24-Sep-1996 matthias

Make it possible to have a md version of memccpy.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.35 20-Mar-1995 mycroft

Clarify a comment slightly.


# 1.34 20-Mar-1995 mycroft

Separate machine dependencies.


# 1.33 10-Feb-1995 cgd

list the files needed on the alpha.


# 1.32 22-Dec-1994 cgd

specify man pages the new way.


# 1.31 14-Nov-1994 dean

Include files for pmax


# 1.30 03-Sep-1994 jtc

__strerror() and __strsignal() have been broken out into their own files
and use message catalogs if NLS is defined.
Increased the size of char buffers used by strerror() and strsignal();
the error and signal strings may be much longer in some locales.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE
# 1.29 02-Aug-1994 jtc

branches: 1.29.2;
Add strsignal() function like on Solaris.
We might want to be able to retrieve a locale-specific signal description
(from a message catalog) and we need a function call API for that feature.


Revision tags: netbsd-1-0-base
# 1.28 06-Jul-1994 mycroft

We're supposed to include ${CPPFLAGS} when compiling .c files.


# 1.27 22-Jun-1994 cgd

add Boyer-Moore string search routines, from Bostic. man page
needs to be fixed for mandoc, and RCSID's need to be added.


# 1.26 25-Feb-1994 phil

Changing the ns32k stuff.


# 1.25 10-Dec-1993 mycroft

memcpy.S and memmove.S on i386 are now separate.


# 1.24 08-Dec-1993 mycroft

Add strchr.S and strrchr.S for m68k.


# 1.23 08-Dec-1993 pk

Added some Sparc sources.


# 1.22 07-Dec-1993 mycroft

Also a memcpy.S for m68k.


# 1.21 07-Dec-1993 mycroft

Remove -p flags from .so builds.


# 1.20 06-Dec-1993 mycroft

Add memmove.S to m68k assembler stuff.


# 1.19 06-Dec-1993 mycroft

Use assembler versions of m68k stuff.


# 1.18 06-Dec-1993 cgd

fix things so that memmove.so, et al., are built correctly on
machines w/o architecture-specific sources.


# 1.17 05-Dec-1993 briggs

Changed occurance of MACHINE_ARCH == "hp300" to MACHINE_ARCH == "m68k"


# 1.16 05-Dec-1993 cgd

get pc532 moved into ns32k; that's is MACHINE_ARCH


# 1.15 04-Dec-1993 cgd

update for .S and MACHINE_ARCH


# 1.14 18-Oct-1993 cgd

don't compiler strerror.c source here, and clean up.


# 1.13 07-Oct-1993 jtc

Moved strerror.[c3] from libc/stdio to libc/string.
Since perror is not permitted to change strerror()'s static buffer, I have
changed both functions to pass their own buffers to the new library-internal
function _strerror() that actually does the error message string look up.
Split strerror manpage into strerror and perror manpages.


# 1.12 07-Oct-1993 cgd

make an arch directory in libc, and move all machine dirs into it


# 1.11 05-Oct-1993 jtc

Add swab.c or swab.s, as appropriate, to each machines source list instead
of always using swab.c


# 1.10 17-Sep-1993 phil

pc532 specifics.


# 1.9 01-Aug-1993 mycroft

Add RCS identifiers.


Revision tags: netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base
# 1.8 17-Jun-1993 jtc

Add i386 assembly versions of bcmp & memcmp


# 1.7 17-Jun-1993 jtc

enable memset & memchr.


# 1.6 16-Jun-1993 mycroft

Actually, just make memcpy() an alias for memmove().


# 1.5 16-Jun-1993 mycroft

Oops. Forgot to update the Makefile.


# 1.4 16-Jun-1993 jtc

Added i386 assembly language versions of ffs, strcat, strcpy, and strlen.


# 1.3 15-Jun-1993 jtc

Added fast strcmp() and strncmp() routines.


# 1.2 07-May-1993 cgd

add assembly language version of index, rindex, strchr, and strrchr
supplied by J.T. Conklin <conklin@kaleida.com>


# 1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision


# 1.83 12-Jan-2017 christos

Add strerror_ss_r to be used by syslog_ss


Revision tags: pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.82 15-Oct-2016 kamil

Import wcsnlen(3) to libc

The wcsnlen(3) function conforms to POSIX.1-2008 and is an addition to the
ISO C standard.

size_t wcsnlen(const wchar_t *s, size_t maxlen);

The wcsnlen(3) function computes the number of wide-characters in a wide-
-string to which s points, not including NULL terminating wide-character
code and checking no more than maxlen wide-characters. This function never
examines wide-characters beyond a wide-string of maxlen size.


This function is a safer version of wcslen(3):

size_t wcslen(const wchar_t *s);


Update STANDARDS section of wmemchr(3) describing wide-character functions.


# 1.81 12-Oct-2016 christos

add strchrnul


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.80 24-Sep-2014 christos

branches: 1.80.2;
add strnstr from FreeBSD


Revision tags: netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-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.79 19-Aug-2013 joerg

GC __indr_reference wrappers.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.78 24-Jun-2013 riastradh

Replace consttime_bcmp/explicit_bzero by consttime_memequal/explicit_memset.

consttime_memequal is the same as the old consttime_bcmp.
explicit_memset is to memset as explicit_bzero was to bcmp.

Passes amd64 release and i386/ALL, but I'm sure I missed some spots,
so please let me know.


# 1.77 24-Jun-2013 riastradh

Add consttime_bcmp(3) and explicit_bzero(3) to makefile and set lists.


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.76 30-Aug-2012 drochner

branches: 1.76.2;
Add "consttime_bcmp" and "explicit_bzero" functions for both kernel
abd userland, as proposed on tech-security, with explicit_bzero using
a volatile function pointer as suggested by Alan Barrett.
Both do what the name says. For userland, both are prefixed by "__"
to keep them out of the user namespace.
Change some memset/memcmp uses to the new functions where it makes
sense -- these are just some examples, more to come.


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 cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211
# 1.75 30-Jul-2009 dsl

branches: 1.75.6;
If SRCS contains any .S files then remove the corresponding .c file from
SRCS and add to LSRCS (for lint).
Change the 'string' Makefiles so that the arch/*/string/Makefile.inc
need only specify the .S files for that architecture and not the .c
files for all the files they don't override.


# 1.74 21-Jul-2009 joerg

Move popcount et al to src/common and add popcount32/popcount64.
Requested by rmind@. MD should now override popcount32/popcount64 and
provide the aliases as fitting.


# 1.73 21-Jul-2009 joerg

Add popcount(3) and the long and long long version. Name is inspired by
gnulib, the implementation goes back to the AMD Software Optimizer
guide. A number of platforms will want to replace the C version with
assembler code using native instructions.


# 1.72 18-Jul-2009 dsl

Remove index() and rindex() from the list (in comment)


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.71 01-May-2009 perry

Add versions of stpcpy(3), stpncpy(3), strnlen(3), all from FreeBSD.
These are defined in the latest POSIX

Also make related updates to documentation, mostly from FreeBSD,
though I cleaned a few other things up along the way.

Bump shlib_version.

We are still missing strcoll_l, strerror_l, strsignal, strxfrm_l to be
POSIX conformant.


# 1.70 10-Apr-2009 christos

add memrchr


# 1.69 11-Jan-2009 christos

branches: 1.69.2;
merge christos-time_t


Revision tags: christos-time_t-nbase christos-time_t-base
# 1.68 02-Jan-2009 tnozaki

Fixes PR lib/39662, shortcomings in LC_{MONETARY,NUMERIC,TIME,MESSAGES} db format.
ok'ed by core and releng.
(thanks for agc@, snj@ and i'm sorry for long time patience).

[libc]
- localeio.[ch] and lc*.[ch] in src/lib/libc/locale was replaced by
new locale-db implementation using citrus_db backend,
see src/lib/libc/citrus/citrus_lc_*.[ch].
- add citrus_bcs_strtou?l.c. don't use strtou?l locale implementation
internally, because they're locale-aware function.
- add some stubs for multi-locale issue, see {current,global}_locale.c.
- remove some obsolete file, setrunelocale.c, ___runetype_mb.c.
- remove __savectype() from ctypeio.[ch].

[tools]
- mklocale(1): add new option ``-t'' that generates new style
LC_{MONETARY,NUMERIC,TIME,MESSAGES} locale-db format.
- chrtbl(1): added ctypeio.[ch] for __savectype().

[locale-db]
- added en_US.US-ASCII locale.
- removed some shareable locale definition file:
en_US.US-ASCII -> en_US.ISO8859-1, en_US.UTF-8
zh_CN.eucCN -> zh_CN.GB18030
and more...see src/share/locale/*/Makefile.
- remove obsoleted locale sr_YU, added new locale sr_ME, sr_RS.
- change locale name ja_JP.ISO2022-JP* -> ja_JP.ISO-2022-JP*
for X11's locale.alias file alignments.
- fix regression test, wrong wcs?width(3), NAN/INF usage.

i tested release-build following arch:
i386, amd64, hpc{mips,arm,sh}, sparc64, vax.

citrus_lc_*.[ch] also can read old-plain-text style locale-db.
so that backward compatibility is keeped, but lc*.[ch] can't read
new citrus_db'ed locale-db and localeio.c never check sanity,
so forward compatibility is broken ;-<

old mklocale(1) doesn't know -t option, so you have to rebuild toolchain.


Revision tags: 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 matt-armv6-prevmlocking cube-autoconf-base matt-armv6-base matt-mips64-base hpcarm-cleanup-base
# 1.67 17-Feb-2007 wiz

branches: 1.67.18; 1.67.20;
Add strings(3), collecting information about strings.h.
Add Xr for it to string(3).

XXX: if someone could make a HISTORY section, I'd appreciate it


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase 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 wrstuden-fixsa-base netbsd-4-base
# 1.66 13-Oct-2006 tnozaki

PR/30809 added manpages of wcswcs(3) and wcscoll(3), wcsxfrm(3)
(wcs?width and wprintf are already in repository).


# 1.65 27-Aug-2006 dsl

fix xtos's pasto


# 1.64 26-Aug-2006 christos

PR/34238: Aleksey Cheusov: man pages for wcsdup, wcscasecmp and wcsncasecmp
functions


# 1.63 23-Aug-2006 christos

include one more new file.


# 1.62 22-Aug-2006 christos

PR/34238: Aleksey Cheusov: add wcsdup, wcscasecmp and wcsncasecmp functions


# 1.61 12-Aug-2006 christos

- Add strndup and stresep
- Use stresep so in fstab so that we can mount paths with white space in them.


Revision tags: abandoned-netbsd-4-base
# 1.60 03-Jun-2006 tnozaki

branches: 1.60.2;
fix lib/33476:
added following manpages (derived from FreeBSD),
wcwidth(3) wcswidth(3)
wcstol(3) wcstoll(3) wcstoimax(3)
wcstoul(3) wcstoull(3) wcstoumax(3)
and update doc/TODO.i18n.


# 1.59 20-Dec-2005 christos

Use reach-over sources from common/lib/libc


# 1.58 30-Jul-2005 christos

- Fix the remaining indr_references so that they define lint symbols.
- Add an internal symbol for strerror_r (thanks klaus for noticing)
- Remove internal __strerror


# 1.57 28-Jul-2005 christos

PR/30845: Luke Mewburn: strerror_r(3) missing
- Merge 4.4BSD strerror.3 man page changes that summarize information
for all the error printing functions. This makes the perror(3) page
obsolete.
- Implement all error functions in terms of strerror_r(), including
__strerror() which is not used internally. Can it be removed?
- Bump version for strerror_r


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-3-base
# 1.56 14-Mar-2005 perry

Fix stupid typo. I added memmem, not memmove.


# 1.55 13-Mar-2005 perry

add memmem


# 1.54 03-Jul-2004 junyoung

Add strcasestr(3), case insensitive version of strstr(3).
Bump libc minor.

From FreeBSD.


Revision tags: netbsd-2-0-base
# 1.53 05-Mar-2003 tshiozak

branches: 1.53.2;
changes related to lib/20576 and lib/20577.
- add wcstok() and wcswcs(),
- add wcstok(3),
- move btowc() and wctob() into each ctype modules,
- bump ctype interface ABI version,
- bump i18n modules' minor and
- update sets.
and fix a stupid bug in _RUNE_ISCACHED macro.


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 nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.52 17-Apr-2002 kleink

Need internal names for strlcat() and strlcpy().


# 1.51 24-Dec-2000 itojun

branches: 1.51.2;
split wide char section, just for readability/future possibility for .if


# 1.50 23-Dec-2000 itojun

move wcs* and wmem* from lib/libc/locale to lib/libc/string.


Revision tags: netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
# 1.49 08-Sep-1999 lukem

branches: 1.49.8;
add netbsd rcsid's
update for knf (return value on separate line to function name...)
check dst and src aren't null pointers before trying to use them
enable strlcat/strlcpy


Revision tags: netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.48 24-Feb-1999 drochner

branches: 1.48.2;
use ${ARCHDIR} instead of ${.CURDIR}/arch/${MACHINE_ARCH} where appropriate
libc builds on pmax again


# 1.47 14-Sep-1998 kleink

Install a link for strtok_r(3).


# 1.46 04-Aug-1998 perry

switch bzero to version in memset.c.
bzero.c is now a "#define BZERO//#include memset.c" type file.
Remove comment from Makefile about the fact that this is on the todo list.


# 1.45 04-Aug-1998 perry

Replace complicated and ugly makefile gook to make memmove,memcpy by
-Ding the bcopy.c source (and similarly strchr from index.c, strrchr
from rindex.c) with stub .c files for memmove, memcpy, strchr and
strrchr that simply #define the appropriate thing and #include the
appropriate .c file. Inspired by the way many m-d .S files handle the
same thing. This radically simplifies the Makefile.inc for libc/string
(and libkern).


# 1.44 30-Jan-1998 perry

note that bzero isn't yet being built from memset.c


# 1.43 30-Jan-1998 perry

update to lite-2


# 1.42 23-Jan-1998 cgd

Update various aspects of the special target builds which should
have been done (by others) a long time ago:
* fix PIC compilation to use new PIC flags,
* make them 'make -j N' safe.


# 1.41 22-Oct-1997 lukem

- use CPPFLAGS instead of CFLAGS
- use ${COMPILE.C} ... instead of ${CC} ${CFLAGS} -c ...


Revision tags: netbsd-1-3-base
# 1.40 09-Oct-1997 lukem

branches: 1.40.2;
rcsid police


# 1.39 23-Apr-1997 mrg

move str[fp]time into libc/time.


# 1.38 22-Dec-1996 cgd

add rules to build .ln files (memmove.ln, memcpy.ln, strchr.ln, strrchr.ln)
for objects built specially from other C files, when appropriate.


# 1.37 12-Nov-1996 jtc

Add strtok_r() for reentrant (thread-aware) programs


# 1.36 24-Sep-1996 matthias

Make it possible to have a md version of memccpy.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.35 20-Mar-1995 mycroft

Clarify a comment slightly.


# 1.34 20-Mar-1995 mycroft

Separate machine dependencies.


# 1.33 10-Feb-1995 cgd

list the files needed on the alpha.


# 1.32 22-Dec-1994 cgd

specify man pages the new way.


# 1.31 14-Nov-1994 dean

Include files for pmax


# 1.30 03-Sep-1994 jtc

__strerror() and __strsignal() have been broken out into their own files
and use message catalogs if NLS is defined.
Increased the size of char buffers used by strerror() and strsignal();
the error and signal strings may be much longer in some locales.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE
# 1.29 02-Aug-1994 jtc

branches: 1.29.2;
Add strsignal() function like on Solaris.
We might want to be able to retrieve a locale-specific signal description
(from a message catalog) and we need a function call API for that feature.


Revision tags: netbsd-1-0-base
# 1.28 06-Jul-1994 mycroft

We're supposed to include ${CPPFLAGS} when compiling .c files.


# 1.27 22-Jun-1994 cgd

add Boyer-Moore string search routines, from Bostic. man page
needs to be fixed for mandoc, and RCSID's need to be added.


# 1.26 25-Feb-1994 phil

Changing the ns32k stuff.


# 1.25 10-Dec-1993 mycroft

memcpy.S and memmove.S on i386 are now separate.


# 1.24 08-Dec-1993 mycroft

Add strchr.S and strrchr.S for m68k.


# 1.23 08-Dec-1993 pk

Added some Sparc sources.


# 1.22 07-Dec-1993 mycroft

Also a memcpy.S for m68k.


# 1.21 07-Dec-1993 mycroft

Remove -p flags from .so builds.


# 1.20 06-Dec-1993 mycroft

Add memmove.S to m68k assembler stuff.


# 1.19 06-Dec-1993 mycroft

Use assembler versions of m68k stuff.


# 1.18 06-Dec-1993 cgd

fix things so that memmove.so, et al., are built correctly on
machines w/o architecture-specific sources.


# 1.17 05-Dec-1993 briggs

Changed occurance of MACHINE_ARCH == "hp300" to MACHINE_ARCH == "m68k"


# 1.16 05-Dec-1993 cgd

get pc532 moved into ns32k; that's is MACHINE_ARCH


# 1.15 04-Dec-1993 cgd

update for .S and MACHINE_ARCH


# 1.14 18-Oct-1993 cgd

don't compiler strerror.c source here, and clean up.


# 1.13 07-Oct-1993 jtc

Moved strerror.[c3] from libc/stdio to libc/string.
Since perror is not permitted to change strerror()'s static buffer, I have
changed both functions to pass their own buffers to the new library-internal
function _strerror() that actually does the error message string look up.
Split strerror manpage into strerror and perror manpages.


# 1.12 07-Oct-1993 cgd

make an arch directory in libc, and move all machine dirs into it


# 1.11 05-Oct-1993 jtc

Add swab.c or swab.s, as appropriate, to each machines source list instead
of always using swab.c


# 1.10 17-Sep-1993 phil

pc532 specifics.


# 1.9 01-Aug-1993 mycroft

Add RCS identifiers.


Revision tags: netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base
# 1.8 17-Jun-1993 jtc

Add i386 assembly versions of bcmp & memcmp


# 1.7 17-Jun-1993 jtc

enable memset & memchr.


# 1.6 16-Jun-1993 mycroft

Actually, just make memcpy() an alias for memmove().


# 1.5 16-Jun-1993 mycroft

Oops. Forgot to update the Makefile.


# 1.4 16-Jun-1993 jtc

Added i386 assembly language versions of ffs, strcat, strcpy, and strlen.


# 1.3 15-Jun-1993 jtc

Added fast strcmp() and strncmp() routines.


# 1.2 07-May-1993 cgd

add assembly language version of index, rindex, strchr, and strrchr
supplied by J.T. Conklin <conklin@kaleida.com>


# 1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision


Revision tags: pgoyette-localcount-20161104
# 1.82 15-Oct-2016 kamil

Import wcsnlen(3) to libc

The wcsnlen(3) function conforms to POSIX.1-2008 and is an addition to the
ISO C standard.

size_t wcsnlen(const wchar_t *s, size_t maxlen);

The wcsnlen(3) function computes the number of wide-characters in a wide-
-string to which s points, not including NULL terminating wide-character
code and checking no more than maxlen wide-characters. This function never
examines wide-characters beyond a wide-string of maxlen size.


This function is a safer version of wcslen(3):

size_t wcslen(const wchar_t *s);


Update STANDARDS section of wmemchr(3) describing wide-character functions.


# 1.81 12-Oct-2016 christos

add strchrnul


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.80 24-Sep-2014 christos

branches: 1.80.2;
add strnstr from FreeBSD


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-nhusb-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.79 19-Aug-2013 joerg

GC __indr_reference wrappers.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.78 24-Jun-2013 riastradh

Replace consttime_bcmp/explicit_bzero by consttime_memequal/explicit_memset.

consttime_memequal is the same as the old consttime_bcmp.
explicit_memset is to memset as explicit_bzero was to bcmp.

Passes amd64 release and i386/ALL, but I'm sure I missed some spots,
so please let me know.


# 1.77 24-Jun-2013 riastradh

Add consttime_bcmp(3) and explicit_bzero(3) to makefile and set lists.


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.76 30-Aug-2012 drochner

branches: 1.76.2;
Add "consttime_bcmp" and "explicit_bzero" functions for both kernel
abd userland, as proposed on tech-security, with explicit_bzero using
a volatile function pointer as suggested by Alan Barrett.
Both do what the name says. For userland, both are prefixed by "__"
to keep them out of the user namespace.
Change some memset/memcmp uses to the new functions where it makes
sense -- these are just some examples, more to come.


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 cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211
# 1.75 30-Jul-2009 dsl

branches: 1.75.6;
If SRCS contains any .S files then remove the corresponding .c file from
SRCS and add to LSRCS (for lint).
Change the 'string' Makefiles so that the arch/*/string/Makefile.inc
need only specify the .S files for that architecture and not the .c
files for all the files they don't override.


# 1.74 21-Jul-2009 joerg

Move popcount et al to src/common and add popcount32/popcount64.
Requested by rmind@. MD should now override popcount32/popcount64 and
provide the aliases as fitting.


# 1.73 21-Jul-2009 joerg

Add popcount(3) and the long and long long version. Name is inspired by
gnulib, the implementation goes back to the AMD Software Optimizer
guide. A number of platforms will want to replace the C version with
assembler code using native instructions.


# 1.72 18-Jul-2009 dsl

Remove index() and rindex() from the list (in comment)


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.71 01-May-2009 perry

Add versions of stpcpy(3), stpncpy(3), strnlen(3), all from FreeBSD.
These are defined in the latest POSIX

Also make related updates to documentation, mostly from FreeBSD,
though I cleaned a few other things up along the way.

Bump shlib_version.

We are still missing strcoll_l, strerror_l, strsignal, strxfrm_l to be
POSIX conformant.


# 1.70 10-Apr-2009 christos

add memrchr


# 1.69 11-Jan-2009 christos

branches: 1.69.2;
merge christos-time_t


Revision tags: christos-time_t-nbase christos-time_t-base
# 1.68 02-Jan-2009 tnozaki

Fixes PR lib/39662, shortcomings in LC_{MONETARY,NUMERIC,TIME,MESSAGES} db format.
ok'ed by core and releng.
(thanks for agc@, snj@ and i'm sorry for long time patience).

[libc]
- localeio.[ch] and lc*.[ch] in src/lib/libc/locale was replaced by
new locale-db implementation using citrus_db backend,
see src/lib/libc/citrus/citrus_lc_*.[ch].
- add citrus_bcs_strtou?l.c. don't use strtou?l locale implementation
internally, because they're locale-aware function.
- add some stubs for multi-locale issue, see {current,global}_locale.c.
- remove some obsolete file, setrunelocale.c, ___runetype_mb.c.
- remove __savectype() from ctypeio.[ch].

[tools]
- mklocale(1): add new option ``-t'' that generates new style
LC_{MONETARY,NUMERIC,TIME,MESSAGES} locale-db format.
- chrtbl(1): added ctypeio.[ch] for __savectype().

[locale-db]
- added en_US.US-ASCII locale.
- removed some shareable locale definition file:
en_US.US-ASCII -> en_US.ISO8859-1, en_US.UTF-8
zh_CN.eucCN -> zh_CN.GB18030
and more...see src/share/locale/*/Makefile.
- remove obsoleted locale sr_YU, added new locale sr_ME, sr_RS.
- change locale name ja_JP.ISO2022-JP* -> ja_JP.ISO-2022-JP*
for X11's locale.alias file alignments.
- fix regression test, wrong wcs?width(3), NAN/INF usage.

i tested release-build following arch:
i386, amd64, hpc{mips,arm,sh}, sparc64, vax.

citrus_lc_*.[ch] also can read old-plain-text style locale-db.
so that backward compatibility is keeped, but lc*.[ch] can't read
new citrus_db'ed locale-db and localeio.c never check sanity,
so forward compatibility is broken ;-<

old mklocale(1) doesn't know -t option, so you have to rebuild toolchain.


Revision tags: 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 matt-armv6-prevmlocking cube-autoconf-base matt-armv6-base matt-mips64-base hpcarm-cleanup-base
# 1.67 17-Feb-2007 wiz

branches: 1.67.18; 1.67.20;
Add strings(3), collecting information about strings.h.
Add Xr for it to string(3).

XXX: if someone could make a HISTORY section, I'd appreciate it


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase 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 wrstuden-fixsa-base netbsd-4-base
# 1.66 13-Oct-2006 tnozaki

PR/30809 added manpages of wcswcs(3) and wcscoll(3), wcsxfrm(3)
(wcs?width and wprintf are already in repository).


# 1.65 27-Aug-2006 dsl

fix xtos's pasto


# 1.64 26-Aug-2006 christos

PR/34238: Aleksey Cheusov: man pages for wcsdup, wcscasecmp and wcsncasecmp
functions


# 1.63 23-Aug-2006 christos

include one more new file.


# 1.62 22-Aug-2006 christos

PR/34238: Aleksey Cheusov: add wcsdup, wcscasecmp and wcsncasecmp functions


# 1.61 12-Aug-2006 christos

- Add strndup and stresep
- Use stresep so in fstab so that we can mount paths with white space in them.


Revision tags: abandoned-netbsd-4-base
# 1.60 03-Jun-2006 tnozaki

branches: 1.60.2;
fix lib/33476:
added following manpages (derived from FreeBSD),
wcwidth(3) wcswidth(3)
wcstol(3) wcstoll(3) wcstoimax(3)
wcstoul(3) wcstoull(3) wcstoumax(3)
and update doc/TODO.i18n.


# 1.59 20-Dec-2005 christos

Use reach-over sources from common/lib/libc


# 1.58 30-Jul-2005 christos

- Fix the remaining indr_references so that they define lint symbols.
- Add an internal symbol for strerror_r (thanks klaus for noticing)
- Remove internal __strerror


# 1.57 28-Jul-2005 christos

PR/30845: Luke Mewburn: strerror_r(3) missing
- Merge 4.4BSD strerror.3 man page changes that summarize information
for all the error printing functions. This makes the perror(3) page
obsolete.
- Implement all error functions in terms of strerror_r(), including
__strerror() which is not used internally. Can it be removed?
- Bump version for strerror_r


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-3-base
# 1.56 14-Mar-2005 perry

Fix stupid typo. I added memmem, not memmove.


# 1.55 13-Mar-2005 perry

add memmem


# 1.54 03-Jul-2004 junyoung

Add strcasestr(3), case insensitive version of strstr(3).
Bump libc minor.

From FreeBSD.


Revision tags: netbsd-2-0-base
# 1.53 05-Mar-2003 tshiozak

branches: 1.53.2;
changes related to lib/20576 and lib/20577.
- add wcstok() and wcswcs(),
- add wcstok(3),
- move btowc() and wctob() into each ctype modules,
- bump ctype interface ABI version,
- bump i18n modules' minor and
- update sets.
and fix a stupid bug in _RUNE_ISCACHED macro.


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 nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.52 17-Apr-2002 kleink

Need internal names for strlcat() and strlcpy().


# 1.51 24-Dec-2000 itojun

branches: 1.51.2;
split wide char section, just for readability/future possibility for .if


# 1.50 23-Dec-2000 itojun

move wcs* and wmem* from lib/libc/locale to lib/libc/string.


Revision tags: netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
# 1.49 08-Sep-1999 lukem

branches: 1.49.8;
add netbsd rcsid's
update for knf (return value on separate line to function name...)
check dst and src aren't null pointers before trying to use them
enable strlcat/strlcpy


Revision tags: netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.48 24-Feb-1999 drochner

branches: 1.48.2;
use ${ARCHDIR} instead of ${.CURDIR}/arch/${MACHINE_ARCH} where appropriate
libc builds on pmax again


# 1.47 14-Sep-1998 kleink

Install a link for strtok_r(3).


# 1.46 04-Aug-1998 perry

switch bzero to version in memset.c.
bzero.c is now a "#define BZERO//#include memset.c" type file.
Remove comment from Makefile about the fact that this is on the todo list.


# 1.45 04-Aug-1998 perry

Replace complicated and ugly makefile gook to make memmove,memcpy by
-Ding the bcopy.c source (and similarly strchr from index.c, strrchr
from rindex.c) with stub .c files for memmove, memcpy, strchr and
strrchr that simply #define the appropriate thing and #include the
appropriate .c file. Inspired by the way many m-d .S files handle the
same thing. This radically simplifies the Makefile.inc for libc/string
(and libkern).


# 1.44 30-Jan-1998 perry

note that bzero isn't yet being built from memset.c


# 1.43 30-Jan-1998 perry

update to lite-2


# 1.42 23-Jan-1998 cgd

Update various aspects of the special target builds which should
have been done (by others) a long time ago:
* fix PIC compilation to use new PIC flags,
* make them 'make -j N' safe.


# 1.41 22-Oct-1997 lukem

- use CPPFLAGS instead of CFLAGS
- use ${COMPILE.C} ... instead of ${CC} ${CFLAGS} -c ...


Revision tags: netbsd-1-3-base
# 1.40 09-Oct-1997 lukem

branches: 1.40.2;
rcsid police


# 1.39 23-Apr-1997 mrg

move str[fp]time into libc/time.


# 1.38 22-Dec-1996 cgd

add rules to build .ln files (memmove.ln, memcpy.ln, strchr.ln, strrchr.ln)
for objects built specially from other C files, when appropriate.


# 1.37 12-Nov-1996 jtc

Add strtok_r() for reentrant (thread-aware) programs


# 1.36 24-Sep-1996 matthias

Make it possible to have a md version of memccpy.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.35 20-Mar-1995 mycroft

Clarify a comment slightly.


# 1.34 20-Mar-1995 mycroft

Separate machine dependencies.


# 1.33 10-Feb-1995 cgd

list the files needed on the alpha.


# 1.32 22-Dec-1994 cgd

specify man pages the new way.


# 1.31 14-Nov-1994 dean

Include files for pmax


# 1.30 03-Sep-1994 jtc

__strerror() and __strsignal() have been broken out into their own files
and use message catalogs if NLS is defined.
Increased the size of char buffers used by strerror() and strsignal();
the error and signal strings may be much longer in some locales.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE
# 1.29 02-Aug-1994 jtc

branches: 1.29.2;
Add strsignal() function like on Solaris.
We might want to be able to retrieve a locale-specific signal description
(from a message catalog) and we need a function call API for that feature.


Revision tags: netbsd-1-0-base
# 1.28 06-Jul-1994 mycroft

We're supposed to include ${CPPFLAGS} when compiling .c files.


# 1.27 22-Jun-1994 cgd

add Boyer-Moore string search routines, from Bostic. man page
needs to be fixed for mandoc, and RCSID's need to be added.


# 1.26 25-Feb-1994 phil

Changing the ns32k stuff.


# 1.25 10-Dec-1993 mycroft

memcpy.S and memmove.S on i386 are now separate.


# 1.24 08-Dec-1993 mycroft

Add strchr.S and strrchr.S for m68k.


# 1.23 08-Dec-1993 pk

Added some Sparc sources.


# 1.22 07-Dec-1993 mycroft

Also a memcpy.S for m68k.


# 1.21 07-Dec-1993 mycroft

Remove -p flags from .so builds.


# 1.20 06-Dec-1993 mycroft

Add memmove.S to m68k assembler stuff.


# 1.19 06-Dec-1993 mycroft

Use assembler versions of m68k stuff.


# 1.18 06-Dec-1993 cgd

fix things so that memmove.so, et al., are built correctly on
machines w/o architecture-specific sources.


# 1.17 05-Dec-1993 briggs

Changed occurance of MACHINE_ARCH == "hp300" to MACHINE_ARCH == "m68k"


# 1.16 05-Dec-1993 cgd

get pc532 moved into ns32k; that's is MACHINE_ARCH


# 1.15 04-Dec-1993 cgd

update for .S and MACHINE_ARCH


# 1.14 18-Oct-1993 cgd

don't compiler strerror.c source here, and clean up.


# 1.13 07-Oct-1993 jtc

Moved strerror.[c3] from libc/stdio to libc/string.
Since perror is not permitted to change strerror()'s static buffer, I have
changed both functions to pass their own buffers to the new library-internal
function _strerror() that actually does the error message string look up.
Split strerror manpage into strerror and perror manpages.


# 1.12 07-Oct-1993 cgd

make an arch directory in libc, and move all machine dirs into it


# 1.11 05-Oct-1993 jtc

Add swab.c or swab.s, as appropriate, to each machines source list instead
of always using swab.c


# 1.10 17-Sep-1993 phil

pc532 specifics.


# 1.9 01-Aug-1993 mycroft

Add RCS identifiers.


Revision tags: netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base
# 1.8 17-Jun-1993 jtc

Add i386 assembly versions of bcmp & memcmp


# 1.7 17-Jun-1993 jtc

enable memset & memchr.


# 1.6 16-Jun-1993 mycroft

Actually, just make memcpy() an alias for memmove().


# 1.5 16-Jun-1993 mycroft

Oops. Forgot to update the Makefile.


# 1.4 16-Jun-1993 jtc

Added i386 assembly language versions of ffs, strcat, strcpy, and strlen.


# 1.3 15-Jun-1993 jtc

Added fast strcmp() and strncmp() routines.


# 1.2 07-May-1993 cgd

add assembly language version of index, rindex, strchr, and strrchr
supplied by J.T. Conklin <conklin@kaleida.com>


# 1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision