4 * Copyright 1998,1999 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)))
48 # define LDAP_F_PRE extern __declspec(LIBLDAP_DECL)
50 # define LDAP_F_PRE extern
54 /* use ldap_pvt_strtok instead of strtok or strtok_r! */
55 LDAP_F(char *) ldap_pvt_strtok LDAP_P((
56 char *str, const char *delim, char **pos ));
58 LDAP_F(char *) ldap_pvt_strdup LDAP_P((
62 /* strdup() is missing, declare our own version */
64 # define strdup(s) ldap_pvt_strdup(s)
66 /* some systems fail to declare strdup */
67 extern char *(strdup)();
71 * some systems fail to declare strcasecmp() and strncasecmp()
72 * we need them declared so we can obtain pointers to them
74 extern int (strcasecmp)();
75 extern int (strncasecmp)();
78 # if defined( HAVE_MEMMOVE )
79 # define SAFEMEMCPY( d, s, n ) memmove((d), (s), (n))
80 # elif defined( HAVE_BCOPY )
81 # define SAFEMEMCPY( d, s, n ) bcopy((s), (d), (n))
83 /* nothing left but memcpy() */
84 # define SAFEMEMCPY( d, s, n ) memcpy((d), (s), (n))
88 #endif /* _AC_STRING_H */