1/*
2 * Copyright 2005-2012 Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
5
6/*
7   Make life easier for those porting old Berkeley style
8   code...
9*/
10#ifndef _BSD_MEM_H_
11#define _BSD_MEM_H_
12
13#ifndef USG   /* when this is defined, these aren't needed */
14
15#ifndef bcopy
16#define bcopy(s, d, l)  memmove(d, s, l)
17#endif
18#ifndef bzero
19#define bzero(s, l)  memset(s, 0, l)
20#endif
21#ifndef bcmp
22#define bcmp(a, b, len) memcmp(a, b, len)
23#endif
24
25#ifndef index
26#define index(str, chr) strchr(str, chr)
27#endif
28#ifndef rindex
29#define rindex(str, chr) strrchr(str, chr)
30#endif
31
32#endif /* USG */
33
34#endif /* _BSD_MEM_H_ */
35