Bug 810707 - Port |Bug 704313 - Add proper, overridable <stdint.h> support to mfbt| to comm-central r=callek
authorIan Neal <iann_cvs@blueyonder.co.uk>
Mon, 12 Nov 2012 23:03:44 +0000
changeset 11502 2d2b781f42ebc5a10e097fe1a12719c977d91010
parent 11501 5751ab0e7c98de174434e2be71f1f44003562d13
child 11503 caea83ebc3accf13eced9b2642a13a54e2a63690
push id8596
push useriann_cvs@blueyonder.co.uk
push dateMon, 12 Nov 2012 23:03:59 +0000
treeherdercomm-central@9ad45716d834 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscallek
bugs810707, 704313
Bug 810707 - Port |Bug 704313 - Add proper, overridable <stdint.h> support to mfbt| to comm-central r=callek
configure.in
--- a/configure.in
+++ b/configure.in
@@ -1432,16 +1432,27 @@ case "$host" in
     ;;
 
 *)
     HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
     HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}"
     ;;
 esac
 
+dnl Check for using a custom <stdint.h> implementation
+dnl ========================================================
+AC_MSG_CHECKING(for custom <stdint.h> implementation)
+if test "$MOZ_CUSTOM_STDINT_H"; then
+  AC_DEFINE_UNQUOTED(MOZ_CUSTOM_STDINT_H, "$MOZ_CUSTOM_STDINT_H")
+  AC_SUBST(MOZ_CUSTOM_STDINT_H)
+  AC_MSG_RESULT(using $MOZ_CUSTOM_STDINT_H)
+else
+  AC_MSG_RESULT(none specified)
+fi
+
 dnl Get version of various core apps from the version files.
 SUNBIRD_VERSION=`cat $topsrcdir/calendar/sunbird/config/version.txt`
 SEAMONKEY_VERSION=`cat $topsrcdir/suite/config/version.txt`
 
 AC_DEFINE_UNQUOTED(MOZILLA_VERSION,"$MOZILLA_VERSION")
 AC_DEFINE_UNQUOTED(MOZILLA_VERSION_U,$MOZILLA_VERSION)
 
 MOZ_DOING_LTO(lto_is_enabled)
@@ -2163,57 +2174,18 @@ AC_CACHE_VAL(ac_cv_siginfo_t,
                  [ac_cv_siginfo_t=false])])
 if test "$ac_cv_siginfo_t" = true ; then
   AC_DEFINE(HAVE_SIGINFO_T)
   AC_MSG_RESULT(yes)
 else
   AC_MSG_RESULT(no)
 fi
 
-dnl Check for int16_t, int32_t, int64_t, int64, uint, uint_t, and uint16_t.
-dnl ========================================================
-AC_MSG_CHECKING(for int16_t)
-AC_CACHE_VAL(ac_cv_int16_t,
- [AC_TRY_COMPILE([#include <stdio.h>
-                  #include <sys/types.h>],
-                 [int16_t foo = 0;],
-                 [ac_cv_int16_t=true],
-                 [ac_cv_int16_t=false])])
-if test "$ac_cv_int16_t" = true ; then
-  AC_DEFINE(HAVE_INT16_T)
-  AC_MSG_RESULT(yes)
-else
-  AC_MSG_RESULT(no)
-fi
-AC_MSG_CHECKING(for int32_t)
-AC_CACHE_VAL(ac_cv_int32_t,
- [AC_TRY_COMPILE([#include <stdio.h>
-                  #include <sys/types.h>],
-                 [int32_t foo = 0;],
-                 [ac_cv_int32_t=true],
-                 [ac_cv_int32_t=false])])
-if test "$ac_cv_int32_t" = true ; then
-  AC_DEFINE(HAVE_INT32_T)
-  AC_MSG_RESULT(yes)
-else
-  AC_MSG_RESULT(no)
-fi
-AC_MSG_CHECKING(for int64_t)
-AC_CACHE_VAL(ac_cv_int64_t,
- [AC_TRY_COMPILE([#include <stdio.h>
-                  #include <sys/types.h>],
-                 [int64_t foo = 0;],
-                 [ac_cv_int64_t=true],
-                 [ac_cv_int64_t=false])])
-if test "$ac_cv_int64_t" = true ; then
-  AC_DEFINE(HAVE_INT64_T)
-  AC_MSG_RESULT(yes)
-else
-  AC_MSG_RESULT(no)
-fi
+dnl Check for int64, uint, and uint_t.
+dnl ========================================================
 AC_MSG_CHECKING(for int64)
 AC_CACHE_VAL(ac_cv_int64,
  [AC_TRY_COMPILE([#include <stdio.h>
                   #include <sys/types.h>],
                  [int64 foo = 0;],
                  [ac_cv_int64=true],
                  [ac_cv_int64=false])])
 if test "$ac_cv_int64" = true ; then
@@ -2243,29 +2215,16 @@ AC_CACHE_VAL(ac_cv_uint_t,
                  [ac_cv_uint_t=true],
                  [ac_cv_uint_t=false])])
 if test "$ac_cv_uint_t" = true ; then
   AC_DEFINE(HAVE_UINT_T)
   AC_MSG_RESULT(yes)
 else
   AC_MSG_RESULT(no)
 fi
-AC_MSG_CHECKING(for uint16_t)
-AC_CACHE_VAL(ac_cv_uint16_t,
- [AC_TRY_COMPILE([#include <stdio.h>
-                  #include <sys/types.h>],
-                 [uint16_t foo = 0;],
-                 [ac_cv_uint16_t=true],
-                 [ac_cv_uint16_t=false])])
-if test "$ac_cv_uint16_t" = true ; then
-  AC_DEFINE(HAVE_UINT16_T)
-  AC_MSG_RESULT(yes)
-else
-  AC_MSG_RESULT(no)
-fi
 
 dnl On the gcc trunk (as of 2001-02-09) _GNU_SOURCE, and thus __USE_GNU,
 dnl are defined when compiling C++ but not C.  Since the result of this
 dnl test is used only in C++, do it in C++.
 AC_LANG_CPLUSPLUS
 
 AC_MSG_CHECKING(for uname.domainname)
 AC_CACHE_VAL(ac_cv_have_uname_domainname_field,