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.
29 /* we should actually create <ac/stdlib.h> */
38 # define strrchr rindex
43 # define memcpy(d, s, n) ((void) bcopy ((s), (d), (n)))
45 # define memmove(d, s, n) ((void) bcopy ((s), (d), (n)))
49 /* use ldap_pvt_strtok instead of strtok or strtok_r! */
50 extern char *ldap_pvt_strtok( char *str, const char *delim, char **pos );
52 extern char *ldap_pvt_strdup( const char * s );
54 /* strdup() is missing, declare our own version */
56 # define strdup(s) ldap_pvt_strdup(s)
59 /* some systems fail to declare strdup */
60 extern char *(strdup)();
65 * some systems fail to declare strcasecmp() and strncasecmp()
66 * we need them declared so we can obtain pointers to them
68 extern int (strcasecmp)();
69 extern int (strncasecmp)();
72 # if defined( HAVE_MEMMOVE )
73 # define SAFEMEMCPY( d, s, n ) memmove((d), (s), (n))
74 # elif defined( HAVE_BCOPY )
75 # define SAFEMEMCPY( d, s, n ) bcopy((s), (d), (n))
77 /* nothing left but memcpy() */
78 # define SAFEMEMCPY( d, s, n ) memcpy((d), (s), (n))
83 #endif /* _AC_STRING_H */