Date: Tue, 7 Jan 1997 18:34:21 -0500 (EST) From: Pedro Giffuni <m230761@ingenieria.ingsala.unal.edu.co> To: =?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?= <ache@nagual.ru> Cc: Warner Losh <imp@village.org>, Satoshi Asami <asami@freebsd.org>, ports@freebsd.org Subject: Re: Niklas Hallqvist: archivers/hpack.non-usa.only Message-ID: <Pine.SOL.3.91.970107181336.1376A-100000@ingenieria.ingsala.unal.edu.co> In-Reply-To: <Pine.BSF.3.95.970108005250.326A-100000@nagual.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello, I disagree with this (proposed) way of patching: as clearly stated on "the porting guidelines", there is a common way to identify BSD4.4, if there are differences, then we should use the specific *BSD flag, but it doesn't seem logical to treat everyone as a special case of FreeBSD. Changes in the diffs will have to be made anyway, but the general idea is that patches should disappear after we feedback the diffs to the author of the program. I wouldn't like to define FreeBSD, OpenBSD, and NetBSD because the port was submitted by someone in another BSD camp. Pedro. On Wed, 8 Jan 1997, =?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?= wrote: > On Tue, 7 Jan 1997, Warner Losh wrote: > > > here's a patch that the OpenBSD folks forwarded to me. After > > reviewing it, it looks good. Do you have time to commit this? If > > not, I'll be happy to do so. > > It seem they add __OpenBSD__ keyword only, so no harm with it, but > I don't understand where we go? It is too many places in ports where > __FreeBSD__ keyword used. Are they plan to add __OpenBSD__ for all of > them? It will be silly mass change which not preserved with each new > commit. > Maybe just add -D__FreeBSD__ to OpenBSD CFLAGS in bsd.ports.mk instead and > handle differences in this way: > > #ifdef __FreeBSD__ > #ifdef __OpenBSD__ > OpenBSD case > #else > FreeBSD case > #endif > #endif > > As I think OpenBSD will match FreeBSD in 99% cases. > > > Also, the RESTRICTED message in hpack I think is slightly > > wrong. There is no copyright problem with using this package in the > > USA, but rather a Patent problem, since hpack uses public key > > encryption stuff w/o using RSA's RSAREF. I might have missed > > something here, but I thought I'd ask. > > > > I am not restriction expert, change it if you know it better. > > > > Thanks for looking into this... > > > > Warner > > > > > > ------- Forwarded Message > > > > Return-Path: niklas@filippa.appli.se > > Delivery-Date: Tue, 07 Jan 1997 10:05:04 -0700 > > Return-Path: niklas@filippa.appli.se > > Received: from information-retrieval.village.org [204.144.255.51] > > by rover.village.org with smtp (Exim 0.56 #1) > > id E0vhexS-0000LX-00; Tue, 7 Jan 1997 10:05:02 -0700 > > Received: from cvs.openbsd.org (cvs.openbsd.org [199.185.137.3]) by information-retrieval.village.org (8.6.11/8.6.6) with ESMTP id KAA21641 for <imp@village.org>; Tue, 7 Jan 1997 10:04:36 -0700 > > Received: from zephyr.ccrc.wustl.edu (zephyr.ccrc.wustl.edu [128.252.169.9]) by cvs.openbsd.org (8.8.4/8.6.12) with SMTP id KAA19985 for <imp>; Tue, 7 Jan 1997 10:03:30 -0700 (MST) > > Received: from filippa.appli.se by zephyr.ccrc.wustl.edu id aa21316; > > 7 Jan 97 11:03 CST > > Received: (from niklas@localhost) > > by filippa.appli.se (8.8.4/8.8.4) > > id SAA01440 for imp@openbsd.org; Tue, 7 Jan 1997 18:00:47 +0100 (MET) > > Date: Tue, 7 Jan 1997 18:00:47 +0100 (MET) > > From: Niklas Hallqvist <niklas@filippa.appli.se> > > Message-Id: <199701071700.SAA01440@filippa.appli.se> > > To: imp@openbsd.org > > Subject: archivers/hpack.non-usa.only > > > > Index: patches/patch-aa > > =================================================================== > > RCS file: /cvs/ports-src/archivers/hpack.non-usa.only/patches/patch-aa,v > > retrieving revision 1.1.1.1 > > diff -c -r1.1.1.1 patch-aa > > *** patch-aa 1995/01/07 16:27:55 1.1.1.1 > > - --- patch-aa 1997/01/07 17:02:27 > > *************** > > *** 90,105 **** > > > > static void getPassword( void ) > > { > > ! + #ifdef __FreeBSD__ > > + int len; > > + #endif > > puts( "Please enter password for this private key." ); > > puts( "Warning: Password will be echoed to screen!" ); > > printf( "Password: " ); > > fflush( stdout ); > > ! + #ifndef __FreeBSD__ > > gets( password ); > > ! + #else /* gets depricated in FreeBSD */ > > + fgets( password, sizeof(password), stdin); > > + len = strlen(password); > > + if (password[len - 1] == '\n') > > - --- 90,105 ---- > > > > static void getPassword( void ) > > { > > ! + #if defined (__FreeBSD__) || defined(__OpenBSD__) > > + int len; > > + #endif > > puts( "Please enter password for this private key." ); > > puts( "Warning: Password will be echoed to screen!" ); > > printf( "Password: " ); > > fflush( stdout ); > > ! + #if !defined (__FreeBSD__) && !defined(__OpenBSD__) > > gets( password ); > > ! + #else /* gets depricated in FreeBSD && OpenBSD */ > > + fgets( password, sizeof(password), stdin); > > + len = strlen(password); > > + if (password[len - 1] == '\n') > > *************** > > *** 221,227 **** > > return( ERROR ); /* Couldn't find/open input file */ > > } > > #endif /* System-specific handling of how to find language defn.file */ > > ! + #ifdef __FreeBSD__ > > + found: > > + #endif > > setInputFD( inFD ); > > - --- 221,227 ---- > > return( ERROR ); /* Couldn't find/open input file */ > > } > > #endif /* System-specific handling of how to find language defn.file */ > > ! + #if defined (__FreeBSD__) || defined (__OpenBSD__) > > + found: > > + #endif > > setInputFD( inFD ); > > *************** > > *** 242,249 **** > > > > #if defined( BSD386 ) || defined( CONVEX ) || defined( HPUX ) || \ > > defined( IRIX ) || defined( LINUX ) || defined( POSIX ) || \ > > ! ! defined( SVR4 ) || defined( UTS4 ) || defined( __FreeBSD__ ) > > ! > > #include <termios.h> > > > > *************** > > - --- 242,249 ---- > > > > #if defined( BSD386 ) || defined( CONVEX ) || defined( HPUX ) || \ > > defined( IRIX ) || defined( LINUX ) || defined( POSIX ) || \ > > ! ! defined( SVR4 ) || defined( UTS4 ) || defined( __FreeBSD__ ) || \ > > ! ! defined( __OpenBSD__ ) > > #include <termios.h> > > > > *************** > > *************** > > *** 259,265 **** > > tcgetattr( ttyFD, &ttyInfo ); > > #if defined( BSD386 ) || defined( CONVEX ) || defined( HPUX ) || \ > > defined( IRIX ) || defined( LINUX ) || defined( POSIX ) || \ > > ! ! defined( UTS4 ) || defined( __FreeBSD__ ) > > ttyInfo.c_lflag &= ~ECHO; > > ttyInfo.c_lflag &= ~ICANON; > > #else > > - --- 259,265 ---- > > tcgetattr( ttyFD, &ttyInfo ); > > #if defined( BSD386 ) || defined( CONVEX ) || defined( HPUX ) || \ > > defined( IRIX ) || defined( LINUX ) || defined( POSIX ) || \ > > ! ! defined( UTS4 ) || defined( __FreeBSD__ ) || defined( __OpenBSD__ ) > > ttyInfo.c_lflag &= ~ECHO; > > ttyInfo.c_lflag &= ~ICANON; > > #else > > *************** > > *** 276,282 **** > > tcgetattr( ttyFD, &ttyInfo ); > > #if defined( BSD386 ) || defined( CONVEX ) || defined( HPUX ) || \ > > defined( IRIX ) || defined( LINUX ) || defined( POSIX ) || \ > > ! ! defined( UTS4 ) || defined( __FreeBSD__ ) > > ttyInfo.c_lflag |= ECHO; > > ttyInfo.c_lflag |= ICANON; > > #else > > - --- 276,282 ---- > > tcgetattr( ttyFD, &ttyInfo ); > > #if defined( BSD386 ) || defined( CONVEX ) || defined( HPUX ) || \ > > defined( IRIX ) || defined( LINUX ) || defined( POSIX ) || \ > > ! ! defined( UTS4 ) || defined( __FreeBSD__ ) || defined( __OpenBSD__ ) > > ttyInfo.c_lflag |= ECHO; > > ttyInfo.c_lflag |= ICANON; > > #else > > *************** > > *** 293,299 **** > > defined( HPUX ) || defined( IRIX ) || defined( LINUX ) || \ > > defined( NEXT ) || defined( OSF1 ) || defined( SUNOS ) || \ > > defined( SVR4 ) || defined( ULTRIX ) || defined( ULTRIX_OLD ) || \ > > ! ! defined( UTS4 ) || defined( __FreeBSD__ ) > > > > int htruncate( const FD theFD ) > > { > > - --- 293,299 ---- > > defined( HPUX ) || defined( IRIX ) || defined( LINUX ) || \ > > defined( NEXT ) || defined( OSF1 ) || defined( SUNOS ) || \ > > defined( SVR4 ) || defined( ULTRIX ) || defined( ULTRIX_OLD ) || \ > > ! ! defined( UTS4 ) || defined( __FreeBSD__ ) || defined( __OpenBSD__ ) > > > > int htruncate( const FD theFD ) > > { > > *************** > > *** 336,347 **** > > > > #include <stdio.h> /* Prototypes for generic functions */ > > #if defined( __UNIX__ ) && !( defined( BSD386 ) || defined( CONVEX ) || \ > > ! ! defined( NEXT ) || defined( ULTRIX_OLD ) || defined( __FreeBSD__ )) > > #include <malloc.h> /* Needed for mem.functions on some systems */ > > #endif /* __UNIX__ && !( BSD386 || CONVEX || NEXT || ULTRIX_OLD ) */ > > #if defined( AIX386 ) || ( defined( __AMIGA__ ) && !defined( LATTICE ) ) || \ > > defined( __ARC__ ) || defined( __ATARI__ ) || defined( __MSDOS16__ ) || \ > > ! ! defined( __MSDOS32__ ) || defined( __FreeBSD__ ) > > #include <stdlib.h> /* Needed for mem.functions */ > > #endif /* AIX386 || ( __AMIGA__ && !LATTICE ) || __ARC__ || __ATARI__ || __MSDOS16__ || __MSDOS32__ */ > > #if defined( __ATARI__ ) || ( defined( __OS2__ ) && !defined( __GCC__ ) ) > > - --- 336,347 ---- > > > > #include <stdio.h> /* Prototypes for generic functions */ > > #if defined( __UNIX__ ) && !( defined( BSD386 ) || defined( CONVEX ) || \ > > ! ! defined( NEXT ) || defined( ULTRIX_OLD ) || defined( __FreeBSD__ )) || defined( __OpenBSD__ ) > > #include <malloc.h> /* Needed for mem.functions on some systems */ > > #endif /* __UNIX__ && !( BSD386 || CONVEX || NEXT || ULTRIX_OLD ) */ > > #if defined( AIX386 ) || ( defined( __AMIGA__ ) && !defined( LATTICE ) ) || \ > > defined( __ARC__ ) || defined( __ATARI__ ) || defined( __MSDOS16__ ) || \ > > ! ! defined( __MSDOS32__ ) || defined( __FreeBSD__ ) || defined( __OpenBSD__ ) > > #include <stdlib.h> /* Needed for mem.functions */ > > #endif /* AIX386 || ( __AMIGA__ && !LATTICE ) || __ARC__ || __ATARI__ || __MSDOS16__ || __MSDOS32__ */ > > #if defined( __ATARI__ ) || ( defined( __OS2__ ) && !defined( __GCC__ ) ) > > *************** > > *** 360,367 **** > > #elif defined( CONVEX ) > > #define MAX_PATH ( _POSIX_PATH_MAX + 1 ) > > #define MAX_FILENAME ( 254 + 1 ) > > ! ! #elif defined( POSIX ) || defined(__FreeBSD__) > > ! ! #ifdef __FreeBSD__ > > ! #include <limits.h> > > ! #endif > > #define MAX_PATH ( _POSIX_PATH_MAX + 1 ) > > - --- 360,367 ---- > > #elif defined( CONVEX ) > > #define MAX_PATH ( _POSIX_PATH_MAX + 1 ) > > #define MAX_FILENAME ( 254 + 1 ) > > ! ! #elif defined( POSIX ) || defined(__FreeBSD__) || defined( __OpenBSD__ ) > > ! ! #if defined (__FreeBSD__) || defined (__OpenBSD__) > > ! #include <limits.h> > > ! #endif > > #define MAX_PATH ( _POSIX_PATH_MAX + 1 ) > > *************** > > *** 381,387 **** > > defined( BSD386 ) || defined( GENERIC ) || defined( HPUX ) || \ > > defined( IRIX ) || defined( NEXT ) || defined( OSF1 ) || \ > > ! defined( ULTRIX ) || defined( ULTRIX_OLD ) || defined( UTS4 ) || \ > > ! ! defined( __FreeBSD__ ) > > #define SPACE_OK TRUE > > #else > > #define SPACE_OK FALSE > > - --- 381,387 ---- > > defined( BSD386 ) || defined( GENERIC ) || defined( HPUX ) || \ > > defined( IRIX ) || defined( NEXT ) || defined( OSF1 ) || \ > > ! defined( ULTRIX ) || defined( ULTRIX_OLD ) || defined( UTS4 ) || \ > > ! ! defined( __FreeBSD__ ) || defined( __OpenBSD__ ) > > #define SPACE_OK TRUE > > #else > > #define SPACE_OK FALSE > > *************** > > *** 391,397 **** > > #elif defined( UTS4 ) /* Amdahl UTS4 */ > > #define NEED_STRLWR > > #define NEED_STRICMP > > ! + #elif defined( __FreeBSD__ ) /* Amdahl UTS4 */ > > + #include <unistd.h> > > + #define tell(fd) lseek((fd),(off_t)0,SEEK_CUR) > > + #define NEED_STRLWR > > - --- 391,397 ---- > > #elif defined( UTS4 ) /* Amdahl UTS4 */ > > #define NEED_STRLWR > > #define NEED_STRICMP > > ! + #elif defined( __FreeBSD__ ) || defined (__OpenBSD__) > > + #include <unistd.h> > > + #define tell(fd) lseek((fd),(off_t)0,SEEK_CUR) > > + #define NEED_STRLWR > > *************** > > *** 497,503 **** > > > > void getFileName( char *fileName ) > > { > > ! + #ifdef __FreeBSD__ > > + int len; > > + #endif > > hprintf( MESG_s_ALREADY_EXISTS_ENTER_NEW_NAME, fileName ); > > - --- 497,503 ---- > > > > void getFileName( char *fileName ) > > { > > ! + #if defined (__FreeBSD__) || defined (__OpenBSD__) > > + int len; > > + #endif > > hprintf( MESG_s_ALREADY_EXISTS_ENTER_NEW_NAME, fileName ); > > *************** > > *** 505,513 **** > > /* Nasty input routine - should check for illegal chars and suchlike. > > Will also overflow if anyone enters more than 16K chars */ > > hflush( stdout ); > > ! + #ifndef __FreeBSD__ > > hgets( ( char * ) mrglBuffer ); > > ! + #else /* gets depricated in FreeBSD */ > > + fgets( mrglBuffer, MAX_PATH, stdin ); > > + len = strlen(mrglBuffer); > > + if (mrglBuffer[len - 1] == '\n') > > - --- 505,513 ---- > > /* Nasty input routine - should check for illegal chars and suchlike. > > Will also overflow if anyone enters more than 16K chars */ > > hflush( stdout ); > > ! + #if !defined (__FreeBSD__) && !defined (__OpenBSD__) > > hgets( ( char * ) mrglBuffer ); > > ! + #else /* gets depricated in FreeBSD & OpenBSD */ > > + fgets( mrglBuffer, MAX_PATH, stdin ); > > + len = strlen(mrglBuffer); > > + if (mrglBuffer[len - 1] == '\n') > > > > > > ------- End of Forwarded Message > > > > -- > Andrey A. Chernov > <ache@null.net> > http://www.nagual.ru/~ache/ > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.3.91.970107181336.1376A-100000>