mips-irix-6.2 inet_ntoa bug

Tim Wicinski tim@meer.net
Fri Sep 18 20:10:00 GMT 1998


i have this small program which does not work with egcs under irix 6.2. 

my egcs version is quite recent: 

/usr/local/lib/gcc-lib/mips-sgi-irix6.2/egcs-2.92.07/specs
gcc version egcs-2.92.07 19980917 (gcc2 ss-980609 experimental)

----
 #include <stdio.h>
 #include <netinet/in.h>
 #include <netdb.h>


main ()
{
	struct hostent *host;
	struct in_addr sin;
	char *c;

	host = gethostbyname ("meer.net");
	bcopy(host->h_addr_list[0], &sin, host->h_length); 
	printf ("%s\n", inet_ntoa (sin));
}
--

here is what my output is:

scavies_tim:[1004] gcc -g -o g g.c
scavies_tim:[1005] ./g 
255.255.255.255

---

regular cc works, and this worked under egcs on 5.3, so i'm led to
believe it's some 64 bit curse.  how do i make this work? 

thanks
tim 



More information about the Gcc-bugs mailing list