]> sourceware.org Git - newlib-cygwin.git/commitdiff
Slight rearragement
authorJoshua Daniel Franklin <joshuadfranklin@yahoo.com>
Sun, 5 Jun 2005 02:16:07 +0000 (02:16 +0000)
committerJoshua Daniel Franklin <joshuadfranklin@yahoo.com>
Sun, 5 Jun 2005 02:16:07 +0000 (02:16 +0000)
winsup/doc/how-programming.texinfo
winsup/doc/pathnames.sgml

index ae233cfbdeb02d9c1e251f071883f42fc2ce8a29..a7dc8dff6e5ddbb129aad7820e1d8203f021795c 100644 (file)
@@ -211,10 +211,26 @@ give them to you, but you can't give them to anyone else, which is
 something that Red Hat can't agree to.  Fortunately, we
 have our own Win32 headers which are pretty complete.
 
-@subsection How do I link against @samp{cygwin1.dll} with Visual Studio?
+@subsection How do I use @samp{cygwin1.dll} with Visual Studio or MinGW?
 
-To my knowledge, none of the Cygwin developers have done this, but we
-have this report from the mailing list that it can be done this way:
+If you want to load the DLL dynamically, read
+@code{winsup/cygwin/how-cygtls-works.txt} and the sample code in
+@code{winsup/testsuite/cygload} to understand how this works.
+The short version is:
+
+@enumerate
+@item Make sure you have 4K of scratch space at the bottom of your stack.
+@item Invoke @code{cygwin_dll_init()}:
+@example
+HMODULE h = LoadLibrary("cygwin1.dll");
+void (*init)() = GetProcAddress(h, "cygwin_dll_init");
+init();
+@end example
+@end enumerate
+
+If you want to link statically from Visual Studio, to my knowledge
+none of the Cygwin developers have done this, but we have this report
+from the mailing list that it can be done this way:
 
 @enumerate
 @item Use the impdef program to generate a .def file for the cygwin1.dll
@@ -269,22 +285,6 @@ then generate import libraries for the MS VC linker.
 Thanks to Alastair Growcott (alastair dot growcott at bakbone dot co
 dot uk) for this tip.
 
-@subsection How do I load @samp{cygwin1.dll} dynamically from a Visual Studio or MinGW application?
-
-Read @code{how-cygtls-works.txt} and the sample code in
-@code{winsup/testsuite/cygload} if you want to understand how this works.
-The short version is:
-
-@enumerate
-@item Make sure you have 4K of scratch space at the bottom of your stack.
-@item Invoke @code{cygwin_dll_init()}:
-@example
-HMODULE h = LoadLibrary("cygwin1.dll");
-void (*init)() = GetProcAddress(h, "cygwin_dll_init");
-init();
-@end example
-@end enumerate
-
 @subsection How do I link against a @samp{.lib} file?
 
 If your @samp{.lib} file is a normal static or import library with
index b8cd60c48e36142684e99cdcde62210036f1b973..608f7f31da50aeefa919cbc7983352e8e964a3b2 100644 (file)
@@ -51,11 +51,13 @@ under HKEY_LOCAL_SYSTEM.  The user mount table takes precedence over
 the system-wide table if a path is mounted in both.  This includes the
 setting of the cygdrive prefix.</para>
 
-<para>Since Windows uses drive letters instead of a single filesystem
-root, the POSIX root <filename>/</filename> must be set to a directory
-in the Windows file system using the <command>mount</command> command.
-Without a <filename>/</filename> mount, Cygwin processes cannot
-distinguish between the Windows CurrentDrive and SystemDrive.
+<para>The <command>mount</command> command can set the POSIX root
+<filename>/</filename> to any directory in the Windows file system.
+In absence of such a mount, Cygwin maps <filename>/</filename> to the
+root of the current Windows working directory (for example, 
+<filename>H:\</filename> or <filename>\\computer\share</filename>). 
+Normally Cygwin's <command>setup.exe</command> creates the initial
+mount point for the POSIX root. 
 </para>
 
 <para>Whenever Cygwin generates a Win32 path from a POSIX one, it uses
This page took 0.034231 seconds and 5 git commands to generate.