From owner-svn-src-all@freebsd.org Tue Dec 5 21:38:27 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2063AE8350E; Tue, 5 Dec 2017 21:38:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CCC372B6B; Tue, 5 Dec 2017 21:38:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB5LcOM2024341; Tue, 5 Dec 2017 21:38:24 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB5LcO0K024340; Tue, 5 Dec 2017 21:38:24 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201712052138.vB5LcO0K024340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 5 Dec 2017 21:38:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326594 - head/stand/libsa X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/libsa X-SVN-Commit-Revision: 326594 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 21:38:27 -0000 Author: imp Date: Tue Dec 5 21:38:24 2017 New Revision: 326594 URL: https://svnweb.freebsd.org/changeset/base/326594 Log: Now that we offer a semi-sane standards-ish set of #include files in the stand environment that's safe to use (and insulated from whatever build env you might normally have), stop hacking the bzlib and zlib sources with sed. There's no longer any need. Sponsored by: Netflix Modified: head/stand/libsa/Makefile Modified: head/stand/libsa/Makefile ============================================================================== --- head/stand/libsa/Makefile Tue Dec 5 21:38:19 2017 (r326593) +++ head/stand/libsa/Makefile Tue Dec 5 21:38:24 2017 (r326594) @@ -86,50 +86,15 @@ SRCS+= _setjmp.S # loader(8) with LOADER_BZIP2_SUPPORT defined .PATH: ${SRCTOP}/contrib/bzip2 CFLAGS+= -DBZ_NO_STDIO -DBZ_NO_COMPRESS -SRCS+= libsa_bzlib_private.h -.for file in bzlib.c crctable.c decompress.c huffman.c randtable.c -SRCS+= _${file} -CLEANFILES+= _${file} -CFLAGS._${file}+=-I${SRCTOP}/contrib/bzip2 +SRCS+=bzlib.c crctable.c decompress.c huffman.c randtable.c -_${file}: ${file} - sed "s|bzlib_private\.h|libsa_bzlib_private.h|" \ - ${.ALLSRC} > ${.TARGET} -.endfor - -CLEANFILES+= libsa_bzlib_private.h -libsa_bzlib_private.h: bzlib_private.h - sed -e 's||"stand.h"|' \ - ${.ALLSRC} > ${.TARGET} - # decompression functionality from zlib .PATH: ${SRCTOP}/contrib/zlib CFLAGS+=-DHAVE_MEMCPY -I${SRCTOP}/contrib/zlib -SRCS+= adler32.c crc32.c libsa_zutil.h libsa_gzguts.h +SRCS+= adler32.c crc32.c +SRCS+= infback.c inffast.c inflate.c inftrees.c zutil.c -.for file in infback.c inffast.c inflate.c inftrees.c zutil.c -SRCS+= _${file} -CLEANFILES+= _${file} - -_${file}: ${file} - sed -e "s|zutil\.h|libsa_zutil.h|" \ - -e "s|gzguts\.h|libsa_gzguts.h|" \ - ${.ALLSRC} > ${.TARGET} -.endfor - -# depend on stand.h being able to be included multiple times -.for file in zutil.h gzguts.h -CLEANFILES+= libsa_${file} -libsa_${file}: ${file} - sed -e 's||"stand.h"|' \ - -e 's||"stand.h"|' \ - -e 's||"stand.h"|' \ - -e 's||"stand.h"|' \ - -e 's||"stand.h"|' \ - ${.ALLSRC} > ${.TARGET} -.endfor - # Create a subset of includes that are safe, as well as adjusting those that aren't # The lists may drive people nuts, but they are explicitly opt-in beforedepend: @@ -146,7 +111,7 @@ beforedepend: for i in _time.h _strings.h _string.h; do \ [ -f xlocale/$$i ] || cp /dev/null xlocale/$$i; \ done; \ - for i in ctype.h stdio.h stdlib.h; do \ + for i in ctype.h fcntl.h stdio.h stdlib.h; do \ ln -sf ${SASRC}/stand.h $$i; \ done