delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/15/18:25:18

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
X-Injected-Via-Gmane: http://gmane.org/
To: cygwin AT cygwin DOT com
From: Charles Wilson <cwilson AT ece DOT gatech DOT edu>
Subject: Re: [Problem] mempcpy is missing? (FAQ alert)
Date: Sat, 15 Feb 2003 18:25:06 -0500
Lines: 71
Message-ID: <3E4ECC52.50609@ece.gatech.edu>
References: <20030215210505 DOT GA29578 AT redhat DOT com> <010601c2d537$decb05c0$78d96f83 AT pomello> <20030215215840 DOT GA3446 AT redhat DOT com> <3E4EC408 DOT 8070500 AT ece DOT gatech DOT edu> <004201c2d546$ba7482a0$78d96f83 AT pomello>
Mime-Version: 1.0
X-Complaints-To: usenet AT main DOT gmane DOT org
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130
X-Accept-Language: en-us, en
In-Reply-To: <004201c2d546$ba7482a0$78d96f83@pomello>

Max Bowsher wrote:

> Fix how? Unless I'm very much confused, this would require configure to
> create 2 new headers, containing lines like those below for every function
> that was in a header but did not link, AND then wrapping every include of
> system headers in every source file with #include "begin-system-madness.h"
> ... #include "end-system-madness.h".
> 
> Example begin-system-madness.h:
> #define func1 __autoconf_func1_does_not_link
> #define func2 __autoconf_func2_does_not_link
> #define func3 __autoconf_func3_does_not_link
> 
> Example end-system-madness.h:
> #undef func1
> #undef func2
> #undef func3
> 
> 
> Do you really intend to do that?
> 

No.  I'm going to fix memcpy.  If it ain't broke, don't mess with it. 
memcpy is broken.  I'll fix *that*.

> Isn't this the first time anyone has reported these problem prototypes
> messing up a compile?

Nope; I've done it several times.  'course, my solution at those times 
was the same as yours: submit a patch to cygwin.din.

And really, it's hard to blame most packages for simply assuming that if 
(e.g.) memcpy.h exists then Well Of COURSE memcpy() is available.

Slightly more paranoid maintainers might simply die during configure if 
memcpy() can't be found.  Only the truly obsessed-with-portability would 
provide alternate implementations (bcopy?) if memcpy() wasn't found, but 
memcpy.h was.

Face it, most platforms *aren't that strange*.  We are.  Most platforms 
do NOT have mismatch between their headers and their kernel -- even 
other newlib platforms.  We do, because of the DLL issues.

For other newlib platforms (e.g. embedded systems?) if the header 
declares the function, then the function is there.  'Nuff said.  If it 
isn't declared, then it isn't in the kernel -- but the developer 
probably needs it -- and it's just as easy to code it up and submit it 
to newlib, or code it up and keep a local compat lib, or code it up and 
incorporate it into your project's code, as it is to worry about arcane 
"if this but not that" configuration issues -- because you'd STILL have 
to provide some sort of alternate implementation.

Remember, most folks who work with embedded systems -- newlib's largest 
area of application IMO besides cygwin -- don't "port" stuff for fun. 
They need to compile a product, on a specific target (and usually not 27 
different targets).

> (NB: I mean breaking a compile that would have otherwise worked, instead of
> simply delaying failiure to the link stage).

Oh, well, I dunno about that.  My failures were at link time -- although 
I did run into something similar once when I was using 
AC_REPLACE_FUNC()...e.g. "provide fallback if not found'.

I'd just as soon avoid all of the synchronization issues between 
cygwin-gettext and Bruno-gettext...we *are* currently very different 
thanks to the libtoolization with CVS libtool.  Because libtool-1.5 is 
due RSN, I was hoping to push our changes upstream and return to baseline...

--Chuck



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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019