Skip to content
Snippets Groups Projects
Commit 97035e2e authored by rswindell's avatar rswindell
Browse files

Switched Win32 build to use POSIX stat/fstat functions instead of _stat/_fstat.

parent 0213886a
No related branches found
No related tags found
No related merge requests found
...@@ -53,13 +53,6 @@ ...@@ -53,13 +53,6 @@
#include "smblib.h" /* SMBCALL */ #include "smblib.h" /* SMBCALL */
#include "smbwrap.h" /* Verify prototypes */ #include "smbwrap.h" /* Verify prototypes */
#ifdef _WIN32
#define stat(f,s) _stat(f,s)
#define STAT struct _stat
#else
#define STAT struct stat
#endif
/****************************************************************************/ /****************************************************************************/
/* Convert ASCIIZ string to upper case */ /* Convert ASCIIZ string to upper case */
/****************************************************************************/ /****************************************************************************/
...@@ -111,7 +104,7 @@ long SMBCALL flength(char *filename) ...@@ -111,7 +104,7 @@ long SMBCALL flength(char *filename)
#else #else
STAT st; struct stat st;
if(access(filename,0)==-1) if(access(filename,0)==-1)
return(-1L); return(-1L);
...@@ -196,7 +189,7 @@ BOOL SMBCALL fexist(char *filespec) ...@@ -196,7 +189,7 @@ BOOL SMBCALL fexist(char *filespec)
/****************************************************************************/ /****************************************************************************/
long SMBCALL filelength(int fd) long SMBCALL filelength(int fd)
{ {
STAT st; struct stat st;
if(fstat(fd, &st)!=0) if(fstat(fd, &st)!=0)
return(-1L); return(-1L);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment