strings.h revision 267465
155714Skris/*-
2291721Sjkim * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
355714Skris * All rights reserved.
4291721Sjkim *
555714Skris * Redistribution and use in source and binary forms, with or without
655714Skris * modification, are permitted provided that the following conditions
755714Skris * are met:
855714Skris * 1. Redistributions of source code must retain the above copyright
955714Skris *    notice, this list of conditions and the following disclaimer.
1055714Skris * 2. Redistributions in binary form must reproduce the above copyright
1155714Skris *    notice, this list of conditions and the following disclaimer in the
1255714Skris *    documentation and/or other materials provided with the distribution.
13291721Sjkim *
14291721Sjkim * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15291721Sjkim * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16291721Sjkim * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17291721Sjkim * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1855714Skris * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19291721Sjkim * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2055714Skris * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21291721Sjkim * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22291721Sjkim * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23291721Sjkim * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2455714Skris * SUCH DAMAGE.
2555714Skris *
2655714Skris * $FreeBSD: stable/10/include/strings.h 267465 2014-06-14 02:57:40Z pfg $
2755714Skris */
2855714Skris
2955714Skris#ifndef _STRINGS_H_
3055714Skris#define	_STRINGS_H_
31291721Sjkim
3255714Skris#include <sys/cdefs.h>
3355714Skris#include <sys/_types.h>
34291721Sjkim
35291721Sjkim#ifndef _SIZE_T_DECLARED
3655714Skristypedef	__size_t	size_t;
37160814Ssimon#define	_SIZE_T_DECLARED
3859191Skris#endif
39291721Sjkim
40160814Ssimon__BEGIN_DECLS
41291721Sjkim#if __BSD_VISIBLE || __POSIX_VISIBLE <= 200112
42291721Sjkimint	 bcmp(const void *, const void *, size_t) __pure;	/* LEGACY */
43291721Sjkimvoid	 bcopy(const void *, void *, size_t);			/* LEGACY */
4459191Skrisvoid	 bzero(void *, size_t);					/* LEGACY */
45291721Sjkim#endif
4655714Skris#if __XSI_VISIBLE
4755714Skrisint	 ffs(int) __pure2;
4855714Skris#endif
4955714Skris#if __BSD_VISIBLE
50291721Sjkimint	 ffsl(long) __pure2;
51291721Sjkimint	 ffsll(long long) __pure2;
52291721Sjkimint	 fls(int) __pure2;
53291721Sjkimint	 flsl(long) __pure2;
54291721Sjkimint	 flsll(long long) __pure2;
55291721Sjkim#endif
56291721Sjkim#if __BSD_VISIBLE || __POSIX_VISIBLE <= 200112
57291721Sjkimchar	*index(const char *, int) __pure;			/* LEGACY */
58291721Sjkimchar	*rindex(const char *, int) __pure;			/* LEGACY */
5955714Skris#endif
60160814Ssimonint	 strcasecmp(const char *, const char *) __pure;
6155714Skrisint	 strncasecmp(const char *, const char *, size_t) __pure;
6255714Skris
63291721Sjkim#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
64205128Ssimon#include <xlocale/_strings.h>
65205128Ssimon#endif
6655714Skris__END_DECLS
6755714Skris
6855714Skris#endif /* _STRINGS_H_ */
6959191Skris