From 5625415085e68ac5e150f54e685417c866620d76 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sat, 7 Oct 2006 16:24:46 +0000 Subject: dd: make it recognize not only 'k' but 'K' too; make it (partially) CONFIG_LFS-aware --- networking/httpd.c | 12 ++---------- networking/wget.c | 16 ---------------- 2 files changed, 2 insertions(+), 26 deletions(-) (limited to 'networking') diff --git a/networking/httpd.c b/networking/httpd.c index 8f985774e..0e471ba58 100644 --- a/networking/httpd.c +++ b/networking/httpd.c @@ -97,14 +97,6 @@ static const char default_path_httpd_conf[] = "/etc"; static const char httpd_conf[] = "httpd.conf"; static const char home[] = "./"; -#if ENABLE_LFS -# define cont_l_fmt "%lld" -# define cont_l_type (long long) -#else -# define cont_l_fmt "%ld" -# define cont_l_type (long) -#endif - #define TIMEOUT 60 // Note: busybox xfuncs are not used because we want the server to keep running @@ -927,8 +919,8 @@ static int sendHeaders(HttpResponseNum responseNum) if (config->ContentLength != -1) { /* file */ strftime(timeStr, sizeof(timeStr), RFC1123FMT, gmtime(&config->last_mod)); - len += sprintf(buf+len, "Last-Modified: %s\r\n%s " cont_l_fmt "\r\n", - timeStr, Content_length, cont_l_type config->ContentLength); + len += sprintf(buf+len, "Last-Modified: %s\r\n%s "FILEOFF_FMT"\r\n", + timeStr, Content_length, (FILEOFF_TYPE) config->ContentLength); } strcat(buf, "\r\n"); len += 2; diff --git a/networking/wget.c b/networking/wget.c index 788c291b9..eda0bb87c 100644 --- a/networking/wget.c +++ b/networking/wget.c @@ -13,22 +13,6 @@ #include "busybox.h" #include /* for struct option */ -#ifdef CONFIG_LFS -# define FILEOFF_TYPE off64_t -# define FILEOFF_FMT "%lld" -# define LSEEK lseek64 -# define STRTOOFF strtoll -# define SAFE_STRTOOFF safe_strtoll -/* stat64 etc as needed... */ -#else -# define FILEOFF_TYPE off_t -# define FILEOFF_FMT "%ld" -# define LSEEK lseek -# define STRTOOFF strtol -# define SAFE_STRTOOFF safe_strtol -/* Do we need to undefine O_LARGEFILE? */ -#endif - struct host_info { // May be used if we ever will want to free() all xstrdup()s... /* char *allocated; */ -- cgit v1.2.3