New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gcc on IRIX64 breaks inet_ntoa #4479
Comments
From starksb@ebi.ac.ukGreetings, I install/maintain perl on Linux, Solaris, Tru64 and IRIX at our site. It's rather well known that gcc on IRIX64 has problems passing small There is already a something in hints/irix_6.sh for this:
Perhaps that works if you've built gcc with mabi=64 support. We have
But that leaves us with a broken inet_ntoa, reflected by failing tests The fix is very simple, just "roll your own" inet_ntoa, as described =========================================================================== Inline Patch--- ext/Socket/Socket.xs.orig Sun Apr 8 07:09:16 2001
+++ ext/Socket/Socket.xs Thu Oct 4 14:06:12 2001
@@ -166,6 +166,18 @@
#endif /* ! HAS_INET_ATON */
+#if defined(sgi) && defined(__GNUC__)
+char *inet_ntoa(struct in_addr sa)
+{
+ static char addr[20];
+ sprintf(addr, "%d.%d.%d.%d",
+ ((unsigned char *)&sa.s_addr)[0],
+ ((unsigned char *)&sa.s_addr)[1],
+ ((unsigned char *)&sa.s_addr)[2],
+ ((unsigned char *)&sa.s_addr)[3]);
+ return addr;
+}
+#endif
static int
not_here(char *s)
Could this be incorporated? Please CC me on any followups, as I am not subscribed to any perl Thanks for your consideration. Kind regards, ------------------------------------------------------------------- Flags: Site configuration information for perl v5.6.1: Configured by starksb at Thu Oct 4 14:07:08 BST 2001. Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Locally applied patches: @INC for perl v5.6.1: Environment for perl v5.6.1: |
From @jhiOkay, the -mabi=64 needs obviously be tested for existence.
I think static char *my_inet_ntoa() + #define inet_ntoa my_inet_ntoa Isn't the rolling-your-own redundant *with* -mabi=64? In other words, I can see two options: #1 we add the roll-your-own (though a generalized a bit: Now, the problem with both of these options is that to test whether |
Migrated from rt.perl.org#7790 (status was 'open')
Searchable as RT7790$
The text was updated successfully, but these errors were encountered: