Cygwin

From Wikipedia, the free encyclopedia

Jump to: navigation, search
Cygwin
Image:Cygwin X11 rootless WinXP.png
Running Cygwin under Windows XP
Developer Red Hat and others
Latest release 1.5.25-7 / 17 December 2007
OS Microsoft Windows
Genre Emulator
License GNU General Public License
Website http://www.cygwin.com/

Cygwin (pronounced /ˈsɪgwɪn/)[1] is a collection of free software tools originally developed by Cygnus Solutions to allow various versions of Microsoft Windows to act similar to a Unix system. Programs ported with Cygwin work better on Windows NT, but some may run acceptably on Windows 9x. While Cygwin provides header files and libraries that make it easier to recompile or port Unix applications for use on Windows, it does not directly make Unix binaries compatible with Windows (or vice versa).

Cygwin is currently maintained by employees of Red Hat, NetApp and others. Released under the GNU General Public License, Cygwin is free software.

Contents

[edit] Description

Cygwin consists of a library that implements the POSIX system call API in terms of Win32 system calls, a GNU development toolchain (such as GCC and GDB) to allow basic software development tasks, and a large number of application programs equivalent to common programs on the Unix system. At this point, many open-source programs on Unix have been ported to Cygwin, including the X Window System, KDE, GNOME, Apache, TeX, and various others. A mechanism has been created for installing inetd, syslogd, sshd, Apache and other daemons as standard Windows services, allowing a Microsoft Windows system to function much like a Unix or Linux server. All of these programs are installed through the standard Cygwin setup program, which downloads the necessary packages from the Internet. The setup program can be rerun as necessary to update programs to their latest versions or add or remove programs. (Various other features are provided by setup, such as the ability to install the source code along with the binaries.)

A large amount of effort has gone into providing interfaces to map between concepts that differ between Unix and Windows. Examples include:

  • A Cygwin-specific version of Unix mount has been created, which allows arbitrary Windows paths to be mounted as "filesystems" into the Unix file space. Mount information is normally stored in the registry. Filesystems can be mounted as binary (the default) or as text, which performs automatic conversion between LF and CRLF endings. (This only affects programs that call open() or fopen() without specifying text or binary mode. All of the ported Unix programs available through Cygwin setup open files in binary mode if appropriate, and hence data corruption will not occur.) All DOS drives (C:, D:, etc.) are also available under /cygdrive/c, /cygdrive/d, etc. Windows network paths of the form \\HOST\SHARE\FILE are mapped to //HOST/SHARE/FILE.
  • Full-featured /dev and /proc file systems are provided automatically. /proc/registry provides direct filesystem access to the registry.
  • Symbolic links are provided, and use .LNK files (Windows shortcuts), with some special Cygwin-specific info in them and the "system" attribute set to speed up processing.
  • Special formats of /etc/passwd and /etc/group are provided that include pointers to the Windows equivalent SID's (in the GECOS field), allowing for mapping between Unix and Windows users and groups.
  • Various utilities are provided for converting between Windows and Unix file formats, for handling line ending (CRLF/LF) issues, for displaying the DLLs that an executable is linked with, etc.
  • The Cygwin library also interfaces to existing Windows libraries. It is possible to call Windows functions like waveOut from Cygwin executable itself.

The version of gcc that comes with Cygwin has various extensions for creating Windows DLLs, specifying whether a program is a windowing or console mode program, adding resources, etc. It also provides support for compiling MinGW-compatible executables (that is, executables that do not require Cygwin to be installed to run, or more specifically, executables that don't require Cygwin's CYGWIN1.DLL, which provides the POSIX compatibility layer).

Cygwin is used heavily for porting many popular pieces of software to the Windows platform. It is used to compile Mozilla Firefox, Sun Java and OpenOffice.org.

Red Hat normally licenses the Cygwin library under the GNU General Public License with an exception to allow linking to any free software whose license conforms to the Open Source Definition. (Red Hat also sells commercial licenses to those who wish to redistribute programs that use the Cygwin library under proprietary terms.)

[edit] History

Cygwin began in 1995 as a project of Steve Chamberlain, a Cygnus engineer who observed that Windows NT and 95 used COFF as their object file format, and that GNU already included support for x86 and COFF, and the C library newlib; so at least in theory it should not be difficult to retarget GCC and get a cross compiler producing executables that would run on Windows. This proved to be so in practice, and a prototype came up quickly.

The next step was to attempt to bootstrap the compiler on a Windows system, but this required enough emulation of Unix to let the GNU configure shell script run, which requires a shell like bash, which in turn requires fork and standard I/O. Windows includes similar functionality, so the Cygwin library proper just needs to translate calls and manage private versions of data, such as file descriptors.

Initially Cygwin was called gnuwin32. The name was changed to Cygwin32 to emphasize Cygnus' role in creating it. When Microsoft registered the trademark Win32, the 32 was dropped to simply become Cygwin.

By 1996, other engineers had joined in, because it was clear that Cygwin would be a useful way to provide Cygnus' embedded tools hosted on Windows systems (the previous strategy had been to use DJGPP). It was especially attractive because it was possible to do a three-way cross-compile, for instance to use a hefty Sun workstation to build, say, a Windows-x-MIPS cross-compiler, which was faster than using the PC of the time. Starting around 1998, Cygnus also began offering the Cygwin package as a product of interest in its own right.

Christopher Faylor is currently the manager of the Cygwin development team.

[edit] See also

[edit] References

  1. ^ Larry Hall (2004-09-14). Re: How do you pronounce it?. Retrieved on 2007-10-10.

[edit] External links

Wikibooks has more on the topic of
Cygwin

cs:Cygwin da:Cygwin de:Cygwin es:Cygwin eo:Cigvino fa:سیگوین fr:Cygwin ko:시그윈 it:Cygwin he:Cygwin lv:Cygwin nl:Cygwin ja:Cygwin no:Cygwin pl:Cygwin pt:Cygwin ru:Cygwin sk:Cygwin fi:Cygwin sv:Cygwin ta:சிக்வின் th:Cygwin vi:Cygwin tr:Cygwin uk:Cygwin zh:Cygwin

Views
Personal tools

Toolbox