OSDN Git Service

uclinux-h8/uClibc.git
17 years agoFix a build break due to errno and h_errno being unresolved symbols.
Rob Landley [Wed, 7 Mar 2007 23:39:28 +0000 (23:39 -0000)]
Fix a build break due to errno and h_errno being unresolved symbols.
(No idea if this is the right fix but it's something for now.)

17 years agoSync sh's procfs.h with glibc, fixes gdbserver.
Paul Mundt [Wed, 7 Mar 2007 09:47:39 +0000 (09:47 -0000)]
Sync sh's procfs.h with glibc, fixes gdbserver.
Patch from Carmelo Amoroso <carmelo73@gmail.com>.

17 years agoFix PLTJMP() token pasting build error, patch from
Paul Mundt [Wed, 7 Mar 2007 09:46:22 +0000 (09:46 -0000)]
Fix PLTJMP() token pasting build error, patch from
Carmelo Amoroso <carmelo73@gmail.com>.

17 years agoI always miss svn add.
Khem Raj [Tue, 6 Mar 2007 19:13:31 +0000 (19:13 -0000)]
I always miss svn add.

17 years agoRemove debian directory at the request of Simon Richter. (The debian
Rob Landley [Tue, 6 Mar 2007 18:37:15 +0000 (18:37 -0000)]
Remove debian directory at the request of Simon Richter.  (The debian
developers prefer to maintain their own debian subdir as a patch.)

17 years agoAdd posix_fadvise posix_fadvise64 for arm.
Khem Raj [Tue, 6 Mar 2007 08:06:26 +0000 (08:06 -0000)]
Add posix_fadvise posix_fadvise64 for arm.
Import INTERNAL_SYSCALL macro for i386 from glibc.
Use above macro in posix_fadvise implementation if an arch defines it.

17 years agoNew test targets 'compile' and 'run'
Khem Raj [Mon, 5 Mar 2007 20:49:57 +0000 (20:49 -0000)]
New test targets 'compile' and 'run'

17 years agoinclude stddef.h to get NULL definition.
Khem Raj [Thu, 1 Mar 2007 22:26:51 +0000 (22:26 -0000)]
include stddef.h to get NULL definition.

17 years agoFix compiler warning about shadowed declaration.
Khem Raj [Thu, 1 Mar 2007 22:02:09 +0000 (22:02 -0000)]
Fix compiler warning about shadowed declaration.

17 years agoShould be __sigset_t instead of sigset_t.
Khem Raj [Thu, 1 Mar 2007 21:59:59 +0000 (21:59 -0000)]
Should be __sigset_t instead of sigset_t.

17 years agoadd support for ppoll() and emulate poll() with it when __NR_poll does not exist
Mike Frysinger [Wed, 28 Feb 2007 22:25:41 +0000 (22:25 -0000)]
add support for ppoll() and emulate poll() with it when __NR_poll does not exist

17 years agomention the uClibc 0.9.28.3 release
Eric Andersen [Wed, 28 Feb 2007 21:36:09 +0000 (21:36 -0000)]
mention the uClibc 0.9.28.3 release

17 years agoAdd a hack for compiling a 32 bit user space with a 64 bit kernel on x86_64
Eric Andersen [Wed, 28 Feb 2007 21:20:00 +0000 (21:20 -0000)]
Add a hack for compiling a 32 bit user space with a 64 bit kernel on x86_64

17 years agoifdef out RTLD defines we dont actually support nor are in POSIX
Mike Frysinger [Wed, 28 Feb 2007 17:10:27 +0000 (17:10 -0000)]
ifdef out RTLD defines we dont actually support nor are in POSIX

17 years agosync with glibc
Mike Frysinger [Wed, 28 Feb 2007 17:04:42 +0000 (17:04 -0000)]
sync with glibc

17 years agoneed to double check internal errno handling wrt libpthread
Mike Frysinger [Thu, 22 Feb 2007 17:23:56 +0000 (17:23 -0000)]
need to double check internal errno handling wrt libpthread

17 years agofix the date
Eric Andersen [Wed, 21 Feb 2007 23:46:45 +0000 (23:46 -0000)]
fix the date

17 years agonote the release of uClibc 0.9.28.2
Eric Andersen [Wed, 21 Feb 2007 23:45:54 +0000 (23:45 -0000)]
note the release of uClibc 0.9.28.2

17 years agoadd missing file for previous commit as pointed out by Peter Kjellerstedt
Mike Frysinger [Wed, 21 Feb 2007 16:14:11 +0000 (16:14 -0000)]
add missing file for previous commit as pointed out by Peter Kjellerstedt

17 years agotouchup new kconfig handling so we dont constantly rebuild
Mike Frysinger [Wed, 21 Feb 2007 08:27:01 +0000 (08:27 -0000)]
touchup new kconfig handling so we dont constantly rebuild

17 years agoredo errno handling so that it should work both in thread and non-threaded situations
Mike Frysinger [Wed, 21 Feb 2007 08:16:28 +0000 (08:16 -0000)]
redo errno handling so that it should work both in thread and non-threaded situations

17 years agomake sure we have rtld_hidden_def(_dl_debug_state)
Mike Frysinger [Wed, 21 Feb 2007 07:58:16 +0000 (07:58 -0000)]
make sure we have rtld_hidden_def(_dl_debug_state)

17 years agostub out msync() for no-mmu as well
Mike Frysinger [Wed, 21 Feb 2007 06:27:56 +0000 (06:27 -0000)]
stub out msync() for no-mmu as well

17 years agodrop -Wl,-warn-common since it doesnt serve much purpose
Mike Frysinger [Wed, 21 Feb 2007 05:14:42 +0000 (05:14 -0000)]
drop -Wl,-warn-common since it doesnt serve much purpose

17 years agomake sure cleanup handler is only called once
Mike Frysinger [Tue, 20 Feb 2007 16:21:29 +0000 (16:21 -0000)]
make sure cleanup handler is only called once

17 years agocall kernel helper to do spinlocks
Mike Frysinger [Tue, 20 Feb 2007 15:25:12 +0000 (15:25 -0000)]
call kernel helper to do spinlocks

17 years agosimple script for counting relocs
Mike Frysinger [Sun, 18 Feb 2007 15:47:56 +0000 (15:47 -0000)]
simple script for counting relocs

17 years agodefault to pulling kernel headers from the system install
Mike Frysinger [Sun, 18 Feb 2007 14:17:20 +0000 (14:17 -0000)]
default to pulling kernel headers from the system install

17 years agorewrite all superh targets to just sh
Mike Frysinger [Sun, 18 Feb 2007 13:58:24 +0000 (13:58 -0000)]
rewrite all superh targets to just sh

17 years agorewrite all sparc targets to just sparc
Mike Frysinger [Sun, 18 Feb 2007 13:57:29 +0000 (13:57 -0000)]
rewrite all sparc targets to just sparc

17 years agorewrite parisc to hppa
Mike Frysinger [Sun, 18 Feb 2007 13:56:24 +0000 (13:56 -0000)]
rewrite parisc to hppa

17 years agoMake _dl_malloc alignment arch configurable.
Joakim Tjernlund [Sat, 17 Feb 2007 17:55:45 +0000 (17:55 -0000)]
Make _dl_malloc alignment arch configurable.
From Atsushi Nemoto.

17 years agomake sure static variables are re-initialized everytime
Mike Frysinger [Fri, 16 Feb 2007 21:35:21 +0000 (21:35 -0000)]
make sure static variables are re-initialized everytime

17 years agocleanup a little
Mike Frysinger [Fri, 16 Feb 2007 21:34:34 +0000 (21:34 -0000)]
cleanup a little

17 years agoFix dlopen for static apps.
Joakim Tjernlund [Fri, 16 Feb 2007 18:02:50 +0000 (18:02 -0000)]
Fix dlopen for static apps.
From Carmelo Amoroso.

17 years agoAtsushi Nemoto writes:
Mike Frysinger [Thu, 15 Feb 2007 14:11:59 +0000 (14:11 -0000)]
Atsushi Nemoto writes:
When I imported INLINE_SYSCALL, etc. from glibc, I just copied whole
macros for each ABI.  Actually, except for argument type (long
vs. long long), internal_syscall[0-4] are identical for all ABI, and
internal_syscall[5-6] for N32/N64 are identical for N32/N64.

And I just disabled FORCE_FRAME_POINTER since it had caused build
failure, but including <alloca.h> can solve it.

Here is a patch to handle these issues, plus asm/__asm__ and
volatile/__volatile__ conversion.

Thanks for Peter S. Mazinger who did basic work of this cleanup.

17 years ago- kbuild update broke uClibc's configuration. It complains about
Bernhard Reutner-Fischer [Thu, 15 Feb 2007 09:59:59 +0000 (09:59 -0000)]
- kbuild update broke uClibc's configuration. It complains about
  include/bits/uClibc_config.h since there is no include/bits (yet). Depend on it.

17 years agoRevert previous commit as it is unclear if it is needed.
Joakim Tjernlund [Wed, 14 Feb 2007 19:53:54 +0000 (19:53 -0000)]
Revert previous commit as it is unclear if it is needed.

17 years agoHopefully fix the earlier broken if [ -n $(HEADERS_BITS_SUBARCH) ]
Joakim Tjernlund [Wed, 14 Feb 2007 14:12:29 +0000 (14:12 -0000)]
Hopefully fix the earlier broken if [ -n $(HEADERS_BITS_SUBARCH) ]
test by adding quotes. From Steve Papacharalambous.

17 years agomake arch default to hostarch
Mike Frysinger [Wed, 14 Feb 2007 08:25:26 +0000 (08:25 -0000)]
make arch default to hostarch

17 years agopull latest kconfig from kernel
Mike Frysinger [Wed, 14 Feb 2007 08:21:06 +0000 (08:21 -0000)]
pull latest kconfig from kernel

17 years agomake sure we declare TARGET_ARCH as a string
Mike Frysinger [Wed, 14 Feb 2007 06:52:55 +0000 (06:52 -0000)]
make sure we declare TARGET_ARCH as a string

17 years agoadd silentoldconfig target
Mike Frysinger [Tue, 13 Feb 2007 20:11:42 +0000 (20:11 -0000)]
add silentoldconfig target

17 years agocleanup style
Mike Frysinger [Tue, 13 Feb 2007 20:05:22 +0000 (20:05 -0000)]
cleanup style

17 years agoAdd missing bits/fenv.h that got lost in the e500 port.
Joakim Tjernlund [Tue, 13 Feb 2007 15:01:38 +0000 (15:01 -0000)]
Add missing bits/fenv.h that got lost in the e500 port.
clean up E500 math support somewhat.
From Steve Papacharalambous with mods by me.

17 years agoDo not produce spurious "/bin/sh: [: too many arguments" if
Peter Kjellerstedt [Tue, 13 Feb 2007 09:47:44 +0000 (09:47 -0000)]
Do not produce spurious "/bin/sh: [: too many arguments" if
$(HEADERS_BITS_SUBARCH) is empty (which it most likely is).

17 years agouse /*...*/ comments rather than #... so we can preprocess
Mike Frysinger [Tue, 13 Feb 2007 00:54:35 +0000 (00:54 -0000)]
use /*...*/ comments rather than #... so we can preprocess

17 years agoImpl. linux syscalls sched_getaffinity/sched_setaffinity but
Joakim Tjernlund [Mon, 12 Feb 2007 22:52:32 +0000 (22:52 -0000)]
Impl. linux syscalls sched_getaffinity/sched_setaffinity but
protect its use by #ifdef INTERNAL_SYSCALL since not all
arch's has INTERNAL_SYSCALL.

All arch's not having INTERNAL_SYSCALL in
libc/sysdeps/linux/<arch>/bits/syscalls.h should get an update
from glibc.

17 years agoUpdates from glibc.
Joakim Tjernlund [Mon, 12 Feb 2007 22:29:37 +0000 (22:29 -0000)]
Updates from glibc.

17 years agoRehash the PowerPC e500 port to avoid creating symlinks
Joakim Tjernlund [Mon, 12 Feb 2007 21:57:57 +0000 (21:57 -0000)]
Rehash the PowerPC e500 port to avoid creating symlinks
in the powerpc arch code and make more code common with
classic PowerPC. From Steve Papacharalambous

Lets hope I didn't break something.

17 years agoAtsushi Nemoto writes:
Mike Frysinger [Mon, 12 Feb 2007 18:34:57 +0000 (18:34 -0000)]
Atsushi Nemoto writes:
Current ucontext_t does not match with kernel's definition.  Also, on
N32 ABI, we can not use kernel's struct sigcontext since kernel's
sizeof(long) and user's sizeof(long) is differ.

For both data structure, just importing header files from recent glibc
fixes the mismatch.  So here is a patch importing sys/ucontext.h and
bits/sigcontext.t from glibc-2.5.

17 years agoRemoved a .align 2 by mistake in previous commit.
Joakim Tjernlund [Mon, 12 Feb 2007 10:10:44 +0000 (10:10 -0000)]
Removed a .align 2 by mistake in previous commit.

17 years agoRemove #APP/#NO_APP since -std=gnu99 will make
Joakim Tjernlund [Mon, 12 Feb 2007 09:23:14 +0000 (09:23 -0000)]
Remove #APP/#NO_APP since -std=gnu99 will make
gcc barf otherwise.

17 years agoAtsushi Nemoto writes:
Mike Frysinger [Sun, 11 Feb 2007 09:46:43 +0000 (09:46 -0000)]
Atsushi Nemoto writes:
This patch imports INLINE_SYSCALL, etc. from glibc-2.5 ports and
implements _syscall[0-7] by using them, like arm and powerpc.

I think this patch does not change functionality, but gives better
__SYSCALL_CLOBBERS for N32/N64.

17 years agowe dont actually need asm/page.h
Mike Frysinger [Sat, 10 Feb 2007 02:25:12 +0000 (02:25 -0000)]
we dont actually need asm/page.h

17 years agoKay McCormick reports: when evp is NULL, it is reset too late and so can cause a...
Mike Frysinger [Fri, 9 Feb 2007 22:23:35 +0000 (22:23 -0000)]
Kay McCormick reports: when evp is NULL, it is reset too late and so can cause a crash when it is dereferenced

17 years agorun through Lindent
Mike Frysinger [Fri, 9 Feb 2007 22:14:34 +0000 (22:14 -0000)]
run through Lindent

17 years agoAtsushi Nemoto writes: Add st_[amc]timensec to N32/N64 version of stat, add st_[amc...
Mike Frysinger [Fri, 9 Feb 2007 06:44:53 +0000 (06:44 -0000)]
Atsushi Nemoto writes: Add st_[amc]timensec to N32/N64 version of stat, add st_[amc]time_nsec to each kernel_stat, and define STAT_HAVE_NSEC to convert them

17 years agoenable -std=gnu99 by default now
Mike Frysinger [Thu, 8 Feb 2007 22:03:29 +0000 (22:03 -0000)]
enable -std=gnu99 by default now

17 years agouse __FDPIC__ from the compiler rather than setting our own
Mike Frysinger [Thu, 8 Feb 2007 21:55:28 +0000 (21:55 -0000)]
use __FDPIC__ from the compiler rather than setting our own

17 years agorevert 17821, wait for better test cases
Eric Andersen [Thu, 8 Feb 2007 21:07:26 +0000 (21:07 -0000)]
revert 17821, wait for better test cases

17 years agodo not use ghbn_buf after it goes out of scope
Eric Andersen [Thu, 8 Feb 2007 21:02:26 +0000 (21:02 -0000)]
do not use ghbn_buf after it goes out of scope

17 years agoimport a slightly modified realpath() test case from glibc
Mike Frysinger [Thu, 8 Feb 2007 19:07:11 +0000 (19:07 -0000)]
import a slightly modified realpath() test case from glibc

17 years agoMiguel Angel Alvarez writes:
Eric Andersen [Thu, 8 Feb 2007 18:38:50 +0000 (18:38 -0000)]
Miguel Angel Alvarez writes:

Hi. I have found a bug in realpath that did not allow me to use it with
symlinks. Although I am using 0.9.28.1, the bug is present in 0.9.28 and
also in the trunk.

I attach a suggested patch. Please let me know if the solution is correct.

17 years agohandle file_name==NULL and file_name=="" as required by POSIX
Mike Frysinger [Thu, 8 Feb 2007 18:25:57 +0000 (18:25 -0000)]
handle file_name==NULL and file_name=="" as required by POSIX

17 years agorevert previous change; reading POSIX spec some more says we need to set errno to...
Mike Frysinger [Thu, 8 Feb 2007 18:24:46 +0000 (18:24 -0000)]
revert previous change; reading POSIX spec some more says we need to set errno to EINVAL if filename is NULL

17 years agowe crash if the first argument to realpath() is non-null as well so lets mark both...
Mike Frysinger [Thu, 8 Feb 2007 18:21:14 +0000 (18:21 -0000)]
we crash if the first argument to realpath() is non-null as well so lets mark both arguments as being non-NULL

17 years agoPaul Brook writes:
Mike Frysinger [Thu, 8 Feb 2007 18:05:44 +0000 (18:05 -0000)]
Paul Brook writes:
I'm seeing a hang in applications that open and close files with a
non-threaded uClibc.  There is code in fclose() to remove a file handle from
_stdio_openlist however it's commented out, allegedly because it is dead.
_stdio_openlist is used in several places, including _stdio_term when a
program exits. fclose() frees the struct, so I don't see how the code can
possibly be redundant.

In the __UCLIBC_HAS_THREADS__ && __STDIO_BUFFERS case the file is removed from
_stdio_openlist by __STDIO_OPENLIST_DEC_USE.

The attached patch fixes this bug be re-enabling the code.

17 years agopull in features.h so we have access to config defines
Mike Frysinger [Thu, 8 Feb 2007 16:49:07 +0000 (16:49 -0000)]
pull in features.h so we have access to config defines

17 years agosh crti.S needs features.h to resolve __HAVE_SHARED__, trivial patch
Paul Mundt [Wed, 7 Feb 2007 11:02:37 +0000 (11:02 -0000)]
sh crti.S needs features.h to resolve __HAVE_SHARED__, trivial patch
from Carmelo Amoroso <carmelo73@gmail.com>.

17 years agono need to duplicate WCHAR check
Mike Frysinger [Mon, 5 Feb 2007 16:16:51 +0000 (16:16 -0000)]
no need to duplicate WCHAR check

17 years ago- silence warning about using an undefined token
Bernhard Reutner-Fischer [Mon, 5 Feb 2007 12:33:30 +0000 (12:33 -0000)]
- silence warning about using an undefined token

17 years ago- silence warning about using an undefined token
Bernhard Reutner-Fischer [Mon, 5 Feb 2007 12:17:12 +0000 (12:17 -0000)]
- silence warning about using an undefined token

17 years agonew cheesy test by Denis Vlasenko to trigger fclose loop
Mike Frysinger [Mon, 5 Feb 2007 01:17:09 +0000 (01:17 -0000)]
new cheesy test by Denis Vlasenko to trigger fclose loop

17 years agoAdd support for PowerPC e500, libc part only.
Joakim Tjernlund [Sun, 4 Feb 2007 21:25:42 +0000 (21:25 -0000)]
Add support for PowerPC e500, libc part only.
Math support to be done.
From Steve Papacharalambous, stevep@freescale.com

17 years agofixup includes so we compile again
Mike Frysinger [Sun, 4 Feb 2007 09:43:11 +0000 (09:43 -0000)]
fixup includes so we compile again

17 years agothe sun rpc code has too many alias violations to worry over now; just disable strict...
Mike Frysinger [Sun, 4 Feb 2007 09:42:38 +0000 (09:42 -0000)]
the sun rpc code has too many alias violations to worry over now; just disable strict-aliasing until someone gets the balls to clean this stuff up

17 years agofix compiling and touchup style
Mike Frysinger [Sun, 4 Feb 2007 09:34:13 +0000 (09:34 -0000)]
fix compiling and touchup style

17 years agosync some stuff from glibc to fix test build failure
Mike Frysinger [Sun, 4 Feb 2007 09:24:56 +0000 (09:24 -0000)]
sync some stuff from glibc to fix test build failure

17 years agoMake sure struct stat is identical to struct stat64 if
Peter Kjellerstedt [Fri, 2 Feb 2007 12:32:27 +0000 (12:32 -0000)]
Make sure struct stat is identical to struct stat64 if
__USE_FILE_OFFSET64 is defined. This was the case for all
architectures except those that use packed structures by default
(i.e., CRIS).

17 years agouse sane line breaks
Eric Andersen [Fri, 2 Feb 2007 02:20:59 +0000 (02:20 -0000)]
use sane line breaks

17 years agoreplace bits/syscalls.h with a comment ... an empty file makes people think this...
Mike Frysinger [Fri, 2 Feb 2007 01:42:51 +0000 (01:42 -0000)]
replace bits/syscalls.h with a comment ... an empty file makes people think this is a bug rather than by design

17 years agoRonald Maeder writes:
Eric Andersen [Fri, 2 Feb 2007 01:29:10 +0000 (01:29 -0000)]
Ronald Maeder writes:
I have successfully made gethostbyname_r(), res_init(), and gethostid() fully
reentrant.  In addition, I have added a NULL check to inet_aton().  This is
where SEG FAULTs were coming from when gethostbyname_r() was called.

17 years agouse the correct lock for access to __nameserver[]
Eric Andersen [Fri, 2 Feb 2007 01:01:51 +0000 (01:01 -0000)]
use the correct lock for access to __nameserver[]

17 years agofix lock naming
Eric Andersen [Fri, 2 Feb 2007 00:37:06 +0000 (00:37 -0000)]
fix lock naming

17 years agoRonald Maeder writes:
Eric Andersen [Fri, 2 Feb 2007 00:30:30 +0000 (00:30 -0000)]
Ronald Maeder writes:

Hi Erik,

Thanks for all your great work.  I found a set of bugs in
resolv.c .  Basically, there is code that looks like:

        BIGLOCK;
        __nameserversXX=__nameservers;
        __nameserverXX=__nameserver;
        BIGUNLOCK;
        i = __dns_lookup(dname, type, __nameserversXX, __nameserverXX, &packet, &a);

which is a problem because the declarations are

int __nameservers;
char * __nameserver[MAX_SERVERS];
int __searchdomains;
char * __searchdomain[MAX_SEARCH];

so you can see that __nameserver is a pointer.  Copying the
pointer to __nameserverXX doesn't protect the global variable
space.  I have attached a patch and the new file.  I hope you
will incorporate these bug fixes.  I spent quite a bit of time
tracking them down.

Many thanks,

Ron

17 years agofix obvious bug in ipv4/ipv6 resolving. When not using AF_INET,
Eric Andersen [Fri, 2 Feb 2007 00:23:55 +0000 (00:23 -0000)]
fix obvious bug in ipv4/ipv6 resolving.  When not using AF_INET,
gethostbyname2_r tries to resolve an ipv6 address from /etc/hosts using
get_hosts_byname_r, but with AF_INET instead of the supplied address family.
This returns ipv4 addresses marked as ipv6 ones.  Fix from nbd.

17 years agodrive home the point people should not be using _syscall#() macros
Mike Frysinger [Thu, 1 Feb 2007 07:30:37 +0000 (07:30 -0000)]
drive home the point people should not be using _syscall#() macros

17 years agodocument future need for larger time values
Mike Frysinger [Thu, 1 Feb 2007 07:16:04 +0000 (07:16 -0000)]
document future need for larger time values

17 years ago- should look if LFS is enabled as suggested by pkj in #1131. This generates identica...
Bernhard Reutner-Fischer [Tue, 30 Jan 2007 17:26:38 +0000 (17:26 -0000)]
- should look if LFS is enabled as suggested by pkj in #1131. This generates identical cc1 input for LFS enabled (compared to before r17652) but makes sure that we pickup the non-LFS if LFS is turned off (like r17652 did in this case).

17 years ago- fix compilation of GNU glob with !LFS
Bernhard Reutner-Fischer [Mon, 29 Jan 2007 22:40:38 +0000 (22:40 -0000)]
- fix compilation of GNU glob with !LFS
  Sounds like a typo, really

17 years agoRichard Sandiford writes:
Mike Frysinger [Mon, 29 Jan 2007 17:52:29 +0000 (17:52 -0000)]
Richard Sandiford writes:
However, retesting on m68k showed up a problem that had appeared in
uClibc since the last time I tried.  Specifically, revision 15785 did:

  -#define HEAP_GRANULARITY       (sizeof (HEAP_GRANULARITY_TYPE))
  +#define HEAP_GRANULARITY       (__alignof__ (HEAP_GRANULARITY_TYPE))

  -#define MALLOC_ALIGNMENT       (sizeof (double))
  +#define MALLOC_ALIGNMENT       (__alignof__ (double))

The problem is that

  (a) MALLOC_HEADER_SIZE == MALLOC_ALIGNMENT
  (b) the header contains a size value of type size_t
  (c) sizeof (size_t) is 4 on m68k, but...
  (d) __alignof__ (double) is only 2 (the largest alignment used on m68k)

So we only allocate 2 bytes for the 4-byte header, and the least
significant 2 bytes of the size are in the user's area rather than
the header.  The patch below fixes that problem by redefining
MALLOC_HEADER_SIZE to:

  MAX (MALLOC_ALIGNMENT, sizeof (size_t))

(but without the help of the MAX macro ;)).  However, we really would
like to have word alignment on Coldfire.  It makes a big performance
difference, and because we have to allocate a 4-byte header anyway,
what wastage there is will be confined to the end of the allocated block.
Any wastage will also be limited to 2 bytes per allocation compared to
the current alignment.

I've therefore used the __aligned__ type attribute to create a double
type that has at least sizeof (size_t) bytes of alignment.  I've
introduced a new __attribute_aligned__ macro for this.  It might seem
silly protecting against old or non-GNU compilers here, but the extra
alignment is only an optimisation, and having the macro is more in the
spirit of the other attribute code.

17 years ago- s/if USE___THREAD/if defined USE___THREAD && USE___THREAD/g
Bernhard Reutner-Fischer [Mon, 29 Jan 2007 14:56:56 +0000 (14:56 -0000)]
- s/if USE___THREAD/if defined USE___THREAD && USE___THREAD/g

17 years ago- see if defined foo before trying to look at the value of foo (that should be 0...
Bernhard Reutner-Fischer [Mon, 29 Jan 2007 14:33:27 +0000 (14:33 -0000)]
- see if defined foo before trying to look at the value of foo (that should be 0 in this case. Avoids some warnings).

17 years ago- sync with glibc (and provide a check for icc).
Bernhard Reutner-Fischer [Mon, 29 Jan 2007 14:31:16 +0000 (14:31 -0000)]
- sync with glibc (and provide a check for icc).
  Only affects gcc <2.7 or non-gcc compilers that bailed earlier due to missing int64_t

17 years agopull in unistd.h for syscall() prototype
Mike Frysinger [Mon, 29 Jan 2007 04:32:20 +0000 (04:32 -0000)]
pull in unistd.h for syscall() prototype

17 years agouse ifdef rather than if for stack direction
Mike Frysinger [Mon, 29 Jan 2007 04:28:46 +0000 (04:28 -0000)]
use ifdef rather than if for stack direction

17 years agofix from Atsushi Nemoto for displaying of 64bit types
Mike Frysinger [Mon, 29 Jan 2007 04:07:37 +0000 (04:07 -0000)]
fix from Atsushi Nemoto for displaying of 64bit types

17 years agofix from Roman Kononov for reading in of 64bit types
Mike Frysinger [Mon, 29 Jan 2007 04:04:19 +0000 (04:04 -0000)]
fix from Roman Kononov for reading in of 64bit types

17 years agomake sure reading 64bit types works
Mike Frysinger [Mon, 29 Jan 2007 04:03:31 +0000 (04:03 -0000)]
make sure reading 64bit types works