whereami
whereami copied to clipboard
added support for kFreeBSD and GNU Hurd
Ref: https://github.com/marcIhm/yabasic/pull/29
I would add the _GNU_SOURCE like this:
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
I think a correct check for kFreeBSD would be #if defined(__linux__) || ... || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
You need to check for __GLIBC__ to as FreeBSD also defines __FreeBSD_kernel__
I think it's enough to check __GNU__ only since we do not really care whether it is __FreeBSD_kernel__ or something else, just GNU-like environment.