Mail Archives: cygwin/2006/05/30/10:53:18
------=_NextPart_000_0300_01C68401.22ADFF60
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
... for quite some time now; here's an update to the related faq entry.
2006-05-29 Dave Korn <dave DOT korn AT artimi DOT com>
* faq-api.xml (faq.api.winsock): Replace references to depracated
Win32_Winsock macro with __USE_W32_WINSOCK, and enlarge on details.
cheers,
DaveK
--
Can't think of a witty .sigline today....
------=_NextPart_000_0300_01C68401.22ADFF60
Content-Type: application/octet-stream;
name="faq-winsock-usage-patch.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="faq-winsock-usage-patch.diff"
Index: faq-api.xml=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /cvs/src/src/winsup/doc/faq-api.xml,v=0A=
retrieving revision 1.1=0A=
diff -p -u -r1.1 faq-api.xml=0A=
--- faq-api.xml 6 Aug 2005 05:14:41 -0000 1.1=0A=
+++ faq-api.xml 30 May 2006 14:38:36 -0000=0A=
@@ -277,12 +277,17 @@ netdb. It isn't a good idea to use it i=0A=
<question><para>I don't want Unix sockets, how do I use normal Win32 winso=
ck?</para></question>=0A=
<answer>=0A=
=20=0A=
-<para><emphasis role=3D'bold'>(Please note: This section has not yet been =
updated for the latest net release.)</emphasis>=0A=
-</para>=0A=
-<para>To use the vanilla Win32 winsock, you just need to #define Win32_Win=
sock=0A=
-and #include "windows.h" at the top of your source file(s). You'll also=
=0A=
-want to add -lwsock32 to the compiler's command line so you link against=
=0A=
-libwsock32.a.=0A=
+<para>To use the vanilla Win32 winsock, you just need to #define __USE_W32=
_WINSOCK=0A=
+and #include "windows.h" (or "winsock2.h" at the top of your source file(s=
). You may=0A=
+find it easier to add "-D__USE_W32_WINSOCK" to the CFLAGS settings in your=
makefile,=0A=
+if you are using one, as this will then apply to all your source files. I=
t is also=0A=
+worth using "#define WIN32_LEAN_AND_MEAN" before you include the windows h=
eader file,=0A=
+as this will prevent it from pulling in lots of header files for all sorts=
of unrelated=0A=
+windows APIs when all you want is the Winsock definitions; again, this cou=
ld be set=0A=
+for the entire project in your CFLAGS.=0A=
+</para><para>=0A=
+You'll also need to add -lwsock32 to the compiler's command line (or the m=
akefile's=0A=
+list of link libs) so that you link against libwsock32.a.=0A=
</para>=0A=
</answer></qandaentry>=0A=
=20=0A=
------=_NextPart_000_0300_01C68401.22ADFF60
Content-Type: text/plain; charset=us-ascii
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
------=_NextPart_000_0300_01C68401.22ADFF60--
- Raw text -