diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-05 21:53:47 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-05 21:53:47 +0000 |
commit | dc310e6377bcebbfd593714099487d066fabc724 (patch) | |
tree | 50b1c75b6a731037511eb5cbba14005bd704f864 /third_party | |
parent | c078968a5fcdbad7c12ab954f60667a78a737582 (diff) | |
download | chromium_src-dc310e6377bcebbfd593714099487d066fabc724.zip chromium_src-dc310e6377bcebbfd593714099487d066fabc724.tar.gz chromium_src-dc310e6377bcebbfd593714099487d066fabc724.tar.bz2 |
Add an #if to modp_b64_data.h to avoid a typedef conflict that certain
finicky compilers (in particular, nacl-g++) complain about.
Contributed by mdsteele@google.com
BUG=none
TEST=Try to compile modp_b64 with nacl-g++
Review URL: http://codereview.chromium.org/3044045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55137 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/modp_b64/README.chromium | 10 | ||||
-rw-r--r-- | third_party/modp_b64/modp_b64_data.h | 8 |
2 files changed, 14 insertions, 4 deletions
diff --git a/third_party/modp_b64/README.chromium b/third_party/modp_b64/README.chromium index 4b22d61..fc30450 100644 --- a/third_party/modp_b64/README.chromium +++ b/third_party/modp_b64/README.chromium @@ -8,7 +8,9 @@ and to fix compilation errors that occur under VC8. The file was renamed modp_b64.cc to force it to be compiled as C++ so that the inclusion of basictypes.h could be possible. -The file modp_b64_data.h was generated by modp_b64_gen.c (under Linux), which -is not included in this directory. The resulting header was modified to remove -the "#include <stdint.h>" since that header file does not exist under VC8. The -required typedefs for uint8_t and uint32_t were defined in its place. +The file modp_b64_data.h was generated by modp_b64_gen.c (under Linux), +which is not included in this directory. The resulting header was +modified to not include <stdint.h> when COMPILER_MSVC is defined (since +that header file does not exist under VC8), but instead in that case to +include "base/basictypes.h" and provide the required typedefs for +uint8_t and uint32_t using uint8 and uint32. diff --git a/third_party/modp_b64/modp_b64_data.h b/third_party/modp_b64/modp_b64_data.h index a2dc7dd..aca6f0f 100644 --- a/third_party/modp_b64/modp_b64_data.h +++ b/third_party/modp_b64/modp_b64_data.h @@ -1,6 +1,14 @@ +#include "build/build_config.h" +#if !defined(COMPILER_MSVC) +#include <stdint.h> +#else +// VC8 doesn't have stdint.h. On the other hand, some compilers don't like +// the below code, because basictypes.h itself includes stdint.h and the +// typedefs below can cause conflicts. #include "base/basictypes.h" typedef uint8 uint8_t; typedef uint32 uint32_t; +#endif #define CHAR62 '+' #define CHAR63 '/' |