From: hno <> Date: Sun, 7 Nov 2004 20:58:30 +0000 (+0000) Subject: Bug #896: snapshot 0119 /0214 fails to build on solaris 9 x86 (ufs) X-Git-Tag: SQUID_3_0_PRE4~996 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b73f343ee1b5cc16a6d3a84ca62f88cbe716b43a;p=thirdparty%2Fsquid.git Bug #896: snapshot 0119 /0214 fails to build on solaris 9 x86 (ufs) --- diff --git a/include/config.h b/include/config.h index e1742c5bd5..e6595b291a 100644 --- a/include/config.h +++ b/include/config.h @@ -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 diff --git a/src/forward.cc b/src/forward.cc index 9a6d635a86..4bdefde8b3 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -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); } } diff --git a/src/ipc.cc b/src/ipc.cc index dd92c57173..27bf7901c9 100644 --- a/src/ipc.cc +++ b/src/ipc.cc @@ -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); } diff --git a/src/peer_select.cc b/src/peer_select.cc index ce2a82a92b..31bd815fef 100644 --- a/src/peer_select.cc +++ b/src/peer_select.cc @@ -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 * diff --git a/src/protos.h b/src/protos.h index 17c040cd7e..ddc964f18c 100644 --- a/src/protos.h +++ b/src/protos.h @@ -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);