[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE_3_3_BRANCH: kdelibs/kdecore/network
From:       Thiago Macieira <thiago.macieira () kdemail ! net>
Date:       2004-08-30 0:50:48
Message-ID: 20040830005048.C5D6726C8 () office ! kde ! org
[Download RAW message or body]

CVS commit by thiago: 

Backporting the Solaris-specific fixes provided by Christopher Layne.


  M +24 -0     kresolver.cpp   1.32.2.2
  M +6 -0      ksocketdevice.cpp   1.18.2.2


--- kdelibs/kdecore/network/kresolver.cpp  #1.32.2.1:1.32.2.2
@@ -629,5 +629,9 @@ QStrList KResolver::protocolName(int pro
     {
       buf = new char[buflen];
+# ifdef USE_SOLARIS // Solaris uses a 4 argument getprotobynumber_r which returns \
struct *protoent or NULL +      if ((pe = getprotobynumber_r(protonum, &protobuf, \
buf, buflen)) && (errno == ERANGE)) +# else
       if (getprotobynumber_r(protonum, &protobuf, buf, buflen, &pe) == ERANGE)
+# endif
         {
           buflen += 1024;
@@ -671,5 +675,9 @@ QStrList KResolver::protocolName(const c
     {
       buf = new char[buflen];
+# ifdef USE_SOLARIS // Solaris uses a 4 argument getprotobyname_r which returns \
struct *protoent or NULL +      if ((pe = getprotobyname_r(protoname, &protobuf, buf, \
buflen)) && (errno == ERANGE)) +# else
       if (getprotobyname_r(protoname, &protobuf, buf, buflen, &pe) == ERANGE)
+# endif
         {
           buflen += 1024;
@@ -713,5 +721,9 @@ int KResolver::protocolNumber(const char
     {
       buf = new char[buflen];
+# ifdef USE_SOLARIS // Solaris uses a 4 argument getprotobyname_r which returns \
struct *protoent or NULL +      if ((pe = getprotobyname_r(protoname, &protobuf, buf, \
buflen)) && (errno == ERANGE)) +# else
       if (getprotobyname_r(protoname, &protobuf, buf, buflen, &pe) == ERANGE)
+# endif
         {
           buflen += 1024;
@@ -751,5 +763,9 @@ int KResolver::servicePort(const char *s
     {
       buf = new char[buflen];
+# ifdef USE_SOLARIS // Solaris uses a 5 argument getservbyname_r which returns \
struct *servent or NULL +      if ((se = getservbyname_r(servname, protoname, \
&servbuf, buf, buflen)) && (errno == ERANGE)) +# else
       if (getservbyname_r(servname, protoname, &servbuf, buf, buflen, &se) == \
ERANGE) +# endif
         {
           buflen += 1024;
@@ -789,5 +805,9 @@ QStrList KResolver::serviceName(const ch
     {
       buf = new char[buflen];
+# ifdef USE_SOLARIS // Solaris uses a 5 argument getservbyname_r which returns \
struct *servent or NULL +      if ((se = getservbyname_r(servname, protoname, \
&servbuf, buf, buflen)) && (errno == ERANGE)) +# else
       if (getservbyname_r(servname, protoname, &servbuf, buf, buflen, &se) == \
ERANGE) +# endif
         {
           buflen += 1024;
@@ -831,5 +851,9 @@ QStrList KResolver::serviceName(int port
     {
       buf = new char[buflen];
+# ifdef USE_SOLARIS // Solaris uses a 5 argument getservbyport_r which returns \
struct *servent or NULL +      if ((se = getservbyport_r(port, protoname, &servbuf, \
buf, buflen)) && (errno == ERANGE)) +# else
       if (getservbyport_r(port, protoname, &servbuf, buf, buflen, &se) == ERANGE)
+# endif
         {
           buflen += 1024;

--- kdelibs/kdecore/network/ksocketdevice.cpp  #1.18.2.1:1.18.2.2
@@ -27,4 +27,7 @@
 #include <qmap.h>
 
+#ifdef USE_SOLARIS
+# include <sys/filio.h>
+#endif
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -54,4 +57,5 @@
 #include "ksocketbase.h"
 #include "ksocketdevice.h"
+#include "ksockssocketdevice.h"
 
 using namespace KNetwork;
@@ -813,4 +817,6 @@ namespace
       return device;
 
+    KSocksSocketDevice::initSocks();
+
     if (defaultImplFactory)
       return defaultImplFactory->create(parent);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic