2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-25 16:22:13 +00:00

Basic changes for GNU/Hurd (#676)

* Define OSMINOR & OS_HURD on GNU/Hurd

Add a way to identify GNU/Hurd with b2, and also in the Python support.

* Use /proc/self/exe for executable_path on Hurd

Use the Linux compatibility procfs translator to get the full path of
the current executable.

* Define _GNU_SOURCE on any GNU libc-based OS

Make sure to enable GNU features when building on any OS that uses
GNU libc.
This commit is contained in:
Pino Toscano
2020-12-14 20:37:32 +01:00
committed by GitHub
parent c7016328c3
commit 25879fc24d
4 changed files with 9 additions and 5 deletions

View File

@@ -747,7 +747,7 @@ char * executable_path( char const * argv0 )
sysctl( mib, 4, buf, &size, NULL, 0 );
return ( !size || size == sizeof( buf ) ) ? NULL : strndup( buf, size );
}
#elif defined(__linux__) || defined(__CYGWIN__)
#elif defined(__linux__) || defined(__CYGWIN__) || defined(__GNU__)
# include <unistd.h>
char * executable_path( char const * argv0 )
{