mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-22 07:39:35 -05:00
Eliminate DECL_STRDUP check in favor of simple fix to <ac/string.h> header.
Add #undef and other protection of macros.
This commit is contained in:
parent
e8116a8a74
commit
83408503a7
9 changed files with 8 additions and 70 deletions
|
|
@ -626,25 +626,6 @@ if test $ol_cv_dcl_sys_errlist = no ; then
|
|||
fi
|
||||
])dnl
|
||||
dnl
|
||||
dnl ====================================================================
|
||||
dnl Check to see if we should not declare strdup if we have it
|
||||
dnl
|
||||
AC_DEFUN([OL_DECL_STRDUP],
|
||||
[
|
||||
AC_MSG_CHECKING([strdup declaration])
|
||||
AC_CACHE_VAL(ol_cv_dcl_strdup,[
|
||||
AC_TRY_COMPILE([
|
||||
#include <string.h> ],
|
||||
[extern char *(strdup)();],
|
||||
[ol_cv_dcl_strdup=yes],
|
||||
[ol_cv_dcl_strdup=no])])
|
||||
AC_MSG_RESULT($ol_cv_dcl_strdup)
|
||||
if test $ol_cv_dcl_strdup = yes ; then
|
||||
AC_DEFINE(DECL_STRDUP,1,
|
||||
[define if you have strdup() but it's not declared])
|
||||
fi
|
||||
])dnl
|
||||
|
||||
dnl ====================================================================
|
||||
dnl Early MIPS compilers (used in Ultrix 4.2) don't like
|
||||
dnl "int x; int *volatile a = &x; *a = 0;"
|
||||
|
|
|
|||
37
configure
vendored
37
configure
vendored
|
|
@ -11227,43 +11227,6 @@ fi
|
|||
|
||||
|
||||
|
||||
echo $ac_n "checking strdup declaration""... $ac_c" 1>&6
|
||||
echo "configure:11232: checking strdup declaration" >&5
|
||||
if eval "test \"`echo '$''{'ol_cv_dcl_strdup'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 11238 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <string.h>
|
||||
int main() {
|
||||
extern char *(strdup)();
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:11246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ol_cv_dcl_strdup=yes
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
ol_cv_dcl_strdup=no
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
|
||||
echo "$ac_t""$ol_cv_dcl_strdup" 1>&6
|
||||
if test $ol_cv_dcl_strdup = yes ; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define DECL_STRDUP 1
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test "$ol_enable_debug" != no ; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define LDAP_DEBUG 1
|
||||
|
|
|
|||
|
|
@ -1600,10 +1600,6 @@ dnl ----------------------------------------------------------------
|
|||
# Check Configuration
|
||||
OL_SYS_ERRLIST
|
||||
|
||||
dnl ----------------------------------------------------------------
|
||||
dnl Check our declaration of strdup()
|
||||
OL_DECL_STRDUP
|
||||
|
||||
dnl ----------------------------------------------------------------
|
||||
dnl Sort out defines
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
#ifndef _AC_ASSERT_H
|
||||
#define _AC_ASSERT_H
|
||||
|
||||
#undef assert
|
||||
|
||||
#ifdef LDAP_DEBUG
|
||||
|
||||
#if defined( HAVE_ASSERT_H ) || defined( STDC_HEADERS )
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@
|
|||
|
||||
#include <ctype.h>
|
||||
|
||||
#undef TOUPPER
|
||||
#undef TOLOWER
|
||||
|
||||
#ifdef C_UPPER_LOWER
|
||||
# define TOUPPER(c) (islower(c) ? toupper(c) : (c))
|
||||
# define TOLOWER(c) (isupper(c) ? tolower(c) : (c))
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
#include <signal.h>
|
||||
|
||||
#undef SIGNAL
|
||||
#ifdef HAVE_SIGSET
|
||||
#define SIGNAL sigset
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -55,11 +55,9 @@ extern char *ldap_pvt_strdup( const char * s );
|
|||
# undef strdup
|
||||
# define strdup(s) ldap_pvt_strdup(s)
|
||||
#else
|
||||
# ifdef DECL_STRDUP
|
||||
/* some systems fail to declare strdup */
|
||||
extern char *(strdup)();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* some systems fail to declare strcasecmp() and strncasecmp()
|
||||
|
|
|
|||
|
|
@ -44,9 +44,6 @@ ldap_pvt_gethostbyaddr_a LDAP_P((
|
|||
struct hostent **result,
|
||||
int *herrno_ptr ));
|
||||
|
||||
LDAP_F( void )
|
||||
ldap_pvt_init_utils LDAP_P(( void ));
|
||||
|
||||
LDAP_END_DECL
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -747,9 +747,6 @@
|
|||
/* define if you actually have sys_errlist in your libs */
|
||||
#undef HAVE_SYS_ERRLIST
|
||||
|
||||
/* define if you have strdup() but it's not declared */
|
||||
#undef DECL_STRDUP
|
||||
|
||||
/* begin of postamble */
|
||||
|
||||
#ifdef HAVE_STDDEF_H
|
||||
|
|
|
|||
Loading…
Reference in a new issue