mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
Don't use 'int' for LBER_*_T types as we only have hton{s,l}.
Select appropriopriate hton{s,l} function to use in lber-int.h.
This commit is contained in:
parent
e9a246744e
commit
62a06eda3e
4 changed files with 554 additions and 591 deletions
|
|
@ -708,7 +708,6 @@ AC_CHECK_FUNC(socket, :, [
|
|||
dnl hopefully we won't include too many libraries
|
||||
AC_CHECK_LIB(socket, main)
|
||||
AC_CHECK_LIB(net, main)
|
||||
AC_CHECK_LIB(net, socket)
|
||||
AC_CHECK_LIB(nsl_s, main)
|
||||
AC_CHECK_LIB(nsl, main)
|
||||
AC_CHECK_LIB(inet, socket)
|
||||
|
|
@ -717,7 +716,6 @@ dnl hopefully we won't include too many libraries
|
|||
|
||||
dnl require select
|
||||
AC_CHECK_FUNC(select, :, AC_MSG_ERROR([select() required.]))
|
||||
dnl AC_CHECK_FUNCS(socketpair)
|
||||
|
||||
if test "${ac_cv_header_winsock_h}" != yes; then
|
||||
dnl Select arg types
|
||||
|
|
@ -1945,12 +1943,10 @@ AC_COMPILE_CHECK_SIZEOF(short)
|
|||
AC_COMPILE_CHECK_SIZEOF(int)
|
||||
AC_COMPILE_CHECK_SIZEOF(long)
|
||||
|
||||
if test "$ac_cv_sizeof_int" -lt 4 ; then
|
||||
AC_MSG_WARN([OpenLDAP requires 'int' to be 32 bits or greater.])
|
||||
|
||||
if test "$ac_cv_sizeof_short" -lt 4 ; then
|
||||
AC_DEFINE(LBER_INT_T,long)
|
||||
else
|
||||
AC_DEFINE(LBER_INT_T,int)
|
||||
AC_DEFINE(LBER_INT_T,short)
|
||||
fi
|
||||
|
||||
AC_DEFINE(LBER_LEN_T,long)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ LDAP_BEGIN_DECL
|
|||
*/
|
||||
|
||||
/* LBER boolean, enum, integers - 32 bits or larger*/
|
||||
#define LBER_INT_T int
|
||||
#define LBER_INT_T long
|
||||
|
||||
/* LBER tags - 32 bits or larger */
|
||||
#define LBER_TAG_T long
|
||||
|
|
@ -44,7 +44,7 @@ LDAP_BEGIN_DECL
|
|||
#define LBER_SOCKET_T unsigned int
|
||||
|
||||
/* LBER lengths - 32 bits or larger*/
|
||||
#define LBER_LEN_T int
|
||||
#define LBER_LEN_T long
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
||||
|
|
|
|||
|
|
@ -26,14 +26,30 @@ LDAP_BEGIN_DECL
|
|||
|
||||
extern BER_ERRNO_FN ber_int_errno_fn;
|
||||
|
||||
|
||||
/* these have to match lber types settings */
|
||||
#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)
|
||||
#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
|
||||
|
||||
|
||||
struct lber_options {
|
||||
|
|
|
|||
Loading…
Reference in a new issue