Home | History | Annotate | Download | only in compat
History log of /src/tools/compat/configure
RevisionDateAuthorComments
 1.109  18-Sep-2025  christos regen
 1.108  18-Sep-2025  christos regen
 1.107  24-Jul-2025  hans tools/compat: add definitions of __[u]intXX_t types on systems that lack them

Fixes another cross-build issue on illumos.
 1.106  31-Oct-2024  kre Regen for added shquote()
 1.105  20-Jul-2023  lukem branches: 1.105.2;
tools/compat: regen
 1.104  20-Jul-2023  lukem tools/compat: regen
 1.103  03-Jun-2023  lukem regen
 1.102  30-May-2023  lukem tools/compat: regen
 1.101  29-May-2023  lukem tools/compat: regen
 1.100  23-May-2023  lukem tools/compat: regen for dispatch_semaphore_create
 1.99  25-Feb-2021  christos branches: 1.99.6;
Add reallocarray; this is used by the new regex code and we don't want to
convert it to reallocarr so the code is kept similar with the original from
FreeBSD.
 1.98  24-Jun-2020  uwe Regen: Add AC_MSG_RESULT yes/no to the uio checks.
 1.97  22-Jun-2019  hannken Bring back two lines deleted by accident. From Kamil Rytarowski.
 1.96  22-Jun-2019  hannken Update tools/compat/configure for new path of "rpc/types.h".

Remove intermediate patch from rpcgen/Makefile.

Patch from Nick Hudson, errors from me.
 1.95  19-Jun-2019  kamil regen tools/compat
 1.94  19-Jun-2019  kamil Add sys/uio.h & enum uio_seg, enum uio_rw to tools/compat

This is needed for bootstrapping the tools on Ubuntu 16.x.
 1.93  30-Aug-2018  christos deal with getsubopt and strncasecmp (needed by mdocml)
 1.92  16-Aug-2018  christos add strncasecmp
 1.91  11-Aug-2018  christos Add strcasecmp
 1.90  13-Jun-2018  maya branches: 1.90.2;
Revert my previous config test inclusion for u_longlong_t.

Fixing this differently by avoiding the need for the definition.
It also caused a problem in OS X, as I neglected to include a correct header
 1.89  11-Jun-2018  maya Add configure check and fallback definition for u_longlong_t

Should help linux tools compilation of dtrace tools, and not
affect NetBSD.

From Chuck Zmudzinski in current-users, with light modification
by myself.
 1.88  09-Dec-2017  sevan branches: 1.88.2;
regen
 1.87  02-Oct-2017  christos regen
 1.86  07-Jan-2017  christos branches: 1.86.6;
regen
 1.85  19-Oct-2016  christos regen
 1.84  20-Jan-2016  christos branches: 1.84.2;
Regen with autoconf 2.69.
 1.83  26-Jul-2015  kamil Add reallocarr(3) to tools/compat

This should unbreak libutil(3) creation on systems withot reallocarr(3).
 1.82  16-Jan-2015  christos regen
 1.81  06-Jun-2014  christos branches: 1.81.2;
Deal with errc/warnc
 1.80  09-Jan-2014  apb branches: 1.80.2;
regen
 1.79  14-Aug-2013  jmcneill regen
 1.78  09-Aug-2013  jmcneill regen
 1.77  06-Aug-2013  apb regen, to pick up the test for snprintb_m.
 1.76  19-Jul-2013  pooka regen

(XXX: I don't think these files were previously regen'd with the
method documented in configure.ac, and therefore the diffs are now huge)
 1.75  05-Mar-2013  christos branches: 1.75.4;
regen
 1.74  17-Feb-2013  christos regen
 1.73  03-Nov-2011  joerg branches: 1.73.6;
Add getline(3) compat glue.
 1.72  14-Aug-2011  apb branches: 1.72.2;
regen
 1.71  15-Jan-2010  asau Regenerate.
 1.70  16-Jun-2009  christos add fpurge; needed by awk.
 1.69  03-Feb-2009  dbj do not require sys/mtio.h for a tools build of pax
 1.68  05-Jan-2009  tnozaki 1. reworking PR lib/40317:
