Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nadezhda Ivanova
OpenLDAP
Commits
83408503
Commit
83408503
authored
May 24, 1999
by
Kurt Zeilenga
Browse files
Eliminate DECL_STRDUP check in favor of simple fix to <ac/string.h> header.
Add #undef and other protection of macros.
parent
e8116a8a
Changes
9
Hide whitespace changes
Inline
Side-by-side
build/openldap.m4
View file @
83408503
...
...
@@ -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;"
...
...
configure
View file @
83408503
...
...
@@ -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
...
...
configure.in
View file @
83408503
...
...
@@ -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
...
...
include/ac/assert.h
View file @
83408503
...
...
@@ -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 )
...
...
include/ac/ctype.h
View file @
83408503
...
...
@@ -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))
...
...
include/ac/signal.h
View file @
83408503
...
...
@@ -14,6 +14,7 @@
#include
<signal.h>
#undef SIGNAL
#ifdef HAVE_SIGSET
#define SIGNAL sigset
#else
...
...
include/ac/string.h
View file @
83408503
...
...
@@ -55,10 +55,8 @@ 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
/* some systems fail to declare strdup */
extern
char
*
(
strdup
)();
#endif
/*
...
...
include/ldap_pvt.h
View file @
83408503
...
...
@@ -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
...
...
include/portable.h.in
View file @
83408503
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment