Commit Graph

13 Commits

Author SHA1 Message Date
jmc b2f782612f 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
2004-06-20 22:20:14 +00:00
dbj 982688a7fd #include <util.h>
this is needed by fparseln on macos/darwin and is harmless on netbsd
2003-11-17 00:02:33 +00:00
lukem d348d3d723 tweaks for fparseln(3) move from libutil to libc:
- remove #include <util.h> if nothing else needed it
- remove LDFLAGS+=-lutil if nothing else needed it
2002-11-30 03:10:53 +00:00
bjh21 dd9c5ed338 Don't use __RCSID unless it's defined. 2002-04-09 19:17:11 +00:00
thorpej 2597d53f5a Use __RCSID(). 2002-04-09 02:35:31 +00:00
tv 9fbd88883c 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.
2002-01-31 22:43:33 +00:00
tv a328e34106 Make almost all tools compile and run properly on non-NetBSD hosts. (In
particular, most tools now run correctly on Solaris 7.)
2002-01-29 10:20:28 +00:00
lukem 6dba6d95f7 add <util.h> back in for native builds. 2002-01-29 00:31:37 +00:00
tv fcae5f73b7 Add hooks to make mtree compilable from src/tools. 2002-01-29 00:07:27 +00:00
jmc adf8bd3435 Ugg...Turn LIST_FOREACH into a while loop around LIST_NEXT...
The *_FOREACH macros got added post 1.5 and were pulled up into 1.5.2. This
makes it impossible to compile mtree local on a 1.5-release box as a cross
toolchain bit for bootstrapping to -current. (and why I never saw this problem
on my 1.5.2 machine)

This whole thing is solved via a compat lib for the tools for all netbsd bits
and/or trimming down a version of mtree to just the bits needed for building
the snapshots.
2001-11-11 05:07:20 +00:00
lukem 17d6712ceb replace <sys/time.h> with <time.h> (for consistency) 2001-11-10 07:11:14 +00:00
lukem 272e588400 - KNF & whitespace cleanup
- use fparseln() instead of fgetln()
2001-11-07 01:36:50 +00:00
lukem e491f8950f Code from FreeBSD to give mtree the ability to exclude items from its traversal 2001-11-07 01:16:00 +00:00