Add QNX6 port (Mike Gorchak), remove obsolete stuff
This commit is contained in:
parent
b45a762d2e
commit
e9e33d7860
@ -1016,9 +1016,9 @@ char* MapPath(char* map, bool reverse) {
|
||||
char sl1, sl2;
|
||||
char* ptr;
|
||||
|
||||
ptr = strpbrk(p, "/\\");
|
||||
ptr = strpbrk((char *)p, "/\\");
|
||||
sl1 = ptr ? *ptr : NUL;
|
||||
ptr = strpbrk(q, "/\\");
|
||||
ptr = strpbrk((char *)q, "/\\");
|
||||
sl2 = ptr ? *ptr : NUL;
|
||||
|
||||
if(sl1 and sl2 and (sl1 != sl2))
|
||||
|
@ -116,6 +116,11 @@ const char* __gver_shortver__ = __GVER_SVER__(__GVER_MAJOR__,__GVER_MINOR__,__GV
|
||||
#define __GVER_SHORTPLATFORM__ "BeOS"
|
||||
#define __GVER_SHORTLOGNAME__ "B"
|
||||
#define __GVER_CFGEXT__ ".gbe"
|
||||
#elif defined(__QNXNTO__)
|
||||
#define __GVER_PLATFORM__ "/QNX"
|
||||
#define __GVER_SHORTPLATFORM__ "QNX"
|
||||
#define __GVER_SHORTLOGNAME__ "Q"
|
||||
#define __GVER_CFGEXT__ ".gqx"
|
||||
#elif defined(__UNIX__)
|
||||
#define __GVER_PLATFORM__ "/UNX"
|
||||
#define __GVER_SHORTPLATFORM__ "UNX"
|
||||
|
@ -74,6 +74,9 @@
|
||||
#if defined(__BEOS__)
|
||||
#define __UNIX__ __BEOS__
|
||||
#endif
|
||||
#if defined(__QNXNTO__)
|
||||
#define __UNIX__ __QNXNTO__
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
|
@ -225,16 +225,6 @@ int gfile::unlock(long __offset, long __len) {
|
||||
return _ret;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
int gfile::eof() {
|
||||
|
||||
int _ret = ::eof(fh);
|
||||
status = (_ret == -1) ? errno : 0;
|
||||
return _ret;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
int gfile::getftime(dword* __ftime) {
|
||||
|
@ -112,8 +112,6 @@ public:
|
||||
|
||||
int getftime (dword* __ftime);
|
||||
|
||||
int eof ();
|
||||
|
||||
|
||||
// --------------------------------------------------------------
|
||||
// ANSI-style streaming buffered I/O
|
||||
|
@ -52,7 +52,7 @@
|
||||
// ------------------------------------------------------------------M
|
||||
|
||||
#if defined(__UNIX__)
|
||||
#if !defined(__BEOS__)
|
||||
#if !defined(__BEOS__) && !defined(__QNXNTO__)
|
||||
#define O_TEXT 0
|
||||
#define O_BINARY 0
|
||||
#endif
|
||||
@ -236,22 +236,18 @@ int unlock(int handle, long offset, long length);
|
||||
#if !defined(__DJGPP__) && defined(__GNUC__)
|
||||
int lock(int handle, long offset, long length);
|
||||
int unlock(int handle, long offset, long length);
|
||||
#if !defined(__QNXNTO__) && !defined(__MINGW32__)
|
||||
inline long tell(int fh) { return lseek(fh, 0, SEEK_CUR); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(__MINGW32__) && !defined(__EMX__) && defined(__GNUC__)
|
||||
|
||||
inline int eof(int h) {
|
||||
return tell(h) > filelength(h);
|
||||
}
|
||||
|
||||
#if !defined(sopen) && !defined(__MINGW32__) && !defined(__EMX__) && !defined(__QNXNTO__) && defined(__GNUC__)
|
||||
inline int sopen(const char* path, int access, int shflag, int mode) {
|
||||
#ifdef __UNIX__
|
||||
shflag = 0;
|
||||
#endif
|
||||
return open(path, access|shflag, mode);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__UNIX__) || defined(__CYGWIN__)
|
||||
|
@ -44,6 +44,9 @@
|
||||
#define strupr(s) (char *)_nls_strupr((unsigned char *)(s))
|
||||
#define strlwr(s) (char *)_nls_strlwr((unsigned char *)(s))
|
||||
#elif defined(__GNUC__)
|
||||
#if defined(__QNXNTO__)
|
||||
#include <strings.h>
|
||||
#endif
|
||||
#define stricmp strcasecmp
|
||||
#define strnicmp strncasecmp
|
||||
char* strupr(char* s);
|
||||
|
Reference in New Issue
Block a user