]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #896: snapshot 0119 /0214 fails to build on solaris 9 x86 (ufs)
authorhno <>
Sun, 7 Nov 2004 20:58:30 +0000 (20:58 +0000)
committerhno <>
Sun, 7 Nov 2004 20:58:30 +0000 (20:58 +0000)
include/config.h
src/forward.cc
src/ipc.cc
src/peer_select.cc
src/protos.h

index e1742c5bd534fa4c10da549e8933e517996a0bc0..e6595b291a9e34a7d0d87a09601b620063f74004 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: config.h,v 1.10 2004/11/07 13:55:20 hno Exp $
+ * $Id: config.h,v 1.11 2004/11/07 13:58:30 hno Exp $
  *
  * AUTHOR: Duane Wessels
  *
@@ -290,6 +290,25 @@ typedef int socklen_t;
 typedef long mtyp_t;
 #endif
 
+/*
+ * On Solaris 9 x86, gcc may includes a "fixed" set of old system include files
+ * that is incompatible with the updated Solaris header files.
+ */
+#if defined(_SQUID_SOLARIS_) && (defined(i386) || defined(__i386))
+#ifndef pad128_t
+typedef union {
+       long double     _q;
+       int32_t         _l[4];
+} pad128_t;
+#endif
+#ifndef upda128_t
+typedef union {
+       long double     _q;
+       uint32_t        _l[4];
+} upad128_t;
+#endif
+#endif
+
 #if !defined(CACHEMGR_HOSTNAME)
 #define CACHEMGR_HOSTNAME ""
 #endif
index 9a6d635a86de68db02b088e9053dc6a625288c77..4bdefde8b3986823d3d8b1798ddcaee6cff9034e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: forward.cc,v 1.121 2004/10/14 23:32:45 hno Exp $
+ * $Id: forward.cc,v 1.122 2004/11/07 13:58:30 hno Exp $
  *
  * DEBUG: section 17    Request Forwarding
  * AUTHOR: Duane Wessels
@@ -848,12 +848,12 @@ fwdReforward(FwdState * fwdState)
 /* PUBLIC FUNCTIONS */
 
 void
