shithub: npe

Download patch

ref: adfd58ca7bfc4972c2ae3d4168206288b07dab82
parent: 399cee023e21d789febe571d8a5e89ab67a464bf
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Mon Mar 15 10:54:28 EDT 2021

move custom getenv into the main header

--- a/include/npe/plan9.h
+++ b/include/npe/plan9.h
@@ -11,6 +11,9 @@
 #define __attribute__(a)
 #endif
 
+/* this HAS to be in this header since some many programs do not #include <stdlib.h> */
+#define getenv npe_getenv
+
 /* to override "main" with our own threadmain */
 #define main npe_main_renamed
 
--- a/include/npe/stdlib.h
+++ b/include/npe/stdlib.h
@@ -3,8 +3,6 @@
 
 #include "plan9.h"
 
-#define getenv npe_getenv
-
 #ifndef exit
 void threadexitsall(char *);
 #define exit(x) threadexitsall(x == 0 ? nil : "error")