1 /* c-memstr.h: memcpy, strchr, etc.
3 Copyright 1992-2013 Karl Berry and Olaf Weber.
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public License
16 along with this library; if not, see <http://www.gnu.org/licenses/>. */
18 #ifndef KPATHSEA_C_MEMSTR_H
19 #define KPATHSEA_C_MEMSTR_H
21 /* <X11/Xfuncs.h> tries to declare bcopy etc., which can only conflict. */
27 /* don't ever want both string.h and strings.h; fails on AIX. */
33 /* An ANSI string.h and pre-ANSI memory.h might conflict. */
34 #if !defined (STDC_HEADERS) && defined (HAVE_MEMORY_H)
36 #endif /* not STDC_HEADERS and HAVE_MEMORY_H */
38 /* For ancient systems that lack the system V/ANSI version of the
39 string functions we express them in terms of the BSD versions. */
40 #if !defined(HAVE_STRCHR) && !defined(strchr)
44 #if !defined(HAVE_STRRCHR) && !defined(strrchr)
45 #define strrchr rindex
48 #if !defined(HAVE_MEMCMP) && !defined(memcmp)
49 #define memcmp(s1, s2, n) bcmp ((s1), (s2), (n))
52 #if !defined(HAVE_MEMCPY) && !defined(memcpy)
53 #define memcpy(to, from, len) bcopy ((from), (to), (len))
56 #if !defined(HAVE_STRING_H)
57 extern char *strtok ();
59 extern char *strstr ();
63 #endif /* not KPATHSEA_C_MEMSTR_H */