From owner-freebsd-bugs Fri Feb 1 12:20:10 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 9AD7537B402 for ; Fri, 1 Feb 2002 12:20:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g11KK1o86116; Fri, 1 Feb 2002 12:20:01 -0800 (PST) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8023237B41B for ; Fri, 1 Feb 2002 12:14:33 -0800 (PST) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g11KEXw80582; Fri, 1 Feb 2002 12:14:33 -0800 (PST) (envelope-from nobody) Message-Id: <200202012014.g11KEXw80582@freefall.freebsd.org> Date: Fri, 1 Feb 2002 12:14:33 -0800 (PST) From: Frank Dabek To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: gnu/34538: mp_set_memory_functions not extern "C"'d in gmp.h Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 34538 >Category: gnu >Synopsis: mp_set_memory_functions not extern "C"'d in gmp.h >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Feb 01 12:20:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Frank Dabek >Release: 4.5 stable >Organization: LCS >Environment: uname -a FreeBSD supervised-residence.lcs.mit.edu 4.5-RELEASE FreeBSD 4.5-RELEASE #1: Thu Jan 31 13:36:23 EST 2002 rtm@frenulum.lcs.mit.edu:/usr/src/sys/compile/PDOS-UNI i386 >Description: At line 171 (or so) in /usr/include/gmp.h, void mp_set_memory_functions _PROTO ((void *(*) (size_t), void *(*) (void *, size_t, size_t), void (*) (void *, size_t))); is not included in the extern "C" { declaration of line 177 (or so) This makes it impossible to link C++ programs which use this function. >How-To-Repeat: use mp_set_memory_functions in a C++ program and link it against libgmp.a. The linker will report mp_set_memory_functions as an unresolved symbol (since C++ is mangling its name) >Fix: move mp_set_memory_functions into the extern "C" >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message