OSDN Git Service

uclinux-h8/uClibc.git
22 years agoAdd missing thread-safe locking.
Eric Andersen [Fri, 9 Aug 2002 17:01:30 +0000 (17:01 -0000)]
Add missing thread-safe locking.
 -Erik

22 years agoupdate todo again
Eric Andersen [Fri, 9 Aug 2002 16:43:07 +0000 (16:43 -0000)]
update todo again

22 years agoUpdate webpage for release
Eric Andersen [Fri, 9 Aug 2002 16:39:49 +0000 (16:39 -0000)]
Update webpage for release

22 years agoUpdate Changelog for release
Eric Andersen [Fri, 9 Aug 2002 16:14:26 +0000 (16:14 -0000)]
Update Changelog for release
 -Erik

22 years agoUpdate my TODO list. In particular, breakdown what I'll be working on
Manuel Novoa III [Fri, 9 Aug 2002 15:44:22 +0000 (15:44 -0000)]
Update my TODO list.  In particular, breakdown what I'll be working on
in the next two months.

22 years agoUpdate todo list a bit
Eric Andersen [Fri, 9 Aug 2002 15:31:19 +0000 (15:31 -0000)]
Update todo list a bit

22 years agoOk, bad idea. didn't work.
Eric Andersen [Fri, 9 Aug 2002 14:41:04 +0000 (14:41 -0000)]
Ok, bad idea.  didn't work.
 -Erik

22 years agoAdd in __uClibc_syscall
Eric Andersen [Fri, 9 Aug 2002 13:54:32 +0000 (13:54 -0000)]
Add in __uClibc_syscall

22 years agoInitial piece of unified syscall support from Brecis Communications
Eric Andersen [Fri, 9 Aug 2002 13:43:21 +0000 (13:43 -0000)]
Initial piece of unified syscall support from Brecis Communications

22 years agoNew and improved fork for mips, thanks to the fine folks
Eric Andersen [Fri, 9 Aug 2002 13:41:25 +0000 (13:41 -0000)]
New and improved fork for mips, thanks to the fine folks
at Brecis Communications.

22 years agoFix some more warnings for non-thread-enabled compiles.
David McCullough [Fri, 9 Aug 2002 13:11:08 +0000 (13:11 -0000)]
Fix some more warnings for non-thread-enabled compiles.

22 years agoLink ldso vs libgcc.a and eliminate baggage caused by
Eric Andersen [Fri, 9 Aug 2002 13:05:29 +0000 (13:05 -0000)]
Link ldso vs libgcc.a and eliminate baggage caused by
not previously linking vs libgcc
 -Erik

22 years agoFix a number of compile time warnings so that uClibc will build with -Werror using
David McCullough [Fri, 9 Aug 2002 13:03:00 +0000 (13:03 -0000)]
Fix a number of compile time warnings so that uClibc will build with -Werror using
a 3.0.4 version of the sh-linux-gcc compiler.

22 years agopread and pwrite were broken in several ways:
David McCullough [Fri, 9 Aug 2002 12:58:02 +0000 (12:58 -0000)]
pread and pwrite were broken in several ways:

* pwrite was using the write system call.

* SYSCALL_INLINE was only defined for pread and reused by pwrite
  meaning pwrite did a pread :-).

* The kernel pread/pwrite interfaces always take a 64bit value.  So
  the libc versions must do the LONG_LONG_PAIR stuff otherwise the
  pread/pwrite calls will not work.

These guys are working now for SH at least (and I can format my
DiskOnChip again ;-)

22 years agoAt some stage I was getting conflicts on the SH platform with
David McCullough [Fri, 9 Aug 2002 12:52:02 +0000 (12:52 -0000)]
At some stage I was getting conflicts on the SH platform with
the two i_am_not_a_leaf functions,  changing the name of one is harmless
and fixed the problem at the time.  Not entirely sure it's still required.

22 years agoChanges so that this file builds if we are not using threads.
David McCullough [Fri, 9 Aug 2002 12:49:35 +0000 (12:49 -0000)]
Changes so that this file builds if we are not using threads.

22 years agoBe more path independent
Eric Andersen [Fri, 9 Aug 2002 12:35:37 +0000 (12:35 -0000)]
Be more path independent

