Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Sat, 15 Feb 2003 12:35:56 -0700 (MST) From: Roger Sayle To: cygwin AT cygwin DOT com Subject: [Problem] mempcpy is missing? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII I apologise if this is the wrong list to report bugs. I have searched the archive and haven't been able to find a reference to mempcpy. To summarise, /usr/lib/libc.a doesn't currently define the function mempcpy even though its prototyped in /usr/include/string.h, and its described in cygwin's (newlib's) man pages. I've tested this on 1.3.17, 1.3.18 and 1.3.20 (as downloaded this morning). Now that GCC's PR bootstrap/9560 is resolved, I've been able to bootstrap mainline GCC on cygwin. I then decided to repeat the bootstrap on a second cygwin machine, but this time the bootstrap failed with a mempcpy redeclared static error message in GCC's gcc/intl/dcigettext.c. The difference is because on my second cygwin box I hadn't installed cygwin's libintl, hence GCC decided to use its local copy exposing the failure. The problem is that with _mempcpy missing from libc.a, configure correctly detects that this function is missing, and undefs HAVE_MEMPCPY. gcc/intl/dcigettext.c then defines a "static" copy of mempcy #ifndef HAVE_MEMPCPY. This then conflicts with cygwin's /usr/include/string.h that prototypes mempcpy as non-static even though it doesn't provide a working implementation. The short-term work-around is to configure GCC --disable-nls or install the libintl package. The correct fix is for cygwin to either provide an implementation of mempcpy (as it appears to have done at some point in the past) or remove the function prototype from string.h. An intermediate solution might be for libiberty to export a mempcpy that may be used by gcc/intl, without clashing with cygwin's headers. I hope this helps. To repeat the problem attempt to compile the following program: int main() { return mempcpy(0,0,0); } Many thanks in advance, Roger -- Roger Sayle, E-mail: roger AT eyesopen DOT com OpenEye Scientific Software, WWW: http://www.eyesopen.com/ Suite 1107, 3600 Cerrillos Road, Tel: (+1) 505-473-7385 Santa Fe, New Mexico, 87507. Fax: (+1) 505-473-0833 -- 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/