summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
Diffstat (limited to 'third_party')
-rw-r--r--third_party/modp_b64/README.chromium10
-rw-r--r--third_party/modp_b64/modp_b64_data.h8
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 '/'