From dbdc65fe2db3ec5137081bc4d72d518bb65cffd3 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Mon, 12 Nov 2007 12:51:35 +0100 Subject: [PATCH] Revert the NO_ST_BLOCKS hack. This conditional was needed to work around the missing st_blocks member in Windows's struct stat. --- Makefile | 2 +- builtin-count-objects.c | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 0dc4200561..ff2a5ed787 100644 --- a/Makefile +++ b/Makefile @@ -512,7 +512,7 @@ ifneq (,$(findstring MINGW,$(uname_S))) NO_MKDTEMP = YesPlease NO_SVN_TESTS=YesPlease NO_PERL_MAKEMAKER=YesPlease - COMPAT_CFLAGS += -DNO_ST_BLOCKS -DSTRIP_EXTENSION=\".exe\" -D__USE_MINGW_ACCESS -DNOGDI -I compat + COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\" -D__USE_MINGW_ACCESS -DNOGDI -I compat COMPAT_OBJS += compat/mingw.o compat/fnmatch.o compat/regex.o EXTLIBS += -lws2_32 X = .exe diff --git a/builtin-count-objects.c b/builtin-count-objects.c index 762c024279..f00306fb67 100644 --- a/builtin-count-objects.c +++ b/builtin-count-objects.c @@ -43,11 +43,7 @@ static void count_objects(DIR *d, char *path, int len, int verbose, if (lstat(path, &st) || !S_ISREG(st.st_mode)) bad = 1; else -#ifndef NO_ST_BLOCKS (*loose_size) += xsize_t(st.st_blocks); -#else - (*loose_size) += xsize_t((st.st_size+511)/512); -#endif } if (bad) { if (verbose) {