Add QNX6 port (Mike Gorchak), remove obsolete stuff
This commit is contained in:
@@ -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