Move PRIu64, OSSLzu to e_os.h
authorRich Salz <rsalz@openssl.org>
Mon, 27 Mar 2017 20:49:29 +0000 (16:49 -0400)
committerRich Salz <rsalz@openssl.org>
Tue, 28 Mar 2017 12:43:48 +0000 (08:43 -0400)
Those macros are private, not public.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3044)

e_os.h
include/openssl/e_os2.h
test/build.info
test/ssltestlib.c

diff --git a/e_os.h b/e_os.h
index d2f4d3ff286a2655df5c4ba037f9727abab24468..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)
index 7960d86f8481f06b5078056e6df1591b29f85898..c1a9ad7c25318330f9080c059470782fbfc236cb 100644 (file)
@@ -258,29 +258,6 @@ typedef unsigned __int64 uint64_t;
 #  include <stdint.h>
 # 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.
- */
-# 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
-
 /* ossl_inline: portable inline definition usable in public headers */
 # if !defined(inline) && !defined(__cplusplus)
 #  if defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L
index 8c760f494c385f930cf86fb4474904b062f83170..2e7737f9281cd23f6cd4e60c64bdf4534c8b9be4 100644 (file)
@@ -253,7 +253,7 @@ IF[{- !$disabled{tests} -}]
   INCLUDE[testutil.o]=..
   INCLUDE[ssl_test_ctx.o]=../include
   INCLUDE[handshake_helper.o]=../include
-  INCLUDE[ssltestlib.o]=../include
+  INCLUDE[ssltestlib.o]=.. ../include
 
   SOURCE[x509aux]=x509aux.c
   INCLUDE[x509aux]=../include
index 64aa9169b692e2c0e16f14b02dd22264629ba200..6fce12e0fc72faa2d9f8fb77ccbd33c2a12570e3 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <string.h>
 
+#include "e_os.h"
 #include "ssltestlib.h"
 
 static int tls_dump_new(BIO *bi);