Commit Graph

18 Commits

Author SHA1 Message Date
Tai-hwa Liang
f497fbf5e4 - Removing some unneeded definitions of NULL(cruft related to 1970's C).
In C90, NULL is guaranteed to be declared in <stddef.h> and also in
  <string.h>.  Though the correct way to define NULL in FreeBSD is to
  include <sys/_null.h>, other parts of libstand still require <string.h>
  to build; therefore, we keep <string.h> in stand.h and add a note about
  this;
- Removing no longer used 'Prototype' definition.  Quote from bde@:

	'Cruft related to getting incomplete struct declarations within
	prototypes forward-declared before the structs.  It doesn't mean
	"prototype" but only part of a prototype-related hack.  No longer
	used.'

- Replacing iaddr_t with uintptr_t;
- Removing use of long double to determine alignment.  Use a fixed 16 byte
  alignment instead;

Reviewed by:	bde
Obtained from:	DragonFlyBSD (partially)
MFC after:	1 month
2011-07-10 07:25:34 +00:00
Kevin Lo
5f099d0a7d style(9) cleanup 2011-07-10 07:14:32 +00:00
Tai-hwa Liang
728fc2d633 Fixing building bustage on 32 bits platforms when WARNS >= 2. Note that
this fix only applies to zalloc.c, the other part of libstand such like
qdivrem.c still gives compilation warnings on sparc64 tinderbox builds;
therefore, WARNS level isn't changed for now.

Submitted by:	Garrett Cooper <yanegomi@gmail.com>
Reviewed by:	bde
2011-07-08 01:35:33 +00:00
John Baldwin
7ab17e6d01 Just use uintptr_t and intptr_t rather than requiring each arch to provide
explicit int/long typedefs.
2005-05-31 20:01:18 +00:00
Olivier Houchard
027e3e1b0d Define iaddr_t and saddr_t for arm. 2004-05-14 13:32:13 +00:00
Peter Grehan
bf7c848b97 No reason to disable this test on powerpc. 2004-02-25 00:53:06 +00:00
Robert Drehmel
5a1c2d4f62 Trust the code more than the comment(s) and correct some false
statements about pointer data type sizes, which spread probably
by copy-and-paste.
2003-04-12 07:36:44 +00:00
Peter Wemm
21a7fd75c3 Reimplement malloc/free debugging that includes the offending file:line
info.  This turned out to be rather useful on ia64 for tracking down
malloc/free problems.
Detect duplicate free()'s - otherwise these show up as a guard1 failure
and it looks like corruption instead of something simple like a second
free() where there shouldn't be.
Deal with libz using libc headers and not seeing the malloc/free stuff that
we provide in libstand.  Do similar nastiness to what is done for bzlib.

Tested on: i386, ia64 (compile, run)
2002-07-20 04:18:20 +00:00
Robert Drehmel
8a56180f76 Define the types iaddr_t and saddr_t for sparc64. 2001-10-15 13:50:47 +00:00
Doug Rabson
a8c60cbef4 A quick and dirty port of libstand to ia64. 2001-03-06 16:11:36 +00:00
Benno Rice
a2a9c8c79e Disable the end guard for now.
The test for failing the end guard was always triggering (and was reported as
such in compiler warnings).  This is a temporary band-aid until I can work
out what's really going on.

Reviewed by:	obrien
2000-11-10 06:15:24 +00:00
David E. O'Brien
26d9c22460 Inital PowerPC loader build support.
Submitted by:	Benno Rice <benno@jeamland.net>
2000-10-10 13:22:41 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
David E. O'Brien
d58fb9293a To clarify last commit, msmith says:
The reason the Alpha has less room than the i386 is because the bootstrap
is given a 256K mapping by the firmware; to add more requires extra work.
1998-10-17 22:20:06 +00:00
Mike Smith
95f5cf3349 Reduce the sbrk() increment from 64K to 4K. There's not much room on the
Alpha, and wasting potentially 64K-4 bytes of RAM just isn't an option.
1998-10-16 19:23:37 +00:00
Mike Smith
31a014da28 Prune unused zalloc components as recommended by Matt Dillon. Extra debugging
code is still enabled (it's not very expensive).
1998-10-01 17:35:08 +00:00
Doug Rabson
f069bf5a2c * Enable old UFS compatibility code for booting from Digital Unix formatted
disks.
* Fix a whole raft of warnings, printf and otherwise.
* Make zalloc work for alpha (just a case of using the right typedef).
* Add some (disabled) malloc debug printing to stand.h.
1998-09-26 10:48:50 +00:00
Mike Smith
95b50c2be3 Replace the old and extremely icky Mach/NetBSD allocator with a similarly
compact and much better one donated by Matt Dillon.  Implement a simple
sbrk() which uses the existing setheap() api.

Remove the custom allocator from the UFS code.  It wasn't working quite
right, and it shouldn't be needed with the new allocator.

Fix a serious problem with changing the value of already-existent
environment variables.  Don't attempt to modify the supposedly-const
argument to putenv()

Fix an off-by-one sizing error in the zipfs code detected by the new
allocator.

Submitted by:	zmalloc from Matt Dillon <dillon@backplane.com>
1998-09-26 01:42:40 +00:00