[openssl-commits] [openssl] OpenSSL_1_1_0-stable update
Rich Salz
rsalz at openssl.org
Tue Mar 28 15:38:58 UTC 2017
The branch OpenSSL_1_1_0-stable has been updated
via 37e4be4a8612958848c1cbe2e6c2f9d97aaa4cca (commit)
from 0f954d65f40495f53bdfb85b856427da44cf5c92 (commit)
- Log -----------------------------------------------------------------
commit 37e4be4a8612958848c1cbe2e6c2f9d97aaa4cca
Author: Rich Salz <rsalz at openssl.org>
Date: Tue Mar 28 09:24:16 2017 -0400
Move PRIu64 to e_os.h
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3061)
-----------------------------------------------------------------------
Summary of changes:
e_os.h | 15 +++++++++++++++
include/openssl/e_os2.h | 13 -------------
test/build.info | 2 +-
test/ssltestlib.c | 1 +
4 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/e_os.h b/e_os.h
index eafa862..6819271 100644
--- 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)
diff --git a/include/openssl/e_os2.h b/include/openssl/e_os2.h
index 99ea347..1f3ecb6 100644
--- a/include/openssl/e_os2.h
+++ b/include/openssl/e_os2.h
@@ -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
diff --git a/test/build.info b/test/build.info
index 641505d..16ed0d7 100644
--- a/test/build.info
+++ b/test/build.info
@@ -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
diff --git a/test/ssltestlib.c b/test/ssltestlib.c
index 4e20763..192a7ab 100644
--- a/test/ssltestlib.c
+++ b/test/ssltestlib.c
@@ -9,6 +9,7 @@
#include <string.h>
+#include "e_os.h"
#include "ssltestlib.h"
static int tls_dump_new(BIO *bi);
More information about the openssl-commits
mailing list