mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-10-19 12:42:33 +02:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
415e3cb266 | ||
![]() |
9532cb39f4 | ||
![]() |
a4dd754c8d | ||
![]() |
b480b7a3f8 | ||
![]() |
4cc20e23f5 | ||
![]() |
c4e58c0950 | ||
![]() |
736e12e8d8 |
@@ -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])
|
||||
|
@@ -181,6 +181,7 @@ dist_man_MANS = \
|
||||
le32enc.3bsd \
|
||||
le64dec.3bsd \
|
||||
le64enc.3bsd \
|
||||
libbsd.7 \
|
||||
md5.3bsd \
|
||||
mergesort.3bsd \
|
||||
nlist.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 ,
|
||||
|
@@ -31,7 +31,7 @@
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd July 19, 1993
|
||||
.Dt BITSTRING 3
|
||||
.Dt BITSTRING 3bsd
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm bit_alloc ,
|
||||
|
@@ -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 ,
|
||||
|
@@ -26,7 +26,7 @@
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd June 12, 2009
|
||||
.Dt CLOSEFROM 3
|
||||
.Dt CLOSEFROM 3bsd
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm closefrom
|
||||
|
@@ -28,7 +28,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd $Mdocdate: April 23 2014 $
|
||||
.Dt ERRC 3
|
||||
.Dt ERRC 3bsd
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm errc ,
|
||||
|
@@ -26,7 +26,7 @@
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd August 15, 2010
|
||||
.Dt EXPAND_NUMBER 3
|
||||
.Dt EXPAND_NUMBER 3bsd
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm expand_number
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -29,7 +29,7 @@
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd July 16, 2004
|
||||
.Dt FGETWLN 3
|
||||
.Dt FGETWLN 3bsd
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm fgetwln
|
||||
|
@@ -26,7 +26,7 @@
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd June 6, 2009
|
||||
.Dt FLOPEN 3
|
||||
.Dt FLOPEN 3bsd
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm flopen
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -32,7 +32,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd $Mdocdate: November 4 2015 $
|
||||
.Dt FPURGE 3
|
||||
.Dt FPURGE 3bsd
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm fpurge
|
||||
|
@@ -31,7 +31,7 @@
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd March 19, 2004
|
||||
.Dt FUNOPEN 3
|
||||
.Dt FUNOPEN 3bsd
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm funopen ,
|
||||
|
@@ -29,7 +29,7 @@
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd November 16, 2012
|
||||
.Dt GETBSIZE 3
|
||||
.Dt GETBSIZE 3bsd
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm getbsize
|
||||
|
@@ -26,7 +26,7 @@
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd July 15, 2001
|
||||
.Dt GETPEEREID 3
|
||||
.Dt GETPEEREID 3bsd
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm getpeereid
|
||||
|
@@ -32,7 +32,7 @@
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd May 1, 2001
|
||||
.Dt GETPROGNAME 3
|
||||
.Dt GETPROGNAME 3bsd
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm getprogname ,
|
||||
|
@@ -33,7 +33,7 @@
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd September 30, 2003
|
||||
.Dt QSORT 3
|
||||
.Dt HEAPSORT 3bsd
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm heapsort , mergesort
|
||||
|
@@ -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 ,
|
||||
|
@@ -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
|
||||
|
@@ -25,7 +25,7 @@
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd October 20, 2008
|
||||
.Dt PIDFILE 3
|
||||
.Dt PIDFILE 3bsd
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm pidfile_open ,
|
||||
|
@@ -29,7 +29,7 @@
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd June 17, 2013
|
||||
.Dt QUEUE 3
|
||||
.Dt QUEUE 3bsd
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm SLIST_EMPTY ,
|
||||
|
@@ -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 ,
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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 ,
|
||||
|
@@ -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
|
||||
|
@@ -27,7 +27,7 @@
|
||||
.\" POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd May 6, 2010
|
||||
.Dt STRINGLIST 3
|
||||
.Dt STRINGLIST 3bsd
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm stringlist ,
|
||||
|
@@ -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 ,
|
||||
|
@@ -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
|
||||
|
@@ -34,7 +34,7 @@
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd October 11, 2001
|
||||
.Dt STRSTR 3
|
||||
.Dt STRSTR 3bsd
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm strnstr
|
||||
|
@@ -16,7 +16,7 @@
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd April 29, 2004
|
||||
.Dt STRTONUM 3
|
||||
.Dt STRTONUM 3bsd
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm strtonum
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -31,7 +31,7 @@
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd December 27, 2007
|
||||
.Dt TREE 3
|
||||
.Dt TREE 3bsd
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm SPLAY_PROTOTYPE ,
|
||||
|
@@ -28,7 +28,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd $Mdocdate: May 31 2007 $
|
||||
.Dt UNVIS 3
|
||||
.Dt UNVIS 3bsd
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm unvis ,
|
||||
|
@@ -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
|
||||
|
@@ -36,7 +36,7 @@
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd March 4, 2009
|
||||
.Dt WCSLCPY 3
|
||||
.Dt WCSLCPY 3bsd
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm wcslcat ,
|
||||
|
@@ -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
|
||||
@@ -140,17 +144,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)
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user