~ft/public-inbox

npe: detect Plan 9 with macros (& exec)

Details
Message ID
<468562446.474128.1713545487665@privateemail.com>
DKIM signature
permerror
Download raw message
Sorry for making this about two issues, but I feel like they are both too small to warrant individual messages.

I’m working on a program for UNIX (Linux, BSD, GNU, etc.) that I eventually want to port to Plan 9 with NPE.

Unfortunately, I’m running into issues I need to handle separately for UNIX and Plan 9.

I searched around and read some of the the compiler’s source code, and apparently there is no macro set by default. Would it be sensible to set a macro like ‘_PLAN9’ or ‘_NPE’ on NPE so that programs can detect whether they are compiling for Plan 9 or for UNIX?

On a somewhat related note, it seems Plan 9’s ‘exec’ is instead called ‘execv’ on UNIX. Would it be worthwhile to add compatibility functions for ‘exec*’ from UNIX to NPE? I might be able to submit a patch if that is desirable.

Thanks in advance!
Reply to thread Export thread (mbox)