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
openldap
OpenLDAP
Commits
4d5ecb6c
Commit
4d5ecb6c
authored
Aug 13, 2005
by
Kurt Zeilenga
Browse files
replace sig_atomic_t and socklen_t macros
parent
f799a2e4
Changes
4
Hide whitespace changes
Inline
Side-by-side
build/openldap.m4
View file @
4d5ecb6c
...
...
@@ -1053,35 +1053,6 @@ fi
])dnl
dnl
dnl ====================================================================
dnl Define sig_atomic_t if not defined in signal.h
AC_DEFUN([OL_TYPE_SIG_ATOMIC_T],
[AC_CACHE_CHECK(for sig_atomic_t, ol_cv_type_sig_atomic_t,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>]], [[sig_atomic_t atomic;]])],[ol_cv_type_sig_atomic_t=yes],[ol_cv_type_sig_atomic_t=no])])
if test $ol_cv_type_sig_atomic_t = no; then
AC_DEFINE(sig_atomic_t,int,
[define to atomic type if sig_atomic_t is not available])
fi
])dnl
dnl
dnl ====================================================================
dnl Define socklen_t if not defined in sys/types.h or sys/socket.h
AC_DEFUN([OL_TYPE_SOCKLEN_T],
[AC_CACHE_CHECK(for socklen_t, ol_cv_type_socklen_t,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
]], [[socklen_t len;]])],[ol_cv_type_socklen_t=yes],[ol_cv_type_socklen_t=no])])
if test $ol_cv_type_socklen_t = no; then
AC_DEFINE(socklen_t, int,
[define to int if socklen_t is not available])
fi
])dnl
dnl
dnl ====================================================================
dnl Define inet_aton is available
AC_DEFUN([OL_FUNC_INET_ATON],
[AC_CACHE_CHECK([for inet_aton()], ol_cv_func_inet_aton,
...
...
configure
View file @
4d5ecb6c
#! /bin/sh
# From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.586.2.1
5
2005/08/1
2 22:48:41
kurt Exp .
# From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.586.2.1
6
2005/08/1
3 00:17:19
kurt Exp .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59.
#
...
...
@@ -47528,9 +47528,9 @@ _ACEOF
fi
echo "$as_me:$LINENO: checking
return type of signal handlers
" >&5
echo $ECHO_N "checking
return type of signal handlers
... $ECHO_C" >&6
if test "${ac_cv_type_s
ignal
+set}" = set; then
echo "$as_me:$LINENO: checking
for socklen_t
" >&5
echo $ECHO_N "checking
for socklen_t
... $ECHO_C" >&6
if test "${ac_cv_type_s
ocklen_t
+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
...
...
@@ -47539,21 +47539,14 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
#include <signal.h>
#ifdef signal
# undef signal
#endif
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
#else
void (*signal ()) ();
#endif
$ac_includes_default
int
main ()
{
int i;
if ((socklen_t *) 0)
return 0;
if (sizeof (socklen_t))
return 0;
;
return 0;
}
...
...
@@ -47580,64 +47573,31 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_type_s
ignal=void
ac_cv_type_s
ocklen_t=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_type_s
ignal=int
ac_cv_type_s
ocklen_t=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
echo "${ECHO_T}$ac_cv_type_signal" >&6
cat >>confdefs.h <<_ACEOF
#define RETSIGTYPE $ac_cv_type_signal
_ACEOF
echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
if test "${ac_cv_type_uid_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
if test $ac_cv_type_socklen_t = yes; then
:
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
cat >>confdefs.h <<_ACEOF
#define socklen_t int
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "uid_t" >/dev/null 2>&1; then
ac_cv_type_uid_t=yes
else
ac_cv_type_uid_t=no
fi
rm -f conftest*
fi
echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
echo "${ECHO_T}$ac_cv_type_uid_t" >&6
if test $ac_cv_type_uid_t = no; then
cat >>confdefs.h <<\_ACEOF
#define uid_t int
_ACEOF
cat >>confdefs.h <<\_ACEOF
#define gid_t int
_ACEOF
fi
echo "$as_me:$LINENO: checking for socklen_t" >&5
echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
if test "${ol_cv_type_socklen_t+set}" = set; then
echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
if test "${ac_cv_type_sig_atomic_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
...
...
@@ -47646,18 +47606,14 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
$ac_includes_default
int
main ()
{
socklen_t len;
if ((sig_atomic_t *) 0)
return 0;
if (sizeof (sig_atomic_t))
return 0;
;
return 0;
}
...
...
@@ -47684,28 +47640,31 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ol
_cv_type_s
ocklen
_t=yes
ac
_cv_type_s
ig_atomic
_t=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ol
_cv_type_s
ocklen
_t=no
ac
_cv_type_s
ig_atomic
_t=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ol_cv_type_socklen_t" >&5
echo "${ECHO_T}$ol_cv_type_socklen_t" >&6
if test $ol_cv_type_socklen_t = no; then
echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
if test $ac_cv_type_sig_atomic_t = yes; then
:
else
cat >>confdefs.h <<
\
_ACEOF
#define s
ocklen
_t int
cat >>confdefs.h <<_ACEOF
#define s
ig_atomic
_t int
_ACEOF
fi
fi
echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
if test "${ol_cv_type_sig_atomic_t+set}" = set; then
echo "$as_me:$LINENO: checking return type of signal handlers" >&5
echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
if test "${ac_cv_type_signal+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
...
...
@@ -47714,11 +47673,21 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
#include <signal.h>
#ifdef signal
# undef signal
#endif
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
#else
void (*signal ()) ();
#endif
int
main ()
{
sig_atomic_t atomic
;
int i
;
;
return 0;
}
...
...
@@ -47745,24 +47714,60 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ol
_cv_type_sig
_atomic_t=yes
ac
_cv_type_sig
nal=void
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ol
_cv_type_sig
_atomic_t=no
ac
_cv_type_sig
nal=int
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ol_cv_type_sig_atomic_t" >&5
echo "${ECHO_T}$ol_cv_type_sig_atomic_t" >&6
if test $ol_cv_type_sig_atomic_t = no; then
echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
echo "${ECHO_T}$ac_cv_type_signal" >&6
cat >>confdefs.h <<_ACEOF
#define RETSIGTYPE $ac_cv_type_signal
_ACEOF
echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
if test "${ac_cv_type_uid_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "uid_t" >/dev/null 2>&1; then
ac_cv_type_uid_t=yes
else
ac_cv_type_uid_t=no
fi
rm -f conftest*
fi
echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
echo "${ECHO_T}$ac_cv_type_uid_t" >&6
if test $ac_cv_type_uid_t = no; then
cat >>confdefs.h <<\_ACEOF
#define
sig_atomic
_t int
#define
uid
_t int
_ACEOF
fi
cat >>confdefs.h <<\_ACEOF
#define gid_t int
_ACEOF
fi
echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
...
...
@@ -48014,6 +48019,7 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <pwd.h>
int
...
...
@@ -48059,6 +48065,7 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <pwd.h>
int
...
...
@@ -48126,6 +48133,7 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <pwd.h>
int
...
...
@@ -48171,6 +48179,7 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <pwd.h>
int
configure.in
View file @
4d5ecb6c
...
...
@@ -2402,17 +2402,28 @@ AC_CHECK_TYPE(size_t, unsigned)
AC_CHECK_TYPES([long long])
AC_CHECK_TYPES([ptrdiff_t])
AC_CHECK_TYPE([socklen_t], [int],,,[$ac_includes_default
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
])
AC_CHECK_TYPE([sig_atomic_t], [int],,,[$ac_includes_default
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
])
AC_TYPE_SIGNAL
AC_TYPE_UID_T
dnl AC_TYPE_GETGROUPS
OL_TYPE_SOCKLEN_T
OL_TYPE_SIG_ATOMIC_T
AC_HEADER_TIME
AC_STRUCT_TM
AC_CHECK_MEMBERS([struct stat.st_blksize])
AC_CHECK_MEMBERS([struct passwd.pw_gecos],,,[#include <pwd.h>])
AC_CHECK_MEMBERS([struct passwd.pw_passwd],,,[#include <pwd.h>])
AC_CHECK_MEMBERS([struct passwd.pw_gecos],,,[$ac_includes_default
#include <pwd.h>])
AC_CHECK_MEMBERS([struct passwd.pw_passwd],,,[$ac_includes_default
#include <pwd.h>])
OL_C_UPPER_LOWER
AC_C_CONST
...
...
include/portable.hin
View file @
4d5ecb6c
...
...
@@ -1069,7 +1069,7 @@
/* Define to `int' if <sys/types.h> does not define. */
#undef pid_t
/*
d
efine to
atomic type if sig_atomic_t is not available
*/
/*
D
efine to
`int' if <sys/types.h> does not define.
*/
#undef sig_atomic_t
/* Define to `unsigned' if <sys/types.h> does not define. */
...
...
@@ -1078,7 +1078,7 @@
/* define to snprintf routine */
#undef snprintf
/*
d
efine to int if
socklen_t is not available
*/
/*
D
efine to
`
int
'
if
<sys/types.h> does not define.
*/
#undef socklen_t
/* Define to `signed int' if <sys/types.h> does not define. */
...
...
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