diff options
author | Volker Lendecke <vl@samba.org> | 2008-06-10 16:14:30 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-09-14 18:22:17 +0200 |
commit | 277e095f78ec4d222a6a71ee92d1d83efd08a5e0 (patch) | |
tree | 3baad991440fb1509649743bef402719c2b7bedc /source4/lib/replace/libreplace_cc.m4 | |
parent | b2c4838543fc2e42771a34cc9aa05f03793b88fc (diff) | |
download | samba-277e095f78ec4d222a6a71ee92d1d83efd08a5e0.tar.gz samba-277e095f78ec4d222a6a71ee92d1d83efd08a5e0.tar.bz2 samba-277e095f78ec4d222a6a71ee92d1d83efd08a5e0.zip |
Correctly find a [u]int32_t replacement
(cherry picked from commit 346375cda557a675f8f882ca2ae8edffec725a72)
(cherry picked from commit 15a53945c9563b4517bd8b69a9bb0554eef5edff)
(This used to be commit 46c3fc67e91bbdb820e4bddd085933a8570e504c)
Diffstat (limited to 'source4/lib/replace/libreplace_cc.m4')
-rw-r--r-- | source4/lib/replace/libreplace_cc.m4 | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/source4/lib/replace/libreplace_cc.m4 b/source4/lib/replace/libreplace_cc.m4 index 0ce0958a96..bed05582d8 100644 --- a/source4/lib/replace/libreplace_cc.m4 +++ b/source4/lib/replace/libreplace_cc.m4 @@ -109,25 +109,34 @@ AC_CHECK_HEADERS([standards.h]) # Solaris needs HAVE_LONG_LONG defined AC_CHECK_TYPES(long long) +AC_CHECK_SIZEOF(int) +AC_CHECK_SIZEOF(char) +AC_CHECK_SIZEOF(short) +AC_CHECK_SIZEOF(long) +AC_CHECK_SIZEOF(long long) + AC_CHECK_TYPE(uint_t, unsigned int) AC_CHECK_TYPE(int8_t, char) AC_CHECK_TYPE(uint8_t, unsigned char) AC_CHECK_TYPE(int16_t, short) AC_CHECK_TYPE(uint16_t, unsigned short) + +if test $ac_cv_sizeof_int -eq 4 ; then +AC_CHECK_TYPE(int32_t, int) +AC_CHECK_TYPE(uint32_t, unsigned int) +elif test $ac_cv_size_long -eq 4 ; then AC_CHECK_TYPE(int32_t, long) AC_CHECK_TYPE(uint32_t, unsigned long) +else +AC_MSG_ERROR([LIBREPLACE no 32-bit type found]) +fi + AC_CHECK_TYPE(int64_t, long long) AC_CHECK_TYPE(uint64_t, unsigned long long) AC_CHECK_TYPE(size_t, unsigned int) AC_CHECK_TYPE(ssize_t, int) -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(char) -AC_CHECK_SIZEOF(short) -AC_CHECK_SIZEOF(long) -AC_CHECK_SIZEOF(long long) - AC_CHECK_SIZEOF(off_t) AC_CHECK_SIZEOF(size_t) AC_CHECK_SIZEOF(ssize_t) |