Fix compilation issues
This commit is contained in:
parent
73f64102bd
commit
1c8471befd
@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#if defined(UNIX) || defined(__MINGW32__) || defined(EMX) || defined(RSXNT) || defined(__DJGPP__) || defined(_MSC_VER)
|
||||
#if defined(UNIX) || defined(__MINGW32__) || defined(__EMX__) || defined(RSXNT) || defined(__DJGPP__) || defined(_MSC_VER)
|
||||
/* These are compilers that have both a working stat() and (important!) the
|
||||
S_ISREG and S_ISDIR macros. The problem is that while stat() is POSIX, those
|
||||
macros are not. For compilers that do not provide these macros, we revert to
|
||||
|
@ -43,9 +43,9 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef UNIX
|
||||
/*#ifdef UNIX
|
||||
#include "patmat.h"
|
||||
#endif
|
||||
#endif*/
|
||||
|
||||
/*
|
||||
* FFindOpen; Use like MSDOS "find first" function, except be sure to
|
||||
@ -118,6 +118,7 @@ FFIND *FFindOpen(const char *filespec, unsigned short attribute)
|
||||
ff->ff_fdate = *((USHORT *) & findbuf.fdateLastWrite);
|
||||
|
||||
strncpy(ff->ff_name, findbuf.achName, sizeof(ff->ff_name));
|
||||
ff->ff_name[sizeof(ff->ff_name) - 1] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -166,9 +167,10 @@ FFIND *FFindOpen(const char *filespec, unsigned short attribute)
|
||||
if (patmat(de->d_name, ff->lastbit))
|
||||
{
|
||||
strncpy(ff->ff_name, de->d_name, sizeof ff->ff_name);
|
||||
ff->ff_fsize = -1L; /* All who wants to know it's size
|
||||
* must read it by himself
|
||||
*/
|
||||
ff->ff_name[sizeof(ff->ff_name) - 1] = '\0';
|
||||
ff->ff_fsize = -1L; /* All who wants to know it's size
|
||||
* must read it by himself
|
||||
*/
|
||||
fin = 1;
|
||||
}
|
||||
}
|
||||
@ -315,6 +317,7 @@ int FFindNext(FFIND * ff)
|
||||
ff->ff_fdate = *((USHORT *) & findbuf.fdateLastWrite);
|
||||
ff->ff_fsize = findbuf.cbFile;
|
||||
strncpy(ff->ff_name, findbuf.achName, sizeof(ff->ff_name));
|
||||
ff->ff_name[sizeof(ff->ff_name) - 1] = '\0';
|
||||
rc = 0;
|
||||
}
|
||||
|
||||
@ -337,6 +340,7 @@ int FFindNext(FFIND * ff)
|
||||
if (patmat(de->d_name, ff->lastbit))
|
||||
{
|
||||
strncpy(ff->ff_name, de->d_name, sizeof ff->ff_name);
|
||||
ff->ff_name[sizeof(ff->ff_name) - 1] = '\0';
|
||||
ff->ff_fsize = -1L; /* All who wants to know it's size
|
||||
* must read it by himself
|
||||
*/
|
||||
@ -480,6 +484,7 @@ FFIND *FindInfo(const char *filespec)
|
||||
f++;
|
||||
}
|
||||
strncpy(ff->ff_name, f, sizeof(ff->ff_name));
|
||||
ff->ff_name[sizeof(ff->ff_name) - 1] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -35,7 +35,7 @@
|
||||
#if !defined(UNIX) && !defined(SASC)
|
||||
# include <io.h>
|
||||
#endif
|
||||
#if defined(UNIX) || defined(__DJGPP__) || defined(EMX)
|
||||
#if defined(UNIX) || defined(__DJGPP__) || defined(__EMX__)
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
@ -12,6 +12,15 @@
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
#if defined(__EMX__)
|
||||
#if !defined(OS2)
|
||||
#define OS2 1
|
||||
#endif
|
||||
#if !defined(__FLAT__)
|
||||
#define __FLAT__ 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
/* mingw32 warnings */
|
||||
#define NONAMELESSUNION
|
||||
|
@ -1,7 +1,7 @@
|
||||
## ------------------------------------------------------------------
|
||||
## Master build file.
|
||||
## ------------------------------------------------------------------
|
||||
genmsgid c all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg
|
||||
ffind c all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg
|
||||
fexist c all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg
|
||||
patmat c all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx
|
||||
genmsgid c all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg be
|
||||
ffind c all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg be
|
||||
fexist c all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg be
|
||||
patmat c all lnx be
|
||||
|
Reference in New Issue
Block a user