aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/s-oscons-tmplt.c
diff options
context:
space:
mode:
authorThomas Quinot <quinot@adacore.com>2009-04-20 10:45:28 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2009-04-20 12:45:28 +0200
commit2907036db71b583f6a7c627e1e1753e85c779312 (patch)
treeabccfec98396bda557b30cfec0ba8b9cbd863c15 /gcc/ada/s-oscons-tmplt.c
parentd50633515b970d72c074e5face5eecf2dd3fa74a (diff)
downloadgcc-2907036db71b583f6a7c627e1e1753e85c779312.zip
gcc-2907036db71b583f6a7c627e1e1753e85c779312.tar.gz
gcc-2907036db71b583f6a7c627e1e1753e85c779312.tar.bz2
socket.c, [...] (__gnat_inet_pton): Needs to be enabled for HP-UX as well...
2009-04-20 Thomas Quinot <quinot@adacore.com> * socket.c, g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.ads, s-oscons-tmplt.c, gsocket.h, g-socthi-mingw.ads, g-socthi.ads, g-sothco.ads (__gnat_inet_pton): Needs to be enabled for HP-UX as well, since HP-UX supports neither inet_aton nor inet_pton (altough the latter is part of the Single UNIX Specification!). So reorganize code, and share C implementation based on inet_addr(3) with VMS (instead of having a VMS specific Ada implementation in g-socthi-vms.adb). From-SVN: r146396
Diffstat (limited to 'gcc/ada/s-oscons-tmplt.c')
-rw-r--r--gcc/ada/s-oscons-tmplt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c
index 2bcb80a..c3511b9 100644
--- a/gcc/ada/s-oscons-tmplt.c
+++ b/gcc/ada/s-oscons-tmplt.c
@@ -1197,8 +1197,16 @@ CND(Has_Sockaddr_Len, "Sockaddr has sa_len field")
TXT(" Thread_Blocking_IO : constant Boolean := True;")
/*
-- Set False for contexts where socket i/o are process blocking
+
*/
+#ifdef HAVE_INET_PTON
+# define Inet_Pton_Linkname "inet_pton"
+#else
+# define Inet_Pton_Linkname "__gnat_inet_pton"
+#endif
+TXT(" Inet_Pton_Linkname : constant String := \"" Inet_Pton_Linkname "\";")
+
#endif /* HAVE_SOCKETS */
/**