From f80f35d480046f4cc94bd050902037917f2a46ea Mon Sep 17 00:00:00 2001 From: hniksic Date: Thu, 24 Feb 2005 04:58:00 -0800 Subject: [PATCH] [svn] Fix Windows problems introduced by LFS. Published in <87k6oynmj0.fsf@xemacs.org>. --- src/ChangeLog | 7 +++++++ src/mswindows.c | 17 ----------------- src/mswindows.h | 14 +------------- 3 files changed, 8 insertions(+), 30 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index cf9818fb..f4fb7a16 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2005-02-24 Hrvoje Niksic + + * mswindows.c (wget_ftello): Removed. + + * mswindows.h: Remove bogus definition of stat. + (wget_ftello): Remove the leftover ftello replacement. + 2005-02-20 Hrvoje Niksic * mswindows.c (wget_ftello): Wget's replacement for ftello. diff --git a/src/mswindows.c b/src/mswindows.c index 93bf0c69..8c3e84a5 100644 --- a/src/mswindows.c +++ b/src/mswindows.c @@ -209,23 +209,6 @@ str_to_int64 (const char *nptr, char **endptr, int base) #endif /* !defined(_MSC_VER) || _MSC_VER >= 1300 */ -/* A simple clone of ftello. The normal ftell doesn't work for large - files, so this is needed, and used by file_size(), which is itself - used for the --post-file option. - - This function uses fgetpos incorrectly and should be considered a - hack until a better way to tell the stream position is found. */ - -__int64 -wget_ftello (FILE *fp) -{ - fpos_t pos; - if (fgetpos (fp, &pos) != 0) - return -1; - else - return pos; -} - void windows_main_junk (int *argc, char **argv, char **exec_name) { diff --git a/src/mswindows.h b/src/mswindows.h index 652d6f0e..ced740cd 100644 --- a/src/mswindows.h +++ b/src/mswindows.h @@ -99,16 +99,11 @@ __int64 str_to_int64 (const char *, char **, int); /* Transparently support large files, in spirit similar to the POSIX LFS API. */ #define stat(fname, buf) _stati64 (fname, buf) -#define fstat(fd, buf) _fstati64(fd, buf) +#define fstat(fd, buf) _fstati64 (fd, buf) #define struct_stat struct _stati64 #define PATH_SEPARATOR '\\' -/* Microsoft says stat is _stat, Borland doesn't. */ -#ifdef _MSC_VER -# define stat _stat -#endif - #ifdef HAVE_ISATTY /* Microsoft VC supports _isatty; Borland? */ #ifdef _MSC_VER @@ -116,13 +111,6 @@ __int64 str_to_int64 (const char *, char **, int); #endif #endif -/* If ftello is unavailable, use an approximation. */ -#ifndef HAVE_FTELLO -__int64 wget_ftello (FILE *); -# define ftello wget_ftello -# define HAVE_FTELLO -#endif - /* #### Do we need this? */ #include -- 2.39.2