mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Large file fixes for Borland C, published in
<87u0o0cgr1.fsf@xemacs.org>.
This commit is contained in:
parent
b3e6d3841e
commit
0c4e666cb6
@ -1,3 +1,17 @@
|
|||||||
|
2005-02-26 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
|
* utils.c: Use the nnnI64 syntax for __int64 constants under all
|
||||||
|
Windows compilers.
|
||||||
|
(SPRINTF_WGINT): Use "%I64" under all Windows compilers.
|
||||||
|
|
||||||
|
* mswindows.h (WGINT_MAX): Use the nnnI64 syntax for
|
||||||
|
__int64 constants under all Windows compilers.
|
||||||
|
(struct_stat): Use `struct stati64' under Borland C.
|
||||||
|
(fstat): Don't redefine to _fstati64 under Borland.
|
||||||
|
|
||||||
|
* mswindows.c: Define str_to_int64 under Borland C as well as
|
||||||
|
under (older) Visual C.
|
||||||
|
|
||||||
2005-02-25 Hrvoje Niksic <hniksic@xemacs.org>
|
2005-02-25 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
* ftp.c (getftp): Initialize err to suppress compiler warning.
|
* ftp.c (getftp): Initialize err to suppress compiler warning.
|
||||||
|
@ -86,7 +86,7 @@ xsleep (double seconds)
|
|||||||
#endif /* not HAVE_USLEEP */
|
#endif /* not HAVE_USLEEP */
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(_MSC_VER) && _MSC_VER < 1300
|
#if defined(__BORLANDC__) || (defined(_MSC_VER) && _MSC_VER < 1300)
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
char_value (char c, int base)
|
char_value (char c, int base)
|
||||||
@ -195,7 +195,7 @@ str_to_int64 (const char *nptr, char **endptr, int base)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* !defined(_MSC_VER) || _MSC_VER >= 1300 */
|
#else /* !defined(__BORLANDC__) && (!defined(_MSC_VER) || _MSC_VER >= 1300) */
|
||||||
|
|
||||||
__int64
|
__int64
|
||||||
str_to_int64 (const char *nptr, char **endptr, int base)
|
str_to_int64 (const char *nptr, char **endptr, int base)
|
||||||
@ -207,7 +207,7 @@ str_to_int64 (const char *nptr, char **endptr, int base)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !defined(_MSC_VER) || _MSC_VER >= 1300 */
|
#endif /* !defined(__BORLANDC__) && (!defined(_MSC_VER) || _MSC_VER >= 1300) */
|
||||||
|
|
||||||
void
|
void
|
||||||
windows_main_junk (int *argc, char **argv, char **exec_name)
|
windows_main_junk (int *argc, char **argv, char **exec_name)
|
||||||
|
@ -83,12 +83,7 @@ so, delete this exception statement from your version. */
|
|||||||
/* Define a wgint type under Windows. */
|
/* Define a wgint type under Windows. */
|
||||||
typedef __int64 wgint;
|
typedef __int64 wgint;
|
||||||
#define SIZEOF_WGINT 8
|
#define SIZEOF_WGINT 8
|
||||||
|
|
||||||
#if defined(_MSC_VER) || defined (__WATCOMC__)
|
|
||||||
#define WGINT_MAX 9223372036854775807I64
|
#define WGINT_MAX 9223372036854775807I64
|
||||||
#else
|
|
||||||
# define WGINT_MAX 9223372036854775807LL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define str_to_wgint str_to_int64
|
#define str_to_wgint str_to_int64
|
||||||
__int64 str_to_int64 (const char *, char **, int);
|
__int64 str_to_int64 (const char *, char **, int);
|
||||||
@ -99,13 +94,22 @@ __int64 str_to_int64 (const char *, char **, int);
|
|||||||
/* Transparently support large files, in spirit similar to the POSIX
|
/* Transparently support large files, in spirit similar to the POSIX
|
||||||
LFS API. */
|
LFS API. */
|
||||||
#define stat(fname, buf) _stati64 (fname, buf)
|
#define stat(fname, buf) _stati64 (fname, buf)
|
||||||
|
|
||||||
|
#ifndef __BORLANDC__
|
||||||
# define fstat(fd, buf) _fstati64 (fd, buf)
|
# define fstat(fd, buf) _fstati64 (fd, buf)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
# define struct_stat struct _stati64
|
# define struct_stat struct _stati64
|
||||||
|
#elif defined(__BORLANDC__)
|
||||||
|
# define struct_stat struct stati64
|
||||||
|
#else
|
||||||
|
# define struct_stat struct stat
|
||||||
|
#endif
|
||||||
|
|
||||||
#define PATH_SEPARATOR '\\'
|
#define PATH_SEPARATOR '\\'
|
||||||
|
|
||||||
#ifdef HAVE_ISATTY
|
#ifdef HAVE_ISATTY
|
||||||
/* Microsoft VC supports _isatty; Borland? */
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
# define isatty _isatty
|
# define isatty _isatty
|
||||||
#endif
|
#endif
|
||||||
|
@ -1263,9 +1263,8 @@ numdigit (wgint number)
|
|||||||
# define C100000000000000000 100000000000000000LL
|
# define C100000000000000000 100000000000000000LL
|
||||||
# define C1000000000000000000 1000000000000000000LL
|
# define C1000000000000000000 1000000000000000000LL
|
||||||
# else
|
# else
|
||||||
# if defined(_MSC_VER) || defined(__WATCOM__)
|
# if defined(WINDOWS)
|
||||||
/* Otherwise, if __int64 is available (under Windows), use __int64
|
/* Use __int64 constants under Windows. */
|
||||||
constants. */
|
|
||||||
# define C10000000000 10000000000I64
|
# define C10000000000 10000000000I64
|
||||||
# define C100000000000 100000000000I64
|
# define C100000000000 100000000000I64
|
||||||
# define C1000000000000 1000000000000I64
|
# define C1000000000000 1000000000000I64
|
||||||
@ -1287,7 +1286,7 @@ numdigit (wgint number)
|
|||||||
# if SIZEOF_LONG_LONG >= SIZEOF_WGINT
|
# if SIZEOF_LONG_LONG >= SIZEOF_WGINT
|
||||||
# define SPRINTF_WGINT(buf, n) sprintf(buf, "%lld", (long long) (n))
|
# define SPRINTF_WGINT(buf, n) sprintf(buf, "%lld", (long long) (n))
|
||||||
# else
|
# else
|
||||||
# ifdef _MSC_VER
|
# ifdef WINDOWS
|
||||||
# define SPRINTF_WGINT(buf, n) sprintf(buf, "%I64", (__int64) (n))
|
# define SPRINTF_WGINT(buf, n) sprintf(buf, "%I64", (__int64) (n))
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
@ -72,13 +72,13 @@ SRC = cmpt.c safe-ctype.c convert.c connect.c host.c http.c netrc.c \
|
|||||||
ftp-basic.c ftp.c ftp-ls.c ftp-opie.c getopt.c hash.c \
|
ftp-basic.c ftp.c ftp-ls.c ftp-opie.c getopt.c hash.c \
|
||||||
html-parse.c html-url.c progress.c retr.c recur.c res.c url.c cookies.c \
|
html-parse.c html-url.c progress.c retr.c recur.c res.c url.c cookies.c \
|
||||||
init.c utils.c main.c version.c xmalloc.c mswindows.c \
|
init.c utils.c main.c version.c xmalloc.c mswindows.c \
|
||||||
gen-md5.c gnu-md5.c log.c string_t.c $(SSLSRC)
|
gen-md5.c gnu-md5.c log.c $(SSLSRC)
|
||||||
|
|
||||||
OBJ = cmpt$o safe-ctype$o convert$o connect$o host$o http$o netrc$o \
|
OBJ = cmpt$o safe-ctype$o convert$o connect$o host$o http$o netrc$o \
|
||||||
ftp-basic$o ftp$o ftp-ls$o ftp-opie$o getopt$o hash$o \
|
ftp-basic$o ftp$o ftp-ls$o ftp-opie$o getopt$o hash$o \
|
||||||
html-parse$o html-url$o progress$o retr$o recur$o res$o url$o cookies$o \
|
html-parse$o html-url$o progress$o retr$o recur$o res$o url$o cookies$o \
|
||||||
init$o utils$o main$o version$o xmalloc$o mswindows$o \
|
init$o utils$o main$o version$o xmalloc$o mswindows$o \
|
||||||
gen-md5$o gnu-md5$o log$o string_t$o $(SSLOBJ)
|
gen-md5$o gnu-md5$o log$o $(SSLOBJ)
|
||||||
|
|
||||||
.SUFFIXES: .c .obj
|
.SUFFIXES: .c .obj
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ OBJS=cmpt.obj connect.obj convert.obj ftp.obj ftp-basic.obj \
|
|||||||
http.obj init.obj log.obj main.obj gnu-md5.obj netrc.obj \
|
http.obj init.obj log.obj main.obj gnu-md5.obj netrc.obj \
|
||||||
safe-ctype.obj hash.obj progress.obj gen-md5.obj cookies.obj \
|
safe-ctype.obj hash.obj progress.obj gen-md5.obj cookies.obj \
|
||||||
recur.obj res.obj retr.obj url.obj utils.obj version.obj xmalloc.obj \
|
recur.obj res.obj retr.obj url.obj utils.obj version.obj xmalloc.obj \
|
||||||
mswindows.obj string_t.obj
|
mswindows.obj
|
||||||
|
|
||||||
LIBDIR=$(MAKEDIR)\..\lib
|
LIBDIR=$(MAKEDIR)\..\lib
|
||||||
|
|
||||||
@ -48,7 +48,6 @@ recur.obj+
|
|||||||
res.obj+
|
res.obj+
|
||||||
retr.obj+
|
retr.obj+
|
||||||
safe-ctype.obj+
|
safe-ctype.obj+
|
||||||
string_t.obj+
|
|
||||||
url.obj+
|
url.obj+
|
||||||
utils.obj+
|
utils.obj+
|
||||||
version.obj+
|
version.obj+
|
||||||
|
@ -38,7 +38,7 @@ all: Makefile $(SUBDIRS)
|
|||||||
|
|
||||||
$(SUBDIRS):
|
$(SUBDIRS):
|
||||||
cd $@
|
cd $@
|
||||||
$(MAKE)
|
$(MAKEDIR)\$(MAKE)
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# install everything
|
# install everything
|
||||||
|
Loading…
x
Reference in New Issue
Block a user