summaryrefslogtreecommitdiffstats
path: root/apps/opt.c
diff options
context:
space:
mode:
authorViktor Dukhovni <openssl-users@dukhovni.org>2016-01-13 15:42:06 -0500
committerViktor Dukhovni <openssl-users@dukhovni.org>2016-01-13 16:12:31 -0500
commitd94a1a706589414f705bb459ec983a722c060236 (patch)
tree1522784223159ae437a48f932f65f051ec52061c /apps/opt.c
parent6b95a37833415d8fd1abb85f85e29fb57c05b11c (diff)
For stro[ui]max require both C99 and UINTMAX_MAX/INTMAX_MAX
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'apps/opt.c')
-rw-r--r--apps/opt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/opt.c b/apps/opt.c
index 516b3de01b..17ac47419b 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)