summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-10-07 16:24:46 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-10-07 16:24:46 +0000
commit5625415085e68ac5e150f54e685417c866620d76 (patch)
tree4146667d4080f97bc39ac96d844c01a8956aeeca /networking
parent890ac9deb2cc57cadd7aba4ee91bd012e19e239d (diff)
downloadbusybox-w32-5625415085e68ac5e150f54e685417c866620d76.tar.gz
busybox-w32-5625415085e68ac5e150f54e685417c866620d76.tar.bz2
busybox-w32-5625415085e68ac5e150f54e685417c866620d76.zip
dd: make it recognize not only 'k' but 'K' too;
make it (partially) CONFIG_LFS-aware
Diffstat (limited to 'networking')
-rw-r--r--networking/httpd.c12
-rw-r--r--networking/wget.c16
2 files changed, 2 insertions, 26 deletions
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";
97static const char httpd_conf[] = "httpd.conf"; 97static const char httpd_conf[] = "httpd.conf";
98static const char home[] = "./"; 98static const char home[] = "./";
99 99
100#if ENABLE_LFS
101# define cont_l_fmt "%lld"
102# define cont_l_type (long long)
103#else
104# define cont_l_fmt "%ld"
105# define cont_l_type (long)
106#endif
107
108#define TIMEOUT 60 100#define TIMEOUT 60
109 101
110// Note: busybox xfuncs are not used because we want the server to keep running 102// Note: busybox xfuncs are not used because we want the server to keep running
@@ -927,8 +919,8 @@ static int sendHeaders(HttpResponseNum responseNum)
927 919
928 if (config->ContentLength != -1) { /* file */ 920 if (config->ContentLength != -1) { /* file */
929 strftime(timeStr, sizeof(timeStr), RFC1123FMT, gmtime(&config->last_mod)); 921 strftime(timeStr, sizeof(timeStr), RFC1123FMT, gmtime(&config->last_mod));
930 len += sprintf(buf+len, "Last-Modified: %s\r\n%s " cont_l_fmt "\r\n", 922 len += sprintf(buf+len, "Last-Modified: %s\r\n%s "FILEOFF_FMT"\r\n",
931 timeStr, Content_length, cont_l_type config->ContentLength); 923 timeStr, Content_length, (FILEOFF_TYPE) config->ContentLength);
932 } 924 }
933 strcat(buf, "\r\n"); 925 strcat(buf, "\r\n");
934 len += 2; 926 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 @@
13#include "busybox.h" 13#include "busybox.h"
14#include <getopt.h> /* for struct option */ 14#include <getopt.h> /* for struct option */
15 15
16#ifdef CONFIG_LFS
17# define FILEOFF_TYPE off64_t
18# define FILEOFF_FMT "%lld"
19# define LSEEK lseek64
20# define STRTOOFF strtoll
21# define SAFE_STRTOOFF safe_strtoll
22/* stat64 etc as needed... */
23#else
24# define FILEOFF_TYPE off_t
25# define FILEOFF_FMT "%ld"
26# define LSEEK lseek
27# define STRTOOFF strtol
28# define SAFE_STRTOOFF safe_strtol
29/* Do we need to undefine O_LARGEFILE? */
30#endif
31
32struct host_info { 16struct host_info {
33 // May be used if we ever will want to free() all xstrdup()s... 17 // May be used if we ever will want to free() all xstrdup()s...
34 /* char *allocated; */ 18 /* char *allocated; */