From 73bcf38e2c68778eeb130c58decad37ae45ab8bb Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 2 Mar 1999 18:44:55 +0000 Subject: [PATCH] Update ac headers from devel --- include/ac/ctype.h | 2 +- include/ac/string.h | 9 ++++++--- include/ac/sysexits.h | 22 ++++++++++++++++++++++ 3 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 include/ac/sysexits.h diff --git a/include/ac/ctype.h b/include/ac/ctype.h index b58d96fc6f..b5638fe97d 100644 --- a/include/ac/ctype.h +++ b/include/ac/ctype.h @@ -16,7 +16,7 @@ #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) diff --git a/include/ac/string.h b/include/ac/string.h index 7a799e0d7f..b5357e4b82 100644 --- a/include/ac/string.h +++ b/include/ac/string.h @@ -32,21 +32,25 @@ # 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 @@ -67,5 +71,4 @@ extern int strcasecmp(), strncasecmp(); # endif #endif - #endif /* _AC_STRING_H */ diff --git a/include/ac/sysexits.h b/include/ac/sysexits.h new file mode 100644 index 0000000000..91dec205e2 --- /dev/null +++ b/include/ac/sysexits.h @@ -0,0 +1,22 @@ +/* + * 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 +#else +# include +#endif + +#endif /* _AC_SYSEXITS_H_ */