Expand PMF_FN_* macros.
[netbsd-mini2440.git] / dist / ntp / include / ntp_string.h
blobf51ae4675816c03298d46f6ca889c3ca793f68b8
1 /* $NetBSD$ */
3 /*
4 * Define string ops: strchr strrchr memcmp memmove memset
5 */
7 #ifndef _ntp_string_h
8 #define _ntp_string_h
10 #ifdef HAVE_CONFIG_H
11 #include <config.h>
12 #endif
14 #ifdef HAVE_MEMORY_H
15 # include <memory.h>
16 #endif
18 #ifdef HAVE_STRING_H
19 # include <string.h>
20 #endif
22 #ifdef HAVE_BSTRING_H
23 # include <bstring.h>
24 #endif
26 #ifndef STDC_HEADERS
27 # ifndef HAVE_STRCHR
28 # include <strings.h>
29 # define strchr index
30 # define strrchr rindex
31 # endif
32 # ifndef __GNUC__
33 char *strchr(), *strrchr();
34 # endif
35 # ifndef HAVE_MEMCPY
36 # define NTP_NEED_BOPS
37 # endif
38 #endif /* STDC_HEADERS */
40 #ifdef NTP_NEED_BOPS
41 # define memcmp(a,b,c) bcmp(a,b,(int)c)
42 # define memmove(t,f,c) bcopy(f,t,(int)c)
43 # define memcpy(t,f,c) bcopy(f,t,(int)c)
44 # define memset(a,x,c) if (x == 0x00) bzero(a,(int)c); else ntp_memset((char*)a,x,c)
46 void ntp_memset P((char *, int, int));
48 #endif /* NTP_NEED_BOPS */
50 #endif /* _ntp_string_h */