1999-12-09 13:01:21 +00:00
|
|
|
/*
|
2014-12-20 22:52:39 +00:00
|
|
|
* Define string ops: strchr strrchr memcmp memmove memset
|
1999-12-09 13:01:21 +00:00
|
|
|
*/
|
|
|
|
|
2014-12-20 22:52:39 +00:00
|
|
|
#ifndef NTP_STRING_H
|
|
|
|
#define NTP_STRING_H
|
1999-12-09 13:01:21 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_MEMORY_H
|
|
|
|
# include <memory.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_STRING_H
|
|
|
|
# include <string.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_BSTRING_H
|
|
|
|
# include <bstring.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef NTP_NEED_BOPS
|
|
|
|
|
2013-12-04 21:33:17 +00:00
|
|
|
#ifdef HAVE_STRINGS_H
|
|
|
|
# include <strings.h> /* bcmp, bcopy, bzero */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void ntp_memset (char *, int, int);
|
1999-12-09 13:01:21 +00:00
|
|
|
|
2013-12-04 21:33:17 +00:00
|
|
|
#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 (0 == (x)) \
|
|
|
|
bzero(a, (int)(c)); \
|
|
|
|
else \
|
|
|
|
ntp_memset((char *)(a), x, c)
|
1999-12-09 13:01:21 +00:00
|
|
|
#endif /* NTP_NEED_BOPS */
|
|
|
|
|
2014-12-20 22:52:39 +00:00
|
|
|
#endif /* NTP_STRING_H */
|