mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-09 12:25:48 +01:00
Don't use _SC_MONOTONIC_CLOCK unless USE_CLOCK_GETTIME is defined.
2007-01-08 Matthias Clasen <mclasen@redhat.com> * gthread/gthread-posix.c (g_thread_impl_init): Don't use _SC_MONOTONIC_CLOCK unless USE_CLOCK_GETTIME is defined. (#394150) svn path=/trunk/; revision=5230
This commit is contained in:
parent
06f1459ff2
commit
cf7dcc4f38
@ -1,3 +1,9 @@
|
|||||||
|
2007-01-08 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gthread/gthread-posix.c (g_thread_impl_init): Don't
|
||||||
|
use _SC_MONOTONIC_CLOCK unless USE_CLOCK_GETTIME is
|
||||||
|
defined. (#394150)
|
||||||
|
|
||||||
2007-01-07 Matthias Clasen <mclasen@redhat.com>
|
2007-01-07 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
Don't link glib against libpthread. (#393812)
|
Don't link glib against libpthread. (#393812)
|
||||||
|
@ -119,9 +119,9 @@ static gulong g_thread_min_stack_size = 0;
|
|||||||
|
|
||||||
#define G_MUTEX_SIZE (sizeof (pthread_mutex_t))
|
#define G_MUTEX_SIZE (sizeof (pthread_mutex_t))
|
||||||
|
|
||||||
static gint posix_clock = 0;
|
|
||||||
#if defined(HAVE_CLOCK_GETTIME) && defined(HAVE_MONOTONIC_CLOCK)
|
#if defined(HAVE_CLOCK_GETTIME) && defined(HAVE_MONOTONIC_CLOCK)
|
||||||
#define USE_CLOCK_GETTIME 1
|
#define USE_CLOCK_GETTIME 1
|
||||||
|
static gint posix_clock = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_SC_THREAD_STACK_MIN) || defined (HAVE_PRIORITIES) || defined (USE_CLOCK_GETTIME)
|
#if defined(_SC_THREAD_STACK_MIN) || defined (HAVE_PRIORITIES) || defined (USE_CLOCK_GETTIME)
|
||||||
@ -147,10 +147,12 @@ g_thread_impl_init(void)
|
|||||||
# endif
|
# endif
|
||||||
#endif /* HAVE_PRIORITIES */
|
#endif /* HAVE_PRIORITIES */
|
||||||
|
|
||||||
|
#ifdef USE_CLOCK_GETTIME
|
||||||
if (sysconf (_SC_MONOTONIC_CLOCK) >= 0)
|
if (sysconf (_SC_MONOTONIC_CLOCK) >= 0)
|
||||||
posix_clock = CLOCK_MONOTONIC;
|
posix_clock = CLOCK_MONOTONIC;
|
||||||
else
|
else
|
||||||
posix_clock = CLOCK_REALTIME;
|
posix_clock = CLOCK_REALTIME;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif /* _SC_THREAD_STACK_MIN || HAVE_PRIORITIES */
|
#endif /* _SC_THREAD_STACK_MIN || HAVE_PRIORITIES */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user