22 years agoDoh! I broke it. oops. Patch from Stefan Allius to fix it.
Eric Andersen [Fri, 9 Aug 2002 12:21:55 +0000 (12:21 -0000)]
Doh!  I broke it.  oops.  Patch from Stefan Allius to fix it.

22 years agoPatch from Stefan Allius, avoid compiler warnings (unused variable)
Eric Andersen [Fri, 9 Aug 2002 12:20:22 +0000 (12:20 -0000)]
Patch from Stefan Allius, avoid compiler warnings (unused variable)

22 years agoCleanup error returns to avoid warnings
Eric Andersen [Fri, 9 Aug 2002 12:19:23 +0000 (12:19 -0000)]
Cleanup error returns to avoid warnings
 -Erik

22 years agoPatch from Stefan Allius to remove obsolete printfs
Eric Andersen [Fri, 9 Aug 2002 12:14:20 +0000 (12:14 -0000)]
Patch from Stefan Allius to remove obsolete printfs

22 years agoDisable this code for mips, which does things quite differently...
Eric Andersen [Fri, 9 Aug 2002 12:08:57 +0000 (12:08 -0000)]
Disable this code for mips, which does things quite differently...
 -Erik

22 years agoFix a stupid typo messing up powerpc support
Eric Andersen [Fri, 9 Aug 2002 08:24:41 +0000 (08:24 -0000)]
Fix a stupid typo messing up powerpc support
 -Erik

22 years agoFor some perverse reason we were not registering destructors
Eric Andersen [Thu, 8 Aug 2002 17:51:16 +0000 (17:51 -0000)]
For some perverse reason we were not registering destructors
for dlopen'd libraries.  This fixes that.
 -Erik

22 years agoAdd an entry regarding localtime(), TZ, and timezone support.
Manuel Novoa III [Thu, 8 Aug 2002 17:01:30 +0000 (17:01 -0000)]
Add an entry regarding localtime(), TZ, and timezone support.

22 years agoOops. missed a spot.
Eric Andersen [Thu, 8 Aug 2002 16:30:18 +0000 (16:30 -0000)]
Oops.  missed a spot.
 -Erik

22 years agoMake powerpc compile once again
Eric Andersen [Thu, 8 Aug 2002 16:29:18 +0000 (16:29 -0000)]
Make powerpc compile once again
 -Erik

22 years agoUpdate the FAQ
Eric Andersen [Thu, 8 Aug 2002 15:54:36 +0000 (15:54 -0000)]
Update the FAQ

22 years agoBump version to 0.9.13
Eric Andersen [Thu, 8 Aug 2002 15:54:14 +0000 (15:54 -0000)]
Bump version to 0.9.13

22 years agoMove destructor attribute tag
Eric Andersen [Thu, 8 Aug 2002 15:50:07 +0000 (15:50 -0000)]
Move destructor attribute tag

22 years agoShuffle things around a bit. Looks a little cleaner.
Eric Andersen [Thu, 8 Aug 2002 15:49:05 +0000 (15:49 -0000)]
Shuffle things around a bit.  Looks a little cleaner.
 -Erik

22 years agoAdd a simple test for shared lib ctor/dtors
Eric Andersen [Thu, 8 Aug 2002 15:47:22 +0000 (15:47 -0000)]
Add a simple test for shared lib ctor/dtors
 -Erik

22 years agoPatch from Stefan Allius and Edie C. Dost:
Eric Andersen [Thu, 8 Aug 2002 15:44:46 +0000 (15:44 -0000)]
Patch from Stefan Allius and Edie C. Dost:
In linuxthreads/errno.h the functions __errno_location and
__h_errno_location wasn't safe against calling before the
library is initialized.

22 years agoMissed a spot
Eric Andersen [Thu, 8 Aug 2002 15:07:08 +0000 (15:07 -0000)]
Missed a spot
 -Erik

22 years agoI reworked syscalls.h to match how I'm doing other arches. Stefan Allius and
Eric Andersen [Thu, 8 Aug 2002 14:51:40 +0000 (14:51 -0000)]
I reworked syscalls.h to match how I'm doing other arches.  Stefan Allius and
Edie C. Dost has some concerns about the perl script used to general crti.o and
crtn.o and added their own versions.  These versions will win since they are
built last,

22 years agoFix license. I meant to say LGPL...
Eric Andersen [Thu, 8 Aug 2002 14:47:14 +0000 (14:47 -0000)]
Fix license.  I meant to say LGPL...
 -Erik

