summaryrefslogtreecommitdiffstats
path: root/libc
Commit message (Collapse)AuthorAgeFilesLines
...
* remove a few more empty #if/#endif pairsDenys Vlasenko2009-09-1911-36/+8
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* convert // comments to /**/; remove empty #if/#endif pairs. no code changesDenys Vlasenko2009-09-1852-214/+64
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* trim Experimentally off and uncommented hiddenBernhard Reutner-Fischer2009-09-18482-1837/+7
| | | | | | | | 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>
* fix make {,install_}{,host}utilsBernhard Reutner-Fischer2009-09-181-209/+46
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* always define float_t as floatBernhard Reutner-Fischer2009-09-174-80/+4
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* sh/user.h: clean up conflicts from kernel user.hAndrew Stubbs2009-09-151-0/+11
| | | | | | | | | | | | 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>
* daemon: fix up INTERNAL_SYSCALL() usageMike Frysinger2009-09-151-4/+6
| | | | | | | | | | | 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>
* sparc/sigaction.c: note possible bugs by comments. style fixesDenys Vlasenko2009-09-091-49/+57
| | | | | | no code is actually changed Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* strsignal.c: whitespace fixes, no code changes (verified with objdump)Denys Vlasenko2009-09-091-21/+17
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* time.c: style cleanup. no code changes (verified with objdump)Denys Vlasenko2009-09-081-89/+37
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* simpler and shorter read_TZ_file() helperDenys Vlasenko2009-09-081-10/+23
| | | | | | | | 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>
* wordexp.c: cleanup - remove old hidden_proto's; remove unused parameterDenys Vlasenko2009-09-061-42/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* wordexp.c: fix a bug where we might close stdoutDenys Vlasenko2009-09-061-5/+8
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fstatat: fix up behavior on 32/64 bit hostsMike Frysinger2009-09-064-2/+32
| | | | | | | | | | | | 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>
* xstatconv: drop useless hidden codeMike Frysinger2009-09-061-4/+2
| | | | | | | 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>
* Revert "syscall.c: Use common syscall.c for ARM"Khem Raj2009-09-063-0/+129
| | | | | | | | 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>
* rexec.c: style fixes, no code chages (verified with objdump)Denys Vlasenko2009-09-061-44/+23
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* rexec.c: small code shrinkDenys Vlasenko2009-09-061-2/+6
| | | | | | | | 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>
* comment out "int rexecoptions"; make "char ahostbuf[]" static (was hidden)Denys Vlasenko2009-09-061-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* do not save/restore errno around free() callsDenys Vlasenko2009-09-053-19/+10
| | | | | | | | 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>
* do not pass 3rd param to open() which do not create filesDenys Vlasenko2009-09-051-12/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* wtmp code: style fixes, no code changesDenys Vlasenko2009-09-051-18/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* remove(): slight readabability tweak, no code changesDenys Vlasenko2009-09-051-5/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* opensock: work correctly on IPv6-only configDenys Vlasenko2009-09-051-9/+9
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* lckpwdf: remove a wrong comment and one write-only variableDenys Vlasenko2009-09-051-5/+1
| | | | | | no code changes (verified with objdump) Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* CLOEXEC: use open(CLOEXEC) if exist; do not check fcntl(FD_CLOEXEC) failureDenys Vlasenko2009-09-053-44/+42
| | | | | | | | | | | | 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>
* utent.c: fix a few bugs, and shrink a bitDenys Vlasenko2009-09-051-47/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* math.h: fix trivial typo (missing !): !defined __NO_LONG_DOUBLE_MATHDenys Vlasenko2009-09-051-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* drop last _syscall6 checksMike Frysinger2009-08-312-2/+2
| | | | | | If your arch does not support _syscall6(), it is broken anyways. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* honour NO_LONG_DOUBLE_MATHBernhard Reutner-Fischer2009-08-3018-19/+81
| | | | | | | | 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>
* Build posix_fadvice{64} only when UCLIBC_HAS_ADVANCED_REALTIME is set.Khem Raj2009-08-305-9/+22
| | | | | | | | | 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>
* Add posix_fadvise{64}.c routines to Makefile.archKhem Raj2009-08-302-7/+7
| | | | | | | Fix the argument types to operate on long and correct a typo. Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Add posix_fadvise and posix_fadvise64 for powerpcKhem Raj2009-08-302-0/+106
| | | | | | | | | 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>
* support building out-of-treeBernhard Reutner-Fischer2009-08-1739-2/+77
| | | | | | Handle O= Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* add hidden aliases for newer regex search functionsBernhard Reutner-Fischer2009-08-171-0/+2
| | | | | | | Fixes 3575b741754b391a27e33bb1866bdb29131b7fea which only changed the old impl but not the new one. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* m68k syscall: switch to common codeMaxim Kuvyrkov2009-08-133-204/+69
| | | | | Signed-off-by: Maxim Kuvyrkov <maxim@codesourcery.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* handle _SC_NPROCESSORS_CONF and _SC_NPROCESSORS_ONLNBernhard Reutner-Fischer2009-08-052-12/+17
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Fix daemon build for no-MMU no-threads.Joseph Myers2009-08-041-0/+1
| | | | | | | | | 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>
* ioperm is not used internally, remove hidden_protoBernhard Reutner-Fischer2009-08-011-1/+3
| | | | | | 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>
* syscall.c: Use common syscall.c for ARMKhem Raj2009-08-013-129/+0
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* fnmatch.c: Include unistd.h before undefining _LIBC.Khem Raj2009-08-011-2/+9
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* fnmatch.c: Change scope of posixly_correct to be global.Khem Raj2009-07-311-1/+1
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* build: Include Makefile.commonarch from common Makefile.inCarmelo Amoroso2009-07-2920-38/+1
| | | | | | | | 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>
* remove erroneous ';'Bernhard Reutner-Fischer2009-07-282-4/+4
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* force arches to provide sys/user.hMike Frysinger2009-07-261-1/+1
| | | | | | | 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>
* add missing UTIME_* defines for *at funcsMike Frysinger2009-07-2611-10/+64
| | | | | | I always forget that many arches have their own bits/stat.h ... Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* enable nanosecond stat support for everyoneMike Frysinger2009-07-2635-409/+292
| | | | | | | | | | | | | 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>
* enable sbrk() for everyoneMike Frysinger2009-07-261-4/+0
| | | | | | | | | 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>
* add missing UTIME_* defines for *at funcsMike Frysinger2009-07-261-1/+6
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* fix dl_iterate_phdr() for FDPIC systemsMike Frysinger2009-07-231-0/+5
| | | | | | | 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>