From owner-freebsd-questions Tue Apr 18 0:46:18 2000 Delivered-To: freebsd-questions@freebsd.org Received: from smtp8.teleport.com (smtp8.teleport.com [192.108.254.52]) by hub.freebsd.org (Postfix) with SMTP id 18FA637BA5B for ; Tue, 18 Apr 2000 00:46:12 -0700 (PDT) (envelope-from dirkm@buster.dhis.org) Received: (qmail 23508 invoked from network); 18 Apr 2000 07:46:08 -0000 Received: from pm3-01-18.eug.du.teleport.com (HELO buster.dhis.org) (216.26.32.82) by smtp8.teleport.com with SMTP; 18 Apr 2000 07:46:08 -0000 Received: (from dirkm@localhost) by buster.dhis.org (8.9.3/8.9.2) id AAA70728; Tue, 18 Apr 2000 00:46:05 -0700 (PDT) (envelope-from dirkm) Date: Tue, 18 Apr 2000 00:46:05 -0700 From: Dirk Myers To: Arun Sharma Cc: freebsd-questions@freebsd.org Subject: Re: socket.h and _POSIX_SOURCE Message-ID: <20000418004605.A61320@teleport.com> References: <20000417233959.A8988@sharmas.dhs.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20000417233959.A8988@sharmas.dhs.org>; from adsharma@sharmas.dhs.org on Mon, Apr 17, 2000 at 11:39:59PM -0700 X-System: FreeBSD 3.4-STABLE Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG An infinite number of monkeys (collectively referred to as "Arun Sharma") flailed at their keyboards, producing: > What's wrong with this ? > > -Arun > > $ 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 [...etc...] Look at sys/types.h -- a lot of stuff that socket.h needs to have defined *isn't* defined if _POSIX_SOURCE is defined. In the error I left untrimmed above, for example, the corresponding line from sys/socket.h is: typdef u_char sa_family_t; ... but u_char isn't defined if _POSIX_SOURCE is defined. So, this appears to be working exactly the way it should be. What are you expecting having _POSIX_SOURCE defined to do for you? Dirk dirkm@teleport.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message