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 Message-Id: <5.2.0.9.0.20030304163130.00b1ea10@irispavp.igb.umontreal.ca> X-Sender: bleau2 AT irispavp DOT igb DOT umontreal DOT ca (Unverified) Date: Tue, 04 Mar 2003 16:59:07 -0500 To: cygwin AT cygwin DOT com From: Andre Bleau Subject: [PATCH] corrects search order of directories for include files for gcc 3.2 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed X-MDRemoteIP: 10.52.50.2 X-Return-Path: bleau AT igb DOT umontreal DOT ca X-MDaemon-Deliver-To: cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id h24M1Xk29418 I observed that with Cygwin's gcc 3.2, /usr/include/w32api is searched before /usr/include, even when gcc is called without -mwin32 nor -mno-cygwin. If somes files exist with the same name in both /usr/include/w32api and /usr/include, such as mapi.h or the files in the GL subdirectory, the later are never used. IMO, this is wrong. With Cygwin's gcc-2, /usr/include is searched before /usr/include/w32api when gcc-2 is called without -mwin32 nor -mno-cygwin. I need this issue to be settled before I can prepare an updated version of the OpenGL package. Here's a patch that sets the search order to: gcc -mno-cygwin : /usr/i686-pc-mingw32/lib/../../include/w32api /usr/lib/gcc-lib/i686-pc-cygwin/3.2/include /usr/include/mingw gcc -mwin32 : /usr/i686-pc-mingw32/lib/../../include/w32api /usr/lib/gcc-lib/i686-pc-cygwin/3.2/include /usr/include "plain" gcc or gcc -mcygwin /usr/lib/gcc-lib/i686-pc-cygwin/3.2/include /usr/include /usr/i686-pc-cygwin/lib/../../include/w32api I tested the patch by modifying the specs file by hand. The patch is for /usr/src/gcc-3.2-3/gcc/config/i386/cygwin.h ---------------------------------------------------------------- diff -pu cygwin.h.orig cygwin.h --- cygwin.h.orig 2003-03-04 15:08:38.000000000 -0500 +++ cygwin.h 2003-03-04 15:34:54.000000000 -0500 @@ -44,7 +44,8 @@ Boston, MA 02111-1307, USA. */ %{mno-cygwin:-D__MSVCRT__ -D__MINGW32__ %{!ansi:%{mthreads:-D_MT}}}\ %{!mno-cygwin:-D__CYGWIN32__ -D__CYGWIN__ %{!ansi:-Dunix} -D__unix__ -D__unix}\ %{mwin32|mno-cygwin:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ %{!ansi:-DWINNT}}\ - %{!nostdinc:%{!mno-win32|mno-cygwin:-isystem ../include/w32api%s -isystem ../../include/w32api%s}}\ + %{!nostdinc:%{mwin32|mno-cygwin:-isystem ../../include/w32api%s}}\ + %{!nostdinc:%{!mwin32:%{!mno-cygwin:-idirafter ../../include/w32api%s}}}\ " ---------------------------------------------------------------- André Bleau, Cygwin's OpenGL package maintainer. email: bleau at igb dot umontreal dot ca (Fight SPAM: encode your email-address) Please address all questions and problem reports about Cygwin's OpenGL package to cygwin AT cygwin DOT com . -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/