[openssl-commits] [openssl] master update

Viktor Dukhovni viktor at openssl.org
Wed Jan 13 21:12:54 UTC 2016


The branch master has been updated
       via  d94a1a706589414f705bb459ec983a722c060236 (commit)
      from  6b95a37833415d8fd1abb85f85e29fb57c05b11c (commit)


- Log -----------------------------------------------------------------
commit d94a1a706589414f705bb459ec983a722c060236
Author: Viktor Dukhovni <openssl-users at dukhovni.org>
Date:   Wed Jan 13 15:42:06 2016 -0500

    For stro[ui]max require both C99 and UINTMAX_MAX/INTMAX_MAX
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 apps/apps.h                | 3 ++-
 apps/opt.c                 | 6 ++++--
 include/openssl/ossl_typ.h | 4 ++--
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/apps/apps.h b/apps/apps.h
index e242414..e549e3f 100644
--- a/apps/apps.h
+++ b/apps/apps.h
@@ -385,7 +385,8 @@ int opt_format(const char *s, unsigned long flags, int *result);
 int opt_int(const char *arg, int *result);
 int opt_ulong(const char *arg, unsigned long *result);
 int opt_long(const char *arg, long *result);
-#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && \
+    defined(INTMAX_MAX) && defined(UINTMAX_MAX)
 int opt_imax(const char *arg, intmax_t *result);
 int opt_umax(const char *arg, uintmax_t *result);
 #endif
diff --git a/apps/opt.c b/apps/opt.c
index 516b3de..17ac474 100644
--- a/apps/opt.c
+++ b/apps/opt.c
@@ -75,7 +75,8 @@ static const OPTIONS *unknown;
 static const OPTIONS *opts;
 static char prog[40];
 
-#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L
+#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L || \
+    !defined(INTMAX_MAX) && !defined(UINTMAX_MAX)
 #define opt_imax opt_long
 #define opt_umax opt_ulong
 #endif
@@ -397,7 +398,8 @@ int opt_long(const char *value, long *result)
     return 1;
 }
 
-#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && \
+    defined(INTMAX_MAX) && defined(UINTMAX_MAX)
 
 /* Parse an intmax_t, put it into *result; return 0 on failure, else 1. */
 int opt_imax(const char *value, intmax_t *result)
diff --git a/include/openssl/ossl_typ.h b/include/openssl/ossl_typ.h
index 87b99f2..faa6319 100644
--- a/include/openssl/ossl_typ.h
+++ b/include/openssl/ossl_typ.h
@@ -201,8 +201,8 @@ typedef struct ocsp_req_ctx_st OCSP_REQ_CTX;
 typedef struct ocsp_response_st OCSP_RESPONSE;
 typedef struct ocsp_responder_id_st OCSP_RESPID;
 
-#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
-    && !defined(OPENSSL_SYS_VMS)
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && \
+    defined(INTMAX_MAX) && defined(UINTMAX_MAX)
 typedef intmax_t ossl_intmax_t;
 typedef uintmax_t ossl_uintmax_t;
 #else


More information about the openssl-commits mailing list