Subject: Re: pkg/7141: a port of freebsd's security/libident package
To: NetBSD GNATS submissions and followups <gnats-bugs@gnats.netbsd.org>
From: Greg A. Woods <woods@most.weird.com>
List: netbsd-bugs
Date: 03/14/1999 15:07:14
[ On Sunday, March 14, 1999 at 14:50:07 (-0500), Greg A. Woods wrote: ]
> Subject: Re: pkg/7141: a port of freebsd's security/libident package
>
> [ On , March 12, 1999 at 04:35:01 (-0000), gnats-bugs@gnats.netbsd.org wrote: ]
> > Subject: Re: pkg/7141: a port of freebsd's security/libident package
> >
> 
> I see that my patch-ab wasn't included.  I don't know if this was
> oversight, or intentional.  Although this patch may not be necessary for
> compiling libident itself, it is necessary for other packages that will
> use the installed <ident.h> (and it certainly does no harm to the
> ability to compile libident itself).
 
Never mind the previous -- I see now that the committed libident package
was for 0.22, and now all these patches are necessary (or maybe they
always were and I'd somehow screwed up my local copy of the distfile):

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	patches/patch-ab
#	patches/patch-ac
#	patches/patch-ad
#	patches/patch-ae
#
echo x - patches/patch-ab
sed 's/^X//' >patches/patch-ab << 'END-of-patches/patch-ab'
X*** ident.h-ORIG	Thu Nov 23 17:44:36 1995
X***************
X*** 8,30 ****
X  #ifndef __IDENT_H__
X  #define __IDENT_H__
X  
X  #ifdef	__cplusplus
X  extern "C" {
X  #endif
X  
X  /* Sigh */
X! #ifdef __STDC__
X! #  if __STDC__ == 1
X! #    define IS_STDC 1
X! #  endif
X! #endif
X! 
X! #ifdef __P
X! #  undef __P
X! #endif
X!     
X! #ifdef IS_STDC
X! #  define __P(AL)	                  AL
X  
X  #ifdef IN_LIBIDENT_SRC
X      
X--- 8,21 ----
X  #ifndef __IDENT_H__
X  #define __IDENT_H__
X  
X+ #include <sys/cdefs.h>
X+ 
X  #ifdef	__cplusplus
X  extern "C" {
X  #endif
X  
X  /* Sigh */
X! #if (0 - __STDC__) <= -1
X  
X  #ifdef IN_LIBIDENT_SRC
X      
X***************
X*** 49,56 ****
X      
X  #else
X  
X- #  define __P(AL)	                  ()
X- 
X  #ifdef IN_LIBIDENT_SRC
X      
X  #  define __P1(t1,a1)                     (a1) \
X--- 40,45 ----
X***************
X*** 85,94 ****
X  #endif
X  #endif
X  
X- #ifdef IS_STDC
X- #  undef IS_STDC
X- #endif
X- 
X  #ifdef _AIX
X  #  include <sys/select.h>
X  #endif
X--- 74,79 ----
X***************
X*** 96,129 ****
X  #  include <bstring.h>
X  #endif
X  #include <sys/types.h>
X  #include <netinet/in.h>
X- #include <sys/time.h>
X  
X  #if defined(VMS) && !defined(FD_SETSIZE)
X  #  define FD_SETSIZE 64
X  #endif
X  
X- /*
X-  * Sigh, GCC v2 complains when using undefined struct tags
X-  * in function prototypes...
X-  */
X- #if defined(__GNUC__) && !defined(INADDR_ANY)
X- #  define __STRUCT_IN_ADDR_P	void *
X- #else
X- #  define __STRUCT_IN_ADDR_P	struct in_addr *
X- #endif
X- 
X- #if defined(__GNUC__) && !defined(DST_NONE)
X- #  define __STRUCT_TIMEVAL_P	void *
X- #else
X- #  define __STRUCT_TIMEVAL_P	struct timeval *
X- #endif
X- 
X- #if defined(__sgi) && defined(_POSIX_SOURCE)
X- #  undef  __STRUCT_TIMEVAL_P
X- #  define __STRUCT_TIMEVAL_P	void *
X- #endif
X- 	
X  #ifndef IDBUFSIZE
X  #  define IDBUFSIZE 2048
X  #endif
X--- 81,102 ----
X  #  include <bstring.h>
X  #endif
X  #include <sys/types.h>
X+ #if TIME_WITH_SYS_TIME
X+ # include <sys/time.h>
X+ # include <time.h>
X+ #else
X+ # if HAVE_SYS_TIME_H
X+ #  include <sys/time.h>
X+ # else
X+ #  include <time.h>
X+ # endif
X+ #endif
X  #include <netinet/in.h>
X  
X  #if defined(VMS) && !defined(FD_SETSIZE)
X  #  define FD_SETSIZE 64
X  #endif
X  
X  #ifndef IDBUFSIZE
X  #  define IDBUFSIZE 2048
X  #endif
X***************
X*** 149,167 ****
X  /* Low-level calls and macros */
X  #define id_fileno(ID)	((ID)->fd)
X  
X! extern ident_t * id_open __P((__STRUCT_IN_ADDR_P laddr,
X! 			   __STRUCT_IN_ADDR_P faddr,
X! 			   __STRUCT_TIMEVAL_P timeout));
X    
X  extern int    id_close __P((ident_t *id));
X    
X  extern int    id_query __P((ident_t *id,
X  			    int lport,
X  			    int fport,
X! 			    __STRUCT_TIMEVAL_P timeout));
X    
X  extern int    id_parse __P((ident_t *id,
X! 			    __STRUCT_TIMEVAL_P timeout,
X  			    int *lport,
X  			    int *fport,
X  			    char **identifier,
X--- 122,140 ----
X  /* Low-level calls and macros */
X  #define id_fileno(ID)	((ID)->fd)
X  
X! extern ident_t * id_open __P((struct in_addr * laddr,
X! 			   struct in_addr * faddr,
X! 			   struct timeval * timeout));
X    
X  extern int    id_close __P((ident_t *id));
X    
X  extern int    id_query __P((ident_t *id,
X  			    int lport,
X  			    int fport,
X! 			    struct timeval * timeout));
X    
X  extern int    id_parse __P((ident_t *id,
X! 			    struct timeval * timeout,
X  			    int *lport,
X  			    int *fport,
X  			    char **identifier,
X***************
X*** 174,180 ****
X  
X  extern char  *ident_id __P((int fd, int timeout));
X  
X! extern IDENT *ident_query __P(( __STRUCT_IN_ADDR_P laddr, __STRUCT_IN_ADDR_P raddr, int lport, int rport, int timeout));
X  
X  extern void   ident_free __P((IDENT *id));
X  
X--- 147,153 ----
X  
X  extern char  *ident_id __P((int fd, int timeout));
X  
X! extern IDENT *ident_query __P(( struct in_addr * laddr, struct in_addr * raddr, int lport, int rport, int timeout));
X  
X  extern void   ident_free __P((IDENT *id));
X  
END-of-patches/patch-ab
echo x - patches/patch-ac
sed 's/^X//' >patches/patch-ac << 'END-of-patches/patch-ac'
X*** id_open.c-ORIG	Wed Nov  4 06:19:13 1998
X***************
X*** 38,52 ****
X  #endif
X  
X  
X- /*
X  ident_t *id_open __P3(struct in_addr *, laddr,
X  		      struct in_addr *, faddr,
X  		      struct timeval *, timeout)
X- */
X- 
X- ident_t *id_open __P((	__STRUCT_IN_ADDR_P laddr,
X- 			__STRUCT_IN_ADDR_P faddr,
X- 			__STRUCT_TIMEVAL_P timeout))
X  {
X      ident_t *id;
X      int res, tmperrno;
X--- 38,46 ----
END-of-patches/patch-ac
echo x - patches/patch-ad
sed 's/^X//' >patches/patch-ad << 'END-of-patches/patch-ad'
X*** id_query.c-ORIG	Wed Nov  4 06:19:13 1998
X***************
X*** 36,52 ****
X  #include "ident.h"
X  
X  
X- /*
X  int id_query __P4(ident_t *, id,
X  		  int, lport,
X  		  int, fport,
X  		  struct timeval *, timeout)
X- */
X- 
X- int    id_query __P((	ident_t *id,                 
X- 			int lport,                   
X- 			int fport,                   
X- 			__STRUCT_TIMEVAL_P timeout))
X  {
X  #ifdef SIGRETURNTYPE
X      SIGRETURNTYPE (*old_sig)();
X--- 36,45 ----
END-of-patches/patch-ad
echo x - patches/patch-ae
sed 's/^X//' >patches/patch-ae << 'END-of-patches/patch-ae'
X*** id_parse.c-ORIG	Wed Nov  4 06:19:13 1998
X***************
X*** 38,44 ****
X  #include "ident.h"
X  
X  
X- /*
X  int id_parse __P7(ident_t *, id,
X  		  struct timeval *, timeout,
X  		  int *, lport,
X--- 38,43 ----
X***************
X*** 46,60 ****
X  		  char **, identifier,
X  		  char **, opsys,
X  		  char **, charset)
X- */
X- 
X- int id_parse __P((  ident_t *id,               
X-                     __STRUCT_TIMEVAL_P timeout,
X-                     int *lport,                
X-                     int *fport,                
X-                     char **identifier,         
X-                     char **opsys,              
X-                     char **charset))           
X  {
X      char c, *cp, *tmp_charset;
X      fd_set rs;
X--- 45,50 ----
END-of-patches/patch-ae
exit



-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>      <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>