strings.h revision 1.14
11.14Sjoerg/* $NetBSD: strings.h,v 1.14 2009/07/21 13:18:43 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.4Skleink__BEGIN_DECLS 501.10Sperryint bcmp(const void *, const void *, size_t); 511.10Sperryvoid bcopy(const void *, void *, size_t); 521.10Sperryvoid bzero(void *, size_t); 531.10Sperryint ffs(int); 541.10Sperrychar *index(const char *, int); 551.14Sjoergunsigned int popcount(unsigned int) __constfunc; 561.14Sjoergunsigned int popcountl(unsigned long) __constfunc; 571.14Sjoergunsigned int popcountll(unsigned long long) __constfunc; 581.10Sperrychar *rindex(const char *, int); 591.10Sperryint strcasecmp(const char *, const char *); 601.10Sperryint strncasecmp(const char *, const char *, size_t); 611.4Skleink__END_DECLS 621.5Skleink 631.9Sbjh21#if defined(_NETBSD_SOURCE) 641.5Skleink#include <string.h> 651.5Skleink#endif 661.4Skleink 671.12Skristerw#if _FORTIFY_SOURCE > 0 681.11Stls#include <ssp/strings.h> 691.12Skristerw#endif 701.4Skleink#endif /* !defined(_STRINGS_H_) */ 71