C90-compliant negative LONG_MIN
diff --git a/libasn1compiler/asn1c_out.h b/libasn1compiler/asn1c_out.h
index 0523cbc..04d7ff2 100644
--- a/libasn1compiler/asn1c_out.h
+++ b/libasn1compiler/asn1c_out.h
@@ -108,4 +108,21 @@
REDIR(saved_target); \
} while(0)
+/*
+ * Format LONG_MIN according to C90 rules.
+ */
+#define OINT(iv) do { \
+ if(iv == (-2147483647L - 1)) \
+ OUT("(-2147483647L - 1)"); \
+ else \
+ OUT("%" PRIdASN, iv); \
+} while(0)
+
+#define OINTS(iv) do { \
+ if(iv == (-2147483647L - 1)) \
+ OUT("(-2147483647L - 1)"); \
+ else \
+ OUT("% " PRIdASN, iv); \
+} while(0)
+
#endif /* _ASN1_COMPILED_OUTPUT_H_ */