[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: BSD >= 199306



Hi all. I maintain a package (prayer) that doesn't use autotools and instead
detects BSD with:

#include <sys/param.h>
#if (defined(BSD) && BSD >= 199306)

Googling around, this seems pretty standard and recommended procedure, but
apparently it doesn't work on Debian GNU/*BSD. So how should I do?

It depends on what you really want to test.
The kernel variant (FreeBSD) is signaled by __FreeBSD_kernel__
and libc variant (glibc) by __GLIBC__.

You can take a look at http://io.debian.net/ssh.html
and test directly on GNU/kFreeBSD whether your package is dependent on kernel or libc environment. In the worst case, it would be a mixture :-(

Petr


Reply to: