summaryrefslogtreecommitdiff
path: root/libc
AgeCommit message (Collapse)Author
2011-03-03guard IPv6 stuffPeter S. Mazinger
disable IPv6 related stuff if feature is disabled. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2011-02-25nptl:arm: add a wrapper for .cfi_sections pseudo-opsCarmelo Amoroso
ARM disables by default the support for ASM CFI directives. Anyway using an old version of binutils that does not support some new pseudo-op, the build fails as below: AS libpthread/nptl/sysdeps/unix/sysv/linux/close.oS libpthread/nptl/sysdeps/unix/sysv/linux/close.S: Assembler messages: libpthread/nptl/sysdeps/unix/sysv/linux/close.S:9: Error: unknown pseudo-op: `.cfi_sections' The problem is that the .cfi_sections pseudo should be wrapped by a macro that expands to nothing when the CFI is off. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> CC: Khem Ray <ray.khem@gmail.com>
2011-02-24unify stub logicMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-22bfin: fix fp reference in _JMPBUF_UNWINDSMike Frysinger
We want to access the frame pointer, so do so directly rather than "overflowing" the pregs array and ending up at the fp member. This fixes the Blackfin build warnings: libpthread/linuxthreads.old/ptlongjmp.c: In function 'pthread_cleanup_upto': libpthread/linuxthreads.old/ptlongjmp.c:35: warning: array subscript is above array bounds libpthread/linuxthreads.old/ptlongjmp.c:56: warning: array subscript is above array bounds Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-22tempname: fix int precision warningsMike Frysinger
The printf precision takes an integer, not a size_t. Otherwise we get: libc/misc/internals/tempname.c: In function '___path_search': libc/misc/internals/tempname.c:116: warning: field precision should have type 'int', but argument 3 has type 'size_t' field precision should have type 'int', but argument 5 has type 'size_t' Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-22nptl: imit waitpid just for MIPS O32Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-21bfin: add support for new cacheflush syscallSteve Kilbane
Newer gcc's will generate a call to cacheflush when updating jump tables, and that has to be done in kernel space (to avoid hardware anomalies). So make sure uClibc provides that symbol. Signed-off-by: Steve Kilbane <steve@whitecrow.demon.co.uk> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-21bfin: fix sram/dma syscall definitionsSteve Kilbane
Once we pull in the header, we're forced to declare the syscall with all the right types. Signed-off-by: Steve Kilbane <steve@whitecrow.demon.co.uk> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-21bfin: add missing GNU-stack markings to __longjmpMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-16buildsys: fix inverted logic with thread implsBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-14buildsys: use kbuild styleBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-14buildsys: remove wrong fileBernhard Reutner-Fischer
Somehow Makefile.in ended in there, remove it. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-14regex: remove set but not used variableBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-14nptl: fix typo in buildsysBernhard Reutner-Fischer
0f85b228 used 'filter-pout' instead of 'filter-out'. Fix that. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-11Fix GNU make v3.80 compatibilityKevin Cernekee
Commits 1f6601a and 094d82d introduced the "else ifeq" construct, which requires GNU make v3.81 or higher. This breaks the build on RHEL4 hosts. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-11arm: use CAS gcc builtin if SI-mode pattern is availableBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-09i386: extend IMA guards to also cover LTOBernhard Reutner-Fischer
See GCC PR47577; TODO: Remove them. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-09*printf: Violation of precision with null stringJones Desougi
When a string format is processed and the argument is NULL, this yields "(null)" regardless of precision. This does not make sense, precision should not be exceeded. A simple test shows that glibc outputs nothing if precision is smaller than six and the attached patch implements this same behaviour. Consider the not uncommon case of strings implemented like this: struct string { int len; char *ptr; }; There is often no nultermination and they may be printed like this: printf("%.*s", string.len, string.ptr); If len is 0 then ptr may be anything, but NULL is a common value. Obviously the empty string would be expected, not "(null)". Signed-off-by: Jones Desougi <jones.desougi@27m.se> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-09sync bits/socket.h PF_* / AF_* values with 2.6.38-rc3Peter Korsgaard
A number of new address / protocol families have been added over the years, so sync with Linux 2.6.38-rc3, adding CAN, ISDN, Phonet, Zigbee, .. which are starting to be used by applications. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-09arm: mv nptl specific atomic impl to common placeBernhard Reutner-Fischer
Thanks to Nitin Garg for notincing! Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-06fix a problem with hidden getutent in non-threaded buildsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-01nios2: Name architecture correctly in endian.h headerTobias Klauser
Nios II is not i386 :-) Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2011-01-29nptl/mips64: Fix build when using mips64 and ABIs other than o32Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2011-01-21stdio: fix diagnostic messageBernhard Reutner-Fischer
harmless copy'n paste error in #error Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-01-15cris: Fix build issuesKhem Raj
Thanks Waldemar Brodkorb for reporting Signed-off-by: Khem Raj <raj.khem@gmail.com>
2011-01-11syslog: fix 'everyone logs with user facility'Roman I Khimov
It's been found that on uclibc-based system most of the programs log with 'user' facility despite the calls to openlog() with other facilities explicitly set. Most but not all. Investigating that I've found that the ones logging with proper facilities used LOG_NDELAY in openlog(). The problem is that LogFacility is overwritten in openlog_intern and LOG_USER is passed to it from vsyslog() no matter what the program set with openlog(). Signed-off-by: Roman I Khimov <khimov@altell.ru> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-01-11__psfs_parse_spec: always use long int for %pBernhard Reutner-Fischer
closes bug #3037 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-01-01libc/inet/netlinkaccess.h: Use the types from kernelKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2010-12-27sparc: check for log double support in gccKonrad Eisele
To compile the quad float emulation library gcc needs __LONG_DOUBLE_128__ macro defined. Check first, if not supported then revert to the qp_ops.c stubs Signed-off-by: Konrad Eisele <konrad@gaisler.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
2010-12-17libm_sh: add optimised assembly implementation of lroundf and lrintfChristian Bruel
* libc/sysdeps/linux/sh/sysdep.h: Add LOCAL macro * libm/sh/sh4/Makefile.arch: Include asm source in the build * libm/sh/sh4/s_lrintf.S [NEW]: optimised asm lrintf * libm/sh/sh4/s_lroundf.S [NEW]: optimised asm lroundf Signed-off-by: Christian Bruel <christian.bruel@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-12-15sh_fpu: Do not allow inclusion of fpu_control on not SH4 coreCarmelo Amoroso
Instead of emitting a warning even when compiling for SH4, stop compilation with an #error directive when not on SH4 core. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-12-14sh: fix memcpy saving/restoring FR12-FR15 registersGiuseppe Cavallaro
This patch fixes a bug in the memcpy that doesn't save/restore the FR12-FR15 registers (callee save registers in ST40 ABI) while copying many cache lines with FPU in single paired precision mode and by using all FPU registers (DR and XD). Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Reviewed-by: Carmelo Amoroso <carmelo.amoroso@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-12-01libc: fix strtoqNatanael Copa
strtoq should always return a quad_t and be an alias of strtol on 64 bit and strtoll on 32 bit. Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-11-28libc_utmp: Fix getutmp and getutmpx for x86_64Carmelo Amoroso
On x86_64, when WORDSIZE_COMPAT32 is enabled, the ut_tv field of 'struct utmp' and 'struct utmpx' are defined as two nested structs instead of being defined as 'struct timeval', so it is not possible to directly assign the two ut_tv values. This patch split the assignment by setting each fields (tv_sec, tv_usec) of the ut_tv filed separately It is als compatible with 'struct timeval' usage. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-11-24libc: silence warningBernhard Reutner-Fischer
about implicit declaration of memset in system() Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-11-24wchar: bug #1471: fix cornercase in mbrtowcBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-11-23resolv.c fails for /etc/hosts lookupsPhilip Nye
Patch attached: Fix a bug in offset calculations when parsing /etc/hosts in resolv.c. Formerly a miscalculation meant that having found the correct line, the code was trashing its own result data. Signed-off-by: Philip Nye <philipn@engarts.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-11-18Adding quad float gcc intrinsic implementation for SPARCAustin Foxley
Sparc-Gcc generates q_xxx intrinsic calls for quad float ("long double") code. The routines from glibc's glibc-2.9/sysdeps/sparc/sparc32/soft-fp/* where taken and ported to uclibc. Signed-off-by: Konrad Eisele <konrad@gaisler.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-11-10microblaze: build infrastructureSteven J. Magnani
Fix Microblaze config and makefiles. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-11-10microblaze: thread supportSteven J. Magnani
Header files needed to build linuxthreads.old for microblaze. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-11-10microblaze: optimized memcpy/memmoveSteven J. Magnani
Port optimized memcpy/memmove from the kernel. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-11-10microblaze: misc headersSteven J. Magnani
Other header files for uClibc compilation. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-11-10microblaze: kernel headersSteven J. Magnani
Sync kernel header definitions with those used in recent mainline kernels. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-11-10microblaze: Restore soft-floatSteven J. Magnani
Software floating point for microblaze. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-11-10microblaze: vfork/clone interfaceSteven J. Magnani
Fix the microblaze vfork() and clone() implementations. Add support for clone2(). Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-11-10microblaze: syscall interfaceSteven J. Magnani
Fix the microblaze syscall interface. Recent mainline kernels no longer carry userland code to invoke syscalls and microblaze can use the uClibc generic code. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-11-10microblaze: Fix crt bootstrapSteven J. Magnani
Rework crt bootstrap to work with the new __uClibc_main(), and hardwire crt init/fini code since the awk approach to generating it on the fly doesn't work for microblaze. The output from the gcc 4.1.2 compiler is scrambled so that the tags expected by the awk script to bracket the init/fini entry and exit code no longer do. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-11-10microblaze: Fix setjmp/longjmpSteven J. Magnani
Some state and registers are missing from setjmp/longjmp handling. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-10-31libm: improve readability of math.h; expand comments and docsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-30sleep: include Linus' email in the commentDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>