unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Kevin Ryde <user42@zip.com.au>
Cc: bug-guile@gnu.org
Subject: Re: [Patch] --with-threads on MinGW
Date: Thu, 14 Dec 2006 10:29:22 +1100	[thread overview]
Message-ID: <87d56nnzn1.fsf@zip.com.au> (raw)
In-Reply-To: <457490A5.80601@web.de> (Nils Durner's message of "Mon, 04 Dec 2006 22:18:29 +0100")

[-- Attachment #1: Type: text/plain, Size: 295 bytes --]

Nils Durner <ndurner@web.de> writes:
>
> The only timespec declaration on Win32 is the one in pthread.h,

(Taking bits one at a time so I don't get confused.)

I checked in the change below to hopefully detect.  My debian mingw
cross doesn't have pthread.h at all, so I can't actually test it.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: configure.in.pthread-timespec.diff --]
[-- Type: text/x-diff, Size: 1559 bytes --]

--- configure.in.~1.268.2.23.~	2006-12-03 10:19:27.000000000 +1100
+++ configure.in	2006-12-14 10:10:18.000000000 +1100
@@ -622,10 +622,12 @@
 # Reasons for testing:
 #   netdb.h - not in mingw
 #   sys/param.h - not in mingw
+#   pthread.h - only available with pthreads.  ACX_PTHREAD doesn't
+#       check this specifically, we need it for the timespec test below.
 #   sethostname - the function itself check because it's not in mingw,
 #       the DECL is checked because Solaris 10 doens't have in any header
 #
-AC_CHECK_HEADERS(crypt.h netdb.h sys/param.h sys/resource.h sys/file.h)
+AC_CHECK_HEADERS(crypt.h netdb.h pthread.h sys/param.h sys/resource.h sys/file.h)
 AC_CHECK_FUNCS(chroot flock getlogin cuserid getpriority setpriority getpass sethostname gethostname)
 AC_CHECK_DECLS([sethostname])
 
@@ -1034,17 +1036,22 @@
 fi
 
 
+# On mingw, struct timespec is in <pthread.h>.
+#
 AC_MSG_CHECKING(for struct timespec)
 AC_CACHE_VAL(scm_cv_struct_timespec,
 	AC_TRY_COMPILE([
-#include <time.h>],
+#include <time.h>
+#if HAVE_PTHREAD_H
+#include <pthread.h>
+#endif],
 			[struct timespec t;  t.tv_nsec = 100],
 			scm_cv_struct_timespec="yes",
 			scm_cv_struct_timespec="no"))
 AC_MSG_RESULT($scm_cv_struct_timespec)
 if test $scm_cv_struct_timespec = yes; then
   AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1,
-    [Define this if your system defines struct timespec via <time.h>.])
+    [Define this if your system defines struct timespec via either <time.h> or <pthread.h>.])
 fi
 
 #--------------------------------------------------------------------

[-- Attachment #3: Type: text/plain, Size: 137 bytes --]

_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile

  reply	other threads:[~2006-12-13 23:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-03 18:26 [Patch] --with-threads on MinGW Nils Durner
2006-12-04  0:31 ` Kevin Ryde
2006-12-04 21:18   ` Nils Durner
2006-12-13 23:29     ` Kevin Ryde [this message]
2006-12-13 23:55     ` Kevin Ryde
2006-12-14  0:09       ` Kevin Ryde
2006-12-14 22:12       ` Nils Durner
2006-12-15  0:24         ` Kevin Ryde
2006-12-14  0:40     ` Kevin Ryde
2006-12-14  0:12 ` Kevin Ryde
2006-12-14 21:42   ` Nils Durner
2006-12-15  0:25     ` Kevin Ryde
2006-12-27  0:10       ` Kevin Ryde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d56nnzn1.fsf@zip.com.au \
    --to=user42@zip.com.au \
    --cc=bug-guile@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).