[MonetDB-users] monetdb failing tests on FreeBSD

Joseph McDonald joe at vpop.net
Fri May 27 20:11:03 CEST 2005


Hi Niels!

> I read some documentation about BSD_VISIBLE. And they claim its a variable
> you/we shouldn't set. As its supposed to be set correctly by the system
> headers. 
> 
> So I would like to know what part of the compilation went wrong, ie.
> which function we use outside of the POSIX_C_SOURCE=200112 set.

Yeah,  I read that as well, but I don't know of a way around it right 
now (I'm not a C hacker).

Here is the error I get if I fail to define __BSD_VISIBLE:

(cd .libs && rm -f libmutils.la && ln -s ../libmutils.la libmutils.la)
/usr/local/bin/bash ../../libtool --mode=compile --tag=CC gcc 
-DHAVE_CONFIG_H -I. -I. -I../..
  -I.      -DLIBSTREAM  -g -O2 -std=c99 -Wall -W -fno-strict-aliasing 
-Werror-implicit-functio
n-declaration -Werror -Wno-format -Wno-unused-function -Wno-unused-label 
  -D_REENTRANT -c -o
libstream_la-stream.lo `test -f 'stream.c' || echo './'`stream.c
  gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I. -DLIBSTREAM -g -O2 -std=c99 
-Wall -W -fno-strict-ali
asing -Werror-implicit-function-declaration -Werror -Wno-format 
-Wno-unused-function -Wno-unu
sed-label -D_REENTRANT -c stream.c  -fPIC -DPIC -o 
.libs/libstream_la-stream.o
In file included from stream.mx:265:
/usr/include/netinet/ip.h:49: error: syntax error before "u_int"
/usr/include/netinet/ip.h:148: error: syntax error before "u_char"
/usr/include/netinet/ip.h:200: error: syntax error before "u_char"

The problem is that netinet/ip.h looks like this:

struct ip {
#if BYTE_ORDER == LITTLE_ENDIAN
         u_int   ip_hl:4,                /* header length */
                 ip_v:4;                 /* version */
#endif
#if BYTE_ORDER == BIG_ENDIAN
         u_int   ip_v:4,                 /* version */
                 ip_hl:4;                /* header length */
#endif
         u_char  ip_tos;                 /* type of service */
         u_short ip_len;                 /* total length */
[...]

if I set __BSD_VISIBLE then u_int, u_char are typedef'd (in 
sys/types.h), otherwise they are not.

There is probably a better way, I just don't know what it is.

thanks,
-joe




More information about the users-list mailing list