summaryrefslogtreecommitdiff
path: root/ace/OS.i
diff options
context:
space:
mode:
Diffstat (limited to 'ace/OS.i')
-rw-r--r--ace/OS.i56
1 files changed, 56 insertions, 0 deletions
diff --git a/ace/OS.i b/ace/OS.i
index 25eb7e7e474..15cdcba7070 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -6063,6 +6063,15 @@ ACE_OS::getprotobyname_r (const char *name,
return result;
else
return 0;
+# elif defined (__GLIBC__) // GNU C library has a different signature
+ if (::getprotobyname_r (name,
+ result,
+ buffer,
+ sizeof (ACE_PROTOENT_DATA),
+ &result) == 0)
+ return result;
+ else
+ return 0;
# else
# if defined(ACE_LACKS_NETDB_REENTRANT_FUNCTIONS)
ACE_UNUSED_ARG (result);
@@ -6120,6 +6129,15 @@ ACE_OS::getprotobynumber_r (int proto,
return result;
else
return 0;
+# elif defined (__GLIBC__) // GNU C library has a different signature
+ if (::getprotobynumber_r (proto,
+ result,
+ buffer,
+ sizeof (ACE_PROTOENT_DATA),
+ &result) == 0)
+ return result;
+ else
+ return 0;
# else
# if defined(ACE_LACKS_NETDB_REENTRANT_FUNCTIONS)
ACE_UNUSED_ARG (result);
@@ -6712,6 +6730,20 @@ ACE_OS::gethostbyaddr_r (const char *addr,
*h_errnop = h_errno;
return (struct hostent *) 0;
}
+# elif defined (__GLIBC__) // GNU C library has a different signature
+ ::memset (buffer, 0, sizeof (ACE_HOSTENT_DATA));
+
+ if (::gethostbyaddr_r ((char *) addr,
+ length,
+ type,
+ result,
+ buffer,
+ sizeof (ACE_HOSTENT_DATA),
+ &result,
+ h_errnop) == 0)
+ return result;
+ else
+ return (struct hostent *) 0;
# else
# if defined(ACE_LACKS_NETDB_REENTRANT_FUNCTIONS)
ACE_UNUSED_ARG (result);
@@ -6781,6 +6813,18 @@ ACE_OS::gethostbyname_r (const char *name,
*h_errnop = h_errno;
return (struct hostent *) 0;
}
+# elif defined (__GLIBC__) // GNU C library has a different signature
+ ::memset (buffer, 0, sizeof (ACE_HOSTENT_DATA));
+
+ if (::gethostbyname_r (name,
+ result,
+ buffer,
+ sizeof (ACE_HOSTENT_DATA),
+ &result,
+ h_errnop) == 0)
+ return result;
+ else
+ return (struct hostent *) 0;
# else
# if defined(ACE_LACKS_NETDB_REENTRANT_FUNCTIONS)
ACE_UNUSED_ARG (result);
@@ -6849,6 +6893,18 @@ ACE_OS::getservbyname_r (const char *svc,
return result;
else
return (struct servent *) 0;
+# elif defined (__GLIBC__) // GNU C library has a different signature
+ ::memset (buf, 0, sizeof (ACE_SERVENT_DATA));
+
+ if (::getservbyname_r (svc,
+ proto,
+ result,
+ buf,
+ sizeof (ACE_SERVENT_DATA),
+ &result) == 0)
+ return result;
+ else
+ return (struct servent *) 0;
# else
# if defined(ACE_LACKS_NETDB_REENTRANT_FUNCTIONS)
ACE_UNUSED_ARG (result);