+#if __STDC_VERSION__ >= 199901L
+#ifndef SIZE_MAX
+#define SIZE_MAX ((~((size_t)0)) >> 1)
+#endif
+
+#ifndef RSIZE_MAX /* C11, Annex K */
+#define RSIZE_MAX (SIZE_MAX >> 1)
+#endif
+#ifndef RSSIZE_MAX /* Halve signed size even further than unsigned */
+#define RSSIZE_MAX ((ssize_t)(RSIZE_MAX >> 1))
+#endif
+#else /* Old compiler */
+#undef SIZE_MAX
+#undef RSIZE_MAX
+#undef RSSIZE_MAX
+#define SIZE_MAX ((~((size_t)0)) >> 1)
+#define RSIZE_MAX (SIZE_MAX >> 1)
+#define RSSIZE_MAX ((ssize_t)(RSIZE_MAX >> 1))
+#endif
+
+#if __STDC_VERSION__ >= 199901L
+#define ASN_PRI_SIZE "zu"
+#define ASN_PRI_SSIZE "zd"
+#define ASN_PRIuMAX PRIuMAX
+#define ASN_PRIdMAX PRIdMAX
+#else
+#define ASN_PRI_SIZE "lu"
+#define ASN_PRI_SSIZE "ld"
+#if LLONG_MAX > LONG_MAX
+#define ASN_PRIuMAX "llu"
+#define ASN_PRIdMAX "lld"
+#else
+#define ASN_PRIuMAX "lu"
+#define ASN_PRIdMAX "ld"
+#endif
+#endif
+
+#endif /* ASN_SYSTEM_H */