Refomat a few comments on 80 cols
[oweals/openssl.git] / e_os.h
diff --git a/e_os.h b/e_os.h
index eafa8623aabe4ca009c254353636e0310d2add36..f255aa9c22280d23935fcd3885574e589d48c2c6 100644 (file)
--- a/e_os.h
+++ b/e_os.h
@@ -29,6 +29,32 @@ extern "C" {
 #  endif
 # endif
 
+/*
+ * We need a format operator for some client tools for uint64_t.  If inttypes.h
+ * isn't available or did not define it, just go with hard-coded.
+ */
+# if defined(OPENSSL_SYS_UEFI)
+#  define PRIu64 "Lu"
+# endif
+# ifndef PRIu64
+#  ifdef SIXTY_FOUR_BIT_LONG
+#   define PRIu64 "lu"
+#  else
+#   define PRIu64 "llu"
+#  endif
+# endif
+
+/* Format specifier for printing size_t */
+# if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
+#  define OSSLzu  "zu"
+# else
+#  ifdef THIRTY_TWO_BIT
+#   define OSSLzu "u"
+#  else
+#   define OSSLzu PRIu64
+#  endif
+# endif
+
 # if !defined(NDEBUG) && !defined(OPENSSL_NO_STDIO)
 #  define REF_ASSERT_ISNT(test) \
     (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
@@ -513,6 +539,10 @@ struct servent *getservbyname(const char *name, const char *proto);
 
 #define OSSL_NELEM(x)    (sizeof(x)/sizeof(x[0]))
 
+#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
+# define CRYPTO_memcmp memcmp
+#endif
+
 #ifdef  __cplusplus
 }
 #endif