From owner-freebsd-ports Tue Jan 7 14:37:30 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id OAA16344 for ports-outgoing; Tue, 7 Jan 1997 14:37:30 -0800 (PST) Received: from sovcom.kiae.su (sovcom.kiae.su [193.125.152.1]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id OAA16329; Tue, 7 Jan 1997 14:37:25 -0800 (PST) Received: by sovcom.kiae.su id AA09350 (5.65.kiae-1 ); Wed, 8 Jan 1997 01:06:07 +0300 Received: by sovcom.KIAE.su (UUMAIL/2.0); Wed, 8 Jan 97 01:06:07 +0300 Received: from localhost (nagual.ru [127.0.0.1]) by nagual.ru (8.8.4/8.8.4) with SMTP id BAA00342; Wed, 8 Jan 1997 01:00:56 +0300 (MSK) Date: Wed, 8 Jan 1997 01:00:56 +0300 (MSK) From: =?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?= To: Warner Losh Cc: Satoshi Asami , ports@freebsd.org Subject: Re: Niklas Hallqvist: archivers/hpack.non-usa.only In-Reply-To: Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-ports@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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 ; 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 ; 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 > 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 > > *************** > - --- 242,249 ---- > > #if defined( BSD386 ) || defined( CONVEX ) || defined( HPUX ) || \ > defined( IRIX ) || defined( LINUX ) || defined( POSIX ) || \ > ! ! defined( SVR4 ) || defined( UTS4 ) || defined( __FreeBSD__ ) || \ > ! ! defined( __OpenBSD__ ) > #include > > *************** > *************** > *** 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 /* Prototypes for generic functions */ > #if defined( __UNIX__ ) && !( defined( BSD386 ) || defined( CONVEX ) || \ > ! ! defined( NEXT ) || defined( ULTRIX_OLD ) || defined( __FreeBSD__ )) > #include /* 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 /* Needed for mem.functions */ > #endif /* AIX386 || ( __AMIGA__ && !LATTICE ) || __ARC__ || __ATARI__ || __MSDOS16__ || __MSDOS32__ */ > #if defined( __ATARI__ ) || ( defined( __OS2__ ) && !defined( __GCC__ ) ) > - --- 336,347 ---- > > #include /* Prototypes for generic functions */ > #if defined( __UNIX__ ) && !( defined( BSD386 ) || defined( CONVEX ) || \ > ! ! defined( NEXT ) || defined( ULTRIX_OLD ) || defined( __FreeBSD__ )) || defined( __OpenBSD__ ) > #include /* 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 /* 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 > ! #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 > ! #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 > + #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 > + #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 http://www.nagual.ru/~ache/