Use 'long' for LBER_INT_T.

This commit is contained in:
Kurt Zeilenga 1999-11-25 17:45:21 +00:00
parent 62a06eda3e
commit c59d1a34db
3 changed files with 57 additions and 80 deletions

100
configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh
# $OpenLDAP$
# from OpenLDAP: pkg/ldap/configure.in,v 1.279 1999/11/17 01:26:55 kdz Exp
# from OpenLDAP: pkg/ldap/configure.in,v 1.280 1999/11/25 16:10:51 kdz Exp
# Copyright 1998,1999 The OpenLDAP Foundation. All Rights Reserved.
#
@ -14052,18 +14052,14 @@ EOF
if test "$ac_cv_sizeof_short" -lt 4 ; then
cat >> confdefs.h <<\EOF
if test "$ac_cv_sizeof_long" -lt 4 ; then
{ echo "configure: error: sizeof(long) < 4" 1>&2; exit 1; }
fi
cat >> confdefs.h <<\EOF
#define LBER_INT_T long
EOF
else
cat >> confdefs.h <<\EOF
#define LBER_INT_T short
EOF
fi
cat >> confdefs.h <<\EOF
#define LBER_LEN_T long
EOF
@ -14078,7 +14074,7 @@ EOF
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
echo "configure:14082: checking for 8-bit clean memcmp" >&5
echo "configure:14078: checking for 8-bit clean memcmp" >&5
if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -14086,7 +14082,7 @@ else
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
#line 14090 "configure"
#line 14086 "configure"
#include "confdefs.h"
main()
@ -14096,7 +14092,7 @@ main()
}
EOF
if { (eval echo configure:14100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:14096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
@ -14114,12 +14110,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
echo $ac_n "checking for strftime""... $ac_c" 1>&6
echo "configure:14118: checking for strftime" >&5
echo "configure:14114: checking for strftime" >&5
if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 14123 "configure"
#line 14119 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strftime(); below. */
@ -14143,7 +14139,7 @@ f = strftime;
; return 0; }
EOF
if { (eval echo configure:14147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:14143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_strftime=yes"
else
@ -14165,7 +14161,7 @@ else
echo "$ac_t""no" 1>&6
# strftime is in -lintl on SCO UNIX.
echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
echo "configure:14169: checking for strftime in -lintl" >&5
echo "configure:14165: checking for strftime in -lintl" >&5
ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -14173,7 +14169,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 14177 "configure"
#line 14173 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -14184,7 +14180,7 @@ int main() {
strftime()
; return 0; }
EOF
if { (eval echo configure:14188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:14184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -14212,12 +14208,12 @@ fi
echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
echo "configure:14216: checking for inet_aton()" >&5
echo "configure:14212: checking for inet_aton()" >&5
if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 14221 "configure"
#line 14217 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
@ -14239,7 +14235,7 @@ struct in_addr in;
int rc = inet_aton( "255.255.255.255", &in );
; return 0; }
EOF
if { (eval echo configure:14243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:14239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_func_inet_aton=yes
else
@ -14261,12 +14257,12 @@ EOF
echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
echo "configure:14265: checking for _spawnlp" >&5
echo "configure:14261: checking for _spawnlp" >&5
if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 14270 "configure"
#line 14266 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _spawnlp(); below. */
@ -14290,7 +14286,7 @@ f = _spawnlp;
; return 0; }
EOF
if { (eval echo configure:14294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:14290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func__spawnlp=yes"
else
@ -14314,12 +14310,12 @@ fi
echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
echo "configure:14318: checking for _snprintf" >&5
echo "configure:14314: checking for _snprintf" >&5
if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 14323 "configure"
#line 14319 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _snprintf(); below. */
@ -14343,7 +14339,7 @@ f = _snprintf;
; return 0; }
EOF
if { (eval echo configure:14347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:14343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func__snprintf=yes"
else
@ -14369,12 +14365,12 @@ fi
echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
echo "configure:14373: checking for _vsnprintf" >&5
echo "configure:14369: checking for _vsnprintf" >&5
if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 14378 "configure"
#line 14374 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _vsnprintf(); below. */
@ -14398,7 +14394,7 @@ f = _vsnprintf;
; return 0; }
EOF
if { (eval echo configure:14402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:14398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func__vsnprintf=yes"
else
@ -14424,12 +14420,12 @@ fi
echo $ac_n "checking for vprintf""... $ac_c" 1>&6
echo "configure:14428: checking for vprintf" >&5
echo "configure:14424: checking for vprintf" >&5
if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 14433 "configure"
#line 14429 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */
@ -14453,7 +14449,7 @@ f = vprintf;
; return 0; }
EOF
if { (eval echo configure:14457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:14453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vprintf=yes"
else
@ -14477,12 +14473,12 @@ fi
if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
echo "configure:14481: checking for _doprnt" >&5
echo "configure:14477: checking for _doprnt" >&5
if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 14486 "configure"
#line 14482 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */
@ -14506,7 +14502,7 @@ f = _doprnt;
; return 0; }
EOF
if { (eval echo configure:14510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:14506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func__doprnt=yes"
else
@ -14535,12 +14531,12 @@ if test $ac_cv_func_vprintf = yes ; then
for ac_func in vsnprintf vsprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:14539: checking for $ac_func" >&5
echo "configure:14535: checking for $ac_func" >&5
if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 14544 "configure"
#line 14540 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -14564,7 +14560,7 @@ f = $ac_func;
; return 0; }
EOF
if { (eval echo configure:14568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:14564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -14641,12 +14637,12 @@ for ac_func in \
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:14645: checking for $ac_func" >&5
echo "configure:14641: checking for $ac_func" >&5
if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 14650 "configure"
#line 14646 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -14670,7 +14666,7 @@ f = $ac_func;
; return 0; }
EOF
if { (eval echo configure:14674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:14670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -14698,12 +14694,12 @@ done
for ac_func in getopt tempnam
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:14702: checking for $ac_func" >&5
echo "configure:14698: checking for $ac_func" >&5
if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 14707 "configure"
#line 14703 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -14727,7 +14723,7 @@ f = $ac_func;
; return 0; }
EOF
if { (eval echo configure:14731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:14727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -14764,13 +14760,13 @@ fi
# Check Configuration
echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
echo "configure:14768: checking declaration of sys_errlist" >&5
echo "configure:14764: checking declaration of sys_errlist" >&5
if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 14774 "configure"
#line 14770 "configure"
#include "confdefs.h"
#include <stdio.h>
@ -14783,7 +14779,7 @@ int main() {
char *c = (char *) *sys_errlist
; return 0; }
EOF
if { (eval echo configure:14787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:14783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_dcl_sys_errlist=yes
ol_cv_have_sys_errlist=yes
@ -14806,20 +14802,20 @@ EOF
echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
echo "configure:14810: checking existence of sys_errlist" >&5
echo "configure:14806: checking existence of sys_errlist" >&5
if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 14816 "configure"
#line 14812 "configure"
#include "confdefs.h"
#include <errno.h>
int main() {
char *c = (char *) *sys_errlist
; return 0; }
EOF
if { (eval echo configure:14823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:14819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ol_cv_have_sys_errlist=yes
else

View File

@ -1943,12 +1943,11 @@ AC_COMPILE_CHECK_SIZEOF(short)
AC_COMPILE_CHECK_SIZEOF(int)
AC_COMPILE_CHECK_SIZEOF(long)
if test "$ac_cv_sizeof_short" -lt 4 ; then
AC_DEFINE(LBER_INT_T,long)
else
AC_DEFINE(LBER_INT_T,short)
if test "$ac_cv_sizeof_long" -lt 4 ; then
AC_MSG_ERROR([sizeof(long) < 4])
fi
AC_DEFINE(LBER_INT_T,long)
AC_DEFINE(LBER_LEN_T,long)
AC_DEFINE(LBER_SOCKET_T,int)
AC_DEFINE(LBER_TAG_T,long)

View File

@ -27,30 +27,12 @@ LDAP_BEGIN_DECL
extern BER_ERRNO_FN ber_int_errno_fn;
/* these have to match lber types settings */
#if LBER_INT_T == short
# define LBER_INT_HTON(i) AC_HTONS(i)
# define LBER_INT_NTOH(i) AC_NTOHS(i)
#else
# define LBER_INT_HTON(i) AC_HTONL(i)
# define LBER_INT_NTOH(i) AC_NTOHL(i)
#endif
#if LBER_LEN_T == short
# define LBER_LEN_HTON(l) AC_HTONS(l)
# define LBER_LEN_NTOH(l) AC_NTOHS(l)
#else
# define LBER_LEN_HTON(l) AC_HTONL(l)
# define LBER_LEN_NTOH(l) AC_NTOHL(l)
#endif
#if LBER_TAG_T == short
# define LBER_TAG_HTON(t) AC_HTONS(t)
# define LBER_TAG_NTOH(t) AC_NTOHS(t)
#else
# define LBER_TAG_HTON(t) AC_HTONL(t)
# define LBER_TAG_NTOH(t) AC_NTOHL(t)
#endif
#define LBER_INT_HTON(i) AC_HTONL(i)
#define LBER_INT_NTOH(i) AC_NTOHL(i)
#define LBER_LEN_HTON(l) AC_HTONL(l)
#define LBER_LEN_NTOH(l) AC_NTOHL(l)
#define LBER_TAG_HTON(t) AC_HTONL(t)
#define LBER_TAG_NTOH(t) AC_NTOHL(t)
struct lber_options {
short lbo_valid;