Subject: RE: sockets and mingwin32
From: [email-masked] (Colin Peters)

5 Mar 1997 00:52:32 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <01BC2981.5732D380.cygnus.gnu-win32@gbird0>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Original-To: "'JP Shipherd'" <[email-masked]>
Original-Cc: "'GNU-Win32'" <[email-masked]>
Original-Sender: [email-masked]

JP Shipherd[SMTP:[email-masked]] wrote:
>but the cygwin headers keep creeping in and I get errors like:
>
>C:\gnu32\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32/cygnus-2.7.2-961023/../..
>/../
>../i386-cygwin32/include/sys/types.h:131: warning: `FD_SET' redefined
[snip]
>Is the i386-cygwin32/include path built into gcc (g++)?  It's not in any of
>my include env vars:
>
>declare -x
>CPLUS_INCLUDE_PATH="/gnu32/mingw32/include:/gnu32/mingw32/include/non
>ansi:/gnu32/win32/include"
>declare -x
>C_INCLUDE_PATH="/gnu32/mingw32/include:/gnu32/mingw32/include/nonansi
>:/gnu32/win32/include"

Indeed yes, and I just found out about the problem today (sorry, I should
have been more careful in my testing). Anyway it seems that cpp at least
does know something about standard include file locations. Fortunately
you can work around this problem by adding "-iprefix /mingw32/include/"
or some such to the cpp options in the Mingw32 specs file (line 8)
so that it looks like this:

*cpp:
%{posix:-D_POSIX_SOURCE} -iprefix /mingw32/include/

This seems to take care of that problem (I hope). There may still be
problems with winsock and Mingw32, but at least you'll be getting the
right header files.

Colin.

-- Colin Peters - [email-masked]
-- Saga University Dept. of Information Science
-- http://www.fu.is.saga-u.ac.jp/~colin/index.html
-- http://www.geocities.com/Tokyo/Towers/6162/

-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".