From: Michael Wallner Date: Tue, 4 Dec 2018 14:00:06 +0000 (+0100) Subject: fix stdlib inclusion on linux X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=01147b369f0fde8119074435b296bd8197489088;p=m6w6%2Fext-psi fix stdlib inclusion on linux --- diff --git a/psi.d/errno.psi b/psi.d/errno.psi index f74d0ed..8953ca7 100644 --- a/psi.d/errno.psi +++ b/psi.d/errno.psi @@ -1,7 +1,7 @@ #include #ifdef __GNUC__ -# ifdef linux +# ifdef __linux__ function psi\errno() : int { return __errno_location() as to_int(*__errno_location); } diff --git a/psi.d/netdb.psi b/psi.d/netdb.psi index 71c66ff..6b55fec 100644 --- a/psi.d/netdb.psi +++ b/psi.d/netdb.psi @@ -1,4 +1,4 @@ -#ifdef linux +#ifdef __linux__ lib "anl"; #endif diff --git a/psi.d/stdlib.psi b/psi.d/stdlib.psi index 70b1c65..42212dc 100644 --- a/psi.d/stdlib.psi +++ b/psi.d/stdlib.psi @@ -1,4 +1,4 @@ -#ifdef linux +#ifdef __linux__ lib "crypt"; #endif diff --git a/psi.d/time.psi b/psi.d/time.psi index c7f83d1..152eba3 100644 --- a/psi.d/time.psi +++ b/psi.d/time.psi @@ -1,4 +1,4 @@ -#ifdef linux /* old, anyway */ +#ifdef __linux__ /* old, anyway */ lib "rt"; #endif diff --git a/tests/calc/calc.psi b/tests/calc/calc.psi index cc5d9c7..c74809c 100644 --- a/tests/calc/calc.psi +++ b/tests/calc/calc.psi @@ -1,3 +1,7 @@ +#ifdef __linux__ +lib "crypt"; +#endif + #include function test\calc1() : array { diff --git a/tests/idn/idn.psi b/tests/idn/idn.psi index 77afbc7..9b562c2 100644 --- a/tests/idn/idn.psi +++ b/tests/idn/idn.psi @@ -1,7 +1,10 @@ -// libidn -lib "idn"; +#ifdef __linux__ +lib "crypt"; +#endif #include + +lib "idn"; #include function idn\utf8_to_ascii(string $host, string &$result, int $flags = 0) : int {