Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Message-ID: <3987B905.19E480A2@ece.gatech.edu>
Date: Wed, 02 Aug 2000 02:00:37 -0400
From: Charles Wilson <cwilson@ece.gatech.edu>
X-Mailer: Mozilla 4.73 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin@sources.redhat.com
Subject: Re: Clipboard from Cygwin?
References: <nZFGdDAMA1h5IwZi@almide.demon.co.uk> <003b01bffc0a$6da278a0$3c5350d8@guinness> <200008012327.TAA29658@envy.delorie.com> <398783D9.E25355B6@ece.gatech.edu> <20000801221652.A21157@cygnus.com> <3987873C.857BF466@ece.gatech.edu> <20000801223301.A21289@cygnus.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Chris Faylor wrote:
> 
> On Tue, Aug 01, 2000 at 10:28:12PM -0400, Charles Wilson wrote:
> >I did a cvs checkout of the whole schmeal. Here's my tree:
> 
> Ah.  You've been subjected to recent sourceware breakage.  I should have
> remembered this.  I just "yelled" at someone in gcc-patches about this.
> 
> The patch for this is here:
> 
> http://gcc.gnu.org/ml/gcc-patches/2000-07/msg01217.html
> 
> It should propagate into sourceware soon, I hope.
> 
> You can also get the same effect by removing the -nostdinc from the
> FLAGS_FOR_TARGET that get set in configure.in for cygwin.
> 

Doesn't seem to help. Now I get a bunch of _imp___ctype not found errors
when trying to link cygwin1.dll. I think the problem is related to this:

/src/newlib/libc/include/sys/config.h has this little snippet:

#if defined(__CYGWIN32__) || defined(__CYGWIN__)
#if defined(__INSIDE_CYGWIN__) || defined(_COMPILING_NEWLIB)
#define __IMPORT
#else
#define __IMPORT __declspec(dllimport)
#endif
#endif

/src/newlib/libc/include/ctype.h defines ctype:

extern  __IMPORT _CONST char    _ctype_[];

So it's important that __IMPORT get defined correctly -- that is, that
__INSIDE_CYGWIN__ is defined before anything in newlib/libc/include gets
included. 

winsup.h has the following:

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#define __INSIDE_CYGWIN__

(Don't let it throw you, that's a different config.h file). The problem
is, winsup.h defines __INSIDE_CYGWIN__, but most of the .cc files in
winsup include stuff like <errno.h> and <stdlib.h> *before* winsup.h.
These <include files> get resolved to the newlib/libc/include directory,
and poof: libc/include/sys/config.h gets included but __INSIDE_CYGWIN__
hasn't been defined yet.

I don't know what the right way to fix this is. Help?

--Chuck

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

