summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/sparc/bits
AgeCommit message (Collapse)Author
2024-03-01libc: Remove 32bit timespec structures everywhere.Dmitry Chestnykh
With time64 enabled we use statx() system call and the appropriate routines for results conversion. There is no need in `__ts32_struct` anymore. Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
2024-02-29Add time64 support for sparc.Dmitry Chestnykh
By some reason sparc ld.so cannot work properly with statx() system call, so fallback to regular stat() family in ld.so. Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
2023-11-17rlimit: fix 64-bit RLIM64_INFINITY macroPavel Kozlov
Linux kernel returns -1ULL as RLIM64_INFINITY for all cpus. Fix RLIM64_INFINTIY and 64-bit variant of RLIM_INFINITY macro for sparc, mips, alpha, as for these CPUs the library uses different value than what the kernel sets and it can cause incorrect RLIM64_INFINTY check. Because alpha is a 64-bit arch, fix the RLIM_INFINITY macro twice (the value should be the same with and without __USE_FILE_OFFSET64 definition) to match the prlimit64 syscall in the kernel. Previous implementation of setrlimit/getrlimit functions didn't use prlimit64 syscall and didn't receive RLIM64_INFINTIY from the kernel, RLIM64_INFINTY macro was used by the library itself to mimic the 64-bit rlimit in the getrlimit64/setrlimit64 functions, that allowed to have RLIM64_INFINTIY different from what the kernel sets. New implementation of setrlimit/getrlimit uses prlimit64 and checks for RLIM64_INFINITY value and must have equal RLIM64_INFINITY definition with what the kernel uses. This issue is indicated by the tst-rlim/tst-rlim64 tests on sparc/mips32/alpha, tests return 23 (UNSUPPORTED) because of incorrect RLIM_INFINTY check for available rlimit type. This patch will require rebuild of sparc/mips32/alpha binaries that explicitly use RLIM64_INFINTY or 64-bit variant of RLIM_INFINITY (if binary for 32-bit CPU was built with _FILE_OFFSET_BITS=64) to update the macro value. Signed-off-by: Pavel Kozlov <pavel.kozlov@synopsys.com>
2022-08-08resource.h: add missing RUSAGE_THREADWaldemar Brodkorb
There is a real-world usage of RUSAGE_THREAD by the pistache project, https://github.com/oktal/pistache. Reported-By: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-05-20define RLIMIT_RTTIME, bump RLIMIT_NLIMITSRomain Naour
This macro exists since Linux 2.6.25 [1] and is defined in glibc since 2.14 [2] for sparc and most supported architectures. RLIMIT_RTTIME has been added later for mips [3] and alpha [4]. For example, RLIMIT_RTTIME is needed to build qemu 7.0.0 with Linux user-land emulation support [5]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=78f2c7db6068fd6ef75b8c120f04a388848eacb5 [2] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=67f86a251e0d36107fe28999281d46e76941c7b9 [3] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=8969f4df1a526aa60dd0bc1c4736cf02104d4a05 [4] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=53c2cb7641bd866398156625ef672bbd2d78a0d8 [5] https://git.qemu.org/?p=qemu.git;a=commitdiff;h=244fd08323088db73590ff2317dfe86f810b51d7 Signed-off-by: Romain Naour <romain.naour@gmail.com>
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>
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>
2019-05-27sparc: remove asm constraintRomain Naour
uClibc-ng don't build with gcc 9.1 [1] due to a new check that "catch illegal asm constraint usage" [2]. gcc 9.1 print this error: "invalid hard register usage between earlyclobber operand and input operand" The asm constraint is present in uClibc since it support sparc (back in 2002)[3]. Note: There is no such constraint is Glibc counterpart code [4]. [1] https://gitlab.com/kubu93/toolchains-builder/-/jobs/205435757 [2] https://github.com/gcc-mirror/gcc/commit/b782636f28f5c378897c238081d28d7a4a6ca578 [3] https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=3b6d086531102b6d09ce852feb1e370d5dca3ce9 [4] +https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/sparc/sysdep.h;h=981b2a26b7a91093f821c97876 +e55bc4be2d9f8a;hb=HEAD
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-05-24sparc: cleanup sparc64 bits and unused soft-fpWaldemar Brodkorb
Remove a lot of unused 64 Bit header stuff.
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-06-10siginfo: add signal info for seccomp related SIGSYSDaniel Golle
uClibc doesn't define signal info for the SIGSYS signal which is issued in case of hitting a syscall prohibited by seccomp. This is sad as it makes debugging seccomp filter policies impossible on some architectures (at least ARM and PowerPC, maybe also others) which do not coincidentally set si_value.sival_int as the syscall number. To fix this, import the definitions and macros needed from glibc. Signed-off-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-24libc: TIME64_COMPAT32 for sparc, mipsBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-17Add eventfd_read() and eventfd_write()Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-09-04sparc: remove sparc64/sparcv9 codeWaldemar Brodkorb
The sparc64/sparcv9 code is incomplete. Furthermore there is no real embedded hardware for sparc64 available, so better remove it until someone comes up with a complete port. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org> 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>
2014-08-25mathinline.h: Use __extern_inlineBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-01-08siginfo.h: add a missing function member on ia64, mips and sparc archesVicente Olivert Riera
Add "__pid_t _tid" member which is used for some packages, like rt-test for instance, which fails with an error like this one: src/cyclictest/cyclictest.c:638:9: error: 'union <anonymous>' has no member named '_tid' Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-06-07eventfd.h: Use new "bits/" scheme for arch-specific flagsHiroaki KAWAI
As in timerfd.h, eventfd.h needs arch-specific definition files. alpha, mips and sparc needs separate file, all the other arch will use common definition. This problem is already fixed in glibc. Also sanitize and provide bits for hppa. Make sure not to install the new bits/eventfd unless eventfd support is enabled. Signed-off-by: Hiroaki KAWAI <kawai@stratosphere.co.jp> 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>
2013-03-14libc: switch several users to unlikely()Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-05mman: rename MAP_UNINITIALIZE to MAP_UNINITIALIZEDBernhard Reutner-Fischer
The name was changed to include a trailing 'D' when it went into the kernel. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-01-17socket.h: pull socket_type.h from eglibcBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-11-18drop support for pre ISO-C compilersMike Frysinger
This drops __signed, __volatile, and __const. Only the latter was used in the code base, and for uClibc, not consistently. Much of the code used plain "const" which meant "__const" was useless. Really, the point of this is to stay in sync with what glibc did. 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-15huge_vall.h: add for i386,ia64,m68k,sparcPeter S. Mazinger
relevant only for gcc < 3.3 or non-gcc compiler Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15local_lim.h: add NPTL version for alpha,ia64,powerpc,sparc, update commonPeter S. Mazinger
avoid the possibility to use the wrong bits/local_lim.h uClibc_local_lim.h fix it be correct for LT Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> 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-04-28epoll.h: sync with glibcMike Frysinger
Since glibc has split out arch-specific stuff to bits/epoll.h, we can pull that sanity back into our tree and drop the arch ifdefs. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-08signalfd.h: Use new "bits/" scheme for arch-specific flagsKevin Cernekee
glibc has split off the arch-specific flag definitions (like SFD_NONBLOCK) into <arch>/bits/signalfd.h, so that there are no longer multiple redundant copies of the entire header file. We will adopt the same scheme in uClibc. Special cases are included for: alpha mips sparc hppa was omitted because it has not been updated in glibc. All others use the common definition. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-08timerfd.h: Use new "bits/" scheme for arch-specific flagsKevin Cernekee
glibc has split off the arch-specific flag definitions (like TFD_NONBLOCK) into <arch>/bits/timerfd.h, so that there are no longer multiple redundant copies of the entire header file. We will adopt the same scheme in uClibc. Special cases are included for: alpha mips sparc hppa was omitted because it has not been updated in glibc. All others use the common definition. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-08inotify.h: Use new "bits/" scheme for arch-specific flagsKevin Cernekee
glibc has split off the arch-specific flag definitions (like IN_NONBLOCK) into <arch>/bits/inotify.h, so that there are no longer multiple redundant copies of the entire header file. We will adopt the same scheme in uClibc. Special cases are included for: alpha mips sparc hppa was omitted because it has not been updated in glibc. All others use the common definition. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
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/statvfs.h: the common one is good for alpha and sparcPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
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>
2011-03-03remove ucontext.h and guard sigstack structure with SUSV4_LEGACY and ↵Peter S. Mazinger
STRICT_HEADERS Remove ucontext.h if SUSV4_LEGACY is not set and fix it's references. Guard sigstack structure with SUSV4_LEGACY and STRICT_HEADERS. Disable sigstack function prototype, it is not provided by uClibc. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
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>
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-23nommu: use MAP_UNINITIALIZE for mallocsMike Frysinger
Now that the kernel supports MAP_UNINITIALIZE, have the malloc places use it to get real uninitialized memory on no-mmu systems. This avoids a lot of normally useless overhead involved in zeroing out all of the memory (sometimes multiple times). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-17sparc specific bits needed for nptlAustin Foxley
* a tweaked clone.S with RESET_PID support * atomic.h with cmpxchg that works for v8 and beyond Signed-off-by: Austin Foxley <austinf@cetoncorp.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-25sparc specific bits/socket.hAustin Foxley
use socketcall for sparc32 since it does not have the individual socket syscalls Signed-off-by: Austin Foxley <austinf@cetoncorp.com>