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

Re: Hugin (zthread) build error on kfreebsd*



On 2010-11-28 Christoph Egger <christoph@debian.org> wrote:
> Andreas Metzler <ametzler@downhill.at.eu.org> writes:
> > ----------------------------
> > ./src/foreign/zthread/include/zthread/Config.h
> > // Check for well known platforms
> > #elif defined(__linux__) || \
> >       defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \
> >       defined(__hpux) || \
> >       defined(__sgi) || \
> >       defined(__sun)
> >
> > #  define ZT_POSIX
> >
> > // Check for definitions from well known headers
> > #elif defined(_POSIX_SOURCE) || defined(_XOPEN_SOURCE) 
> >
> > #  define ZT_POSIX
> >
> > #elif defined(WIN32_LEAN_AND_MEAN)
> >
> > #  define ZT_WIN32
> >
> > #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
> >
> > // #  define ZT_MACOS
> > #  define ZT_POSIX
> >
> > #else
> > #  error "Could not select implementation, define ZT_WIN9X, ZT_WIN32, ZT_POSIX or ZT_MACOS"
> > #endif
> > ----------------------------
> >
> > I am pretty sure kfreebsd* should end up in the same boat as FreeBSD
> > and Linux, but am not sure on which #define I should try to match. It
> > should reasonably clean for forwarding upstream. Comparing "gcc -dM -E
> > /tmp/foo.c" on Linux and kfreebsd was not very helpful (Or should I
> > match on on __FreeBSD_kernel__)?

>     Looks mostly like you don't want to match on __linux__ but rather on
> __GLIBC__ which should work on both linux and GNU/FreeBSD (and likely
> Hurd as well). __linux__ / __FreeBSD_kernel__ is for the cases where you
> have kernel specific code.

Hello,

I also thought so, but this is not available as pre-defined gcc macro:

ametzler@argenau:~$ gcc -dM -E /tmp/foo.c | grep -i libc | wc
      0       0       0

cu andreas
-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'


Reply to: