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
Message-ID: <00d601c2d54f$2d619de0$78d96f83@pomello>
From: "Max Bowsher" <maxb@ukf.net>
To: "Charles Wilson" <cwilson@ece.gatech.edu>
Cc: <cygwin@cygwin.com>
References: <20030215210505.GA29578@redhat.com> <010601c2d537$decb05c0$78d96f83@pomello> <20030215215840.GA3446@redhat.com> <3E4EC408.8070500@ece.gatech.edu> <004201c2d546$ba7482a0$78d96f83@pomello> <3E4ECC52.50609@ece.gatech.edu> <005101c2d54a$e70732a0$78d96f83@pomello> <3E4ED533.3090504@ece.gatech.edu>
Subject: Re: [Problem] mempcpy is missing?  (FAQ alert)
Date: Sun, 16 Feb 2003 00:05:55 -0000
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

Charles Wilson wrote:
> Max Bowsher wrote:
> 
>> 3 things:
>> - The issue here was mempcpy, not memcpy
> 
> okay, fine...
> 
>> - Cygwin *doesn't* have a memcpy.h
> 
> It was simply an example.  sure, memPcpy is declared in string.h.  The
> point is, the declaration is found, but the (test) link fails (during
> configury).  and because it fails, your package provides its own
> implementation -- without realizing that the declaration in string.h
> conflicts.  Thus, compile time failure when you actually build the
> project itself.
> 
>> - I still don't understand what you are going to fix - am I missing
>> the obvious? 
> 
> It sounded to me like there was a problem in libintl's headers (and
> possible its configury) where it did not account for the possibility
> of a prior declaration.  This is bad coding.
> 
> When you provide a replacement function, you should always
> define/declare it as
> 
> my_foo()
> 
> not
> 
> foo()
> 
> or use some unique prefix like libintl_foo().  Then, your code should
> call LIBINTL_FOO( (args) ).  Now, if the function is in the system
> libs, 
> then you want
> 
> #define LIBINTL_FOO(a)  foo(a)
> 
> but if it isn't found, then you want
> 
> #define LIBINTL_FOO(a)  libintl_foo(a)

Ah. Now I understand. Thanks for explaining that.

> Now, there are lots of little niggles that can bite you.  I figured I
> would have to work at this a bit -- and I'd save this thread and get
> around to it when I next update gettext.  BUT, I really didn't read
> the 
> initial message that closely; "libintl has a problem"  "Okay, that's
> my job to fix it."
> 
> Am I wrong? Without Chris's change to cygwin.din, is the problem
> actually somewhere *else* and not in libintl.h/etc?

No, you are right.


Max.


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

