mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-19 21:09:22 +08:00
Modernized user guide, API reference, and FAQ generation. Overall
effect is to move away from DocBook SGML and DJ Delorie's doctool and toward pure DocBook XSL. (There remains just one use of doctool, and we have plans for replacing it, too.) See ChangeLog for details.
This commit is contained in:
parent
0cfce9acc9
commit
8142972d87
@ -1,3 +1,41 @@
|
||||
2013-05-01 Warren Young <warren@etr-usa.com>
|
||||
|
||||
* cygwin-ug.xml: Renamed from cygwin-ug.in.sgml
|
||||
(bookinfo) Extracted <bookinfo> section into new ug-info.xml file
|
||||
* ug-info.xml: Created
|
||||
* cygwin-ug-net.xml: Renamed from cygwin-ug-net.in.sgml
|
||||
(bookinfo) Replaced content with XInclude referencing ug-info.xml
|
||||
* configure.ac: Replaced a *.sgml file reference with *.xml
|
||||
* cygserver.xml cygwinenv.xml dll.xml effectively.xml filemodes.xml
|
||||
gcc.xml gdb.xml legal.xml new-features.xml ntsec.xml overview.xml
|
||||
pathnames.xml programming.xml setup.xml setup-net.xml textbinary.xml
|
||||
using.xml windres.xml: Renamed from *.sgml.
|
||||
Added <?xml> and <!DOCTYPE> tags to the top.
|
||||
* cygserver.sgml cygwinenv.sgml dll.sgml effectively.sgml filemodes.sgml
|
||||
gcc.sgml gdb.sgml legal.sgml new-features.sgml ntsec.sgml overview.sgml
|
||||
pathnames.sgml programming.sgml setup.sgml setup-net.sgml textbinary.sgml
|
||||
using.sgml windres.sgml: Renamed to *.xml
|
||||
* faq.xml: Renamed from faq-sections.sgml. (Not faq.sgml!)
|
||||
Replaced FAQ section ENTITY declarations with XIncludes.
|
||||
Removed all other ENTITY declarations as they just name entities
|
||||
already defined in the current DocBook stylesheets.
|
||||
* faq.sgml: Removed without translating to DocBook XML. Obsolete.
|
||||
* faq-*.xml: Added <?xml> and <!DOCTYPE> tags to the top.
|
||||
Moved <qandadiv> tags from faq.xml and faq-sections.xml into
|
||||
individual section files so they individually pass XML validation.
|
||||
* pathnames.xml: Contained two top-level <sect1> elements, which is
|
||||
malformed XML. Moved second to new specialnames.xml file.
|
||||
* specialnames.xml: Created; extracted from pathnames.sgml
|
||||
* overview2.xml: Broke it up into following three files, and
|
||||
removed the original.
|
||||
* ov-ex-win.xml (ov-ex-win): Created; contents extracted from
|
||||
overview2.sgml
|
||||
* ov-ex-unix.xml (ov-ex-unix): Ditto
|
||||
* highlights.xml (highlights): Ditto
|
||||
* setup2.xml: Broke it up into setup-*.xml.
|
||||
* setup-env.xml setup-files.xml setup-locale.xml setup-maxmem.xml:
|
||||
Created; contents extracted from setup2.sgml
|
||||
|
||||
2013-04-24 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* faq-programming.xml (faq.programming.64bitporting): Fix typo.
|
||||
|
@ -12,7 +12,7 @@ SHELL = @SHELL@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
SGMLDIRS = -d $(srcdir) -d $(srcdir)/../utils -d $(srcdir)/../cygwin
|
||||
DBXDIRS = -d $(srcdir) -d $(srcdir)/../utils -d $(srcdir)/../cygwin
|
||||
|
||||
CC:=@CC@
|
||||
CC_FOR_TARGET:=@CC@
|
||||
@ -22,70 +22,59 @@ XMLTO:=xmlto --skip-validation --with-dblatex
|
||||
|
||||
include $(srcdir)/../Makefile.common
|
||||
|
||||
TOCLEAN:=faq.txt ./*.html readme.txt doctool.o doctool.exe *.junk \
|
||||
cygwin-ug.sgml cygwin-ug cygwin-ug-net.html.gz \
|
||||
cygwin-ug-net.sgml cygwin-ug-net cygwin-ug-net.html \
|
||||
cygwin-api.sgml cygwin-api cygwin-api-int.sgml cygwin-api-int \
|
||||
faq
|
||||
|
||||
FAQ_SOURCES:= faq-api.xml faq-programming.xml faq-resources.xml \
|
||||
faq-sections.xml faq-setup.xml faq-using.xml faq-what.xml faq.xml
|
||||
FAQ_SOURCES:= faq*.xml
|
||||
|
||||
.SUFFIXES:
|
||||
|
||||
all : \
|
||||
all: Makefile \
|
||||
cygwin-ug-net/cygwin-ug-net.html \
|
||||
cygwin-ug-net/cygwin-ug-net-nochunks.html.gz \
|
||||
cygwin-api/cygwin-api.html \
|
||||
faq/faq.html faq/faq-nochunks.html \
|
||||
faq/faq.html \
|
||||
cygwin-ug-net/cygwin-ug-net.pdf \
|
||||
cygwin-api/cygwin-api.pdf
|
||||
|
||||
clean:
|
||||
rm -Rf $(TOCLEAN)
|
||||
rm -f doctool.exe doctool.o
|
||||
rm -f cygwin-api.xml
|
||||
rm -f *.html *.html.gz
|
||||
rm -Rf cygwin-api cygwin-ug cygwin-ug-net faq
|
||||
|
||||
install: all
|
||||
|
||||
cygwin-ug-net/cygwin-ug-net-nochunks.html.gz : cygwin-ug-net.sgml doctool
|
||||
-${XMLTO} html-nochunks -m $(srcdir)/cygwin.dsl $<
|
||||
cygwin-ug-net/cygwin-ug-net-nochunks.html.gz : cygwin-ug-net.xml
|
||||
-${XMLTO} html-nochunks -m $(srcdir)/cygwin.xsl $<
|
||||
-cp cygwin-ug-net.html cygwin-ug-net/cygwin-ug-net-nochunks.html
|
||||
-rm -f cygwin-ug-net/cygwin-ug-net-nochunks.html.gz
|
||||
-gzip cygwin-ug-net/cygwin-ug-net-nochunks.html
|
||||
|
||||
cygwin-ug-net/cygwin-ug-net.html : cygwin-ug-net.sgml doctool
|
||||
-${XMLTO} html -o cygwin-ug-net/ -m $(srcdir)/cygwin.dsl $<
|
||||
cygwin-ug-net/cygwin-ug-net.html : cygwin-ug-net.xml
|
||||
-${XMLTO} html -o cygwin-ug-net/ -m $(srcdir)/cygwin.xsl $<
|
||||
|
||||
# Some versions of jw hang with the -o option
|
||||
cygwin-ug-net/cygwin-ug-net.pdf : cygwin-ug-net.sgml
|
||||
cygwin-ug-net/cygwin-ug-net.pdf : cygwin-ug-net.xml
|
||||
-${XMLTO} pdf -o cygwin-ug-net/ $<
|
||||
|
||||
cygwin-ug-net.sgml : cygwin-ug-net.in.sgml ./doctool Makefile
|
||||
-./doctool -m $(SGMLDIRS) -s $(srcdir) -o $@ $<
|
||||
cygwin-api/cygwin-api.html : cygwin-api.xml
|
||||
-${XMLTO} html -o cygwin-api/ -m $(srcdir)/cygwin.xsl $<
|
||||
|
||||
cygwin-api/cygwin-api.html : cygwin-api.sgml
|
||||
-${XMLTO} html -o cygwin-api/ -m $(srcdir)/cygwin.dsl $<
|
||||
|
||||
cygwin-api/cygwin-api.pdf : cygwin-api.sgml
|
||||
cygwin-api/cygwin-api.pdf : cygwin-api.xml
|
||||
-${XMLTO} pdf -o cygwin-api/ $<
|
||||
|
||||
cygwin-api.sgml : cygwin-api.in.sgml ./doctool Makefile
|
||||
-./doctool -m $(SGMLDIRS) -s $(srcdir) -o $@ $<
|
||||
cygwin-api.xml : cygwin-api.in.xml ./doctool Makefile
|
||||
-./doctool -m $(DBXDIRS) -s $(srcdir) -o $@ $<
|
||||
|
||||
faq/faq.html : $(FAQ_SOURCES)
|
||||
-${XMLTO} html -o faq -m $(srcdir)/cygwin.dsl $(srcdir)/faq-sections.xml
|
||||
-sed -i 's;</a><a name="id[0-9]*"></a>;</a>;g' faq/faq.*.html
|
||||
|
||||
faq/faq-nochunks.html : $(FAQ_SOURCES)
|
||||
-${XMLTO} html -o faq -m $(srcdir)/cygwin.dsl $(srcdir)/faq.xml
|
||||
-sed -i 's;</a><a name="id[0-9]*"></a>;</a>;g' faq/faq-nochunks.html
|
||||
-${XMLTO} html -o faq -m $(srcdir)/cygwin.xsl $(srcdir)/faq.xml
|
||||
-sed -i 's;</a><a name="id[0-9]*"></a>;</a>;g' faq/faq.html
|
||||
|
||||
./doctool : doctool.c
|
||||
gcc -g $< -o $@
|
||||
|
||||
TBFILES = cygwin-ug-net.dvi cygwin-ug-net.rtf cygwin-ug-net.ps \
|
||||
cygwin-ug-net.pdf cygwin-ug-net.sgml \
|
||||
cygwin-ug-net.pdf cygwin-ug-net.xml \
|
||||
cygwin-api.dvi cygwin-api.rtf cygwin-api.ps \
|
||||
cygwin-api.pdf cygwin-api.sgml
|
||||
cygwin-api.pdf cygwin-api.xml
|
||||
TBDIRS = cygwin-ug-net cygwin-api
|
||||
TBDEPS = cygwin-ug-net/cygwin-ug-net.html cygwin-api/cygwin-api.html
|
||||
|
||||
|
189
winsup/doc/configure
vendored
189
winsup/doc/configure
vendored
@ -1,11 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.68.
|
||||
# Generated by GNU Autoconf 2.69.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
||||
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
#
|
||||
#
|
||||
# This configure script is free software; the Free Software Foundation
|
||||
@ -134,6 +132,31 @@ export LANGUAGE
|
||||
# CDPATH.
|
||||
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
|
||||
|
||||
# Use a proper internal environment variable to ensure we don't fall
|
||||
# into an infinite loop, continuously re-executing ourselves.
|
||||
if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
|
||||
_as_can_reexec=no; export _as_can_reexec;
|
||||
# We cannot yet assume a decent shell, so we have to provide a
|
||||
# neutralization value for shells without unset; and this also
|
||||
# works around shells that cannot unset nonexistent variables.
|
||||
# Preserve -v and -x to the replacement shell.
|
||||
BASH_ENV=/dev/null
|
||||
ENV=/dev/null
|
||||
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
|
||||
case $- in # ((((
|
||||
*v*x* | *x*v* ) as_opts=-vx ;;
|
||||
*v* ) as_opts=-v ;;
|
||||
*x* ) as_opts=-x ;;
|
||||
* ) as_opts= ;;
|
||||
esac
|
||||
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
|
||||
# Admittedly, this is quite paranoid, since all the known shells bail
|
||||
# out after a failed `exec'.
|
||||
$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
|
||||
as_fn_exit 255
|
||||
fi
|
||||
# We don't want this to propagate to other subprocesses.
|
||||
{ _as_can_reexec=; unset _as_can_reexec;}
|
||||
if test "x$CONFIG_SHELL" = x; then
|
||||
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
|
||||
emulate sh
|
||||
@ -167,7 +190,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
|
||||
else
|
||||
exitcode=1; echo positional parameters were not saved.
|
||||
fi
|
||||
test x\$exitcode = x0 || exit 1"
|
||||
test x\$exitcode = x0 || exit 1
|
||||
test -x / || exit 1"
|
||||
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
|
||||
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
|
||||
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
|
||||
@ -211,21 +235,25 @@ IFS=$as_save_IFS
|
||||
|
||||
|
||||
if test "x$CONFIG_SHELL" != x; then :
|
||||
# We cannot yet assume a decent shell, so we have to provide a
|
||||
# neutralization value for shells without unset; and this also
|
||||
# works around shells that cannot unset nonexistent variables.
|
||||
# Preserve -v and -x to the replacement shell.
|
||||
BASH_ENV=/dev/null
|
||||
ENV=/dev/null
|
||||
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
|
||||
export CONFIG_SHELL
|
||||
case $- in # ((((
|
||||
*v*x* | *x*v* ) as_opts=-vx ;;
|
||||
*v* ) as_opts=-v ;;
|
||||
*x* ) as_opts=-x ;;
|
||||
* ) as_opts= ;;
|
||||
esac
|
||||
exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
|
||||
export CONFIG_SHELL
|
||||
# We cannot yet assume a decent shell, so we have to provide a
|
||||
# neutralization value for shells without unset; and this also
|
||||
# works around shells that cannot unset nonexistent variables.
|
||||
# Preserve -v and -x to the replacement shell.
|
||||
BASH_ENV=/dev/null
|
||||
ENV=/dev/null
|
||||
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
|
||||
case $- in # ((((
|
||||
*v*x* | *x*v* ) as_opts=-vx ;;
|
||||
*v* ) as_opts=-v ;;
|
||||
*x* ) as_opts=-x ;;
|
||||
* ) as_opts= ;;
|
||||
esac
|
||||
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
|
||||
# Admittedly, this is quite paranoid, since all the known shells bail
|
||||
# out after a failed `exec'.
|
||||
$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
|
||||
exit 255
|
||||
fi
|
||||
|
||||
if test x$as_have_required = xno; then :
|
||||
@ -327,6 +355,14 @@ $as_echo X"$as_dir" |
|
||||
|
||||
|
||||
} # as_fn_mkdir_p
|
||||
|
||||
# as_fn_executable_p FILE
|
||||
# -----------------------
|
||||
# Test if FILE is an executable regular file.
|
||||
as_fn_executable_p ()
|
||||
{
|
||||
test -f "$1" && test -x "$1"
|
||||
} # as_fn_executable_p
|
||||
# as_fn_append VAR VALUE
|
||||
# ----------------------
|
||||
# Append the text in VALUE to the end of the definition contained in VAR. Take
|
||||
@ -448,6 +484,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
|
||||
chmod +x "$as_me.lineno" ||
|
||||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
|
||||
|
||||
# If we had to re-execute with $CONFIG_SHELL, we're ensured to have
|
||||
# already done that, so ensure we don't try to do so again and fall
|
||||
# in an infinite loop. This has already happened in practice.
|
||||
_as_can_reexec=no; export _as_can_reexec
|
||||
# Don't try to exec as it changes $[0], causing all sort of problems
|
||||
# (the dirname of $[0] is not the place where we might find the
|
||||
# original and so on. Autoconf is especially sensitive to this).
|
||||
@ -482,16 +522,16 @@ if (echo >conf$$.file) 2>/dev/null; then
|
||||
# ... but there are two gotchas:
|
||||
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
|
||||
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
|
||||
# In both cases, we have to default to `cp -p'.
|
||||
# In both cases, we have to default to `cp -pR'.
|
||||
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
|
||||
as_ln_s='cp -p'
|
||||
as_ln_s='cp -pR'
|
||||
elif ln conf$$.file conf$$ 2>/dev/null; then
|
||||
as_ln_s=ln
|
||||
else
|
||||
as_ln_s='cp -p'
|
||||
as_ln_s='cp -pR'
|
||||
fi
|
||||
else
|
||||
as_ln_s='cp -p'
|
||||
as_ln_s='cp -pR'
|
||||
fi
|
||||
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
|
||||
rmdir conf$$.dir 2>/dev/null
|
||||
@ -503,28 +543,8 @@ else
|
||||
as_mkdir_p=false
|
||||
fi
|
||||
|
||||
if test -x / >/dev/null 2>&1; then
|
||||
as_test_x='test -x'
|
||||
else
|
||||
if ls -dL / >/dev/null 2>&1; then
|
||||
as_ls_L_option=L
|
||||
else
|
||||
as_ls_L_option=
|
||||
fi
|
||||
as_test_x='
|
||||
eval sh -c '\''
|
||||
if test -d "$1"; then
|
||||
test -d "$1/.";
|
||||
else
|
||||
case $1 in #(
|
||||
-*)set "./$1";;
|
||||
esac;
|
||||
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
|
||||
???[sx]*):;;*)false;;esac;fi
|
||||
'\'' sh
|
||||
'
|
||||
fi
|
||||
as_executable_p=$as_test_x
|
||||
as_test_x='test -x'
|
||||
as_executable_p=as_fn_executable_p
|
||||
|
||||
# Sed expression to map a string onto a valid CPP name.
|
||||
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
|
||||
@ -561,7 +581,7 @@ PACKAGE_STRING=
|
||||
PACKAGE_BUGREPORT=
|
||||
PACKAGE_URL=
|
||||
|
||||
ac_unique_file="cygwin-api.in.sgml"
|
||||
ac_unique_file="cygwin-api.in.xml"
|
||||
ac_no_link=no
|
||||
ac_subst_vars='LTLIBOBJS
|
||||
LIBOBJS
|
||||
@ -1090,8 +1110,6 @@ target=$target_alias
|
||||
if test "x$host_alias" != x; then
|
||||
if test "x$build_alias" = x; then
|
||||
cross_compiling=maybe
|
||||
$as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
|
||||
If a cross compiler is detected then cross compile mode will be used" >&2
|
||||
elif test "x$build_alias" != "x$host_alias"; then
|
||||
cross_compiling=yes
|
||||
fi
|
||||
@ -1321,9 +1339,9 @@ test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
configure
|
||||
generated by GNU Autoconf 2.68
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
This configure script is free software; the Free Software Foundation
|
||||
gives unlimited permission to copy, distribute and modify it.
|
||||
_ACEOF
|
||||
@ -1376,7 +1394,7 @@ This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by $as_me, which was
|
||||
generated by GNU Autoconf 2.68. Invocation command line was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
|
||||
@ -1883,7 +1901,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_CC="${ac_tool_prefix}gcc"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@ -1923,7 +1941,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_ac_ct_CC="gcc"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@ -1981,7 +1999,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_CC="${ac_tool_prefix}gcc"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@ -2021,7 +2039,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_ac_ct_CC="gcc"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@ -2074,7 +2092,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_CC="${ac_tool_prefix}cc"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@ -2115,7 +2133,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
|
||||
ac_prog_rejected=yes
|
||||
continue
|
||||
@ -2173,7 +2191,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@ -2217,7 +2235,7 @@ do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_ac_ct_CC="$ac_prog"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
@ -2739,8 +2757,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
struct stat;
|
||||
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
|
||||
struct buf { int x; };
|
||||
FILE * (*rcsopen) (struct buf *, struct stat *, int);
|
||||
@ -3275,16 +3292,16 @@ if (echo >conf$$.file) 2>/dev/null; then
|
||||
# ... but there are two gotchas:
|
||||
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
|
||||
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
|
||||
# In both cases, we have to default to `cp -p'.
|
||||
# In both cases, we have to default to `cp -pR'.
|
||||
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
|
||||
as_ln_s='cp -p'
|
||||
as_ln_s='cp -pR'
|
||||
elif ln conf$$.file conf$$ 2>/dev/null; then
|
||||
as_ln_s=ln
|
||||
else
|
||||
as_ln_s='cp -p'
|
||||
as_ln_s='cp -pR'
|
||||
fi
|
||||
else
|
||||
as_ln_s='cp -p'
|
||||
as_ln_s='cp -pR'
|
||||
fi
|
||||
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
|
||||
rmdir conf$$.dir 2>/dev/null
|
||||
@ -3344,28 +3361,16 @@ else
|
||||
as_mkdir_p=false
|
||||
fi
|
||||
|
||||
if test -x / >/dev/null 2>&1; then
|
||||
as_test_x='test -x'
|
||||
else
|
||||
if ls -dL / >/dev/null 2>&1; then
|
||||
as_ls_L_option=L
|
||||
else
|
||||
as_ls_L_option=
|
||||
fi
|
||||
as_test_x='
|
||||
eval sh -c '\''
|
||||
if test -d "$1"; then
|
||||
test -d "$1/.";
|
||||
else
|
||||
case $1 in #(
|
||||
-*)set "./$1";;
|
||||
esac;
|
||||
case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
|
||||
???[sx]*):;;*)false;;esac;fi
|
||||
'\'' sh
|
||||
'
|
||||
fi
|
||||
as_executable_p=$as_test_x
|
||||
|
||||
# as_fn_executable_p FILE
|
||||
# -----------------------
|
||||
# Test if FILE is an executable regular file.
|
||||
as_fn_executable_p ()
|
||||
{
|
||||
test -f "$1" && test -x "$1"
|
||||
} # as_fn_executable_p
|
||||
as_test_x='test -x'
|
||||
as_executable_p=as_fn_executable_p
|
||||
|
||||
# Sed expression to map a string onto a valid CPP name.
|
||||
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
|
||||
@ -3387,7 +3392,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by $as_me, which was
|
||||
generated by GNU Autoconf 2.68. Invocation command line was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
CONFIG_HEADERS = $CONFIG_HEADERS
|
||||
@ -3440,10 +3445,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
config.status
|
||||
configured by $0, generated by GNU Autoconf 2.68,
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
This config.status script is free software; the Free Software Foundation
|
||||
gives unlimited permission to copy, distribute and modify it."
|
||||
|
||||
@ -3520,7 +3525,7 @@ fi
|
||||
_ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
if \$ac_cs_recheck; then
|
||||
set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
|
||||
set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
|
||||
shift
|
||||
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
|
||||
CONFIG_SHELL='$SHELL'
|
||||
|
@ -10,7 +10,7 @@ dnl details.
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT(cygwin-api.in.sgml)
|
||||
AC_INIT(cygwin-api.in.xml)
|
||||
AC_CONFIG_AUX_DIR(../..)
|
||||
|
||||
AC_NO_EXECUTABLES
|
||||
|
@ -1,3 +1,7 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<sect1 id="using-cygserver"><title>Cygserver</title>
|
||||
|
||||
<sect2 id="what-is-cygserver"><title>What is Cygserver?</title>
|
@ -1,15 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<book id="cygwin-api">
|
||||
<book id="cygwin-api" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
|
||||
<bookinfo>
|
||||
<date>1998-08-31</date>
|
||||
<title>Cygwin API Reference</title>
|
||||
|
||||
DOCTOOL-INSERT-legal
|
||||
|
||||
<xi:include href="legal.xml"/>
|
||||
</bookinfo>
|
||||
|
||||
<toc></toc>
|
@ -1,25 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
|
||||
|
||||
<book id="cygwin-ug-net">
|
||||
|
||||
<bookinfo>
|
||||
<date>2009-03-18</date>
|
||||
<title>Cygwin User's Guide</title>
|
||||
|
||||
DOCTOOL-INSERT-legal
|
||||
|
||||
</bookinfo>
|
||||
|
||||
<toc></toc>
|
||||
|
||||
DOCTOOL-INSERT-overview
|
||||
|
||||
DOCTOOL-INSERT-setup-net
|
||||
|
||||
DOCTOOL-INSERT-using
|
||||
|
||||
DOCTOOL-INSERT-programming
|
||||
|
||||
</book>
|
16
winsup/doc/cygwin-ug-net.xml
Normal file
16
winsup/doc/cygwin-ug-net.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<book id="cygwin-ug-net" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<bookinfo>
|
||||
<date>2009-03-18</date>
|
||||
<title>Cygwin User's Guide</title>
|
||||
<xi:include href="legal.xml"/>
|
||||
</bookinfo>
|
||||
|
||||
<xi:include href="overview.xml"/>
|
||||
<xi:include href="setup-net.xml"/>
|
||||
<xi:include href="using.xml"/>
|
||||
<xi:include href="programming.xml"/>
|
||||
</book>
|
@ -1,64 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY cygnus-copyright "<year>1999,2000,2001,2002,2003,2004,2005,2006,2007,2008</year>
|
||||
<holder>Red Hat, Inc.</holder>">
|
||||
<!ENTITY cygnus-code-copyright "
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
Copyright (C) 1998, 1999, 2000, 2001, 2002,
|
||||
2003, 2004, 2005, 2006, 2007,
|
||||
2008 Red Hat, Inc.
|
||||
|
||||
This is copyrighted software that may only
|
||||
be reproduced, modified, or distributed
|
||||
under license from Red Hat, Inc.
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
">
|
||||
]>
|
||||
|
||||
<book id="cygwin-ug">
|
||||
|
||||
<bookinfo>
|
||||
<date>2001-22-03</date>
|
||||
<title>Cygwin User's Guide</title>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Joshua Daniel</firstname>
|
||||
<surname>Franklin</surname>
|
||||
</author>
|
||||
<author>
|
||||
<firstname>Corinna</firstname>
|
||||
<surname>Vinschen</surname>
|
||||
</author>
|
||||
<author>
|
||||
<firstname>Christopher</firstname>
|
||||
<surname>Faylor</surname>
|
||||
</author>
|
||||
<author>
|
||||
<firstname>DJ</firstname>
|
||||
<surname>Delorie</surname>
|
||||
</author>
|
||||
<author>
|
||||
<firstname>Pierre</firstname>
|
||||
<surname>Humblet</surname>
|
||||
</author>
|
||||
<author>
|
||||
<firstname>Geoffrey</firstname>
|
||||
<surname>Noer</surname>
|
||||
</author>
|
||||
</authorgroup>
|
||||
|
||||
DOCTOOL-INSERT-legal
|
||||
|
||||
</bookinfo>
|
||||
|
||||
<toc></toc>
|
||||
|
||||
DOCTOOL-INSERT-overview
|
||||
|
||||
DOCTOOL-INSERT-setup
|
||||
|
||||
DOCTOOL-INSERT-using
|
||||
|
||||
DOCTOOL-INSERT-programming
|
||||
|
||||
</book>
|
11
winsup/doc/cygwin-ug.xml
Normal file
11
winsup/doc/cygwin-ug.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<book id="cygwin-ug" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<xi:include href="ug-info.xml"/>
|
||||
<xi:include href="overview.xml"/>
|
||||
<xi:include href="setup.xml"/>
|
||||
<xi:include href="using.xml"/>
|
||||
<xi:include href="programming.xml"/>
|
||||
</book>
|
@ -1,3 +1,7 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<sect1 id="using-cygwinenv"><title>The <envar>CYGWIN</envar> environment
|
||||
variable</title>
|
||||
|
@ -1,3 +1,7 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<sect1 id="dll"><title>Building and Using DLLs</title>
|
||||
|
||||
<para>DLLs are Dynamic Link Libraries, which means that they're linked
|
@ -1,3 +1,7 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<sect1 id="using-effectively">
|
||||
<title>Using Cygwin effectively with Windows</title>
|
||||
|
@ -1,3 +1,10 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<qandadiv id="faq.api">
|
||||
<title>Cygwin API Questions</title>
|
||||
|
||||
<!-- faq-api.xml -->
|
||||
<qandaentry id="faq.api.everything">
|
||||
<question><para>How does everything work?</para></question>
|
||||
@ -319,4 +326,4 @@ In a Windows console window you can enable and capture mouse events
|
||||
using the xterm escape sequences for mouse events.
|
||||
</para>
|
||||
</answer></qandaentry>
|
||||
|
||||
</qandadiv>
|
||||
|
17
winsup/doc/faq-copyright.xml
Normal file
17
winsup/doc/faq-copyright.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
<!-- faq-copyright.xml -->
|
||||
|
||||
<qandadiv id="faq.copyright">
|
||||
<title>Copyright</title>
|
||||
|
||||
<qandaentry id="faq.what.copyright">
|
||||
<question><para>What are the copyrights?</para></question>
|
||||
|
||||
<answer>
|
||||
<para>Please see <ulink url="http://cygwin.com/license.html"/>
|
||||
for more information about Cygwin copyright and licensing.</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
</qandadiv>
|
@ -1,5 +1,11 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
<!-- faq-programming.xml -->
|
||||
|
||||
<qandadiv id="faq.programming">
|
||||
<title>Programming Questions</title>
|
||||
|
||||
<qandaentry id="faq.programming.packages">
|
||||
<question><para>How do I contribute a package?</para></question>
|
||||
<answer>
|
||||
@ -1107,3 +1113,5 @@ executable.</para></listitem>
|
||||
linker flag.</para></listitem>
|
||||
</orderedlist></listitem></orderedlist>
|
||||
</answer></qandaentry>
|
||||
|
||||
</qandadiv>
|
||||
|
@ -1,3 +1,10 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<qandadiv id="faq.resources">
|
||||
<title>Further Resources</title>
|
||||
|
||||
<!-- faq-resources.xml -->
|
||||
<qandaentry id="faq.resources.documentation">
|
||||
<question><para>Where's the documentation?</para></question>
|
||||
@ -48,4 +55,4 @@ for a list of them.)
|
||||
<para>Comprehensive information about reporting problems with Cygwin can be found at <ulink url="http://cygwin.com/problems.html" />.
|
||||
</para>
|
||||
</answer></qandaentry>
|
||||
|
||||
</qandadiv>
|
||||
|
@ -1,75 +0,0 @@
|
||||
<?xml version='1.0'?>
|
||||
<!DOCTYPE article PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN'
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!-- see http://www.unicode.org/charts/PDF/U0080.pdf -->
|
||||
<!ENTITY pound "£">
|
||||
<!ENTITY brokenpipe "¦">
|
||||
|
||||
<!-- all the files -->
|
||||
<!ENTITY FAQ-WHAT SYSTEM "faq-what.xml">
|
||||
<!ENTITY FAQ-SETUP SYSTEM "faq-setup.xml">
|
||||
<!ENTITY FAQ-RESOURCES SYSTEM "faq-resources.xml">
|
||||
<!ENTITY FAQ-USING SYSTEM "faq-using.xml">
|
||||
<!ENTITY FAQ-API SYSTEM "faq-api.xml">
|
||||
<!ENTITY FAQ-PROGRAMMING SYSTEM "faq-programming.xml">
|
||||
]>
|
||||
|
||||
<article id="faq" lang="en">
|
||||
<articleinfo>
|
||||
<title>Cygwin FAQ</title>
|
||||
</articleinfo>
|
||||
|
||||
<sect1 id="faq.about">
|
||||
<title>About Cygwin</title>
|
||||
<qandaset><?dbhtml toc="1"?>
|
||||
&FAQ-WHAT;
|
||||
</qandaset></sect1>
|
||||
|
||||
<sect1 id="faq.setup">
|
||||
<title>Setting up Cygwin</title>
|
||||
<qandaset><?dbhtml toc="1"?>
|
||||
&FAQ-SETUP;
|
||||
</qandaset></sect1>
|
||||
|
||||
<sect1 id="faq.resources">
|
||||
<title>Further Resources</title>
|
||||
<qandaset><?dbhtml toc="1"?>
|
||||
&FAQ-RESOURCES;
|
||||
</qandaset></sect1>
|
||||
|
||||
<sect1 id="faq.using">
|
||||
<title>Using Cygwin</title>
|
||||
<qandaset><?dbhtml toc="1"?>
|
||||
&FAQ-USING;
|
||||
</qandaset></sect1>
|
||||
|
||||
<sect1 id="faq.api">
|
||||
<title>Cygwin API Questions</title>
|
||||
<qandaset><?dbhtml toc="1"?>
|
||||
&FAQ-API;
|
||||
</qandaset></sect1>
|
||||
|
||||
<sect1 id="faq.programming">
|
||||
<title>Programming Questions</title>
|
||||
<qandaset><?dbhtml toc="1"?>
|
||||
&FAQ-PROGRAMMING;
|
||||
</qandaset></sect1>
|
||||
|
||||
<sect1 id="faq.copyright">
|
||||
<title>Copyright</title>
|
||||
<qandaset><?dbhtml toc="1"?>
|
||||
|
||||
|
||||
<qandaentry id="faq.what.copyright">
|
||||
<question><para>What are the copyrights?</para></question>
|
||||
<answer>
|
||||
|
||||
<para>Please see
|
||||
<ulink url="http://cygwin.com/license.html" /> for more information
|
||||
about Cygwin copyright and licensing.
|
||||
</para>
|
||||
|
||||
</answer></qandaentry>
|
||||
</qandaset></sect1>
|
||||
|
||||
</article>
|
@ -1,3 +1,10 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<qandadiv id="faq.setup">
|
||||
<title>Setting up Cygwin</title>
|
||||
|
||||
<!-- faq-setup.xml -->
|
||||
<qandaentry id="faq.setup.setup">
|
||||
<question><para>What is the recommended installation procedure?</para></question>
|
||||
@ -604,4 +611,5 @@ this up for Cygwin 1.7, we might add this information here.
|
||||
except for the installation directory information stored there for the sake
|
||||
of setup.exe. There's nothing left to manipulate anymore.
|
||||
</para></answer></qandaentry>
|
||||
</qandadiv>
|
||||
|
||||
|
@ -1,3 +1,10 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<qandadiv id="faq.using">
|
||||
<title>Using Cygwin</title>
|
||||
|
||||
<!-- faq-problems.xml -->
|
||||
<qandaentry id="faq.using.missing-dlls">
|
||||
<question><para>Why can't my application locate cygncurses-8.dll? or cygintl-3.dll? or cygreadline6.dll? or ...?</para></question>
|
||||
@ -1243,3 +1250,4 @@ such as virtual memory paging and file caching.</para>
|
||||
difficult to make <literal>fork()</literal> work reliably.</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
</qandadiv>
|
||||
|
@ -1,5 +1,12 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<qandadiv id="faq.about">
|
||||
<title>About Cygwin</title>
|
||||
|
||||
<!-- faq-what.xml -->
|
||||
<qandaentry id="faq.what">
|
||||
<qandaentry id="faq.what.what">
|
||||
<question><para>What is it?</para></question>
|
||||
<answer>
|
||||
|
||||
@ -152,4 +159,4 @@ function, so some email will have to go unanswered.
|
||||
<para>Many thanks to everyone using the tools for their many contributions in
|
||||
the form of advice, bug reports, and code fixes. Keep them coming!
|
||||
</para></answer></qandaentry>
|
||||
|
||||
</qandadiv>
|
||||
|
@ -1,71 +1,21 @@
|
||||
<?xml version='1.0'?>
|
||||
<!DOCTYPE article PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN'
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!-- see http://www.unicode.org/charts/PDF/U0080.pdf -->
|
||||
<!ENTITY pound "£">
|
||||
<!ENTITY brokenpipe "¦">
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<!-- all the files -->
|
||||
<!ENTITY FAQ-WHAT SYSTEM "faq-what.xml">
|
||||
<!ENTITY FAQ-SETUP SYSTEM "faq-setup.xml">
|
||||
<!ENTITY FAQ-RESOURCES SYSTEM "faq-resources.xml">
|
||||
<!ENTITY FAQ-USING SYSTEM "faq-using.xml">
|
||||
<!ENTITY FAQ-API SYSTEM "faq-api.xml">
|
||||
<!ENTITY FAQ-PROGRAMMING SYSTEM "faq-programming.xml">
|
||||
]>
|
||||
|
||||
<article id="faq-nochunks" lang="en">
|
||||
<article id="faq" lang="en" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<articleinfo>
|
||||
<title>Cygwin FAQ</title>
|
||||
</articleinfo>
|
||||
|
||||
<qandaset>
|
||||
<?dbhtml toc="1"?>
|
||||
|
||||
<qandadiv id="faq.about">
|
||||
<title>About Cygwin</title>
|
||||
&FAQ-WHAT;
|
||||
</qandadiv>
|
||||
|
||||
<qandadiv id="faq.setup">
|
||||
<title>Setting up Cygwin</title>
|
||||
&FAQ-SETUP;
|
||||
</qandadiv>
|
||||
|
||||
<qandadiv id="faq.resources">
|
||||
<title>Further Resources</title>
|
||||
&FAQ-RESOURCES;
|
||||
</qandadiv>
|
||||
|
||||
<qandadiv id="faq.using">
|
||||
<title>Using Cygwin</title>
|
||||
&FAQ-USING;
|
||||
</qandadiv>
|
||||
|
||||
<qandadiv id="faq.api">
|
||||
<title>Cygwin API Questions</title>
|
||||
&FAQ-API;
|
||||
</qandadiv>
|
||||
|
||||
<qandadiv id="faq.programming">
|
||||
<title>Programming Questions</title>
|
||||
&FAQ-PROGRAMMING;
|
||||
</qandadiv>
|
||||
|
||||
<qandadiv id="faq.copyright">
|
||||
<title>Copyright</title>
|
||||
|
||||
<qandaentry id="faq.what.copyright">
|
||||
<question><para>What are the copyrights?</para></question>
|
||||
<answer>
|
||||
|
||||
<para>Please see
|
||||
<ulink url="http://cygwin.com/license.html" /> for more information
|
||||
about Cygwin copyright and licensing.
|
||||
</para>
|
||||
|
||||
</answer></qandaentry>
|
||||
</qandadiv>
|
||||
</qandaset>
|
||||
<qandaset>
|
||||
<?dbhtml toc="1"?>
|
||||
|
||||
<xi:include href="faq-what.xml"/>
|
||||
<xi:include href="faq-setup.xml"/>
|
||||
<xi:include href="faq-resources.xml"/>
|
||||
<xi:include href="faq-using.xml"/>
|
||||
<xi:include href="faq-api.xml"/>
|
||||
<xi:include href="faq-programming.xml"/>
|
||||
<xi:include href="faq-copyright.xml"/>
|
||||
</qandaset>
|
||||
</article>
|
||||
|
@ -1,3 +1,7 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<sect1 id="using-filemodes"><title>File permissions</title>
|
||||
|
||||
<para>On FAT or FAT32 filesystems, files are always readable, and Cygwin
|
@ -1,3 +1,7 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<sect1 id="gcc"><title>Using GCC with Cygwin</title>
|
||||
|
||||
<sect2 id="gcc-cons"><title>Console Mode Applications</title>
|
@ -1,3 +1,6 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<sect1 id="gdb"><title>Debugging Cygwin Programs</title>
|
||||
|
@ -1,97 +1,6 @@
|
||||
<sect1 id="ov-ex-win">
|
||||
<title>Quick Start Guide for those more experienced with Windows</title>
|
||||
<para>
|
||||
If you are new to the world of UNIX, you may find it difficult to
|
||||
understand at first. This guide is not meant to be comprehensive,
|
||||
so we recommend that you use the many available Internet resources
|
||||
to become acquainted with UNIX basics (search for "UNIX basics" or
|
||||
"UNIX tutorial").
|
||||
</para>
|
||||
<para>
|
||||
To install a basic Cygwin environment, run the
|
||||
<command>setup.exe</command> program and click <literal>Next</literal>
|
||||
at each page. The default settings are correct for most users. If you
|
||||
want to know more about what each option means, see
|
||||
<xref linkend="internet-setup"></xref>. Use <command>setup.exe</command>
|
||||
any time you want to update or install a Cygwin package. If you are
|
||||
installing Cygwin for a specific purpose, use it to install the tools
|
||||
that you need. For example, if you want to compile C++ programs, you
|
||||
need the <systemitem>gcc-g++</systemitem> package and probably a text
|
||||
editor like <systemitem>nano</systemitem>. When running
|
||||
<command>setup.exe</command>, clicking on categories and packages in the
|
||||
package installation screen will provide you with the ability to control
|
||||
what is installed or updated.
|
||||
</para>
|
||||
<para>
|
||||
Another option is to install everything by clicking on the
|
||||
<literal>Default</literal> field next to the <literal>All</literal>
|
||||
category. However, be advised that this will download and install
|
||||
several hundreds of megabytes of software to your computer. The best
|
||||
plan is probably to click on individual categories and install either
|
||||
entire categories or packages from the categories themselves.
|
||||
After installation, you can find Cygwin-specific documentation in
|
||||
the <literal>/usr/share/doc/Cygwin/</literal> directory.
|
||||
</para>
|
||||
<para>
|
||||
Developers coming from a Windows background will be able to write
|
||||
console or GUI executables that rely on the Microsoft Win32 API instead
|
||||
of Cygwin using the mingw32 or mingw64 cross-compiler toolchains. The
|
||||
<command>-shared</command> option to GCC allows to write Windows Dynamically
|
||||
Linked Libraries (DLLs). The resource compiler <command>windres</command>
|
||||
is also provided.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="ov-ex-unix">
|
||||
<title>Quick Start Guide for those more experienced with UNIX</title>
|
||||
<para>
|
||||
If you are an experienced UNIX user who misses a powerful command-line
|
||||
environment, you will enjoy Cygwin.
|
||||
Developers coming from a UNIX background will find a set of utilities
|
||||
they are already comfortable using, including a working UNIX shell. The
|
||||
compiler tools are the standard GNU compilers most people will have previously
|
||||
used under UNIX, only ported to the Windows host. Programmers wishing to port
|
||||
UNIX software to Windows NT will find that the Cygwin library provides
|
||||
an easy way to port many UNIX packages, with only minimal source code
|
||||
changes.
|
||||
</para>
|
||||
<para>
|
||||
Note that there are some workarounds that cause Cygwin to behave differently
|
||||
than most UNIX-like operating systems; these are described in more detail in
|
||||
<xref linkend="using-effectively"></xref>.
|
||||
</para>
|
||||
<para>
|
||||
Use the graphical command <command>setup.exe</command> any time you want
|
||||
to update or install a Cygwin package. This program must be run
|
||||
manually every time you want to check for updated packages since Cygwin
|
||||
does not currently include a mechanism for automatically detecting
|
||||
package updates.
|
||||
</para>
|
||||
<para>
|
||||
By default, <command>setup.exe</command> only installs a minimal subset of
|
||||
packages. Add any other packages by clicking on the <literal>+</literal>
|
||||
next to the Category name and selecting the package from the displayed
|
||||
list. You may search for specfic tools by using the
|
||||
<ulink url="http://cygwin.com/packages/">Setup Package Search</ulink>
|
||||
at the Cygwin web site.
|
||||
</para>
|
||||
<para>
|
||||
Another option is to install everything by clicking on the
|
||||
<literal>Default</literal> field next to the <literal>All</literal>
|
||||
category. However, be advised that this will download and install
|
||||
several hundreds of megabytes of software to your computer. The best
|
||||
plan is probably to click on individual categories and install either
|
||||
entire categories or packages from the categories themselves.
|
||||
After installation, you can find Cygwin-specific documentation in
|
||||
the <literal>/usr/share/doc/Cygwin/</literal> directory.
|
||||
</para>
|
||||
<para>
|
||||
For more information about what each option in
|
||||
<command>setup.exe</command> means, see <xref
|
||||
linkend="internet-setup"></xref>.
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<sect1 id="highlights"><title>Highlights of Cygwin Functionality</title>
|
||||
|
@ -1,3 +1,7 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE legalnotice PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<legalnotice id="legal">
|
||||
|
||||
<para>Copyright © 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.</para>
|
@ -1,3 +1,7 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<sect1 id="ov-new1.7"><title>What's new and what changed in Cygwin 1.7</title>
|
||||
|
||||
<sect2 id="ov-new1.7.19"><title>What's new and what changed from 1.7.18 to 1.7.19</title>
|
@ -1,3 +1,7 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<sect1 id="ntsec"><title>Using Windows security in Cygwin</title>
|
||||
|
||||
<para>This section discusses how the Windows security model is
|
54
winsup/doc/ov-ex-unix.xml
Normal file
54
winsup/doc/ov-ex-unix.xml
Normal file
@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<sect1 id="ov-ex-unix">
|
||||
<title>Quick Start Guide for those more experienced with UNIX</title>
|
||||
<para>
|
||||
If you are an experienced UNIX user who misses a powerful command-line
|
||||
environment, you will enjoy Cygwin.
|
||||
Developers coming from a UNIX background will find a set of utilities
|
||||
they are already comfortable using, including a working UNIX shell. The
|
||||
compiler tools are the standard GNU compilers most people will have previously
|
||||
used under UNIX, only ported to the Windows host. Programmers wishing to port
|
||||
UNIX software to Windows NT will find that the Cygwin library provides
|
||||
an easy way to port many UNIX packages, with only minimal source code
|
||||
changes.
|
||||
</para>
|
||||
<para>
|
||||
Note that there are some workarounds that cause Cygwin to behave differently
|
||||
than most UNIX-like operating systems; these are described in more detail in
|
||||
<xref linkend="using-effectively"></xref>.
|
||||
</para>
|
||||
<para>
|
||||
Use the graphical command <command>setup.exe</command> any time you want
|
||||
to update or install a Cygwin package. This program must be run
|
||||
manually every time you want to check for updated packages since Cygwin
|
||||
does not currently include a mechanism for automatically detecting
|
||||
package updates.
|
||||
</para>
|
||||
<para>
|
||||
By default, <command>setup.exe</command> only installs a minimal subset of
|
||||
packages. Add any other packages by clicking on the <literal>+</literal>
|
||||
next to the Category name and selecting the package from the displayed
|
||||
list. You may search for specfic tools by using the
|
||||
<ulink url="http://cygwin.com/packages/">Setup Package Search</ulink>
|
||||
at the Cygwin web site.
|
||||
</para>
|
||||
<para>
|
||||
Another option is to install everything by clicking on the
|
||||
<literal>Default</literal> field next to the <literal>All</literal>
|
||||
category. However, be advised that this will download and install
|
||||
several hundreds of megabytes of software to your computer. The best
|
||||
plan is probably to click on individual categories and install either
|
||||
entire categories or packages from the categories themselves.
|
||||
After installation, you can find Cygwin-specific documentation in
|
||||
the <literal>/usr/share/doc/Cygwin/</literal> directory.
|
||||
</para>
|
||||
<para>
|
||||
For more information about what each option in
|
||||
<command>setup.exe</command> means, see <xref
|
||||
linkend="internet-setup"></xref>.
|
||||
</para>
|
||||
|
||||
</sect1>
|
47
winsup/doc/ov-ex-win.xml
Normal file
47
winsup/doc/ov-ex-win.xml
Normal file
@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<sect1 id="ov-ex-win">
|
||||
<title>Quick Start Guide for those more experienced with Windows</title>
|
||||
<para>
|
||||
If you are new to the world of UNIX, you may find it difficult to
|
||||
understand at first. This guide is not meant to be comprehensive,
|
||||
so we recommend that you use the many available Internet resources
|
||||
to become acquainted with UNIX basics (search for "UNIX basics" or
|
||||
"UNIX tutorial").
|
||||
</para>
|
||||
<para>
|
||||
To install a basic Cygwin environment, run the
|
||||
<command>setup.exe</command> program and click <literal>Next</literal>
|
||||
at each page. The default settings are correct for most users. If you
|
||||
want to know more about what each option means, see
|
||||
<xref linkend="internet-setup"></xref>. Use <command>setup.exe</command>
|
||||
any time you want to update or install a Cygwin package. If you are
|
||||
installing Cygwin for a specific purpose, use it to install the tools
|
||||
that you need. For example, if you want to compile C++ programs, you
|
||||
need the <systemitem>gcc-g++</systemitem> package and probably a text
|
||||
editor like <systemitem>nano</systemitem>. When running
|
||||
<command>setup.exe</command>, clicking on categories and packages in the
|
||||
package installation screen will provide you with the ability to control
|
||||
what is installed or updated.
|
||||
</para>
|
||||
<para>
|
||||
Another option is to install everything by clicking on the
|
||||
<literal>Default</literal> field next to the <literal>All</literal>
|
||||
category. However, be advised that this will download and install
|
||||
several hundreds of megabytes of software to your computer. The best
|
||||
plan is probably to click on individual categories and install either
|
||||
entire categories or packages from the categories themselves.
|
||||
After installation, you can find Cygwin-specific documentation in
|
||||
the <literal>/usr/share/doc/Cygwin/</literal> directory.
|
||||
</para>
|
||||
<para>
|
||||
Developers coming from a Windows background will be able to write
|
||||
console or GUI executables that rely on the Microsoft Win32 API instead
|
||||
of Cygwin using the mingw32 or mingw64 cross-compiler toolchains. The
|
||||
<command>-shared</command> option to GCC allows to write Windows Dynamically
|
||||
Linked Libraries (DLLs). The resource compiler <command>windres</command>
|
||||
is also provided.
|
||||
</para>
|
||||
</sect1>
|
@ -1,4 +1,9 @@
|
||||
<chapter id="overview"><title>Cygwin Overview</title>
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<chapter id="overview" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<title>Cygwin Overview</title>
|
||||
|
||||
<sect1 id="what-is-it"><title>What is it?</title>
|
||||
|
||||
@ -29,8 +34,8 @@ distribution).
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
DOCTOOL-INSERT-ov-ex-win
|
||||
DOCTOOL-INSERT-ov-ex-unix
|
||||
<xi:include href="ov-ex-win.xml"/>
|
||||
<xi:include href="ov-ex-unix.xml"/>
|
||||
|
||||
<sect1 id="are-free"><title>Are the Cygwin tools free software?</title>
|
||||
|
||||
@ -120,7 +125,7 @@ available in a 64 bit version is 1.7.19.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
DOCTOOL-INSERT-highlights
|
||||
DOCTOOL-INSERT-ov-new1.7
|
||||
<xi:include href="highlights.xml"/>
|
||||
<xi:include href="new-features.xml"/>
|
||||
|
||||
</chapter>
|
@ -1,3 +1,7 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<sect1 id="using-pathnames"><title>Mapping path names</title>
|
||||
|
||||
<sect2 id="pathnames-intro"><title>Introduction</title>
|
||||
@ -489,517 +493,3 @@ not by default, for example).</para>
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="using-specialnames"><title>Special filenames</title>
|
||||
|
||||
<sect2 id="pathnames-etc"><title>Special files in /etc</title>
|
||||
|
||||
<para>Certain files in Cygwin's <filename>/etc</filename> directory are
|
||||
read by Cygwin before the mount table has been established. The list
|
||||
of files is</para>
|
||||
|
||||
<screen>
|
||||
/etc/fstab
|
||||
/etc/fstab.d/$USER
|
||||
/etc/passwd
|
||||
/etc/group
|
||||
</screen>
|
||||
|
||||
<para>These file are read using native Windows NT functions which have
|
||||
no notion of Cygwin symlinks or POSIX paths. For that reason
|
||||
there are a few requirements as far as <filename>/etc</filename> is
|
||||
concerned.</para>
|
||||
|
||||
<para>To access these files, the Cygwin DLL evaluates it's own full
|
||||
Windows path, strips off the innermost directory component and adds
|
||||
"\etc". Let's assume the Cygwin DLL is installed as
|
||||
<filename>C:\cygwin\bin\cygwin1.dll</filename>. First the DLL name as
|
||||
well as the innermost directory (<filename>bin</filename>) is stripped
|
||||
off: <filename>C:\cygwin\</filename>. Then "etc" and the filename to
|
||||
look for is attached: <filename>C:\cygwin\etc\fstab</filename>. So the
|
||||
/etc directory must be parallel to the directory in which the cygwin1.dll
|
||||
exists and <filename>/etc</filename> must not be a Cygwin symlink
|
||||
pointing to another directory. Consequentially none of the files from
|
||||
the above list, including the directory <filename>/etc/fstab.d</filename>
|
||||
is allowed to be a Cygwin symlink either.</para>
|
||||
|
||||
<para>However, native NTFS symlinks and reparse points are transparent
|
||||
when accessing the above files so all these files as well as
|
||||
<filename>/etc</filename> itself may be NTFS symlinks or reparse
|
||||
points.</para>
|
||||
|
||||
<para>Last but not least, make sure that these files are world-readable.
|
||||
Every process of any user account has to read these files potentially,
|
||||
so world-readability is essential. The only exception are the user
|
||||
specific files <filename>/etc/fstab.d/$USER</filename>, which only have
|
||||
to be readable by the $USER user account itself.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="pathnames-dosdevices"><title>Invalid filenames</title>
|
||||
|
||||
<para>Filenames invalid under Win32 are not necessarily invalid
|
||||
under Cygwin since release 1.7.0. There are a few rules which
|
||||
apply to Windows filenames. Most notably, DOS device names like
|
||||
<filename>AUX</filename>, <filename>COM1</filename>,
|
||||
<filename>LPT1</filename> or <filename>PRN</filename> (to name a few)
|
||||
cannot be used as filename or extension in a native Win32 application.
|
||||
So filenames like <filename>prn.txt</filename> or <filename>foo.aux</filename>
|
||||
are invalid filenames for native Win32 applications.</para>
|
||||
|
||||
<para>This restriction doesn't apply to Cygwin applications. Cygwin
|
||||
can create and access files with such names just fine. Just don't try
|
||||
to use these files with native Win32 applications.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="pathnames-specialchars">
|
||||
<title>Forbidden characters in filenames</title>
|
||||
|
||||
<para>Some characters are disallowed in filenames on Windows filesystems.
|
||||
These forbidden characters are the ASCII control characters from ASCII
|
||||
value 1 to 31, plus the following characters which have a special meaning
|
||||
in the Win32 API:</para>
|
||||
|
||||
<screen>
|
||||
" * : < > ? | \
|
||||
</screen>
|
||||
|
||||
<para>Cygwin can't fix this, but it has a method to workaround this
|
||||
restriction. All of the above characters, except for the backslash,
|
||||
are converted to special UNICODE characters in the range 0xf000 to 0xf0ff
|
||||
(the "Private use area") when creating or accessing files.</para>
|
||||
|
||||
<para>The backslash has to be exempt from this conversion, because Cygwin
|
||||
accepts Win32 filenames including backslashes as path separators on input.
|
||||
Converting backslashes using the above method would make this impossible.</para>
|
||||
|
||||
<para>Additionally Win32 filenames can't contain trailing dots and spaces
|
||||
for DOS backward compatibility. When trying to create files with trailing
|
||||
dots or spaces, all of them are removed before the file is created. This
|
||||
restriction only affects native Win32 applications. Cygwin applications
|
||||
can create and access files with trailing dots and spaces without problems.
|
||||
</para>
|
||||
|
||||
<para>An exception from this rule are some network filesystems (NetApp,
|
||||
NWFS) which choke on these filenames. They return with an error like
|
||||
"No such file or directory" when trying to create such files. Starting
|
||||
with Cygwin 1.7.6, Cygwin recognizes these filesystems and works around
|
||||
this problem by applying the same rule as for the other forbidden characters.
|
||||
Leading spaces and trailing dots and spaces will be converted to UNICODE
|
||||
characters in the private use area. This behaviour can be switched on
|
||||
explicitely for a filesystem or a directory tree by using the mount option
|
||||
<literal>dos</literal>.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="pathnames-unusual">
|
||||
<title>Filenames with unusual (foreign) characters</title>
|
||||
|
||||
<para> Windows filesystems use Unicode encoded as UTF-16
|
||||
to store filename information. If you don't use the UTF-8
|
||||
character set (see <xref linkend="setup-locale"></xref>) then there's a
|
||||
chance that a filename is using one or more characters which have no
|
||||
representation in the character set you're using.</para>
|
||||
|
||||
<note><para>In the default "C" locale, Cygwin creates filenames using
|
||||
the UTF-8 charset. This will always result in some valid filename by
|
||||
default, but again might impose problems when switching to a non-"C"
|
||||
or non-"UTF-8" charset.</para></note>
|
||||
|
||||
<note><para>To avoid this scenario altogether, always use UTF-8 as the
|
||||
character set.</para></note>
|
||||
|
||||
<para>If you don't want or can't use UTF-8 as character set for whatever
|
||||
reason, you will nevertheless be able to access the file. How does that
|
||||
work? When Cygwin converts the filename from UTF-16 to your character
|
||||
set, it recognizes characters which can't be converted. If that occurs,
|
||||
Cygwin replaces the non-convertible character with a special character
|
||||
sequence. The sequence starts with an ASCII CAN character (hex code
|
||||
0x18, equivalent Control-X), followed by the UTF-8 representation of the
|
||||
character. The result is a filename containing some ugly looking
|
||||
characters. While it doesn't <emphasis role='bold'>look</emphasis> nice, it
|
||||
<emphasis role='bold'>is</emphasis> nice, because Cygwin knows how to convert
|
||||
this filename back to UTF-16. The filename will be converted using your
|
||||
usual character set. However, when Cygwin recognizes an ASCII CAN
|
||||
character, it skips over the ASCII CAN and handles the following bytes as
|
||||
a UTF-8 character. Thus, the filename is symmetrically converted back to
|
||||
UTF-16 and you can access the file.</para>
|
||||
|
||||
<note><para>Please be aware that this method is not entirely foolproof.
|
||||
In some character set combinations it might not work for certain native
|
||||
characters.</para>
|
||||
|
||||
<para>Only by using the UTF-8 charset you can avoid this problem safely.
|
||||
</para></note>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="pathnames-casesensitive">
|
||||
<title>Case sensitive filenames</title>
|
||||
|
||||
<para>In the Win32 subsystem filenames are only case-preserved, but not
|
||||
case-sensitive. You can't access two files in the same directory which
|
||||
only differ by case, like <filename>Abc</filename> and
|
||||
<filename>aBc</filename>. While NTFS (and some remote filesystems)
|
||||
support case-sensitivity, the NT kernel starting with Windows XP does
|
||||
not support it by default. Rather, you have to tweak a registry setting
|
||||
and reboot. For that reason, case-sensitivity can not be supported by Cygwin,
|
||||
unless you change that registry value.</para>
|
||||
|
||||
<para>If you really want case-sensitivity in Cygwin, you can switch it
|
||||
on by setting the registry value</para>
|
||||
|
||||
<screen>
|
||||
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\obcaseinsensitive
|
||||
</screen>
|
||||
|
||||
<para>to 0 and reboot the machine.</para>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
When installing Microsoft's Services For Unix (SFU), you're asked if
|
||||
you want to use case-sensitive filenames. If you answer "yes" at this point,
|
||||
the installer will change the aforementioned registry value to 0, too. So, if
|
||||
you have SFU installed, there's some chance that the registry value is already
|
||||
set to case sensitivity.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<para>After you set this registry value to 0, Cygwin will be case-sensitive
|
||||
by default on NTFS and NFS filesystems. However, there are limitations:
|
||||
while two <emphasis role='bold'>programs</emphasis> <filename>Abc.exe</filename>
|
||||
and <filename>aBc.exe</filename> can be created and accessed like other files,
|
||||
starting applications is still case-insensitive due to Windows limitations
|
||||
and so the program you try to launch may not be the one actually started. Also,
|
||||
be aware that using two filenames which only differ by case might
|
||||
result in some weird interoperability issues with native Win32 applications.
|
||||
You're using case-sensitivity at your own risk. You have been warned! </para>
|
||||
|
||||
<para>Even if you use case-sensitivity, it might be feasible to switch to
|
||||
case-insensitivity for certain paths for better interoperability with
|
||||
native Win32 applications (even if it's just Windows Explorer). You can do
|
||||
this on a per-mount point base, by using the "posix=0" mount option in
|
||||
<filename>/etc/fstab</filename>, or your <filename>/etc/fstab.d/$USER</filename>
|
||||
file.</para>
|
||||
|
||||
<para><filename>/cygdrive</filename> paths are case-insensitive by default.
|
||||
The reason is that the native Windows %PATH% environment variable is not
|
||||
always using the correct case for all paths in it. As a result, if you use
|
||||
case-sensitivity on the <filename>/cygdrive</filename> prefix, your shell
|
||||
might claim that it can't find Windows commands like <command>attrib</command>
|
||||
or <command>net</command>. To ease the pain, the <filename>/cygdrive</filename>
|
||||
path is case-insensitive by default and you have to use the "posix=1" setting
|
||||
explicitly in <filename>/etc/fstab</filename> or
|
||||
<filename>/etc/fstab.d/$USER</filename> to switch it to case-sensitivity,
|
||||
or you have to make sure that the native Win32 %PATH% environment variable
|
||||
is using the correct case for all paths throughout.</para>
|
||||
|
||||
<para>Note that mount points as well as device names and virtual
|
||||
paths like /proc are always case-sensitive! The only exception are
|
||||
the subdirectories and filenames under /proc/registry, /proc/registry32
|
||||
and /proc/registry64. Registry access is always case-insensitive.
|
||||
Read on for more information.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="pathnames-posixdevices"> <title>POSIX devices</title>
|
||||
<para>While there is no need to create a POSIX <filename>/dev</filename>
|
||||
directory, the directory is automatically created as part of a Cygwin
|
||||
installation. It's existence is often a prerequisit to run certain
|
||||
applications which create symbolic links, fifos, or UNIX sockets in
|
||||
<filename>/dev</filename>. Also, the directories <filename>/dev/shm</filename>
|
||||
and <filename>/dev/mqueue</filename> are required to exist to use named POSIX
|
||||
semaphores, shared memory, and message queues, so a system without a real
|
||||
<filename>/dev</filename> directory is functionally crippled.
|
||||
</para>
|
||||
|
||||
<para>Apart from that, Cygwin automatically simulates POSIX devices
|
||||
internally. Up to Cygwin 1.7.11, these devices couldn't be seen with the
|
||||
command <command>ls /dev/</command> although commands such as
|
||||
<command>ls /dev/tty</command> worked fine. Starting with Cygwin 1.7.12,
|
||||
the <filename>/dev</filename> directory is automagically populated with
|
||||
existing POSIX devices by Cygwin in a way comparable with a
|
||||
<ulink url="http://en.wikipedia.org/wiki/Udev">udev</ulink> based virtual
|
||||
<filename>/dev</filename> directory under Linux.</para>
|
||||
|
||||
<para>
|
||||
Cygwin supports the following character devices commonly found on POSIX systems:
|
||||
</para>
|
||||
|
||||
<screen>
|
||||
/dev/null
|
||||
/dev/zero
|
||||
/dev/full
|
||||
|
||||
/dev/console Pseudo device name for the current console window of a session.
|
||||
Up to Cygwin 1.7.9, this was the only name for a console.
|
||||
Different consoles were indistinguishable.
|
||||
Cygwin's /dev/console is not quite comparable with the console
|
||||
device on UNIX machines.
|
||||
|
||||
/dev/cons0 Starting with Cygwin 1.7.10, Console sessions are numbered from
|
||||
/dev/cons1 /dev/cons0 upwards. Console device names are pseudo device
|
||||
... names, only accessible from processes within this very console
|
||||
session. This is due to a restriction in Windows.
|
||||
|
||||
/dev/tty The current controlling tty of a session.
|
||||
|
||||
/dev/ptmx Pseudo tty master device.
|
||||
|
||||
/dev/pty0 Pseudo ttys are numbered from /dev/pty0 upwards as they are
|
||||
/dev/pty1 requested.
|
||||
...
|
||||
|
||||
/dev/ttyS0 Serial communication devices. ttyS0 == Win32 COM1,
|
||||
/dev/ttyS1 ttyS1 == COM2, etc.
|
||||
...
|
||||
|
||||
/dev/pipe
|
||||
/dev/fifo
|
||||
|
||||
/dev/mem The physical memory of the machine. Note that access to the
|
||||
/dev/port physical memory has been restricted with Windows Server 2003.
|
||||
/dev/kmem Since this OS, you can't access physical memory from user space.
|
||||
|
||||
/dev/kmsg Kernel message pipe, for usage with sys logger services.
|
||||
|
||||
/dev/random Random number generator.
|
||||
/dev/urandom
|
||||
|
||||
/dev/dsp Default sound device of the system.
|
||||
</screen>
|
||||
|
||||
<para>
|
||||
Cygwin also has several Windows-specific devices:
|
||||
</para>
|
||||
|
||||
<screen>
|
||||
/dev/com1 The serial ports, starting with COM1 which is the same as ttyS0.
|
||||
/dev/com2 Please use /dev/ttySx instead.
|
||||
...
|
||||
|
||||
/dev/conin Same as Windows CONIN$.
|
||||
/dev/conout Same as Windows CONOUT$.
|
||||
/dev/clipboard The Windows clipboard, text only
|
||||
/dev/windows The Windows message queue.
|
||||
</screen>
|
||||
|
||||
<para>
|
||||
Block devices are accessible by Cygwin processes using fixed POSIX device
|
||||
names. These POSIX device names are generated using a direct conversion
|
||||
from the POSIX namespace to the internal NT namespace.
|
||||
E.g. the first harddisk is the NT internal device \device\harddisk0\partition0
|
||||
or the first partition on the third harddisk is \device\harddisk2\partition1.
|
||||
The first floppy in the system is \device\floppy0, the first CD-ROM is
|
||||
\device\cdrom0 and the first tape drive is \device\tape0.</para>
|
||||
|
||||
<para>The mapping from physical device to the name of the device in the
|
||||
internal NT namespace can be found in various places. For hard disks and
|
||||
CD/DVD drives, the Windows "Disk Management" utility (part of the
|
||||
"Computer Management" console) shows that the mapping of "Disk 0" is
|
||||
\device\harddisk0. "CD-ROM 2" is \device\cdrom2. Another place to find
|
||||
this mapping is the "Device Management" console. Disks have a
|
||||
"Location" number, tapes have a "Tape Symbolic Name", etc.
|
||||
Unfortunately, the places where this information is found is not very
|
||||
well-defined.</para>
|
||||
|
||||
<para>
|
||||
For external disks (USB-drives, CF-cards in a cardreader, etc) you can use
|
||||
Cygwin to show the mapping. <filename>/proc/partitions</filename>
|
||||
contains a list of raw drives known to Cygwin. The <command>df</command>
|
||||
command shows a list of drives and their respective sizes. If you match
|
||||
the information between <filename>/proc/partitions</filename> and the
|
||||
<command>df</command> output, you should be able to figure out which
|
||||
external drive corresponds to which raw disk device name.</para>
|
||||
|
||||
<note><para>Apart from tape devices which are not block devices and are
|
||||
by default accessed directly, accessing mass storage devices raw
|
||||
is something you should only do if you know what you're doing and know how to
|
||||
handle the information. <emphasis role='bold'>Writing</emphasis> to a raw
|
||||
mass storage device you should only do if you
|
||||
<emphasis role='bold'>really</emphasis> know what you're doing and are aware
|
||||
of the fact that any mistake can destroy important information, for the
|
||||
device, and for you. So, please, handle this ability with care.
|
||||
<emphasis role='bold'>You have been warned.</emphasis></para></note>
|
||||
|
||||
<para>
|
||||
Last but not least, the mapping from POSIX /dev namespace to internal
|
||||
NT namespace is as follows:
|
||||
</para>
|
||||
|
||||
<screen>
|
||||
POSIX device name Internal NT device name
|
||||
|
||||
/dev/st0 \device\tape0, rewind
|
||||
/dev/nst0 \device\tape0, no-rewind
|
||||
/dev/st1 \device\tape1
|
||||
/dev/nst1 \device\tape1
|
||||
...
|
||||
/dev/st15
|
||||
/dev/nst15
|
||||
|
||||
/dev/fd0 \device\floppy0
|
||||
/dev/fd1 \device\floppy1
|
||||
...
|
||||
/dev/fd15
|
||||
|
||||
/dev/sr0 \device\cdrom0
|
||||
/dev/sr1 \device\cdrom1
|
||||
...
|
||||
/dev/sr15
|
||||
|
||||
/dev/scd0 \device\cdrom0
|
||||
/dev/scd1 \device\cdrom1
|
||||
...
|
||||
/dev/scd15
|
||||
|
||||
/dev/sda \device\harddisk0\partition0 (whole disk)
|
||||
/dev/sda1 \device\harddisk0\partition1 (first partition)
|
||||
...
|
||||
/dev/sda15 \device\harddisk0\partition15 (fifteenth partition)
|
||||
|
||||
/dev/sdb \device\harddisk1\partition0
|
||||
/dev/sdb1 \device\harddisk1\partition1
|
||||
|
||||
[up to]
|
||||
|
||||
/dev/sddx \device\harddisk127\partition0
|
||||
/dev/sddx1 \device\harddisk127\partition1
|
||||
...
|
||||
/dev/sddx15 \device\harddisk127\partition15
|
||||
</screen>
|
||||
|
||||
<para>
|
||||
if you don't like these device names, feel free to create symbolic
|
||||
links as they are created on Linux systems for convenience:
|
||||
</para>
|
||||
|
||||
<screen>
|
||||
ln -s /dev/sr0 /dev/cdrom
|
||||
ln -s /dev/nst0 /dev/tape
|
||||
...
|
||||
</screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="pathnames-exe"><title>The .exe extension</title>
|
||||
|
||||
<para>Win32 executable filenames end with <filename>.exe</filename>
|
||||
but the <filename>.exe</filename> need not be included in the command,
|
||||
so that traditional UNIX names can be used. However, for programs that
|
||||
end in <filename>.bat</filename> and <filename>.com</filename>, you
|
||||
cannot omit the extension. </para>
|
||||
|
||||
<para>As a side effect, the <command> ls filename</command> gives
|
||||
information about <filename>filename.exe</filename> if
|
||||
<filename>filename.exe</filename> exists and <filename>filename</filename>
|
||||
does not. In the same situation the function call
|
||||
<function>stat("filename",..)</function> gives information about
|
||||
<filename>filename.exe</filename>. The two files can be distinguished
|
||||
by examining their inodes, as demonstrated below.
|
||||
<screen>
|
||||
<prompt>bash$</prompt> <userinput>ls * </userinput>
|
||||
a a.exe b.exe
|
||||
<prompt>bash$</prompt> <userinput>ls -i a a.exe</userinput>
|
||||
445885548 a 435996602 a.exe
|
||||
<prompt>bash$</prompt> <userinput>ls -i b b.exe</userinput>
|
||||
432961010 b 432961010 b.exe
|
||||
</screen>
|
||||
If a shell script <filename>myprog</filename> and a program
|
||||
<filename>myprog.exe</filename> coexist in a directory, the shell
|
||||
script has precedence and is selected for execution of
|
||||
<command>myprog</command>. Note that this was quite the reverse up to
|
||||
Cygwin 1.5.19. It has been changed for consistency with the rest of Cygwin.
|
||||
</para>
|
||||
|
||||
<para>The <command>gcc</command> compiler produces an executable named
|
||||
<filename>filename.exe</filename> when asked to produce
|
||||
<filename>filename</filename>. This allows many makefiles written
|
||||
for UNIX systems to work well under Cygwin.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="pathnames-proc"><title>The /proc filesystem</title>
|
||||
<para>
|
||||
Cygwin, like Linux and other similar operating systems, supports the
|
||||
<filename>/proc</filename> virtual filesystem. The files in this
|
||||
directory are representations of various aspects of your system,
|
||||
for example the command <userinput>cat /proc/cpuinfo</userinput>
|
||||
displays information such as what model and speed processor you have.
|
||||
</para>
|
||||
<para>
|
||||
One unique aspect of the Cygwin <filename>/proc</filename> filesystem
|
||||
is <filename>/proc/registry</filename>, see next section.
|
||||
</para>
|
||||
<para>
|
||||
The Cygwin <filename>/proc</filename> is not as complete as the
|
||||
one in Linux, but it provides significant capabilities. The
|
||||
<systemitem>procps</systemitem> package contains several utilities
|
||||
that use it.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="pathnames-proc-registry"><title>The /proc/registry filesystem</title>
|
||||
<para>
|
||||
The <filename>/proc/registry</filename> filesystem provides read-only
|
||||
access to the Windows registry. It displays each <literal>KEY</literal>
|
||||
as a directory and each <literal>VALUE</literal> as a file. As anytime
|
||||
you deal with the Windows registry, use caution since changes may result
|
||||
in an unstable or broken system. There are additionally subdirectories called
|
||||
<filename>/proc/registry32</filename> and <filename>/proc/registry64</filename>.
|
||||
They are identical to <filename>/proc/registry</filename> on 32 bit
|
||||
host OSes. On 64 bit host OSes, <filename>/proc/registry32</filename>
|
||||
opens the 32 bit processes view on the registry, while
|
||||
<filename>/proc/registry64</filename> opens the 64 bit processes view.
|
||||
</para>
|
||||
<para>
|
||||
Reserved characters ('/', '\', ':', and '%') or reserved names
|
||||
(<filename>.</filename> and <filename>..</filename>) are converted by
|
||||
percent-encoding:
|
||||
<screen>
|
||||
<prompt>bash$</prompt> <userinput>regtool list -v '\HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices'</userinput>
|
||||
...
|
||||
\DosDevices\C: (REG_BINARY) = cf a8 97 e8 00 08 fe f7
|
||||
...
|
||||
<prompt>bash$</prompt> <userinput>cd /proc/registry/HKEY_LOCAL_MACHINE/SYSTEM</userinput>
|
||||
<prompt>bash$</prompt> <userinput>ls -l MountedDevices</userinput>
|
||||
...
|
||||
-r--r----- 1 Admin SYSTEM 12 Dec 10 11:20 %5CDosDevices%5CC%3A
|
||||
...
|
||||
<prompt>bash$</prompt> <userinput>od -t x1 MountedDevices/%5CDosDevices%5CC%3A</userinput>
|
||||
0000000 cf a8 97 e8 00 08 fe f7 01 00 00 00
|
||||
</screen>
|
||||
The unnamed (default) value of a key can be accessed using the filename
|
||||
<filename>@</filename>.
|
||||
</para>
|
||||
<para>
|
||||
If a registry key contains a subkey and a value with the same name
|
||||
<filename>foo</filename>, Cygwin displays the subkey as
|
||||
<filename>foo</filename> and the value as <filename>foo%val</filename>.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="pathnames-at"><title>The @pathnames</title>
|
||||
<para>To circumvent the limitations on shell line length in the native
|
||||
Windows command shells, Cygwin programs, when invoked by non-Cygwin processes, expand their arguments
|
||||
starting with "@" in a special way. If a file
|
||||
<filename>pathname</filename> exists, the argument
|
||||
<filename>@pathname</filename> expands recursively to the content of
|
||||
<filename>pathname</filename>. Double quotes can be used inside the
|
||||
file to delimit strings containing blank space.
|
||||
In the following example compare the behaviors
|
||||
<command>/bin/echo</command> when run from bash and from the Windows command prompt.</para>
|
||||
|
||||
<example id="pathnames-at-ex"><title> Using @pathname</title>
|
||||
<screen>
|
||||
<prompt>bash$</prompt> <userinput>/bin/echo 'This is "a long" line' > mylist</userinput>
|
||||
<prompt>bash$</prompt> <userinput>/bin/echo @mylist</userinput>
|
||||
@mylist
|
||||
<prompt>bash$</prompt> <userinput>cmd</userinput>
|
||||
<prompt>c:\></prompt> <userinput>c:\cygwin\bin\echo @mylist</userinput>
|
||||
This is a long line
|
||||
</screen>
|
||||
</example>
|
||||
</sect2>
|
||||
</sect1>
|
@ -1,11 +0,0 @@
|
||||
<chapter id="programming"><title>Programming with Cygwin</title>
|
||||
|
||||
DOCTOOL-INSERT-gcc
|
||||
|
||||
DOCTOOL-INSERT-gdb
|
||||
|
||||
DOCTOOL-INSERT-dll
|
||||
|
||||
DOCTOOL-INSERT-windres
|
||||
|
||||
</chapter>
|
12
winsup/doc/programming.xml
Normal file
12
winsup/doc/programming.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<chapter id="programming" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<title>Programming with Cygwin</title>
|
||||
|
||||
<xi:include href="gcc.xml"/>
|
||||
<xi:include href="gdb.xml"/>
|
||||
<xi:include href="dll.xml"/>
|
||||
<xi:include href="windres.xml"/>
|
||||
</chapter>
|
129
winsup/doc/setup-env.xml
Normal file
129
winsup/doc/setup-env.xml
Normal file
@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<sect1 id="setup-env"><title>Environment Variables</title>
|
||||
|
||||
<sect2 id="setup-env-ov"><title>Overview</title>
|
||||
|
||||
<para>
|
||||
All Windows environment variables are imported when Cygwin starts.
|
||||
Apart from that, you may wish to specify settings of several important
|
||||
environment variables that affect Cygwin's operation.</para>
|
||||
|
||||
<para>
|
||||
The <envar>CYGWIN</envar> variable is used to configure a few global
|
||||
settings for the Cygwin runtime system. Typically you can leave
|
||||
<envar>CYGWIN</envar> unset, but if you want to set one ore more
|
||||
options, you can set it using a syntax like this, depending on the shell
|
||||
in which you're setting it. Here is an example in CMD syntax:</para>
|
||||
|
||||
<screen>
|
||||
<prompt>C:\></prompt> <userinput>set CYGWIN=error_start:C:\cygwin\bin\gdb.exe glob</userinput>
|
||||
</screen>
|
||||
|
||||
<para>
|
||||
This is, of course, just an example. For the recognized settings of the
|
||||
<envar>CYGWIN</envar> environment variable, see
|
||||
<xref linkend="using-cygwinenv"></xref>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Locale support is controlled by the <envar>LANG</envar> and
|
||||
<envar>LC_xxx</envar> environment variables. Since Cygwin 1.7.2, all of
|
||||
them are honored and have a meaning. For a more detailed description see
|
||||
<xref linkend="setup-locale"></xref>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <envar>PATH</envar> environment variable is used by Cygwin
|
||||
applications as a list of directories to search for executable files
|
||||
to run. This environment variable is converted from Windows format
|
||||
(e.g. <filename>C:\Windows\system32;C:\Windows</filename>) to UNIX format
|
||||
(e.g., <filename>/cygdrive/c/Windows/system32:/cygdrive/c/Windows</filename>)
|
||||
when a Cygwin process first starts.
|
||||
Set it so that it contains at least the <filename>x:\cygwin\bin</filename>
|
||||
directory where "<filename>x:\cygwin</filename> is the "root" of your
|
||||
cygwin installation if you wish to use cygwin tools outside of bash.
|
||||
This is usually done by the batch file you're starting your shell with.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <envar>HOME</envar> environment variable is used by many programs to
|
||||
determine the location of your home directory and we recommend that it be
|
||||
defined. This environment variable is also converted from Windows format
|
||||
when a Cygwin process first starts. It's usually set in the shell
|
||||
profile scripts in the /etc directory.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <envar>TERM</envar> environment variable specifies your terminal
|
||||
type. It is automatically set to <literal>cygwin</literal> if you have
|
||||
not set it to something else.
|
||||
</para>
|
||||
|
||||
<para>The <envar>LD_LIBRARY_PATH</envar> environment variable is used by
|
||||
the Cygwin function <function>dlopen ()</function> as a list of
|
||||
directories to search for .dll files to load. This environment variable
|
||||
is converted from Windows format to UNIX format when a Cygwin process
|
||||
first starts. Most Cygwin applications do not make use of the
|
||||
<function>dlopen ()</function> call and do not need this variable.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In addition to <envar>PATH</envar>, <envar>HOME</envar>,
|
||||
and <envar>LD_LIBRARY_PATH</envar>, there are three other environment
|
||||
variables which, if they exist in the Windows environment, are
|
||||
converted to UNIX format: <envar>TMPDIR</envar>, <envar>TMP</envar>,
|
||||
and <envar>TEMP</envar>. The first is not set by default in the
|
||||
Windows environment but the other two are, and they point to the
|
||||
default Windows temporary directory. If set, these variables will be
|
||||
used by some Cygwin applications, possibly with unexpected results.
|
||||
You may therefore want to unset them by adding the following two lines
|
||||
to your <filename>~/.bashrc</filename> file:
|
||||
|
||||
<screen>
|
||||
unset TMP
|
||||
unset TEMP
|
||||
</screen>
|
||||
|
||||
This is done in the default <filename>~/.bashrc</filename> file.
|
||||
Alternatively, you could set <envar>TMP</envar>
|
||||
and <envar>TEMP</envar> to point to <filename>/tmp</filename> or to
|
||||
any other temporary directory of your choice. For example:
|
||||
|
||||
<screen>
|
||||
export TMP=/tmp
|
||||
export TEMP=/tmp
|
||||
</screen>
|
||||
</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="setup-env-win32"><title>Restricted Win32 environment</title>
|
||||
|
||||
<para>There is a restriction when calling Win32 API functions which
|
||||
require a fully set up application environment. Cygwin maintains its own
|
||||
environment in POSIX style. The Win32 environment is usually stripped
|
||||
to a bare minimum and not at all kept in sync with the Cygwin POSIX
|
||||
environment.</para>
|
||||
|
||||
<para>If you need the full Win32 environment set up in a Cygwin process,
|
||||
you have to call</para>
|
||||
|
||||
<screen>
|
||||
#include <sys/cygwin.h>
|
||||
|
||||
cygwin_internal (CW_SYNC_WINENV);
|
||||
</screen>
|
||||
|
||||
<para>to synchronize the Win32 environment with the Cygwin environment.
|
||||
Note that this only synchronizes the Win32 environment once with the
|
||||
Cygwin environment. Later changes using the <function>setenv</function>
|
||||
or <function>putenv</function> calls are not reflected in the Win32
|
||||
environment. In these cases, you have to call the aforementioned
|
||||
<function>cygwin_internal</function> call again.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
85
winsup/doc/setup-files.xml
Normal file
85
winsup/doc/setup-files.xml
Normal file
@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<sect1 id="setup-files"><title>Customizing bash</title>
|
||||
|
||||
<para>
|
||||
To set up bash so that cut and paste work properly, click on the
|
||||
"Properties" button of the window, then on the "Misc" tab. Make sure
|
||||
that "QuickEdit mode" and "Insert mode" are checked. These settings
|
||||
will be remembered next time you run bash from that shortcut. Similarly
|
||||
you can set the working directory inside the "Program" tab. The entry
|
||||
"%HOME%" is valid, but requires that you set <envar>HOME</envar> in
|
||||
the Windows environment.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Your home directory should contain three initialization files
|
||||
that control the behavior of bash. They are
|
||||
<filename>.profile</filename>, <filename>.bashrc</filename> and
|
||||
<filename>.inputrc</filename>. The Cygwin base installation creates
|
||||
stub files when you start bash for the first time.</para>
|
||||
|
||||
<para>
|
||||
<filename>.profile</filename> (other names are also valid, see the bash man
|
||||
page) contains bash commands. It is executed when bash is started as login
|
||||
shell, e.g. from the command <command>bash --login</command>.
|
||||
This is a useful place to define and
|
||||
export environment variables and bash functions that will be used by bash
|
||||
and the programs invoked by bash. It is a good place to redefine
|
||||
<envar>PATH</envar> if needed. We recommend adding a ":." to the end of
|
||||
<envar>PATH</envar> to also search the current working directory (contrary
|
||||
to DOS, the local directory is not searched by default). Also to avoid
|
||||
delays you should either <command>unset</command> <envar>MAILCHECK</envar>
|
||||
or define <envar>MAILPATH</envar> to point to your existing mail inbox.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<filename>.bashrc</filename> is similar to
|
||||
<filename>.profile</filename> but is executed each time an interactive
|
||||
bash shell is launched. It serves to define elements that are not
|
||||
inherited through the environment, such as aliases. If you do not use
|
||||
login shells, you may want to put the contents of
|
||||
<filename>.profile</filename> as discussed above in this file
|
||||
instead.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<screen>
|
||||
shopt -s nocaseglob
|
||||
</screen>
|
||||
will allow bash to glob filenames in a case-insensitive manner.
|
||||
Note that <filename>.bashrc</filename> is not called automatically for login
|
||||
shells. You can source it from <filename>.profile</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<filename>.inputrc</filename> controls how programs using the readline
|
||||
library (including <command>bash</command>) behave. It is loaded
|
||||
automatically. For full details see the <literal>Function and Variable
|
||||
Index</literal> section of the GNU <systemitem>readline</systemitem> manual.
|
||||
Consider the following settings:
|
||||
<screen>
|
||||
# Ignore case while completing
|
||||
set completion-ignore-case on
|
||||
# Make Bash 8bit clean
|
||||
set meta-flag on
|
||||
set convert-meta off
|
||||
set output-meta on
|
||||
</screen>
|
||||
The first command makes filename completion case insensitive, which can
|
||||
be convenient in a Windows environment. The next three commands allow
|
||||
<command>bash</command> to display 8-bit characters, useful for
|
||||
languages with accented characters. Note that tools that do not use
|
||||
<systemitem>readline</systemitem> for display, such as
|
||||
<command>less</command> and <command>ls</command>, require additional
|
||||
settings, which could be put in your <filename>.bashrc</filename>:
|
||||
<screen>
|
||||
alias less='/bin/less -r'
|
||||
alias ls='/bin/ls -F --color=tty --show-control-chars'
|
||||
</screen>
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
|
@ -1,191 +1,6 @@
|
||||
<sect1 id="setup-env"><title>Environment Variables</title>
|
||||
|
||||
<sect2 id="setup-env-ov"><title>Overview</title>
|
||||
|
||||
<para>
|
||||
All Windows environment variables are imported when Cygwin starts.
|
||||
Apart from that, you may wish to specify settings of several important
|
||||
environment variables that affect Cygwin's operation.</para>
|
||||
|
||||
<para>
|
||||
The <envar>CYGWIN</envar> variable is used to configure a few global
|
||||
settings for the Cygwin runtime system. Typically you can leave
|
||||
<envar>CYGWIN</envar> unset, but if you want to set one ore more
|
||||
options, you can set it using a syntax like this, depending on the shell
|
||||
in which you're setting it. Here is an example in CMD syntax:</para>
|
||||
|
||||
<screen>
|
||||
<prompt>C:\></prompt> <userinput>set CYGWIN=error_start:C:\cygwin\bin\gdb.exe glob</userinput>
|
||||
</screen>
|
||||
|
||||
<para>
|
||||
This is, of course, just an example. For the recognized settings of the
|
||||
<envar>CYGWIN</envar> environment variable, see
|
||||
<xref linkend="using-cygwinenv"></xref>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Locale support is controlled by the <envar>LANG</envar> and
|
||||
<envar>LC_xxx</envar> environment variables. Since Cygwin 1.7.2, all of
|
||||
them are honored and have a meaning. For a more detailed description see
|
||||
<xref linkend="setup-locale"></xref>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <envar>PATH</envar> environment variable is used by Cygwin
|
||||
applications as a list of directories to search for executable files
|
||||
to run. This environment variable is converted from Windows format
|
||||
(e.g. <filename>C:\Windows\system32;C:\Windows</filename>) to UNIX format
|
||||
(e.g., <filename>/cygdrive/c/Windows/system32:/cygdrive/c/Windows</filename>)
|
||||
when a Cygwin process first starts.
|
||||
Set it so that it contains at least the <filename>x:\cygwin\bin</filename>
|
||||
directory where "<filename>x:\cygwin</filename> is the "root" of your
|
||||
cygwin installation if you wish to use cygwin tools outside of bash.
|
||||
This is usually done by the batch file you're starting your shell with.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <envar>HOME</envar> environment variable is used by many programs to
|
||||
determine the location of your home directory and we recommend that it be
|
||||
defined. This environment variable is also converted from Windows format
|
||||
when a Cygwin process first starts. It's usually set in the shell
|
||||
profile scripts in the /etc directory.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <envar>TERM</envar> environment variable specifies your terminal
|
||||
type. It is automatically set to <literal>cygwin</literal> if you have
|
||||
not set it to something else.
|
||||
</para>
|
||||
|
||||
<para>The <envar>LD_LIBRARY_PATH</envar> environment variable is used by
|
||||
the Cygwin function <function>dlopen ()</function> as a list of
|
||||
directories to search for .dll files to load. This environment variable
|
||||
is converted from Windows format to UNIX format when a Cygwin process
|
||||
first starts. Most Cygwin applications do not make use of the
|
||||
<function>dlopen ()</function> call and do not need this variable.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In addition to <envar>PATH</envar>, <envar>HOME</envar>,
|
||||
and <envar>LD_LIBRARY_PATH</envar>, there are three other environment
|
||||
variables which, if they exist in the Windows environment, are
|
||||
converted to UNIX format: <envar>TMPDIR</envar>, <envar>TMP</envar>,
|
||||
and <envar>TEMP</envar>. The first is not set by default in the
|
||||
Windows environment but the other two are, and they point to the
|
||||
default Windows temporary directory. If set, these variables will be
|
||||
used by some Cygwin applications, possibly with unexpected results.
|
||||
You may therefore want to unset them by adding the following two lines
|
||||
to your <filename>~/.bashrc</filename> file:
|
||||
|
||||
<screen>
|
||||
unset TMP
|
||||
unset TEMP
|
||||
</screen>
|
||||
|
||||
This is done in the default <filename>~/.bashrc</filename> file.
|
||||
Alternatively, you could set <envar>TMP</envar>
|
||||
and <envar>TEMP</envar> to point to <filename>/tmp</filename> or to
|
||||
any other temporary directory of your choice. For example:
|
||||
|
||||
<screen>
|
||||
export TMP=/tmp
|
||||
export TEMP=/tmp
|
||||
</screen>
|
||||
</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="setup-env-win32"><title>Restricted Win32 environment</title>
|
||||
|
||||
<para>There is a restriction when calling Win32 API functions which
|
||||
require a fully set up application environment. Cygwin maintains its own
|
||||
environment in POSIX style. The Win32 environment is usually stripped
|
||||
to a bare minimum and not at all kept in sync with the Cygwin POSIX
|
||||
environment.</para>
|
||||
|
||||
<para>If you need the full Win32 environment set up in a Cygwin process,
|
||||
you have to call</para>
|
||||
|
||||
<screen>
|
||||
#include <sys/cygwin.h>
|
||||
|
||||
cygwin_internal (CW_SYNC_WINENV);
|
||||
</screen>
|
||||
|
||||
<para>to synchronize the Win32 environment with the Cygwin environment.
|
||||
Note that this only synchronizes the Win32 environment once with the
|
||||
Cygwin environment. Later changes using the <function>setenv</function>
|
||||
or <function>putenv</function> calls are not reflected in the Win32
|
||||
environment. In these cases, you have to call the aforementioned
|
||||
<function>cygwin_internal</function> call again.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="setup-maxmem"><title>Changing Cygwin's Maximum Memory</title>
|
||||
|
||||
<para>
|
||||
Cygwin's heap is extensible. However, it does start out at a fixed size
|
||||
and attempts to extend it may run into memory which has been previously
|
||||
allocated by Windows. In some cases, this problem can be solved by
|
||||
changing a field in the file header which is utilized by Cygwin since
|
||||
version 1.7.10 to keep the initial size of the application heap. If the
|
||||
field contains 0, which is the default, the application heap defaults to
|
||||
a size of 384 Megabyte. If the field is set to any other value between 4 and
|
||||
2048, Cygwin tries to reserve as much Megabytes for the application heap.
|
||||
The field used for this is the "LoaderFlags" field in the NT-specific
|
||||
PE header structure (<literal>(IMAGE_NT_HEADER)->OptionalHeader.LoaderFlags</literal>).</para>
|
||||
|
||||
<para>
|
||||
This value can be changed for any executable by using a more recent version
|
||||
of the <command>peflags</command> tool from the <literal>rebase</literal>
|
||||
Cygwin package. Example:
|
||||
|
||||
<screen>
|
||||
$ peflags --cygwin-heap foo.exe
|
||||
foo.exe: initial Cygwin heap size: 0 (0x0) MB
|
||||
$ peflags --cygwin-heap=500 foo.exe
|
||||
foo.exe: initial Cygwin heap size: 500 (0x1f4) MB
|
||||
</screen>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Heap memory can be allocated up to the size of the biggest available free
|
||||
block in the processes virtual memory (VM). By default, the VM per process
|
||||
is 2 GB for 32 processes. To get more VM for a process, the executable
|
||||
must have the "large address aware" flag set in the file header. You can
|
||||
use the aforementioned <command>peflags</command> tool to set this flag.
|
||||
On 64 bit systems this results in a 4 GB VM for a process started from that
|
||||
executable. On 32 bit systems you also have to prepare the system to allow
|
||||
up to 3 GB per process. See the Microsoft article
|
||||
<ulink url="http://msdn.microsoft.com/en-us/library/bb613473%28VS.85%29.aspx">4-Gigabyte Tuning</ulink>
|
||||
for more information.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
Older Cygwin releases only supported a global registry setting to
|
||||
change the initial heap size for all Cygwin processes. This setting is
|
||||
not used anymore. However, if you're running an older Cygwin release
|
||||
than 1.7.10, you can add the <literal>DWORD</literal> value
|
||||
<literal>heap_chunk_in_mb</literal> and set it to the desired memory limit
|
||||
in decimal MB. You have to stop all Cygwin processes for this setting to
|
||||
have any effect. It is preferred to do this in Cygwin using the
|
||||
<command>regtool</command> program included in the Cygwin package.
|
||||
(see <xref linkend="regtool"></xref>) This example sets the memory limit
|
||||
to 1024 MB for all Cygwin processes (use HKCU instead of HKLM if you
|
||||
want to set this only for the current user):
|
||||
|
||||
<screen>
|
||||
$ regtool -i set /HKLM/Software/Cygwin/heap_chunk_in_mb 1024
|
||||
$ regtool -v list /HKLM/Software/Cygwin
|
||||
</screen>
|
||||
</para>
|
||||
</note>
|
||||
|
||||
</sect1>
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<sect1 id="setup-locale"><title>Internationalization</title>
|
||||
|
||||
@ -615,85 +430,3 @@ of the "CPxxx" style charsets, always use them with the trailing "CP".</para>
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="setup-files"><title>Customizing bash</title>
|
||||
|
||||
<para>
|
||||
To set up bash so that cut and paste work properly, click on the
|
||||
"Properties" button of the window, then on the "Misc" tab. Make sure
|
||||
that "QuickEdit mode" and "Insert mode" are checked. These settings
|
||||
will be remembered next time you run bash from that shortcut. Similarly
|
||||
you can set the working directory inside the "Program" tab. The entry
|
||||
"%HOME%" is valid, but requires that you set <envar>HOME</envar> in
|
||||
the Windows environment.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Your home directory should contain three initialization files
|
||||
that control the behavior of bash. They are
|
||||
<filename>.profile</filename>, <filename>.bashrc</filename> and
|
||||
<filename>.inputrc</filename>. The Cygwin base installation creates
|
||||
stub files when you start bash for the first time.</para>
|
||||
|
||||
<para>
|
||||
<filename>.profile</filename> (other names are also valid, see the bash man
|
||||
page) contains bash commands. It is executed when bash is started as login
|
||||
shell, e.g. from the command <command>bash --login</command>.
|
||||
This is a useful place to define and
|
||||
export environment variables and bash functions that will be used by bash
|
||||
and the programs invoked by bash. It is a good place to redefine
|
||||
<envar>PATH</envar> if needed. We recommend adding a ":." to the end of
|
||||
<envar>PATH</envar> to also search the current working directory (contrary
|
||||
to DOS, the local directory is not searched by default). Also to avoid
|
||||
delays you should either <command>unset</command> <envar>MAILCHECK</envar>
|
||||
or define <envar>MAILPATH</envar> to point to your existing mail inbox.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<filename>.bashrc</filename> is similar to
|
||||
<filename>.profile</filename> but is executed each time an interactive
|
||||
bash shell is launched. It serves to define elements that are not
|
||||
inherited through the environment, such as aliases. If you do not use
|
||||
login shells, you may want to put the contents of
|
||||
<filename>.profile</filename> as discussed above in this file
|
||||
instead.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<screen>
|
||||
shopt -s nocaseglob
|
||||
</screen>
|
||||
will allow bash to glob filenames in a case-insensitive manner.
|
||||
Note that <filename>.bashrc</filename> is not called automatically for login
|
||||
shells. You can source it from <filename>.profile</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<filename>.inputrc</filename> controls how programs using the readline
|
||||
library (including <command>bash</command>) behave. It is loaded
|
||||
automatically. For full details see the <literal>Function and Variable
|
||||
Index</literal> section of the GNU <systemitem>readline</systemitem> manual.
|
||||
Consider the following settings:
|
||||
<screen>
|
||||
# Ignore case while completing
|
||||
set completion-ignore-case on
|
||||
# Make Bash 8bit clean
|
||||
set meta-flag on
|
||||
set convert-meta off
|
||||
set output-meta on
|
||||
</screen>
|
||||
The first command makes filename completion case insensitive, which can
|
||||
be convenient in a Windows environment. The next three commands allow
|
||||
<command>bash</command> to display 8-bit characters, useful for
|
||||
languages with accented characters. Note that tools that do not use
|
||||
<systemitem>readline</systemitem> for display, such as
|
||||
<command>less</command> and <command>ls</command>, require additional
|
||||
settings, which could be put in your <filename>.bashrc</filename>:
|
||||
<screen>
|
||||
alias less='/bin/less -r'
|
||||
alias ls='/bin/ls -F --color=tty --show-control-chars'
|
||||
</screen>
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
|
66
winsup/doc/setup-maxmem.xml
Normal file
66
winsup/doc/setup-maxmem.xml
Normal file
@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<sect1 id="setup-maxmem"><title>Changing Cygwin's Maximum Memory</title>
|
||||
|
||||
<para>
|
||||
Cygwin's heap is extensible. However, it does start out at a fixed size
|
||||
and attempts to extend it may run into memory which has been previously
|
||||
allocated by Windows. In some cases, this problem can be solved by
|
||||
changing a field in the file header which is utilized by Cygwin since
|
||||
version 1.7.10 to keep the initial size of the application heap. If the
|
||||
field contains 0, which is the default, the application heap defaults to
|
||||
a size of 384 Megabyte. If the field is set to any other value between 4 and
|
||||
2048, Cygwin tries to reserve as much Megabytes for the application heap.
|
||||
The field used for this is the "LoaderFlags" field in the NT-specific
|
||||
PE header structure (<literal>(IMAGE_NT_HEADER)->OptionalHeader.LoaderFlags</literal>).</para>
|
||||
|
||||
<para>
|
||||
This value can be changed for any executable by using a more recent version
|
||||
of the <command>peflags</command> tool from the <literal>rebase</literal>
|
||||
Cygwin package. Example:
|
||||
|
||||
<screen>
|
||||
$ peflags --cygwin-heap foo.exe
|
||||
foo.exe: initial Cygwin heap size: 0 (0x0) MB
|
||||
$ peflags --cygwin-heap=500 foo.exe
|
||||
foo.exe: initial Cygwin heap size: 500 (0x1f4) MB
|
||||
</screen>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Heap memory can be allocated up to the size of the biggest available free
|
||||
block in the processes virtual memory (VM). By default, the VM per process
|
||||
is 2 GB for 32 processes. To get more VM for a process, the executable
|
||||
must have the "large address aware" flag set in the file header. You can
|
||||
use the aforementioned <command>peflags</command> tool to set this flag.
|
||||
On 64 bit systems this results in a 4 GB VM for a process started from that
|
||||
executable. On 32 bit systems you also have to prepare the system to allow
|
||||
up to 3 GB per process. See the Microsoft article
|
||||
<ulink url="http://msdn.microsoft.com/en-us/library/bb613473%28VS.85%29.aspx">4-Gigabyte Tuning</ulink>
|
||||
for more information.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
Older Cygwin releases only supported a global registry setting to
|
||||
change the initial heap size for all Cygwin processes. This setting is
|
||||
not used anymore. However, if you're running an older Cygwin release
|
||||
than 1.7.10, you can add the <literal>DWORD</literal> value
|
||||
<literal>heap_chunk_in_mb</literal> and set it to the desired memory limit
|
||||
in decimal MB. You have to stop all Cygwin processes for this setting to
|
||||
have any effect. It is preferred to do this in Cygwin using the
|
||||
<command>regtool</command> program included in the Cygwin package.
|
||||
(see <xref linkend="regtool"></xref>) This example sets the memory limit
|
||||
to 1024 MB for all Cygwin processes (use HKCU instead of HKLM if you
|
||||
want to set this only for the current user):
|
||||
|
||||
<screen>
|
||||
$ regtool -i set /HKLM/Software/Cygwin/heap_chunk_in_mb 1024
|
||||
$ regtool -v list /HKLM/Software/Cygwin
|
||||
</screen>
|
||||
</para>
|
||||
</note>
|
||||
|
||||
</sect1>
|
@ -1,4 +1,9 @@
|
||||
<chapter id="setup-net"><title>Setting Up Cygwin</title>
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<chapter id="setup-net" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<title>Setting Up Cygwin</title>
|
||||
|
||||
<sect1 id="internet-setup">
|
||||
<title>Internet Setup</title>
|
||||
@ -257,8 +262,8 @@ Problems with Cygwin</ulink>.
|
||||
|
||||
</sect1>
|
||||
|
||||
DOCTOOL-INSERT-setup-env
|
||||
DOCTOOL-INSERT-setup-maxmem
|
||||
DOCTOOL-INSERT-setup-locale
|
||||
DOCTOOL-INSERT-setup-files
|
||||
<xi:include href="setup-env.xml"/>
|
||||
<xi:include href="setup-maxmem.xml"/>
|
||||
<xi:include href="setup-locale.xml"/>
|
||||
<xi:include href="setup-files.xml"/>
|
||||
</chapter>
|
@ -1,4 +1,9 @@
|
||||
<chapter id="setup"><title>Setting Up Cygwin</title>
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<chapter id="setup" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<title>Setting Up Cygwin</title>
|
||||
|
||||
<sect1><title>Cygwin Contents</title>
|
||||
|
||||
@ -39,9 +44,9 @@ via the "Add/Remove Programs" control panel.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
DOCTOOL-INSERT-setup-dir
|
||||
DOCTOOL-INSERT-setup-env
|
||||
DOCTOOL-INSERT-ntsec
|
||||
DOCTOOL-INSERT-setup-reg
|
||||
DOCTOOL-INSERT-setup-mount
|
||||
<xi:include href="setup-dir.xml"/>
|
||||
<xi:include href="setup-env.xml"/>
|
||||
<xi:include href="ntsec.xml"/>
|
||||
<xi:include href="setup-reg.xml"/>
|
||||
<xi:include href="setup-mount.xml"/>
|
||||
</chapter>
|
517
winsup/doc/specialnames.xml
Normal file
517
winsup/doc/specialnames.xml
Normal file
@ -0,0 +1,517 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<sect1 id="using-specialnames"><title>Special filenames</title>
|
||||
|
||||
<sect2 id="pathnames-etc"><title>Special files in /etc</title>
|
||||
|
||||
<para>Certain files in Cygwin's <filename>/etc</filename> directory are
|
||||
read by Cygwin before the mount table has been established. The list
|
||||
of files is</para>
|
||||
|
||||
<screen>
|
||||
/etc/fstab
|
||||
/etc/fstab.d/$USER
|
||||
/etc/passwd
|
||||
/etc/group
|
||||
</screen>
|
||||
|
||||
<para>These file are read using native Windows NT functions which have
|
||||
no notion of Cygwin symlinks or POSIX paths. For that reason
|
||||
there are a few requirements as far as <filename>/etc</filename> is
|
||||
concerned.</para>
|
||||
|
||||
<para>To access these files, the Cygwin DLL evaluates it's own full
|
||||
Windows path, strips off the innermost directory component and adds
|
||||
"\etc". Let's assume the Cygwin DLL is installed as
|
||||
<filename>C:\cygwin\bin\cygwin1.dll</filename>. First the DLL name as
|
||||
well as the innermost directory (<filename>bin</filename>) is stripped
|
||||
off: <filename>C:\cygwin\</filename>. Then "etc" and the filename to
|
||||
look for is attached: <filename>C:\cygwin\etc\fstab</filename>. So the
|
||||
/etc directory must be parallel to the directory in which the cygwin1.dll
|
||||
exists and <filename>/etc</filename> must not be a Cygwin symlink
|
||||
pointing to another directory. Consequentially none of the files from
|
||||
the above list, including the directory <filename>/etc/fstab.d</filename>
|
||||
is allowed to be a Cygwin symlink either.</para>
|
||||
|
||||
<para>However, native NTFS symlinks and reparse points are transparent
|
||||
when accessing the above files so all these files as well as
|
||||
<filename>/etc</filename> itself may be NTFS symlinks or reparse
|
||||
points.</para>
|
||||
|
||||
<para>Last but not least, make sure that these files are world-readable.
|
||||
Every process of any user account has to read these files potentially,
|
||||
so world-readability is essential. The only exception are the user
|
||||
specific files <filename>/etc/fstab.d/$USER</filename>, which only have
|
||||
to be readable by the $USER user account itself.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="pathnames-dosdevices"><title>Invalid filenames</title>
|
||||
|
||||
<para>Filenames invalid under Win32 are not necessarily invalid
|
||||
under Cygwin since release 1.7.0. There are a few rules which
|
||||
apply to Windows filenames. Most notably, DOS device names like
|
||||
<filename>AUX</filename>, <filename>COM1</filename>,
|
||||
<filename>LPT1</filename> or <filename>PRN</filename> (to name a few)
|
||||
cannot be used as filename or extension in a native Win32 application.
|
||||
So filenames like <filename>prn.txt</filename> or <filename>foo.aux</filename>
|
||||
are invalid filenames for native Win32 applications.</para>
|
||||
|
||||
<para>This restriction doesn't apply to Cygwin applications. Cygwin
|
||||
can create and access files with such names just fine. Just don't try
|
||||
to use these files with native Win32 applications.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="pathnames-specialchars">
|
||||
<title>Forbidden characters in filenames</title>
|
||||
|
||||
<para>Some characters are disallowed in filenames on Windows filesystems.
|
||||
These forbidden characters are the ASCII control characters from ASCII
|
||||
value 1 to 31, plus the following characters which have a special meaning
|
||||
in the Win32 API:</para>
|
||||
|
||||
<screen>
|
||||
" * : < > ? | \
|
||||
</screen>
|
||||
|
||||
<para>Cygwin can't fix this, but it has a method to workaround this
|
||||
restriction. All of the above characters, except for the backslash,
|
||||
are converted to special UNICODE characters in the range 0xf000 to 0xf0ff
|
||||
(the "Private use area") when creating or accessing files.</para>
|
||||
|
||||
<para>The backslash has to be exempt from this conversion, because Cygwin
|
||||
accepts Win32 filenames including backslashes as path separators on input.
|
||||
Converting backslashes using the above method would make this impossible.</para>
|
||||
|
||||
<para>Additionally Win32 filenames can't contain trailing dots and spaces
|
||||
for DOS backward compatibility. When trying to create files with trailing
|
||||
dots or spaces, all of them are removed before the file is created. This
|
||||
restriction only affects native Win32 applications. Cygwin applications
|
||||
can create and access files with trailing dots and spaces without problems.
|
||||
</para>
|
||||
|
||||
<para>An exception from this rule are some network filesystems (NetApp,
|
||||
NWFS) which choke on these filenames. They return with an error like
|
||||
"No such file or directory" when trying to create such files. Starting
|
||||
with Cygwin 1.7.6, Cygwin recognizes these filesystems and works around
|
||||
this problem by applying the same rule as for the other forbidden characters.
|
||||
Leading spaces and trailing dots and spaces will be converted to UNICODE
|
||||
characters in the private use area. This behaviour can be switched on
|
||||
explicitely for a filesystem or a directory tree by using the mount option
|
||||
<literal>dos</literal>.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="pathnames-unusual">
|
||||
<title>Filenames with unusual (foreign) characters</title>
|
||||
|
||||
<para> Windows filesystems use Unicode encoded as UTF-16
|
||||
to store filename information. If you don't use the UTF-8
|
||||
character set (see <xref linkend="setup-locale"></xref>) then there's a
|
||||
chance that a filename is using one or more characters which have no
|
||||
representation in the character set you're using.</para>
|
||||
|
||||
<note><para>In the default "C" locale, Cygwin creates filenames using
|
||||
the UTF-8 charset. This will always result in some valid filename by
|
||||
default, but again might impose problems when switching to a non-"C"
|
||||
or non-"UTF-8" charset.</para></note>
|
||||
|
||||
<note><para>To avoid this scenario altogether, always use UTF-8 as the
|
||||
character set.</para></note>
|
||||
|
||||
<para>If you don't want or can't use UTF-8 as character set for whatever
|
||||
reason, you will nevertheless be able to access the file. How does that
|
||||
work? When Cygwin converts the filename from UTF-16 to your character
|
||||
set, it recognizes characters which can't be converted. If that occurs,
|
||||
Cygwin replaces the non-convertible character with a special character
|
||||
sequence. The sequence starts with an ASCII CAN character (hex code
|
||||
0x18, equivalent Control-X), followed by the UTF-8 representation of the
|
||||
character. The result is a filename containing some ugly looking
|
||||
characters. While it doesn't <emphasis role='bold'>look</emphasis> nice, it
|
||||
<emphasis role='bold'>is</emphasis> nice, because Cygwin knows how to convert
|
||||
this filename back to UTF-16. The filename will be converted using your
|
||||
usual character set. However, when Cygwin recognizes an ASCII CAN
|
||||
character, it skips over the ASCII CAN and handles the following bytes as
|
||||
a UTF-8 character. Thus, the filename is symmetrically converted back to
|
||||
UTF-16 and you can access the file.</para>
|
||||
|
||||
<note><para>Please be aware that this method is not entirely foolproof.
|
||||
In some character set combinations it might not work for certain native
|
||||
characters.</para>
|
||||
|
||||
<para>Only by using the UTF-8 charset you can avoid this problem safely.
|
||||
</para></note>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="pathnames-casesensitive">
|
||||
<title>Case sensitive filenames</title>
|
||||
|
||||
<para>In the Win32 subsystem filenames are only case-preserved, but not
|
||||
case-sensitive. You can't access two files in the same directory which
|
||||
only differ by case, like <filename>Abc</filename> and
|
||||
<filename>aBc</filename>. While NTFS (and some remote filesystems)
|
||||
support case-sensitivity, the NT kernel starting with Windows XP does
|
||||
not support it by default. Rather, you have to tweak a registry setting
|
||||
and reboot. For that reason, case-sensitivity can not be supported by Cygwin,
|
||||
unless you change that registry value.</para>
|
||||
|
||||
<para>If you really want case-sensitivity in Cygwin, you can switch it
|
||||
on by setting the registry value</para>
|
||||
|
||||
<screen>
|
||||
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\obcaseinsensitive
|
||||
</screen>
|
||||
|
||||
<para>to 0 and reboot the machine.</para>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
When installing Microsoft's Services For Unix (SFU), you're asked if
|
||||
you want to use case-sensitive filenames. If you answer "yes" at this point,
|
||||
the installer will change the aforementioned registry value to 0, too. So, if
|
||||
you have SFU installed, there's some chance that the registry value is already
|
||||
set to case sensitivity.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<para>After you set this registry value to 0, Cygwin will be case-sensitive
|
||||
by default on NTFS and NFS filesystems. However, there are limitations:
|
||||
while two <emphasis role='bold'>programs</emphasis> <filename>Abc.exe</filename>
|
||||
and <filename>aBc.exe</filename> can be created and accessed like other files,
|
||||
starting applications is still case-insensitive due to Windows limitations
|
||||
and so the program you try to launch may not be the one actually started. Also,
|
||||
be aware that using two filenames which only differ by case might
|
||||
result in some weird interoperability issues with native Win32 applications.
|
||||
You're using case-sensitivity at your own risk. You have been warned! </para>
|
||||
|
||||
<para>Even if you use case-sensitivity, it might be feasible to switch to
|
||||
case-insensitivity for certain paths for better interoperability with
|
||||
native Win32 applications (even if it's just Windows Explorer). You can do
|
||||
this on a per-mount point base, by using the "posix=0" mount option in
|
||||
<filename>/etc/fstab</filename>, or your <filename>/etc/fstab.d/$USER</filename>
|
||||
file.</para>
|
||||
|
||||
<para><filename>/cygdrive</filename> paths are case-insensitive by default.
|
||||
The reason is that the native Windows %PATH% environment variable is not
|
||||
always using the correct case for all paths in it. As a result, if you use
|
||||
case-sensitivity on the <filename>/cygdrive</filename> prefix, your shell
|
||||
might claim that it can't find Windows commands like <command>attrib</command>
|
||||
or <command>net</command>. To ease the pain, the <filename>/cygdrive</filename>
|
||||
path is case-insensitive by default and you have to use the "posix=1" setting
|
||||
explicitly in <filename>/etc/fstab</filename> or
|
||||
<filename>/etc/fstab.d/$USER</filename> to switch it to case-sensitivity,
|
||||
or you have to make sure that the native Win32 %PATH% environment variable
|
||||
is using the correct case for all paths throughout.</para>
|
||||
|
||||
<para>Note that mount points as well as device names and virtual
|
||||
paths like /proc are always case-sensitive! The only exception are
|
||||
the subdirectories and filenames under /proc/registry, /proc/registry32
|
||||
and /proc/registry64. Registry access is always case-insensitive.
|
||||
Read on for more information.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="pathnames-posixdevices"> <title>POSIX devices</title>
|
||||
<para>While there is no need to create a POSIX <filename>/dev</filename>
|
||||
directory, the directory is automatically created as part of a Cygwin
|
||||
installation. It's existence is often a prerequisit to run certain
|
||||
applications which create symbolic links, fifos, or UNIX sockets in
|
||||
<filename>/dev</filename>. Also, the directories <filename>/dev/shm</filename>
|
||||
and <filename>/dev/mqueue</filename> are required to exist to use named POSIX
|
||||
semaphores, shared memory, and message queues, so a system without a real
|
||||
<filename>/dev</filename> directory is functionally crippled.
|
||||
</para>
|
||||
|
||||
<para>Apart from that, Cygwin automatically simulates POSIX devices
|
||||
internally. Up to Cygwin 1.7.11, these devices couldn't be seen with the
|
||||
command <command>ls /dev/</command> although commands such as
|
||||
<command>ls /dev/tty</command> worked fine. Starting with Cygwin 1.7.12,
|
||||
the <filename>/dev</filename> directory is automagically populated with
|
||||
existing POSIX devices by Cygwin in a way comparable with a
|
||||
<ulink url="http://en.wikipedia.org/wiki/Udev">udev</ulink> based virtual
|
||||
<filename>/dev</filename> directory under Linux.</para>
|
||||
|
||||
<para>
|
||||
Cygwin supports the following character devices commonly found on POSIX systems:
|
||||
</para>
|
||||
|
||||
<screen>
|
||||
/dev/null
|
||||
/dev/zero
|
||||
/dev/full
|
||||
|
||||
/dev/console Pseudo device name for the current console window of a session.
|
||||
Up to Cygwin 1.7.9, this was the only name for a console.
|
||||
Different consoles were indistinguishable.
|
||||
Cygwin's /dev/console is not quite comparable with the console
|
||||
device on UNIX machines.
|
||||
|
||||
/dev/cons0 Starting with Cygwin 1.7.10, Console sessions are numbered from
|
||||
/dev/cons1 /dev/cons0 upwards. Console device names are pseudo device
|
||||
... names, only accessible from processes within this very console
|
||||
session. This is due to a restriction in Windows.
|
||||
|
||||
/dev/tty The current controlling tty of a session.
|
||||
|
||||
/dev/ptmx Pseudo tty master device.
|
||||
|
||||
/dev/pty0 Pseudo ttys are numbered from /dev/pty0 upwards as they are
|
||||
/dev/pty1 requested.
|
||||
...
|
||||
|
||||
/dev/ttyS0 Serial communication devices. ttyS0 == Win32 COM1,
|
||||
/dev/ttyS1 ttyS1 == COM2, etc.
|
||||
...
|
||||
|
||||
/dev/pipe
|
||||
/dev/fifo
|
||||
|
||||
/dev/mem The physical memory of the machine. Note that access to the
|
||||
/dev/port physical memory has been restricted with Windows Server 2003.
|
||||
/dev/kmem Since this OS, you can't access physical memory from user space.
|
||||
|
||||
/dev/kmsg Kernel message pipe, for usage with sys logger services.
|
||||
|
||||
/dev/random Random number generator.
|
||||
/dev/urandom
|
||||
|
||||
/dev/dsp Default sound device of the system.
|
||||
</screen>
|
||||
|
||||
<para>
|
||||
Cygwin also has several Windows-specific devices:
|
||||
</para>
|
||||
|
||||
<screen>
|
||||
/dev/com1 The serial ports, starting with COM1 which is the same as ttyS0.
|
||||
/dev/com2 Please use /dev/ttySx instead.
|
||||
...
|
||||
|
||||
/dev/conin Same as Windows CONIN$.
|
||||
/dev/conout Same as Windows CONOUT$.
|
||||
/dev/clipboard The Windows clipboard, text only
|
||||
/dev/windows The Windows message queue.
|
||||
</screen>
|
||||
|
||||
<para>
|
||||
Block devices are accessible by Cygwin processes using fixed POSIX device
|
||||
names. These POSIX device names are generated using a direct conversion
|
||||
from the POSIX namespace to the internal NT namespace.
|
||||
E.g. the first harddisk is the NT internal device \device\harddisk0\partition0
|
||||
or the first partition on the third harddisk is \device\harddisk2\partition1.
|
||||
The first floppy in the system is \device\floppy0, the first CD-ROM is
|
||||
\device\cdrom0 and the first tape drive is \device\tape0.</para>
|
||||
|
||||
<para>The mapping from physical device to the name of the device in the
|
||||
internal NT namespace can be found in various places. For hard disks and
|
||||
CD/DVD drives, the Windows "Disk Management" utility (part of the
|
||||
"Computer Management" console) shows that the mapping of "Disk 0" is
|
||||
\device\harddisk0. "CD-ROM 2" is \device\cdrom2. Another place to find
|
||||
this mapping is the "Device Management" console. Disks have a
|
||||
"Location" number, tapes have a "Tape Symbolic Name", etc.
|
||||
Unfortunately, the places where this information is found is not very
|
||||
well-defined.</para>
|
||||
|
||||
<para>
|
||||
For external disks (USB-drives, CF-cards in a cardreader, etc) you can use
|
||||
Cygwin to show the mapping. <filename>/proc/partitions</filename>
|
||||
contains a list of raw drives known to Cygwin. The <command>df</command>
|
||||
command shows a list of drives and their respective sizes. If you match
|
||||
the information between <filename>/proc/partitions</filename> and the
|
||||
<command>df</command> output, you should be able to figure out which
|
||||
external drive corresponds to which raw disk device name.</para>
|
||||
|
||||
<note><para>Apart from tape devices which are not block devices and are
|
||||
by default accessed directly, accessing mass storage devices raw
|
||||
is something you should only do if you know what you're doing and know how to
|
||||
handle the information. <emphasis role='bold'>Writing</emphasis> to a raw
|
||||
mass storage device you should only do if you
|
||||
<emphasis role='bold'>really</emphasis> know what you're doing and are aware
|
||||
of the fact that any mistake can destroy important information, for the
|
||||
device, and for you. So, please, handle this ability with care.
|
||||
<emphasis role='bold'>You have been warned.</emphasis></para></note>
|
||||
|
||||
<para>
|
||||
Last but not least, the mapping from POSIX /dev namespace to internal
|
||||
NT namespace is as follows:
|
||||
</para>
|
||||
|
||||
<screen>
|
||||
POSIX device name Internal NT device name
|
||||
|
||||
/dev/st0 \device\tape0, rewind
|
||||
/dev/nst0 \device\tape0, no-rewind
|
||||
/dev/st1 \device\tape1
|
||||
/dev/nst1 \device\tape1
|
||||
...
|
||||
/dev/st15
|
||||
/dev/nst15
|
||||
|
||||
/dev/fd0 \device\floppy0
|
||||
/dev/fd1 \device\floppy1
|
||||
...
|
||||
/dev/fd15
|
||||
|
||||
/dev/sr0 \device\cdrom0
|
||||
/dev/sr1 \device\cdrom1
|
||||
...
|
||||
/dev/sr15
|
||||
|
||||
/dev/scd0 \device\cdrom0
|
||||
/dev/scd1 \device\cdrom1
|
||||
...
|
||||
/dev/scd15
|
||||
|
||||
/dev/sda \device\harddisk0\partition0 (whole disk)
|
||||
/dev/sda1 \device\harddisk0\partition1 (first partition)
|
||||
...
|
||||
/dev/sda15 \device\harddisk0\partition15 (fifteenth partition)
|
||||
|
||||
/dev/sdb \device\harddisk1\partition0
|
||||
/dev/sdb1 \device\harddisk1\partition1
|
||||
|
||||
[up to]
|
||||
|
||||
/dev/sddx \device\harddisk127\partition0
|
||||
/dev/sddx1 \device\harddisk127\partition1
|
||||
...
|
||||
/dev/sddx15 \device\harddisk127\partition15
|
||||
</screen>
|
||||
|
||||
<para>
|
||||
if you don't like these device names, feel free to create symbolic
|
||||
links as they are created on Linux systems for convenience:
|
||||
</para>
|
||||
|
||||
<screen>
|
||||
ln -s /dev/sr0 /dev/cdrom
|
||||
ln -s /dev/nst0 /dev/tape
|
||||
...
|
||||
</screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="pathnames-exe"><title>The .exe extension</title>
|
||||
|
||||
<para>Win32 executable filenames end with <filename>.exe</filename>
|
||||
but the <filename>.exe</filename> need not be included in the command,
|
||||
so that traditional UNIX names can be used. However, for programs that
|
||||
end in <filename>.bat</filename> and <filename>.com</filename>, you
|
||||
cannot omit the extension. </para>
|
||||
|
||||
<para>As a side effect, the <command> ls filename</command> gives
|
||||
information about <filename>filename.exe</filename> if
|
||||
<filename>filename.exe</filename> exists and <filename>filename</filename>
|
||||
does not. In the same situation the function call
|
||||
<function>stat("filename",..)</function> gives information about
|
||||
<filename>filename.exe</filename>. The two files can be distinguished
|
||||
by examining their inodes, as demonstrated below.
|
||||
<screen>
|
||||
<prompt>bash$</prompt> <userinput>ls * </userinput>
|
||||
a a.exe b.exe
|
||||
<prompt>bash$</prompt> <userinput>ls -i a a.exe</userinput>
|
||||
445885548 a 435996602 a.exe
|
||||
<prompt>bash$</prompt> <userinput>ls -i b b.exe</userinput>
|
||||
432961010 b 432961010 b.exe
|
||||
</screen>
|
||||
If a shell script <filename>myprog</filename> and a program
|
||||
<filename>myprog.exe</filename> coexist in a directory, the shell
|
||||
script has precedence and is selected for execution of
|
||||
<command>myprog</command>. Note that this was quite the reverse up to
|
||||
Cygwin 1.5.19. It has been changed for consistency with the rest of Cygwin.
|
||||
</para>
|
||||
|
||||
<para>The <command>gcc</command> compiler produces an executable named
|
||||
<filename>filename.exe</filename> when asked to produce
|
||||
<filename>filename</filename>. This allows many makefiles written
|
||||
for UNIX systems to work well under Cygwin.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="pathnames-proc"><title>The /proc filesystem</title>
|
||||
<para>
|
||||
Cygwin, like Linux and other similar operating systems, supports the
|
||||
<filename>/proc</filename> virtual filesystem. The files in this
|
||||
directory are representations of various aspects of your system,
|
||||
for example the command <userinput>cat /proc/cpuinfo</userinput>
|
||||
displays information such as what model and speed processor you have.
|
||||
</para>
|
||||
<para>
|
||||
One unique aspect of the Cygwin <filename>/proc</filename> filesystem
|
||||
is <filename>/proc/registry</filename>, see next section.
|
||||
</para>
|
||||
<para>
|
||||
The Cygwin <filename>/proc</filename> is not as complete as the
|
||||
one in Linux, but it provides significant capabilities. The
|
||||
<systemitem>procps</systemitem> package contains several utilities
|
||||
that use it.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="pathnames-proc-registry"><title>The /proc/registry filesystem</title>
|
||||
<para>
|
||||
The <filename>/proc/registry</filename> filesystem provides read-only
|
||||
access to the Windows registry. It displays each <literal>KEY</literal>
|
||||
as a directory and each <literal>VALUE</literal> as a file. As anytime
|
||||
you deal with the Windows registry, use caution since changes may result
|
||||
in an unstable or broken system. There are additionally subdirectories called
|
||||
<filename>/proc/registry32</filename> and <filename>/proc/registry64</filename>.
|
||||
They are identical to <filename>/proc/registry</filename> on 32 bit
|
||||
host OSes. On 64 bit host OSes, <filename>/proc/registry32</filename>
|
||||
opens the 32 bit processes view on the registry, while
|
||||
<filename>/proc/registry64</filename> opens the 64 bit processes view.
|
||||
</para>
|
||||
<para>
|
||||
Reserved characters ('/', '\', ':', and '%') or reserved names
|
||||
(<filename>.</filename> and <filename>..</filename>) are converted by
|
||||
percent-encoding:
|
||||
<screen>
|
||||
<prompt>bash$</prompt> <userinput>regtool list -v '\HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices'</userinput>
|
||||
...
|
||||
\DosDevices\C: (REG_BINARY) = cf a8 97 e8 00 08 fe f7
|
||||
...
|
||||
<prompt>bash$</prompt> <userinput>cd /proc/registry/HKEY_LOCAL_MACHINE/SYSTEM</userinput>
|
||||
<prompt>bash$</prompt> <userinput>ls -l MountedDevices</userinput>
|
||||
...
|
||||
-r--r----- 1 Admin SYSTEM 12 Dec 10 11:20 %5CDosDevices%5CC%3A
|
||||
...
|
||||
<prompt>bash$</prompt> <userinput>od -t x1 MountedDevices/%5CDosDevices%5CC%3A</userinput>
|
||||
0000000 cf a8 97 e8 00 08 fe f7 01 00 00 00
|
||||
</screen>
|
||||
The unnamed (default) value of a key can be accessed using the filename
|
||||
<filename>@</filename>.
|
||||
</para>
|
||||
<para>
|
||||
If a registry key contains a subkey and a value with the same name
|
||||
<filename>foo</filename>, Cygwin displays the subkey as
|
||||
<filename>foo</filename> and the value as <filename>foo%val</filename>.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="pathnames-at"><title>The @pathnames</title>
|
||||
<para>To circumvent the limitations on shell line length in the native
|
||||
Windows command shells, Cygwin programs, when invoked by non-Cygwin processes, expand their arguments
|
||||
starting with "@" in a special way. If a file
|
||||
<filename>pathname</filename> exists, the argument
|
||||
<filename>@pathname</filename> expands recursively to the content of
|
||||
<filename>pathname</filename>. Double quotes can be used inside the
|
||||
file to delimit strings containing blank space.
|
||||
In the following example compare the behaviors
|
||||
<command>/bin/echo</command> when run from bash and from the Windows command prompt.</para>
|
||||
|
||||
<example id="pathnames-at-ex"><title> Using @pathname</title>
|
||||
<screen>
|
||||
<prompt>bash$</prompt> <userinput>/bin/echo 'This is "a long" line' > mylist</userinput>
|
||||
<prompt>bash$</prompt> <userinput>/bin/echo @mylist</userinput>
|
||||
@mylist
|
||||
<prompt>bash$</prompt> <userinput>cmd</userinput>
|
||||
<prompt>c:\></prompt> <userinput>c:\cygwin\bin\echo @mylist</userinput>
|
||||
This is a long line
|
||||
</screen>
|
||||
</example>
|
||||
</sect2>
|
||||
</sect1>
|
@ -1,3 +1,7 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<sect1 id="using-textbinary"><title>Text and Binary modes</title>
|
||||
|
||||
<sect2 id="textbin-issue"> <title>The Issue</title>
|
36
winsup/doc/ug-info.xml
Normal file
36
winsup/doc/ug-info.xml
Normal file
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<bookinfo xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<date>2001-22-03</date>
|
||||
<title>Cygwin User's Guide</title>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Joshua Daniel</firstname>
|
||||
<surname>Franklin</surname>
|
||||
</author>
|
||||
<author>
|
||||
<firstname>Corinna</firstname>
|
||||
<surname>Vinschen</surname>
|
||||
</author>
|
||||
<author>
|
||||
<firstname>Christopher</firstname>
|
||||
<surname>Faylor</surname>
|
||||
</author>
|
||||
<author>
|
||||
<firstname>DJ</firstname>
|
||||
<surname>Delorie</surname>
|
||||
</author>
|
||||
<author>
|
||||
<firstname>Pierre</firstname>
|
||||
<surname>Humblet</surname>
|
||||
</author>
|
||||
<author>
|
||||
<firstname>Geoffrey</firstname>
|
||||
<surname>Noer</surname>
|
||||
</author>
|
||||
</authorgroup>
|
||||
|
||||
<xi:include href="legal.xml"/>
|
||||
</bookinfo>
|
@ -1,25 +0,0 @@
|
||||
<chapter id="using"><title>Using Cygwin</title>
|
||||
|
||||
<para>This chapter explains some key differences between the Cygwin
|
||||
environment and traditional UNIX systems. It assumes a working
|
||||
knowledge of standard UNIX commands.</para>
|
||||
|
||||
DOCTOOL-INSERT-using-pathnames
|
||||
|
||||
DOCTOOL-INSERT-using-textbinary
|
||||
|
||||
DOCTOOL-INSERT-using-filemodes
|
||||
|
||||
DOCTOOL-INSERT-using-specialnames
|
||||
|
||||
DOCTOOL-INSERT-using-cygwinenv
|
||||
|
||||
DOCTOOL-INSERT-ntsec
|
||||
|
||||
DOCTOOL-INSERT-using-cygserver
|
||||
|
||||
DOCTOOL-INSERT-using-utils
|
||||
|
||||
DOCTOOL-INSERT-using-effectively
|
||||
|
||||
</chapter>
|
21
winsup/doc/using.xml
Normal file
21
winsup/doc/using.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<chapter id="using" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<title>Using Cygwin</title>
|
||||
|
||||
<para>This chapter explains some key differences between the Cygwin
|
||||
environment and traditional UNIX systems. It assumes a working
|
||||
knowledge of standard UNIX commands.</para>
|
||||
|
||||
<xi:include href="pathnames.xml"/>
|
||||
<xi:include href="textbinary.xml"/>
|
||||
<xi:include href="filemodes.xml"/>
|
||||
<xi:include href="specialnames.xml"/>
|
||||
<xi:include href="cygwinenv.xml"/>
|
||||
<xi:include href="ntsec.xml"/>
|
||||
<xi:include href="cygserver.xml"/>
|
||||
<xi:include href="../utils/utils.xml"/>
|
||||
<xi:include href="effectively.xml"/>
|
||||
</chapter>
|
@ -1,3 +1,6 @@
|
||||
<?xml version="1.0" encoding='UTF-8'?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||||
|
||||
<sect1 id="windres"><title>Defining Windows Resources</title>
|
||||
|
2190
winsup/utils/utils.xml
Normal file
2190
winsup/utils/utils.xml
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user