diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-10 01:25:50 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-10 01:25:50 +0000 |
commit | 1d7e996758f1e7b8160f3170e9176559fe7e24fe (patch) | |
tree | 55e3960c7c2f9755b6b5b7e349c9574703c31780 /configure.ac | |
parent | 825087fc89422e52429f0e362ac5823857b51e19 (diff) |
Merged revisions 285930 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
................
r285930 | tilghman | 2010-09-09 20:16:32 -0500 (Thu, 09 Sep 2010) | 14 lines
Merged revisions 285889 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r285889 | tilghman | 2010-09-09 19:13:45 -0500 (Thu, 09 Sep 2010) | 7 lines
Fix Mac OS X build.
This also fixes a rather grievous calculation error for the offset of
ast_fdset, which was masked on Linux and FreeBSD, because these platforms
check the first 256 FDs regardless of the bitmask setting (due to backwards
compatibility).
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@285931 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index afd997092..75a5ed0ab 100644 --- a/configure.ac +++ b/configure.ac @@ -935,6 +935,25 @@ AC_CHECK_SIZEOF([int]) AC_CHECK_SIZEOF([long]) AC_CHECK_SIZEOF([long long]) AC_CHECK_SIZEOF([char *]) +AC_CHECK_SIZEOF(long) +AC_CHECK_SIZEOF(long long) +AC_COMPUTE_INT([ac_cv_sizeof_fd_set_fds_bits], [sizeof(foo.fds_bits[[0]])], [$ac_includes_default +fd_set foo;]) +# This doesn't actually work; what it does is to use the variable set in the +# previous test as a cached value to set the right output variables. +AC_CHECK_SIZEOF(fd_set.fds_bits) + +# Set a type compatible with the previous. We cannot just use a generic type +# for these bits, because on big-endian systems, the bits won't match up +# correctly if the size is wrong. +if test $ac_cv_sizeof_int = $ac_cv_sizeof_fd_set_fds_bits; then + AC_DEFINE([TYPEOF_FD_SET_FDS_BITS], [int], [Define to a type of the same size as fd_set.fds_bits[[0]]]) +else if test $ac_cv_sizeof_long = $ac_cv_sizeof_fd_set_fds_bits; then + AC_DEFINE([TYPEOF_FD_SET_FDS_BITS], [long], [Define to a type of the same size as fd_set.fds_bits[[0]]]) +else if test $ac_cv_sizeof_long_long = $ac_cv_sizeof_fd_set_fds_bits; then + AC_DEFINE([TYPEOF_FD_SET_FDS_BITS], [long long], [Define to a type of the same size as fd_set.fds_bits[[0]]]) +fi ; fi ; fi + # do the package library checks now |