This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: impure_ptr/Mingw and cygwin
On Mon, Nov 25, 2002 at 01:16:04PM -0800, Andrew DeFaria wrote:
>So the question now is: How do I satisfy my need for getopt and still
>produce objects without _impure_ptr's?
You find some native windows getopt, of course.
>Ah ha!
Yes. Don't include the cygwin headers when you're compiling with
-mno-cygwin.
>$ 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?
Because you're using /usr/include/mingw and it is already included on
the command line by default. That's what -mno-cygwin does.
cgf
--
Please do not send me personal email with cygwin questions or observations.
Use the resources at http://cygwin.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/