Re: Broken (?) unistd.h

2002-02-27 Thread Bruce Evans

On Wed, 27 Feb 2002, Doug Barton wrote:

> On Wed, 27 Feb 2002, Bruce Evans wrote:
> > >From style(9):
> >
> >  Kernel include files (i.e. sys/*.h) come first; normally, include
> >   OR , but not both.   includes
> >  , and it is okay to depend on that.
>
> Based on a suggestion from someone else, I actually generated the same
> patch that Bill did. Without including sys/param.h, there is no definition
> of __FreeBSD_version at this point in the process, so the test always
> fails. If there is a more correct way to test, I'll be glad to use it,
> otherwise I'll have to go with what works.

Include the necessary header, but not both.

Bruce


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Broken (?) unistd.h

2002-02-27 Thread Doug Barton

On Wed, 27 Feb 2002, Bruce Evans wrote:

> On Tue, 26 Feb 2002, Bill Fenner wrote:
>
> > Here's a patch for bind's port/freebsd/include/port_before.h .
> >
> > --- port_before.h.orig  Tue Feb 26 20:57:35 2002
> > +++ port_before.h   Tue Feb 26 21:02:18 2002
> > @@ -15,6 +15,7 @@
> >  #define SETPWENT_VOID
> >  #endif
> >
> > +#include 
> >  #include 
>
> >From style(9):
>
>  Kernel include files (i.e. sys/*.h) come first; normally, include
>   OR , but not both.   includes
>  , and it is okay to depend on that.

Based on a suggestion from someone else, I actually generated the same
patch that Bill did. Without including sys/param.h, there is no definition
of __FreeBSD_version at this point in the process, so the test always
fails. If there is a more correct way to test, I'll be glad to use it,
otherwise I'll have to go with what works.

Doug
-- 
   "We have known freedom's price. We have shown freedom's power.
  And in this great conflict, ...  we will see freedom's victory."
- George W. Bush, President of the United States
  State of the Union, January 28, 2002

 Do YOU Yahoo!?



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Broken (?) unistd.h

2002-02-26 Thread Bruce Evans

On Tue, 26 Feb 2002, Bill Fenner wrote:

> Here's a patch for bind's port/freebsd/include/port_before.h .
>
> --- port_before.h.origTue Feb 26 20:57:35 2002
> +++ port_before.h Tue Feb 26 21:02:18 2002
> @@ -15,6 +15,7 @@
>  #define SETPWENT_VOID
>  #endif
>
> +#include 
>  #include 

>From style(9):

 Kernel include files (i.e. sys/*.h) come first; normally, include
  OR , but not both.   includes
 , and it is okay to depend on that.

Bruce


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Broken (?) unistd.h

2002-02-26 Thread Bill Fenner

Here's a patch for bind's port/freebsd/include/port_before.h .

--- port_before.h.orig  Tue Feb 26 20:57:35 2002
+++ port_before.h   Tue Feb 26 21:02:18 2002
@@ -15,6 +15,7 @@
 #define SETPWENT_VOID
 #endif
 
+#include 
 #include 
 
 #define GROUP_R_RETURN struct group *
@@ -26,8 +27,13 @@
 #define GROUP_R_ENT_ARGS void
 #define GROUP_R_OK gptr
 #define GROUP_R_BAD NULL
+#if __FreeBSD_version < 500029
 #define GETGROUPLIST_ARGS const char *name, int basegid, int *groups, \
  int *ngroups
+#else
+#define GETGROUPLIST_ARGS const char *name, gid_t basegid, gid_t *groups, \
+ int *ngroups
+#endif
 
 #define HOST_R_RETURN struct hostent *
 #define HOST_R_SET_RETURN void

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Broken (?) unistd.h

2002-02-26 Thread Alfred Perlstein

* Doug Barton <[EMAIL PROTECTED]> [020226 19:12] wrote:
> The following:
> 
> http://www.freebsd.org/cgi/cvsweb.cgi/src/include/unistd.h.diff?r1=1.46&r2=1.47
> 
> Broke compilation of bind 8 on -current built 2/24:
> 
> mkdir threaded 2> /dev/null || test -d threaded -a -w threaded
> (cc -I../../port/freebsd/include -I../../include -g -Wall   -c getgrent.c
> -o threaded/getgrent.o ;   ld -x -r threaded/getgrent.o  -o
> threaded/getgrent.out &&   mv threaded/getgrent.out threaded/getgrent.o)
> getgrent.c:107: conflicting types for `getgrouplist'
> /usr/include/unistd.h:143: previous declaration of `getgrouplist'
> /usr/libexec/elf/ld: cannot open threaded/getgrent.o: No such file or
> directory
> *** Error code 1 (ignored)
> cc -I../../port/freebsd/include -I../../include -g -Wall  -c getgrent.c
> getgrent.c:107: conflicting types for `getgrouplist'
> /usr/include/unistd.h:143: previous declaration of `getgrouplist'
> *** Error code 1
> 
> 
> Note, I have no idea which is right, only that it used to work

Vendor should add a configure or #ifdef (based on freebsd_version).

-Alfred

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message