X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Message-ID: <4F0C8EDD.6070003@gmail.com> Date: Tue, 10 Jan 2012 14:17:49 -0500 From: Jarome User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Can't get includes untangled Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 When I make my Windows 7 cygwin project, I keep getting In file included from /usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../ include/w32api/windows.h:98:0, from src/tkfPusher.c:23: /usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../include/w32api/ winsock2.h:103:2: warning: #warning "fd_set and associated macros have been defined in sys/types. This may cause runtime problems with W32 sockets" Everything works in MinGW. I tried adding the #define __USE_W32_SOCKETS to try and fix this because if defined, it should ignore the fd things in types.h, but no success. So how do I untangle the includes for Cygwin? The code is: #define GPC_CYGWIN #define GPC_WIN #include #include #include // This includes sys/types.h #ifdef GPC_WIN #define __USE_W32_SOCKETS #include #include #include #ifdef GPC_CYGWIN // winsoch2.h should be included by windows.h if __USE_W32_SOCKETS is defined //#include #include #include #endif #ifdef GPC_MINGW #include #include #include #endif #endif Thanks for the help, Jim -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple