www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2001/12/01/21:08:07

Mailing-List: contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-apps-owner AT sourceware DOT cygnus DOT com
List-Subscribe: <mailto:cygwin-apps-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-apps-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/lists.html#faqs>
Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com
Message-ID: <00b701c17ad5$fca2e080$0200a8c0@lifelesswks>
From: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
To: <pgarceau AT qwest DOT net>, <cygwin-apps AT cygwin DOT com>
References: <3C0676E9 DOT 1014 DOT FA00E5 AT localhost>; from pgarceau AT qwest DOT net on Thu, Nov 29, 2001 at 05:56:57PM -0800 <3C090B01 DOT 30997 DOT 983047 AT localhost>
Subject: Re: Semi-OT: (Was Re: attn: which, bzip2,gzip maintainers (was Re: some problems with setup.ini))
Date: Sun, 2 Dec 2001 13:06:41 +1100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-OriginalArrivalTime: 02 Dec 2001 02:08:01.0136 (UTC) FILETIME=[2B505700:01C17AD6]

----- Original Message -----
From: "Paul G." <pgarceau AT qwest DOT net>
> > I didn't know that Cygwin runs under several flavors of Unix.
AFAIK,
> > it's calling Win32 API functions but I could be wrong...
>
> hmm...is that a challenge?  Not sure how else to take it --
>
> You're right, of course, dear Corinna, it is calling Win32api
functions, but afaik, that is not
> all it does.  In fact I've forced it into doing more than that.  Most
folks that I told about it asked,
> "What's the point?".  The answer I typically give:  "It is fun, it is
educational and, who knows,
> maybe someone, somewhere wants to build Cygwin generated apps under a
*nix or Linux
> platform..."

I think we've got a terminology problem.

"cygwin1.dll" aka Cygwin - a runtime POSIX compatability layer. ONLY
executes on win32 platforms - Win 95/98/ME/NT4/2K/XP. When configuring a
gcc+binutils toolchain use pc-ix86-cygwin to target this 'platform'.
(It's really just a different C library for win32, so 'platform is a
little strong :}).
"Cygwin" aka the cygwin Net distribution. A collection of open and free
software provided in binary form along with cygwin1.dll

So Cygwin means two things :}.

...
> Of course, I've only been working with Cygwin since about r17, so I
could be completely
> wrong about this.
> If you are wanting to cross-compile to other targets you can, can't
you?  Or is there some
> rule (legal or otherwise) that states Cygwin can not run on anything
but Win32api based
> platforms?

Cygwin the dll only works on w32api programs - because it's translating
posix calls to win32 calls. It can be ported of course, and win64 and
wince are both platforms that could benefit from a port of cygwin to
them. Un*x machines won't benefit because they already have the posix
calls natively. So the restriction to where cygwin the dll runs is
purely technical - and can be lifted somewhat. I'd really love to see
cygwin1.dll running under WINE for example. I think that'd be a neat
hack.

> Please, do correct me if I am wrong.  Cygwin (not necessarily "just
the API") is built with
> some variation of gcc/g++ right?  Ie. the source code, for the most
part, is written using C, C++ or
> C/C++ language syntax, right?  (Setup.exe is, syntactically speaking,
C/C++)

cygwin1.dll and the associated utilites are C/C++/x86assembler.

...
> Bottom line: It don't matter what Cygwin is targetted for as default
build environment.
....................................GCC.................................
.................
> gcc/g++ compiled/linked source code, in standalone mode (w/no gui
dependencies), will run on
> Win32api based platforms, Linux based platforms (with some lib
modifications), *nix platforms (lib > modifications) and Cray
Supercomputers (Terraflops anyone?).
> All a developer needs to do, in the absence of any GUI dependencies,
is build using
> gcc/g++ and be able to output the appropriate, platform specific,
libraries & support.  From that
> standpoint, gcc/g++ is about the closest thing to a multi-platform
(universal?) C/C++ compiler I
> have ever found.

Absolutely (with the one correction I've made in your paragraph :}).
cygwin1.dll is newlib+lowlevelposixsupport. So on linux you have glibc +
linux kernel + gcc toolchain, on bsd you have bsd kernel, plus the BSD C
library + gcc toolchain, and on win32 you have
either
MSCVRT - MS C library + gcc toolchain
or
cygwin1.dll + gcc toolchain.

And of those two, one gives you POSIX, and one doesn't :}. And as a
second comment on your last paragraph, there are many non-GUI
dependencies - pthreads for example - that are also present to some
extent on all of the platforms listed, which aids portability.

Rob

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019