Skip to content

Commit

Permalink
Bug 1302909 - Set STDC_HEADERS everywhere instead of relying on AC_HE…
Browse files Browse the repository at this point in the history
…ADER_STDC. r=glandium

MozReview-Commit-ID: DXvcX1i9vuo
  • Loading branch information
chmanchester committed Sep 15, 2016
1 parent 481ad0d commit 4714bfa
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
6 changes: 4 additions & 2 deletions build/autoconf/toolchain.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ 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 Several autoconf functions AC_REQUIRE AC_PROG_CPP/AC_PROG_CXXCPP,
dnl meaning they are called even when we don't call them explicitly.
dnl Several autoconf functions AC_REQUIRE AC_PROG_CPP/AC_PROG_CXXCPP
dnl or AC_HEADER_STDC, meaning they are called even when we don't call
dnl them explicitly.
dnl However, theses checks are not necessary and python configure sets
dnl the corresponding variables already, so just skip those tests
dnl entirely.
define([AC_PROG_CPP],[])
define([AC_PROG_CXXCPP],[])
define([AC_HEADER_STDC], [])

AC_DEFUN([MOZ_TOOL_VARIABLES],
[
Expand Down
3 changes: 3 additions & 0 deletions build/moz.configure/headers.configure
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
check_header('stdint.h')
have_inttypes = check_header('inttypes.h')

# Assume we have ansi C header files available.
set_define('STDC_HEADERS', True)

set_config('HAVE_INTTYPES_H', have_inttypes)

building_linux = depends(target)(lambda target: target.kernel == 'Linux')
Expand Down
2 changes: 0 additions & 2 deletions js/src/old-configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,6 @@ case "$target" in
RCFLAGS="-nologo"
fi
AC_DEFINE(HAVE__MSIZE)
AC_DEFINE(STDC_HEADERS)
AC_DEFINE(WIN32_LEAN_AND_MEAN)
BIN_SUFFIX='.exe'
MOZ_USER_DIR="Mozilla"
Expand Down Expand Up @@ -979,7 +978,6 @@ fi
if test -z "$SKIP_COMPILER_CHECKS"; then
dnl Checks for typedefs, structures, and compiler characteristics.
dnl ========================================================
AC_HEADER_STDC
AC_C_CONST
AC_TYPE_MODE_T
AC_TYPE_OFF_T
Expand Down
2 changes: 0 additions & 2 deletions old-configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,6 @@ case "$target" in
dnl allow AVX2 code from VS2012
HAVE_X86_AVX2=1
fi
AC_DEFINE(STDC_HEADERS)
AC_DEFINE(WIN32_LEAN_AND_MEAN)
dnl See http://support.microsoft.com/kb/143208 to use STL
AC_DEFINE(NOMINMAX)
Expand Down Expand Up @@ -1345,7 +1344,6 @@ fi # COMPILE_ENVIRONMENT
if test -z "$SKIP_COMPILER_CHECKS"; then
dnl Checks for typedefs, structures, and compiler characteristics.
dnl ========================================================
AC_HEADER_STDC
AC_C_CONST
AC_TYPE_MODE_T
AC_TYPE_OFF_T
Expand Down

0 comments on commit 4714bfa

Please sign in to comment.