summaryrefslogtreecommitdiffstats
path: root/usr.sbin/xntpd/include/ntp_string.h
blob: f17905ea8f71142dc31c064cc98239c44555496b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * Define bcopy, bzero, and bcmp and string op's
 */

#ifndef  _ntp_string_h
#define  _ntp_string_h

#ifdef NTP_POSIX_SOURCE

#if defined(HAVE_MEMORY_H)
#include <memory.h>
#endif

#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 /* NTP_POSIX_SOURCE */

#include <strings.h>

#define  strrchr    rindex
#define  strchr     index

#endif /*  NTP_POSIX_SOURCE */

#endif /* _ntp_string_h */
OpenPOWER on IntegriCloud