diff options
author | jtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-07-09 17:35:49 +0000 |
---|---|---|
committer | jtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-07-09 17:35:49 +0000 |
commit | efe6c6d05093b71ab015576573c00e70f6bae81a (patch) | |
tree | dab083e3adc7f7a57883189a7709f7d2c6e38f16 /ACE | |
parent | c818d22ca5e353b6e7714ad627fc19123331f7f1 (diff) | |
download | ATCD-efe6c6d05093b71ab015576573c00e70f6bae81a.tar.gz |
ChangeLogTag: Wed Jul 9 16:09:30 UTC 2008 J.T. Conklin <jtc@acorntoolworks.com>
Diffstat (limited to 'ACE')
-rw-r--r-- | ACE/ChangeLog | 18 | ||||
-rw-r--r-- | ACE/ace/README | 2 | ||||
-rw-r--r-- | ACE/ace/Sock_Connect.cpp | 40 | ||||
-rw-r--r-- | ACE/configure.ac | 39 | ||||
-rw-r--r-- | ACE/m4/config_h.m4 | 3 |
5 files changed, 18 insertions, 84 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index 26c20884d4d..326be57b052 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,21 @@ +Wed Jul 9 16:09:30 UTC 2008 J.T. Conklin <jtc@acorntoolworks.com> + + * m4/config_h.m4: + * configure.ac: + + Remove feature test and autoheader template for + ACE_LACKS_WILDCARD_BIND. + + * ace/Sock_Connect.cpp: + + Remove use of ACE_LACKS_WILDCARD_BIND feature test macro. + + * ace/README: + + Remove ACE_LACKS_WILDCARD_BIND from the list of feature test + macros. It was removed since ACE no longer supports any systems + that required it. + Wed Jul 9 16:02:32 UTC 2008 J.T. Conklin <jtc@acorntoolworks.com> * configure.ac: diff --git a/ACE/ace/README b/ACE/ace/README index 8963a283afa..0198799b5e6 100644 --- a/ACE/ace/README +++ b/ACE/ace/README @@ -1162,8 +1162,6 @@ ACE_LACKS_UTSNAME_T Platform lacks struct utsname (e.g., Win32 and VxWorks) ACE_LACKS_UNAME Platform lacks uname calls ACE_LACKS_WAIT The platform lacks wait -ACE_LACKS_WILDCARD_BIND The bind() call will not - select the port if it's 0. ACE_LACKS_WIN32_GETPROCESSTIMES The Windows platform doesn't have GetProcessTimes(). ACE_LACKS_WIN32_MOVEFILEEX The Windows platform doesn't have diff --git a/ACE/ace/Sock_Connect.cpp b/ACE/ace/Sock_Connect.cpp index a182f5a714c..cad9402c1e1 100644 --- a/ACE/ace/Sock_Connect.cpp +++ b/ACE/ace/Sock_Connect.cpp @@ -189,50 +189,10 @@ ACE::bind_port (ACE_HANDLE handle, ACE_UINT32 ip_addr, int address_family) addr.set ((u_short)0, ip_addr, 1, 1); #endif /* ACE_HAS_IPV6 */ -#if !defined (ACE_LACKS_WILDCARD_BIND) // The OS kernel should select a free port for us. return ACE_OS::bind (handle, (sockaddr*)addr.get_addr(), addr.get_size()); -#else - static u_short upper_limit = ACE_MAX_DEFAULT_PORT; - int round_trip = upper_limit; - int lower_limit = IPPORT_RESERVED; - - // We have to select the port explicitly. - - for (;;) - { - addr.set((u_short)upper_limit,ip_addr); - - if (ACE_OS::bind (handle, - (sockaddr*)addr.get_addr() - addr.get_size()) >= 0) - { -#if defined (ACE_WIN32) - upper_limit--; -#endif /* ACE_WIN32 */ - return 0; - } - else if (errno != EADDRINUSE) - return -1; - else - { - upper_limit--; - - // Wrap back around when we reach the bottom. - if (upper_limit <= lower_limit) - upper_limit = ACE_MAX_DEFAULT_PORT; - - // See if we have already gone around once! - if (upper_limit == round_trip) - { - errno = EAGAIN; - return -1; - } - } - } -#endif /* ACE_HAS_WILDCARD_BIND */ } int diff --git a/ACE/configure.ac b/ACE/configure.ac index 959bfe29289..e57049799e4 100644 --- a/ACE/configure.ac +++ b/ACE/configure.ac @@ -3541,45 +3541,6 @@ main () AC_CHECK_FUNC([gethostbyaddr],,) -AC_CHECK_FUNC([bind], - [ - ACE_CACHE_CHECK([if bind() will select the port if it is zero], - [ace_cv_have_wildcard_bind], - [ - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#ifndef ACE_LACKS_SYS_TYPES_H -# include <sys/types.h> -#endif -#include <sys/socket.h> -#include <netinet/in.h> -#include <string.h> /* for memset() */ - - int main () { - - int sockfd = socket(AF_INET, SOCK_STREAM, 0); - - sockaddr_in serv_addr; - - (void) memset ((void *) &serv_addr, 0, sizeof(serv_addr)); - - serv_addr.sin_family = AF_INET; - serv_addr.sin_addr.s_addr = htonl(INADDR_ANY); - serv_addr.sin_port = 0; - - return bind (sockfd, (struct sockaddr *) &serv_addr, - sizeof(serv_addr)); - } - ]])],[ - ace_cv_have_wildcard_bind=yes - ],[ - ace_cv_have_wildcard_bind=no - ],[ - dnl action if cross-compiling - ace_cv_have_wildcard_bind=yes - ]) - ],,[AC_DEFINE([ACE_LACKS_WILDCARD_BIND])]) - ],) - case "$host" in *linux*) dnl Linux Event Poll diff --git a/ACE/m4/config_h.m4 b/ACE/m4/config_h.m4 index 4059cbfc3f3..1336c4b9551 100644 --- a/ACE/m4/config_h.m4 +++ b/ACE/m4/config_h.m4 @@ -887,9 +887,6 @@ AH_TEMPLATE([ACE_LACKS_UNIX_SIGNALS], AH_TEMPLATE([ACE_LACKS_UTSNAME_T], [Platform lacks struct utsname (e.g., Win32 and VxWorks)]) -AH_TEMPLATE([ACE_LACKS_WILDCARD_BIND], -[The bind() call will not select the port if it's 0.]) - AH_TEMPLATE([ACE_MAIN], [Renames "main (int, char *[])", for platforms such as g++/VxWorks that don't allow main. Requires the use of |