summaryrefslogtreecommitdiff
path: root/include/string.h
AgeCommit message (Collapse)Author
2021-08-09fix various typos in compatibility, mainly in comments.andvar
2018-02-20Mark in string.h: memccpy(3) and strdup(3) as _POSIX_C_SOURCE >= 2001kamil
2016-10-12add strchrnullchristos
2016-03-10strndup() is part of XSI from The Open Group Base Specification Issue 7 and hadleot
a similar history of stpcpy(), stpncpy() and strnlen(). Make it visible under XOPEN_SOURCE>=700 too (not just _NETBSD_SOURCE). ok dholland@
2014-09-24add strnstr from FreeBSDchristos
2013-08-28Publish explicit_memset and consttime_memequal in userland libc.riastradh
Remove the double-underscore from the userland versions, and do the weak alias dance instead, now that these are public parts of libc. As discussed on tech-userlevel: https://mail-index.netbsd.org/tech-userlevel/2013/06/24/msg007843.html (option 3)
2013-08-28Make explicit_memset match memset's return value.riastradh
2013-08-27Remove outdated comment.joerg
2013-08-19Add strerror_l.joerg
2013-06-24Replace consttime_bcmp/explicit_bzero by consttime_memequal/explicit_memset.riastradh
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.
2013-04-21__BEGIN_DECLS/__END_DECLSjoerg
2013-04-19Add dummy strcoll_l and strxfrm_l.joerg
2012-08-30Add "consttime_bcmp" and "explicit_bzero" functions for both kerneldrochner
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.
2012-04-20Do not wrap other header files with extern "C".joerg
2009-07-22Declare strsignal(3) in <string.h>, per POSIX-2008, and adjustkleink
documentation accordingly. Fixes PR standards/41325 from Perry E. Metzger.
2009-05-01note that we have strsignal but it is in the wrong include file.perry
2009-05-01Add prototypes for stpcpy, stpncpy, strnlen, added in the latest POSIX.perry
Implementations in libc to follow. For POSIX compliance, we are still missing: strcoll_l strerror_l strsignal strxfrm_l
2009-04-10add memrchrchristos
2007-10-19kill _NETBSD_TOOLS.christos
2007-10-18Introduce _NETBSD_TOOLS for symbols the are needed in tools buildchristos
2007-08-02Do not include SSP files unless _FORTIFY_SOURCE > 0.kristerw
2007-05-30Match usage of FORTIFY_SOURCE on other platforms by not requiring specialtls
include path: the normal header files now include the "SSP" ones (which one should note are not really named right: SSP and FORTIFY_SOURCE are independent features). Disable USE_SSP on targets where the compiler doesn't support it at all (mips, alpha) or it's known broken (sh3). But enable FORTIFY_SOURCE, without SSP, on those platforms -- tested on mipsel.
2006-08-12Add stresep and strndup.christos
2005-07-28Add strerror_r.christos
2005-03-13Add prototype for memmem(3). It is API compatible with the version in Linux.perry
2005-02-03de-__P -- the hack is long since useless. Discussed with christos,perry
matt, kleink, others. Approved by christos.
2004-07-12Move the strcasestr() prototype to the local extensions section.kleink
Also __P() it; this should be consistent within a single header.
2004-07-03Add strcasestr(3), case insensitive version of strstr(3).junyoung
Bump libc minor. From FreeBSD.
2003-08-07Move UCB-licensed code from 4-clause to 3-clause licence.agc
Patches provided by Joel Baker in PR 22270, verified by myself.
2003-04-28Add a new feature-test macro, _NETBSD_SOURCE. If this is definedbjh21
by the application, all NetBSD interfaces are made visible, even if some other feature-test macro (like _POSIX_C_SOURCE) is defined. <sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE, _POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve existing behaviour. This has two major advantages: + Programs that require non-POSIX facilities but define _POSIX_C_SOURCE can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS. + It makes most of the #ifs simpler, in that they're all now ORs of the various macros, rather than having checks for (!defined(_ANSI_SOURCE) || !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place. I've tried not to change the semantics of the headers in any case where _NETBSD_SOURCE wasn't defined, but there were some places where the current semantics were clearly mad, and retaining them was harder than correcting them. In particular, I've mostly normalised things so that _ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE, _XOPEN_SOURCE and _NETBSD_SOURCE in that order. Tested by building for vax, encouraged by thorpej, and uncontested in tech-userlevel for a week.
2001-03-22Sprinkle some restrict qualifiers.kleink
2000-01-10Move <null.h> to <sys/null.h> for the purpose of avoiding conflicts due tokleink
std C headers including it, and a kernel module written in C++ would benfit as well.
1999-12-22For the benefit of G++'s null pointer constant implementation, #define NULLkleink
as __null with egcs 1.0 (GCC 2.90) and above. As several headers are affected by this change, move the definition into a new header file, <null.h>, to ease maintenance.
1999-09-09strlcat() and strlcpy() aren't ISO/IEC 9899:1990.kleink
1999-09-08prototypes for strlcat() and strlcpy()lukem
1998-07-27Make many of the new consts dependent on a new `__AUDIT__' flag, to avoidmycroft
breaking third party software. *sigh*
1998-07-26KNF nit.mycroft
1998-07-26const poisoning.mycroft
1998-05-06Make strtok_r() available to _XOPEN_SOURCE >= 500, and fix the protection ofkleink
memccpy() and strdup().
1998-04-27Move the #include <strings.h> line inside a !defined(_XOPEN_SOURCE) blocktv
(not just !POSIX and !ANSI)
1998-02-03restore include of sys/featuretest.hperry
1998-02-02remove sys/featuretest.h -- why did kleink add it?perry
1998-02-02merge lite-2perry
1998-02-02Per XPG4.2, move the prototypes of bcmp(), bcopy(), bzero(), ffs(), index(),kleink
rindex(), strcasecmp() and strncasecmp() to <strings.h>. For now, include <strings.h> to get these prototypes; this should go away eventually. Also, protect the prototypes of strtok_r() and strsep().
1998-01-12Per XPG4, move the prototype of swab() from <string.h> to <unistd.h>.kleink
1997-10-16move setmode and strsignal to unistd.hchristos
1997-07-13Add missing strtok_r prototypechristos
1994-10-26new RCS ID format.cgd
1994-08-02Added prototype for new function strsignal()jtc
1994-05-21add _BSD's to ansi typescgd