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
b867b4f4
Commit
b867b4f4
authored
Aug 12, 2005
by
Kurt Zeilenga
Browse files
Replace openldap.m4/AC_COMPILE_CHECK_SIZEOF use with AC_CHECK_SIZEOF
Use AC_CHECK_TYPE(S) instead of old macros
parent
7434c310
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
build/openldap.m4
View file @
b867b4f4
...
...
@@ -65,34 +65,6 @@ dnl AC_MSG_RESULT([OpenLDAP --with-$1 $ol_with_$1])
])dnl
dnl
dnl ====================================================================
dnl
AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
[changequote(<<, >>)dnl
dnl The name to #define.
define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
dnl The cache variable name.
define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
changequote([, ])dnl
AC_MSG_CHECKING(size of $1)
AC_CACHE_VAL(AC_CV_NAME,
[for ac_size in 4 8 1 2 16 $2 ; do # List sizes in rough order of prevalence.
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "confdefs.h"
#include <stdlib.h>
#include <sys/types.h>
$2
]], [[switch (0) case 0: case (sizeof ($1) == $ac_size):;]])],[AC_CV_NAME=$ac_size],[])
if test x$AC_CV_NAME != x ; then break; fi
done
])
if test x$AC_CV_NAME = x ; then
AC_MSG_ERROR([cannot determine a size for $1])
fi
AC_MSG_RESULT($AC_CV_NAME)
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
undefine([AC_TYPE_NAME])dnl
undefine([AC_CV_NAME])dnl
])
dnl ====================================================================
dnl check if hard links are supported.
dnl
AC_DEFUN([OL_PROG_LN_H], [# test for ln hardlink support
...
...
configure
View file @
b867b4f4
This diff is collapsed.
Click to expand it.
configure.in
View file @
b867b4f4
...
...
@@ -2418,28 +2418,23 @@ fi
dnl ----------------------------------------------------------------
dnl Checks for typedefs, structures, and compiler characteristics.
dnl Checks for long long
AC_C
ACHE_CHECK([long long], ol_cv_type_long_long, [
AC_C
OMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[long long x;]])],[ol_cv_type_long_long=yes],[ol_cv_type_long_long=no])]
)
if test $ol_cv_type_long_long = yes; then
AC_
DEFINE(HAVE_LONG_LONG, 1, [define if you have 'long long'
])
fi
AC_CHECK_TYPE(mode_t, int)
AC_C
HECK_TYPE(off_t, long)
AC_C
HECK_TYPE(pid_t, int
)
AC_CHECK_TYPE(ssize_t, [signed int])
AC_
CHECK_TYPE(caddr_t, [char *
])
AC_CHECK_TYPE(size_t, unsigned)
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_CHECK_TYPES([long long])
AC_CHECK_TYPES([ptrdiff_t])
AC_TYPE_SIGNAL
AC_TYPE_SIZE_T
AC_
CHECK_TYPE(ssize_t, [signed int])
AC_
CHECK_TYPE(caddr_t, [char *])
AC_
TYPE_SIGNAL
AC_
TYPE_UID_T
OL_TYPE_SOCKLEN_T
AC_CHECK_MEMBERS([struct stat.st_blksize])
AC_HEADER_TIME
AC_STRUCT_TM
AC_TYPE_UID_T
OL_TYPE_SIG_ATOMIC_T
dnl AC_TYPE_GETGROUPS
...
...
@@ -2458,10 +2453,10 @@ else
AC_C_BIGENDIAN
fi
AC_
COMPILE_
CHECK_SIZEOF(short)
AC_
COMPILE_
CHECK_SIZEOF(int)
AC_
COMPILE_
CHECK_SIZEOF(long)
AC_
COMPILE_
CHECK_SIZEOF(wchar_t)
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(wchar_t)
if test "$ac_cv_sizeof_int" -lt 4 ; then
AC_MSG_WARN([OpenLDAP requires 'int' to be 32 bits or greater.])
...
...
include/portable.hin
View file @
b867b4f4
...
...
@@ -358,7 +358,7 @@
/* Define to 1 if you have the `lockf' function. */
#undef HAVE_LOCKF
/*
d
efine
if you hav
e
'
long long' */
/*
D
efine
to 1 if the system has the typ
e
`
long long'
.
*/
#undef HAVE_LONG_LONG
/* Define to 1 if you have the <ltdl.h> header file. */
...
...
@@ -912,16 +912,16 @@
/* Define to the type of arg 5 for `select'. */
#undef SELECT_TYPE_ARG5
/* The
number of bytes in type int
*/
/* The
size of a `int', as computed by sizeof.
*/
#undef SIZEOF_INT
/* The
number of bytes in type long
*/
/* The
size of a `long', as computed by sizeof.
*/
#undef SIZEOF_LONG
/* The
number of bytes in type short
*/
/* The
size of a `short', as computed by sizeof.
*/
#undef SIZEOF_SHORT
/* The
number of bytes in type wchar_t
*/
/* The
size of a `wchar_t', as computed by sizeof.
*/
#undef SIZEOF_WCHAR_T
/* define to support per-object ACIs */
...
...
Write
Preview
Markdown
is supported
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