OSDN Git Service
Mike Frysinger [Fri, 9 Feb 2007 22:14:34 +0000 (22:14 -0000)]
run through Lindent
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
Mike Frysinger [Thu, 8 Feb 2007 22:03:29 +0000 (22:03 -0000)]
enable -std=gnu99 by default now
Mike Frysinger [Thu, 8 Feb 2007 21:55:28 +0000 (21:55 -0000)]
use __FDPIC__ from the compiler rather than setting our own
Eric Andersen [Thu, 8 Feb 2007 21:07:26 +0000 (21:07 -0000)]
revert 17821, wait for better test cases
Eric Andersen [Thu, 8 Feb 2007 21:02:26 +0000 (21:02 -0000)]
do not use ghbn_buf after it goes out of scope
Mike Frysinger [Thu, 8 Feb 2007 19:07:11 +0000 (19:07 -0000)]
import a slightly modified realpath() test case from glibc
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.
Mike Frysinger [Thu, 8 Feb 2007 18:25:57 +0000 (18:25 -0000)]
handle file_name==NULL and file_name=="" as required by POSIX
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
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
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.
Mike Frysinger [Thu, 8 Feb 2007 16:49:07 +0000 (16:49 -0000)]
pull in features.h so we have access to config defines
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>.
Mike Frysinger [Mon, 5 Feb 2007 16:16:51 +0000 (16:16 -0000)]
no need to duplicate WCHAR check
Bernhard Reutner-Fischer [Mon, 5 Feb 2007 12:33:30 +0000 (12:33 -0000)]
- 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
Mike Frysinger [Mon, 5 Feb 2007 01:17:09 +0000 (01:17 -0000)]
new cheesy test by Denis Vlasenko to trigger fclose loop
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
Mike Frysinger [Sun, 4 Feb 2007 09:43:11 +0000 (09:43 -0000)]
fixup includes so we compile again
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
Mike Frysinger [Sun, 4 Feb 2007 09:34:13 +0000 (09:34 -0000)]
fix compiling and touchup style
Mike Frysinger [Sun, 4 Feb 2007 09:24:56 +0000 (09:24 -0000)]
sync some stuff from glibc to fix test build failure
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).
Eric Andersen [Fri, 2 Feb 2007 02:20:59 +0000 (02:20 -0000)]
use sane line breaks
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
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.
Eric Andersen [Fri, 2 Feb 2007 01:01:51 +0000 (01:01 -0000)]
use the correct lock for access to __nameserver[]
Eric Andersen [Fri, 2 Feb 2007 00:37:06 +0000 (00:37 -0000)]
fix lock naming
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
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.
Mike Frysinger [Thu, 1 Feb 2007 07:30:37 +0000 (07:30 -0000)]
drive home the point people should not be using _syscall#() macros
Mike Frysinger [Thu, 1 Feb 2007 07:16:04 +0000 (07:16 -0000)]
document future need for larger time values
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).
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
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.
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
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).
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
Mike Frysinger [Mon, 29 Jan 2007 04:32:20 +0000 (04:32 -0000)]
pull in unistd.h for syscall() prototype
Mike Frysinger [Mon, 29 Jan 2007 04:28:46 +0000 (04:28 -0000)]
use ifdef rather than if for stack direction
Mike Frysinger [Mon, 29 Jan 2007 04:07:37 +0000 (04:07 -0000)]
fix from Atsushi Nemoto for displaying 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
Mike Frysinger [Mon, 29 Jan 2007 04:03:31 +0000 (04:03 -0000)]
make sure reading 64bit types works
Mike Frysinger [Mon, 29 Jan 2007 03:59:09 +0000 (03:59 -0000)]
make sure 64bit output is correct
Mike Frysinger [Mon, 29 Jan 2007 03:22:36 +0000 (03:22 -0000)]
since these functions get exported, namespace the arguments
Mike Frysinger [Mon, 29 Jan 2007 03:21:52 +0000 (03:21 -0000)]
mark local function static
Mike Frysinger [Mon, 29 Jan 2007 03:18:59 +0000 (03:18 -0000)]
fixup shadowed warnings
Mike Frysinger [Mon, 29 Jan 2007 03:06:31 +0000 (03:06 -0000)]
mark some funcs as noreturn
Mike Frysinger [Mon, 29 Jan 2007 02:56:45 +0000 (02:56 -0000)]
fixup prototype warnings
Mike Frysinger [Mon, 29 Jan 2007 02:34:01 +0000 (02:34 -0000)]
check to see if __USE_FILE_OFFSET64 is defined rather than if it evaluates to true
Mike Frysinger [Mon, 29 Jan 2007 02:31:59 +0000 (02:31 -0000)]
make error output a little more helpful
Mike Frysinger [Mon, 29 Jan 2007 02:31:43 +0000 (02:31 -0000)]
fixup warnings
Mike Frysinger [Mon, 29 Jan 2007 02:31:32 +0000 (02:31 -0000)]
fix test to work even if CPPFLAGS contains -DNDEBUG
Mike Frysinger [Mon, 29 Jan 2007 02:04:51 +0000 (02:04 -0000)]
sync some fixes from glibc
Mike Frysinger [Mon, 29 Jan 2007 01:43:26 +0000 (01:43 -0000)]
missed an underscore in previous commit
Mike Frysinger [Sun, 28 Jan 2007 23:05:17 +0000 (23:05 -0000)]
Bernhard Fischer writes: add undef/nonnull warnings to EXTRA_WARNINGS
Mike Frysinger [Sun, 28 Jan 2007 23:04:06 +0000 (23:04 -0000)]
Bernhard Fischer writes: note how uClibc chooses to handle __resolved==NULL
Mike Frysinger [Sun, 28 Jan 2007 23:02:24 +0000 (23:02 -0000)]
sync with glibc as pointed out by Bernhard Fischer
Bernhard Reutner-Fischer [Sun, 28 Jan 2007 13:16:58 +0000 (13:16 -0000)]
- commentary typo fix
Mike Frysinger [Sun, 28 Jan 2007 10:32:59 +0000 (10:32 -0000)]
fix from Bernd Schmidt to make sure _dl_debug_state isnt optimized away and does not generate relocs
Mike Frysinger [Sun, 28 Jan 2007 10:29:23 +0000 (10:29 -0000)]
as pointed out by Jocke, use "2" for actual error messages and _dl_debug_file for debug messages
Mike Frysinger [Sun, 28 Jan 2007 10:23:07 +0000 (10:23 -0000)]
initial waitid() implementation
Mike Frysinger [Sun, 28 Jan 2007 08:20:00 +0000 (08:20 -0000)]
need string.h for memset()
Mike Frysinger [Sun, 28 Jan 2007 08:14:03 +0000 (08:14 -0000)]
note 0.9.28.1 release
Mike Frysinger [Sun, 28 Jan 2007 07:59:59 +0000 (07:59 -0000)]
its a new year
Mike Frysinger [Sun, 28 Jan 2007 07:26:32 +0000 (07:26 -0000)]
make sure we clear out the buffer so that random garbage on the stack doesnt screw us up
Mike Frysinger [Sun, 28 Jan 2007 06:58:44 +0000 (06:58 -0000)]
Paul Brook writes:
The patch below tweaks the ARM nommu startup code so that doubleword stack
alignment is preserved. This is required on EABI targets.
Mike Frysinger [Sun, 28 Jan 2007 06:55:56 +0000 (06:55 -0000)]
fix typo as pointed out by Tony Wu and cleanup source
Mike Frysinger [Sun, 28 Jan 2007 06:29:33 +0000 (06:29 -0000)]
dont rely on random stack state to trigger this issue; force the default stat structs to alternative bit masks
Mike Frysinger [Sun, 28 Jan 2007 06:18:24 +0000 (06:18 -0000)]
new test taken from stat issue with new tar
Mike Frysinger [Sun, 28 Jan 2007 05:37:54 +0000 (05:37 -0000)]
use .bz2 rather than .gz
Mike Frysinger [Sat, 27 Jan 2007 08:19:09 +0000 (08:19 -0000)]
fix from blackfin repo: Jie Zhang writes: update __kernel_ipc_pid_t, __kernel_uid_t and __kernel_gid_t types to match actual kernel types
Mike Frysinger [Sat, 27 Jan 2007 08:17:38 +0000 (08:17 -0000)]
fix from blackfin repo: Jie Zhang writes: Passing NULL as the second argument to utimes () if the second argument to utime () is NULL as the kernel will take care of getting/setting current time
Bernhard Reutner-Fischer [Fri, 26 Jan 2007 08:55:28 +0000 (08:55 -0000)]
- fix format of comment
Mike Frysinger [Fri, 26 Jan 2007 00:31:29 +0000 (00:31 -0000)]
dont actually have to worry about local changes as svn export takes care of that
Joakim Tjernlund [Fri, 26 Jan 2007 00:25:10 +0000 (00:25 -0000)]
Fix libdl bug reported by Cedric Hombourger in
http://uclibc.org/lists/uclibc/2007-January/017165.html
Mike Frysinger [Wed, 24 Jan 2007 10:09:41 +0000 (10:09 -0000)]
fix from Bryan Wu: return NULL upon error, not the NULL string
Peter Kjellerstedt [Mon, 22 Jan 2007 09:20:55 +0000 (09:20 -0000)]
Recognize _SC_MONOTONIC_CLOCK in sysconf() even if __NR_clock_getres
is not defined.
Bernhard Reutner-Fischer [Sun, 21 Jan 2007 10:46:53 +0000 (10:46 -0000)]
- repair misplaced #endif that got introduced in r17410. Fixes compilation.
"Steven J. Hill" [Sat, 20 Jan 2007 22:03:02 +0000 (22:03 -0000)]
Disable declarations for NPTL.
"Steven J. Hill" [Sat, 20 Jan 2007 20:40:53 +0000 (20:40 -0000)]
The case for _SC_MONOTONIC_CLOCK should only exist if 'clock_getres' does.
Bernhard Reutner-Fischer [Sat, 20 Jan 2007 18:32:10 +0000 (18:32 -0000)]
- Trim superfluous trailing whitespace. No obj-code changes.
Joakim Tjernlund [Thu, 11 Jan 2007 22:52:23 +0000 (22:52 -0000)]
I fixed that item long ago.
Joakim Tjernlund [Thu, 11 Jan 2007 22:39:13 +0000 (22:39 -0000)]
Peter Mazinger pointed out that my last commit was faulty.
This should fix it.
Mike Frysinger [Wed, 10 Jan 2007 22:18:39 +0000 (22:18 -0000)]
merge from blackfin.uclinux.org: Adjust
crt1.S so that __uClibc_main is called properly
Joakim Tjernlund [Wed, 10 Jan 2007 22:03:34 +0000 (22:03 -0000)]
Fix SEGV for static builds in exit() path.
Leave the now obsolete libc/misc/pthread dir in for now.
Mike Frysinger [Wed, 10 Jan 2007 17:46:19 +0000 (17:46 -0000)]
need to keep __check_rhosts_file exported for proper rhost control
Mike Frysinger [Wed, 10 Jan 2007 17:02:16 +0000 (17:02 -0000)]
sync with upstream blackfin.uclinux.org
Joakim Tjernlund [Tue, 9 Jan 2007 22:38:55 +0000 (22:38 -0000)]
Aurelien Jacobs writes:
After our last update a new compilation breakage appeared when compiling
gcc:
/home/aurel/geex/geexbox/build.i386/toolchain/i386-pc-linux-uclibc/sysroot/usr/include/bits/uClibc_stdio.h:346: error: expected initializer before 'attribute_hidden'
Some investigations revealed that the following changeset is responsible
for this breakage:
http://uclibc.org/cgi-bin/viewcvs.cgi/trunk/uClibc/libc/sysdeps/linux/common/bits/uClibc_stdio.h?rev=16801&r1=16793&r2=16801&diff_format=h
Reverting just one hunk of this changeset fixed the problem us.
I'm not sure this is the right fix, but please see attached patch.
Look good to me.
Joakim Tjernlund [Tue, 9 Jan 2007 22:30:16 +0000 (22:30 -0000)]
Joseph S. Myers writes:
ELF symbol names are arbitrary 0-terminated sequences of bytes, and the
ELF hash function is defined in the ELF specification to use unsigned
char. Thus uClibc's _dl_elf_hash, using plain char, breaks when char is
signed and symbol names contain bytes with the high bit set, as with GCC's
ucnid-* tests. This patch fixes this problem.
Joakim Tjernlund [Fri, 5 Jan 2007 10:20:37 +0000 (10:20 -0000)]
Support SecurePLTs for PowerPC. You need a toolchain that supports
config option --enable-secureplt. The assembler must also
supports R_PPC_REL16* relocations. gcc 4.1.1 and binutils 2.17
is known to do this.
Mike Frysinger [Fri, 5 Jan 2007 09:09:22 +0000 (09:09 -0000)]
Atle Nissestad writes: The attached patch fixes compilation of the current svn on the nios2 platform, and updates the crt1/n/i.S files to get CTOR/DTOR-support to work.
Bernhard Reutner-Fischer [Wed, 3 Jan 2007 22:53:41 +0000 (22:53 -0000)]
- s/Attemt/Attempt/
Bernhard Reutner-Fischer [Sat, 23 Dec 2006 14:12:40 +0000 (14:12 -0000)]
- r16732 forgot to checkin the sync of the __UCLIBC_SUSV3_LEGACY_MACROS__ from string.h
Bernhard Reutner-Fischer [Fri, 22 Dec 2006 14:03:06 +0000 (14:03 -0000)]
- provide a hidden_def for fputc_unlocked that is aliased to __fputc_unlocked.
Fixes undefined references to __fputc_unlocked when calling fputc().
Mike Frysinger [Wed, 20 Dec 2006 16:17:33 +0000 (16:17 -0000)]
make sure UCLIBC_LDSO can be found via path
Mike Frysinger [Wed, 20 Dec 2006 04:30:25 +0000 (04:30 -0000)]
Paul Brook writes:
When building an arm-uclinux toolchain withthreading disabled I get:
libc/stdio/getchar.c:26: error: 'getchar' aliased to undefined
symbol 'getchar_unlocked'
It looks like it's missing libc_hidden_def(getchar_unlocked). Patch below
fixes this.
Mike Frysinger [Sun, 17 Dec 2006 20:56:01 +0000 (20:56 -0000)]
rename local "brk" var so it doesnt namespace collide with the brk() function
Mike Frysinger [Sun, 17 Dec 2006 20:49:10 +0000 (20:49 -0000)]
for now, dont allow mmu users to select file format