Subject: Re: [clisp-list] Cygwin feature

From: "Hoehle, Joerg-Cyril" <[email-masked]>
Date: Thu Apr 25 08:00:20 2002

Marco Antoniotti wrote:
> Having both :mswindows and :unix is wrong *and* it *will* break some

Nobody said that these two should be set(?). Of course it's wrong.

> Cygwin is a layer on top of MS Windows.  This is what it is.  The host
> operating system is MS Windows.

I beg to differ! An application compiled via cygwin has next to no means to detect that it is not running as a UNIX. Therefore the correct *feature is :UNIX, as it has been in the past.

Such an application uses /foo/bar UNIX pathnames, the UNIX API for all sorts of things, probably dl_open() etc. It probably has problems interacting with MS-Windows native applications (e.g. try to call notepad.exe on the pathname /foo/bar.txt)

CLISP compiled with cygwin probably has all the #+UNIX things in, e.g. POSIX extensions. It can possibly even load linux.lisp. It can support /bin/sh exec pgm or (shell "foo &") interfaces etc. pp. It's a UNIX for as far as the emulation goes.

It is a #+UNIX as far as any Lisp programmer expecting UNIX behaviour and extensions goes.

There are probably caveats when attempting to use kernel32.dll directly or other MS-Windows .dll from within a cygwin framework.

Not to be too picky, could you please refrain from replying three lines
while quoting >50?

	Jorg Hohle.
FWIW, ixemul.library is the cygwin equivalent for AmigaOS. Had we used that, the Amiga port of CLISP would identify as #+UNIX as well. No #+AMIGA would exist. ksh, configure, ptrace(), mkfifo(), vfork() exec*(). They are all there. But it doesn't interact with native Amiga applications and libraries well, for the same reasons as above.

---

From: Marco Antoniotti <[email-masked]>
Date: Thu Apr 25 12:33:36 2002

> From: "Hoehle, Joerg-Cyril" <[email-masked]>
> Content-Type: text/plain
> Sender: [email-masked]
> Date: Thu, 25 Apr 2002 16:59:27 +0200
> 
> Marco Antoniotti wrote:
> I beg to differ! An application compiled via cygwin has next to no
> means to detect that it is not running as a UNIX. Therefore the
> correct *feature is :UNIX, as it has been in the past.

No it is not.  Cygwin is essentially a library on top of an Operating
System: MS Windows.  You may object that this is an ontological
argument, but that it is the way things are.

Had I started to use a cygwin version of CLisp before, I would have
complained before.

> Such an application uses /foo/bar UNIX pathnames, the UNIX API for
> all sorts of things, probably dl_open() etc. It probably has
> problems interacting with MS-Windows native applications (e.g. try
> to call notepad.exe on the pathname /foo/bar.txt)

On both LW (and, I believe ACL) under Windows you can use Unix style
pathnames, the same goes for Emacs.  However, neither LW nor ACL have
UNIX in their features list.

> CLISP compiled with cygwin probably has all the #+UNIX things in,
> e.g. POSIX extensions. It can possibly even load linux.lisp. It can
> support /bin/sh exec pgm or (shell "foo &") interfaces etc. pp. It's
> a UNIX for as far as the emulation goes.

Yes, but it runs under MS Windows.

> behaviour and extensions goes.

I do not expect UNIX behavior when running under Windows.  I expect to
be able to write

   #+unix (do-something)
   #+mswindows (do-something-else)

Soppose there is code out there (as there surely is) that assumes that
the effect of DO-SOMETHING and DO-SOMETHING-ELSE are totally
different, mutually exclusive and truly OS dependent.  How do you
propose to make a program work under the conditions of not being able
to discriminate what OS you arte truly working on?

> There are probably caveats when attempting to use kernel32.dll
> directly or other MS-Windows .dll from within a cygwin framework.

That is another problem altogether.

> Not to be too picky, could you please refrain from replying three lines

Sorry :}

> 	Jorg Hohle.
> FWIW, ixemul.library is the cygwin equivalent for AmigaOS. Had we
> used that, the Amiga port of CLISP would identify as #+UNIX as
> well. No #+AMIGA would exist. ksh, configure, ptrace(), mkfifo(),
> vfork() exec*(). They are all there. But it doesn't interact with
> native Amiga applications and libraries well, for the same reasons
> as above.

I maintain that that is wrong as well.  Assuming that "UNIX" means
something beyond the string of four characters, the implementation is
essentially lying to the programmer.

Cheers

-- 
Marco Antoniotti ========================================================
NYU Courant Bioinformatics Group        tel. +1 - 212 - 998 3488
719 Broadway 12th Floor                 fax  +1 - 212 - 995 4122
New York, NY 10003, USA                 http://bioinformatics.cat.nyu.edu
                    "Hello New York! We'll do what we can!"
                           Bill Murray in `Ghostbusters'.