PageRenderTime 19ms CodeModel.GetById 12ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/contrib/ntp/include/ntp_string.h

https://bitbucket.org/freebsd/freebsd-head/
C++ Header | 48 lines | 35 code | 10 blank | 3 comment | 3 complexity | 8afe49e936ca3f729a54f309c00f7117 MD5 | raw file
 1/*
 2 * Define string ops: strchr strrchr memcmp memmove memset 
 3 */
 4
 5#ifndef  _ntp_string_h
 6#define  _ntp_string_h
 7
 8#ifdef HAVE_CONFIG_H
 9#include <config.h>
10#endif
11
12#ifdef HAVE_MEMORY_H
13# include <memory.h>
14#endif
15
16#ifdef HAVE_STRING_H
17# include <string.h>
18#endif
19
20#ifdef HAVE_BSTRING_H
21# include <bstring.h>
22#endif
23
24#ifndef STDC_HEADERS
25# ifndef HAVE_STRCHR
26#  include <strings.h>
27#  define strchr index
28#  define strrchr rindex
29# endif
30# ifndef __GNUC__
31char *strchr(), *strrchr();
32# endif
33# ifndef HAVE_MEMCPY
34#  define NTP_NEED_BOPS
35# endif
36#endif /* STDC_HEADERS */
37
38#ifdef NTP_NEED_BOPS
39# define memcmp(a,b,c) bcmp(a,b,(int)c)
40# define memmove(t,f,c) bcopy(f,t,(int)c)
41# define memcpy(t,f,c) bcopy(f,t,(int)c)
42# define memset(a,x,c) if (x == 0x00) bzero(a,(int)c); else ntp_memset((char*)a,x,c)
43
44void ntp_memset P((char *, int, int));
45
46#endif /*  NTP_NEED_BOPS */
47
48#endif /* _ntp_string_h */