fix stdlib inclusion on linux
authorMichael Wallner <mike@php.net>
Tue, 4 Dec 2018 14:00:06 +0000 (15:00 +0100)
committerMichael Wallner <mike@php.net>
Tue, 4 Dec 2018 14:00:16 +0000 (15:00 +0100)
psi.d/errno.psi
psi.d/netdb.psi
psi.d/stdlib.psi
psi.d/time.psi
tests/calc/calc.psi
tests/idn/idn.psi

index f74d0ed4982295fa62930a7c843f653c6ec5a654..8953ca7427b6a960f262acb5cc93e0d5b49cd047 100644 (file)
@@ -1,7 +1,7 @@
 #include <errno.h>
 
 #ifdef __GNUC__
 #include <errno.h>
 
 #ifdef __GNUC__
-# ifdef linux
+# ifdef __linux__
 function psi\errno() : int {
        return __errno_location() as to_int(*__errno_location);
 }
 function psi\errno() : int {
        return __errno_location() as to_int(*__errno_location);
 }
index 71c66ffde9d9dd043b6d4448b39d6a38d75b59ed..6b55fec29947cf90d8b63762584bc09e6ce96ed1 100644 (file)
@@ -1,4 +1,4 @@
-#ifdef linux
+#ifdef __linux__
 lib "anl";
 #endif
 
 lib "anl";
 #endif
 
index 70b1c6516a45b9921bad3b5f5dc2f5a6e775c238..42212dc24943e245a6a41b7ffd814e2346b634e2 100644 (file)
@@ -1,4 +1,4 @@
-#ifdef linux
+#ifdef __linux__
 lib "crypt";
 #endif
 
 lib "crypt";
 #endif
 
index c7f83d118d32c883066c4e5583251fa05ca624eb..152eba36ff51f74e43f28d4dd120b4b326539f47 100644 (file)
@@ -1,4 +1,4 @@
-#ifdef linux /* old, anyway */
+#ifdef __linux__ /* old, anyway */
 lib "rt";
 #endif
 
 lib "rt";
 #endif
 
index cc5d9c77ed2be70476b2971a9c0c193be814788d..c74809c15dfbe647f21726db7a47abfe780e196e 100644 (file)
@@ -1,3 +1,7 @@
+#ifdef __linux__
+lib "crypt";
+#endif
+
 #include <stdlib.h>
 
 function test\calc1() : array {
 #include <stdlib.h>
 
 function test\calc1() : array {
index 77afbc7fbe35277dfec5bf07804289eea918102e..9b562c2d39f2b82e27d91d909320f1f63bbc7446 100644 (file)
@@ -1,7 +1,10 @@
-// libidn
-lib "idn";
+#ifdef __linux__
+lib "crypt";
+#endif
 
 #include <stdlib.h>
 
 #include <stdlib.h>
+
+lib "idn";
 #include <idna.h>
 
 function idn\utf8_to_ascii(string $host, string &$result, int $flags = 0) : int {
 #include <idna.h>
 
 function idn\utf8_to_ascii(string $host, string &$result, int $flags = 0) : int {