Re: Bug#697032: rcpp: FTBFS[kfreebsd]: #error "Rcpp::Timer not supported by your OS."
Hi Dirk,
On 31/12/12 02:06, Dirk Eddelbuettel wrote:
> | > #elif defined(linux) || defined(__linux) || defined(__FreeBSD__)
Sometimes you are really testing for the type of libc on the system, not
the kernel. For that, __GLIBC__ is supposed to be defined on all
GNU/k*BSD variants. There is a bit more info at:
http://glibc-bsd.alioth.debian.org/porting/PORTING
> | >
> | > in two place. If memory serves, there were a) similar handles for NetBSD and
> | > OpenBSD I should add. And which one do you guys need for the BSD kernel on
> | > Debian?
> |
> | Jep I'm seeing __NetBSD__ and __OpenBSD__ in lots of source.
Plenty of examples of that here:
http://codesearch.debian.net/search?q=defined.*BSD.*BSD.*BSD
or
http://codesearch.debian.net/search?q=defined.*BSD__
Generally you have to list all of them :(
But it is probably more portable in the long term to test for specific
features that you want to use, wherever it makes sense.
> | uses __FreeBSD_kernel__ which -- if memory serves me correctly -- be
> | also defined in newer FreeBSDs.
>
> ... you are telling me I also need this?
If you are really testing for kernels, I think it is preferred that you
test for __FreeBSD_kernel__, instead of just __FreeBSD__ which is a bit
ambigious, and only defined on a pure FreeBSD (with BSD libc) system.
Regards,
--
Steven Chamberlain
steven@pyro.eu.org
Reply to: