Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Mon, 25 Nov 2002 20:21:20 -0500
From: Christopher Faylor <cgf@redhat.com>
To: cygwin@cygwin.com
Cc: ADeFaria@Salira.com
Subject: Re: impure_ptr/Mingw and cygwin
Message-ID: <20021126012120.GC13548@redhat.com>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com, ADeFaria@Salira.com
References: <Pine.LNX.4.21.0211251615350.7231-100000@gremlin.fruitbat.org> <3DE2C59A.9030103@Salira.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <3DE2C59A.9030103@Salira.com>
User-Agent: Mutt/1.5.1i

[one more for the archives]
On Mon, Nov 25, 2002 at 04:51:38PM -0800, Andrew DeFaria wrote:
>If this were really so then why, if I don't specify -I/usr/include I get 
>getopt.h not found?!? I should be found in /usr/include/getopt.h no?

/usr/include is for cygwin apps.  If you add -I/usr/include you subvert
the normal operation of -mno-cygwin by including cygwin-only header
files which is *specifically* what -mno-cygwin is avoiding.  The system
include area for -mno-cygwin is /usr/include/mingw.

The same applies for library files.  The system area for libraries when
-mno-cygwin is active is /usr/lib/mingw.

(This is a simplification because it isn't exactly like this for gcc 3.2
but it is close enough)

In any event adding a library path to /usr/lib or an include path search
to /usr/include is *asking for trouble*.

>In any event, after reading up on this problem in the MingW mailing list 
>I find that I am not the only one with this problem. Seems that -liberty 
>does indeed have the code for getopt but there is no mingw header file 
>that defines the interface. My solution ended up being define the getopt 
>API by hand and put it in my own mksf.h header file. Ugly but it works.

Did you send a bug report or patch to the mingw mailing list?

cgf

--
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/

