delorie.com/archives/browse.cgi | search |
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 <jamesrome AT gmail DOT com> |
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 |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
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 <stdio.h> #include <errno.h> #include <dirent.h> // This includes sys/types.h #ifdef GPC_WIN #define __USE_W32_SOCKETS #include <windows.h> #include <process.h> #include <time.h> #ifdef GPC_CYGWIN // winsoch2.h should be included by windows.h if __USE_W32_SOCKETS is defined //#include <w32api/winsock2.h> #include <w32api/winbase.h> #include <string.h> #endif #ifdef GPC_MINGW #include <winsock2.h> #include <winbase.h> #include <string.h> #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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |