Porting GDC to QNX

Sheff sheffmail at mail.ru
Fri Mar 30 05:42:33 PDT 2007


I think I understood what's the problem, the values of POSIX constants are different in linux and QNX (i.e O_CREAT, MAP_ANON, etc ), but in phobos they're defined like in linux, for example:
In phobos O_CREAT defined like:
const int O_CREAT = 0100; //0x64
In linux fcntl.h header:
#define  O_CREAT 0100 //0x64
but in QNX fcntl.h header it's defined like this:
#define  O_CREAT 0400 //0x100
0x64 != 0x100, so file creation always fails, so do other system calls.
What shall I do about it ? I don't want to manually redefine all POSIX constants...



More information about the Digitalmars-d mailing list