Bug 781171 - delete JS_BYTES_PER_WORD/JS_BITS_PER_WORD from configure.in; r=glandium
authorNathan Froyd <froydnj@mozilla.com>
Fri, 11 Oct 2013 15:13:35 -0400
changeset 164775 dfbfe76ad7f6c7760b497fc799a58eee12854a73
parent 164774 78db5762d54cf05580f819227c5e85143b9f24d0
child 164776 e5c235dfea0a57a378398df5debf289b2d72871a
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs781171
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 781171 - delete JS_BYTES_PER_WORD/JS_BITS_PER_WORD from configure.in; r=glandium
build/autoconf/moznbytetype.m4
js/src/aclocal.m4
js/src/build/autoconf/moznbytetype.m4
js/src/configure.in
js/src/js-config.h.in
deleted file mode 100644
--- a/build/autoconf/moznbytetype.m4
+++ /dev/null
@@ -1,103 +0,0 @@
-dnl This Source Code Form is subject to the terms of the Mozilla Public
-dnl License, v. 2.0. If a copy of the MPL was not distributed with this
-dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-dnl MOZ_N_BYTE_TYPE(VARIABLE, SIZE, POSSIBLE-TYPES)
-dnl
-dnl Check to see which of POSSIBLE-TYPES has a size of SIZE.  If we
-dnl find one, define VARIABLE to be the size-BYTE type.  If no type
-dnl matches, exit the configure script with an error message.  Types
-dnl whose written form contains spaces should appear in POSSIBLE-TYPES
-dnl enclosed by shell quotes.
-dnl
-dnl The cache variable moz_cv_n_byte_type_VARIABLE gets set to the
-dnl type, if found.
-dnl 
-dnl for example:
-dnl MOZ_N_BYTE_TYPE([JS_INT32_T], [4], [int long 'long long' short])
-dnl
-AC_DEFUN([MOZ_N_BYTE_TYPE],
-[
-dnl The simplest approach would simply be to run a program that says
-dnl   printf ("%d\n", sizeof ($type));
-dnl But that won't work when cross-compiling; this will.
-AC_CACHE_CHECK([for a $2-byte type], moz_cv_n_byte_type_$1, [
-  moz_cv_n_byte_type_$1=
-  for type in $3; do
-    AC_TRY_COMPILE([],
-                   [
-                     int a[sizeof ($type) == $2 ? 1 : -1];
-                     return 0;
-                   ],
-                   [moz_cv_n_byte_type_$1=$type; break], [])
-  done
-  if test ! "$moz_cv_n_byte_type_$1"; then
-    AC_MSG_ERROR([Couldn't find a $2-byte type])
-  fi
-])
-AC_DEFINE_UNQUOTED($1, [$moz_cv_n_byte_type_$1],
-                   [a $2-byte type on the target machine])
-])
-
-dnl MOZ_SIZE_OF_TYPE(VARIABLE, TYPE, POSSIBLE-SIZES)
-dnl
-dnl Check to see which of POSSIBLE-SIZES is the sizeof(TYPE). If we find one,
-dnl define VARIABLE SIZE. If no size matches, exit the configure script with
-dnl an error message.
-dnl
-dnl The cache variable moz_cv_size_of_VARIABLE gets set to the size, if
-dnl found.
-dnl
-dnl for example:
-dnl MOZ_SIZE_OF_TYPE([JS_BYTES_PER_WORD], [void*], [4 8])
-AC_DEFUN([MOZ_SIZE_OF_TYPE],
-[
-AC_CACHE_CHECK([for the size of $2], moz_cv_size_of_$1, [
-  moz_cv_size_of_$1=
-  for size in $3; do
-    AC_TRY_COMPILE([],
-                   [
-                     int a[sizeof ($2) == $size ? 1 : -1];
-                     return 0;
-                   ],
-                   [moz_cv_size_of_$1=$size; break], [])
-  done
-  if test ! "$moz_cv_size_of_$1"; then
-    AC_MSG_ERROR([No size found for $2])
-  fi
-])
-AC_DEFINE_UNQUOTED($1, [$moz_cv_size_of_$1])
-])
-
-dnl MOZ_ALIGN_OF_TYPE(VARIABLE, TYPE, POSSIBLE-ALIGNS)
-dnl
-dnl Check to see which of POSSIBLE-ALIGNS is the necessary alignment of TYPE.
-dnl If we find one, define VARIABLE ALIGNMENT. If no alignment matches, exit
-dnl the configure script with an error message.
-dnl
-dnl The cache variable moz_cv_align_of_VARIABLE gets set to the size, if
-dnl found.
-dnl
-dnl for example:
-dnl MOZ_ALIGN_OF_TYPE(JS_ALIGN_OF_POINTER, void*, 2 4 8 16)
-AC_DEFUN([MOZ_ALIGN_OF_TYPE],
-[
-AC_CACHE_CHECK([for the alignment of $2], moz_cv_align_of_$1, [
-  moz_cv_align_of_$1=
-  for align in $3; do
-    AC_TRY_COMPILE([
-                     #include <stddef.h>
-                     struct aligner { char c; $2 a; };
-                   ],
-                   [
-                     int a[offsetof(struct aligner, a) == $align ? 1 : -1];
-                     return 0;
-                   ],
-                   [moz_cv_align_of_$1=$align; break], [])
-  done
-  if test ! "$moz_cv_align_of_$1"; then
-    AC_MSG_ERROR([No alignment found for $2])
-  fi
-])
-AC_DEFINE_UNQUOTED($1, [$moz_cv_align_of_$1])
-])
--- a/js/src/aclocal.m4
+++ b/js/src/aclocal.m4
@@ -7,17 +7,16 @@ builtin(include, build/autoconf/acwinpat
 builtin(include, build/autoconf/hooks.m4)dnl
 builtin(include, build/autoconf/config.status.m4)dnl
 builtin(include, build/autoconf/toolchain.m4)dnl
 builtin(include, build/autoconf/ccache.m4)dnl
 builtin(include, build/autoconf/wrapper.m4)dnl
 builtin(include, build/autoconf/pkg.m4)dnl
 builtin(include, build/autoconf/nspr.m4)dnl
 builtin(include, build/autoconf/altoptions.m4)dnl
-builtin(include, build/autoconf/moznbytetype.m4)dnl
 builtin(include, build/autoconf/mozprog.m4)dnl
 builtin(include, build/autoconf/mozheader.m4)dnl
 builtin(include, build/autoconf/mozcommonheader.m4)dnl
 builtin(include, build/autoconf/lto.m4)dnl
 builtin(include, build/autoconf/gcc-pr49911.m4)dnl
 builtin(include, build/autoconf/gcc-pr39608.m4)dnl
 builtin(include, build/autoconf/llvm-pr8927.m4)dnl
 builtin(include, build/autoconf/frameptr.m4)dnl
deleted file mode 100644
--- a/js/src/build/autoconf/moznbytetype.m4
+++ /dev/null
@@ -1,103 +0,0 @@
-dnl This Source Code Form is subject to the terms of the Mozilla Public
-dnl License, v. 2.0. If a copy of the MPL was not distributed with this
-dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-dnl MOZ_N_BYTE_TYPE(VARIABLE, SIZE, POSSIBLE-TYPES)
-dnl
-dnl Check to see which of POSSIBLE-TYPES has a size of SIZE.  If we
-dnl find one, define VARIABLE to be the size-BYTE type.  If no type
-dnl matches, exit the configure script with an error message.  Types
-dnl whose written form contains spaces should appear in POSSIBLE-TYPES
-dnl enclosed by shell quotes.
-dnl
-dnl The cache variable moz_cv_n_byte_type_VARIABLE gets set to the
-dnl type, if found.
-dnl 
-dnl for example:
-dnl MOZ_N_BYTE_TYPE([JS_INT32_T], [4], [int long 'long long' short])
-dnl
-AC_DEFUN([MOZ_N_BYTE_TYPE],
-[
-dnl The simplest approach would simply be to run a program that says
-dnl   printf ("%d\n", sizeof ($type));
-dnl But that won't work when cross-compiling; this will.
-AC_CACHE_CHECK([for a $2-byte type], moz_cv_n_byte_type_$1, [
-  moz_cv_n_byte_type_$1=
-  for type in $3; do
-    AC_TRY_COMPILE([],
-                   [
-                     int a[sizeof ($type) == $2 ? 1 : -1];
-                     return 0;
-                   ],
-                   [moz_cv_n_byte_type_$1=$type; break], [])
-  done
-  if test ! "$moz_cv_n_byte_type_$1"; then
-    AC_MSG_ERROR([Couldn't find a $2-byte type])
-  fi
-])
-AC_DEFINE_UNQUOTED($1, [$moz_cv_n_byte_type_$1],
-                   [a $2-byte type on the target machine])
-])
-
-dnl MOZ_SIZE_OF_TYPE(VARIABLE, TYPE, POSSIBLE-SIZES)
-dnl
-dnl Check to see which of POSSIBLE-SIZES is the sizeof(TYPE). If we find one,
-dnl define VARIABLE SIZE. If no size matches, exit the configure script with
-dnl an error message.
-dnl
-dnl The cache variable moz_cv_size_of_VARIABLE gets set to the size, if
-dnl found.
-dnl
-dnl for example:
-dnl MOZ_SIZE_OF_TYPE([JS_BYTES_PER_WORD], [void*], [4 8])
-AC_DEFUN([MOZ_SIZE_OF_TYPE],
-[
-AC_CACHE_CHECK([for the size of $2], moz_cv_size_of_$1, [
-  moz_cv_size_of_$1=
-  for size in $3; do
-    AC_TRY_COMPILE([],
-                   [
-                     int a[sizeof ($2) == $size ? 1 : -1];
-                     return 0;
-                   ],
-                   [moz_cv_size_of_$1=$size; break], [])
-  done
-  if test ! "$moz_cv_size_of_$1"; then
-    AC_MSG_ERROR([No size found for $2])
-  fi
-])
-AC_DEFINE_UNQUOTED($1, [$moz_cv_size_of_$1])
-])
-
-dnl MOZ_ALIGN_OF_TYPE(VARIABLE, TYPE, POSSIBLE-ALIGNS)
-dnl
-dnl Check to see which of POSSIBLE-ALIGNS is the necessary alignment of TYPE.
-dnl If we find one, define VARIABLE ALIGNMENT. If no alignment matches, exit
-dnl the configure script with an error message.
-dnl
-dnl The cache variable moz_cv_align_of_VARIABLE gets set to the size, if
-dnl found.
-dnl
-dnl for example:
-dnl MOZ_ALIGN_OF_TYPE(JS_ALIGN_OF_POINTER, void*, 2 4 8 16)
-AC_DEFUN([MOZ_ALIGN_OF_TYPE],
-[
-AC_CACHE_CHECK([for the alignment of $2], moz_cv_align_of_$1, [
-  moz_cv_align_of_$1=
-  for align in $3; do
-    AC_TRY_COMPILE([
-                     #include <stddef.h>
-                     struct aligner { char c; $2 a; };
-                   ],
-                   [
-                     int a[offsetof(struct aligner, a) == $align ? 1 : -1];
-                     return 0;
-                   ],
-                   [moz_cv_align_of_$1=$align; break], [])
-  done
-  if test ! "$moz_cv_align_of_$1"; then
-    AC_MSG_ERROR([No alignment found for $2])
-  fi
-])
-AC_DEFINE_UNQUOTED($1, [$moz_cv_align_of_$1])
-])
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -2120,25 +2120,16 @@ 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
 
-MOZ_SIZE_OF_TYPE(JS_BYTES_PER_WORD, void*, 4 8)
-if test "$moz_cv_size_of_JS_BYTES_PER_WORD" -eq "4"; then
-  AC_DEFINE(JS_BITS_PER_WORD_LOG2, 5)
-elif test "$moz_cv_size_of_JS_BYTES_PER_WORD" -eq "8"; then
-  AC_DEFINE(JS_BITS_PER_WORD_LOG2, 6)
-else
-  AC_MSG_ERROR([Unexpected JS_BYTES_PER_WORD])
-fi
-
 MOZ_CHECK_HEADERS(endian.h)
 if test "$ac_cv_header_endian_h" = yes; then
     AC_DEFINE(JS_HAVE_ENDIAN_H)
 fi
 
 MOZ_CHECK_HEADERS([machine/endian.h],[],[],[#include <sys/types.h>])
 if test "$ac_cv_header_machine_endian_h" = yes; then
     AC_DEFINE(JS_HAVE_MACHINE_ENDIAN_H)
--- a/js/src/js-config.h.in
+++ b/js/src/js-config.h.in
@@ -29,17 +29,13 @@
 /* Define to 1 if the <machine/endian.h> header is present and
    useable.  See jscpucfg.h.  */
 #undef JS_HAVE_MACHINE_ENDIAN_H
 
 /* Define to 1 if the <sys/isa_defs.h> header is present and
    useable.  See jscpucfg.h.  */
 #undef JS_HAVE_SYS_ISA_DEFS_H
 
-/* The configure script defines these if it doesn't #define
-   JS_HAVE_STDINT_H.  */
-#undef JS_BYTES_PER_WORD
-
 /* MOZILLA JSAPI version number components */
 #undef MOZJS_MAJOR_VERSION
 #undef MOZJS_MINOR_VERSION
 
 #endif /* js_config_h */