22 years agoPatch from Stefan Allius and Edie C. Dost to add SuperH
Eric Andersen [Thu, 8 Aug 2002 14:35:49 +0000 (14:35 -0000)]
Patch from Stefan Allius and Edie C. Dost to add SuperH
shared library support.  This also adds some cleaner error
handling, which I (Erik) then ported over to x86 and arm.
In addition Stefan added the following fixes:

- in hash.c was the lvalue handling of global library functions wrong.
   To fix this I had to change the prototype of _dl_find_hash. (==> TIS and
   ELF spec. Vers. 1.2)

- in ldso.c was the order of the .init sections calls wrong. Before we call
  the initialization code of a library we have to check that all dependend
  libraries are already initialized. This can easily made by calling it in the
  revers loading order. For this I added a previous pointer chain.

- in ldso.c the ELF magics wasn't checked fo PPC, MIPS and SH architecture

22 years agoPatch from Stefan Allius and Edie C. Dost to let ldd and
Eric Andersen [Thu, 8 Aug 2002 14:28:47 +0000 (14:28 -0000)]
Patch from Stefan Allius and Edie C. Dost to let ldd and
readelf compile under solaris.

22 years agoMake pump happy. Add in this header.
Eric Andersen [Thu, 8 Aug 2002 13:23:59 +0000 (13:23 -0000)]
Make pump happy.  Add in this header.
 -Erik

22 years agoI missed a file
Eric Andersen [Thu, 8 Aug 2002 08:47:17 +0000 (08:47 -0000)]
I missed a file

22 years agoFix a silly bug with using fstat64 instead of just fstat. No
Eric Andersen [Thu, 8 Aug 2002 08:00:43 +0000 (08:00 -0000)]
Fix a silly bug with using fstat64 instead of just fstat.  No
reason for 64bit stuff just to check perms.
 -Erik

