]> granicus.if.org Git - openssl/commitdiff
Move PRIu64 to e_os.h
authorRich Salz <rsalz@openssl.org>
Tue, 28 Mar 2017 13:24:16 +0000 (09:24 -0400)
committerRich Salz <rsalz@openssl.org>
Tue, 28 Mar 2017 15:38:55 +0000 (11:38 -0400)
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3061)

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 eafa8623aabe4ca009c254353636e0310d2add36..6819271eaae505f9fb660c176025723a6ef4e6f2 100644 (file)
--- a/e_os.h
+++ b/e_os.h
@@ -29,6 +29,21 @@ 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
+
 # if !defined(NDEBUG) && !defined(OPENSSL_NO_STDIO)
 #  define REF_ASSERT_ISNT(test) \
     (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
index 99ea3477d7b42903c5c5a2c79446c49d258f36fb..1f3ecb65a01a3d7c84b1e64c7aa84fba9bac8292 100644 (file)
@@ -242,7 +242,6 @@ typedef INT32 int32_t;
 typedef UINT32 uint32_t;
 typedef INT64 int64_t;
 typedef UINT64 uint64_t;
-#  define PRIu64 "%Lu"
 # elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
      defined(__osf__) || defined(__sgi) || defined(__hpux) || \
      defined(OPENSSL_SYS_VMS) || defined (__OpenBSD__)
@@ -264,18 +263,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
-
 /* ossl_inline: portable inline definition usable in public headers */
 # if !defined(inline) && !defined(__cplusplus)
 #  if defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L
index 641505d241f53f7a155bfa150877796216d689f0..16ed0d7758a90b60ca29de9b058702ab218d24a5 100644 (file)
@@ -257,7 +257,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 4e20763beefaeedfdddaca3f4ed0b14949d92e58..192a7aba5c245db2db6f833d08d909ae53c3a58c 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <string.h>
 
+#include "e_os.h"
 #include "ssltestlib.h"
 
 static int tls_dump_new(BIO *bi);