<87u0o0cgr1.fsf@xemacs.org>.
+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>
* ftp.c (getftp): Initialize err to suppress compiler warning.
#endif /* not HAVE_USLEEP */
}
-#if defined(_MSC_VER) && _MSC_VER < 1300
+#if defined(__BORLANDC__) || (defined(_MSC_VER) && _MSC_VER < 1300)
static inline int
char_value (char c, int base)
return result;
}
-#else /* !defined(_MSC_VER) || _MSC_VER >= 1300 */
+#else /* !defined(__BORLANDC__) && (!defined(_MSC_VER) || _MSC_VER >= 1300) */
__int64
str_to_int64 (const char *nptr, char **endptr, int base)
#endif
}
-#endif /* !defined(_MSC_VER) || _MSC_VER >= 1300 */
+#endif /* !defined(__BORLANDC__) && (!defined(_MSC_VER) || _MSC_VER >= 1300) */
void
windows_main_junk (int *argc, char **argv, char **exec_name)
/* Define a wgint type under Windows. */
typedef __int64 wgint;
#define SIZEOF_WGINT 8
-
-#if defined(_MSC_VER) || defined (__WATCOMC__)
-# define WGINT_MAX 9223372036854775807I64
-#else
-# define WGINT_MAX 9223372036854775807LL
-#endif
+#define WGINT_MAX 9223372036854775807I64
#define str_to_wgint str_to_int64
__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 struct_stat struct _stati64
+
+#ifndef __BORLANDC__
+# define fstat(fd, buf) _fstati64 (fd, buf)
+#endif
+
+#if defined(_MSC_VER)
+# define struct_stat struct _stati64
+#elif defined(__BORLANDC__)
+# define struct_stat struct stati64
+#else
+# define struct_stat struct stat
+#endif
#define PATH_SEPARATOR '\\'
#ifdef HAVE_ISATTY
-/* Microsoft VC supports _isatty; Borland? */
#ifdef _MSC_VER
# define isatty _isatty
#endif
# define C100000000000000000 100000000000000000LL
# define C1000000000000000000 1000000000000000000LL
# else
-# if defined(_MSC_VER) || defined(__WATCOM__)
-/* Otherwise, if __int64 is available (under Windows), use __int64
- constants. */
+# if defined(WINDOWS)
+/* Use __int64 constants under Windows. */
# define C10000000000 10000000000I64
# define C100000000000 100000000000I64
# define C1000000000000 1000000000000I64
# if SIZEOF_LONG_LONG >= SIZEOF_WGINT
# define SPRINTF_WGINT(buf, n) sprintf(buf, "%lld", (long long) (n))
# else
-# ifdef _MSC_VER
+# ifdef WINDOWS
# define SPRINTF_WGINT(buf, n) sprintf(buf, "%I64", (__int64) (n))
# endif
# endif
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 \
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 \
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 \
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
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 \
recur.obj res.obj retr.obj url.obj utils.obj version.obj xmalloc.obj \
- mswindows.obj string_t.obj
+ mswindows.obj
LIBDIR=$(MAKEDIR)\..\lib
res.obj+
retr.obj+
safe-ctype.obj+
-string_t.obj+
url.obj+
utils.obj+
version.obj+
$(SUBDIRS):
cd $@
- $(MAKE)
+ $(MAKEDIR)\$(MAKE)
cd ..
# install everything