summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-09-15sh/user.h: clean up conflicts from kernel user.hAndrew Stubbs
This patch makes sufficient modifications to the SH sys/user.h to be able to build and run gdbserver with Linux kernel 2.6.30. The problem is that both the kernel and library headers define the same symbols, thus making it impossible in include both headers. The patch undefines the kernel symbols in favour of the library symbols. Signed-off-by: Andrew Stubbs <ams@codesourcery.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-15daemon: fix up INTERNAL_SYSCALL() usageMike Frysinger
Make sure we declare the error properly in case a port uses it, and fix the invocation of exit(). Since clone() will be returning a pid, assume that the value will not have the MSB set (negative) to simplify the error test a bit more. If gcc supports it, force this function to always be heavily optimized in a bid to avoid stack usage as much as possible. Signed-off-by: James Coleman <james.coleman@ubicom.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-15setup attribute_optimize which comes with gcc-4.4+Mike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-14Revert "default ?conf to native arch"Bernhard Reutner-Fischer
This reverts commit 6625518cd6894338937a74ca6b9187b7b8167b03. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-09-09sparc/sigaction.c: note possible bugs by comments. style fixesDenys Vlasenko
no code is actually changed Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-09strsignal.c: whitespace fixes, no code changes (verified with objdump)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-08time.c: style cleanup. no code changes (verified with objdump)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-08simpler and shorter read_TZ_file() helperDenys Vlasenko
text data bss dec hex filename - 1109 8 76 1193 4a9 libc/misc/time/tzset.o + 1095 8 76 1179 49b libc/misc/time/tzset.o Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06docs/defines.txt: add a note about possibly obsolete __LDBL_COMPATDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06wordexp.c: cleanup - remove old hidden_proto's; remove unused parameterDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06wordexp.c: fix a bug where we might close stdoutDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06fstatat: fix up behavior on 32/64 bit hostsMike Frysinger
The fstatat() syscall is a little funky in that it sometimes changes name between 32 and 64 bit hosts, but it should always operate on a 64bit stat structure. So for the fstatat() function, make sure we convert it from a 64bit kstat to a 32bit stat. Along these lines, we need to restore the __xstat32_conv() function. Reported-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-06xstatconv: drop useless hidden codeMike Frysinger
The xstatconv.h header already sets up hidden prototypes for us, so no need to duplicate the code. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-06Revert "syscall.c: Use common syscall.c for ARM"Khem Raj
This reverts commit b1913a876059949e6c309bafade55e9425ef33fb. OABI is still a requirement. So we override the common syscall implementation specifically for arm port. Signed-off-by: Khem Raj <raj.khem@gmail.com>
2009-09-06md5 passwords: reduce static usageDenys Vlasenko
text data bss dec hex filename - 1875 0 120 1995 7cb libcrypt/md5.o + 1855 0 35 1890 762 libcrypt/md5.o Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06rexec.c: style fixes, no code chages (verified with objdump)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06rexec.c: small code shrinkDenys Vlasenko
text data bss dec hex filename - 1223 0 0 1223 4c7 libc/inet/rpc/rexec.o + 1214 0 0 2239 8bf libc/inet/rpc/rexec.o Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06comment out "int rexecoptions"; make "char ahostbuf[]" static (was hidden)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-05do not save/restore errno around free() callsDenys Vlasenko
In any non-buggy program free() does not fail. And when it fails in a buggy program, the failure is usually fatal (heap corruption and segfault). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-05do not pass 3rd param to open() which do not create filesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-05wtmp code: style fixes, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-05remove(): slight readabability tweak, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-05opensock: work correctly on IPv6-only configDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-05lckpwdf: remove a wrong comment and one write-only variableDenys Vlasenko
no code changes (verified with objdump) Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-05CLOEXEC: use open(CLOEXEC) if exist; do not check fcntl(FD_CLOEXEC) failureDenys Vlasenko
text data bss dec hex filename - 370 0 0 370 172 libc/misc/dirent/opendir.o + 366 0 0 366 16e libc/misc/dirent/opendir.o - 375 4 0 379 17b libc/pwd_grp/lckpwdf.o + 356 4 0 360 168 libc/pwd_grp/lckpwdf.o - 248 0 0 248 f8 librt/shm.o + 209 0 0 209 d1 librt/shm.o Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-05utent.c: fix a few bugs, and shrink a bitDenys Vlasenko
bug #1: static_fd = -1; close(static_fd); DOH! bug #2: if (utmp_fd == -1) { __setutent(); } if (utmp_fd == -1) { return NULL; } if utmp_fd == -1, we call _setutent(). if __setutent() opens a fd, utmp_fd (a parameter) wouldn't change, the second check is bogus. We need to use static_fd instead in second check. Which makes clear that having utmp_fd parameter is wrong. See the patch for a complete fix. Shrink comes from simplifying fcntl(static_fd, F_SETFD, FD_CLOEXEC): text data bss dec hex filename - 661 8 384 1053 41d libc/misc/utmp/utent.o + 604 8 384 996 3e4 libc/misc/utmp/utent.o Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-05math.h: fix trivial typo (missing !): !defined __NO_LONG_DOUBLE_MATHDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-31drop last _syscall6 checksMike Frysinger
If your arch does not support _syscall6(), it is broken anyways. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-08-30honour NO_LONG_DOUBLE_MATHBernhard Reutner-Fischer
This fixes compilation errors on hosts that turn off long double support for C99 like powerpc32. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-08-30Build posix_fadvice{64} only when UCLIBC_HAS_ADVANCED_REALTIME is set.Khem Raj
Right now for ARM, MIPS, Xtensa and powerpc posix_fadvise routines are included conditionally. They should only be enabled when UCLIBC_HAS_ADVANCED_REALTIME is set. Also fix code style in powerpc/posix_fadvise64.c Signed-off-by: Khem Raj <raj.khem@gmail.com>
2009-08-30Add posix_fadvise{64}.c routines to Makefile.archKhem Raj
Fix the argument types to operate on long and correct a typo. Signed-off-by: Khem Raj <raj.khem@gmail.com>
2009-08-30Add posix_fadvise and posix_fadvise64 for powerpcKhem Raj
The syscall is having different number of params and in one case the parameters are passed in differently. This patch add powerpc specific versions of these functions. Signed-off-by: Khem Raj <raj.khem@gmail.com>
2009-08-25default ?conf to native archBernhard Reutner-Fischer
Default is now the native arch, you can start a fresh .config via 'make ARCH=ia64 menuconfig'. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-08-25use CURDIRBernhard Reutner-Fischer
use CURDIR instead of spawning a separate shell as suggested by Mike. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-08-19use pwd, not PWDBernhard Reutner-Fischer
PWD may point to somewhere else if we're run from another make Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-08-17always define CONFIG_SHELLBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-08-17support building out-of-treeBernhard Reutner-Fischer
Handle O= Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-08-17add hidden aliases for newer regex search functionsBernhard Reutner-Fischer
Fixes 3575b741754b391a27e33bb1866bdb29131b7fea which only changed the old impl but not the new one. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-08-13m68k syscall: switch to common codeMaxim Kuvyrkov
Signed-off-by: Maxim Kuvyrkov <maxim@codesourcery.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-08-10define attribute_noreturnBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-08-05handle _SC_NPROCESSORS_CONF and _SC_NPROCESSORS_ONLNBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-08-05fix compilationBernhard Reutner-Fischer
wrong placed attribute_noreturn Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-08-04Fix daemon build for no-MMU no-threads.Joseph Myers
CLONE_VM (used in no-MMU daemon) is defined in <bits/sched.h>. A build with threads ends up including <sched.h> via <pthread.h> via <bits/uClibc_mutex.h>; this indirect include does not happen for a build without threads, so this patch adds a direct <sched.h> include. Signed-off-by: Joseph Myers <joseph@codesourcery.com>
2009-08-01ioperm is not used internally, remove hidden_protoBernhard Reutner-Fischer
Without a hidden_def we'd end up with __GI_ioperm which is wrong. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-08-01Makefile.in: Let make release or make dist to use git.Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2009-08-01Rules.mak: Fix references to svn.Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2009-08-01syscall.c: Use common syscall.c for ARMKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2009-08-01fnmatch.c: Include unistd.h before undefining _LIBC.Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2009-07-31fnmatch.c: Change scope of posixly_correct to be global.Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2009-07-30test_librt: Fix shmtest.c test caseCarmelo Amoroso
Fix wrong use of sizeof (array) to retrieve the number of elements; it was causing accessing beyond the array's boundaries. Below the output of the testcase showing an attempt to read beyond the array (actually 11 elements in size). root@amorosoc:/home/carmelo# ./shmtest Compare memory error : Offset 11, local 4262624, shm 224 Compare memory error : Offset 12, local 693493828, shm 68 Compare memory error : Offset 13, local 693489168, shm 16 Compare memory error : Offset 14, local 693826444, shm 20 ..... Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>