mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-18 04:19:21 +08:00
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>
|
||||
|
||||
* 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
|
||||
(especially non-US or 'graphical' ones) do not display correctly in
|
||||
Cygwin, you can use this option to select an appropriate codepage.
|
||||
</para>
|
||||
</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
|
||||
possible, which is preferable in most cases but may slow some older systems
|
||||
down.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<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,
|
||||
see the gcc documentation and website, currently at
|
||||
<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.
|
||||
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
|
||||
<literal>--help</literal> switch for usage information.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2><title>Creating shortcuts with cygutils</title>
|
||||
<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>
|
||||
|
||||
<screen>
|
||||
<![CDATA[
|
||||
myapp.exe : myapp.o myapp.res
|
||||
gcc -mwindows myapp.o myapp.res -o $@
|
||||
|
||||
myapp.res : myapp.rc resource.h
|
||||
windres $< -O coff -o $@
|
||||
]]>
|
||||
</screen>
|
||||
|
||||
<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>
|
||||
|
||||
<screen>
|
||||
|
||||
<![CDATA[
|
||||
/* First include all needed cygwin stuff. */
|
||||
#ifdef __CYGWIN__
|
||||
#include <windows.h>
|
||||
#include <sys/cygwin.h>
|
||||
#include <windows.h>
|
||||
#include <sys/cygwin.h>
|
||||
/* Use the following define to determine the Windows version */
|
||||
#define is_winnt (GetVersion() < 0x80000000)
|
||||
#endif
|
||||
@ -641,16 +641,17 @@ a short example:</para>
|
||||
/* Use standard method for W9X as well. */
|
||||
hashed_password = crypt (cleartext_password, salt);
|
||||
if (!user_pwd_entry ||
|
||||
strcmp (hashed_password, user_pwd_entry->pw_password))
|
||||
strcmp (hashed_password, user_pwd_entry->pw_password))
|
||||
error_exit;
|
||||
|
||||
[...]
|
||||
|
||||
/* Everything else remains the same! */
|
||||
|
||||
setegid (user_pwd_entry->pw_gid);
|
||||
seteuid (user_pwd_entry->pw_uid);
|
||||
setegid (user_pwd_entry->pw_gid);
|
||||
seteuid (user_pwd_entry->pw_uid);
|
||||
execl ("/bin/sh", ...);
|
||||
]]>
|
||||
|
||||
</screen>
|
||||
|
||||
|
@ -154,7 +154,7 @@ default printer with the command <command>cat filename > PRN</command>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2> <Title>POSIX devices</title>
|
||||
<sect2> <title>POSIX devices</title>
|
||||
<para>There is no need to create a POSIX <filename>/dev</filename>
|
||||
directory as it is simulated within Cygwin automatically.
|
||||
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,
|
||||
or in case you need to reinstall a package.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2><title>Connection Method</title>
|
||||
<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.
|
||||
Non-Cygwin shells always pipe and redirect with binary mode. With
|
||||
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>
|
||||
</listitem>
|
||||
</OrderedList>
|
||||
@ -98,22 +98,28 @@ from files by using the <command>tr</command> program, which can only write
|
||||
to standard output.
|
||||
The script</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
#!/bin/sh
|
||||
# Remove \r from the file given as argument
|
||||
tr -d '\r' < "$1" > "$1".nocr
|
||||
]]>
|
||||
</screen>
|
||||
<para> will not work on a text mounted systems because the \r will be
|
||||
reintroduced on writing. However scripts such as </para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
#!/bin/sh
|
||||
# Remove \r from the file given as argument
|
||||
tr -d '\r' | gzip | gunzip > "$1".nocr
|
||||
]]>
|
||||
</screen>
|
||||
<para>and the .bat file</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
REM Remove \r from the file given as argument
|
||||
@echo off
|
||||
tr -d \r < %1 > %1.nocr
|
||||
]]>
|
||||
</screen>
|
||||
<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,
|
||||
|
@ -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>
|
||||
|
||||
<screen>
|
||||
<![CDATA[
|
||||
myapp.exe : myapp.o myapp.res
|
||||
gcc -mwindows myapp.o myapp.res -o $@
|
||||
|
||||
myapp.res : myapp.rc resource.h
|
||||
windres $< -O coff -o $@
|
||||
]]>
|
||||
</screen>
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user