Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Aug 2016 19:48:03 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r304542 - projects/clang390-import/contrib/jemalloc/include/jemalloc/internal
Message-ID:  <201608201948.u7KJm3nW009591@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Sat Aug 20 19:48:03 2016
New Revision: 304542
URL: https://svnweb.freebsd.org/changeset/base/304542

Log:
  Temporarily fix "macro expansion producing 'defined' has undefined
  behavior" in jemalloc, by defining JEMALLOC_CLOCK_GETTIME in a portable
  manner.

Modified:
  projects/clang390-import/contrib/jemalloc/include/jemalloc/internal/nstime.h

Modified: projects/clang390-import/contrib/jemalloc/include/jemalloc/internal/nstime.h
==============================================================================
--- projects/clang390-import/contrib/jemalloc/include/jemalloc/internal/nstime.h	Sat Aug 20 19:33:55 2016	(r304541)
+++ projects/clang390-import/contrib/jemalloc/include/jemalloc/internal/nstime.h	Sat Aug 20 19:48:03 2016	(r304542)
@@ -1,8 +1,11 @@
 /******************************************************************************/
 #ifdef JEMALLOC_H_TYPES
 
-#define	JEMALLOC_CLOCK_GETTIME defined(_POSIX_MONOTONIC_CLOCK) \
-    && _POSIX_MONOTONIC_CLOCK >= 0
+#if defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0
+#define JEMALLOC_CLOCK_GETTIME 1
+#else
+#define JEMALLOC_CLOCK_GETTIME 0
+#endif
 
 typedef struct nstime_s nstime_t;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608201948.u7KJm3nW009591>