include/openssl/macros.h: better OPENSSL_FUNC fallback
authorRichard Levitte <levitte@openssl.org>
Mon, 23 Sep 2019 04:26:57 +0000 (06:26 +0200)
committerRichard Levitte <levitte@openssl.org>
Mon, 23 Sep 2019 04:46:18 +0000 (06:46 +0200)
Make sure OPENSSL_FUNC gets defined to something, no matter what.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9976)

include/openssl/macros.h

index a06b8695221f5c96b117111205c0d342bea335be..78fbd386988e421d93514b3523f3f6690f2edbfd 100644 (file)
  *
  * If none of the above applies, we check if the compiler is MSVC,
  * and use __FUNCTION__ if that's the case.
- *
- * If all these possibilities are exhausted, we give up and use a
- * static string.
  */
 # ifndef OPENSSL_FUNC
 #  if defined(__STDC_VERSION__)
 #   endif
 #  elif defined(_MSC_VER)
 #    define OPENSSL_FUNC __FUNCTION__
-#  else
+#  endif
+/*
+ * If all these possibilities are exhausted, we give up and use a
+ * static string.
+ */
+#  ifndef OPENSSL_FUNC
 #   define OPENSSL_FUNC "(unknown function)"
 #  endif
 # endif