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 LDAP_F(char *) ldap_pvt_strtok LDAP_P((
46 char *str, const char *delim, char **pos ));
48 LDAP_F(char *) ldap_pvt_strdup LDAP_P((
52 /* strdup() is missing, declare our own version */
54 # define strdup(s) ldap_pvt_strdup(s)
56 /* some systems fail to declare strdup */
57 extern char *(strdup)();
61 * some systems fail to declare strcasecmp() and strncasecmp()
62 * we need them declared so we can obtain pointers to them
64 extern int (strcasecmp)();
65 extern int (strncasecmp)();
68 # if defined( HAVE_MEMMOVE )
69 # define SAFEMEMCPY( d, s, n ) memmove((d), (s), (n))
70 # elif defined( HAVE_BCOPY )
71 # define SAFEMEMCPY( d, s, n ) bcopy((s), (d), (n))
73 /* nothing left but memcpy() */
74 # define SAFEMEMCPY( d, s, n ) memcpy((d), (s), (n))
78 #endif /* _AC_STRING_H */