-fwdServersFree(FwdServer ** FS)
+fwdServersFree(FwdServer ** FSVR)
 {
     FwdServer *fs;
 
-    while ((fs = *FS)) {
-        *FS = fs->next;
+    while ((fs = *FSVR)) {
+        *FSVR = fs->next;
         fwdServerFree(fs);
     }
 }
index dd92c5717350ef86415aac39fd1de98e19f26717..27bf7901c921592f8be376b8456c217bb14655a4 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ipc.cc,v 1.36 2003/02/21 22:50:09 robertc Exp $
+ * $Id: ipc.cc,v 1.37 2004/11/07 13:58:30 hno Exp $
  *
  * DEBUG: section 54    Interprocess Communication
  * AUTHOR: Duane Wessels
@@ -78,9 +78,9 @@ ipcCreate(int type, const char *prog, const char *const args[], const char *name
 {
     pid_t pid;
 
-    struct sockaddr_in CS;
+    struct sockaddr_in ChS;
 
-    struct sockaddr_in PS;
+    struct sockaddr_in PaS;
     int crfd = -1;
     int prfd = -1;
     int cwfd = -1;
@@ -194,26 +194,26 @@ ipcCreate(int type, const char *prog, const char *const args[], const char *name
     }
 
     if (type == IPC_TCP_SOCKET || type == IPC_UDP_SOCKET) {
-        len = sizeof(PS);
-        memset(&PS, '\0', len);
+        len = sizeof(PaS);
+        memset(&PaS, '\0', len);
 
-        if (getsockname(pwfd, (struct sockaddr *) &PS, &len) < 0) {
+        if (getsockname(pwfd, (struct sockaddr *) &PaS, &len) < 0) {
             debug(50, 0) ("ipcCreate: getsockname: %s\n", xstrerror());
             return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
         }
 
         debug(54, 3) ("ipcCreate: FD %d sockaddr %s:%d\n",
-                      pwfd, inet_ntoa(PS.sin_addr), ntohs(PS.sin_port));
-        len = sizeof(CS);
-        memset(&CS, '\0', len);
+                      pwfd, inet_ntoa(PaS.sin_addr), ntohs(PaS.sin_port));
+        len = sizeof(ChS);
+        memset(&ChS, '\0', len);
 
-        if (getsockname(crfd, (struct sockaddr *) &CS, &len) < 0) {
+        if (getsockname(crfd, (struct sockaddr *) &ChS, &len) < 0) {
             debug(50, 0) ("ipcCreate: getsockname: %s\n", xstrerror());
             return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
         }
 
         debug(54, 3) ("ipcCreate: FD %d sockaddr %s:%d\n",
-                      crfd, inet_ntoa(CS.sin_addr), ntohs(CS.sin_port));
+                      crfd, inet_ntoa(ChS.sin_addr), ntohs(ChS.sin_port));
     }
 
     if (type == IPC_TCP_SOCKET) {
@@ -243,7 +243,7 @@ ipcCreate(int type, const char *prog, const char *const args[], const char *name
         cwfd = crfd = -1;
 
         if (type == IPC_TCP_SOCKET || type == IPC_UDP_SOCKET) {
-            if (comm_connect_addr(pwfd, &CS) == COMM_ERROR)
+            if (comm_connect_addr(pwfd, &ChS) == COMM_ERROR)
                 return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
         }
 
@@ -314,7 +314,7 @@ ipcCreate(int type, const char *prog, const char *const args[], const char *name
         close(crfd);
         cwfd = crfd = fd;
     } else if (type == IPC_UDP_SOCKET) {
-        if (comm_connect_addr(crfd, &PS) == COMM_ERROR)
+        if (comm_connect_addr(crfd, &PaS) == COMM_ERROR)
             return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
     }
 
index ce2a82a92b0208b736349101900e857f8fae6668..31bd815fef48de368a281e5efa5b97d2d2a00d22 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: peer_select.cc,v 1.132 2003/10/16 21:40:16 robertc Exp $
+ * $Id: peer_select.cc,v 1.133 2004/11/07 13:58:30 hno Exp $
  *
  * DEBUG: section 44    Peer Selection Algorithm
  * AUTHOR: Duane Wessels
@@ -770,7 +770,7 @@ peerHandlePingReply(peer * p, peer_t type, protocol_t proto, void *pingdata, voi
 }
 
 static void
-peerAddFwdServer(FwdServer ** FS, peer * p, hier_code code)
+peerAddFwdServer(FwdServer ** FSVR, peer * p, hier_code code)
 {
     FwdServer *fs = (FwdServer *)memAllocate(MEM_FWD_SERVER);
     debug(44, 5) ("peerAddFwdServer: adding %s %s\n",
@@ -779,10 +779,10 @@ peerAddFwdServer(FwdServer ** FS, peer * p, hier_code code)
     fs->_peer = cbdataReference(p);
     fs->code = code;
 
-    while (*FS)
-        FS = &(*FS)->next;
+    while (*FSVR)
+        FSVR = &(*FSVR)->next;
 
-    *FS = fs;
+    *FSVR = fs;
 }
 
 void *
index 17c040cd7eaea25d3d96b06f9df15e4a41ee5fff..ddc964f18cc509a57a22883e1e0d016362427c08 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: protos.h,v 1.497 2004/11/06 22:20:47 hno Exp $
+ * $Id: protos.h,v 1.498 2004/11/07 13:58:30 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -600,7 +600,7 @@ SQUIDCEXTERN void fwdUnregister(int fd, FwdState *);
 SQUIDCEXTERN void fwdComplete(FwdState * fwdState);
 SQUIDCEXTERN void fwdInit(void);
 SQUIDCEXTERN int fwdReforwardableStatus(http_status s);
-SQUIDCEXTERN void fwdServersFree(FwdServer ** FS);
+SQUIDCEXTERN void fwdServersFree(FwdServer ** FSVR);
 #if WIP_FWD_LOG
 SQUIDCEXTERN void fwdUninit(void);
 SQUIDCEXTERN void fwdLogRotate(void);