freebsd_amp_hwpstate/usr.sbin/xntpd/include/ntp_string.h

36 lines
676 B
C
Raw Normal View History

1993-12-21 18:36:48 +00:00
/*
1995-05-30 03:57:47 +00:00
* Define string ops: strchr strrchr memcmp memmove memset
1993-12-21 18:36:48 +00:00
*/
#ifndef _ntp_string_h
#define _ntp_string_h
1994-02-03 22:09:07 +00:00
#if defined(NTP_POSIX_SOURCE)
1993-12-21 18:36:48 +00:00
1994-02-03 22:09:07 +00:00
# if defined(HAVE_MEMORY_H)
# include <memory.h>
# endif
1993-12-21 18:36:48 +00:00
1994-02-03 22:09:07 +00:00
# include <string.h>
1993-12-21 18:36:48 +00:00
1994-02-03 22:09:07 +00:00
#else
1993-12-21 18:36:48 +00:00
1994-02-03 22:09:07 +00:00
# include <strings.h>
# define strchr(s,c) index(s,c)
# define strrchr(s,c) rindex(s,c)
# ifndef NTP_NEED_BOPS
# define NTP_NEED_BOPS
# endif
#endif /* NTP_POSIX_SOURCE */
1993-12-21 18:36:48 +00:00
1994-02-03 22:09:07 +00:00
#ifdef NTP_NEED_BOPS
1993-12-21 18:36:48 +00:00
1994-02-03 22:09:07 +00:00
# define memcmp(a,b,c) bcmp(a,b,c)
# define memmove(t,f,c) bcopy(f,t,c)
# define memset(a,x,c) if (x == 0x00) bzero(a,c); else ntp_memset((char*)a,x,c)
void ntp_memset P((char *, int, int));
1993-12-21 18:36:48 +00:00
1994-02-03 22:09:07 +00:00
#endif /* NTP_NEED_BOPS */
1993-12-21 18:36:48 +00:00
#endif /* _ntp_string_h */