From b11eec92e71598ff7479f16870573932f5790039 Mon Sep 17 00:00:00 2001 From: hsn <> Date: Sun, 13 Feb 2005 18:05:06 +0000 Subject: [PATCH] *** empty log message *** --- .cvsignore | 2 ++ ChangeLog | 9 ++++++++- Makefile.am | 3 ++- TODO | 3 ++- bsd_src/.cvsignore | 1 + bsd_src/Makefile.am | 4 +++- bsd_src/find.c | 2 -- bsd_src/function.c | 4 +--- bsd_src/glob.c | 2 -- bsd_src/ls.c | 2 -- bsd_src/operator.c | 2 -- bsd_src/option.c | 2 -- bsd_src/util.c | 2 -- client/.cvsignore | 1 + client/lib.c | 2 -- client/lock.c | 2 -- client/util.c | 2 -- clients/.cvsignore | 1 + clients/fbye.c | 2 -- clients/fcatcmd.c | 2 -- clients/fcdcmd.c | 2 -- clients/fducmd.c | 2 -- clients/ffindcmd.c | 2 -- clients/fgetcmd.c | 2 -- clients/fhost.c | 2 -- clients/fhostcmd.c | 2 -- clients/flscmd.c | 2 -- clients/fmkdir.c | 2 -- clients/fmvcmd.c | 2 -- clients/fprocmd.c | 2 -- clients/fput.c | 2 -- clients/frmcmd.c | 2 -- clients/frmdircmd.c | 2 -- clients/fsetupcmd.c | 2 -- clients/fstatcmd.c | 2 -- clients/fver.c | 2 -- clients/merge.c | 2 -- clients/printpro.c | 2 -- common/Makefile.am | 4 +++- common/strdup.c | 25 ------------------------- common/udp_io.c | 2 -- configure.ac | 18 +++++------------- contrib/.cvsignore | 1 + contrib/Makefile.am | 2 +- doc/.cvsignore | 1 + include/.cvsignore | 1 + include/co_extern.h | 5 ----- include/my-string.h | 25 ------------------------- include/tweak.h | 17 ++++------------- server/.cvsignore | 1 + server/Makefile.am | 1 + server/conf.c | 2 -- server/file.c | 2 -- server/host.c | 2 -- server/server.c | 10 +++++++--- tests/.cvsignore | 1 + tests/parsecheck.c | 2 -- 57 files changed, 47 insertions(+), 161 deletions(-) delete mode 100644 common/strdup.c diff --git a/.cvsignore b/.cvsignore index 0b32edc..9673984 100644 --- a/.cvsignore +++ b/.cvsignore @@ -18,3 +18,5 @@ mkinstalldirs ylwrap *.gz *.bz2 +.sconsign +.sconf_temp diff --git a/ChangeLog b/ChangeLog index f714a32..c0941f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,14 @@ Version NEXT use getopt from stdio.h instead of getopt.h in fspscan.c fspscan now compiles on AIX and other OS without glibc (hoaxter) - + !! fixed fatal bug from b23. Server sends large packets to clients if + client request has not prefered reply size inside. This confuses + all old fsp clients. + common/strdup.c removed + bsd_src/function.c bcopy -> memmove + removed STDC_HEADER checks, drop support for pre-ANSI compilers + started work on alternate SCons based build system + Version 2.8.1b23 - 14 Jan 2005 use srandomdev for seeding of client seq. number generator make dirlister smarter - save one RTT per each directory listings diff --git a/Makefile.am b/Makefile.am index e969c54..b42eda2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,4 +2,5 @@ AUTOMAKE_OPTIONS = foreign SUBDIRS=include bsd_src common client server clients man contrib doc tests EXTRA_DIST=fspd.conf FILES INFO BETA.README \ - MACHINES COPYRIGHT setup.sh setup.csh + MACHINES COPYRIGHT setup.sh setup.csh \ + SConstruct SConscript diff --git a/TODO b/TODO index a840b92..70e0809 100644 --- a/TODO +++ b/TODO @@ -22,7 +22,6 @@ we should add real,portable error codes support to CC_ERR extended data area. PORTING Sven's Slowaris 8 compile problem -Fixed? Sven's AIX compile problem still not builds on freebsd 4 and FreeBSD 5 - non intel platforms? NEEDS IMPROVMENT: @@ -38,6 +37,8 @@ LOCKING CLIENTS :high: +bug in directory listing parsing code, fspclient has it also + pyfsp and fsplib seems to be ok. some client commands should exit with nonzero rc on failure :low: diff --git a/bsd_src/.cvsignore b/bsd_src/.cvsignore index 55edace..468b16e 100644 --- a/bsd_src/.cvsignore +++ b/bsd_src/.cvsignore @@ -3,3 +3,4 @@ Makefile Makefile.in .deps +.sconsign diff --git a/bsd_src/Makefile.am b/bsd_src/Makefile.am index 6b961dd..9cbe217 100644 --- a/bsd_src/Makefile.am +++ b/bsd_src/Makefile.am @@ -3,4 +3,6 @@ noinst_LIBRARIES = libbsdfsp.a libbsdfsp_a_SOURCES = cmp.c fnmatch.c glob.c operator.c print.c \ - find.c function.c ls.c option.c util.c \ No newline at end of file + find.c function.c ls.c option.c util.c + +EXTRA_DIST= SConscript diff --git a/bsd_src/find.c b/bsd_src/find.c index 8c0af49..153c9cb 100644 --- a/bsd_src/find.c +++ b/bsd_src/find.c @@ -41,9 +41,7 @@ #include #include #include "my-string.h" -#ifdef STDC_HEADERS #include -#endif #include "find.h" extern int isoutput; diff --git a/bsd_src/function.c b/bsd_src/function.c index fcbf784..86c281b 100644 --- a/bsd_src/function.c +++ b/bsd_src/function.c @@ -42,9 +42,7 @@ #endif #endif #include -#ifdef STDC_HEADERS #include -#endif #include "my-string.h" #include #include @@ -205,7 +203,7 @@ static void brace_subst (char * orig, char ** store, char * path, int len) client_done(); exit(EX_OSERR); } - bcopy(path, p, plen); + memmove(p,path,plen); p += plen; ++orig; } else diff --git a/bsd_src/glob.c b/bsd_src/glob.c index 5ffff72..d1e0c54 100644 --- a/bsd_src/glob.c +++ b/bsd_src/glob.c @@ -32,9 +32,7 @@ #include #endif -#ifdef STDC_HEADERS #include -#endif #include "my-string.h" #ifndef NCARGS diff --git a/bsd_src/ls.c b/bsd_src/ls.c index 4e8795f..7f71cb7 100644 --- a/bsd_src/ls.c +++ b/bsd_src/ls.c @@ -31,9 +31,7 @@ char copyright[] = #include "client_def.h" #include "c_extern.h" #include -#ifdef STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/bsd_src/operator.c b/bsd_src/operator.c index 76c0e9b..2cf1dce 100644 --- a/bsd_src/operator.c +++ b/bsd_src/operator.c @@ -38,9 +38,7 @@ #include #include #include -#ifdef STDC_HEADERS #include -#endif #include "find.h" /* diff --git a/bsd_src/option.c b/bsd_src/option.c index 93564bb..0b2bd00 100644 --- a/bsd_src/option.c +++ b/bsd_src/option.c @@ -38,9 +38,7 @@ #include #include #include -#ifdef STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/bsd_src/util.c b/bsd_src/util.c index 01216c7..6299184 100644 --- a/bsd_src/util.c +++ b/bsd_src/util.c @@ -23,9 +23,7 @@ #include "tweak.h" #include "common_def.h" #include -#ifdef STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/client/.cvsignore b/client/.cvsignore index 087502e..4010dc5 100644 --- a/client/.cvsignore +++ b/client/.cvsignore @@ -3,3 +3,4 @@ Makefile.in *.o *.a .deps +.sconsign diff --git a/client/lib.c b/client/lib.c index 9ec6149..00f3d87 100644 --- a/client/lib.c +++ b/client/lib.c @@ -12,9 +12,7 @@ #include "client_def.h" #include "c_extern.h" #include "co_extern.h" -#ifdef STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/client/lock.c b/client/lock.c index d0edc75..2ffd02d 100644 --- a/client/lock.c +++ b/client/lock.c @@ -8,9 +8,7 @@ \*********************************************************************/ #include "tweak.h" -#ifdef STDC_HEADERS #include -#endif #include #include "client_def.h" #include "c_extern.h" diff --git a/client/util.c b/client/util.c index f582895..10f017b 100644 --- a/client/util.c +++ b/client/util.c @@ -10,9 +10,7 @@ #include "tweak.h" #include "client_def.h" #include "c_extern.h" -#ifdef STDC_HEADERS #include -#endif #include "my-string.h" static int env_dir_malloced = 0; diff --git a/clients/.cvsignore b/clients/.cvsignore index e40b31a..479c9d9 100644 --- a/clients/.cvsignore +++ b/clients/.cvsignore @@ -18,6 +18,7 @@ fspmerge fstatcmd fver .deps +.sconsign fspprof.c fspsites.c fmvcmd diff --git a/clients/fbye.c b/clients/fbye.c index 09f4fe6..1ca2e46 100644 --- a/clients/fbye.c +++ b/clients/fbye.c @@ -12,9 +12,7 @@ #include "c_extern.h" #include "merge.h" #include -#ifdef STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/clients/fcatcmd.c b/clients/fcatcmd.c index ff600e0..15fd9b0 100644 --- a/clients/fcatcmd.c +++ b/clients/fcatcmd.c @@ -13,9 +13,7 @@ #include "c_extern.h" #include "bsd_extern.h" #include "merge.h" -#ifdef STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/clients/fcdcmd.c b/clients/fcdcmd.c index ec12eca..04fb4ca 100644 --- a/clients/fcdcmd.c +++ b/clients/fcdcmd.c @@ -8,9 +8,7 @@ \*********************************************************************/ #include "tweak.h" -#ifdef STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/clients/fducmd.c b/clients/fducmd.c index bcc9af2..f0ba6a2 100644 --- a/clients/fducmd.c +++ b/clients/fducmd.c @@ -16,9 +16,7 @@ #include "bsd_extern.h" #include "my-string.h" #include "merge.h" -#ifdef STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/clients/ffindcmd.c b/clients/ffindcmd.c index 914540e..c20c262 100644 --- a/clients/ffindcmd.c +++ b/clients/ffindcmd.c @@ -50,9 +50,7 @@ #include #include #include -#ifdef STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/clients/fgetcmd.c b/clients/fgetcmd.c index 2112413..f655138 100644 --- a/clients/fgetcmd.c +++ b/clients/fgetcmd.c @@ -14,9 +14,7 @@ #include "bsd_extern.h" #include "co_extern.h" #include -#ifdef STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/clients/fhost.c b/clients/fhost.c index fb01e7d..55a5999 100644 --- a/clients/fhost.c +++ b/clients/fhost.c @@ -17,9 +17,7 @@ #ifdef HAVE_UNISTD_H #include #endif -#ifdef STDC_HEADERS #include -#endif #ifdef HOST_LOOKUP #include #endif diff --git a/clients/fhostcmd.c b/clients/fhostcmd.c index 8b53950..1781502 100644 --- a/clients/fhostcmd.c +++ b/clients/fhostcmd.c @@ -19,9 +19,7 @@ #ifdef HAVE_UNISTD_H #include #endif -#ifdef STDC_HEADERS #include -#endif #include #ifdef HOST_LOOKUP diff --git a/clients/flscmd.c b/clients/flscmd.c index d3ffd8a..1897e7e 100644 --- a/clients/flscmd.c +++ b/clients/flscmd.c @@ -13,9 +13,7 @@ #include "bsd_extern.h" #include "ls.h" #include "merge.h" -#ifdef STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/clients/fmkdir.c b/clients/fmkdir.c index bfcf958..5733628 100644 --- a/clients/fmkdir.c +++ b/clients/fmkdir.c @@ -10,9 +10,7 @@ #include "tweak.h" #include "client_def.h" #include "c_extern.h" -#ifdef STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/clients/fmvcmd.c b/clients/fmvcmd.c index 4fb33a6..84d45f5 100644 --- a/clients/fmvcmd.c +++ b/clients/fmvcmd.c @@ -13,9 +13,7 @@ #include "c_extern.h" #include "bsd_extern.h" #include "co_extern.h" -#ifdef STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/clients/fprocmd.c b/clients/fprocmd.c index b820d89..ba9cf53 100644 --- a/clients/fprocmd.c +++ b/clients/fprocmd.c @@ -13,9 +13,7 @@ #include "bsd_extern.h" #include "my-string.h" #include "merge.h" -#ifdef STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/clients/fput.c b/clients/fput.c index 521be44..cdf406c 100644 --- a/clients/fput.c +++ b/clients/fput.c @@ -11,9 +11,7 @@ #include "client_def.h" #include "c_extern.h" #include "co_extern.h" -#ifdef STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/clients/frmcmd.c b/clients/frmcmd.c index e279944..e24c095 100644 --- a/clients/frmcmd.c +++ b/clients/frmcmd.c @@ -11,9 +11,7 @@ #include "client_def.h" #include "c_extern.h" #include "bsd_extern.h" -#ifdef STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/clients/frmdircmd.c b/clients/frmdircmd.c index d003607..ababb21 100644 --- a/clients/frmdircmd.c +++ b/clients/frmdircmd.c @@ -11,9 +11,7 @@ #include "client_def.h" #include "c_extern.h" #include "bsd_extern.h" -#ifdef STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/clients/fsetupcmd.c b/clients/fsetupcmd.c index 9116d1f..f2360a9 100644 --- a/clients/fsetupcmd.c +++ b/clients/fsetupcmd.c @@ -19,9 +19,7 @@ #ifdef HAVE_UNISTD_H #include #endif -#ifdef STDC_HEADERS #include -#endif #include #define FSP_STAT stat diff --git a/clients/fstatcmd.c b/clients/fstatcmd.c index 99a598a..6110cd6 100644 --- a/clients/fstatcmd.c +++ b/clients/fstatcmd.c @@ -14,9 +14,7 @@ #include "bsd_extern.h" #include "co_extern.h" #include "merge.h" -#ifdef STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/clients/fver.c b/clients/fver.c index 2e5b5e7..c54b20d 100644 --- a/clients/fver.c +++ b/clients/fver.c @@ -13,9 +13,7 @@ #include "c_extern.h" #include "merge.h" #include -#ifdef STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/clients/merge.c b/clients/merge.c index 1b22fde..3ad476e 100644 --- a/clients/merge.c +++ b/clients/merge.c @@ -9,9 +9,7 @@ #include "tweak.h" #include -#ifdef STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/clients/printpro.c b/clients/printpro.c index 20f73ca..9719e79 100644 --- a/clients/printpro.c +++ b/clients/printpro.c @@ -11,9 +11,7 @@ #include "client_def.h" #include "c_extern.h" #include "my-string.h" -#ifdef STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/common/Makefile.am b/common/Makefile.am index ecca044..1fa5a4c 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -1,4 +1,6 @@ ## Process this file with automake to produce Makefile.in noinst_LIBRARIES=libcommon.a -libcommon_a_SOURCES=random.c strdup.c udp_io.c getsl.c +libcommon_a_SOURCES=random.c udp_io.c getsl.c + +EXTRA_DIST= SConscript diff --git a/common/strdup.c b/common/strdup.c deleted file mode 100644 index 9594131..0000000 --- a/common/strdup.c +++ /dev/null @@ -1,25 +0,0 @@ -#include "tweak.h" - -#ifndef HAVE_STRDUP - -#include -#include "my-string.h" - -char *strdup PROTO1(char *, str) -{ - char *nstr; - - if (str == (char*)0) return str; - - nstr = (char*)malloc((unsigned int)(strlen(str) + 1)); - - if (nstr == (char*)0) { - fprintf(stderr, "strdup(): not enough memory to duplicate `%s'\n", str); - exit(EX_OSERR); - } - - strcpy(nstr, str); - - return nstr; -} -#endif diff --git a/common/udp_io.c b/common/udp_io.c index 5dccd51..aa4efe9 100644 --- a/common/udp_io.c +++ b/common/udp_io.c @@ -11,9 +11,7 @@ #include "common_def.h" #include "co_extern.h" #include "my-string.h" -#ifdef HAVE_STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/configure.ac b/configure.ac index f18f6e3..d842e57 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a working configure script. dnl tested with autoconf 2.57 -AC_INIT(fsp,2.8.1b23,hsn@netmag.cz) +AC_INIT(fsp,2.8.1b24,hsn@netmag.cz) AC_CONFIG_SRCDIR(server/main.c) AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE @@ -94,10 +94,11 @@ AC_CHECK_LIB(efence,EF_Abort) fi AC_HEADER_STDC AC_CHECK_HEADERS(limits.h sys/syslimits.h errno.h) -AC_CHECK_HEADERS(string.h memory.h strings.h unistd.h sys/resource.h utime.h) +AC_CHECK_HEADERS(string.h strings.h unistd.h sys/resource.h utime.h) AC_HEADER_DIRENT AC_HEADER_TIME AC_CHECK_SIZEOF(unsigned) +AC_CHECK_SIZEOF(penis) AC_CHECK_SIZEOF(short) AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(char) @@ -123,7 +124,7 @@ AC_CHECK_TYPE(nlink_t, ,AC_DEFINE(nlink_t, int,[declare nlink_t as int if not fo AC_CHECK_TYPE(rlim_t, ,AC_DEFINE(rlim_t, [unsigned int],[declare rlim_t as unsigned int if not found in ]),[#include ]) AC_TYPE_SIGNAL AC_FUNC_CLOSEDIR_VOID -AC_CHECK_FUNCS(random srandomdev strdup bcopy flock lockf getrlimit fork setsid semop) +AC_CHECK_FUNCS(random srandomdev flock lockf getrlimit fork setsid semop) AC_CHECK_TYPE(union semun, ,AC_DEFINE(_SEM_SEMUN_UNDEFINED,1,[Define if you do not have semun in sys/sem.h]), [#include #include @@ -182,16 +183,7 @@ AC_CHECK_MEMBER(struct dirent.d_fileno,AC_DEFINE(HAVE_D_FILENO,1,[define if you ,[#include ]) AC_HEADER_SYS_WAIT AC_HEADER_STAT -AC_CHECK_HEADERS(tzfile.h sysexits.h) -AC_CACHE_CHECK(for string.h declaring some functions incorrectly,fsp_cv_header_string_bogus,[ -AC_TRY_LINK([#include -#include ],, - fsp_cv_header_string_bogus="no", - fsp_cv_header_string_bogus="yes" -) -]) -if test "x$fsp_cv_header_string_bogus" = "xyes"; then AC_DEFINE(STRING_H_BOGUS,1,[Define if your string library is broken]) -fi +dnl AC_CHECK_HEADERS(sysexits.h) AC_FUNC_VPRINTF AC_CACHE_CHECK(for reliable signals ,fsp_cv_sys_reliable_signals,[ AC_TRY_RUN( diff --git a/contrib/.cvsignore b/contrib/.cvsignore index f1e5259..7d9bbf9 100644 --- a/contrib/.cvsignore +++ b/contrib/.cvsignore @@ -5,3 +5,4 @@ Makefile.in mklargefile fspscan .deps +.sconsign \ No newline at end of file diff --git a/contrib/Makefile.am b/contrib/Makefile.am index 1bdba09..cbc3b3f 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am @@ -1,3 +1,3 @@ bin_PROGRAMS=fspscan -EXTRA_DIST=auto_del.csh rotate.py +EXTRA_DIST=auto_del.csh rotate.py SConscript noinst_HEADERS=fspscan.h diff --git a/doc/.cvsignore b/doc/.cvsignore index d4e49f5..251172e 100644 --- a/doc/.cvsignore +++ b/doc/.cvsignore @@ -1,3 +1,4 @@ Makefile Makefile.in fsp-faq.html +.sconsign diff --git a/include/.cvsignore b/include/.cvsignore index e0730ce..9554d4d 100644 --- a/include/.cvsignore +++ b/include/.cvsignore @@ -3,3 +3,4 @@ Makefile.in stamp-h1 config.h config.h.in +.sconsign diff --git a/include/co_extern.h b/include/co_extern.h index 8da21f5..814ed18 100644 --- a/include/co_extern.h +++ b/include/co_extern.h @@ -3,11 +3,6 @@ /* common routines for both server and clients */ -#ifndef HAVE_STRDUP -/* strdup.c */ -char *strdup (const char *); -#endif - #ifndef HAVE_RANDOM /* random.c */ void srandom (unsigned int); diff --git a/include/my-string.h b/include/my-string.h index 649e77f..8bc9ef2 100644 --- a/include/my-string.h +++ b/include/my-string.h @@ -1,35 +1,10 @@ #ifndef _FSP_MY_STRING_H_ #define _FSP_MY_STRING_H_ 1 -#if defined(STRING_H_BOGUS) && defined(STDC_HEADERS) -extern void bzero(char *, int); -extern void *memset(void *, int, size_t); -extern char *strcpy(char *, const char *); -extern char *strncpy(char *, const char *, size_t); -extern char *strcat(char *, const char *); -extern int strcmp(const char *, const char *); -extern int strncmp(const char *, const char *, size_t); -extern char *strchr(const char *, int); -extern char *strerror(int); -#else - -#if STDC_HEADERS || HAVE_STRING_H #include -/* An ANSI string.h and pre-ANSI memory.h might conflict. */ -#if !STDC_HEADERS && HAVE_MEMORY_H -#include -#endif /* not STDC_HEADERS and HAVE_MEMORY_H */ - -#endif #ifdef HAVE_STRINGS_H #include #endif -#endif - -#ifndef HAVE_BCOPY -#define bcopy(s, d, n) memcpy((d), (s), (n)) -#endif - #endif /* _FSP_MY_STRING_H_ */ diff --git a/include/tweak.h b/include/tweak.h index 78fe9ee..48e8054 100644 --- a/include/tweak.h +++ b/include/tweak.h @@ -1,6 +1,10 @@ #ifndef _FSP_TWEAK_H_ #define _FSP_TWEAK_H_ 1 +#ifdef HAVE_CONFIG_H #include "config.h" +#endif + +#include #ifndef HAVE_FSEEKO /* fallback to old fseek if no fseeko is available */ @@ -22,15 +26,6 @@ #endif #define min(x,y) ((x) < (y) ? (x) : (y)) -#if defined(HAVE_DIRENT_H) -#define HAVE_STRUCT_DIRENT 1 -#else -#undef HAVE_STRUCT_DIRENT -#endif - -#ifdef HAVE_TZFILE_H -#include -#endif #ifndef SECSPERDAY #define SECSPERDAY (long)60*60*24 #endif @@ -46,10 +41,6 @@ #endif #endif -#ifdef HAVE_SYSEXITS_H -#include -#endif - #if !defined(BYTE) #if SIZEOF_CHAR == 1 #define BYTE char diff --git a/server/.cvsignore b/server/.cvsignore index ef0c77c..f224b9b 100644 --- a/server/.cvsignore +++ b/server/.cvsignore @@ -3,3 +3,4 @@ Makefile.in *.o fspd .deps +.sconsign diff --git a/server/Makefile.am b/server/Makefile.am index 5dfda96..580ab02 100644 --- a/server/Makefile.am +++ b/server/Makefile.am @@ -8,3 +8,4 @@ fspd_CFLAGS=-DSYSCONFDIR="\"@sysconfdir@\"" $(AM_CFLAGS) fspd_LDADD=-L../common -lcommon $(EX_LIBS) noinst_HEADERS=fifocache.h pidfile.h +EXTRA_DIST=SConscript diff --git a/server/conf.c b/server/conf.c index 8432776..c662402 100644 --- a/server/conf.c +++ b/server/conf.c @@ -10,9 +10,7 @@ #include "tweak.h" #include -#ifdef STDC_HEADERS #include -#endif #include #include "server_def.h" #include "s_extern.h" diff --git a/server/file.c b/server/file.c index a12941b..ab990d6 100644 --- a/server/file.c +++ b/server/file.c @@ -11,9 +11,7 @@ #include "tweak.h" #include "server_def.h" #include "s_extern.h" -#ifdef STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/server/host.c b/server/host.c index 21bfaf9..1b06edb 100644 --- a/server/host.c +++ b/server/host.c @@ -12,9 +12,7 @@ #include "s_extern.h" #include #include -#ifdef STDC_HEADERS #include -#endif #include "my-string.h" /**************************************************************************** diff --git a/server/server.c b/server/server.c index 419b54a..2952278 100644 --- a/server/server.c +++ b/server/server.c @@ -12,9 +12,7 @@ #include "server_def.h" #include "s_extern.h" #include "co_extern.h" -#ifdef STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif @@ -391,7 +389,13 @@ void serve_file (struct sockaddr_in * from, UBUF * ub, FILE * fp, else if(len <= 0) len = UBUF_SPACE; - } else len = packetsize; /* use default if it doesn't exist */ + } else + { + /* use default if it doesn't exist */ + len = packetsize; + if( len > UBUF_SPACE ) + len = UBUF_SPACE; + } pos = BB_READ4(ub->bb_pos); diff --git a/tests/.cvsignore b/tests/.cvsignore index d41b8c7..1db4ae0 100644 --- a/tests/.cvsignore +++ b/tests/.cvsignore @@ -1,4 +1,5 @@ .deps +.sconsign Makefile Makefile.in mklargefile diff --git a/tests/parsecheck.c b/tests/parsecheck.c index 8d452c7..2d8f528 100644 --- a/tests/parsecheck.c +++ b/tests/parsecheck.c @@ -1,9 +1,7 @@ #include "tweak.h" #include "server_def.h" #include "s_extern.h" -#ifdef STDC_HEADERS #include -#endif #ifdef HAVE_UNISTD_H #include #endif