From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 32573 invoked from network); 8 Sep 1998 22:33:59 -0000 Received: from mail.redhat.com (199.183.24.239) by mail2.redhat.com with SMTP; 8 Sep 1998 22:33:59 -0000 Received: from paralleldata.com (smtp.paralleldata.com [38.153.145.2]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id SAA07594 for ; Tue, 8 Sep 1998 18:34:41 -0400 Received: by paralleldata.com from localhost (router,SLMail V2.5); Tue, 08 Sep 1998 17:34:55 -0500 Received: by paralleldata.com from paralleldata.com (208.252.48.232::mail daemon; unverified,SLMail V2.5); Tue, 08 Sep 1998 17:34:54 -0500 Sender: "Wsb" Message-ID: <35F5B16A.B05CE28B@paralleldata.com> Date: Tue, 08 Sep 1998 22:36:26 +0000 From: "Wes Bauske" Organization: Parallel Data Systems X-Mailer: Mozilla 4.04 [en] (X11; U; Linux 2.0.33 i686) MIME-Version: 1.0 To: axp-list@redhat.com Subject: Re: Problems with g++ and netdb functions References: <199809081133.HAA02409@chmls05.mediaone.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Jerry Feldman wrote: > > I have an application that I am working on which runs on multiple > platforms including Linux Intel, Solaris, NT, Windoz 9x. When calling > any function in netdb, I get a seg fault on Linux Alpha (Red Hat 5.0 > with updated libraries). > The following example code core dumps when compiled as a C++ > program, but runs when compiled as a C program: > #if defined (__cplusplus) > extern "C" { > #endif > void setservent(int); > #if defined (__cplusplus) > } > #endif > int main(int argc, char **argv) > { > setservent(1); > } > My gcc(g++) and glibc versions are: > gcc version 2.7.2.3 > glibc-devel-2.0.7-19 > Kernel:2.0.30 > Platform:UDB 233MHz. (EV45 chip). > > If anyone can suggest a viable solution, I would like to be able to > continue working on this application on Alpha Linux. > Works fine on RH5.0 w/egcs1.03a. Wes