summaryrefslogtreecommitdiffstats
path: root/libc/sysdeps/linux
Commit message (Collapse)AuthorAgeFilesLines
* warning fixesAustin Foxley2009-09-211-2/+0
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* sparc sigaction.c: fix the noted bugs by syncing up with glibcAustin Foxley2009-09-211-30/+16
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* guard sysdep-cancel.h include under defineAustin Foxley2009-09-201-0/+6
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* guard sysdep.h include with correct defineAustin Foxley2009-09-201-1/+1
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* remove a few more empty #if/#endif pairsDenys Vlasenko2009-09-182-7/+0
| | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* convert // comments to /**/; remove empty #if/#endif pairs. no code changesDenys Vlasenko2009-09-184-17/+11
| | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* trim Experimentally off and uncommented hiddenAustin Foxley2009-09-18140-221/+2
| | | | | | | | 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: Austin Foxley <austinf@cetoncorp.com>
* always define float_t as floatBernhard Reutner-Fischer2009-09-184-80/+4
| | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* sh/user.h: clean up conflicts from kernel user.hAndrew Stubbs2009-09-181-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* sparc/sigaction.c: note possible bugs by comments. style fixesDenys Vlasenko2009-09-181-49/+57
| | | | | | | no code is actually changed Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* fstatat: fix up behavior on 32/64 bit hostsMike Frysinger2009-09-184-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* xstatconv: drop useless hidden codeMike Frysinger2009-09-181-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Revert "syscall.c: Use common syscall.c for ARM"Khem Raj2009-09-183-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* accidently let arm's sigaction.c sneak in when merging d990ec5891dfAustin Foxley2009-09-031-1/+1
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* drop last _syscall6 checksMike Frysinger2009-09-032-2/+2
| | | | | | | If your arch does not support _syscall6(), it is broken anyways. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* honour NO_LONG_DOUBLE_MATHBernhard Reutner-Fischer2009-09-0318-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Build posix_fadvice{64} only when UCLIBC_HAS_ADVANCED_REALTIME is set.Khem Raj2009-09-035-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Add posix_fadvise{64}.c routines to Makefile.archKhem Raj2009-09-032-7/+7
| | | | | | | | Fix the argument types to operate on long and correct a typo. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Add posix_fadvise and posix_fadvise64 for powerpcKhem Raj2009-09-032-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* support building out-of-treeBernhard Reutner-Fischer2009-08-192-2/+3
| | | | | | | Handle O= Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* m68k syscall: switch to common codeMaxim Kuvyrkov2009-08-193-204/+69
| | | | | | Signed-off-by: Maxim Kuvyrkov <maxim@codesourcery.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* handle _SC_NPROCESSORS_CONF and _SC_NPROCESSORS_ONLNBernhard Reutner-Fischer2009-08-191-0/+5
| | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* ioperm is not used internally, remove hidden_protoBernhard Reutner-Fischer2009-08-191-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* force arches to provide sys/user.hMike Frysinger2009-08-191-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* add missing UTIME_* defines for *at funcsMike Frysinger2009-08-1911-10/+64
| | | | | | | I always forget that many arches have their own bits/stat.h ... Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* enable nanosecond stat support for everyoneMike Frysinger2009-08-1935-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* enable sbrk() for everyoneMike Frysinger2009-08-191-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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* add missing UTIME_* defines for *at funcsMike Frysinger2009-08-191-1/+6
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Blackfin: fix incorrect attribute orderMike Frysinger2009-08-191-1/+1
| | | | | | | | | | | | | | | | | | The order of attributes in a function definition matters and in a few places in the Blackfin code, it was being applied to the return type instead of the function itself. In file included from ldso/ldso/ldso.c:43: ldso/ldso/bfin/elfinterp.c: At top level: ldso/ldso/bfin/elfinterp.c:42: warning: '__visibility__' attribute ignored on non-class types In file included from ldso/ldso/bfin/elfinterp.c:341, from ldso/ldso/ldso.c:43: libc/sysdeps/linux/bfin/crtreloc.c: At top level: libc/sysdeps/linux/bfin/crtreloc.c:91: warning: 'visibility' attribute ignored on non-class types Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* create real common vfork() functionMike Frysinger2009-08-193-28/+14
| | | | | | | | | | Rather than force people to always implement their own vfork(), have the default implementation be sane. For now, only the Blackfin port uses the new code. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Blackfin: fix typo in byteswap.h commitMike Frysinger2009-08-191-1/+1
| | | | | | | | 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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Blackfin: no need to load P5 for shared FLATJie Zhang2009-08-191-1/+0
| | | | | | | | The register is already loaded for us upon entry by the kernel. Signed-off-by: Jie Zhang <jie.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Blackfin: fix generation of Scrt1.o for FDPICJie Zhang2009-08-191-1/+1
| | | | | | Signed-off-by: Jie Zhang <jie.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Blackfin: unify FDPIC/FLAT versions of cloneMike Frysinger2009-08-191-22/+8
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* add hidden aliases for openat funcsMike Frysinger2009-08-192-0/+14
| | | | | | | openat64() uses openat(), so we need hidden aliases for it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* It fixes the following warnings seen on mips build.Khem Raj2009-08-193-8/+20
| | | | | | | | | | | | libc/sysdeps/linux/mips/clone.S: Assembler messages: libc/sysdeps/linux/mips/clone.S:122: Warning: No .frame pseudo-op used in PIC code libc/sysdeps/linux/mips/clone.S:75: Warning: Pretending global symbol used as branch target is local. libc/sysdeps/linux/mips/crt1.S: Assembler messages: libc/sysdeps/linux/mips/crt1.S:134: Warning: No .cprestore pseudo-op used in PIC code Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* byteswap: unify common definitionsMike Frysinger2009-08-1910-632/+242
| | | | | | | | | | The majority of the byteswap functions are the same across all arches, so setup a common header to provide definitions if they don't exist. This allows arches to override only the ones they actually want to implement with inline assembly. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* s/UCLIBC_INTERNAL/_LIBC/gDenys Vlasenko2009-08-192-3/+3
| | | | | | | | | | | Undo my old mistake. I added UCLIBC_INTERNAL define, but later I realized _LIBC is doing exactly the same thing. This change converts all usages of UCLIBC_INTERNAL to _LIBC, removing all instances of UCLIBC_INTERNAL. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* avr32/microblaze/vax: punt local byteswap.hMike Frysinger2009-08-193-175/+0
| | | | | | | | These arches are generic C implementations of the byteswap functions, so rather than keep a useless local copy, use the common C one. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* syscall: convert cris/hppa to common syscallsMike Frysinger2009-08-193-140/+19
| | | | | | | | The cris/hppa code appears to be easy to convert, so go ahead and do it for them. Build tested only. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* some ports define ENOTSUPMike Frysinger2009-08-191-1/+3
| | | | | | | | A port or two (like hppa) does define ENOTSUP, so don't assume that everyone needs this fallback define. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* INLINE_SYSCALL_NCS: scope out local vars to avoid conflictsMike Frysinger2009-08-191-6/+6
| | | | | | | | | | | | The INLINE_SYSCALL_NCS() macro was using "res" and "err" as local variable names, but this caused conflicts with some code (like clock_getres) whose arguments were named the same. libc/sysdeps/linux/common/clock_getres.c: In function 'clock_getres': libc/sysdeps/linux/common/clock_getres.c:15: warning: 'res' is used uninitialized in this function Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* alpha: fix building with no asm/elf.hMike Frysinger2009-08-191-1/+14
| | | | | | | | The latest sanitized linux kernel headers no longer export asm/elf.h, so do not rely on it anymore. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* alpha/sigprocmask: fix implicit memset() prototypeMike Frysinger2009-08-191-0/+1
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* first pass at implementing *at funcsMike Frysinger2009-08-1917-0/+321
| | | | | | | | Tested basic functionality with coreutils and things seem to work. At least gives us a basis to jump from. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* fdatasync: handle latest alpha syscallsMike Frysinger2009-08-191-1/+1
| | | | | | | | The latest alpha Linux kernel defines __NR_fdatasync like everyone else and deprecates the older __NR_osf_fdatasync, so support that setup. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* mknod: convert to INLINE_SYSCALL() to sync with glibcMike Frysinger2009-08-191-12/+6
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* fix typo in frv endian commentMike Frysinger2009-08-191-1/+1
| | | | | | Reported-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* ppoll: switch to INLINE_SYSCALL() to match glibcMike Frysinger2009-08-191-11/+2
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Fix ARM syscall argument loading.Joseph Myers2009-08-191-14/+21
| | | | | | | | | | | | This patch is a uClibc equivalent of <http://sourceware.org/ml/libc-ports/2008-11/msg00006.html>, to compute all syscall arguments on ARM in temporary variables before loading them into register variables. The principle is as for that glibc patch; the problem I actually observed was a GCC internal compiler error building ld.so for Thumb-2. Signed-off-by: Joseph Myers <joseph@codesourcery.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>