#ifdef C_UPPER_LOWER
# define TOUPPER(c) (islower(c) ? toupper(c) : (c))
-# define TOLOWER(c) (islower(c) ? toupper(c) : (c))
+# define TOLOWER(c) (isupper(c) ? tolower(c) : (c))
#else
# define TOUPPER(c) toupper(c)
# define TOLOWER(c) tolower(c)
# endif
# ifndef HAVE_STRRCHR
+# undef strchr
# define strchr index
+# undef strrchr
# define strrchr rindex
# endif
# ifndef HAVE_MEMCPY
+# undef memcpy
# define memcpy(d, s, n) ((void) bcopy ((s), (d), (n)))
+# undef memmove
# define memmove(d, s, n) ((void) bcopy ((s), (d), (n)))
# endif
#endif
#ifndef HAVE_STRDUP
/* strdup() is missing, declare our own version */
- extern char *strdup( const char *s );
+ extern char *strdup LDAP_P(( const char *s ));
#else
- /* some systems have strdup, but fail to declare it */
+ /* some systems have strdup(), but fail to declare it */
extern char *strdup();
#endif
# endif
#endif
-
#endif /* _AC_STRING_H */
--- /dev/null
+/*
+ * Generic sysexits
+ */
+/*
+ * Copyright 1999 The OpenLDAP Foundation, Redwood City, California, USA
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted only
+ * as authorized by the OpenLDAP Public License. A copy of this
+ * license is available at http://www.OpenLDAP.org/license.html or
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+#ifndef _AC_SYSEXITS_H_
+#define _AC_SYSEXITS_H_
+
+#ifdef HAVE_SYSEXITS_H
+# include <sysexits.h>
+#else
+# include <sysexits-compat.h>
+#endif
+
+#endif /* _AC_SYSEXITS_H_ */