Commit Graph

30 Commits

Author SHA1 Message Date
christos b43b0b010f Add strerror_r. 2005-07-28 16:26:53 +00:00
perry 93c3898449 Add prototype for memmem(3). It is API compatible with the version in Linux. 2005-03-13 15:09:50 +00:00
perry 19b7469a00 de-__P -- the hack is long since useless. Discussed with christos,
matt, kleink, others. Approved by christos.
2005-02-03 04:39:32 +00:00
kleink cceefa7be9 Move the strcasestr() prototype to the local extensions section.
Also __P() it; this should be consistent within a single header.
2004-07-12 23:35:14 +00:00
junyoung 74d67c3551 Add strcasestr(3), case insensitive version of strstr(3).
Bump libc minor.

From FreeBSD.
2004-07-03 08:27:25 +00:00
agc 039cc95684 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22270, verified by myself.
2003-08-07 09:44:09 +00:00
bjh21 4be7a2dcf3 Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
  can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
  various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
  !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them.  In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
2003-04-28 23:16:11 +00:00
kleink 346219c95f Sprinkle some restrict qualifiers. 2001-03-22 07:37:04 +00:00
kleink 1bba558e50 Move <null.h> to <sys/null.h> for the purpose of avoiding conflicts due to
std C headers including it, and a kernel module written in C++ would benfit
as well.
2000-01-10 16:58:38 +00:00
kleink c07f17e8d9 For the benefit of G++'s null pointer constant implementation, #define NULL
as __null with egcs 1.0 (GCC 2.90) and above.  As several headers are affected
by this change, move the definition into a new header file, <null.h>, to ease
maintenance.
1999-12-22 21:26:15 +00:00
kleink caba80aea6 strlcat() and strlcpy() aren't ISO/IEC 9899:1990. 1999-09-09 09:30:40 +00:00
lukem f7966ba040 prototypes for strlcat() and strlcpy() 1999-09-08 22:09:36 +00:00
mycroft 633b8f45a9 Make many of the new consts dependent on a new `__AUDIT__' flag, to avoid
breaking third party software.  *sigh*
1998-07-27 09:09:03 +00:00
mycroft 74d731feba KNF nit. 1998-07-26 19:20:55 +00:00
mycroft 4024f73640 const poisoning. 1998-07-26 13:34:18 +00:00
kleink 5a50994071 Make strtok_r() available to _XOPEN_SOURCE >= 500, and fix the protection of
memccpy() and strdup().
1998-05-06 20:17:55 +00:00
tv ced11d04ee Move the #include <strings.h> line inside a !defined(_XOPEN_SOURCE) block
(not just !POSIX and !ANSI)
1998-04-27 17:02:04 +00:00
perry d7d500efb6 restore include of sys/featuretest.h 1998-02-03 04:45:41 +00:00
perry 883ee70d11 remove sys/featuretest.h -- why did kleink add it? 1998-02-02 22:07:54 +00:00
perry b7b7322c68 merge lite-2 1998-02-02 21:07:13 +00:00
kleink ea1a5dbd26 Per XPG4.2, move the prototypes of bcmp(), bcopy(), bzero(), ffs(), index(),
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-02-02 16:15:07 +00:00
kleink f1d296dd60 Per XPG4, move the prototype of swab() from <string.h> to <unistd.h>. 1998-01-12 16:05:40 +00:00
christos 3664382e53 move setmode and strsignal to unistd.h 1997-10-16 23:26:24 +00:00
christos 81037ca0d3 Add missing strtok_r prototype 1997-07-13 18:02:16 +00:00
cgd 4d2cbfce0a new RCS ID format. 1994-10-26 00:55:40 +00:00
jtc 34dc9c85a5 Added prototype for new function strsignal() 1994-08-02 05:03:46 +00:00
cgd 2922de7461 add _BSD's to ansi types 1994-05-21 09:41:59 +00:00
jtc 847ee7d5b1 Changed preprocessor conditional so non-standard functions would not be
declared in a _POSIX_SOURCE environment.
1993-10-11 18:43:45 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00