From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.lisp.guile.user Subject: Re: guile 2.0.9 build on mingw Date: Sun, 16 Jun 2013 23:22:57 +0300 Message-ID: <83a9mpu7oe.fsf@gnu.org> References: <83sj1hv2ml.fsf@gnu.org> <874ndx9y7h.fsf@pobox.com> <83ip2bt4qk.fsf@gnu.org> <8761xqhyyt.fsf@gnu.org> <83li6mt18y.fsf@gnu.org> <83wqq3mcq9.fsf@gnu.org> <87k3m3kor5.fsf@gnu.org> <83ehcalysu.fsf@gnu.org> <87sj0pvl4a.fsf@tines.lan> <837gi1n3v5.fsf@gnu.org> <87k3m1vg8b.fsf@tines.lan> <83txl4lhby.fsf@gnu.org> <8361xjky0f.fsf@gnu.org> <87r4g1ygvj.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1371414201 11952 80.91.229.3 (16 Jun 2013 20:23:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Jun 2013 20:23:21 +0000 (UTC) Cc: guile-user@gnu.org To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Jun 16 22:23:22 2013 Return-path: Envelope-to: guile-user@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 1UoJTt-00066D-28 for guile-user@m.gmane.org; Sun, 16 Jun 2013 22:23:21 +0200 Original-Received: from localhost ([::1]:58332 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UoJTs-0001Hs-I6 for guile-user@m.gmane.org; Sun, 16 Jun 2013 16:23:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38811) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UoJTh-0001Gw-Sp for guile-user@gnu.org; Sun, 16 Jun 2013 16:23:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UoJTe-0003tM-LQ for guile-user@gnu.org; Sun, 16 Jun 2013 16:23:09 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:35830) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UoJTe-0003sW-Cg; Sun, 16 Jun 2013 16:23:06 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MOI00K005XIZ800@a-mtaout20.012.net.il>; Sun, 16 Jun 2013 23:23:01 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MOI00KLM5Y9LLB0@a-mtaout20.012.net.il>; Sun, 16 Jun 2013 23:22:57 +0300 (IDT) In-reply-to: <87r4g1ygvj.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:10456 Archived-At: > From: ludo@gnu.org (Ludovic Court=C3=A8s) > Cc: mhw@netris.org, guile-user@gnu.org > Date: Sun, 16 Jun 2013 21:50:40 +0200 >=20 > > Please find the changes to do this below. I removed most of the > > HAVE_POSIX ifdef's, as they are no longer needed. >=20 > Sorry I had overlooked this one. It looks nice! Thanks. > We would need the copyright to be assigned to the FSF before it can= be > committed. How does that sound? If you=E2=80=99re willing to do s= o, I can send > you the paperwork off-line. Please do. > > --- libguile/filesys.c~0=092013-04-09 09:52:31.000000000 +0300 > > +++ libguile/filesys.c=092013-06-12 13:41:31.244477700 +0300 > > @@ -112,7 +112,12 @@ > > =20 > > /* 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 >=20 > What does that mean? :-) It prevents the compiler from fetching too much from the windows.h header, thus minimizing the possibility of conflicts with other headers and macros. > > +# include > > +/* FIXME: Should use 'link' module from gnulib. */ > > +# define link(f1,f2) CreateHardLink(f2, f1, NULL) > > +# define HAVE_LINK 1 >=20 > Let=E2=80=99s do it then, and remove that part of the patch. Right. > > -#ifdef HAVE_POSIX > > - >=20 > Note that HAVE_POSIX really means --enable-posix. Since this patch > keeps that option, it should probably keep the #ifdefs. That would= be a > topic for a separate patch. What is the purpose of --enable-posix? I thought it could be removed= , once you accepted the changes to the sources. > > +#ifdef HAVE_FORK > > pid =3D fork (); > > +#elif defined(__MINGW32__) > > + { > > + int save_stdin =3D -1, save_stdout =3D -1; > > + int errno_save; > > + > > + if (reading) >=20 > [...] >=20 > Could this MinGW-specific code be moved to a separate function? Yes. But there are still non-FORK parts of the patch elsewhere in this function that are needed. > I think the patch also needs something like this: >=20 > --- a/configure.ac > +++ b/configure.ac > @@ -760,7 +760,7 @@ AC_CHECK_FUNCS([DINFINITY DQNAN cexp chsize clo= g clog10 ctermid=09=09\ > sched_setaffinity sendfile]) > =20 > AM_CONDITIONAL([BUILD_ICE_9_POPEN], > - [test "x$enable_posix" =3D "xyes" && test "x$ac_cv_func_fork" = =3D "xyes"]) > + [test "x$enable_posix" =3D "xyes"]) Right you are.