From 394ee3bae890775188c4812249fc996cb7cc0abe Mon Sep 17 00:00:00 2001 From: wollman Date: Thu, 3 Feb 1994 22:09:07 +0000 Subject: xntpd version 3.3z from UDel --- usr.sbin/xntpd/include/ntp_string.h | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'usr.sbin/xntpd/include/ntp_string.h') diff --git a/usr.sbin/xntpd/include/ntp_string.h b/usr.sbin/xntpd/include/ntp_string.h index f17905e..cc2eec8 100644 --- a/usr.sbin/xntpd/include/ntp_string.h +++ b/usr.sbin/xntpd/include/ntp_string.h @@ -1,29 +1,35 @@ /* - * Define bcopy, bzero, and bcmp and string op's + * Define string ops: strchr strrchr memcmp memmove memset */ #ifndef _ntp_string_h #define _ntp_string_h -#ifdef NTP_POSIX_SOURCE +#if defined(NTP_POSIX_SOURCE) -#if defined(HAVE_MEMORY_H) -#include -#endif +# if defined(HAVE_MEMORY_H) +# include +# endif -#include +# include -#define bcopy(s1,s2,n) memcpy(s2, s1, n) -#define bzero(s,n) memset(s, 0, n) -#define bcmp(s1,s2,n) memcmp(s1, s2, n) +#else -#else /* NTP_POSIX_SOURCE */ +# include +# 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 */ -#include +#ifdef NTP_NEED_BOPS -#define strrchr rindex -#define strchr index +# 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)); -#endif /* NTP_POSIX_SOURCE */ +#endif /* NTP_NEED_BOPS */ #endif /* _ntp_string_h */ -- cgit v1.1