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> */
36 # define strrchr rindex
40 # define memcpy(d, s, n) ((void) bcopy ((s), (d), (n)))
41 # define memmove(d, s, n) ((void) bcopy ((s), (d), (n)))
46 /* strdup() is missing, declare our own version */
47 extern char *ldap_pvt_strdup( const char * s );
48 # define strdup ldap_pvt_strdup
50 /* some systems fail to declare strdup */
51 extern char *strdup();
55 * some systems fail to declare strcasecmp() and strncasecmp()
56 * we need them declared so we can obtain pointers to them
58 extern int strcasecmp(), strncasecmp();
61 # if defined( HAVE_MEMMOVE )
62 # define SAFEMEMCPY( d, s, n ) memmove((d), (s), (n))
63 # elif defined( HAVE_BCOPY )
64 # define SAFEMEMCPY( d, s, n ) bcopy((s), (d), (n))
66 /* nothing left but memcpy() */
67 # define SAFEMEMCPY( d, s, n ) memcpy((d), (s), (n))
72 #endif /* _AC_STRING_H */