summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-06-15 10:55:29 +0200
committerJakub Hrozek <jhrozek@redhat.com>2011-06-15 10:55:29 +0200
commitce03c818f4f0474237abdd881450ef7e468306a5 (patch)
tree7c1456664f7e6af577f861a2281c49eb225f517d /acinclude.m4
parent22c527cc87438d219fd3a7df73fa54bd6a78a787 (diff)
downloadc-ares-ce03c818f4f0474237abdd881450ef7e468306a5.tar.gz
c-ares-ce03c818f4f0474237abdd881450ef7e468306a5.tar.bz2
c-ares-ce03c818f4f0474237abdd881450ef7e468306a5.zip
Revert "Do not use sized constants in public headers"
This reverts commit 22c01e96f7b2ae9923e1baa50bfe3c0d22297a7d. This is a Red Hat specific patch that does not belong into upstream
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m418
1 files changed, 18 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index fbee3c3..9606131 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1749,6 +1749,23 @@ _EOF
])
+dnl CARES_CONFIGURE_LONG
+dnl -------------------------------------------------
+dnl Find out the size of long as reported by sizeof() and define
+dnl CARES_SIZEOF_LONG as appropriate to be used in template file
+dnl ares_build.h.in to properly configure the library.
+dnl The size of long is a build time characteristic and as such
+dnl must be recorded in ares_build.h
+
+AC_DEFUN([CARES_CONFIGURE_LONG], [
+ if test -z "$ac_cv_sizeof_long" ||
+ test "$ac_cv_sizeof_long" -eq "0"; then
+ AC_MSG_ERROR([cannot find out size of long.])
+ fi
+ CARES_DEFINE_UNQUOTED([CARES_SIZEOF_LONG], [$ac_cv_sizeof_long])
+])
+
+
dnl CARES_CONFIGURE_ARES_SOCKLEN_T
dnl -------------------------------------------------
dnl Find out suitable ares_socklen_t data type definition and size, making
@@ -1870,6 +1887,7 @@ AC_DEFUN([CARES_CONFIGURE_ARES_SOCKLEN_T], [
;;
esac
CARES_DEFINE_UNQUOTED([CARES_TYPEOF_ARES_SOCKLEN_T], [$cares_typeof_ares_socklen_t])
+ CARES_DEFINE_UNQUOTED([CARES_SIZEOF_ARES_SOCKLEN_T], [$cares_sizeof_ares_socklen_t])
])