Document shorthand gmtime macros
diff --git a/library/threading.c b/library/threading.c
index c22a1da..f7bca0f 100644
--- a/library/threading.c
+++ b/library/threading.c
@@ -35,13 +35,20 @@
#include "mbedtls/threading.h"
-#if !defined(_WIN32) && (defined(__unix__) || \
- (defined(__APPLE__) && defined(__MACH__)))
+#if !defined(_WIN32) && (defined(unix) || defined(__unix) || \
+ defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)))
#include <unistd.h>
#if !defined(_POSIX_VERSION) || 200112L > _POSIX_THREAD_SAFE_FUNCTIONS
+/*
+ * This is a convenience shorthand macro to avoid checking the long
+ * preprocessor conditions above. Ideally, we could expose this macro in
+ * platform_utils.h and simply use it in platform_utils.c, threading.c and
+ * threading.h. However, this macro is not part of the Mbed TLS public API, so
+ * we keep it private by only definining it in this file
+ */
#define THREADING_USE_GMTIME
#endif /* !_POSIX_VERSION || 200112L > _POSIX_THREAD_SAFE_FUNCTIONS */
-#endif /* !_WIN32 && (__unix__ || (__APPLE__ && __MACH__)) */
+#endif /* !_WIN32 && (unix || __unix || __unix__ || (__APPLE__ && __MACH__)) */
#if defined(MBEDTLS_THREADING_PTHREAD)
static void threading_mutex_init_pthread( mbedtls_threading_mutex_t *mutex )