aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/singlejar
diff options
context:
space:
mode:
authorGravatar Damien Martin-Guillerez <dmarting@google.com>2017-07-27 15:51:39 +0200
committerGravatar Jakob Buchgraber <buchgr@google.com>2017-07-27 16:26:30 +0200
commit0f3481ba6364f24ef76b839bdde06ae7883c9bd9 (patch)
tree2dffea4d43a38aeb6fdaf0052a7ae6b60ea29872 /src/tools/singlejar
parent92caf38a4ae74889391eefa9b7196804d8f2c948 (diff)
Include <cinttypes> instead of <stdint.h>
cinttypes is the C++ header that should replace stdint.h. Not using the correct header was leading to compilation error on CentOS 6.7 Fixes #3455. To be cherry-picked for #3375. Change-Id: I6df22134a4a4902ec9fa7ecdfaeb5408eacf3564 PiperOrigin-RevId: 163334651
Diffstat (limited to 'src/tools/singlejar')
-rw-r--r--src/tools/singlejar/output_jar.h3
-rw-r--r--src/tools/singlejar/zip_headers.h3
-rw-r--r--src/tools/singlejar/zlib_interface.h2
3 files changed, 5 insertions, 3 deletions
diff --git a/src/tools/singlejar/output_jar.h b/src/tools/singlejar/output_jar.h
index 53f69782f5..58ae09150a 100644
--- a/src/tools/singlejar/output_jar.h
+++ b/src/tools/singlejar/output_jar.h
@@ -15,8 +15,9 @@
#ifndef SRC_TOOLS_SINGLEJAR_COMBINED_JAR_H_
#define SRC_TOOLS_SINGLEJAR_COMBINED_JAR_H_
-#include <stdint.h>
#include <stdio.h>
+
+#include <cinttypes>
#include <memory>
#include <string>
#include <unordered_map>
diff --git a/src/tools/singlejar/zip_headers.h b/src/tools/singlejar/zip_headers.h
index 9c97691c14..0b3202973a 100644
--- a/src/tools/singlejar/zip_headers.h
+++ b/src/tools/singlejar/zip_headers.h
@@ -20,10 +20,11 @@
* http://www.pkware.com/documents/casestudies/APPNOTE.TXT
*/
-#include <stdint.h>
#include <stdlib.h>
#include <string.h>
+#include <cinttypes>
+
#if defined(__linux__)
#include <endian.h>
#elif defined(__FreeBSD__)
diff --git a/src/tools/singlejar/zlib_interface.h b/src/tools/singlejar/zlib_interface.h
index b9bc0c52f6..a07e4df13f 100644
--- a/src/tools/singlejar/zlib_interface.h
+++ b/src/tools/singlejar/zlib_interface.h
@@ -15,7 +15,7 @@
#ifndef BAZEL_SRC_TOOLS_SINGLEJAR_ZLIB_INTERFACE_H_
#define BAZEL_SRC_TOOLS_SINGLEJAR_ZLIB_INTERFACE_H_
-#include <stdint.h>
+#include <cinttypes>
#include "src/tools/singlejar/diag.h"
#include <zlib.h>