X-Spam-Check-By: sourceware.org From: "Dave Korn" To: Subject: [FAQ ALERT] Win32_Winsock depracated... Date: Tue, 30 May 2006 15:53:03 +0100 Message-ID: <02ff01c683f8$c0e99760$a501a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0300_01C68401.22ADFF60" X-Mailer: Microsoft Office Outlook 11 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Note-from-DJ: This may be spam ------=_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 * 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= I don't want Unix sockets, how do I use normal Win32 winso= ck?=0A= =0A= =20=0A= -(Please note: This section has not yet been = updated for the latest net release.)=0A= -=0A= -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= +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= +=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= =0A= =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--