Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Mar 2000 09:40:23 +0600 (NOVT)
From:      nnd@mail.nsk.ru
To:        current@freebsd.org
Subject:   Re: 'machine/param.h' required for 'sys/socket.h' 
Message-ID:  <200003220340.JAA05869@wint.itfs.nsk.su>
In-Reply-To: <200003211853.e2LIrUg87051@nimitz.ca.sandia.gov>

next in thread | previous in thread | raw e-mail | index | archive | help
In <200003211853.e2LIrUg87051@nimitz.ca.sandia.gov> Bruce A. Mah <bmah@ca.sandia.gov> wrote:
> --==_Exmh_789141986P
> Content-Type: text/plain; charset=us-ascii
> 
> If memory serves me right, Yoshinobu Inoue wrote:
>> > > I feel requesting inclusion of machine/param.h for any apps
>> > > which use socket is better. But if there are any other smarter
>> > > solution, please let me know and I'll appreciate it much.
>> > 
>> > <machine/param.h> should never be included by applications since
>> > it is an implementation detail.
>> > 
>> > Specify including <sys/param.h> in apps which use the CMSG*() macros.
>> > <sys/socket.h> doesn't depend on <*/param.h> unless these macros are used.
>> > Since these macros are undocumented, applications that use them should
>> > expect problems :-).
>> > 
>> > Bruce
>> 
>> After reading bmah's message, now I am inclined to including
>> machine/param.h from sys/socket.h for maximum portability, if
>> there is no spec for it, and if all other platforms doing it.
> 
> Arrgh.  Now it seems I might need to reverse my position.  I looked
> through some code fragments in UNIX Network Programming (Volume 1,
> Second Edition, pp. 362-365), and there's some precedent for needing
> <sys/param.h> with the CMSG*() macros.
> 
> On the other hand, RFC 2292 and draft-ietf-ipngwg-rfc2292bis (the
> references I was originally working from) don't mention this requirement
> at all; they just say that CMSG*() are defined with <sys/socket.h>.  I'm
> slightly confused by now.
> 
> I'm going to send off a note to the authors of 
> draft-ietf-ipngwg-rfc229bis asking for some clarification.  In the 
> meantime, maybe we should hold off on doing any changes.

	Can we (temporary) unbroke 'net/pchar' port in FreeBSD
with the next patch (until the Perfect Solution will be found :-) :

===================================================================
diff -ruN pchar.orig/patches/patch-aa pchar/patches/patch-aa
--- pchar.orig/patches/patch-aa	Thu Jan  1 07:00:00 1970
+++ pchar/patches/patch-aa	Wed Mar 22 09:36:04 2000
@@ -0,0 +1,10 @@
+--- PctestIpv6Udp.h.ORIG	Wed Jan 19 23:14:42 2000
++++ PctestIpv6Udp.h	Wed Mar 22 09:31:19 2000
+@@ -29,6 +29,7 @@
+ #endif /* STDC_HEADERS */
+ 
+ #include <sys/types.h>
++#include <sys/param.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ 


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




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