+2018-09-02 Keith Marshall <keith@users.osdn.me>
+
+ Make clockapi symbolic constants #ifdef detectable.
+
+ * mingwex/clockapi.c (CLOCK_REALTIME, CLOCK_MONOTONIC): Add "const".
+ * include/time.h (CLOCK_REALTIME, CLOCK_MONOTONIC): Likewise; also
+ define both as self-referencing macros.
+
2018-08-26 Keith Marshall <keith@users.osdn.me>
Circumvent <process.h> testsuite failure with GCC-7+.
* $Id$
*
* Written by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
- * Copyright (C) 1997-2007, 2011, 2015, 2016, MinGW.org Project.
+ * Copyright (C) 1997-2007, 2011, 2015-2018, MinGW.org Project.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
/* The standard clockid_t entities which we choose to support.
*/
-extern clockid_t CLOCK_REALTIME;
-extern clockid_t CLOCK_MONOTONIC;
+extern clockid_t const CLOCK_REALTIME;
+extern clockid_t const CLOCK_MONOTONIC;
+
+/* Ensure that these clock implementations are detectable via
+ * preprocessor #ifdef names.
+ */
+#define CLOCK_REALTIME CLOCK_REALTIME
+#define CLOCK_MONOTONIC CLOCK_MONOTONIC
/* Prototypes for the standard POSIX functions which provide the
* API to these standard clockid_t entities.
/* Publicly visible references to the preceding (opaque) clock definitions.
*/
-clockid_t CLOCK_REALTIME = &clock_api[CLOCK_TYPE_REALTIME];
-clockid_t CLOCK_MONOTONIC = &clock_api[CLOCK_TYPE_MONOTONIC];
+clockid_t const CLOCK_REALTIME = &clock_api[CLOCK_TYPE_REALTIME];
+clockid_t const CLOCK_MONOTONIC = &clock_api[CLOCK_TYPE_MONOTONIC];
CLOCK_INLINE
int64_t clock_api_getres_interval( clockid_t clock_api )