libnbcompat already contains empty fparseln.lo
so previous fix doesn't work correctly.
i've just added broken fparseln check to configure script.

2. reworking cross build breakage under FreeBSD/MacOS X.
FreeBSD/MacOS X still have public /usr/include/runetype.h
derived from 4.4BSD-Lite. so i renamed out private header from
src/lib/libc/locale/runetype.h to src/lib/libc/locale/runetype_local.h
to solve this problems.

3. fix build breakage when CITRUS=no was set.
 1.67  18-Oct-2008  tsutsui branches: 1.67.2;
Regen from configure.ac rev 1.67:
> Prepare dummy <resolv.h> and <arpa/nameser.h> to make asn1_compile and
> compile_et compile on systems which don't have these BIND headers like Cygwin.
 1.66  14-Oct-2008  tsutsui Regen autoconf stuff using tools version of autoconf (in src/tools/autoconf),
as per suggestion from apb@ on tech-toolchain.
Tested 'build.sh -U release iso-image' on NetBSD/i386 4.99.73.
 1.65  19-Oct-2007  christos I am now convinced of the error of my ways, and I am checking for all the
decls mtree is using.
 1.64  28-Sep-2007  lukem regen for raise_default_signal
 1.63  07-Aug-2007  apb branches: 1.63.2;
Regen after recent changes to configure.ac and compat_defs.h.
(Most of the changes seem to result from somebody having used
non-tools versions of autoconf and autoheader in the past.)
 1.62  03-Jul-2007  nakayama Add strndup(3) to libnbcompat, since estrndup(3) added into efun.c calls it.
 1.61  09-Oct-2006  christos branches: 1.61.2; 1.61.4;
regen.
 1.60  07-Oct-2006  apb regen
 1.59  20-Aug-2006  thorpej Also check for DIR.__dd_fd. tools/compat now builds on the WWDC developer
preview version of Mac OS X "Leopard".
 1.58  22-Feb-2006  dogcow Twiddle configure/configure.ac to check/define/create machine/endian.h; this
should fix PR/32878. Tested on NetBSD-current, FreeBSD4, Solaris8.
 1.57  11-Feb-2006  wiz regen
 1.56  11-Feb-2006  wiz regen
 1.55  11-Feb-2006  wiz regen.
 1.54  09-Feb-2006  wiz regen.
 1.53  09-Feb-2006  dogcow change #include <sys/endian.h> => #include <machine/endian.h> so that
it's (more) consistent in the tree; this, along with changing tools/compat's
autoconf detection from AC_CHECK_FUNCS to AC_CHECK_DECLS makes the vast
majority of htobe16 and friends' redefinition errors bite the dust.
Tested with -current and FreeBSD.
 1.52  02-Feb-2006  dbj regen
 1.51  02-Mar-2005  wiz Remove commas in AC_CHECK_FUNCS that shouldn't be there.
Closes PR 29577 by Valeriy E. Ushakov.
 1.50  13-Jan-2005  jmc Turns out some platforms (freebsd5) expose st_birthtime but not
st_birthtimensec. Make sure and check for both so programs can deal w. it
 1.49  28-Nov-2004  jmc Add heapsort to libnbcompat
 1.48  12-Oct-2004  jmc Check for fstatvfs and provide/use it only if the host system has it.
Fixes PR#27221
 1.47  24-Jul-2004  dbj check for HAVE_STRUCT_STATVFS_F_IOSIZE
addresses PR toolchain/26415
 1.46  24-Jul-2004  dbj remove HAVE_STRUCT_STATFS_F_IOSIZE
this is not currently being used and should be replaced with
HAVE_STRUCT_STATVFS_F_IOSIZE, but that will be done separately.
This commit should be able to be safely pulled up to
the netbsd-2-0 branch to address PR toolchain/26415
 1.45  20-Jun-2004  jmc Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')

Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).

Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.

