From owner-freebsd-hackers Mon Apr 24 8:13:52 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from njord.bart.nl (njord.bart.nl [194.158.170.15]) by hub.freebsd.org (Postfix) with ESMTP id 5D2CB37B635 for ; Mon, 24 Apr 2000 08:13:45 -0700 (PDT) (envelope-from asmodai@wxs.nl) Received: from daemon.ninth-circle.org (abaddon@lucifer.is.an.elder.of.the.ninth-circle.org [195.38.216.226]) by njord.bart.nl (8.9.3/8.9.2) with ESMTP id RAA86077; Mon, 24 Apr 2000 17:13:35 +0200 (CEST) Received: (from asmodai@localhost) by daemon.ninth-circle.org (8.9.3/8.9.3) id QAA03085; Mon, 24 Apr 2000 16:39:43 +0200 (CEST) (envelope-from asmodai) Date: Mon, 24 Apr 2000 16:39:43 +0200 From: Jeroen Ruigrok/Asmodai To: Arun Sharma Cc: freebsd-hackers@freebsd.org Subject: Re: Fwd: socket.h and _POSIX_SOURCE Message-ID: <20000424163942.E1842@daemon.ninth-circle.org> References: <200004201604.JAA10995@sharmas.dhs.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200004201604.JAA10995@sharmas.dhs.org>; from adsharma@sharmas.dhs.org on Thu, Apr 20, 2000 at 09:04:06AM -0700 Organisation: Ninth-Circle Enterprises Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG -On [20000420 20:02], Arun Sharma (adsharma@sharmas.dhs.org) wrote: >Comments ? > >$ cat test.c >#include >#include >$ 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 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