From: Colm MacCarthaigh Date: Fri, 26 Aug 2005 17:54:18 +0000 (+0000) Subject: Allow htcacheclean to deal in gigabytes. X-Git-Tag: 2.3.0~3065 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42377545e23d899866ecc7fd9738fff22bc021e5;p=thirdparty%2Fapache%2Fhttpd.git Allow htcacheclean to deal in gigabytes. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@240297 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/htcacheclean.c b/support/htcacheclean.c index bfdba1c9971..20c184ffa3f 100644 --- a/support/htcacheclean.c +++ b/support/htcacheclean.c @@ -63,6 +63,7 @@ #define SECS_PER_MIN 60 #define KBYTE 1024 #define MBYTE 1048576 +#define GBYTE 1073741824 #define DIRINFO (APR_FINFO_MTIME|APR_FINFO_SIZE|APR_FINFO_TYPE|APR_FINFO_LINK) @@ -874,6 +875,9 @@ int main(int argc, const char * const argv[]) else if ((*end == 'M' || *end == 'm') && !end[1]) { max *= MBYTE; } + else if ((*end == 'G' || *end == 'g') && !end[1]) { + max *= GBYTE; + } else if (*end && /* neither empty nor [Bb] */ ((*end != 'B' && *end != 'b') || end[1])) { rv = APR_EGENERAL;