Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Feb 1997 02:15:09 +1100 (EST)
From:      Julian Assange <proff@iq.org>
To:        FreeBSD-gnats-submit@freebsd.org, dyson@freebsd.org
Subject:   misc/2625: fixed broken src/includes
Message-ID:  <199701311515.CAA23809@profane.iq.org>
Resent-Message-ID: <199701311520.HAA26712@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         2625
>Category:       misc
>Synopsis:       fixed broken src/includes
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 31 07:20:01 PST 1997
>Last-Modified:
>Originator:     Julian Assange
>Organization:
>Release:        FreeBSD 3.0-CURRENT i386
>Environment:

	

>Description:

	

	A number of include files do not self-resolve. This is shoddy
	encapsulation practice and invariably causes
	great difficulty when porting code from other OS's.

>How-To-Repeat:

	

>Fix:
	
	


Index: src/include/fts.h
diff -c src/include/fts.h:1.1.1.1 src/include/fts.h:1.1.1.1.10.1
*** src/include/fts.h:1.1.1.1	Tue May 24 19:57:22 1994
--- src/include/fts.h	Sat Feb  1 02:02:43 1997
***************
*** 36,41 ****
--- 36,44 ----
  #ifndef	_FTS_H_
  #define	_FTS_H_
  
+ #include <sys/types.h>
+ #include <nlist.h>
+ 
  typedef struct {
  	struct _ftsent *fts_cur;	/* current node */
  	struct _ftsent *fts_child;	/* linked list of children */
Index: src/include/grp.h
diff -c src/include/grp.h:1.1.1.1 src/include/grp.h:1.1.1.1.10.1
*** src/include/grp.h:1.1.1.1	Tue May 24 19:57:21 1994
--- src/include/grp.h	Sat Feb  1 02:02:43 1997
***************
*** 41,46 ****
--- 41,48 ----
  #ifndef _GRP_H_
  #define	_GRP_H_
  
+ #include <sys/types.h>
+ 
  #ifndef _POSIX_SOURCE
  #define	_PATH_GROUP		"/etc/group"
  #endif
***************
*** 48,54 ****
  struct group {
  	char	*gr_name;		/* group name */
  	char	*gr_passwd;		/* group password */
! 	int	gr_gid;			/* group id */
  	char	**gr_mem;		/* group members */
  };
  
--- 50,56 ----
  struct group {
  	char	*gr_name;		/* group name */
  	char	*gr_passwd;		/* group password */
! 	gid_t	gr_gid;			/* group id */
  	char	**gr_mem;		/* group members */
  };
  
Index: src/include/link.h
diff -c src/include/link.h:1.10 src/include/link.h:1.10.2.1
*** src/include/link.h:1.10	Tue Jan 14 16:59:44 1997
--- src/include/link.h	Sat Feb  1 02:02:43 1997
***************
*** 41,46 ****
--- 41,49 ----
  #ifndef _LINK_H_
  #define _LINK_H_
  
+ #include <sys/types.h>
+ #include <nlist.h>
+ 
  /*
   * A `Shared Object Descriptor' describes a shared object that is needed
   * to complete the link edit process of the object containing it.
***************
*** 81,86 ****
--- 84,90 ----
   * of shared objects. An array of these live in the shared object's
   * text segment and is addressed by the `sdt_nzlist' field.
   */
+ 
  struct nzlist {
  	struct nlist	nlist;
  	u_long		nz_size;
Index: src/include/login_cap.h
diff -c src/include/login_cap.h:1.5 src/include/login_cap.h:1.5.2.1
*** src/include/login_cap.h:1.5	Tue Jan 14 16:59:45 1997
--- src/include/login_cap.h	Sat Feb  1 02:02:43 1997
***************
*** 27,32 ****
--- 27,34 ----
  #ifndef _LOGIN_CAP_H_
  #define _LOGIN_CAP_H_
  
+ #include <sys/types.h>
+ 
  #define LOGIN_DEFCLASS		"default"
  #define LOGIN_DEFSTYLE		"passwd"
  #define LOGIN_DEFSERVICE	"login"
Index: src/include/mpool.h
diff -c src/include/mpool.h:1.3 src/include/mpool.h:1.3.4.1
*** src/include/mpool.h:1.3	Wed Feb 28 06:42:44 1996
--- src/include/mpool.h	Sat Feb  1 02:02:44 1997
***************
*** 36,42 ****
--- 36,44 ----
  #ifndef _MPOOL_H_
  #define _MPOOL_H_
  
+ #include <sys/types.h>
  #include <sys/queue.h>
+ #include <db.h>
  
  /*
   * The memory pool scheme is a simple one.  Each in-memory page is referenced
Index: src/include/pthread_np.h
diff -c src/include/pthread_np.h:1.2 src/include/pthread_np.h:1.2.2.1
*** src/include/pthread_np.h:1.2	Mon Nov 11 20:21:19 1996
--- src/include/pthread_np.h	Sat Feb  1 02:02:44 1997
***************
*** 33,38 ****
--- 33,40 ----
  #ifndef _PTHREAD_NP_H_
  #define _PTHREAD_NP_H_
  
+ #include <pthread.h>
+ 
  /*
   * Non-POSIX thread function prototype definitions:
   */
Index: src/include/pwd.h
diff -c src/include/pwd.h:1.5 src/include/pwd.h:1.5.4.1
*** src/include/pwd.h:1.5	Tue Apr 16 10:22:41 1996
--- src/include/pwd.h	Sat Feb  1 02:02:44 1997
***************
*** 71,78 ****
  struct passwd {
  	char	*pw_name;		/* user name */
  	char	*pw_passwd;		/* encrypted password */
! 	int	pw_uid;			/* user uid */
! 	int	pw_gid;			/* user gid */
  	time_t	pw_change;		/* password change time */
  	char	*pw_class;		/* user access class */
  	char	*pw_gecos;		/* Honeywell login info */
--- 71,78 ----
  struct passwd {
  	char	*pw_name;		/* user name */
  	char	*pw_passwd;		/* encrypted password */
! 	uid_t	pw_uid;			/* user uid */
! 	gid_t	pw_gid;			/* user gid */
  	time_t	pw_change;		/* password change time */
  	char	*pw_class;		/* user access class */
  	char	*pw_gecos;		/* Honeywell login info */
Index: src/include/regex.h
diff -c src/include/regex.h:1.1.1.1 src/include/regex.h:1.1.1.1.10.1
*** src/include/regex.h:1.1.1.1	Tue May 24 19:57:15 1994
--- src/include/regex.h	Sat Feb  1 02:02:44 1997
***************
*** 41,46 ****
--- 41,47 ----
  #define	_REGEX_H_
  
  #include <sys/cdefs.h>
+ #include <sys/types.h>
  
  /* types */
  typedef off_t regoff_t;
Index: src/include/resolv.h
diff -c src/include/resolv.h:1.9 src/include/resolv.h:1.9.2.1
*** src/include/resolv.h:1.9	Tue Jan 14 16:59:47 1997
--- src/include/resolv.h	Sat Feb  1 02:02:44 1997
***************
*** 62,67 ****
--- 62,69 ----
  #include <sys/param.h>
  #include <sys/types.h>
  #include <sys/cdefs.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
  #include <stdio.h>
  
  /*
Index: src/include/utime.h
diff -c src/include/utime.h:1.1.1.1 src/include/utime.h:1.1.1.1.10.1
*** src/include/utime.h:1.1.1.1	Tue May 24 19:57:04 1994
--- src/include/utime.h	Sat Feb  1 02:02:45 1997
***************
*** 36,41 ****
--- 36,43 ----
  #ifndef	_UTIME_H_
  #define	_UTIME_H_
  
+ #include <sys/types.h>
+ 
  struct utimbuf {
  	time_t actime;		/* Access time */
  	time_t modtime;		/* Modification time */
Index: src/include/utmp.h
diff -c src/include/utmp.h:1.4 src/include/utmp.h:1.4.2.1
*** src/include/utmp.h:1.4	Tue Jan 14 16:59:49 1997
--- src/include/utmp.h	Sat Feb  1 02:02:45 1997
***************
*** 42,47 ****
--- 42,49 ----
  #ifndef	_UTMP_H_
  #define	_UTMP_H_
  
+ #include <sys/types.h>
+ 
  #define	_PATH_UTMP	"/var/run/utmp"
  #define	_PATH_WTMP	"/var/log/wtmp"
  #define	_PATH_LASTLOG	"/var/log/lastlog"
Index: src/include/arpa/inet.h
diff -c src/include/arpa/inet.h:1.6 src/include/arpa/inet.h:1.6.2.1
*** src/include/arpa/inet.h:1.6	Tue Jan 14 16:59:54 1997
--- src/include/arpa/inet.h	Sat Feb  1 02:02:47 1997
***************
*** 61,67 ****
  #include <sys/types.h>
  #include <sys/cdefs.h>
  
! struct in_addr;
  
  __BEGIN_DECLS
  int		 ascii2addr __P((int, const char *, void *));
--- 61,67 ----
  #include <sys/types.h>
  #include <sys/cdefs.h>
  
! #include <netinet/in.h>
  
  __BEGIN_DECLS
  int		 ascii2addr __P((int, const char *, void *));
Index: src/include/protocols/dumprestore.h
diff -c src/include/protocols/dumprestore.h:1.2 src/include/protocols/dumprestore.h:1.2.10.1
*** src/include/protocols/dumprestore.h:1.2	Sun Aug 21 14:05:01 1994
--- src/include/protocols/dumprestore.h	Sat Feb  1 02:02:49 1997
***************
*** 41,46 ****
--- 41,48 ----
  #ifndef _PROTOCOLS_DUMPRESTORE_H_
  #define _PROTOCOLS_DUMPRESTORE_H_
  
+ #include <sys/types.h>
+ #include <ufs/ufs/dinode.h>
  /*
   * TP_BSIZE is the size of file blocks on the dump tapes.
   * Note that TP_BSIZE must be a multiple of DEV_BSIZE.
Index: src/include/protocols/routed.h
diff -c src/include/protocols/routed.h:1.8 src/include/protocols/routed.h:1.8.2.1
*** src/include/protocols/routed.h:1.8	Wed Nov 20 08:22:18 1996
--- src/include/protocols/routed.h	Sat Feb  1 02:02:50 1997
***************
*** 40,46 ****
  #ifdef __cplusplus
  extern "C" {
  #endif
! #ident "$Revision: 1.8 $"
  
  /*
   * Routing Information Protocol
--- 40,49 ----
  #ifdef __cplusplus
  extern "C" {
  #endif
! #ident "$Revision: 1.8.2.1 $"
! 
! #include <sys/types.h>
! #include <sys/socket.h> 
  
  /*
   * Routing Information Protocol
Index: src/include/protocols/talkd.h
diff -c src/include/protocols/talkd.h:1.2 src/include/protocols/talkd.h:1.2.10.1
*** src/include/protocols/talkd.h:1.2	Sun Aug 21 14:05:04 1994
--- src/include/protocols/talkd.h	Sat Feb  1 02:02:50 1997
***************
*** 36,41 ****
--- 36,44 ----
  #ifndef _PROTOCOLS_TALKD_H_
  #define	_PROTOCOLS_TALKD_H_
  
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ 
  /*
   * This describes the protocol used by the talk server and clients.
   *
Index: src/include/protocols/timed.h
diff -c src/include/protocols/timed.h:1.3 src/include/protocols/timed.h:1.3.8.1
*** src/include/protocols/timed.h:1.3	Tue May 30 14:55:06 1995
--- src/include/protocols/timed.h	Sat Feb  1 02:02:50 1997
***************
*** 36,41 ****
--- 36,45 ----
  #ifndef	_PROTOCOLS_TIMED_H_
  #define	_PROTOCOLS_TIMED_H_
  
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <sys/param.h>
+ 
  /*
   * Time Synchronization Protocol
   */
Index: src/include/rpc/auth.h
diff -c src/include/rpc/auth.h:1.7 src/include/rpc/auth.h:1.7.2.1
*** src/include/rpc/auth.h:1.7	Tue Jan 14 16:59:56 1997
--- src/include/rpc/auth.h	Sat Feb  1 02:02:56 1997
***************
*** 44,49 ****
--- 44,51 ----
  #ifndef _RPC_AUTH_H
  #define _RPC_AUTH_H
  #include <sys/cdefs.h>
+ #include <rpc/types.h>
+ #include <rpc/xdr.h>
  
  #define MAX_AUTH_BYTES	400
  #define MAXNETNAMELEN	255	/* maximum length of network user's name */
Index: src/include/rpc/auth_unix.h
diff -c src/include/rpc/auth_unix.h:1.5 src/include/rpc/auth_unix.h:1.5.2.1
*** src/include/rpc/auth_unix.h:1.5	Tue Jan 14 16:59:57 1997
--- src/include/rpc/auth_unix.h	Sat Feb  1 02:02:56 1997
***************
*** 47,52 ****
--- 47,55 ----
  #ifndef _RPC_AUTH_UNIX_H
  #define _RPC_AUTH_UNIX_H
  #include <sys/cdefs.h>
+ #include <rpc/types.h>
+ #include <rpc/xdr.h>
+ #include <rpc/auth.h>
  
  /* The machine name is part of a credential; it may not exceed 255 bytes */
  #define MAX_MACHINE_NAME 255
Index: src/include/rpc/clnt.h
diff -c src/include/rpc/clnt.h:1.6 src/include/rpc/clnt.h:1.6.2.1
*** src/include/rpc/clnt.h:1.6	Tue Jan 14 16:59:57 1997
--- src/include/rpc/clnt.h	Sat Feb  1 02:02:57 1997
***************
*** 40,45 ****
--- 40,48 ----
  #ifndef _RPC_CLNT_H_
  #define _RPC_CLNT_H_
  #include <sys/cdefs.h>
+ #include <rpc/types.h>
+ #include <rpc/xdr.h>
+ #include <rpc/auth.h>
  
  /*
   * Rpc calls return an enum clnt_stat.  This should be looked at more,
Index: src/include/rpc/pmap_clnt.h
diff -c src/include/rpc/pmap_clnt.h:1.6 src/include/rpc/pmap_clnt.h:1.6.2.1
*** src/include/rpc/pmap_clnt.h:1.6	Tue Jan 14 16:59:58 1997
--- src/include/rpc/pmap_clnt.h	Sat Feb  1 02:02:57 1997
***************
*** 63,68 ****
--- 63,71 ----
  #ifndef _RPC_PMAPCLNT_H
  #define _RPC_PMAPCLNT_H
  #include <sys/cdefs.h>
+ #include <rpc/types.h>
+ #include <rpc/xdr.h>
+ #include <netinet/in.h>
  
  __BEGIN_DECLS
  extern bool_t		pmap_set	__P((u_long, u_long, int, int));
Index: src/include/rpc/pmap_prot.h
diff -c src/include/rpc/pmap_prot.h:1.5 src/include/rpc/pmap_prot.h:1.5.2.1
*** src/include/rpc/pmap_prot.h:1.5	Tue Jan 14 16:59:58 1997
--- src/include/rpc/pmap_prot.h	Sat Feb  1 02:02:57 1997
***************
*** 71,76 ****
--- 71,78 ----
  #ifndef _RPC_PMAPPROT_H
  #define _RPC_PMAPPROT_H
  #include <sys/cdefs.h>
+ #include <rpc/types.h>
+ #include <rpc/xdr.h>
  
  #define PMAPPORT		((u_short)111)
  #define PMAPPROG		((u_long)100000)
Index: src/include/rpc/pmap_rmt.h
diff -c src/include/rpc/pmap_rmt.h:1.5 src/include/rpc/pmap_rmt.h:1.5.2.1
*** src/include/rpc/pmap_rmt.h:1.5	Tue Jan 14 16:59:59 1997
--- src/include/rpc/pmap_rmt.h	Sat Feb  1 02:02:57 1997
***************
*** 41,46 ****
--- 41,48 ----
  #ifndef _RPC_PMAPRMT_H
  #define _RPC_PMAPRMT_H
  #include <sys/cdefs.h>
+ #include <rpc/types.h>
+ #include <rpc/xdr.h>
  
  struct rmtcallargs {
  	u_long prog, vers, proc, arglen;
Index: src/include/rpc/rpc_msg.h
diff -c src/include/rpc/rpc_msg.h:1.7 src/include/rpc/rpc_msg.h:1.7.2.1
*** src/include/rpc/rpc_msg.h:1.7	Tue Jan 14 17:00:00 1997
--- src/include/rpc/rpc_msg.h	Sat Feb  1 02:02:57 1997
***************
*** 40,45 ****
--- 40,48 ----
  
  #ifndef _RPC_RPCMSG_H
  #define _RPC_RPCMSG_H
+ #include <rpc/types.h>
+ #include <rpc/xdr.h>
+ #include <rpc/auth.h>
  
  #define RPC_MSG_VERSION		((u_long) 2)
  #define RPC_SERVICE_PORT	((u_short) 2048)
Index: src/include/rpc/svc.h
diff -c src/include/rpc/svc.h:1.8 src/include/rpc/svc.h:1.8.2.1
*** src/include/rpc/svc.h:1.8	Tue Jan 14 17:00:01 1997
--- src/include/rpc/svc.h	Sat Feb  1 02:02:58 1997
***************
*** 40,45 ****
--- 40,50 ----
  #ifndef _RPC_SVC_H
  #define _RPC_SVC_H
  #include <sys/cdefs.h>
+ #include <rpc/types.h>
+ #include <rpc/xdr.h>
+ #include <rpc/auth.h>
+ #include <rpc/rpc_msg.h>
+ #include <netinet/in.h>
  
  /*
   * This interface must manage two items concerning remote procedure calling:
Index: src/include/rpc/svc_auth.h
diff -c src/include/rpc/svc_auth.h:1.5 src/include/rpc/svc_auth.h:1.5.2.1
*** src/include/rpc/svc_auth.h:1.5	Tue Jan 14 17:00:02 1997
--- src/include/rpc/svc_auth.h	Sat Feb  1 02:02:58 1997
***************
*** 39,44 ****
--- 39,48 ----
  
  #ifndef _RPC_SVCAUTH_H
  #define _RPC_SVCAUTH_H
+ #include <sys/cdefs.h>
+ #include <rpc/auth.h>
+ #include <rpc/svc.h>
+ #include <rpc/rpc_msg.h>
  
  /*
   * Server side authenticator
Index: src/include/rpc/xdr.h
diff -c src/include/rpc/xdr.h:1.6 src/include/rpc/xdr.h:1.6.2.1
*** src/include/rpc/xdr.h:1.6	Tue Jan 14 17:00:05 1997
--- src/include/rpc/xdr.h	Sat Feb  1 02:02:58 1997
***************
*** 40,45 ****
--- 40,46 ----
  #ifndef _RPC_XDR_H
  #define _RPC_XDR_H
  #include <sys/cdefs.h>
+ #include <rpc/types.h>
  
  /*
   * XDR provides a conventional way for converting between C data
Index: src/include/rpcsvc/yp_prot.h
diff -c src/include/rpcsvc/yp_prot.h:1.5 src/include/rpcsvc/yp_prot.h:1.5.2.1
*** src/include/rpcsvc/yp_prot.h:1.5	Tue Jan 14 17:00:18 1997
--- src/include/rpcsvc/yp_prot.h	Sat Feb  1 02:03:01 1997
***************
*** 32,37 ****
--- 32,39 ----
  #ifndef _RPCSVC_YP_PROT_H_
  #define _RPCSVC_YP_PROT_H_
  
+ #include <rpc/rpc.h>
+ 
  /*
   * YPSERV PROTOCOL:
   *
Index: src/include/rpcsvc/ypclnt.h
diff -c src/include/rpcsvc/ypclnt.h:1.5 src/include/rpcsvc/ypclnt.h:1.5.2.1
*** src/include/rpcsvc/ypclnt.h:1.5	Tue Jan 14 17:00:19 1997
--- src/include/rpcsvc/ypclnt.h	Sat Feb  1 02:03:01 1997
***************
*** 32,37 ****
--- 32,40 ----
  #ifndef _RPCSVC_YPCLNT_H_
  #define _RPCSVC_YPCLNT_H_
  
+ #include <rpc/rpc.h>
+ #include <rpcsvc/yp_prot.h>
+ 
  #define YPERR_BADARGS	1		/* args to function are bad */
  #define YPERR_RPC	2		/* RPC failure */
  #define YPERR_DOMAIN	3		/* can't bind to a server for domain */
>Audit-Trail:
>Unformatted:



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