From owner-svn-src-all@freebsd.org Mon Mar 21 14:21:33 2016 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 8B552AD7DD1; Mon, 21 Mar 2016 14:21:33 +0000 (UTC) (envelope-from ian@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 447B91E34; Mon, 21 Mar 2016 14:21:33 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2LELWmU095552; Mon, 21 Mar 2016 14:21:32 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2LELWKt095550; Mon, 21 Mar 2016 14:21:32 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201603211421.u2LELWKt095550@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 21 Mar 2016 14:21:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297147 - head/lib/libstand X-SVN-Group: head 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.21 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: Mon, 21 Mar 2016 14:21:33 -0000 Author: ian Date: Mon Mar 21 14:21:32 2016 New Revision: 297147 URL: https://svnweb.freebsd.org/changeset/base/297147 Log: Garbage collect the bswap routines from libstand. The declaration was wrapped in an i386 ifdef with a comment questioning their usefulness even there. It turns out they aren't referenced anywhere, but their presence prevents using sys/endian.h in libstand code. These days, sys/endian.h provides much better support for such things, using compiler builtins and inline functions (and creating connections between libstand code and header files from sys/ would not be breaking new ground). Modified: head/lib/libstand/Makefile head/lib/libstand/stand.h Modified: head/lib/libstand/Makefile ============================================================================== --- head/lib/libstand/Makefile Mon Mar 21 08:30:58 2016 (r297146) +++ head/lib/libstand/Makefile Mon Mar 21 14:21:32 2016 (r297147) @@ -25,7 +25,7 @@ WARNS?= 0 CFLAGS+= -I${LIBSTAND_SRC} # standalone components and stuff we have modified locally -SRCS+= gzguts.h zutil.h __main.c assert.c bcd.c bswap.c environment.c getopt.c gets.c \ +SRCS+= gzguts.h zutil.h __main.c assert.c bcd.c environment.c getopt.c gets.c \ globals.c pager.c printf.c strdup.c strerror.c strtol.c strtoul.c random.c \ sbrk.c twiddle.c zalloc.c zalloc_malloc.c Modified: head/lib/libstand/stand.h ============================================================================== --- head/lib/libstand/stand.h Mon Mar 21 08:30:58 2016 (r297146) +++ head/lib/libstand/stand.h Mon Mar 21 14:21:32 2016 (r297147) @@ -335,11 +335,6 @@ static __inline quad_t qmin(quad_t a, qu static __inline u_long ulmax(u_long a, u_long b) { return (a > b ? a : b); } static __inline u_long ulmin(u_long a, u_long b) { return (a < b ? a : b); } -/* swaps (undocumented, useful?) */ -#ifdef __i386__ -extern u_int32_t bswap32(u_int32_t x); -extern u_int64_t bswap64(u_int64_t x); -#endif /* null functions for device/filesystem switches (undocumented) */ extern int nodev(void);