delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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 |
To: | cygwin AT cygwin DOT com |
X-Injected-Via-Gmane: | http://gmane.org/ |
Path: | not-for-mail |
From: | Andrew DeFaria <ADeFaria AT Salira DOT com> |
Subject: | Re: impure_ptr/Mingw and Cygwin |
Date: | Mon, 25 Nov 2002 13:16:04 -0800 |
Lines: | 56 |
Message-ID: | <3DE29314.8040102@Salira.com> |
References: | <3DE177C0 DOT 4000901 AT Salira DOT com> <Pine DOT LNX DOT 4 DOT 21 DOT 0211250943130 DOT 7231-100000 AT gremlin DOT fruitbat DOT org> |
NNTP-Posting-Host: | 206.184.204.2 |
Mime-Version: | 1.0 |
X-Trace: | main.gmane.org 1038258923 6353 206.184.204.2 (25 Nov 2002 21:15:23 GMT) |
X-Complaints-To: | usenet AT main DOT gmane DOT org |
NNTP-Posting-Date: | Mon, 25 Nov 2002 21:15:23 +0000 (UTC) |
User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 |
X-Accept-Language: | en-us, en, ru, zh |
Peter A. Castro wrote: > On Sun, 24 Nov 2002, Andrew DeFaria wrote: > >> Peter A. Castro wrote: >> >>> What you show below is only linking. I believe you need to >>> re-compile all of your source with -mno-cygwin -mwindows as well to >>> make the _impure_ptr references go away. >> >> But I did re-compile all my sources with -mno-cygwin -mwindows! Still >> have the error. > > Suggest you run nm against all your objects and libraries and find which > has the _impure_ptr references, then recompile just those. But I did recompile everything already! The _impure_ptr keeps getting generated: $ nm mksf.o | grep impure U __impure_ptr $ rm mksf.o $ make mksf.o /bin/gcc -c -g -mno-cygwin -mwindows -I. -I../../include -I/usr/include -DCYGWIN mksf.c $ nm mksf.o | grep impure U __impure_ptr $ As you can see the _impure_ptr reference gets regenerated. But wait! There's more! I can cause these _impure_ptr even with the little foo.c merely by including -I/usr/include on the command line. Why am I referencing /usr/include? Because in my larger application I need it for getopt.h. The mere inclusion of -I/usr/include causes_impure_ptr's to be emitted. So the question now is: How do I satisfy my need for getopt and still produce objects without _impure_ptr's? Ah ha! $ grep impure /usr/include/*.h /usr/include/stdio.h:#define stdin (_impure_ptr->_stdin) /usr/include/stdio.h:#define stdout (_impure_ptr->_stdout) /usr/include/stdio.h:#define stderr (_impure_ptr->_stderr) Hmmm... Changed options to: /bin/gcc -c -g -mno-cygwin -I. -I../../include -I/usr/include/mingw -I/usr/include -DCYGWIN mksf.c cc1: warning: changing search order for system directory "/usr/include/mingw" cc1: warning: as it has already been specified as a non-system directory This works but why am I getting this warning? -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |