[squid-users] Fwd: squid 3.2.0.17 compilation with gcc 3.3.3

From: Filippo Carletti <filippo.carletti_at_gmail.com>
Date: Mon, 2 Jul 2012 17:53:00 +0200

I tried to compile squid 3.2.0.17 with gcc 3.3.3 on linux and I
encountered two errors.
Being a newb with C++, googling a bit I tried to fix the errors and
assembled a small patch.
Here it is:

--- squid-3.2.0.17-old/src/base/TextException.h 2012-04-12
15:43:26.000000000 +0200
+++ squid-3.2.0.17/src/base/TextException.h 2012-06-27
18:00:53.000000000 +0200
@@ -5,6 +5,9 @@

 #include <exception>

+#if __GNUC__
+__attribute__((unused))
+#endif
 static unsigned int FileNameHashCached(const char *fname);

 // simple exception to report custom errors
@@ -60,11 +63,13 @@
     return lastHash;
 }

+#if 0
 /// Avoids "defined but not used" warnings for FileNameHashCached
 class FileNameHashCacheUser
 {
     bool use(void *ptr=NULL) { return ptr != (void*)&FileNameHashCached; }
 };
+#endif

 #if !defined(TexcHere)
 # define TexcHere(msg) TextException((msg), __FILE__, __LINE__, \
--- squid-3.2.0.17-old/src/structs.h 2012-04-12 15:43:26.000000000 +0200
+++ squid-3.2.0.17/src/structs.h 2012-06-28 17:38:12.000000000 +0200
@@ -285,7 +285,7 @@

     char *as_whois_server;

- struct {
+ typedef struct xLog {
         char *store;
         char *swap;
         customlog *accesslogs;
@@ -293,7 +293,8 @@
         customlog *icaplogs;
 #endif
         int rotateNumber;
- } Log;
+ };
+ struct xLog Log;
     char *adminEmail;
     char *EmailFrom;
     char *EmailProgram;

-- 
Ciao,
Filippo
Received on Mon Jul 02 2012 - 15:53:06 MDT

This archive was generated by hypermail 2.2.0 : Tue Jul 03 2012 - 12:00:02 MDT