From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.lisp.guile.devel Subject: Re: MinGW vs. c-api.test Date: Fri, 13 Jun 2014 21:09:07 +0300 Message-ID: <83bntwwukc.fsf@gnu.org> References: <83fvjc22pc.fsf@gnu.org> <87bntzoc4e.fsf@gnu.org> <83ha3rzdoj.fsf@gnu.org> <87d2eelee3.fsf@gnu.org> <83r42uxd3v.fsf@gnu.org> <87vbs5gb8f.fsf@gnu.org> <838up1yk3x.fsf@gnu.org> <87mwdheser.fsf@gnu.org> <87ppiciymu.fsf@gnu.org> <20140613163113.GA22619@fencepost.gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1402682986 31820 80.91.229.3 (13 Jun 2014 18:09:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Jun 2014 18:09:46 +0000 (UTC) Cc: ludo@gnu.org, guile-devel@gnu.org To: Mike Gerwitz Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Jun 13 20:09:37 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 1WvVuz-00052T-BI for guile-devel@m.gmane.org; Fri, 13 Jun 2014 20:09:37 +0200 Original-Received: from localhost ([::1]:60421 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvVuy-0003oV-T9 for guile-devel@m.gmane.org; Fri, 13 Jun 2014 14:09:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47908) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvVuq-0003oN-CO for guile-devel@gnu.org; Fri, 13 Jun 2014 14:09:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WvVul-0003pO-8D for guile-devel@gnu.org; Fri, 13 Jun 2014 14:09:28 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:48915) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvVul-0003p4-10; Fri, 13 Jun 2014 14:09:23 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0N7400900CKDC200@a-mtaout20.012.net.il>; Fri, 13 Jun 2014 21:09:18 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N74009XUD3H7850@a-mtaout20.012.net.il>; Fri, 13 Jun 2014 21:09:18 +0300 (IDT) In-reply-to: <20140613163113.GA22619@fencepost.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-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:17225 Archived-At: > Date: Fri, 13 Jun 2014 12:31:14 -0400 > From: Mike Gerwitz > Cc: Neil Jerram , Eli Zaretskii , > guile-devel@gnu.org > > My coworkers use MinGW, and it does expose [A-Z]:\ as /[a-z]/; all paths in > MinGW are expected to be Unix-style. They are most probably using the MSYS Bash as the shell. They must, because there's no decent port of Bash (or any Posix shell) as a native Windows program. MSYS tools exist to allow configuring and building MinGW programs using Posix configury and Makefiles. But MSYS is not MinGW; rather, it is a companion to MinGW. Some people also use the MSYS Bash as their interactive shell, but that doesn't make that shell a MinGW program. > I used the `uname` binary to determine if MinGW was being used with shell > scripts; it returns "MINGW32_NT-6.1". What the uname binary returns is determined at compile time (with the exception of the OS version, which is the 6.1 part in what you show). I have here 2 MSYS uname binaries (one that I use to build MinGW programs, the other came with msysgit), and one MinGW uname binary. Here's what they report _on_the_same_system_: MINGW32_NT-5.1 HOME-C4E4A596F7 1.0.17(0.48/3/2) 2011-04-24 23:39 i686 Msys MINGW32_NT-5.1 HOME-C4E4A596F7 1.0.12(0.46/3/2) 2012-07-05 14:56 i686 unknown windows32 home-c4e4a596f7 2.5.1 2600 i686-pc Intel unknown MinGW The first 2 are from MSYS uname binaries, the last one is from a native MinGW binary. > That said, I'm expecting that Guile's (uname) will return something wholly > different depending on what was used to compile it! The MinGW compiled Guile shows this: scheme@(guile-user)> (uname) $1 = #("Windows XP" "HOME-C4E4A596F7" "build 2600" "5.01 Service Pack 3" "i686") Which is what I expect. I'm not aware of an MSYS build of Guile, so I don't know what it will return. And I don't have Cygwin here to try that. Moreover, I don't quite see what the uname report has to do with the issue at hand, which is how to use the null device portably. > Another method I used was also checking the MSYSTEM environment > variable, which is set to "MINGW32" on those systems. MSYSTEM is the environment variable set by MSYS's /etc/profile file. Its existence and value do not mean that you are in a MinGW shell. As I wrote above, there's no MinGW port of Bash that is bug-free enough for it to be able to run a garden-variety configure script. So anyone who runs Bash on Windows is either running an MSYS Bash or a Cygwin Bash. > All that said, on msys: > > $ echo foo > C:\foo > $ cat /c/foo > foo > $ echo foo > C:\nul > $ cat /c/nul > # no output Yes, that's MSYS for you.