summaryrefslogtreecommitdiffstats
path: root/include/strings.h
diff options
context:
space:
mode:
authormike <mike@FreeBSD.org>2002-04-04 05:41:57 +0000
committermike <mike@FreeBSD.org>2002-04-04 05:41:57 +0000
commit1802268e809bb1895682a238b5d7c63858a55166 (patch)
tree5da2cc65f6136386264e8ff54faace1120b5099d /include/strings.h
parentd09a7d9089d854efef3c9e65f448f44856b5a0a6 (diff)
downloadFreeBSD-src-1802268e809bb1895682a238b5d7c63858a55166.zip
FreeBSD-src-1802268e809bb1895682a238b5d7c63858a55166.tar.gz
o Move some function prototypes from <string.h> to the newly rewritten
<strings.h>, based on POSIX.1-2001's requirements. o Add 'restrict' qualifier (spelled '__restrict') to functions in <string.h>, as per C99 and POSIX.1-2001. o Properly expose new POSIX.1-2001 functions in <string.h>.
Diffstat (limited to 'include/strings.h')
-rw-r--r--include/strings.h41
1 files changed, 28 insertions, 13 deletions
diff --git a/include/strings.h b/include/strings.h
index 2a63fa4..bc989cb 100644
--- a/include/strings.h
+++ b/include/strings.h
@@ -1,6 +1,6 @@
/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
+ * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -10,18 +10,11 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
@@ -30,7 +23,29 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)strings.h 8.1 (Berkeley) 6/2/93
+ * $FreeBSD$
*/
-#include <string.h>
+#ifndef _STRINGS_H_
+#define _STRINGS_H_
+
+#include <sys/cdefs.h>
+#include <machine/ansi.h>
+
+#ifdef _BSD_SIZE_T_
+typedef _BSD_SIZE_T_ size_t;
+#undef _BSD_SIZE_T_
+#endif
+
+__BEGIN_DECLS
+int bcmp(const void *, const void *, size_t); /* LEGACY */
+void bcopy(const void *, void *, size_t); /* LEGACY */
+void bzero(void *, size_t); /* LEGACY */
+int ffs(int);
+char *index(const char *, int); /* LEGACY */
+char *rindex(const char *, int); /* LEGACY */
+int strcasecmp(const char *, const char *);
+int strncasecmp(const char *, const char *, size_t);
+__END_DECLS
+
+#endif /* _STRINGS_H_ */
OpenPOWER on IntegriCloud