]> err.no Git - sope/commitdiff
ported to recent FreeBSD
authorznek <znek@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Tue, 7 Aug 2007 15:16:41 +0000 (15:16 +0000)
committerznek <znek@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Tue, 7 Aug 2007 15:16:41 +0000 (15:16 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1522 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-core/NGStreams/ChangeLog
sope-core/NGStreams/NGInternetSocketAddress.m
sope-core/NGStreams/Version

index 10c26c598c8e238cf77fbf8b3faf4aa70f3e7010..843c1b74ef4146bc188692c07ee95b96ad9e9142 100644 (file)
@@ -1,3 +1,12 @@
+2007-08-07  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * NGInternetSocketAddress.m: do not define USE_GETHOSTBYNAME_R on
+         FreeBSD (although HAVE_GETHOSTBYNAME_R is defined). It appears
+         gethostbyname() is thread safe on FreeBSD and there are 3 API
+         versions of gethostbyname_r(), which isn't worth the hassle
+         to check in this case. Changed code to consequently use
+         USE_GETHOSTBYNAME_R. (v4.7.52)
+         
 2006-07-04  Helge Hess  <helge.hess@opengroupware.org>
 
        * 64bit fixes (v4.5.51)
index 40efcfd5beea955d181d98c526f28d72cb9d22b7..7634e803a095352214e5e81d5979d551399d9c86 100644 (file)
@@ -48,7 +48,7 @@
 #include "NGInternetSocketDomain.h"
 #include "common.h"
 
-#if defined(HAVE_GETHOSTBYNAME_R) && !defined(linux)
+#if defined(HAVE_GETHOSTBYNAME_R) && !defined(linux) && !defined(__FreeBSD__)
 #define USE_GETHOSTBYNAME_R 1
 #endif
 
@@ -140,7 +140,7 @@ static inline NSString *_nameOfLocalhost(void) {
 #if USE_GETHOSTBYNAME_R
         struct hostent hostEntityBuffer;
         char buffer[8200];
-       
+
         hostEntity = gethostbyaddr_r((char *)&(sockAddr->sin_addr.s_addr),
                                      4,
                                      [[self domain] socketDomain],
@@ -277,14 +277,14 @@ static inline NSString *_nameOfLocalhost(void) {
       BOOL didFail   = NO;
       int  errorCode = 0;
       int  addrType  = AF_INET;
-#if defined(HAVE_GETHOSTBYNAME_R) && !defined(linux)
+#if defined(USE_GETHOSTBYNAME_R)
       char buffer[4096];
       struct hostent hostEntity;
 #else
       struct hostent *hostEntity; // only valid during lock
 #endif
 
-#if defined(HAVE_GETHOSTBYNAME_R) && !defined(linux)
+#if defined(USE_GETHOSTBYNAME_R)
       if (gethostbyname_r(chost, &hostEntity,
                           buffer, sizeof(buffer), &errorCode) == NULL) {
         didFail = YES;
index b8f0fed54a42bb84fdba691a114d6b0872b2f977..063faafb4c27540a9ba0e6b8df743c7cf2c48e11 100644 (file)
@@ -1,3 +1,3 @@
 # version file
 
-SUBMINOR_VERSION:=51
+SUBMINOR_VERSION:=52