37
/* This is needed for the definitions of bzero... on solaris */
38
#if defined(HAVE_STRINGS_H)
42
39
/* This is needed for the definitions of memcpy... on solaris */
43
40
#if defined(HAVE_MEMORY_H) && !defined(__cplusplus)
44
41
#include <memory.h>
47
#if !defined(HAVE_MEMCPY) && !defined(HAVE_MEMMOVE)
48
# define memcpy(d, s, n) bcopy ((s), (d), (n))
49
# define memset(A,C,B) bfill((A),(B),(C))
50
# define memmove(d, s, n) bmove ((d), (s), (n))
51
#elif defined(HAVE_MEMMOVE)
52
# define bmove(d, s, n) memmove((d), (s), (n))
54
# define memmove(d, s, n) bmove((d), (s), (n)) /* our bmove */
58
#if !defined(HAVE_BFILL)
59
# define bfill(A,B,C) memset((A),(C),(B))
60
# define bmove_align(A,B,C) memcpy((A),(B),(C))
63
#if !defined(HAVE_BCMP)
64
# define bcopy(s, d, n) memcpy((d), (s), (n))
65
# define bcmp(A,B,C) memcmp((A),(B),(C))
66
# define bzero(A,B) memset((A),0,(B))
67
# define bmove_align(A,B,C) memcpy((A),(B),(C))
70
44
#if defined(__cplusplus)
93
67
#define strmake_overlapp(A,B,C) strmake(A,B,C)
96
#ifdef BAD_MEMCPY /* Problem with gcc on Alpha */
97
#define memcpy_fixed(A,B,C) bmove((A),(B),(C))
99
#define memcpy_fixed(A,B,C) memcpy((A),(B),(C))
102
70
#if (!defined(USE_BMOVE512) || defined(HAVE_purify)) && !defined(bmove512)
103
71
#define bmove512(A,B,C) memcpy(A,B,C)
106
74
/* Prototypes for string functions */
108
#if !defined(bfill) && !defined(HAVE_BFILL)
109
extern void bfill(uchar *dst,size_t len,char fill);
112
#if !defined(bzero) && !defined(HAVE_BZERO)
113
extern void bzero(uchar * dst,size_t len);
116
#if !defined(bcmp) && !defined(HAVE_BCMP)
117
extern size_t bcmp(const uchar *s1,const uchar *s2,size_t len);
120
extern size_t my_bcmp(const uchar *s1,const uchar *s2,size_t len);
122
#define bcmp(A,B,C) my_bcmp((A),(B),(C))
123
#define bzero_if_purify(A,B) bzero(A,B)
125
#define bzero_if_purify(A,B)
126
#endif /* HAVE_purify */
129
77
extern void bmove512(uchar *dst,const uchar *src,size_t len);
132
#if !defined(HAVE_BMOVE) && !defined(bmove)
133
extern void bmove(uuchar *dst, const uchar *src,size_t len);
136
80
extern void bmove_upp(uchar *dst,const uchar *src,size_t len);
137
81
extern void bchange(uchar *dst,size_t old_len,const uchar *src,
138
82
size_t new_len,size_t tot_len);