[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Checking for POSIX&Co



Christian Reiniger wrote:

> Hi,
>
> I'm using readdir () (POSIX) and stat () (Linux specific) in the PakFile
> compiler. I assume The macros to check for this are __POSIX__ and
> __LINUX__, but I'm not sure (didn't find docs about it). Who knows more
> about that?
>

Well you are definately right about __POSIX__, and I assume you are
rightabout __LINUX__ (I've seen it often enough in other people code).

BTW:  You should do something like this:

in  PenguinPlay.h,

#ifdef __POSIX__
    #define _PP_POSIX
    (and maybe even #define _PP_READDIR readdir)
#endif

etc.

It is kind of pointless, but I think it is The Right Thing To Do.  I have
occasionally
been glad of doing paranoid things like than, and occasionally cursed my
self
because I hadn't.