Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Apr 2000 00:46:05 -0700
From:      Dirk Myers <dirkm@teleport.com>
To:        Arun Sharma <adsharma@sharmas.dhs.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: socket.h and _POSIX_SOURCE
Message-ID:  <20000418004605.A61320@teleport.com>
In-Reply-To: <20000417233959.A8988@sharmas.dhs.org>; from adsharma@sharmas.dhs.org on Mon, Apr 17, 2000 at 11:39:59PM -0700
References:  <20000417233959.A8988@sharmas.dhs.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <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
[...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




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