summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/sh/bits
AgeCommit message (Collapse)Author
2021-04-09open: Add support for O_TMPFILENicolas Cavallari
Since Linux 3.11, O_TMPFILE allows to create unnamed files that can be linked later on. It is internally defined as (O_TMPFILE | O_DIRECTORY) to make it fail on old kernels. Copying definitions from glibc for O_TMPFILE is not enough to support O_TMPFILE; The open() wrapper also need to pass the mode when the flag contains O_TMPFILE, otherwise, it will pass mode 000 which will succeed but yield unexpected results. openat() is curiously not affected since it passes the mode unconditionally.. Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
2021-02-19fcntl.h: Make F_DUPFD_CLOEXEC if _USE_XOPEN2K8Paul Cercueil
The F_DUPFD_CLOEXEC flag was added in POSIX 2008.09. Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2021-01-27sh: Add 64-bit time types from kernelGeoffrey Le GourriƩrec
Building uclibc 1.0.37 for SuperH architecture with linux-headers 5.10.7 fails at libpthread level due to missing time-related data structures, usually defined by the kernel. Define those missing data structures in SuperH-specific kernel_types.h. Context: building for sh4eb-r2d[1] and sh4-r2d[1] boards emulations for QEMU using the buildroot image generation tool. Regarding the issue, a patch[3] was already issued in the kernel some time ago, which aimed to solve precisely this problem. After coming up with a quick and dirty patch for buildroot modifying Linux headers[4], some discussion was sparked on the subject with Linux folks[5]. Some analyzing later, conclusion was that: 1) Previously mentioned patch[4] was fixing the symptom, not the ill 2) SuperH-specific code in uclibc could be patched instead, to solve the problem for other use cases (e.g. building just a toolchain) [1] https://git.buildroot.net/buildroot/tree/configs/qemu_sh4eb_r2d_defconfig?h=2020.02.9 [2] https://git.buildroot.net/buildroot/tree/configs/qemu_sh4_r2d_defconfig?h=2020.02.9 [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fc94cf2092c7c1267fa2deb8388d624f50eba808 [4] https://git.buildroot.net/buildroot/commit/?id=742f37de8d0e3797698411dfc6a63bd7e98aafe2 [5] https://patchwork.kernel.org/project/linux-sh/patch/20210123165652.10884-1-geoffrey.legourrierec@gmail.com/ Signed-off-by: Geoffrey Le GourriƩrec <geoffrey.legourrierec@gmail.com>
2020-07-02Rename __unused struct members to include a namespaceEd Wildgoose
Rename various spare fields in structs to include a namespace This should avoid accidental clashes with uses of the __unused symbol in upstream projects. eg currently it causes a compile error in dhcpcd 8.x due to their re-use of the __unused symbol as a macro This follows the style of glibc which does something equivalent
2020-02-03csky: add statx conditionalsWaldemar Brodkorb
Similar to glibc commit https://sourceware.org/git/?p=glibc.git;a=commit;h=6bbfc5c09fc5b5e3d4a0cddbbd4e2e457767dae7 we need to handle Linux kernel change, which removed stat64 family from default syscall set. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org> Signed-off-by: Waldemar Brodkorb <wbrodkorb@conet.de>
2018-02-03bits/mman.h: consolidate header fileWaldemar Brodkorb
Sync with GNU C library and consolidate duplicate non architecture specific defines. MAP_UNINITIALIZED is only defined to 0x4000000 and used by the Linux kernel when CONFIG_MMAP_ALLOW_UNINITIALIZED is enabled. CONFIG_MMAP_ALLOW_UNINITIALIZED is only available for nommu. See Documentation/nommu-mmap.txt.
2017-06-08fcntl.h: fixup namespace for O_DIRECTORY/O_NOFOLLOW/O_CLOEXECWaldemar Brodkorb
Sync with GNU C library. Found while trying to compile linux-rdma to uClibc-ng. Reported-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
2017-04-16libm: allow long double wrappers for all architecturesWaldemar Brodkorb
If you enable these wrappers, be sure you don't need long double precision on your embedded device, as these only enables long double warpper functions to the existing double math functions. Required to build some software as lvm2. Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2015-12-07add definitions for O_PATHWaldemar Brodkorb
Only alpha, hppa and sparc need non-default value.
2015-12-05remove __UCLIBC_ASM_GLOBAL_DIRECTIVE__Waldemar Brodkorb
.globl can be used for every architecture so remove the define. Sync with GNU C library.
2015-12-05remove __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__Waldemar Brodkorb
It's even no longer required for non-ported ppc64 architecture. Sync with GNU C library. This simplify the macros in include/libc-symbols.h.
2015-03-26SH: add 't' to syscall clobber listBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-25utmp: favour POSIX utmpx over SVID utmpBernhard Reutner-Fischer
Note: _PATH_UTMPX == _PATH_UTMP and the utmp struct is identical to the utmpx struct so this only changes the external API entrypoints and NOT the underlying data source. This saves about 500b (~1300b from previously ~1950) while at it. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-08-25fcntl.h: Define F_SETPIPE_SZ and F_GETPIPE_SZKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-04-01libc: rename TRUNCATE64_HAS_4_ARGS to SYSCALL_ALIGN_64BITMike Frysinger
The reason truncate64 takes 4 args on some arches is that their ABI requires 64bit values to be aligned on register pair boundaries. Since this alignment affects more than just truncate64, rename the define to properly document its purpose. This also allows us to expand it to the other impacted syscalls (which will be done in a follow up commit). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-11-18Replace FSF snail mail address with URLsMike Frysinger
This matches a similar change made to glibc. No functional changes here. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-10-02libc/sysdeps: add __kernel_long and __kernel_ulongChris Packham
Linux 3.4 added __kernel_long_t and __kernel_ulong_t and various exported header files were updated to use these new types. Add the definitions for __kernel_long_t and __kernel_ulong_t to the relevant kernel_types.h headers. This change was automated with the following scriptlet git grep --name-only 'typedef.*__kernel_old_dev_t' \ | xargs sed -i '/typedef.*__kernel_old_dev_t/ a\ typedef long\t\t__kernel_long_t;\ typedef unsigned long\t__kernel_ulong_t;' Whitespace in arm, avr32, hppa, sparc was then manually fixed up. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> -- Here's a cleaned up patch which should get the whitespace right. I'm a bit iffy about the sparc changes they make sense to me but it's not a platform I have access to. I can break this up per arch or per maintainer if requested. libc/sysdeps/linux/alpha/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/arm/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/avr32/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/bfin/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/c6x/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/cris/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/e1/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/h8300/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/hppa/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/i386/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/ia64/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/m68k/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/microblaze/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/mips/bits/kernel_types.h | 4 ++++ libc/sysdeps/linux/nios2/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/powerpc/bits/kernel_types.h | 4 ++++ libc/sysdeps/linux/sh/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/sh64/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/sparc/bits/kernel_types.h | 4 ++++ libc/sysdeps/linux/v850/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/x86_64/bits/kernel_types.h | 2 ++ libc/sysdeps/linux/xtensa/bits/kernel_types.h | 2 ++ 22 files changed, 50 insertions(+) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15cleanup bits/setjmp.h of stuff moved to jmpbuf-offsets.h and jmpbuf-unwind.hPeter S. Mazinger
Make sure we use the new jmpbuf-*.h headers While there, adapt the offset on microblaze and the _JMPBUF_UNWINDS macro on bfin, it seems, these were changed in the meantime. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-01-26*: silence some warningsBernhard Reutner-Fischer
warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-03-09bits/kernel_stat.h: no need for _LIBC guard, the file is not installed on targetPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2010-09-16nptl_sh: Fix compiler warning due to shadowed variableCarmelo Amoroso
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-06-24use uniform form of C99 keywordsBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-11-28Merge remote branch 'origin/master' into nptlAustin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-11-23bits/mmap.h: unify ala linux asm-generic effortsMike Frysinger
Most ports have the same exact mman bit defines, so let's unify things like the linux kernel has with the asm-generic efforts. A few ports are left behind as they are non-trivial to merge -- the arch maintainers can tackle it if they care. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-17whitespace fixesAustin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-10-17sh specific bits needed for nptlAustin Foxley
* unified atomic.h compare and exchange macros * clone.S with RESET_PID support * sh specific versions of pread/pwrite with cancellation support * check SHARED instead of PIC Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-10-14Fix SH bits/kernel_types.h for new kernel headers.Joseph Myers
Recent SH kernel headers merge 32-bit and 64-bit headers, changing the include guards on asm/posix_types.h in the process; update uClibc code depending on those include guards. Signed-off-by: Joseph Myers <joseph@codesourcery.com>
2009-10-07clean up O_CLOEXEC handlingMike Frysinger
Drop the "#ifndef O_CLOEXEC" cruft, enable O_CLOEXEC in most fcntl.h headers, and import __ASSUME_O_CLOEXEC from glibc. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-17always define float_t as floatBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
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-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-09syscall: unify part 2: NCS varietyMike Frysinger
Declare common NCS (non-constant syscall) variants and convert the existing ports over to this. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-08syscall: unify common syscall definesMike Frysinger
Unify all the common syscall defines in syscalls-common.h and scrub all the duplicated code from relevant ports. This should also make converting existing ports to INLINE_SYSCALL() much easier as they don't have to get lost in all the unrelated noise, as well as creating new ports. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-03uClibc_arch_features: sync defines between portsMike Frysinger
Make sure each arch has the same complete list to make comparing between them easier. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-02-23Use gcc built-in defines for detecting SH cores instead ofCarmelo Amoroso
uclibc config option macros (aligning SH to all other archs). Changes applied as below: __CONFIG_SH4__ -> __SH4__ __CONFIG_SH2__ -> __sh2__ __CONFIG_SH2A__ -> __SH2A__ Note: pay attention to capital letters Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2009-02-20Fix my previous commit to use preprocessor in the right way !Carmelo Amoroso
2009-02-20Fix typo.Carmelo Amoroso
2009-02-20sh: Fix __SH_SYSCALL_TRAP_BASE for SH2A architectureCarmelo Amoroso
Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk>
2008-11-27Make __UCLIBC_HAVE_ASM_CFI_DIRECTIVES__ visible in case the archCarmelo Amoroso
supports this feature. SH4 will use this in some aseembly files for the NPTL implementation. Add now safely on trunk. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2008-11-15- Remove linux-specific prototypes if asked to.Bernhard Reutner-Fischer
2008-11-15- revert wrong r24049Bernhard Reutner-Fischer
2008-11-15- Remove linux-specific prototypes if asked to.Bernhard Reutner-Fischer
2008-10-03- add long double math wrappers (Ned Ludd)Bernhard Reutner-Fischer
2008-09-25sh: Fix SYSCALL_INST_STRx to work for SH-2[A] core by using theCarmelo Amoroso
__SH_SYSCALL_TRAP_BASE macro. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2008-09-16Add INTERNAL_SYSCALL macros for shCarmelo Amoroso
2008-09-16- add sync_file_range()Bernhard Reutner-Fischer
Tested successfully on i386..
2008-07-23- trim any trailing whitespaceBernhard Reutner-Fischer
2008-07-23- fix asm and volatile keywordsBernhard Reutner-Fischer
2008-07-08sh4 don't need to cope with older RLIMIT implementation.Carmelo Amoroso
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2008-05-03- add missing #endifBernhard Reutner-Fischer