From ed978361498b5f961b3c09643686569a43476ab6 Mon Sep 17 00:00:00 2001 From: Brian Inglis Date: Tue, 25 Aug 2020 06:57:14 -0600 Subject: [PATCH] winsup/doc/faq-api.xml, -programming.xml: change Win32 to Windows/API --- winsup/doc/faq-api.xml | 10 +++++----- winsup/doc/faq-programming.xml | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/winsup/doc/faq-api.xml b/winsup/doc/faq-api.xml index 313f15d37..829e4d7fe 100644 --- a/winsup/doc/faq-api.xml +++ b/winsup/doc/faq-api.xml @@ -18,7 +18,7 @@ Windows into the C library. Then your apps should (ideally) run on POSIX systems (Unix/Linux) and Windows with no changes at the source level. The C library is in a DLL, which makes basic applications quite small. -And it allows relatively easy upgrades to the Win32/POSIX translation +And it allows relatively easy upgrades to the Windows/POSIX translation layer, providing that DLL changes stay backward-compatible. For a good overview of Cygwin, you may want to read the Cygwin @@ -140,7 +140,7 @@ spawn family of calls if possible. Here's how it works: Parent initializes a space in the Cygwin process table for child. -Parent creates child suspended using Win32 CreateProcess call, giving +Parent creates child suspended using Windows CreateProcess call, giving the same path it was invoked with itself. Parent calls setjmp to save its own context and then sets a pointer to this in the Cygwin shared memory area (shared among all Cygwin tasks). Parent fills in the child's @@ -326,7 +326,7 @@ name under the API. E.g., the POSIX select system call can wait on a standard file handles and handles to sockets. The select call in Winsock can only wait on sockets. Because of this, the Cygwin dll does a lot of nasty stuff behind -the scenes, trying to persuade various Winsock/Win32 functions to do what +the scenes, trying to persuade various Winsock/Windows functions to do what a Unix select would do. If you are porting an application which already uses Winsock, then @@ -337,11 +337,11 @@ direct calls to Winsock functions. If you use Cygwin, use the POSIX API. -I don't want Unix sockets, how do I use normal Win32 winsock? +I don't want Unix sockets, how do I use normal Windows winsock? You don't. Look for the Mingw-w64 project to port applications using -native Win32/Winsock functions. Cross compilers packages to build Mingw-w64 +native Windows API/Winsock functions. Cross compilers packages to build Mingw-w64 targets are available in the Cygwin distro. diff --git a/winsup/doc/faq-programming.xml b/winsup/doc/faq-programming.xml index 5920ca8c4..07d3a61f2 100644 --- a/winsup/doc/faq-programming.xml +++ b/winsup/doc/faq-programming.xml @@ -76,7 +76,7 @@ sizeof(void*) 4 8 8 This difference can result in interesting problems, especially when -using Win32 functions, especially when using pointers to Windows +using Windows API functions using pointers to Windows datatypes like LONG, ULONG, DWORD. Given that Windows is LLP64, all of the aforementioned types are 4 byte in size, on 32 as well as on 64 bit Windows, while `long' on 64 bit Cygwin is 8 bytes. @@ -189,10 +189,10 @@ string pointer given to printf is missing the upper 4 bytes. -Don't use C base types together with Win32 functions. +Don't use C base types together with Windows API functions. Keep in mind that DWORD, LONG, ULONG are not the same -as long and unsigned long. Try to use only Win32 datatypes in conjunction -with Win32 API function calls to avoid type problems. See the above +as long and unsigned long. Try to use only Windows datatypes in conjunction +with Windows API function calls to avoid type problems. See the above ReadFile example. Windows functions in printf calls should be treated carefully as well. This code is common for 32 bit code, but probably prints the wrong value on 64 bit: @@ -438,11 +438,11 @@ gcj --main=Hello Hello.java -How do I use Win32 API calls? +How do I use Windows API calls? Cygwin tools require that you explicitly link the import libraries -for whatever Win32 API functions that you are going to use, with the exception +for whatever Windows API functions that you are going to use, with the exception of kernel32, which is linked automatically (because the startup and/or built-in code uses it). @@ -464,7 +464,7 @@ including user32, gdi32 and comdlg32. or at least after all the object files and static libraries that reference them. -There are a few restrictions for calls to the Win32 API. +There are a few restrictions for calls to the Windows API. For details, see the User's Guide section Restricted Win32 environment, as well as the User's Guide section @@ -472,7 +472,7 @@ as well as the User's Guide section -How do I compile a Win32 executable that doesn't use Cygwin? +How do I compile a Windows executable that doesn't use Cygwin? The compilers provided by the mingw64-i686-gcc and @@ -528,7 +528,7 @@ lines must start with tabs. This is not specific to Cygwin. -Why can't we redistribute Microsoft's Win32 headers? +Why can't we redistribute Microsoft's Windows API headers? Subsection 2.d.f of the `Microsoft Open Tools License agreement' looks @@ -536,7 +536,7 @@ like it says that one may not "permit further redistribution of the Redistributables to their end users". We take this to mean that we can give them to you, but you can't give them to anyone else, which is something that we can't agree to. Fortunately, we -have our own Win32 headers which are pretty complete. +have our own Windows API headers which are pretty complete. -- 2.43.5