summaryrefslogtreecommitdiff
path: root/libc
AgeCommit message (Collapse)Author
2009-09-18convert // comments to /**/; remove empty #if/#endif pairs. no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-18trim Experimentally off and uncommented hiddenBernhard Reutner-Fischer
sed -i -e '/Experimentally off - /d' $(grep -rl "Experimentally off - " *) sed -i -e '/^\/\*[[:space:]]*libc_hidden_proto(/d' $(grep -rl "libc_hidden_proto" *) should be a nop Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-09-18fix make {,install_}{,host}utilsBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-09-17always define float_t as floatBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
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-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-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-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-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-05handle _SC_NPROCESSORS_CONF and _SC_NPROCESSORS_ONLNBernhard Reutner-Fischer
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-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-29build: Include Makefile.commonarch from common Makefile.inCarmelo Amoroso
Avoid including akefile.commonarch in each Makefile.arch. Include it instead from Makefile.in just after the arch specific Makefile.arch Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2009-07-28remove erroneous ';'Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-07-26force arches to provide sys/user.hMike Frysinger
Now that Linux is no longer installing linux/user.h, arches will have to provide their own. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-26add missing UTIME_* defines for *at funcsMike Frysinger
I always forget that many arches have their own bits/stat.h ... Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-26enable nanosecond stat support for everyoneMike Frysinger
Fill out the stat structure so that the nanosecond resolution support is always available. There is a small code size increase for a few ports (three additional assignments in xstatconv), but otherwise everything should remain the same. While we're here, punt __old_kernel_stat from the few headers that still define it as it is unused in uClibc and causes compile errors after these nanosecond changes. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-26enable sbrk() for everyoneMike Frysinger
The sbrk() function can be used to merely query sizes and for that, no-mmu works the same as mmu. It can also sometimes increase data segments on no-mmu systems provided the trailing memory is free. So, there is no real reason to exclude this function for no-mmu ports. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-26add missing UTIME_* defines for *at funcsMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-23fix dl_iterate_phdr() for FDPIC systemsMike Frysinger
The dlpi_addr isn't a simple Elf_Addr type for FDPIC systems, so we can't just assign 0 to it to initialize. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-23Blackfin: fix typo in byteswap.h commitMike Frysinger
The Blackfin port hasn't been compiling cleanly, so this typo was missed in the byteswap unification commit. Signed-off-by: Mike Frysinger <vapier@gentoo.org>