22 years agoRemove unified syscall support (it should just be a per-arch
Eric Andersen [Thu, 8 Aug 2002 07:55:31 +0000 (07:55 -0000)]
Remove unified syscall support (it should just be a per-arch
decision, with syscalls.h adjusted to match).  Add symlinks
to make tools like mklibs.py be happy.
 -Erik

22 years agoDisable unused unifed stuff
Eric Andersen [Thu, 8 Aug 2002 07:54:16 +0000 (07:54 -0000)]
Disable unused unifed stuff
 -Erik

22 years agoUpdate default config files
Eric Andersen [Thu, 8 Aug 2002 07:45:01 +0000 (07:45 -0000)]
Update default config files

22 years agoUpdate status of reentrance support
Eric Andersen [Thu, 8 Aug 2002 07:32:52 +0000 (07:32 -0000)]
Update status of reentrance support

22 years agoMake some strings const
Eric Andersen [Thu, 8 Aug 2002 07:30:12 +0000 (07:30 -0000)]
Make some strings const
 -Erik

22 years agoFix locking
Eric Andersen [Thu, 8 Aug 2002 07:28:33 +0000 (07:28 -0000)]
Fix locking
 -Erik

22 years agoFix locking
Eric Andersen [Thu, 8 Aug 2002 07:28:12 +0000 (07:28 -0000)]
Fix locking

22 years agoCleanup warnings and fix prototypes
Eric Andersen [Thu, 8 Aug 2002 05:30:19 +0000 (05:30 -0000)]
Cleanup warnings and fix prototypes
 -Erik

22 years agoAdd missing include file
Eric Andersen [Thu, 8 Aug 2002 05:29:55 +0000 (05:29 -0000)]
Add missing include file

22 years agoCleanup some silly warnings
Eric Andersen [Thu, 8 Aug 2002 05:28:52 +0000 (05:28 -0000)]
Cleanup some silly warnings

22 years agoAvoid bad things happening on macro expansion...
Eric Andersen [Thu, 8 Aug 2002 05:27:37 +0000 (05:27 -0000)]
Avoid bad things happening on macro expansion...
 -Erik

22 years agoCleanup to avoid some undefined behavior
Eric Andersen [Thu, 8 Aug 2002 04:29:47 +0000 (04:29 -0000)]
Cleanup to avoid some undefined behavior
 -Erik

22 years agoIgnore symbol '_gp_disp' if it's missing from 'libgcc.a'. That's okay for
"Steven J. Hill" [Wed, 7 Aug 2002 19:56:08 +0000 (19:56 -0000)]
Ignore symbol '_gp_disp' if it's missing from 'libgcc.a'. That's okay for
MIPS platforms.

22 years agoAdd getrpcent.c to default rpc build
Eric Andersen [Wed, 7 Aug 2002 15:23:00 +0000 (15:23 -0000)]
Add getrpcent.c to default rpc build

22 years agoCleanup crypt and remove the crypt_r stuff, since SuSv3
Eric Andersen [Wed, 7 Aug 2002 15:11:51 +0000 (15:11 -0000)]
Cleanup crypt and remove the crypt_r stuff, since SuSv3
(IEEE Std 1003.1-2001) states that crypt need not be reentrant.
 -Erik

22 years agoRemove some noise
Eric Andersen [Wed, 7 Aug 2002 13:35:11 +0000 (13:35 -0000)]
Remove some noise

22 years agoChanged my mind. Keep this separate.
Eric Andersen [Wed, 7 Aug 2002 13:13:40 +0000 (13:13 -0000)]
Changed my mind.  Keep this separate.
 -Erik

22 years agoRewrite getenv
Eric Andersen [Wed, 7 Aug 2002 13:04:32 +0000 (13:04 -0000)]
Rewrite getenv

22 years agorework getopt. no read need to split this one up since
Eric Andersen [Wed, 7 Aug 2002 12:49:38 +0000 (12:49 -0000)]
rework getopt.  no read need to split this one up since
the parts are so tightly coupled.

22 years agomissed a file
Eric Andersen [Wed, 7 Aug 2002 12:47:50 +0000 (12:47 -0000)]
missed a file

22 years agogetopt tests
Eric Andersen [Wed, 7 Aug 2002 12:47:11 +0000 (12:47 -0000)]
getopt tests

22 years agoUpdates to the working apps list from Kagan Kongar. Thanks!
Eric Andersen [Wed, 7 Aug 2002 10:10:14 +0000 (10:10 -0000)]
Updates to the working apps list from Kagan Kongar.  Thanks!

22 years agoApply integer overflow security fix for "CERT Advisory CA-2002-25 Integer
Eric Andersen [Wed, 7 Aug 2002 09:07:10 +0000 (09:07 -0000)]
Apply integer overflow security fix for "CERT Advisory CA-2002-25 Integer
Overflow In XDR Library" http://www.cert.org/advisories/CA-2002-25.html
Patch from Solar Designer <solar@openwall.com>.

22 years agoMessage catalog support for internationalization is not currently
Eric Andersen [Wed, 7 Aug 2002 08:42:33 +0000 (08:42 -0000)]
Message catalog support for internationalization is not currently
provided by uClibc, and here I have added macros to disable it.
 -Erik

22 years agoPer suggestion from Miles Bader, move calloc.c to libc/stdlib.
Eric Andersen [Wed, 7 Aug 2002 07:57:49 +0000 (07:57 -0000)]
Per suggestion from Miles Bader, move calloc.c to libc/stdlib.
Also, Manuel notices that I forgot to check for when nmemb=0,
which would result in a segfault, so fix that case as well.
 -Erik

22 years agoWhen symbols are missing, its supposed to be an error...
Eric Andersen [Tue, 6 Aug 2002 14:50:14 +0000 (14:50 -0000)]
When symbols are missing, its supposed to be an error...
 -Erik

22 years agoSeveral pthreads updates. Enable linuxthreads_db. Several fixes
Eric Andersen [Tue, 6 Aug 2002 14:49:17 +0000 (14:49 -0000)]
Several pthreads updates.  Enable linuxthreads_db.  Several fixes
related to thread local storage.
 -Erik

22 years agoFixup the last missing pieces of thread locking
Eric Andersen [Tue, 6 Aug 2002 14:47:12 +0000 (14:47 -0000)]
Fixup the last missing pieces of thread locking
 -Erik

22 years agoRework RPC code once again. By default, only enable the
Eric Andersen [Tue, 6 Aug 2002 14:46:14 +0000 (14:46 -0000)]
Rework RPC code once again.  By default, only enable the
stuff needed for NFS mounts, rsh, and similar.
 -Erik

22 years agoEnable getpt prototype.
Manuel Novoa III [Tue, 6 Aug 2002 13:47:58 +0000 (13:47 -0000)]
Enable getpt prototype.

22 years agoChanged fflush() behavior to no-op for r/w streams in read-mode.
Manuel Novoa III [Tue, 6 Aug 2002 05:27:13 +0000 (05:27 -0000)]
Changed fflush() behavior to no-op for r/w streams in read-mode.
   This falls under undefined behavior wrt ANSI/ISO C99, but
   SUSv3 seems to treat it as a no-op and it occurs in some apps.
Fixed a problem with _stdio_fwrite() not checking for underlying
   write() failures.
Fixed both _stdio_fwrite() and _stdio_fread() to make sure that
   the putc and getc macros were disabled if the stream was in
   and error state.

The above changes should take care of a problem initially reported
by "Steven J. Hill" <sjhill@realitydiluted.com>.

22 years agoUnify calloc (its the same thing regardless of the underlying
Eric Andersen [Tue, 6 Aug 2002 03:28:45 +0000 (03:28 -0000)]
Unify calloc (its the same thing regardless of the underlying
malloc implementation).  Fix problem reported to bugtraq about
problems with integer overflow that can occur during the
computation of the memory region size by calloc (and similar
functions) which could result in a subsequent buffer overflow.
 -Erik

22 years agoJust in case, crash if somehow `exit' returns anyways
Eric Andersen [Tue, 6 Aug 2002 00:45:58 +0000 (00:45 -0000)]
Just in case, crash if somehow `exit' returns anyways
 -Erik

22 years agoremove BUILDTIME since it is not used
Eric Andersen [Mon, 5 Aug 2002 22:33:03 +0000 (22:33 -0000)]
remove BUILDTIME since it is not used

22 years agoA couple of little cleanups I forgot to check in.
Manuel Novoa III [Sat, 3 Aug 2002 18:49:09 +0000 (18:49 -0000)]
A couple of little cleanups I forgot to check in.

22 years agoWhen DODEBUG and HAS_WCHAR were enabled and HAS_LOCALE was disabled,
Eric Andersen [Sat, 3 Aug 2002 10:58:12 +0000 (10:58 -0000)]
When DODEBUG and HAS_WCHAR were enabled and HAS_LOCALE was disabled,
wchar.c wouldn't compile:
    wchar.c: In function `__mbsnrtowcs':
    wchar.c:631: `__ctype_encoding_7_bit' undeclared (first use in this function)
This fixes it by keeping the locale specific asserts hidden when not relevant.
 -Erik

22 years agoUse MALLOC_REALLOC_MIN_FREE_SIZE.
Miles Bader [Thu, 1 Aug 2002 07:46:55 +0000 (07:46 -0000)]
Use MALLOC_REALLOC_MIN_FREE_SIZE.

22 years ago(MALLOC_REALLOC_MIN_FREE_SIZE): New macro.
Miles Bader [Thu, 1 Aug 2002 07:46:20 +0000 (07:46 -0000)]
(MALLOC_REALLOC_MIN_FREE_SIZE): New macro.
Enable debugging if MALLOC_DEBUGGING is defined.

22 years ago(HEAP_MIN_SIZE): New macro.
Miles Bader [Thu, 1 Aug 2002 07:45:47 +0000 (07:45 -0000)]
(HEAP_MIN_SIZE): New macro.
(HEAP_MIN_FREE_AREA_SIZE): Increase size.
Enable debugging if HEAP_DEBUGGING is defined.

22 years agoJoseph Chiu <josephc@idealab.com> found an off-by-one bug. oops!
Eric Andersen [Thu, 1 Aug 2002 01:31:17 +0000 (01:31 -0000)]
Joseph Chiu <josephc@idealab.com> found an off-by-one bug.  oops!

22 years agoIn the allocate-and-copy case, don't include the malloc header in our
Miles Bader [Wed, 31 Jul 2002 09:44:09 +0000 (09:44 -0000)]
In the allocate-and-copy case, don't include the malloc header in our
size calculations.

22 years agoSigh. A bit more cleanup.
Eric Andersen [Wed, 31 Jul 2002 08:23:03 +0000 (08:23 -0000)]
Sigh.  A bit more cleanup.

22 years agoUpdate debugging printfs.
Miles Bader [Wed, 31 Jul 2002 07:13:19 +0000 (07:13 -0000)]
Update debugging printfs.

22 years agoPer discussion on the mailing list, simply vfork -> fork mapping to only apply
Eric Andersen [Wed, 31 Jul 2002 04:38:58 +0000 (04:38 -0000)]
Per discussion on the mailing list, simply vfork -> fork mapping to only apply
iff we do not have vfork available, which is simpler and more reasonable.
 -Erik

22 years agoMore i960 support
Eric Andersen [Wed, 31 Jul 2002 04:31:33 +0000 (04:31 -0000)]
More i960 support

22 years agoPatch from Martin Proulx <mproulx@okiok.com> to fix i960
Eric Andersen [Wed, 31 Jul 2002 04:29:18 +0000 (04:29 -0000)]
Patch from Martin Proulx <mproulx@okiok.com> to fix i960
create_module() support.

22 years agoPatch from Alexander Pevzner <pzz@pzz.msk.ru> to fixup things when invoked as
Eric Andersen [Wed, 31 Jul 2002 04:20:04 +0000 (04:20 -0000)]
Patch from Alexander Pevzner <pzz@pzz.msk.ru> to fixup things when invoked as
the C++ compiler to to automagically add include/g++ into the include search
path, and automagically add -lstdc++ and -lm into the set of automatically
linked libraries.

22 years agoYou fool foolish. Goodbye level 2.
Eric Andersen [Wed, 31 Jul 2002 02:45:47 +0000 (02:45 -0000)]
You fool foolish.  Goodbye level 2.

22 years agoAlways build utils by default
Eric Andersen [Wed, 31 Jul 2002 02:34:49 +0000 (02:34 -0000)]
Always build utils by default
 -Erik

22 years agoAccount for MALLOC_HEADER_SIZE when calculating new size.
Miles Bader [Wed, 31 Jul 2002 02:10:52 +0000 (02:10 -0000)]
Account for MALLOC_HEADER_SIZE when calculating new size.

22 years agoUse MALLOC_HEADER_SIZE.
Miles Bader [Wed, 31 Jul 2002 02:09:57 +0000 (02:09 -0000)]
Use MALLOC_HEADER_SIZE.

22 years ago(MALLOC_HEADER_SIZE): New macro.
Miles Bader [Wed, 31 Jul 2002 02:09:37 +0000 (02:09 -0000)]
(MALLOC_HEADER_SIZE): New macro.
(MALLOC_BASE, MALLOC_ADDR): Use it.

22 years agoMake sure NEW_SIZE is a multiple of HEAP_GRANULARITY.
Miles Bader [Tue, 30 Jul 2002 09:51:02 +0000 (09:51 -0000)]
Make sure NEW_SIZE is a multiple of HEAP_GRANULARITY.
Calculate amount freed when shrinking correctly.

22 years agoUpdate the size of grown/shrunk allocations.
Miles Bader [Tue, 30 Jul 2002 09:47:05 +0000 (09:47 -0000)]
Update the size of grown/shrunk allocations.
MALLOC_SET_SIZE now takes the user-address rather than the base-address.

22 years agoMALLOC_SET_SIZE now takes the user-address rather than the base-address.
Miles Bader [Tue, 30 Jul 2002 09:46:24 +0000 (09:46 -0000)]
MALLOC_SET_SIZE now takes the user-address rather than the base-address.

22 years agoDefine MALLOC_SET_SIZE to take the user-address rather than the base-address.
Miles Bader [Tue, 30 Jul 2002 09:45:58 +0000 (09:45 -0000)]
Define MALLOC_SET_SIZE to take the user-address rather than the base-address.

22 years agoImplement shrinking.
Miles Bader [Tue, 30 Jul 2002 09:23:59 +0000 (09:23 -0000)]
Implement shrinking.
Fix bug when growing an allocation.
Use new malloc header macros.

22 years agoUse new malloc header macros.
Miles Bader [Tue, 30 Jul 2002 09:22:51 +0000 (09:22 -0000)]
Use new malloc header macros.

22 years agoAdd macros to abstract the malloc header format a bit.
Miles Bader [Tue, 30 Jul 2002 09:20:31 +0000 (09:20 -0000)]
Add macros to abstract the malloc header format a bit.