2004-01-24 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
* cygwinenv.sgml: Cleanup minor markup problems. * dll.sgml: Cleanup minor markup problems. * effectively.sgml: Cleanup minor markup problems. * gcc.sgml: Cleanup minor markup problems. * ntsec.sgml: Cleanup minor markup problems. * pathnames.sgml: Cleanup minor markup problems. * setup-net.sgml: Cleanup minor markup problems. * textbinary.sgml: Cleanup minor markup problems. * windres.sgml: Cleanup minor markup problems.
This commit is contained in:
parent
f4e815bc30
commit
aff8b4f9aa
@ -1,3 +1,14 @@
|
|||||||
|
2004-01-24 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
|
||||||
|
* cygwinenv.sgml: Cleanup minor markup problems.
|
||||||
|
* dll.sgml: Cleanup minor markup problems.
|
||||||
|
* effectively.sgml: Cleanup minor markup problems.
|
||||||
|
* gcc.sgml: Cleanup minor markup problems.
|
||||||
|
* ntsec.sgml: Cleanup minor markup problems.
|
||||||
|
* pathnames.sgml: Cleanup minor markup problems.
|
||||||
|
* setup-net.sgml: Cleanup minor markup problems.
|
||||||
|
* textbinary.sgml: Cleanup minor markup problems.
|
||||||
|
* windres.sgml: Cleanup minor markup problems.
|
||||||
|
|
||||||
2004-01-20 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
|
2004-01-20 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
|
||||||
|
|
||||||
* Makefile.in: Remove unused cygwin-ug and cygwin-api-int
|
* Makefile.in: Remove unused cygwin-ug and cygwin-api-int
|
||||||
|
@ -65,6 +65,7 @@ originally encoded in the firmware of IBM PCs by original
|
|||||||
equipment manufacturers (OEMs). If you find that some characters
|
equipment manufacturers (OEMs). If you find that some characters
|
||||||
(especially non-US or 'graphical' ones) do not display correctly in
|
(especially non-US or 'graphical' ones) do not display correctly in
|
||||||
Cygwin, you can use this option to select an appropriate codepage.
|
Cygwin, you can use this option to select an appropriate codepage.
|
||||||
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
@ -92,6 +93,7 @@ to copy memory some number of bytes at a time, in the above example
|
|||||||
32768 bytes (32Kb) at a time. The default is to copy as many bytes as
|
32768 bytes (32Kb) at a time. The default is to copy as many bytes as
|
||||||
possible, which is preferable in most cases but may slow some older systems
|
possible, which is preferable in most cases but may slow some older systems
|
||||||
down.
|
down.
|
||||||
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para><envar>(no)glob[:ignorecase]</envar> - if set, command line arguments
|
<para><envar>(no)glob[:ignorecase]</envar> - if set, command line arguments
|
||||||
|
@ -36,6 +36,7 @@ information needed to tell the OS how your program interacts with
|
|||||||
capabilities. To begin an exploration of the many additional options,
|
capabilities. To begin an exploration of the many additional options,
|
||||||
see the gcc documentation and website, currently at
|
see the gcc documentation and website, currently at
|
||||||
<ulink URL="http://gcc.gnu.org/">http://gcc.gnu.org/</ulink>
|
<ulink URL="http://gcc.gnu.org/">http://gcc.gnu.org/</ulink>
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>Let's go through a simple example of how to build a dll.
|
<para>Let's go through a simple example of how to build a dll.
|
||||||
For this example, we'll use a single file
|
For this example, we'll use a single file
|
||||||
|
@ -144,6 +144,7 @@ endings, but <systemitem>cygutils</systemitem> provides several dedicated progra
|
|||||||
<command>u2d</command>, and <command>unix2dos</command>. Use the
|
<command>u2d</command>, and <command>unix2dos</command>. Use the
|
||||||
<literal>--help</literal> switch for usage information.
|
<literal>--help</literal> switch for usage information.
|
||||||
</para>
|
</para>
|
||||||
|
</sect2>
|
||||||
|
|
||||||
<sect2><title>Creating shortcuts with cygutils</title>
|
<sect2><title>Creating shortcuts with cygutils</title>
|
||||||
<para>
|
<para>
|
||||||
|
@ -44,11 +44,13 @@ and like any other Cygwin makefile. The only difference is that you use
|
|||||||
application instead of a command-line application. Here's an example:</para>
|
application instead of a command-line application. Here's an example:</para>
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
|
<![CDATA[
|
||||||
myapp.exe : myapp.o myapp.res
|
myapp.exe : myapp.o myapp.res
|
||||||
gcc -mwindows myapp.o myapp.res -o $@
|
gcc -mwindows myapp.o myapp.res -o $@
|
||||||
|
|
||||||
myapp.res : myapp.rc resource.h
|
myapp.res : myapp.rc resource.h
|
||||||
windres $< -O coff -o $@
|
windres $< -O coff -o $@
|
||||||
|
]]>
|
||||||
</screen>
|
</screen>
|
||||||
|
|
||||||
<para>Note the use of <filename>windres</filename> to compile the
|
<para>Note the use of <filename>windres</filename> to compile the
|
||||||
|
@ -605,11 +605,11 @@ anymore. Porting a <command>setuid</command> application is illustrated by
|
|||||||
a short example:</para>
|
a short example:</para>
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
|
<![CDATA[
|
||||||
/* First include all needed cygwin stuff. */
|
/* First include all needed cygwin stuff. */
|
||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <sys/cygwin.h>
|
#include <sys/cygwin.h>
|
||||||
/* Use the following define to determine the Windows version */
|
/* Use the following define to determine the Windows version */
|
||||||
#define is_winnt (GetVersion() < 0x80000000)
|
#define is_winnt (GetVersion() < 0x80000000)
|
||||||
#endif
|
#endif
|
||||||
@ -641,16 +641,17 @@ a short example:</para>
|
|||||||
/* Use standard method for W9X as well. */
|
/* Use standard method for W9X as well. */
|
||||||
hashed_password = crypt (cleartext_password, salt);
|
hashed_password = crypt (cleartext_password, salt);
|
||||||
if (!user_pwd_entry ||
|
if (!user_pwd_entry ||
|
||||||
strcmp (hashed_password, user_pwd_entry->pw_password))
|
strcmp (hashed_password, user_pwd_entry->pw_password))
|
||||||
error_exit;
|
error_exit;
|
||||||
|
|
||||||
[...]
|
[...]
|
||||||
|
|
||||||
/* Everything else remains the same! */
|
/* Everything else remains the same! */
|
||||||
|
|
||||||
setegid (user_pwd_entry->pw_gid);
|
setegid (user_pwd_entry->pw_gid);
|
||||||
seteuid (user_pwd_entry->pw_uid);
|
seteuid (user_pwd_entry->pw_uid);
|
||||||
execl ("/bin/sh", ...);
|
execl ("/bin/sh", ...);
|
||||||
|
]]>
|
||||||
|
|
||||||
</screen>
|
</screen>
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ default printer with the command <command>cat filename > PRN</command>
|
|||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2> <Title>POSIX devices</title>
|
<sect2> <title>POSIX devices</title>
|
||||||
<para>There is no need to create a POSIX <filename>/dev</filename>
|
<para>There is no need to create a POSIX <filename>/dev</filename>
|
||||||
directory as it is simulated within Cygwin automatically.
|
directory as it is simulated within Cygwin automatically.
|
||||||
It supports the following devices: <filename>/dev/null</filename>,
|
It supports the following devices: <filename>/dev/null</filename>,
|
||||||
|
@ -109,6 +109,7 @@ the cache is no longer necessary, but you may want to retain the
|
|||||||
packages as backups, for installing Cygwin to another system,
|
packages as backups, for installing Cygwin to another system,
|
||||||
or in case you need to reinstall a package.
|
or in case you need to reinstall a package.
|
||||||
</para>
|
</para>
|
||||||
|
</sect2>
|
||||||
|
|
||||||
<sect2><title>Connection Method</title>
|
<sect2><title>Connection Method</title>
|
||||||
<para>
|
<para>
|
||||||
|
@ -86,7 +86,7 @@ these shells the relevant value of <envar>CYGWIN</envar> is that at the time
|
|||||||
the shell was launched and not that at the time the program is executed.
|
the shell was launched and not that at the time the program is executed.
|
||||||
Non-Cygwin shells always pipe and redirect with binary mode. With
|
Non-Cygwin shells always pipe and redirect with binary mode. With
|
||||||
non-Cygwin shells the commands <command> cat filename | program </command>
|
non-Cygwin shells the commands <command> cat filename | program </command>
|
||||||
and <command> program < filename </command> are not equivalent when
|
and <command> program < filename </command> are not equivalent when
|
||||||
<filename>filename</filename> is on a text-mounted partition. </para>
|
<filename>filename</filename> is on a text-mounted partition. </para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</OrderedList>
|
</OrderedList>
|
||||||
@ -98,22 +98,28 @@ from files by using the <command>tr</command> program, which can only write
|
|||||||
to standard output.
|
to standard output.
|
||||||
The script</para>
|
The script</para>
|
||||||
<screen>
|
<screen>
|
||||||
|
<![CDATA[
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Remove \r from the file given as argument
|
# Remove \r from the file given as argument
|
||||||
tr -d '\r' < "$1" > "$1".nocr
|
tr -d '\r' < "$1" > "$1".nocr
|
||||||
|
]]>
|
||||||
</screen>
|
</screen>
|
||||||
<para> will not work on a text mounted systems because the \r will be
|
<para> will not work on a text mounted systems because the \r will be
|
||||||
reintroduced on writing. However scripts such as </para>
|
reintroduced on writing. However scripts such as </para>
|
||||||
<screen>
|
<screen>
|
||||||
|
<![CDATA[
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Remove \r from the file given as argument
|
# Remove \r from the file given as argument
|
||||||
tr -d '\r' | gzip | gunzip > "$1".nocr
|
tr -d '\r' | gzip | gunzip > "$1".nocr
|
||||||
|
]]>
|
||||||
</screen>
|
</screen>
|
||||||
<para>and the .bat file</para>
|
<para>and the .bat file</para>
|
||||||
<screen>
|
<screen>
|
||||||
|
<![CDATA[
|
||||||
REM Remove \r from the file given as argument
|
REM Remove \r from the file given as argument
|
||||||
@echo off
|
@echo off
|
||||||
tr -d \r < %1 > %1.nocr
|
tr -d \r < %1 > %1.nocr
|
||||||
|
]]>
|
||||||
</screen>
|
</screen>
|
||||||
<para> work fine. In the first case (assuming the pipes are binary)
|
<para> work fine. In the first case (assuming the pipes are binary)
|
||||||
we rely on <command>gunzip</command> to set its output to binary mode,
|
we rely on <command>gunzip</command> to set its output to binary mode,
|
||||||
|
@ -10,11 +10,13 @@ the Windows resource format for details. Also, the
|
|||||||
Binutils manual. Here's an example of using it in a project:</para>
|
Binutils manual. Here's an example of using it in a project:</para>
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
|
<![CDATA[
|
||||||
myapp.exe : myapp.o myapp.res
|
myapp.exe : myapp.o myapp.res
|
||||||
gcc -mwindows myapp.o myapp.res -o $@
|
gcc -mwindows myapp.o myapp.res -o $@
|
||||||
|
|
||||||
myapp.res : myapp.rc resource.h
|
myapp.res : myapp.rc resource.h
|
||||||
windres $< -O coff -o $@
|
windres $< -O coff -o $@
|
||||||
|
]]>
|
||||||
</screen>
|
</screen>
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user