From cce65f439697627afbccf5a67035a957bb4d784a Mon Sep 17 00:00:00 2001 From: Ollivier Robert Date: Sun, 17 Aug 2008 17:37:33 +0000 Subject: Flatten the dist and various 4.n.n trees in preparation of future ntp imports. --- include/ntp_string.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 include/ntp_string.h (limited to 'include/ntp_string.h') diff --git a/include/ntp_string.h b/include/ntp_string.h new file mode 100644 index 000000000000..f7f0092ae493 --- /dev/null +++ b/include/ntp_string.h @@ -0,0 +1,48 @@ +/* + * Define string ops: strchr strrchr memcmp memmove memset + */ + +#ifndef _ntp_string_h +#define _ntp_string_h + +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_MEMORY_H +# include +#endif + +#ifdef HAVE_STRING_H +# include +#endif + +#ifdef HAVE_BSTRING_H +# include +#endif + +#ifndef STDC_HEADERS +# ifndef HAVE_STRCHR +# include +# define strchr index +# define strrchr rindex +# endif +# ifndef __GNUC__ +char *strchr(), *strrchr(); +# endif +# ifndef HAVE_MEMCPY +# define NTP_NEED_BOPS +# endif +#endif /* STDC_HEADERS */ + +#ifdef NTP_NEED_BOPS +# define memcmp(a,b,c) bcmp(a,b,(int)c) +# define memmove(t,f,c) bcopy(f,t,(int)c) +# define memcpy(t,f,c) bcopy(f,t,(int)c) +# define memset(a,x,c) if (x == 0x00) bzero(a,(int)c); else ntp_memset((char*)a,x,c) + +void ntp_memset P((char *, int, int)); + +#endif /* NTP_NEED_BOPS */ + +#endif /* _ntp_string_h */ -- cgit v1.2.3