Skip to content

Commit

Permalink
Make sdch not use an incompatible stdint.h.
Browse files Browse the repository at this point in the history
We force-include our own logging.h, which includes basictypes.h, which
now includes stdint.h. Without this change, this ends up being
minimal/hacky stdint.h (from sdch/open-vcdiff/vsprojects), which isn't
sufficient for the needs of the rest of basictypes.h.

R=brettw@chromium.org, jar@chromium.org
BUG=138542

Review URL: https://codereview.chromium.org/110273004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243329 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
viettrungluu@chromium.org committed Jan 7, 2014
1 parent e54e058 commit 3ddcee7
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
8 changes: 0 additions & 8 deletions base/basictypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,8 @@
#include "base/compiler_specific.h"
#include "base/port.h" // Types that only need exist on certain systems.

// TODO(vtl): We get conflicts with other definitions of |int8|/|uint8| if we
// try to define them as |int8_t|/|uint8_t|, at least on Windows.
#ifdef _MSC_VER
typedef signed char int8;
typedef unsigned char uint8;
#else
typedef int8_t int8;
typedef uint8_t uint8;
#endif

typedef int16_t int16;
typedef int32_t int32;
typedef uint16_t uint16;
Expand Down
4 changes: 4 additions & 0 deletions sdch/README.chromium
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ The ios directory contains a config.h generated from a run of configure
CPPFLAGS=-isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk
CXX=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -x c++ -arch armv6
CXXFLAGS=-mno-thumb -miphoneos-version-min=4.2

The win directory contains a config.h that forwards to one provided with
open-vcdiff. We have this to avoid putting open-vcdiff's minimal stdint.h hack
into our include path.
2 changes: 1 addition & 1 deletion sdch/sdch.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
[ 'os_bsd==1 or OS=="solaris"', { 'include_dirs': [ 'bsd' ] } ],
[ 'OS == "ios"', { 'include_dirs': [ 'ios' ] } ],
[ 'OS == "mac"', { 'include_dirs': [ 'mac' ] } ],
[ 'OS == "win"', { 'include_dirs': [ 'open-vcdiff/vsprojects' ] } ],
[ 'OS == "win"', { 'include_dirs': [ 'win' ] } ],
# TODO(mark): Remove usage of the deprecated auto_ptr.
[ 'clang == 1', { 'cflags': [ '-Wno-deprecated-declarations' ] } ],
],
Expand Down
14 changes: 14 additions & 0 deletions sdch/win/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This file and directory exist so that we can use the provided config.h
// without putting vsprojects into our include path (which would also give us an
// incorrect/incompatible stdint.h).

#ifndef SDCH_WIN_CONFIG_H_
#define SDCH_WIN_CONFIG_H_

#include "../open-vcdiff/vsprojects/config.h"

#endif // SDCH_WIN_CONFIG_H_

0 comments on commit 3ddcee7

Please sign in to comment.