Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Apr 2000 16:39:43 +0200
From:      Jeroen Ruigrok/Asmodai <asmodai@wxs.nl>
To:        Arun Sharma <adsharma@sharmas.dhs.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Fwd: socket.h and _POSIX_SOURCE
Message-ID:  <20000424163942.E1842@daemon.ninth-circle.org>
In-Reply-To: <200004201604.JAA10995@sharmas.dhs.org>; from adsharma@sharmas.dhs.org on Thu, Apr 20, 2000 at 09:04:06AM -0700
References:  <200004201604.JAA10995@sharmas.dhs.org>

next in thread | previous in thread | raw e-mail | index | archive | help
-On [20000420 20:02], Arun Sharma (adsharma@sharmas.dhs.org) wrote:
>Comments ?
>
>$ cat test.c
>#include <sys/types.h>
>#include <sys/socket.h>
>$ cc -D_POSIX_SOURCE -c test.c
>In file included from test.c:2:
>/usr/include/sys/socket.h:47: syntax error before `sa_family_t'
>/usr/include/sys/socket.h:47: warning: data definition has no type or storage
>  class

sys/socket.h declares sa_family_t as a u_char.

If we look at sys/types.h we see:

#ifndef _POSIX_SOURCE
typedef unsigned char   u_char;
[snip]
#endif

Which combined with D_POSIX_SOURCE causes [logical] problems.

-- 
Jeroen Ruigrok vd Werven/Asmodai    asmodai@[wxs.nl|bart.nl|freebsd.org]
Documentation nutter/C-rated Coder BSD: Technical excellence at its best  
The BSD Programmer's Documentation Project <http://home.wxs.nl/~asmodai>;
Who looks under the surface does so at his own risk...


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000424163942.E1842>