From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Remove unneeded HAVE_POSIX conditionals Date: Sat, 22 Feb 2014 09:52:06 -0500 Message-ID: <87ios7kxnt.fsf@yeeloong.lan> References: <834n3x8o7m.fsf@gnu.org> <83y519788a.fsf@gnu.org> <871tz0d5vc.fsf@gnu.org> <83iosc76kz.fsf@gnu.org> <87vbwc72dp.fsf_-_@gnu.org> <837g8n4ete.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1393080799 14731 80.91.229.3 (22 Feb 2014 14:53:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Feb 2014 14:53:19 +0000 (UTC) Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , guile-devel@gnu.org To: Eli Zaretskii Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Feb 22 15:53:27 2014 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WHDxG-00041M-LI for guile-devel@m.gmane.org; Sat, 22 Feb 2014 15:53:26 +0100 Original-Received: from localhost ([::1]:49821 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHDxG-0007ol-Bx for guile-devel@m.gmane.org; Sat, 22 Feb 2014 09:53:26 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46292) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHDx7-0007oP-7z for guile-devel@gnu.org; Sat, 22 Feb 2014 09:53:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WHDx1-0002ey-CM for guile-devel@gnu.org; Sat, 22 Feb 2014 09:53:17 -0500 Original-Received: from world.peace.net ([96.39.62.75]:48400) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHDx1-0002er-7h; Sat, 22 Feb 2014 09:53:11 -0500 Original-Received: from 209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.91.212] helo=yeeloong.lan) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1WHDwt-0000BH-Th; Sat, 22 Feb 2014 09:53:04 -0500 In-Reply-To: <837g8n4ete.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 22 Feb 2014 12:33:33 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 96.39.62.75 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:16910 Archived-At: Eli Zaretskii writes: > This patch removes several "#ifdef HAVE_POSIX" conditionals that > unnecessarily prevent useful Guile functions from showing up in the > MinGW build on MS-Windows. I think perhaps we should simply remove the --disable-posix configure option in master, since it is apparently no longer needed on Windows. Of course this patch would be part of that. If we decide to keep --disable-posix (which should be the case on stable-2.0 regardless), then I think we should not apply this patch. Instead, we should just recommend that MinGW builds be done without --disable-posix. > diff --git a/libguile/filesys.c b/libguile/filesys.c > index aa3e671..441ced8 100644 > --- a/libguile/filesys.c > +++ b/libguile/filesys.c > @@ -111,7 +111,12 @@ > > /* Some more definitions for the native Windows port. */ > #ifdef __MINGW32__ > -# define fsync(fd) _commit (fd) > +# define fsync(fd) _commit (fd) > +# define WIN32_LEAN_AND_MEAN > +# include > +/* FIXME: Should use 'link' module from gnulib. */ > +# define link(f1,f2) CreateHardLink(f2, f1, NULL) > +# define HAVE_LINK 1 > #endif /* __MINGW32__ */ Rather than including Windows-specific code in Guile and this FIXME, let's just add the 'link' Gnulib module, as you suggest. I already have a list of some more modules to add, so I'll do that in the next day or so. What do you think? Thanks, Mark