Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Problems with g++ and netdb functions
@ 1998-09-08 11:33 Jerry Feldman
  1998-09-08 21:39 ` Brian Wood
  1998-09-08 22:36 ` Wes Bauske
  0 siblings, 2 replies; 6+ messages in thread
From: Jerry Feldman @ 1998-09-08 11:33 UTC (permalink / raw)
  To: axp-list

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. 

+----------------------------------------------+
Gerald Feldman <gaf@mediaone.net>
Boston Computer Solutions and Consulting
ICQ#156300


^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: Problems with g++ and netdb functions
@ 1998-09-08 23:23 Greg Lindahl
  1998-09-11  1:17 ` Jerry Feldman
  0 siblings, 1 reply; 6+ messages in thread
From: Greg Lindahl @ 1998-09-08 23:23 UTC (permalink / raw)
  To: axp-list

> 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);
> }

Lord only knows if the RedHat 5.0 C++ stuff was ever really
fixed. You're much better off installing 5.1 or egcs.

-- g


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1998-09-11  1:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-09-08 11:33 Problems with g++ and netdb functions Jerry Feldman
1998-09-08 21:39 ` Brian Wood
1998-09-09 14:46   ` Charl Botha
1998-09-08 22:36 ` Wes Bauske
  -- strict thread matches above, loose matches on Subject: below --
1998-09-08 23:23 Greg Lindahl
1998-09-11  1:17 ` Jerry Feldman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox