*** empty log message ***
[midnight-commander.git] / src / mem.h
blob763748757c1a21014a5cda208998d53b3214640f
1 #ifndef __MEM_H
2 #define __MEM_H
4 #if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
5 # include <string.h>
6 /* An ANSI string.h and pre-ANSI memory.h might conflict */
7 # if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H)
8 # include <memory.h>
9 # endif /* not STDC_HEADERS and HAVE_MEMORY_H */
11 # ifndef index
12 # define index strchr
13 # endif
15 # ifndef rindex
16 # define rindex strrchr
17 # endif
19 # undef bcopy
20 # define bcopy(s,d,n) memcpy ((d), (s), (n))
22 # undef bcmp
23 # define bcmp(s1,s2,n) memcmp ((s1), (s2), (n))
25 # undef bzero
26 # define bzero(s,n) memset ((s), 0, (n))
28 #else /* not STDC_HEADERS and not HAVE_STRING_H */
29 # include <strings.h>
30 /* memory and strings.h conflict on other systems */
31 #endif /* not STDC_HEADERS and not HAVE_STRING_H */
32 #endif /* __MEM_H */