bug-gnulib
[Top][All Lists]
Advanced

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

Re: [bug-gnulib] Re: nanosleep module and mingw32


From: Martin Lambers
Subject: Re: [bug-gnulib] Re: nanosleep module and mingw32
Date: Tue, 23 May 2006 22:21:15 +0200
User-agent: Mutt/1.5.11+cvs20060403

With the new sys_select module and the attached changes to the nanosleep
module, my project compiles and links fine when crosscompiled using the
mingw package.

Martin


diff -uNr gnulib/lib/nanosleep.c gnulib-sys_select_h/lib/nanosleep.c
--- gnulib/lib/nanosleep.c      2006-05-20 21:22:15.000000000 +0200
+++ gnulib-sys_select_h/lib/nanosleep.c 2006-05-23 21:53:46.000000000 +0200
@@ -29,9 +29,7 @@
 
 #include <stdbool.h>
 #include <stdio.h>
-#if HAVE_SYS_SELECT_H
-# include <sys/select.h>
-#endif
+#include <sys/select.h>
 #include <sys/types.h>
 #include <signal.h>
 
diff -uNr gnulib/lib/nanosleep.h gnulib-sys_select_h/lib/nanosleep.h
--- gnulib/lib/nanosleep.h      1970-01-01 01:00:00.000000000 +0100
+++ gnulib-sys_select_h/lib/nanosleep.h 2006-05-23 22:15:08.000000000 +0200
@@ -0,0 +1,31 @@
+/* Copyright (C) 2006 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef _NANOSLEEP_H
+#define _NANOSLEEP_H
+
+#if HAVE_NANOSLEEP
+
+/* Get nanosleep() declaration.  */
+#include <time.h>
+
+#else
+
+int nanosleep (const struct timespec *req, struct timespec *rem);
+
+#endif
+
+#endif /* _NANOSLEEP_H */
diff -uNr gnulib/modules/nanosleep gnulib-sys_select_h/modules/nanosleep
--- gnulib/modules/nanosleep    2006-03-08 00:36:17.000000000 +0100
+++ gnulib-sys_select_h/modules/nanosleep       2006-05-23 22:15:56.000000000 
+0200
@@ -3,12 +3,14 @@
 
 Files:
 lib/nanosleep.c
+lib/nanosleep.h
 m4/nanosleep.m4
 
 Depends-on:
 timespec
 stdbool
 extensions
+sys_select
 
 configure.ac:
 gl_FUNC_NANOSLEEP
@@ -16,7 +18,7 @@
 Makefile.am:
 
 Include:
-<time.h>
+"nanosleep.h"
 
 License:
 GPL




reply via email to

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