libbsd: Branch 'master' - 7 commits
Guillem Jover
guillem at kemper.freedesktop.org
Sat Jun 24 14:23:06 UTC 2017
configure.ac | 2 +-
man/Makefile.am | 1 +
man/arc4random.3bsd | 2 +-
man/bitstring.3bsd | 2 +-
man/byteorder.3bsd | 2 +-
man/closefrom.3bsd | 2 +-
man/errc.3bsd | 2 +-
man/expand_number.3bsd | 2 +-
man/explicit_bzero.3bsd | 2 +-
man/fgetln.3bsd | 2 +-
man/fgetwln.3bsd | 2 +-
man/flopen.3bsd | 2 +-
man/fmtcheck.3bsd | 2 +-
man/fparseln.3bsd | 2 +-
man/fpurge.3bsd | 2 +-
man/funopen.3bsd | 2 +-
man/getbsize.3bsd | 2 +-
man/getpeereid.3bsd | 2 +-
man/getprogname.3bsd | 2 +-
man/heapsort.3bsd | 2 +-
man/humanize_number.3bsd | 2 +-
man/nlist.3bsd | 2 +-
man/pidfile.3bsd | 2 +-
man/queue.3bsd | 2 +-
man/radixsort.3bsd | 2 +-
man/readpassphrase.3bsd | 2 +-
man/reallocarray.3bsd | 2 +-
man/reallocf.3bsd | 2 +-
man/setmode.3bsd | 2 +-
man/setproctitle.3bsd | 2 +-
man/stringlist.3bsd | 2 +-
man/strlcpy.3bsd | 2 +-
man/strmode.3bsd | 2 +-
man/strnstr.3bsd | 2 +-
man/strtonum.3bsd | 2 +-
man/timeradd.3bsd | 6 +++---
man/timeval.3bsd | 4 ++--
man/tree.3bsd | 2 +-
man/unvis.3bsd | 2 +-
man/vis.3bsd | 4 ++--
man/wcslcpy.3bsd | 2 +-
src/local-elf.h | 28 ++++++++++++++++++++++------
test/nlist.c | 2 +-
test/progname.c | 7 ++++++-
44 files changed, 74 insertions(+), 52 deletions(-)
New commits:
commit 415e3cb266b66683adf545f76d8844e74b9658f6
Author: Guillem Jover <guillem at hadrons.org>
Date: Sat Jun 24 16:10:14 2017 +0200
Release libbsd 0.8.5
diff --git a/configure.ac b/configure.ac
index ae200ec..6c6c8ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,7 +13,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
LIBBSD_ABI_MAJOR=0
LIBBSD_ABI_MINOR=8
-LIBBSD_ABI_PATCH=4
+LIBBSD_ABI_PATCH=5
LIBBSD_ABI="$LIBBSD_ABI_MAJOR:$LIBBSD_ABI_MINOR:$LIBBSD_ABI_PATCH"
AC_SUBST([LIBBSD_ABI])
commit 9532cb39f4cf47c9a93633d8001b3a77af05ade8
Author: Guillem Jover <guillem at hadrons.org>
Date: Fri Jun 23 05:59:35 2017 +0200
man: Update man page sections in titles and references
We have moved all man pages to section 3bsd, let's do the same for the
page title, and in all the references for uniformity and to avoid
confusions.
Fixes: https://bugs.freedesktop.org/101545
diff --git a/man/arc4random.3bsd b/man/arc4random.3bsd
index 8958099..107f246 100644
--- a/man/arc4random.3bsd
+++ b/man/arc4random.3bsd
@@ -31,7 +31,7 @@
.\" Manual page, using -mandoc macros
.\"
.Dd $Mdocdate: July 19 2014 $
-.Dt ARC4RANDOM 3
+.Dt ARC4RANDOM 3bsd
.Os
.Sh NAME
.Nm arc4random ,
diff --git a/man/bitstring.3bsd b/man/bitstring.3bsd
index 4eb0be3..4708ce1 100644
--- a/man/bitstring.3bsd
+++ b/man/bitstring.3bsd
@@ -31,7 +31,7 @@
.\" $FreeBSD$
.\"
.Dd July 19, 1993
-.Dt BITSTRING 3
+.Dt BITSTRING 3bsd
.Os
.Sh NAME
.Nm bit_alloc ,
diff --git a/man/byteorder.3bsd b/man/byteorder.3bsd
index 21214ee..d79df43 100644
--- a/man/byteorder.3bsd
+++ b/man/byteorder.3bsd
@@ -25,7 +25,7 @@
.\" $FreeBSD$
.\"
.Dd April 29, 2002
-.Dt BYTEORDER 3
+.Dt BYTEORDER 3bsd
.Os
.Sh NAME
.Nm be16enc , be16dec , be32enc , be32dec , be64enc , be64dec ,
diff --git a/man/closefrom.3bsd b/man/closefrom.3bsd
index 1af7e67..d3a08c3 100644
--- a/man/closefrom.3bsd
+++ b/man/closefrom.3bsd
@@ -26,7 +26,7 @@
.\" $FreeBSD$
.\"
.Dd June 12, 2009
-.Dt CLOSEFROM 3
+.Dt CLOSEFROM 3bsd
.Os
.Sh NAME
.Nm closefrom
diff --git a/man/errc.3bsd b/man/errc.3bsd
index 6b8b3fd..954dfae 100644
--- a/man/errc.3bsd
+++ b/man/errc.3bsd
@@ -28,7 +28,7 @@
.\" SUCH DAMAGE.
.\"
.Dd $Mdocdate: April 23 2014 $
-.Dt ERRC 3
+.Dt ERRC 3bsd
.Os
.Sh NAME
.Nm errc ,
diff --git a/man/expand_number.3bsd b/man/expand_number.3bsd
index cd36ab9..14327fa 100644
--- a/man/expand_number.3bsd
+++ b/man/expand_number.3bsd
@@ -26,7 +26,7 @@
.\" $FreeBSD$
.\"
.Dd August 15, 2010
-.Dt EXPAND_NUMBER 3
+.Dt EXPAND_NUMBER 3bsd
.Os
.Sh NAME
.Nm expand_number
diff --git a/man/explicit_bzero.3bsd b/man/explicit_bzero.3bsd
index bfe583a..b40929e 100644
--- a/man/explicit_bzero.3bsd
+++ b/man/explicit_bzero.3bsd
@@ -30,7 +30,7 @@
.\" $OpenBSD: bzero.3,v 1.10 2014/01/22 21:06:45 tedu Exp $
.\"
.Dd $Mdocdate: January 22 2014 $
-.Dt BZERO 3
+.Dt EXPLICIT_BZERO 3bsd
.Os
.Sh NAME
.Nm explicit_bzero
diff --git a/man/fgetln.3bsd b/man/fgetln.3bsd
index 992e245..dae47e7 100644
--- a/man/fgetln.3bsd
+++ b/man/fgetln.3bsd
@@ -29,7 +29,7 @@
.\" $FreeBSD: /repoman/r/ncvs/src/lib/libc/stdio/fgetln.3,v 1.8 2004/07/16 06:07:12 tjr Exp $
.\"
.Dd April 19, 1994
-.Dt FGETLN 3
+.Dt FGETLN 3bsd
.Os
.Sh NAME
.Nm fgetln
diff --git a/man/fgetwln.3bsd b/man/fgetwln.3bsd
index 5c05388..71bc167 100644
--- a/man/fgetwln.3bsd
+++ b/man/fgetwln.3bsd
@@ -29,7 +29,7 @@
.\" $FreeBSD$
.\"
.Dd July 16, 2004
-.Dt FGETWLN 3
+.Dt FGETWLN 3bsd
.Os
.Sh NAME
.Nm fgetwln
diff --git a/man/flopen.3bsd b/man/flopen.3bsd
index 4bb23b2..ab58b28 100644
--- a/man/flopen.3bsd
+++ b/man/flopen.3bsd
@@ -26,7 +26,7 @@
.\" $FreeBSD$
.\"
.Dd June 6, 2009
-.Dt FLOPEN 3
+.Dt FLOPEN 3bsd
.Os
.Sh NAME
.Nm flopen
diff --git a/man/fmtcheck.3bsd b/man/fmtcheck.3bsd
index 0a1797f..2f06f6f 100644
--- a/man/fmtcheck.3bsd
+++ b/man/fmtcheck.3bsd
@@ -27,7 +27,7 @@
.\" $FreeBSD: /repoman/r/ncvs/src/lib/libc/gen/fmtcheck.3,v 1.9 2004/07/02 23:52:10 ru Exp $
.Dd October 16, 2002
.Os
-.Dt FMTCHECK 3
+.Dt FMTCHECK 3bsd
.Sh NAME
.Nm fmtcheck
.Nd sanitizes user-supplied
diff --git a/man/fparseln.3bsd b/man/fparseln.3bsd
index a3fd325..ab1039b 100644
--- a/man/fparseln.3bsd
+++ b/man/fparseln.3bsd
@@ -23,7 +23,7 @@
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd November 30, 2002
-.Dt FPARSELN 3
+.Dt FPARSELN 3bsd
.Os
.Sh NAME
.Nm fparseln
diff --git a/man/fpurge.3bsd b/man/fpurge.3bsd
index 96a4017..435dd39 100644
--- a/man/fpurge.3bsd
+++ b/man/fpurge.3bsd
@@ -32,7 +32,7 @@
.\" SUCH DAMAGE.
.\"
.Dd $Mdocdate: November 4 2015 $
-.Dt FPURGE 3
+.Dt FPURGE 3bsd
.Os
.Sh NAME
.Nm fpurge
diff --git a/man/funopen.3bsd b/man/funopen.3bsd
index 7c867b6..cc73cc1 100644
--- a/man/funopen.3bsd
+++ b/man/funopen.3bsd
@@ -31,7 +31,7 @@
.\" $FreeBSD$
.\"
.Dd March 19, 2004
-.Dt FUNOPEN 3
+.Dt FUNOPEN 3bsd
.Os
.Sh NAME
.Nm funopen ,
diff --git a/man/getbsize.3bsd b/man/getbsize.3bsd
index 817711e..d9e9e8c 100644
--- a/man/getbsize.3bsd
+++ b/man/getbsize.3bsd
@@ -29,7 +29,7 @@
.\" $FreeBSD$
.\"
.Dd November 16, 2012
-.Dt GETBSIZE 3
+.Dt GETBSIZE 3bsd
.Os
.Sh NAME
.Nm getbsize
diff --git a/man/getpeereid.3bsd b/man/getpeereid.3bsd
index 9292ed3..f1d2609 100644
--- a/man/getpeereid.3bsd
+++ b/man/getpeereid.3bsd
@@ -26,7 +26,7 @@
.\" $FreeBSD$
.\"
.Dd July 15, 2001
-.Dt GETPEEREID 3
+.Dt GETPEEREID 3bsd
.Os
.Sh NAME
.Nm getpeereid
diff --git a/man/getprogname.3bsd b/man/getprogname.3bsd
index d29064f..013935f 100644
--- a/man/getprogname.3bsd
+++ b/man/getprogname.3bsd
@@ -32,7 +32,7 @@
.\" $FreeBSD$
.\"
.Dd May 1, 2001
-.Dt GETPROGNAME 3
+.Dt GETPROGNAME 3bsd
.Os
.Sh NAME
.Nm getprogname ,
diff --git a/man/heapsort.3bsd b/man/heapsort.3bsd
index 48b4d8f..8ec4a6d 100644
--- a/man/heapsort.3bsd
+++ b/man/heapsort.3bsd
@@ -33,7 +33,7 @@
.\" $FreeBSD$
.\"
.Dd September 30, 2003
-.Dt QSORT 3
+.Dt HEAPSORT 3bsd
.Os
.Sh NAME
.Nm heapsort , mergesort
diff --git a/man/humanize_number.3bsd b/man/humanize_number.3bsd
index 5d5472a..d5e484c 100644
--- a/man/humanize_number.3bsd
+++ b/man/humanize_number.3bsd
@@ -28,7 +28,7 @@
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd February 9, 2008
-.Dt HUMANIZE_NUMBER 3
+.Dt HUMANIZE_NUMBER 3bsd
.Os
.Sh NAME
.Nm dehumanize_number ,
diff --git a/man/nlist.3bsd b/man/nlist.3bsd
index aa6e1ea..f837000 100644
--- a/man/nlist.3bsd
+++ b/man/nlist.3bsd
@@ -29,7 +29,7 @@
.\" $FreeBSD: /repoman/r/ncvs/src/lib/libc/gen/nlist.3,v 1.7 2001/10/01 16:08:51 ru Exp $
.\"
.Dd April 19, 1994
-.Dt NLIST 3
+.Dt NLIST 3bsd
.Os
.Sh NAME
.Nm nlist
diff --git a/man/pidfile.3bsd b/man/pidfile.3bsd
index 2eede98..e80d4e0 100644
--- a/man/pidfile.3bsd
+++ b/man/pidfile.3bsd
@@ -25,7 +25,7 @@
.\" $FreeBSD$
.\"
.Dd October 20, 2008
-.Dt PIDFILE 3
+.Dt PIDFILE 3bsd
.Os
.Sh NAME
.Nm pidfile_open ,
diff --git a/man/queue.3bsd b/man/queue.3bsd
index 272f253..c11137f 100644
--- a/man/queue.3bsd
+++ b/man/queue.3bsd
@@ -29,7 +29,7 @@
.\" $FreeBSD$
.\"
.Dd June 17, 2013
-.Dt QUEUE 3
+.Dt QUEUE 3bsd
.Os
.Sh NAME
.Nm SLIST_EMPTY ,
diff --git a/man/radixsort.3bsd b/man/radixsort.3bsd
index cb1222b..29a90c7 100644
--- a/man/radixsort.3bsd
+++ b/man/radixsort.3bsd
@@ -30,7 +30,7 @@
.\" from: @(#)radixsort.3 8.2 (Berkeley) 1/27/94
.\"
.Dd January 27, 1994
-.Dt RADIXSORT 3
+.Dt RADIXSORT 3bsd
.Os
.Sh NAME
.Nm radixsort ,
diff --git a/man/readpassphrase.3bsd b/man/readpassphrase.3bsd
index 56a2507..9729061 100644
--- a/man/readpassphrase.3bsd
+++ b/man/readpassphrase.3bsd
@@ -19,7 +19,7 @@
.\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
.\"
.Dd $Mdocdate: May 31 2007 $
-.Dt READPASSPHRASE 3
+.Dt READPASSPHRASE 3bsd
.Os
.Sh NAME
.Nm readpassphrase
diff --git a/man/reallocarray.3bsd b/man/reallocarray.3bsd
index fb96d1c..b1aff9c 100644
--- a/man/reallocarray.3bsd
+++ b/man/reallocarray.3bsd
@@ -33,7 +33,7 @@
.\" $OpenBSD: malloc.3,v 1.78 2014/05/01 18:41:59 jmc Exp $
.\"
.Dd $Mdocdate: May 1 2014 $
-.Dt MALLOC 3
+.Dt REALLOCARRAY 3bsd
.Os
.Sh NAME
.Nm reallocarray
diff --git a/man/reallocf.3bsd b/man/reallocf.3bsd
index 764ea34..57d6033 100644
--- a/man/reallocf.3bsd
+++ b/man/reallocf.3bsd
@@ -33,7 +33,7 @@
.\" $FreeBSD: src/lib/libc/stdlib/malloc.3,v 1.80.2.2.2.1 2010/06/14 02:09:06 kensmith Exp $
.\"
.Dd September 26, 2009
-.Dt MALLOC 3
+.Dt REALLOCF 3bsd
.Os
.Sh NAME
.Nm reallocf
diff --git a/man/setmode.3bsd b/man/setmode.3bsd
index 4f425c3..eb8f770 100644
--- a/man/setmode.3bsd
+++ b/man/setmode.3bsd
@@ -31,7 +31,7 @@
.\" $FreeBSD: src/lib/libc/gen/setmode.3,v 1.12 2007/01/09 00:27:55 imp Exp $
.\"
.Dd January 4, 2009
-.Dt SETMODE 3
+.Dt SETMODE 3bsd
.Os
.Sh NAME
.Nm getmode ,
diff --git a/man/setproctitle.3bsd b/man/setproctitle.3bsd
index 304e01f..d66c172 100644
--- a/man/setproctitle.3bsd
+++ b/man/setproctitle.3bsd
@@ -21,7 +21,7 @@
.\"
.\" The following requests are required for all man pages.
.Dd December 16, 1995
-.Dt SETPROCTITLE 3
+.Dt SETPROCTITLE 3bsd
.Os
.Sh NAME
.Nm setproctitle
diff --git a/man/stringlist.3bsd b/man/stringlist.3bsd
index 7c5833a..804aa6a 100644
--- a/man/stringlist.3bsd
+++ b/man/stringlist.3bsd
@@ -27,7 +27,7 @@
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd May 6, 2010
-.Dt STRINGLIST 3
+.Dt STRINGLIST 3bsd
.Os
.Sh NAME
.Nm stringlist ,
diff --git a/man/strlcpy.3bsd b/man/strlcpy.3bsd
index 4a16bc7..54a3eed 100644
--- a/man/strlcpy.3bsd
+++ b/man/strlcpy.3bsd
@@ -15,7 +15,7 @@
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: May 31 2007 $
-.Dt STRLCPY 3
+.Dt STRLCPY 3bsd
.Os
.Sh NAME
.Nm strlcpy ,
diff --git a/man/strmode.3bsd b/man/strmode.3bsd
index 5796fca..ad4a11c 100644
--- a/man/strmode.3bsd
+++ b/man/strmode.3bsd
@@ -29,7 +29,7 @@
.\" $FreeBSD: src/lib/libc/string/strmode.3,v 1.9 2003/07/01 15:28:05 maxim Exp $
.\"
.Dd July 28, 1994
-.Dt STRMODE 3
+.Dt STRMODE 3bsd
.Os
.Sh NAME
.Nm strmode
diff --git a/man/strnstr.3bsd b/man/strnstr.3bsd
index 19cf4cc..0e1f5b5 100644
--- a/man/strnstr.3bsd
+++ b/man/strnstr.3bsd
@@ -34,7 +34,7 @@
.\" $FreeBSD$
.\"
.Dd October 11, 2001
-.Dt STRSTR 3
+.Dt STRSTR 3bsd
.Os
.Sh NAME
.Nm strnstr
diff --git a/man/strtonum.3bsd b/man/strtonum.3bsd
index d279ff1..fd34ad6 100644
--- a/man/strtonum.3bsd
+++ b/man/strtonum.3bsd
@@ -16,7 +16,7 @@
.\" $FreeBSD$
.\"
.Dd April 29, 2004
-.Dt STRTONUM 3
+.Dt STRTONUM 3bsd
.Os
.Sh NAME
.Nm strtonum
diff --git a/man/timeradd.3bsd b/man/timeradd.3bsd
index df821de..607383a 100644
--- a/man/timeradd.3bsd
+++ b/man/timeradd.3bsd
@@ -31,7 +31,7 @@
.\" $FreeBSD: src/share/man/man3/timeradd.3,v 1.3 2003/09/08 19:57:19 ru Exp $
.\"
.Dd June 7, 2010
-.Dt TIMERADD 3
+.Dt TIMERADD 3bsd
.Os
.Sh NAME
.Nm timeradd ,
@@ -81,7 +81,7 @@ These macros are provided for manipulating the
and
.Fa timespec
structures described in
-.Xr timeval 3 .
+.Xr timeval 3bsd .
.Pp
The
.Fn timeradd
@@ -145,7 +145,7 @@ using the comparison operator given in
.Fa CMP .
The result of the comparison is returned.
.Sh SEE ALSO
-.Xr timeval 3
+.Xr timeval 3bsd
.Sh HISTORY
The
.Fn timeradd
diff --git a/man/timeval.3bsd b/man/timeval.3bsd
index 8f0e3aa..39c4c65 100644
--- a/man/timeval.3bsd
+++ b/man/timeval.3bsd
@@ -28,7 +28,7 @@
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd April 12, 2011
-.Dt TIMEVAL 3
+.Dt TIMEVAL 3bsd
.Os
.Sh NAME
.Nm timeval ,
@@ -130,4 +130,4 @@ example(struct timespec *spec, time_t minutes)
A better alternative would use the more precise
.Xr clock_gettime 2 .
.Sh SEE ALSO
-.Xr timeradd 3
+.Xr timeradd 3bsd
diff --git a/man/tree.3bsd b/man/tree.3bsd
index 0c30d67..1293674 100644
--- a/man/tree.3bsd
+++ b/man/tree.3bsd
@@ -31,7 +31,7 @@
.\" $FreeBSD$
.\"
.Dd December 27, 2007
-.Dt TREE 3
+.Dt TREE 3bsd
.Os
.Sh NAME
.Nm SPLAY_PROTOTYPE ,
diff --git a/man/unvis.3bsd b/man/unvis.3bsd
index 58f88d9..525eae8 100644
--- a/man/unvis.3bsd
+++ b/man/unvis.3bsd
@@ -28,7 +28,7 @@
.\" SUCH DAMAGE.
.\"
.Dd $Mdocdate: May 31 2007 $
-.Dt UNVIS 3
+.Dt UNVIS 3bsd
.Os
.Sh NAME
.Nm unvis ,
diff --git a/man/vis.3bsd b/man/vis.3bsd
index b77266d..2215abe 100644
--- a/man/vis.3bsd
+++ b/man/vis.3bsd
@@ -28,7 +28,7 @@
.\" SUCH DAMAGE.
.\"
.Dd $Mdocdate: May 31 2007 $
-.Dt VIS 3
+.Dt VIS 3bsd
.Os
.Sh NAME
.Nm vis ,
@@ -144,7 +144,7 @@ returns the length that
would become if it were of unlimited size (similar to
.Xr snprintf 3
or
-.Xr strlcpy 3 ) .
+.Xr strlcpy 3bsd ) .
This can be used to detect truncation but it also means that
the return value of
.Fn strnvis
diff --git a/man/wcslcpy.3bsd b/man/wcslcpy.3bsd
index 5c60d95..4195581 100644
--- a/man/wcslcpy.3bsd
+++ b/man/wcslcpy.3bsd
@@ -36,7 +36,7 @@
.\" $FreeBSD$
.\"
.Dd March 4, 2009
-.Dt WCSLCPY 3
+.Dt WCSLCPY 3bsd
.Os
.Sh NAME
.Nm wcslcat ,
commit a4dd754c8dab4db3fc415209c91e9b77ec285d3d
Author: Guillem Jover <guillem at hadrons.org>
Date: Thu Jun 22 04:58:09 2017 +0200
man: Ship and install libbsd(7)
Fixes: https://bugs.freedesktop.org/101543
diff --git a/man/Makefile.am b/man/Makefile.am
index fe0c335..28192c0 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -181,6 +181,7 @@ dist_man_MANS = \
le32enc.3bsd \
le64dec.3bsd \
le64enc.3bsd \
+ libbsd.7 \
md5.3bsd \
mergesort.3bsd \
nlist.3bsd \
commit b480b7a3f81cf49b9f3f0f8cdd20b33999aa7530
Author: James Cowgill <jcowgill at debian.org>
Date: Mon Jun 19 21:38:40 2017 +0200
Fix ELF definitions for MIPS in local-elf.h
Add a check for _MIPS_SIM inside the __mips__ #elif to detect mips64el
and use ELFCLASS64 in that case. Note that we can't use defined(__mips64)
here because that is also defined when the n32 ABI is in use, which uses
ELFCLASS32.
Fixes: https://bugs.debian.org/865091
Signed-off-by: Guillem Jover <guillem at hadrons.org>
diff --git a/src/local-elf.h b/src/local-elf.h
index 3abbe70..1faf182 100644
--- a/src/local-elf.h
+++ b/src/local-elf.h
@@ -127,7 +127,11 @@
#elif defined(__mips__)
#define ELF_TARG_MACH EM_MIPS
+#if defined(_ABI64) && _MIPS_SIM == _ABI64
+#define ELF_TARG_CLASS ELFCLASS64
+#else
#define ELF_TARG_CLASS ELFCLASS32
+#endif
#if defined(__MIPSEB__)
#define ELF_TARG_DATA ELFDATA2MSB
#else
commit 4cc20e23f5262fdeb667bbc6bd4ba57c92aac8e4
Author: James Cowgill <jcowgill at debian.org>
Date: Mon Jun 19 21:37:14 2017 +0200
Fix ELF definitions for PowerPC in local-elf.h
* ppc64el defines both __powerpc__ and __powerpc64__ but since the
__powerpc64__ #elif is below the __powerpc__ one, it will never be hit.
* Both assumed that powerpc* was big-endian.
Fixes: https://bugs.debian.org/865091
Signed-off-by: Guillem Jover <guillem at hadrons.org>
diff --git a/src/local-elf.h b/src/local-elf.h
index 84a6540..3abbe70 100644
--- a/src/local-elf.h
+++ b/src/local-elf.h
@@ -140,17 +140,29 @@
#define ELF_TARG_CLASS ELFCLASS32
#define ELF_TARG_DATA ELFDATA2LSB
-#elif defined(__powerpc__)
-
-#define ELF_TARG_MACH EM_PPC
-#define ELF_TARG_CLASS ELFCLASS32
-#define ELF_TARG_DATA ELFDATA2MSB
-
#elif defined(__powerpc64__)
#define ELF_TARG_MACH EM_PPC64
#define ELF_TARG_CLASS ELFCLASS64
+#if defined(__LITTLE_ENDIAN__)
+#define ELF_TARG_DATA ELFDATA2LSB
+#elif defined(__BIG_ENDIAN__)
+#define ELF_TARG_DATA ELFDATA2MSB
+#else
+#error Unknown PowerPC64 endianness
+#endif
+
+#elif defined(__powerpc__)
+
+#define ELF_TARG_MACH EM_PPC
+#define ELF_TARG_CLASS ELFCLASS32
+#if defined(__LITTLE_ENDIAN__)
+#define ELF_TARG_DATA ELFDATA2LSB
+#elif defined(__BIG_ENDIAN__)
#define ELF_TARG_DATA ELFDATA2MSB
+#else
+#error Unknown PowerPC endianness
+#endif
#elif defined(__riscv)
commit c4e58c09508453624268f70ea1ab90850cd7411b
Author: Guillem Jover <guillem at hadrons.org>
Date: Mon Jun 19 21:41:13 2017 +0200
test: Remove unused variable in nlist() unit test
diff --git a/test/nlist.c b/test/nlist.c
index a0d4046..096d4ae 100644
--- a/test/nlist.c
+++ b/test/nlist.c
@@ -61,7 +61,7 @@ main(int argc, char **argv)
{ .n_un.n_name = "data_pub_init" },
{ .n_un.n_name = "data_prv_init" },
{ .n_un.n_name = NULL },
- }, *nlp;
+ };
int rc;
assert(*data_pub_ptr == 50);
commit 736e12e8d868659095ee46d32901e034840f1454
Author: Guillem Jover <guillem at hadrons.org>
Date: Mon Jun 19 21:32:01 2017 +0200
test: Handle libtool executable names in getprogname() unit test
Sometimes libtool will prefix the test programs with "lt-", we should
handle these and strip the prefix.
Fixes: https://bugs.debian.org/865090
diff --git a/test/progname.c b/test/progname.c
index d6d0a73..811bcdb 100644
--- a/test/progname.c
+++ b/test/progname.c
@@ -31,7 +31,12 @@
int
main(int argc, char **argv)
{
- assert(strcmp(getprogname(), "progname") == 0);
+ const char *progname;
+
+ progname = getprogname();
+ if (strncmp(progname, "lt-", 3) == 0)
+ progname += 3;
+ assert(strcmp(progname, "progname") == 0);
setprogname("program-name");
assert(strcmp(getprogname(), "program-name") == 0);
More information about the libbsd
mailing list