Commit Graph

310 Commits

Author SHA1 Message Date
christos 15404ac95d use c comments 2015-10-09 14:42:40 +00:00
christos 2ecf333ea1 don't lie in the comment; this is not the re-entrant version 2015-10-08 20:33:58 +00:00
christos 51c8e06c4d Switch to a version that does not suffer from reporting the wrong length
if the file contains NULs. From OpenBSD.
2015-10-08 20:20:45 +00:00
pooka bc0dc0b26e Add more compat defs for code compiled for !NetBSD targets.
At least GNU Hurd lacks MAXHOSTNAMELEN/MAXPATHLEN/PATH_MAX, so make sure
those have some arbitrary semi-sane values.

from Robert Millan in PR misc/50166, with some modifications from myself
2015-09-21 21:50:16 +00:00
christos 6fbf8f6644 undo previous; include is in ${.OBJDIR} 2015-09-17 14:25:43 +00:00
christos 2b8a0471fe make this more robust by using .CURDIR to cd. 2015-09-17 02:22:47 +00:00
kamil c4c10ad1a1 Add reallocarr(3) to tools/compat
This should unbreak libutil(3) creation on systems withot reallocarr(3).
2015-07-26 14:01:53 +00:00
christos 8283eb918f add strtoi strtou (Kamil Rytarowski) 2015-01-18 18:09:10 +00:00
christos 17972cafc9 regen 2015-01-16 18:44:31 +00:00
christos b89ab6e264 strto{i,u} 2015-01-16 18:44:06 +00:00
christos 1741549da9 add __UNVOLATILE 2014-12-24 16:18:46 +00:00
christos acfd168486 remove unused constants (Kamil Rytarowski) 2014-12-22 18:08:39 +00:00
joerg 706f66c9f4 If the internals are not explicitly requested, use #include_next to pick
up the system version. <locale> from libc++ requires this and is used by
src/tools/elftosb2.
2014-11-12 15:08:52 +00:00
christos 1ffd7c80d4 put O_CLOEXEC definition here. 2014-09-24 13:17:35 +00:00
christos 17d648a1fc Fix problem reading the last line when it did not contain a delimiter
(Hubert Garavel)
2014-09-16 17:23:50 +00:00
martin 5621a8b94e Avoid overflowing the "year" value by making the field uint64_t. Adapt
arguments and local variables accordingly.
This now fixes PR 49144 for real.
2014-09-07 11:50:23 +00:00
apb 20e1ccfe27 Copy definitions of __type_min(t), __type_max(t), and some related macros,
from <sys/cdefs.h>, for use when building tools.
2014-09-01 11:20:06 +00:00
martin d67a8a7def Add a slightly stripped down version of sys/dev/clock/clock_subr.h to make
this code available for tools.
2014-09-01 07:48:16 +00:00
christos 453a5cc5a8 Deal with errc/warnc 2014-06-06 01:40:40 +00:00
apb e9ba37c365 Clarify the NetBSD-specific and Linux-specific code at the top of
compat_defs.h:

* Explain why _NETBSD_SOURCE should not be defined on NetBSD.
* Move NetBSD-specific block to the top of the file.
* Improve comment about Linux <feature.h>.
* Move #undef _POSIX_SOURCE and #undef _POSIX_C_SOURCE to the
  Linux-specific block instead of a place that would affect all
  non-NetBSD platforms.  This makes the code match the comment.

This will need to be re-visited if other platforms also need
#undef _POSIX_SOURCE or #undef _POSIX_C_SOURCE.  At present, I suspect
that they are needed only for Linux.
2014-04-19 19:01:08 +00:00
matt c265e52e42 To build elftosb with clang++, it needs more than nl_types.h provides.
XXX to workaround with, if compiling on __NetBSD__ just include the real
nl_types.h
2014-02-27 01:07:52 +00:00
christos 3f604fd430 Add the {v,}{err,warn}c functions 2014-01-16 17:24:56 +00:00
apb d74d486617 fix prototype for strnlen. 2014-01-09 16:08:46 +00:00
apb c9b2ee2cd1 Declare and define strnlen if necessary. 2014-01-09 11:31:12 +00:00
apb 5318071613 regen 2014-01-09 11:27:31 +00:00
apb fd3f18ac6d Add strnlen to configure tests in tools/compat 2014-01-09 11:26:58 +00:00
joerg aceb213538 Allow kernel code to access constant databases by moving cdbr(3) and the
required mi_vector_hash(3) into src/common.
2013-12-11 01:24:08 +00:00
apb 3c49568a05 Define __USE for use during a tools build. 2013-10-24 13:59:47 +00:00
joerg 4879d4747d Support __format_arg. 2013-08-18 20:48:17 +00:00
jmcneill 7184d9f2f5 regen 2013-08-14 10:15:14 +00:00
jmcneill 6d54013fc1 add test for struct tm tm_gmtoff member 2013-08-14 10:14:45 +00:00
jmcneill b54c1c7c33 regen 2013-08-09 20:13:21 +00:00
jmcneill a46673afc5 makefs_udf uses clock_gettime, and on some versions of linux that lives in librt 2013-08-09 20:12:38 +00:00
apb 1f64f4d863 Compile snprintb.c into libnbcompat. The source file is found in the
common/lib/libutil directory.
2013-08-06 22:04:25 +00:00
apb 0c6780a550 declare snptintb_m() and snprintb() if HAVE_SNPRINTB is not defined. 2013-08-06 21:58:46 +00:00
apb 2ee0f9ee2f regen, to pick up the test for snprintb_m. 2013-08-06 21:56:36 +00:00
apb e39e332c37 Add a configure test for snprintb_m. We will assume that
the rpesence of snprintb_m implies the presence of snprintb.
2013-08-06 21:50:19 +00:00
christos 78da6e3986 revert socklen_t to int (from dh) 2013-07-20 10:31:19 +00:00
christos b865eeeb70 PR/48063: Justin Cormack: incorrect definition of socklen_t 2013-07-19 12:00:30 +00:00
pooka 39da3b933c 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)
2013-07-19 11:06:37 +00:00
pooka 0cf7fed87e Fix some tests for musl libc -based systems.
from Justin Cormack and Jens Staal
2013-07-19 10:53:20 +00:00
christos 2bc1b2d373 not a good place to include "nbtool_config.h" 2013-03-12 01:52:55 +00:00
christos aa85cedebf don't leak on error. 2013-03-05 16:29:09 +00:00
christos 1cf655fddf regen 2013-03-05 16:28:06 +00:00
christos 8fdd0859f5 add dprintf 2013-03-05 16:26:41 +00:00
christos ce5eed14bf regen 2013-02-17 00:34:35 +00:00
christos 1fb8dbfe71 cygwin defines u_quad_t in <rpc/types.h>, so include this to the headers
we include and test by default.
2013-02-17 00:34:11 +00:00
christos af9a2d00d7 yes, but include the right file 2013-02-07 20:31:52 +00:00
christos fb6d072e45 add shaX and rmd160 headers, same as mdX 2013-02-07 20:30:29 +00:00
christos 4d8260de85 links for makefs 2013-01-26 16:52:43 +00:00