Current-Users archive

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

GCCs mm_malloc.h?



Hi,

for some odd reason that I've not yet found, the file
/usr/include/gcc-4.5/mm_malloc.h is being included by one of the
configure tests for the net/libcmis package, and configure is
failing with this error:

/usr/include/gcc-4.5/mm_malloc.h:34:64: error: declaration of 'int posix_memalign(void**, size_t, size_t) throw ()' throws different exceptions
/usr/include/stdlib.h:237:6: error: from previous declaration 'int posix_memalign(void**, size_t, size_t)'

The mm_malloc.h header is itself including stdlib.h, the section
of code looks like this:

#include <stdlib.h>

/* We can't depend on <stdlib.h> since the prototype of posix_memalign
   may not be visible.  */
#ifndef __cplusplus
extern int posix_memalign (void **, size_t, size_t);
#else
extern "C" int posix_memalign (void **, size_t, size_t) throw ();
#endif

So why the throw()?!?  I didn't know C code could throw C++
exceptions, but I've not been following in detail what GCC is up
to lately...

Including this file on NetBSD/amd64 6.1.5 (my particular case)
will therefore always file if you're compiling C++.

What's the appropriate fix?

This is causing net/libcmis to fail to build which is in turn
causing net/libreoffice4 to fail to build...

Regards,

- Håvard


Home | Main Index | Thread Index | Old Index