Commit Graph

50 Commits

Author SHA1 Message Date
wiz 1dc296553a Remove commas in AC_CHECK_FUNCS that shouldn't be there.
Closes PR 29577 by Valeriy E. Ushakov.
2005-03-02 18:08:43 +00:00
jmc f7b3f12b97 Turns out some platforms (freebsd5) expose st_birthtime but not
st_birthtimensec. Make sure and check for both so programs can deal w. it
2005-01-13 00:52:40 +00:00
jmc 9da9dc64b7 Add heapsort to libnbcompat 2004-11-28 06:57:14 +00:00
jmc 7a47cf149b Check for fstatvfs and provide/use it only if the host system has it.
Fixes PR#27221
2004-10-12 03:28:30 +00:00
dbj 46ea8fc0f8 check for HAVE_STRUCT_STATVFS_F_IOSIZE
addresses PR toolchain/26415
2004-07-24 16:32:01 +00:00
dbj a7a2f3a478 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
2004-07-24 12:24:59 +00:00
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
thorpej e1df38d43a Check for group_from_gid(). 2004-06-18 20:07:31 +00:00
dbj a473896520 use sys/poll.h and HAVE_SYS_POLL_H instead of just HAVE_POLL_H
HAVE_SYS_POLL_H is used by src/include/roken.h needed by the host tool asn1_compile
2003-11-12 19:43:58 +00:00
lukem 171d653219 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).
2003-10-27 00:12:41 +00:00
salo 22a0ae4298 netbsd.org->NetBSD.org 2003-07-26 20:17:31 +00:00
atatat d5fb781871 More properly host-tool-ify stat 2003-07-25 03:21:15 +00:00
fredb c0326dd8e8 As discussed briefly on tech-toolchain, AIX doesn't have "u_long",
so add a check for that. Partial fix for PR toolchain/22177.
2003-07-18 13:45:15 +00:00
uwe 0bbb587407 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.
2003-06-03 03:16:48 +00:00
thorpej 241ed6a4c1 Add a putc_unlocked(). 2003-03-14 03:38:42 +00:00
thorpej 1d994487b3 Fix the socklen_t test; we need to explcitly list the headers we want
included for that test.
2003-03-13 16:27:03 +00:00
thorpej 72ec5d6a9c Check for sys/socket.h and socklen_t. 2003-03-13 04:30:39 +00:00
thorpej 7059a54da4 Include <sys/types.h> before <grp.h>; Mac OS 10.2.2 needs this. 2002-12-16 00:35:00 +00:00
thorpej bd339b41ac Include <sys/types.h> before including <dirent.h>; Mac OS 10.2.2
needs this.
2002-12-16 00:31:59 +00:00
lukem c6f399207c add check back for util.h; needed on some foreign systems 2002-11-30 21:43:27 +00:00
lukem b1e79510cf - 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).
2002-11-30 03:04:44 +00:00
lukem 336730e201 replace missing strsuftoll(3) 2002-11-29 13:00:22 +00:00
briggs 4fb03019c2 Just check for poll.h, don't fail if it's not present. 2002-10-07 18:12:36 +00:00
lukem 8b42f7b9d9 Provide strtoll() in libnbcompat.
Should fix relevant build issue on HP-UX and MacOS X hosts.
2002-10-06 12:09:34 +00:00
lukem cb48eb573f check for lchflags 2002-10-05 04:13:30 +00:00
thorpej bcb4b867fe Check for <poll.h> and poll(2). 2002-10-04 22:10:10 +00:00
briggs a94d82e6f9 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.
2002-09-16 04:10:36 +00:00
thorpej d92d489497 * 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).
2002-09-14 04:30:27 +00:00
thorpej f54ca60093 * 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).
2002-09-13 19:07:01 +00:00
pooka d8c01a3d2a Fine-grain checking somewhat:
* check for user_from_uid() in addition to pwcache_userdb()
* check for svis() in addition to vis()
2002-07-03 17:16:26 +00:00
bjh21 a3112ce1b9 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.
2002-04-24 19:41:58 +00:00
bjh21 a64574e0e7 Add test for alloca() and <alloca.h>, since Sun Workshop C 5.0 needs this. 2002-04-23 00:13:50 +00:00
bjh21 c5b9549c5f Create sys/endian.h if it doesn't exist, since rmd160.c includes it directly. 2002-04-22 19:23:33 +00:00
tv bcde44453d Emit an empty <stdint.h> if the host doesn't have one. Should fix PR 16416. 2002-04-19 22:47:11 +00:00
tv 25252c9a84 Re-add test for <sys/endian.h>; it disappeared somewhere along the way. 2002-04-18 21:05:22 +00:00
bjh21 6619533896 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.
2002-04-18 15:31:51 +00:00
bjh21 c9e4965681 Revert addition of mkdtemp() to libnbcompat. I don't think we need mktemp(1)
after all.
2002-04-01 13:59:34 +00:00
bjh21 58017a564d Add mkdtemp to libnbcompat, since glibc doesn't have it an mktemp(1) will
need it.
2002-03-31 18:04:11 +00:00
bjh21 bcaedc129c 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.
2002-03-31 12:58:54 +00:00
tv d29f17612e Don't gratuitously touch the replacement headers in ${.OBJDIR}/include;
instead, touch them only if they're changed.
2002-03-07 22:48:07 +00:00
tv 866eb28f53 Move inttypes.h to list of auto-generated-empty headers. 2002-03-07 19:18:25 +00:00
tv fa2ae538c9 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.]
2002-03-07 18:28:46 +00:00
tv 259a2ab95f Add some more bits of host compatibility. 2002-02-26 22:29:38 +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 2b616edfca - Replace pwcache(3) if necessary (pwcache_userdb(3) is checked for).
Tested on -current and 1.5.3.
- Wrap some long lines.
2002-01-24 04:05:27 +00:00
tv 9d5d28c26f Make many host tools compile on non-NetBSD hosts. Not complete, but
very nearly there.
2002-01-21 20:04:36 +00:00
lukem fe4a1b3537 look for <inttypes.h> and #include if found (for uint*_t) 2002-01-10 04:31:15 +00:00
lukem 07fae6dedd Add replacement fgetln(3) (from lukemftp/libukem), as fparseln(3) uses it 2002-01-04 14:39:06 +00:00
tv 87d14ee4ac 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.
2001-12-11 21:17:56 +00:00