Fixes PR's: PR#17762 PR#25944
 1.44  18-Jun-2004  thorpej Regen.
 1.43  12-Nov-2003  dbj branches: 1.43.2;
regen after HAVE_SYS_POLL_H change
 1.42  27-Oct-2003  lukem Overhaul how `build.sh tools' are used:

* Rename "config.h" to "nbtool_config.h" and
HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
This makes in more obvious in the source when we're using
tools/compat/config.h versus "standard autoconf" config.h

* Consistently move the inclusion of nbtool_config.h to before
<sys/cdefs.h> so that the former can provide __RCSID() (et al),
and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#endif
to the top of the source files (for the general case).
 1.41  26-Jul-2003  salo netbsd.org->NetBSD.org
 1.40  25-Jul-2003  atatat Regen for host-tool-ified stat
 1.39  18-Jul-2003  fredb Regenerate with autoconf 2.57.
 1.38  18-Jul-2003  fredb As discussed briefly on tech-toolchain, AIX doesn't have "u_long",
so add a check for that. Partial fix for PR toolchain/22177.
 1.37  03-Jun-2003  uwe Add atoll(3) to libnbcompat. We need it when building target's gcc
for a 64-bit target on a 32-bit host.

NB: There seems to be a bug in either gcc itself or the way we import
it, b/c the incorrect #define HAVE_ATOLL is picked from (e.g. for
sparc64) gnu/usr.bin/gcc/arch/sparc64/auto-host.h - so when gen*
auxilary (host) programs are built in gnu/usr.bin/gcc/backend, they
incorrectly pick-up target's HAVE_ATOLL.

For now providing atoll(3) in libnbcompat is a simple and sufficient
workaround.
 1.36  14-Mar-2003  thorpej Add a putc_unlocked().
 1.35  13-Mar-2003  thorpej Fix the socklen_t test; we need to explcitly list the headers we want
included for that test.
 1.34  13-Mar-2003  thorpej Check for sys/socket.h and socklen_t.
 1.33  16-Dec-2002  thorpej Include <sys/types.h> before <grp.h>; Mac OS 10.2.2 needs this.
 1.32  16-Dec-2002  thorpej Include <sys/types.h> before including <dirent.h>; Mac OS 10.2.2
needs this.
 1.31  30-Nov-2002  lukem add check back for util.h; needed on some foreign systems
 1.30  30-Nov-2002  lukem - Migrate fparseln(3) from libutil to libc, where it should have been in
the first place...
- Bump libutil major (to 7.0) and libc minor (to 12.91).
 1.29  29-Nov-2002  lukem replace missing strsuftoll(3)
 1.28  07-Oct-2002  briggs Just check for poll.h, don't fail if it's not present.
 1.27  06-Oct-2002  lukem Provide strtoll() in libnbcompat.
Should fix relevant build issue on HP-UX and MacOS X hosts.
 1.26  05-Oct-2002  lukem check for lchflags
 1.25  04-Oct-2002  thorpej Check for <poll.h> and poll(2).
 1.24  16-Sep-2002  briggs Always use NetBSD's fts(3) in compat builds. Some systems (notably
Red Hat 7.3, at least) do not have fts(3) implementations that work
correctly with -D_FILE_OFFSET_BITS=64.
 1.23  14-Sep-2002  thorpej * Check for mkstemp() and mkdtemp(), and build them into libnbcompat
if necessary.
* mktemp is now a host-tool, so nuke the lame script (which isn't even
properly installed during the tools bootstrap).
 1.22  13-Sep-2002  thorpej * Always include the NetBSD glob(3) in libnbcompat, as the host
tools use some features of glob(3) that are not available on
all systems.
* Always include the NetBSD vis(3) in libnbcompat, since vis(3)
is not really standardized, and the vis(3) present on some systems
is different from ours.
* Always include the NetBSD MD2, MD4, MD5, RMD160, and SHA1 implementations
in libnbcompat. The host tools use features of the NetBSD versions
which aren't present on all systems that include those functions.
* Add a check for random(3) -- the Heimdal host tools want it.
* Add a check for termios.h -- the Heimdal host tools want it.
* Update the README to indicate the current state of building the
host tools on Solaris 8 (for SPARC).
 1.21  03-Jul-2002  pooka Fine-grain checking somewhat:
* check for user_from_uid() in addition to pwcache_userdb()
* check for svis() in addition to vis()
 1.20  24-Apr-2002  bjh21 branches: 1.20.2;
Rather than hardcoding two possible locations of the POSIX shell (for
Solaris and everything else), set _PATH_BSHELL to the first occurrence of
"sh" on the path. This should be rather more portable.
 1.19  23-Apr-2002  bjh21 Add test for alloca() and <alloca.h>, since Sun Workshop C 5.0 needs this.
 1.18  22-Apr-2002  bjh21 Create sys/endian.h if it doesn't exist, since rmd160.c includes it directly.
 1.17  19-Apr-2002  tv Emit an empty <stdint.h> if the host doesn't have one. Should fix PR 16416.
 1.16  18-Apr-2002  tv Re-add test for <sys/endian.h>; it disappeared somewhere along the way.
 1.15  18-Apr-2002  bjh21 Add a stub issetugid() for platforms that don't have it. For now, we assume
that no host program will be installed set-id, so the stub function always
returns 0.
 1.14  01-Apr-2002  bjh21 Revert addition of mkdtemp() to libnbcompat. I don't think we need mktemp(1)
after all.
 1.13  31-Mar-2002  bjh21 Add mkdtemp to libnbcompat, since glibc doesn't have it an mktemp(1) will
need it.
 1.12  31-Mar-2002  bjh21 Add the md[245], sha1 and rmd160 functions to libnbcompat, conditional on their
not being in the host libc.
This will be necessary to make cksum into a host tool.
 1.11  07-Mar-2002  tv Don't gratuitously touch the replacement headers in ${.OBJDIR}/include;
instead, touch them only if they're changed.
 1.10  07-Mar-2002  tv Move inttypes.h to list of auto-generated-empty headers.
 1.9  07-Mar-2002  tv Add compat defns for uint*_t (the non-underscored ones).
[The logic in all of this is ugly, and should instead be fixed up to use
AC_CHECK_SIZEOF to use primitives if the counterpart type is unavailable.]
 1.8  26-Feb-2002  tv Add some more bits of host compatibility.
 1.7  31-Jan-2002  tv Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
 1.6  29-Jan-2002  tv Make almost all tools compile and run properly on non-NetBSD hosts. (In
particular, most tools now run correctly on Solaris 7.)
 1.5  24-Jan-2002  lukem - Replace pwcache(3) if necessary (pwcache_userdb(3) is checked for).
Tested on -current and 1.5.3.
- Wrap some long lines.
 1.4  21-Jan-2002  tv Make many host tools compile on non-NetBSD hosts. Not complete, but
very nearly there.
 1.3  10-Jan-2002  lukem regen from configure.ac 1.3 for <inttypes.h> change
 1.2  04-Jan-2002  lukem Add replacement fgetln(3) (from lukemftp/libukem), as fparseln(3) uses it
 1.1  11-Dec-2001  tv Add the framework for autoconf-based src/tools/compat structure. This will
(after it is more fleshed out) allow the host tools to work more cleanly
on non-NetBSD hosts.
 1.20.2.4  23-Jul-2004  tron Apply patch (request by dbj in ticket 1723):
Fix building the netbsd-1-6 branch under Darwin/MacOS.
 1.20.2.3  01-Dec-2002  he Pull up revision 1.24 (requested by thorpej in ticket #834):
Always NetBSD's own fts(3) in compat builds. Some systems
(among them RedHat 7.3) do not have fts(3) implementations
which work correctly with -D_FILE_OFFSET_BITS=64.
 1.20.2.2  30-Nov-2002  he Pull up regenerated file (requested by thorpej in ticket #807):
o Check for mkstemp() and mkdtemp(), and build them into
libcompat if necessary.
o mktemp is now a host-tool, so remove the now obsoleted
script.
 1.20.2.1  03-Nov-2002  he Pull up regenerated file (requested by thorpej in ticket #797):
Include various more functions in libnbcompat, mostly
becuase our tools use features not universally present in
other versions. This applies to glob(3), vis(3), and the
MD2, MD4, RMD160 and SHA1 implementations.
Also add checks for random(3) and termios.h for the Heimdal
host tools.
Update README to indicate the current state of building the
host tools on Solaris 8 (for SPARC).
 1.43.2.2  25-Jul-2004  tron branches: 1.43.2.2.2;
Pull up revision 1.46 (requested by dbj in ticket #712):
remove HAVE_STRUCT_STATFS_F_IOSIZE
this is not currently being used and should be replaced with
HAVE_STRUCT_STATVFS_F_IOSIZE, but that will be done separately.
This commit should be able to be safely pulled up to
the netbsd-2-0 branch to address PR toolchain/26415
 1.43.2.1  22-Jun-2004  tron Pull up revision 1.45 (requested by jmc in ticket #527):
Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
 1.43.2.2.2.1  06-Apr-2005  he Pull up revision 1.49 (via patch, requested by jmc in ticket #1026):
Convert remaining host tools for amiga to correct cross tools.
Now allows complete amiga builds on non-NetBSD and non-BSD hosts.
 1.61.4.1  03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.61.2.3  14-Feb-2009  snj Apply patch (requested by adrianp in ticket #1278):
Fix build on netbsd-5 amd64 hosts.
 1.61.2.2  18-Nov-2008  snj Regen for ticket 1224.
 1.61.2.1  31-Aug-2007  pavel branches: 1.61.2.1.2;
regen for ticket #827. Files provided by apb@.
 1.61.2.1.2.1  14-Feb-2009  snj Apply patch (requested by adrianp in ticket #1278):
Fix build on netbsd-5 amd64 hosts.
 1.63.2.1  06-Nov-2007  matt sync with HEAD
 1.67.2.3  02-Nov-2011  riz Pull up following revision(s) (requested by tsutsui in ticket #1676):
tools/compat/configure.ac: revision 1.71
tools/compat/configure: revision 1.71
tools/compat/nbtool_config.h.in: revision 1.24
Test for <sys/endian.h> and provide HAVE_SYS_ENDIAN_H.
Fixes FreeBSD hosted builds (PR 42440 and PR 42470).
Approved by <dholland>.
Regenerate.
 1.67.2.2  03-Oct-2009  snj Pull up following revision(s) (requested by apb in ticket #1020):
bin/pax/Makefile: revision 1.38
bin/pax/ar_io.c: revision 1.49
tools/compat/configure: revision 1.69
tools/compat/configure.ac: revision 1.69
do not require sys/mtio.h for a tools build of pax
 1.67.2.1  15-Jan-2009  snj branches: 1.67.2.1.2; 1.67.2.1.4;
Regen for ticket 270.
 1.67.2.1.4.1  15-Dec-2009  matt Allow tools to build on OSX 10.6 (Snow Leopard).
 1.67.2.1.2.1  03-Oct-2009  snj Pull up following revision(s) (requested by apb in ticket #1020):
bin/pax/Makefile: revision 1.38
bin/pax/ar_io.c: revision 1.49
tools/compat/configure: revision 1.69
tools/compat/configure.ac: revision 1.69
do not require sys/mtio.h for a tools build of pax
 1.72.2.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.72.2.1  10-Nov-2011  yamt sync with head
 1.73.6.3  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.73.6.2  23-Jun-2013  tls resync from head
 1.73.6.1  25-Feb-2013  tls resync with head
 1.75.4.1  23-Jul-2013  riastradh sync with HEAD
 1.80.2.1  10-Aug-2014  tls Rebase.
 1.81.2.1  22-Apr-2015  snj Pull up following revision(s) (requested by roy in ticket #648):
common/lib/libc/stdlib/_strtoi.h: revisions 1.1, 1.2
common/lib/libc/stdlib/strtoi.c: revision 1.1
common/lib/libc/stdlib/strtou.c: revision 1.1
distrib/sets/lists/base/ad.aarch64: patch
distrib/sets/lists/base/ad.arm: patch
distrib/sets/lists/base/ad.mips: patch
distrib/sets/lists/base/ad.powerpc: patch
distrib/sets/lists/base/md.amd64: patch
distrib/sets/lists/base/md.sparc64: patch
distrib/sets/lists/base/shl.mi: patch
distrib/sets/lists/comp/mi: revision 1.1939
distrib/sets/lists/debug/ad.aarch64: patch
distrib/sets/lists/debug/ad.arm: patch
distrib/sets/lists/debug/ad.mips: patch
distrib/sets/lists/debug/ad.powerpc: patch
distrib/sets/lists/debug/md.amd64: patch
distrib/sets/lists/debug/md.sparc64: patch
distrib/sets/lists/debug/shl.mi: patch
include/inttypes.h: revision 1.11
lib/libc/shlib_version: patch
lib/libc/stdlib/Makefile.inc: revision 1.84
lib/libc/stdlib/strtol.3: revisions 1.27-1.31
lib/libc/stdlib/strtoul.3: revisions 1.26-1.29
sys/lib/libkern/Makefile.libkern: revision 1.37
sys/lib/libkern/libkern.h: revision 1.117
tools/compat/Makefile: revision 1.73
tools/compat/compat_defs.h: revision 1.101
tools/compat/configure.ac: revision 1.83
tools/compat/configure: revision 1.82
tools/compat/nbtool_config.h.in: revision 1.36
add strto{i,u} from Kamil Rytarowski as discussed in tech-userlevel.
--
strtoi and strtou additions
--
strtoi and strtou for the kernel
--
strtoi and strtou additions
--
strtoi and strtou man pages
--
strto{i,u}
--
regen
--
Remove trailing whitespace.
--
match variable names with man page (Kamil Rytarowski)
--
cleanups from (Kamil Rytarowski)
--
add strtoi strtou (Kamil Rytarowski)
--
PR/49640: Kamil Rytarowski: Improve error printing
--
Use existing month for Dd.
 1.84.2.2  20-Mar-2017  pgoyette Sync with HEAD
 1.84.2.1  04-Nov-2016  pgoyette Sync with HEAD
 1.86.6.3  03-Feb-2018  snj Pull up following revision(s) (requested by sevan in ticket #435):
tools/compat/configure: revision 1.88 via patch
tools/compat/configure.ac: revision 1.89 via patch
tools/compat/nbtool_config.h.in: revision 1.42
Add asnprintf() to the AC_CHECK_DECLS list.
Resolves conflict when cross compiling on Cygwin the provided implementation
does not get picked up.
Closes PR toolchain/52797
--
regen
 1.86.6.2  21-Dec-2017  snj revert ticket 435
 1.86.6.1  21-Dec-2017  snj Pull up following revision(s) (requested by sevan in ticket #435):
tools/compat/compat_defs.h: 1.108
tools/compat/configure: 1.87-1.88
tools/compat/configure.ac: 1.88-1.89
tools/compat/fpurge.c: 1.2
tools/compat/nbtool_config.h.in: 1.41-1.42
handle __fpurge being declared in <stdio_ext.h>
--
regen
--
Add asnprintf() to the AC_CHECK_DECLS list.
Resolves conflict when cross compiling on Cygwin the provided implementation
does not get picked up.
Closes PR toolchain/52797
--
regen
 1.88.2.1  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.90.2.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.90.2.1  10-Jun-2019  christos Sync with HEAD
 1.99.6.2  17-Nov-2024  martin Pull up following revision(s) (requested by kre in ticket #1004):

tools/compat/configure: revision 1.106
lib/libc/string/__strsignal.c: revision 1.26
tools/compat/configure.ac: revision 1.108
tools/compat/nbtool_config.h.in: revision 1.57
usr.bin/elf2aout/elf2aout.c: revision 1.24
tools/compat/Makefile: revision 1.93
sys/arch/macppc/stand/fixcoff/fixcoff.c: revision 1.13
tools/compat/compat_defs.h: revision 1.123

Include <arpa/inet.h> for htonl() (From Jan-Benedict Glaw)
Probably this should be using htobe32() instead of htonl()
(and so <endian.h> rather than <arpa/inet.h>) as there is
no sign of any network anywhere near here. But that's for
another day, and to be done by someone who can test it.

Portability fixes from Jan-Benedict Glaw
The args to help() and usage() need to be const char *
and main() should be declared as returning int.

Add shquote to libnbcompat
Include shquote() in configure tests
Regen for added shquote()

Stop attempting to return a (char*) in place of (const char *)
This removes a cast that was added in 1994, when __strsignal()
returned a char * to convert the const char * element of sys_siglist
into a type that matched.

It should have been removed when __strsignal() was changed to
return const char * in 1998. But wasn't.

This should fix an inane warning (treated as an error) from a
compile stupid enough to allow a natural char * (as in char buf[N])
to be returned as a result (which is, of course, fine), but complains
about returning (char *) applied to a (const char *).
 1.99.6.1  30-Jun-2023  martin Pull up following revision(s) (requested by riastradh in ticket #221):

external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c: revision 1.18
external/cddl/osnet/sys/sys/opentypes.h: revision 1.7
tools/compat/configure: revision 1.100
external/cddl/osnet/dist/tools/ctf/cvt/barrier.c: revision 1.6
external/cddl/osnet/dist/tools/ctf/cvt/barrier.h: revision 1.4
external/cddl/osnet/dist/tools/ctf/cvt/barrier.c: revision 1.7
external/cddl/osnet/dist/tools/ctf/cvt/barrier.c: revision 1.8
tools/compat/configure.ac: revision 1.100
external/cddl/osnet/dist/tools/ctf/cvt/tdata.c: revision 1.10
tools/compat/nbtool_config.h.in: revision 1.54

ctfmerge: error check sem_*() and pthread_*() APIs

terminate() if sem_*() returns -1 or pthread_*() returns != 0.
(Set errno from pthread_*() so terminate() prints the strerror message).

Note: Failing on errors instead of ignoring them helps identify
reasons for intermittent failures, such as those on macOS host builds:

ERROR: nbctfmerge: barrier_init: sem_init(bar_sem): Function not implemented

ctfmerge: fix macOS semaphore implementation

Use dispatch_semaphore_create() if present instead of sem_init().
macOS doesn't actually implement sem_init() (et al)
(even though it provides the prototypes as deprecated).

This was detected by the previous commit to ctfmerge
that added error handling.

Implement ctfmerge's barrier operations in terms of
dispatch(3) APIs such as dispatch_semaphore_create() (et al).

Update tools/compat/configure.ac to find dispatch_semaphore_create().
Fixes ctfmerge on macOS hosts.

Inspired by https://stackoverflow.com/a/27847103

tools/compat: regen for dispatch_semaphore_create

ctfmerge: fix macOS semaphore implementation, part 2
dispatch_semaphore_signal() doesn't return an error, just an
indicator of whether a thread was woken or not, so there's
no need to fail on non-zero return.

osnet: on macOS, use <mach/boolean.h> for boolean_t
macOS/x86_64 defines boolean_t as 'unsigned int' not 'int',
which causes a build issue with tools/ctfmerge on that host
after my recent fixes for macOS semaphores.

So use the <mach/boolean.h> instead of a local typedef ifdef __APPLE__.
May fix a macOS/x86_64 build issue reported by cjep@.
Builds fine on NetBSD/amd64 or macOS/arm.

Note: this compat stuff is clunky, and based on the commit log,
annoyingly error prone. A newer sync of osnet from upstream /may/
improve a lot of these compat typedef workarounds for solaris types...
 1.105.2.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed