From: Peter Avalos Date: Sat, 20 Jan 2007 05:57:40 +0000 (+0000) Subject: Update to bzip2-1.0.4. X-Git-Tag: v2.0.1~3644 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/c79bd3b919f1448d3b56a878627386115bd96437 Update to bzip2-1.0.4. --- diff --git a/contrib/bzip2-1.0/README.DELETED b/contrib/bzip2-1.0/README.DELETED index e4b5afea3a..5d12ccf6c0 100644 --- a/contrib/bzip2-1.0/README.DELETED +++ b/contrib/bzip2-1.0/README.DELETED @@ -2,7 +2,6 @@ Makefile Makefile-libbz2_so README.COMPILATION.PROBLEMS README.XML.STUFF -Y2K_INFO bz-common.xsl bz-fo.xsl bz-html.xsl diff --git a/contrib/bzip2-1.0/README.DRAGONFLY b/contrib/bzip2-1.0/README.DRAGONFLY index c257cc6f6c..257be95c20 100644 --- a/contrib/bzip2-1.0/README.DRAGONFLY +++ b/contrib/bzip2-1.0/README.DRAGONFLY @@ -1,5 +1,11 @@ Original source can be obtained from: -http://www.bzip.org/1.0.3/bzip2-1.0.3.tar.gz -MD5 (bzip2-1.0.3.tar.gz) = 8a716bebecb6e647d2e8a29ea5d8447f +http://www.bzip.org/1.0.4/bzip2-1.0.4.tar.gz +MD5 (bzip2-1.0.4.tar.gz) = fc310b254f6ba5fbb5da018f04533688 The file README.DELETED contains a list of deleted files. + +This is used by: +lib/libbz2/ +lib/libstand/ +usr.bin/bzip2/ +usr.bin/bzip2recover/ diff --git a/usr.bin/bzip2/Makefile b/usr.bin/bzip2/Makefile index 2df056ead8..569767ec0c 100644 --- a/usr.bin/bzip2/Makefile +++ b/usr.bin/bzip2/Makefile @@ -1,13 +1,12 @@ # $FreeBSD: src/usr.bin/bzip2/Makefile,v 1.5.2.2 2001/08/02 01:09:06 obrien Exp $ -# $DragonFly: src/usr.bin/bzip2/Makefile,v 1.6 2005/12/30 12:52:31 swildner Exp $ +# $DragonFly: src/usr.bin/bzip2/Makefile,v 1.7 2007/01/20 05:57:40 pavalos Exp $ BZ2DIR= ${.CURDIR}/../../contrib/bzip2-1.0 -CONTRIBDIR= ${BZ2DIR} .PATH: ${BZ2DIR} PROG= bzip2 -SRCS= bzip2.c bzip2.c.patch +SRCS= bzip2.c MAN= bzip2.1 CFLAGS+= -D_FILE_OFFSET_BITS=64 diff --git a/usr.bin/bzip2/bzip2.c.patch b/usr.bin/bzip2/bzip2.c.patch deleted file mode 100644 index bab615593d..0000000000 --- a/usr.bin/bzip2/bzip2.c.patch +++ /dev/null @@ -1,98 +0,0 @@ -$DragonFly: src/usr.bin/bzip2/Attic/bzip2.c.patch,v 1.1 2005/06/29 23:03:22 corecode Exp $ -Index: bzip2.c -=================================================================== -RCS file: /cvs/src/contrib/bzip2-1.0/bzip2.c,v -retrieving revision 1.1 -diff -u -r1.1 bzip2.c ---- bzip2.c 29 Jun 2005 22:38:10 -0000 1.1 -+++ bzip2.c 29 Jun 2005 22:50:59 -0000 -@@ -312,6 +312,7 @@ - - static void copyFileName ( Char*, Char* ); - static void* myMalloc ( Int32 ); -+static int applySavedFileAttrToOutputFile ( int fd ); - - - -@@ -457,6 +458,10 @@ - ret = fflush ( zStream ); - if (ret == EOF) goto errhandler_io; - if (zStream != stdout) { -+ int fd = fileno ( zStream ); -+ if (fd < 0) goto errhandler_io; -+ ret = applySavedFileAttrToOutputFile ( fd ); -+ if (ret != 0) goto errhandler_io; - ret = fclose ( zStream ); - outputHandleJustInCase = NULL; - if (ret == EOF) goto errhandler_io; -@@ -569,6 +574,12 @@ - - closeok: - if (ferror(zStream)) goto errhandler_io; -+ if ( stream != stdout) { -+ int fd = fileno ( stream ); -+ if (fd < 0) goto errhandler_io; -+ ret = applySavedFileAttrToOutputFile ( fd ); -+ if (ret != 0) goto errhandler_io; -+ } - ret = fclose ( zStream ); - if (ret == EOF) goto errhandler_io; - -@@ -1129,7 +1140,7 @@ - - - static --void applySavedMetaInfoToOutputFile ( Char *dstName ) -+void applySavedTimeInfoToOutputFile ( Char *dstName ) - { - # if BZ_UNIX - IntNative retVal; -@@ -1138,16 +1149,26 @@ - uTimBuf.actime = fileMetaInfo.st_atime; - uTimBuf.modtime = fileMetaInfo.st_mtime; - -- retVal = chmod ( dstName, fileMetaInfo.st_mode ); -- ERROR_IF_NOT_ZERO ( retVal ); -- - retVal = utime ( dstName, &uTimBuf ); - ERROR_IF_NOT_ZERO ( retVal ); -+# endif -+} -+ -+static -+int applySavedFileAttrToOutputFile ( int fd ) -+{ -+# if BZ_UNIX -+ IntNative retVal; -+ -+ retVal = fchmod ( fd, fileMetaInfo.st_mode ); -+ if (retVal != 0) -+ return retVal; - -- retVal = chown ( dstName, fileMetaInfo.st_uid, fileMetaInfo.st_gid ); -+ (void) fchown ( fd, fileMetaInfo.st_uid, fileMetaInfo.st_gid ); - /* chown() will in many cases return with EPERM, which can - be safely ignored. - */ -+ return 0; - # endif - } - -@@ -1370,7 +1391,7 @@ - - /*--- If there was an I/O error, we won't get here. ---*/ - if ( srcMode == SM_F2F ) { -- applySavedMetaInfoToOutputFile ( outName ); -+ applySavedTimeInfoToOutputFile ( outName ); - deleteOutputOnInterrupt = False; - if ( !keepInputFiles ) { - IntNative retVal = remove ( inName ); -@@ -1548,7 +1569,7 @@ - /*--- If there was an I/O error, we won't get here. ---*/ - if ( magicNumberOK ) { - if ( srcMode == SM_F2F ) { -- applySavedMetaInfoToOutputFile ( outName ); -+ applySavedTimeInfoToOutputFile ( outName ); - deleteOutputOnInterrupt = False; - if ( !keepInputFiles ) { - IntNative retVal = remove ( inName );