summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/amalgamate.py1
-rw-r--r--upb/port_def.inc4
2 files changed, 5 insertions, 0 deletions
diff --git a/tools/amalgamate.py b/tools/amalgamate.py
index 9640201..374d126 100755
--- a/tools/amalgamate.py
+++ b/tools/amalgamate.py
@@ -21,6 +21,7 @@ class Amalgamator:
self.output_c.write(open("upb/port_def.inc").read())
self.output_h.write("/* Amalgamated source file */\n")
+ self.output_h.write('#include <stdint.h>')
self.output_h.write(open("upb/port_def.inc").read())
def finish(self):
diff --git a/upb/port_def.inc b/upb/port_def.inc
index 33ff78c..fe975a0 100644
--- a/upb/port_def.inc
+++ b/upb/port_def.inc
@@ -1,4 +1,8 @@
+#ifndef UINTPTR_MAX
+#error must include stdint.h first
+#endif
+
#if UINTPTR_MAX == 0xffffffff
#define UPB_SIZE(size32, size64) size32
#else
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback