]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
protect S_ISREG
authorwessels <>
Sat, 1 Feb 1997 04:16:48 +0000 (04:16 +0000)
committerwessels <>
Sat, 1 Feb 1997 04:16:48 +0000 (04:16 +0000)
src/debug.cc
src/stat.cc
src/store.cc
src/useragent.cc

index e57da3e593b173d41878bd21d27ad9d291cba567..d6a9724eeff772211f659fbf3d668dbb9c8f3b03 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: debug.cc,v 1.41 1997/01/15 18:41:47 wessels Exp $
+ * $Id: debug.cc,v 1.42 1997/01/31 21:16:48 wessels Exp $
  *
  * DEBUG: section 0     Debug Routines
  * AUTHOR: Harvest Derived
@@ -251,9 +251,11 @@ _db_rotate_log(void)
 
     if (debug_log_file == NULL)
        return;
+#ifdef S_ISREG
     if (stat(debug_log_file, &sb) == 0)
        if (S_ISREG(sb.st_mode) == 0)
            return;
+#endif
 
     /* Rotate numbers 0 through N up one */
     for (i = Config.Log.rotateNumber; i > 1;) {
index 9761d433b7462e3a2d14b1711bea40fc087527dc..128de6c7582b6d7df5c9a8806154e93f26579fb0 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: stat.cc,v 1.121 1997/01/19 08:32:13 wessels Exp $
+ * $Id: stat.cc,v 1.122 1997/01/31 21:16:49 wessels Exp $
  *
  * DEBUG: section 18    Cache Manager Statistics
  * AUTHOR: Harvest Derived
@@ -1348,9 +1348,11 @@ stat_rotate_log(void)
 
     if ((fname = HTTPCacheInfo->logfilename) == NULL)
        return;
+#ifdef S_ISREG
     if (stat(fname, &sb) == 0)
        if (S_ISREG(sb.st_mode) == 0)
            return;
+#endif
 
     debug(18, 1, "stat_rotate_log: Rotating\n");
 
index 9589a366214a53f196ecea1196df5dceb81f9090..23fe5ea02d10937b1eefd795ec095e0a75309e06 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.cc,v 1.203 1997/01/31 20:14:53 wessels Exp $
+ * $Id: store.cc,v 1.204 1997/01/31 21:16:50 wessels Exp $
  *
  * DEBUG: section 20    Storeage Manager
  * AUTHOR: Harvest Derived
@@ -2735,9 +2735,11 @@ storeRotateLog(void)
        return;
     if (strcmp(fname, "none") == 0)
        return;
+#ifdef S_ISREG
     if (stat(fname, &sb) == 0)
        if (S_ISREG(sb.st_mode) == 0)
            return;
+#endif
 
     debug(20, 1, "storeRotateLog: Rotating.\n");
 
index d76f1f0999813520b32f076220efa85027b3493b..0e59c52bf426292e0e0fc62fa9ab95d76cc90bc9 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: useragent.cc,v 1.3 1997/01/15 18:41:50 wessels Exp $
+ * $Id: useragent.cc,v 1.4 1997/01/31 21:16:51 wessels Exp $
  *
  * DEBUG: section 40    User-Agent logging
  * AUTHOR: Joe Ramey <ramey@csc.ti.com>
@@ -74,9 +74,11 @@ useragentRotateLog(void)
        return;
     if (strcmp(fname, "none") == 0)
        return;
+#ifdef S_ISREG
     if (stat(fname, &sb) == 0)
        if (S_ISREG(sb.st_mode) == 0)
            return;
+#endif
     debug(40, 1, "useragentRotateLog: Rotating.\n");
     /* Rotate numbers 0 through N up one */
     for (i = Config.Log.rotateNumber; i > 1;) {