3 * Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
6 * Redistribution and use in source and binary forms are permitted only
7 * as authorized by the OpenLDAP Public License. A copy of this
8 * license is available at http://www.OpenLDAP.org/license.html or
9 * in file LICENSE in the top-level directory of the distribution.
33 # define strrchr rindex
38 # define memcpy(d, s, n) ((void) bcopy ((s), (d), (n)))
40 # define memmove(d, s, n) ((void) bcopy ((s), (d), (n)))
44 /* use ldap_pvt_strtok instead of strtok or strtok_r! */
45 extern char *ldap_pvt_strtok( char *str, const char *delim, char **pos );
47 extern char *ldap_pvt_strdup( const char * s );
49 /* strdup() is missing, declare our own version */
51 # define strdup(s) ldap_pvt_strdup(s)
53 /* some systems fail to declare strdup */
54 extern char *(strdup)();
58 * some systems fail to declare strcasecmp() and strncasecmp()
59 * we need them declared so we can obtain pointers to them
61 extern int (strcasecmp)();
62 extern int (strncasecmp)();
65 # if defined( HAVE_MEMMOVE )
66 # define SAFEMEMCPY( d, s, n ) memmove((d), (s), (n))
67 # elif defined( HAVE_BCOPY )
68 # define SAFEMEMCPY( d, s, n ) bcopy((s), (d), (n))
70 /* nothing left but memcpy() */
71 # define SAFEMEMCPY( d, s, n ) memcpy((d), (s), (n))
75 #endif /* _AC_STRING_H */