From: hno <> Date: Sun, 7 Apr 2002 17:52:33 +0000 (+0000) Subject: Conditionally remove the sb variable definitions when their uses X-Git-Tag: SQUID_3_0_PRE1~1113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f56cfef612e087f6083dfe9e036bbc14b197eab;p=thirdparty%2Fsquid.git Conditionally remove the sb variable definitions when their uses are not available on the platform (fchmod) --- diff --git a/src/fs/aufs/store_dir_aufs.cc b/src/fs/aufs/store_dir_aufs.cc index 08966bf3b4..85e2e384ff 100644 --- a/src/fs/aufs/store_dir_aufs.cc +++ b/src/fs/aufs/store_dir_aufs.cc @@ -1,6 +1,6 @@ /* - * $Id: store_dir_aufs.cc,v 1.43 2002/04/06 15:08:05 hno Exp $ + * $Id: store_dir_aufs.cc,v 1.44 2002/04/07 11:52:33 hno Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -954,7 +954,9 @@ static int storeAufsDirWriteCleanStart(SwapDir * sd) { struct _clean_state *state = xcalloc(1, sizeof(*state)); +#if HAVE_FCHMOD struct stat sb; +#endif sd->log.clean.write = NULL; sd->log.clean.state = NULL; state->new = xstrdup(storeAufsDirSwapLogFile(sd, ".clean")); diff --git a/src/fs/coss/store_dir_coss.cc b/src/fs/coss/store_dir_coss.cc index e5e956f10d..ca81999184 100644 --- a/src/fs/coss/store_dir_coss.cc +++ b/src/fs/coss/store_dir_coss.cc @@ -1,6 +1,6 @@ /* - * $Id: store_dir_coss.cc,v 1.32 2002/04/06 08:49:43 adrian Exp $ + * $Id: store_dir_coss.cc,v 1.33 2002/04/07 11:52:33 hno Exp $ * * DEBUG: section 81 Store COSS Directory Routines * AUTHOR: Eric Stern @@ -480,7 +480,9 @@ storeCossDirWriteCleanStart(SwapDir * sd) { CossInfo *cs = (CossInfo *) sd->fsdata; struct _clean_state *state = xcalloc(1, sizeof(*state)); +#if HAVE_FCHMOD struct stat sb; +#endif state->new = xstrdup(storeCossDirSwapLogFile(sd, ".clean")); state->fd = file_open(state->new, O_WRONLY | O_CREAT | O_TRUNC); if (state->fd < 0) { diff --git a/src/fs/diskd/store_dir_diskd.cc b/src/fs/diskd/store_dir_diskd.cc index a21b131124..9305f625ac 100644 --- a/src/fs/diskd/store_dir_diskd.cc +++ b/src/fs/diskd/store_dir_diskd.cc @@ -1,6 +1,6 @@ /* - * $Id: store_dir_diskd.cc,v 1.63 2002/04/06 12:54:42 hno Exp $ + * $Id: store_dir_diskd.cc,v 1.64 2002/04/07 11:52:33 hno Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -1137,7 +1137,9 @@ static int storeDiskdDirWriteCleanStart(SwapDir * sd) { struct _clean_state *state = xcalloc(1, sizeof(*state)); +#if HAVE_FCHMOD struct stat sb; +#endif sd->log.clean.write = NULL; sd->log.clean.state = NULL; state->new = xstrdup(storeDiskdDirSwapLogFile(sd, ".clean")); diff --git a/src/fs/ufs/store_dir_ufs.cc b/src/fs/ufs/store_dir_ufs.cc index 6839a650c5..818fbec97f 100644 --- a/src/fs/ufs/store_dir_ufs.cc +++ b/src/fs/ufs/store_dir_ufs.cc @@ -1,6 +1,6 @@ /* - * $Id: store_dir_ufs.cc,v 1.42 2002/04/06 08:49:44 adrian Exp $ + * $Id: store_dir_ufs.cc,v 1.43 2002/04/07 11:52:34 hno Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -952,7 +952,9 @@ static int storeUfsDirWriteCleanStart(SwapDir * sd) { struct _clean_state *state = xcalloc(1, sizeof(*state)); +#if HAVE_FCHMOD struct stat sb; +#endif sd->log.clean.write = NULL; sd->log.clean.state = NULL; state->new = xstrdup(storeUfsDirSwapLogFile(sd, ".clean"));