bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stat-time.h vs. pthread-win32


From: Ludovic Courtès
Subject: Re: stat-time.h vs. pthread-win32
Date: Fri, 29 Mar 2013 12:53:29 +0100
User-agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.3 (gnu/linux)

Paul Eggert <address@hidden> skribis:

> That workaround looks OK to me.  pthread-win32
> seems like it's in pretty bad shape, so hacks like
> that appear to be necessary.

Here’s a complete patch.

Ludo’.

>From 1147bf0f9efe58680f571b87907a741ce2d93a24 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <address@hidden>
Date: Fri, 29 Mar 2013 12:52:26 +0100
Subject: [PATCH] time: work around pthreads-win32 defects to define 'struct
 timespec'

* lib/time.in.h address@hidden: #undef
  HAVE_STRUCT_TIMESPEC to work around pthreads-win32's buggy <pthread.h>
  as reported at
  <http://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg00096.html>.
---
 ChangeLog     |    8 ++++++++
 lib/time.in.h |    6 ++++++
 2 files changed, 14 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 3843c33..61fd612 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-03-29  Ludovic Courtès  <address@hidden>
+
+       time: work around pthreads-win32 defects to define 'struct timespec'
+       * lib/time.in.h address@hidden: #undef
+       HAVE_STRUCT_TIMESPEC to work around pthreads-win32's buggy <pthread.h>
+       as reported at
+       <http://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg00096.html>.
+
 2013-03-21  Paul Eggert  <address@hidden>
 
        sys_select, sys_time: port 2013-01-30 Solaris 2.6 fix to Cygwin
diff --git a/lib/time.in.h b/lib/time.in.h
index ceea2ee..c2a9db6 100644
--- a/lib/time.in.h
+++ b/lib/time.in.h
@@ -54,6 +54,12 @@
 #  if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
 #   include <sys/time.h>
 #  elif @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
+
+/* The pthreads-win32 <pthread.h> (as of version 1.10.0) includes the
+   user's <config.h>, and defines 'struct timespec' only when
+   HAVE_STRUCT_TIMESPEC is undefined.  Work around that.  */
+#   undef HAVE_STRUCT_TIMESPEC
+
 #   include <pthread.h>
 /* The pthreads-win32 <pthread.h> also defines a couple of broken macros.  */
 #   undef asctime_r
-- 
1.7.10.4


reply via email to

[Prev in Thread] Current Thread [Next in Thread]