diff options
-rw-r--r-- | configure.ac | 12 | ||||
-rw-r--r-- | sshkey.h | 4 |
2 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 35e2e8d1d..0ba2ff442 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -265,6 +265,18 @@ __attribute__((__unused__)) static void foo(void){return;}]], | |||
265 | [compiler does not accept __attribute__ on return types]) ] | 265 | [compiler does not accept __attribute__ on return types]) ] |
266 | ) | 266 | ) |
267 | 267 | ||
268 | AC_MSG_CHECKING([if compiler allows __attribute__ prototype args]) | ||
269 | AC_COMPILE_IFELSE( | ||
270 | [AC_LANG_PROGRAM([[ | ||
271 | #include <stdlib.h> | ||
272 | typedef void foo(const char *, ...) __attribute__((format(printf, 1, 2)));]], | ||
273 | [[ exit(0); ]])], | ||
274 | [ AC_MSG_RESULT([yes]) ], | ||
275 | [ AC_MSG_RESULT([no]) | ||
276 | AC_DEFINE(NO_ATTRIBUTE_ON_PROTOTYPE_ARGS, 1, | ||
277 | [compiler does not accept __attribute__ on protoype args]) ] | ||
278 | ) | ||
279 | |||
268 | if test "x$no_attrib_nonnull" != "x1" ; then | 280 | if test "x$no_attrib_nonnull" != "x1" ; then |
269 | AC_DEFINE([HAVE_ATTRIBUTE__NONNULL__], [1], [Have attribute nonnull]) | 281 | AC_DEFINE([HAVE_ATTRIBUTE__NONNULL__], [1], [Have attribute nonnull]) |
270 | fi | 282 | fi |
@@ -220,7 +220,11 @@ int sshkey_parse_private_fileblob_type(struct sshbuf *blob, int type, | |||
220 | int ssh_rsa_generate_additional_parameters(struct sshkey *); | 220 | int ssh_rsa_generate_additional_parameters(struct sshkey *); |
221 | 221 | ||
222 | /* stateful keys (e.g. XMSS) */ | 222 | /* stateful keys (e.g. XMSS) */ |
223 | #ifdef NO_ATTRIBUTE_ON_PROTOTYPE_ARGS | ||
224 | typedef void sshkey_printfn(const char *, ...); | ||
225 | #else | ||
223 | typedef void sshkey_printfn(const char *, ...) __attribute__((format(printf, 1, 2))); | 226 | typedef void sshkey_printfn(const char *, ...) __attribute__((format(printf, 1, 2))); |
227 | #endif | ||
224 | int sshkey_set_filename(struct sshkey *, const char *); | 228 | int sshkey_set_filename(struct sshkey *, const char *); |
225 | int sshkey_enable_maxsign(struct sshkey *, u_int32_t); | 229 | int sshkey_enable_maxsign(struct sshkey *, u_int32_t); |
226 | u_int32_t sshkey_signatures_left(const struct sshkey *); | 230 | u_int32_t sshkey_signatures_left(const struct sshkey *); |