Bug 1067699 (part 1) - Export double-conversion.h normally from MFBT. r=froydnj.

--HG--
extra : rebase_source : 14c3d827f4d8015d8326612e82782c52dcf7335d
This commit is contained in:
Nicholas Nethercote 2014-09-16 23:33:05 -07:00
parent 5bb25b6abc
commit 8ec14a3695
6 changed files with 11 additions and 13 deletions

View File

@ -236,9 +236,10 @@ def check_style():
# - An "inclname" is how a file is referred to in a #include statement.
#
# Examples (filename -> inclname)
# - "mfbt/Attributes.h" -> "mozilla/Attributes.h"
# - "js/public/Vector.h" -> "js/Vector.h"
# - "js/src/vm/String.h" -> "vm/String.h"
# - "mfbt/Attributes.h" -> "mozilla/Attributes.h"
# - "mfbt/decimal/Decimal.h -> "mozilla/Decimal.h"
# - "js/public/Vector.h" -> "js/Vector.h"
# - "js/src/vm/String.h" -> "vm/String.h"
mfbt_inclnames = set() # type: set(inclname)
js_names = dict() # type: dict(filename, inclname)
@ -246,7 +247,7 @@ def check_style():
# Select the appropriate files.
for filename in get_all_filenames():
if filename.startswith('mfbt/') and filename.endswith('.h'):
inclname = 'mozilla/' + filename[len('mfbt/'):]
inclname = 'mozilla/' + filename.split('/')[-1]
mfbt_inclnames.add(inclname)
if filename.startswith('js/public/') and filename.endswith('.h'):
@ -454,7 +455,7 @@ def do_file(filename, inclname, file_kind, f, all_inclnames, included_h_inclname
# Check the #include path has the correct form.
if include.inclname not in all_inclnames:
error(filename, include.linenum,
include.quote() + ' is included ' + 'using the wrong path;',
include.quote() + ' is included using the wrong path;',
'did you forget a prefix, or is the file not yet committed?')
# Record inclusions of .h files for cycle detection later.

View File

@ -10,6 +10,7 @@
#include "jsnum.h"
#include "mozilla/double-conversion.h"
#include "mozilla/FloatingPoint.h"
#include "mozilla/PodOperations.h"
#include "mozilla/RangedPtr.h"
@ -20,7 +21,6 @@
#include <math.h>
#include <string.h>
#include "double-conversion.h"
#include "jsatom.h"
#include "jscntxt.h"
#include "jsdtoa.h"

View File

@ -16,8 +16,6 @@ if not CONFIG['JS_DISABLE_SHELL']:
TEST_DIRS += ['jsapi-tests', 'tests', 'gdb']
LOCAL_INCLUDES += ['../../mfbt/double-conversion']
CONFIGURE_SUBST_FILES += [
'devtools/rootAnalysis/Makefile',
'js-confdefs.h',

View File

@ -27,6 +27,8 @@ EXPORTS.mozilla = [
'Constants.h',
'DebugOnly.h',
'decimal/Decimal.h',
'double-conversion/double-conversion.h',
'double-conversion/utils.h',
'Endian.h',
'EnumeratedArray.h',
'EnumSet.h',

View File

@ -54,10 +54,6 @@ if CONFIG['INTEL_ARCHITECTURE']:
SOURCES += ['nsUTF8UtilsSSE2.cpp']
SOURCES['nsUTF8UtilsSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
LOCAL_INCLUDES += [
'/mfbt/double-conversion',
]
MSVC_ENABLE_PGO = True
FINAL_LIBRARY = 'xul'

View File

@ -3,8 +3,9 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/double-conversion.h"
#include "mozilla/MemoryReporting.h"
#include "double-conversion.h"
using double_conversion::DoubleToStringConverter;