Pyrogenesis  trunk
Macros
crt_posix.h File Reference
#include <io.h>
#include <direct.h>
Include dependency graph for crt_posix.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __STDC__   1
 see rationale in wposix.h. More...
 
#define __STDC__   0
 see rationale in wposix.h. More...
 

Macro Definition Documentation

#define __STDC__   1

see rationale in wposix.h.

we need to have CRT functions (e.g. _open) declared correctly but must prevent POSIX functions (e.g. open) from being declared - they would conflict with our wrapper function.

since the headers only declare POSIX stuff #if !__STDC__, a solution would be to set this flag temporarily. note that MSDN says that such predefined macros cannot be redefined nor may they change during compilation, but this works and seems to be a fairly common practice.

#define __STDC__   0

see rationale in wposix.h.

we need to have CRT functions (e.g. _open) declared correctly but must prevent POSIX functions (e.g. open) from being declared - they would conflict with our wrapper function.

since the headers only declare POSIX stuff #if !__STDC__, a solution would be to set this flag temporarily. note that MSDN says that such predefined macros cannot be redefined nor may they change during compilation, but this works and seems to be a fairly common practice.