]> gcc.gnu.org Git - gcc.git/blobdiff - libstdc++-v3/config/os/bsd/darwin/os_defines.h
libstdc++, Darwin: Limit recursive mutex init to OS versions needing it.
[gcc.git] / libstdc++-v3 / config / os / bsd / darwin / os_defines.h
index 421478d82d46e25a46b48ea9a781d7affbab1a7b..f56f31ad2f5ee0f98c576b2eac03e0bc83cbaebf 100644 (file)
@@ -1,6 +1,6 @@
 // Specific definitions for Darwin -*- C++ -*-
 
-// Copyright (C) 2004, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2004-2022 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
 // -flat_namespace to work around the way that it doesn't.
 #define _GLIBCXX_WEAK_DEFINITION __attribute__ ((weak))
 
-// Static initializer macro is buggy in darwin, see libstdc++/51906
+#if defined (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) \
+     && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1080)
+// Static initializer macro is absent for Darwin < 11 and buggy in Darwin 11,
+// see libstdc++/51906.  Fixed in Darwin 12 (OS X 10.8).
 #define _GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC
+#endif
+
+// Configure checks for nanosleep fail on Darwin, but nanosleep and
+// sched_yield are always available, so use them.
+#define _GLIBCXX_USE_NANOSLEEP 1
+#define _GLIBCXX_USE_SCHED_YIELD 1
+
+// No support for referencing weak symbols without a definition.
+#define _GLIBCXX_USE_WEAK_REF 0
 
 #endif
This page took 0.034108 seconds and 5 git commands to generate.