strings.h revision 1.15
11.15Sjoerg/*	$NetBSD: strings.h,v 1.15 2009/07/21 14:55:33 joerg Exp $	*/
21.3Scgd
31.1Scgd/*-
41.4Skleink * Copyright (c) 1998 The NetBSD Foundation, Inc.
51.1Scgd * All rights reserved.
61.1Scgd *
71.4Skleink * This code is derived from software contributed to The NetBSD Foundation
81.4Skleink * by Klaus Klein.
91.4Skleink *
101.1Scgd * Redistribution and use in source and binary forms, with or without
111.1Scgd * modification, are permitted provided that the following conditions
121.1Scgd * are met:
131.1Scgd * 1. Redistributions of source code must retain the above copyright
141.1Scgd *    notice, this list of conditions and the following disclaimer.
151.1Scgd * 2. Redistributions in binary form must reproduce the above copyright
161.1Scgd *    notice, this list of conditions and the following disclaimer in the
171.1Scgd *    documentation and/or other materials provided with the distribution.
181.1Scgd *
191.4Skleink * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
201.4Skleink * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
211.4Skleink * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
221.4Skleink * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
231.4Skleink * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
241.4Skleink * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
251.4Skleink * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
261.4Skleink * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
271.4Skleink * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
281.4Skleink * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
291.4Skleink * POSSIBILITY OF SUCH DAMAGE.
301.1Scgd */
311.1Scgd
321.4Skleink#ifndef _STRINGS_H_
331.4Skleink#define _STRINGS_H_
341.4Skleink
351.4Skleink#include <machine/ansi.h>
361.6Skleink#include <sys/featuretest.h>
371.4Skleink
381.4Skleink#ifdef	_BSD_SIZE_T_
391.4Skleinktypedef	_BSD_SIZE_T_	size_t;
401.4Skleink#undef	_BSD_SIZE_T_
411.4Skleink#endif
421.4Skleink
431.9Sbjh21#if defined(_NETBSD_SOURCE)
441.8Skleink#include <sys/null.h>
451.4Skleink#endif
461.4Skleink
471.4Skleink#include <sys/cdefs.h>
481.4Skleink
491.15Sjoerg#include <sys/inttypes.h>
501.15Sjoerg
511.4Skleink__BEGIN_DECLS
521.10Sperryint	 bcmp(const void *, const void *, size_t);
531.10Sperryvoid	 bcopy(const void *, void *, size_t);
541.10Sperryvoid	 bzero(void *, size_t);
551.10Sperryint	 ffs(int);
561.10Sperrychar	*index(const char *, int);
571.14Sjoergunsigned int	popcount(unsigned int) __constfunc;
581.14Sjoergunsigned int	popcountl(unsigned long) __constfunc;
591.14Sjoergunsigned int	popcountll(unsigned long long) __constfunc;
601.15Sjoergunsigned int	popcount32(uint32_t) __constfunc;
611.15Sjoergunsigned int	popcount64(uint64_t) __constfunc;
621.10Sperrychar	*rindex(const char *, int);
631.10Sperryint	 strcasecmp(const char *, const char *);
641.10Sperryint	 strncasecmp(const char *, const char *, size_t);
651.4Skleink__END_DECLS
661.5Skleink
671.9Sbjh21#if defined(_NETBSD_SOURCE)
681.5Skleink#include <string.h>
691.5Skleink#endif
701.4Skleink
711.12Skristerw#if _FORTIFY_SOURCE > 0
721.11Stls#include <ssp/strings.h>
731.12Skristerw#endif
741.4Skleink#endif /* !defined(_STRINGS_H_) */
75