Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
8632e81a
Commit
8632e81a
authored
15 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Revert flength() to returning a 32-bit value unless XPDEV_LARGE_FILE_SUPPORT
is defined.
parent
01a0df86
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/xpdev/dirwrap.c
+1
-9
1 addition, 9 deletions
src/xpdev/dirwrap.c
src/xpdev/dirwrap.h
+1
-1
1 addition, 1 deletion
src/xpdev/dirwrap.h
with
2 additions
and
10 deletions
src/xpdev/dirwrap.c
+
1
−
9
View file @
8632e81a
...
...
@@ -390,7 +390,7 @@ int DLLCALL setfdate(const char* filename, time_t t)
/* Returns the length of the file in 'filename' */
/* or -1 if the file doesn't exist */
/****************************************************************************/
int64
_t
DLLCALL
flength
(
const
char
*
filename
)
filelen
_t
DLLCALL
flength
(
const
char
*
filename
)
{
#if defined(__BORLANDC__) && !defined(__unix__)
/* stat() doesn't work right */
...
...
@@ -409,20 +409,12 @@ int64_t DLLCALL flength(const char *filename)
#else
#ifdef _WIN32
struct
_stati64
st
;
#else
struct
stat
st
;
#endif
if
(
access
(
filename
,
0
)
==-
1
)
return
(
-
1
);
#ifdef _WIN32
if
(
_stati64
(
filename
,
&
st
)
!=
0
)
#else
if
(
stat
(
filename
,
&
st
)
!=
0
)
#endif
return
(
-
1
);
return
(
st
.
st_size
);
...
...
This diff is collapsed.
Click to expand it.
src/xpdev/dirwrap.h
+
1
−
1
View file @
8632e81a
...
...
@@ -218,7 +218,7 @@ extern "C" {
/* General file system wrappers for all platforms and compilers */
DLLEXPORT
BOOL
DLLCALL
fexist
(
const
char
*
filespec
);
DLLEXPORT
BOOL
DLLCALL
fexistcase
(
char
*
filespec
);
/* fixes upr/lwr case fname */
DLLEXPORT
int64
_t
DLLCALL
flength
(
const
char
*
filename
);
DLLEXPORT
filelen
_t
DLLCALL
flength
(
const
char
*
filename
);
DLLEXPORT
time_t
DLLCALL
fdate
(
const
char
*
filename
);
DLLEXPORT
int
DLLCALL
setfdate
(
const
char
*
filename
,
time_t
t
);
DLLEXPORT
BOOL
DLLCALL
isdir
(
const
char
*
filename
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment