home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1996 February
/
PCWK0296.iso
/
sharewar
/
os2
/
inne
/
unrar100
/
patches.emx
< prev
next >
Wrap
Text File
|
1995-01-06
|
1KB
|
56 lines
*** unrar.h~ Fri Jan 06 13:59:38 1995
--- unrar.h Fri Jan 06 14:10:08 1995
***************
*** 68,78 ****
#define MEMALLOC(Size) malloc(Size)
#define MEMFREE(Ptr) free(Ptr)
- #define MAKEDIR(Name) mkdir(Name)
- #define SETFILETIME(FPtr,DosTimePtr) setftime(fileno(FPtr),DosTimePtr)
#define PATHDIV '\\'
extern int _fmode=O_BINARY;
#endif
--- 68,106 ----
#define MEMALLOC(Size) malloc(Size)
#define MEMFREE(Ptr) free(Ptr)
#define PATHDIV '\\'
+ #ifndef __EMX__
+ #define MAKEDIR(Name) mkdir(Name)
+ #define SETFILETIME(FPtr,DosTimePtr) setftime(fileno(FPtr),DosTimePtr)
extern int _fmode=O_BINARY;
+ #else
+ #define MAKEDIR(Name) mkdir(Name, 0755)
+ #define SETFILETIME(FPtr,DosTimePtr) setfiletime(fileno(FPtr),DosTimePtr)
+
+ #define INCL_DOS
+ #include <os2.h>
+
+ void setfiletime(int handle, void *timedate)
+ {
+ FILESTATUS fs;
+ struct {
+ FTIME ft;
+ FDATE fd;
+ } s;
+
+ memcpy(&s, timedate, sizeof(s));
+
+ if ( DosQueryFileInfo(handle, FIL_STANDARD, (PBYTE) &fs, sizeof(fs)) )
+ return;
+
+ fs.fdateLastWrite = fs.fdateCreation = s.fd;
+ fs.ftimeLastWrite = fs.ftimeCreation = s.ft;
+
+ DosSetFileInfo(handle, FIL_STANDARD, (PBYTE) &fs, sizeof(fs));
+ }
+
+ #endif
#endif