| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
a similar history of stpcpy(), stpncpy() and strnlen().
Make it visible under XOPEN_SOURCE>=700 too (not just _NETBSD_SOURCE).
ok dholland@
|
|
|
|
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)
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
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.
|
|
|
|
documentation accordingly.
Fixes PR standards/41325 from Perry E. Metzger.
|
|
|
|
Implementations in libc to follow.
For POSIX compliance, we are still missing:
strcoll_l
strerror_l
strsignal
strxfrm_l
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
matt, kleink, others. Approved by christos.
|
|
Also __P() it; this should be consistent within a single header.
|
|
Bump libc minor.
From FreeBSD.
|
|
Patches provided by Joel Baker in PR 22270, verified by myself.
|
|
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.
|
|
|
|
std C headers including it, and a kernel module written in C++ would benfit
as well.
|
|
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.
|
|
|
|
|
|
breaking third party software. *sigh*
|
|
|
|
|
|
memccpy() and strdup().
|
|
(not just !POSIX and !ANSI)
|
|
|
|
|
|
|
|
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().
|
|
|
|
|
|
|
|
|
|
|
|
|