patch 7.4.1975
Problem: On MS-Windows large files (> 2Gbyte) cause problems.
Solution: Use "off_T" instead of "off_t". Use "stat_T" instead of "struct
stat". Use 64 bit system functions if available. (Ken Takata)
diff --git a/src/gui_at_fs.c b/src/gui_at_fs.c
index 0606fba..e89e853 100644
--- a/src/gui_at_fs.c
+++ b/src/gui_at_fs.c
@@ -183,7 +183,7 @@
static void SFbuttonPressList(Widget w, int n, XButtonPressedEvent *event);
static void SFbuttonReleaseList(Widget w, int n, XButtonReleasedEvent *event);
static void SFdirModTimer(XtPointer cl, XtIntervalId *id);
-static char SFstatChar(struct stat *statBuf);
+static char SFstatChar(stat_T *statBuf);
static void SFdrawStrings(Window w, SFDir *dir, int from, int to);
static int SFnewInvertEntry(int n, XMotionEvent *event);
static void SFinvertEntry(int n);
@@ -873,7 +873,7 @@
static int
SFcheckDir(int n, SFDir *dir)
{
- struct stat statBuf;
+ stat_T statBuf;
int i;
if ((!mch_stat(".", &statBuf)) && (statBuf.st_mtime != dir->mtime))
@@ -943,7 +943,7 @@
int i;
char *str;
int last;
- struct stat statBuf;
+ stat_T statBuf;
result = 0;
@@ -1017,7 +1017,7 @@
/* Return a single character describing what kind of file STATBUF is. */
static char
-SFstatChar(struct stat *statBuf)
+SFstatChar(stat_T *statBuf)
{
if (S_ISDIR (statBuf->st_mode))
return '/';
@@ -1313,13 +1313,13 @@
#endif
}
-static void SFwriteStatChar(char *name, int last, struct stat *statBuf);
+static void SFwriteStatChar(char *name, int last, stat_T *statBuf);
static void
SFwriteStatChar(
char *name,
int last,
- struct stat *statBuf)
+ stat_T *statBuf)
{
name[last] = SFstatChar(statBuf);
}
@@ -1329,7 +1329,7 @@
static int
SFstatAndCheck(SFDir *dir, SFEntry *entry)
{
- struct stat statBuf;
+ stat_T statBuf;
char save;
int last;
@@ -2059,7 +2059,7 @@
char *str;
int len;
int maxChars;
- struct stat statBuf;
+ stat_T statBuf;
maxChars = strlen(dir->dir) - 1;