summaryrefslogtreecommitdiffstats
path: root/usr.sbin/xntpd/include/ntp_string.h
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1994-02-03 22:09:07 +0000
committerwollman <wollman@FreeBSD.org>1994-02-03 22:09:07 +0000
commit394ee3bae890775188c4812249fc996cb7cc0abe (patch)
tree6264e1a9edb32ef88fffee8f460175549f1b556f /usr.sbin/xntpd/include/ntp_string.h
parent8e51e9f1429efc498f923bce8b25b20f47d7c075 (diff)
downloadFreeBSD-src-394ee3bae890775188c4812249fc996cb7cc0abe.zip
FreeBSD-src-394ee3bae890775188c4812249fc996cb7cc0abe.tar.gz
xntpd version 3.3z from UDel
Diffstat (limited to 'usr.sbin/xntpd/include/ntp_string.h')
-rw-r--r--usr.sbin/xntpd/include/ntp_string.h34
1 files changed, 20 insertions, 14 deletions
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 <memory.h>
-#endif
+# if defined(HAVE_MEMORY_H)
+# include <memory.h>
+# endif
-#include <string.h>
+# include <string.h>
-#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 <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 */
-#include <strings.h>
+#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 */
OpenPOWER on IntegriCloud