| Index: base/macros.h
|
| diff --git a/base/basictypes.h b/base/macros.h
|
| similarity index 87%
|
| copy from base/basictypes.h
|
| copy to base/macros.h
|
| index cdd127e5e6f5127198ebfe0f01264dc87012977d..781751569d7aa5c4f5f5ca4254bc9001ffd87d96 100644
|
| --- a/base/basictypes.h
|
| +++ b/base/macros.h
|
| @@ -1,52 +1,19 @@
|
| -// Copyright 2013 The Chromium Authors. All rights reserved.
|
| +// 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.
|
|
|
| -#ifndef BASE_BASICTYPES_H_
|
| -#define BASE_BASICTYPES_H_
|
| +// This file contains macros and macro-like constructs (e.g., templates) that
|
| +// are commonly used throughout Chromium source. (It may also contain things
|
| +// that are closely related to things that are commonly used that belong in this
|
| +// file.)
|
| +
|
| +#ifndef BASE_MACROS_H_
|
| +#define BASE_MACROS_H_
|
|
|
| -#include <limits.h> // So we can set the bounds of our types.
|
| #include <stddef.h> // For size_t.
|
| -#include <stdint.h> // For intptr_t.
|
| #include <string.h> // For memcpy.
|
|
|
| -#include "base/compiler_specific.h"
|
| -#include "base/port.h" // Types that only need exist on certain systems.
|
| -
|
| -typedef int8_t int8;
|
| -typedef uint8_t uint8;
|
| -typedef int16_t int16;
|
| -typedef int32_t int32;
|
| -typedef uint16_t uint16;
|
| -typedef uint32_t uint32;
|
| -
|
| -// TODO(vtl): Figure what's up with the 64-bit types. Can we just define them as
|
| -// |int64_t|/|uint64_t|?
|
| -// The NSPR system headers define 64-bit as |long| when possible, except on
|
| -// Mac OS X. In order to not have typedef mismatches, we do the same on LP64.
|
| -//
|
| -// On Mac OS X, |long long| is used for 64-bit types for compatibility with
|
| -// <inttypes.h> format macros even in the LP64 model.
|
| -#if defined(__LP64__) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
|
| -typedef long int64;
|
| -typedef unsigned long uint64;
|
| -#else
|
| -typedef long long int64;
|
| -typedef unsigned long long uint64;
|
| -#endif
|
| -
|
| -const uint8 kuint8max = (( uint8) 0xFF);
|
| -const uint16 kuint16max = ((uint16) 0xFFFF);
|
| -const uint32 kuint32max = ((uint32) 0xFFFFFFFF);
|
| -const uint64 kuint64max = ((uint64) GG_LONGLONG(0xFFFFFFFFFFFFFFFF));
|
| -const int8 kint8min = (( int8) 0x80);
|
| -const int8 kint8max = (( int8) 0x7F);
|
| -const int16 kint16min = (( int16) 0x8000);
|
| -const int16 kint16max = (( int16) 0x7FFF);
|
| -const int32 kint32min = (( int32) 0x80000000);
|
| -const int32 kint32max = (( int32) 0x7FFFFFFF);
|
| -const int64 kint64min = (( int64) GG_LONGLONG(0x8000000000000000));
|
| -const int64 kint64max = (( int64) GG_LONGLONG(0x7FFFFFFFFFFFFFFF));
|
| +#include "base/compiler_specific.h" // For ALLOW_UNUSED.
|
|
|
| // Put this in the private: declarations for a class to be uncopyable.
|
| #define DISALLOW_COPY(TypeName) \
|
| @@ -343,4 +310,4 @@ enum LinkerInitialized { LINKER_INITIALIZED };
|
|
|
| } // base
|
|
|
| -#endif // BASE_BASICTYPES_H_
|
| +#endif // BASE_MACROS_H_
|
|
|