Hi, fans.
I'm trying to port LibreSSL on native Plan 9.
Some functions are works now:
2. rc ./update.rc
3. ape/patch -p0 <plan9/crypto.patch
4. ape/patch -p0 <plan9/ssl.patch
5. ape/patch -p0 <plan9/apps.patch
6. for(i in crypto ssl apps/openssl) @{ cd $i; mk }
I have difficulty in porting header files.
Some headers of LibreSSL has #include_next GCC extended directive, but Plan 9's cpp can't process #include_next directive.
When cpp processes a header containing #include_next, it exits with "Unknown preprocessor control #include_next" error even if ignoring by #if and #endif.
% cat <<! | cpp
#if 0
#include_next <u.h>
#endif
!
#line 1 "/usr/lufia/<stdin>"
cpp: <stdin>:2 Unknown preprocessor control include_next
I had no choice but to rewrite #include_next like:
compat.h:
#ifdef Plan9
#define SYS_PATH(x) /sys/include/ape/x
#else
#define SYS_PATH(x) sys_##x
#endif
#define SYSINCLUDE(x) <SYS_PATH(x)>
string.h:
#include SYSINCLUDE(string.h)
sys_string.h:
#include_next <string.h>
This works but I think this way is not good because developer should manage two files.
Is there any good way?