summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2016-03-21 14:21:32 +0000
committerian <ian@FreeBSD.org>2016-03-21 14:21:32 +0000
commit0e961a376e8e68d392dd6755fce79511b3d38286 (patch)
tree146c6b8b6d55edad57ad8e687b17e15bce5cf6b8
parent43915d0b4911246322b8bf148fbc24a1fb6d718a (diff)
downloadFreeBSD-src-0e961a376e8e68d392dd6755fce79511b3d38286.zip
FreeBSD-src-0e961a376e8e68d392dd6755fce79511b3d38286.tar.gz
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).
-rw-r--r--lib/libstand/Makefile2
-rw-r--r--lib/libstand/stand.h5
2 files changed, 1 insertions, 6 deletions
diff --git a/lib/libstand/Makefile b/lib/libstand/Makefile
index 82e65f2..94223b1 100644
--- a/lib/libstand/Makefile
+++ b/lib/libstand/Makefile
@@ -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
diff --git a/lib/libstand/stand.h b/lib/libstand/stand.h
index 22ee319..a841523 100644
--- a/lib/libstand/stand.h
+++ b/lib/libstand/stand.h
@@ -335,11 +335,6 @@ static __inline quad_t qmin(quad_t a, quad_t b) { return (a < b ? a : b); }
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);
OpenPOWER on IntegriCloud