4 * Copyright 1998-2000 The OpenLDAP Foundation, Redwood City, California, USA
7 * Redistribution and use in source and binary forms are permitted only
8 * as authorized by the OpenLDAP Public License. A copy of this
9 * license is available at http://www.OpenLDAP.org/license.html or
10 * in file LICENSE in the top-level directory of the distribution.
34 # define strrchr rindex
39 # define memcpy(d, s, n) ((void) bcopy ((s), (d), (n)))
41 # define memmove(d, s, n) ((void) bcopy ((s), (d), (n)))
45 /* use ldap_pvt_strtok instead of strtok or strtok_r! */
46 LDAP_F(char *) ldap_pvt_strtok LDAP_P(( char *str, const char *delim,
50 /* strdup() is missing, declare our own version */
52 # define strdup(s) ber_strdup(s)
54 /* some systems fail to declare strdup */
55 LDAP_LIBC_F(char *) (strdup)();
59 * some systems fail to declare strcasecmp() and strncasecmp()
60 * we need them declared so we can obtain pointers to them
63 /* In Mingw32, strcasecmp is not in the C library, so we don't LIBC_F it */
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 */