Mercurial > hg > octave-lyh > gnulib-hg
changeset 15816:db340f34e324
glthread/*, strsignal: Support for MSVC.
* lib/glthread/cond.h: Define WIN32_LEAN_AND_MEAN, so as to avoid
including <winsock.h> on MSVC 9.
* lib/glthread/lock.h: Likewise.
* lib/glthread/thread.h: Likewise.
* lib/glthread/tls.h: Likewise.
* lib/glthread/yield.h: Likewise.
* lib/strsignal.c: Include <string.h> first. Don't include <unistd.h>
if HAVE_UNISTD_H is false.
* m4/strsignal.m4 (gl_PREREQ_STRSIGNAL): Test for <unistd.h>.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Tue, 04 Oct 2011 01:19:29 +0200 |
parents | 22c19cdc7906 |
children | 5d2a7ba94045 |
files | ChangeLog lib/glthread/cond.h lib/glthread/lock.h lib/glthread/thread.h lib/glthread/tls.h lib/glthread/yield.h lib/strsignal.c m4/strsignal.m4 |
diffstat | 8 files changed, 26 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2011-10-03 Bruno Haible <bruno@clisp.org> + + glthread/*, strsignal: Support for MSVC. + * lib/glthread/cond.h: Define WIN32_LEAN_AND_MEAN, so as to avoid + including <winsock.h> on MSVC 9. + * lib/glthread/lock.h: Likewise. + * lib/glthread/thread.h: Likewise. + * lib/glthread/tls.h: Likewise. + * lib/glthread/yield.h: Likewise. + * lib/strsignal.c: Include <string.h> first. Don't include <unistd.h> + if HAVE_UNISTD_H is false. + * m4/strsignal.m4 (gl_PREREQ_STRSIGNAL): Test for <unistd.h>. + 2011-10-03 Bruno Haible <bruno@clisp.org> nonblocking tests: Fix test failure on OpenBSD/SPARC64.
--- a/lib/glthread/cond.h +++ b/lib/glthread/cond.h @@ -271,6 +271,7 @@ #if USE_WIN32_THREADS +# define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include <windows.h> # ifdef __cplusplus
--- a/lib/glthread/lock.h +++ b/lib/glthread/lock.h @@ -616,6 +616,7 @@ #if USE_WIN32_THREADS +# define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include <windows.h> # ifdef __cplusplus
--- a/lib/glthread/thread.h +++ b/lib/glthread/thread.h @@ -292,6 +292,7 @@ #if USE_WIN32_THREADS +# define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include <windows.h> # ifdef __cplusplus
--- a/lib/glthread/tls.h +++ b/lib/glthread/tls.h @@ -222,6 +222,7 @@ #if USE_WIN32_THREADS +# define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include <windows.h> /* ------------------------- gl_tls_key_t datatype ------------------------- */
--- a/lib/glthread/yield.h +++ b/lib/glthread/yield.h @@ -91,6 +91,7 @@ #if USE_WIN32_THREADS +# define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include <windows.h> # ifdef __cplusplus
--- a/lib/strsignal.c +++ b/lib/strsignal.c @@ -19,10 +19,12 @@ # include <config.h> #endif +/* Specification. */ +#include <string.h> + #include <signal.h> #include <stdio.h> #include <stdlib.h> -#include <string.h> #ifdef _LIBC # include <libintl.h> @@ -54,7 +56,9 @@ #else /* !_LIBC */ /* NetBSD declares sys_siglist in unistd.h. */ -# include <unistd.h> +# if HAVE_UNISTD_H +# include <unistd.h> +# endif # define INTUSE(x) (x)
--- a/m4/strsignal.m4 +++ b/m4/strsignal.m4 @@ -1,4 +1,4 @@ -# strsignal.m4 serial 7 +# strsignal.m4 serial 8 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -53,6 +53,7 @@ # Prerequisites of lib/strsignal.c. AC_DEFUN([gl_PREREQ_STRSIGNAL], [ + AC_CHECK_HEADERS_ONCE([unistd.h]) AC_REQUIRE([AC_DECL_SYS_SIGLIST]) AC_CHECK_DECLS([_sys_siglist], [], [], [[#include <signal.h>]]) ])