search for: __byte_order

Displaying 17 results from an estimated 17 matches for "__byte_order".

2023 Jan 14
1
[klibc:time64] time: Use 64-bit time types on all architectures
...3:03, klibc-bot for Ben Hutchings wrote: > > #include <klibc/extern.h> > +#include <klibc/endian.h> > #include <stddef.h> > #include <sys/types.h> > -#include <linux/time.h> > + > +struct timespec { > + __kernel_time64_t tv_sec; > +#if __BYTE_ORDER == __BIG_ENDIAN && __BITS_PER_LONG == 32 > + long __tv_pad; > +#endif > + long tv_nsec; > +#if __BYTE_ORDER == __LITTLE_ENDIAN && __BITS_PER_LONG == 32 > + long __tv_pad; > +#endif > +}; The problem with this definition is applications doing things like...
2017 Feb 13
2
[PATCH] Enable specific ioctl calls for ICA crypto card (s390)
...d.h> +#include <endian.h> + +#ifdef __s390__ +#include <asm/zcrypt.h> +#endif #include "log.h" #include "ssh-sandbox.h" @@ -74,6 +79,13 @@ #endif /* SANDBOX_SECCOMP_FILTER_DEBUG */ /* Simple helpers to avoid manual errors (but larger BPF programs). */ +#if __BYTE_ORDER == __LITTLE_ENDIAN +#define LO_ARG(idx) offsetof(struct seccomp_data, args[(idx)]) +#elif __BYTE_ORDER == __BIG_ENDIAN +#define LO_ARG(idx) offsetof(struct seccomp_data, args[(idx)]) + sizeof(_u32) +#else +#error "Unknown endianness" +#endif #define SC_DENY(_nr, _errno) \ BPF_JUMP(BPF_...
2023 Jan 14
1
[klibc:time64] time: Use 64-bit time types on all architectures
...usr/include/sys/time.h +++ b/usr/include/sys/time.h @@ -6,9 +6,63 @@ #define _SYS_TIME_H #include <klibc/extern.h> +#include <klibc/endian.h> #include <stddef.h> #include <sys/types.h> -#include <linux/time.h> + +struct timespec { + __kernel_time64_t tv_sec; +#if __BYTE_ORDER == __BIG_ENDIAN && __BITS_PER_LONG == 32 + long __tv_pad; +#endif + long tv_nsec; +#if __BYTE_ORDER == __LITTLE_ENDIAN && __BITS_PER_LONG == 32 + long __tv_pad; +#endif +}; + +struct timeval { + __kernel_time64_t tv_sec; + __kernel_suseconds_t tv_usec; +}; + +struct timeval_ol...
2016 Jan 06
0
[klibc:master] Add pread and pwrite 32bit syscall wrappers for parisc
...| 29 +++++++++++++++++++++++++++++ 5 files changed, 69 insertions(+), 2 deletions(-) diff --git a/usr/include/endian.h b/usr/include/endian.h index a6cd6d9..61cda3a 100644 --- a/usr/include/endian.h +++ b/usr/include/endian.h @@ -12,4 +12,10 @@ #define PDP_ENDIAN __PDP_ENDIAN #define BYTE_ORDER __BYTE_ORDER +#if __BYTE_ORDER == __LITTLE_ENDIAN +# define __LONG_LONG_PAIR(HI, LO) LO, HI +#elif __BYTE_ORDER == __BIG_ENDIAN +# define __LONG_LONG_PAIR(HI, LO) HI, LO +#endif + #endif /* _ENDIAN_H */ diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild index 40d43c7..d3e2b9f 100644 --- a/usr/klibc/Kbuild +...
2015 Feb 12
0
Re: [PATCH 1/3] macosx: Includes/defines for byteswap operations
...AVE_BE32TOH) && !defined(be32toh) > + > +#if defined __APPLE__ && defined __MACH__ > +/* Define/include necessary items on MacOS X */ > +#include <machine/endian.h> > +#define __BIG_ENDIAN BIG_ENDIAN > +#define __LITTLE_ENDIAN LITTLE_ENDIAN > +#define __BYTE_ORDER BYTE_ORDER > +#include <libkern/OSByteOrder.h> > +#define __bswap_32 OSSwapConstInt32 > +#endif /* __APPLE__ */ > + > #if __BYTE_ORDER == __LITTLE_ENDIAN > #define be32toh(x) __bswap_32 (x) > #else > diff --git a/src/inspect-fs-windows.c b/src/inspect-fs-win...
2015 Feb 12
8
[PATCH 1/3] macosx: Includes/defines for byteswap operations
...oh for RHEL 5. */ #if !defined(HAVE_BE32TOH) && !defined(be32toh) + +#if defined __APPLE__ && defined __MACH__ +/* Define/include necessary items on MacOS X */ +#include <machine/endian.h> +#define __BIG_ENDIAN BIG_ENDIAN +#define __LITTLE_ENDIAN LITTLE_ENDIAN +#define __BYTE_ORDER BYTE_ORDER +#include <libkern/OSByteOrder.h> +#define __bswap_32 OSSwapConstInt32 +#endif /* __APPLE__ */ + #if __BYTE_ORDER == __LITTLE_ENDIAN #define be32toh(x) __bswap_32 (x) #else diff --git a/src/inspect-fs-windows.c b/src/inspect-fs-windows.c index 682157a..421a5b1 100644 ---...
2016 Jan 06
5
[PATCH klibc 0/5] klibc architecture fixes
Here's an assortment of build and run-time fixes for various architectures that we've applied in Debian. Ben. Aurelien Jarno (1): ppc64: fix struct stat Ben Hutchings (2): MIPS: Update archfcntl.h syscalls: Override detection of direct socket syscalls on i386, m68k, s390 Helge Deller (1): Add pread and pwrite 32bit syscall wrappers for parisc Mauricio Faria de Oliveira
2015 Jul 06
7
[PATCH 1/1] paint visual host key with unicode box-drawing characters
From: Christian Hesse <mail at eworm.de> Signed-off-by: Christian Hesse <mail at eworm.de> --- sshkey.c | 47 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/sshkey.c b/sshkey.c index cfe5980..47511c2 100644 --- a/sshkey.c +++ b/sshkey.c @@ -44,6 +44,9 @@ #include <stdio.h> #include <string.h> #include
2002 Dec 30
1
R on the Zaurus link
Hello All, The link to the binary & installation instructions (tar.gz binary not an ipk I'm afraid) is as follows: http://students.bath.ac.uk/enpsgp/Zaurus/#R It eventually dawned on me that the WORDS_BIGENDIAN define (or lack thereof) was causing the problems (after testing ieee NaN compliance that is). When cross-compiling it's probably fair enough that the configure script
2009 Apr 03
1
Radio interfaces for Asterisk - ISO image distro
I just ran across these guys - looks very interesting: http://xelatec.com/xippr/install They distribute a self-installing ISO with Asterisk, FreePBX, and some pre-built software to do "radio over IP". You'll need to buy the USB radio hardware, but it looks really interesting as a pre-built system for radio trunking using some of the Asterisk capabilities. There is a
2013 Aug 15
12
[Bug 845] New: checking for LIBNFNETLINK... configure: error: Package requirements (libnfnetlink >= 0.0.41) were not met:
https://bugzilla.netfilter.org/show_bug.cgi?id=845 Summary: checking for LIBNFNETLINK... configure: error: Package requirements (libnfnetlink >= 0.0.41) were not met: Product: libnetfilter_queue Version: unspecified Platform: i386 OS/Version: RedHat Linux Status: NEW Severity: normal
2019 Jul 03
6
[PATCH libnbd 0/2] Two patches to make libnbd work on FreeBSD.
Two simple patches which make libnbd compile on FreeBSD. Are we OK to copy common/include/byte-swapping.h from nbdkit? There is no license issue that I know of. Should we put it in lib/ or create a common/ directory? The header file is actually also needed by the tests (follow up patch for that) so putting it in common/ might make more sense. Some notes if you want to compile on FreeBSD: -
2011 Jun 28
13
[PATCH hivex 02/14] maint: remove unnecessary test-before-free
From: Jim Meyering <meyering at redhat.com> * lib/hivex.c (hivex_node_set_value): Remove unnecessary test-before-free. --- lib/hivex.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/lib/hivex.c b/lib/hivex.c index d042f4f..a72fa77 100644 --- a/lib/hivex.c +++ b/lib/hivex.c @@ -2748,8 +2748,7 @@ hivex_node_set_value (hive_h *h, hive_node_h node, leave_partial:
2018 Aug 12
13
[PATCH nbdkit 00/10] FreeBSD support.
With these patches, a majority of tests pass. The notable things which are still broken: - Because FreeBSD links /home -> /usr/home, $(pwd) gives a different result from realpath(2). Therefore some tests which implicitly rely on (eg) a plugin which calls nbdkit_realpath internally and then checking that path against $(pwd) fail. - Shebangs (#!) don't seem to work the same way
2015 Oct 05
2
[PATCH] Remove multiple hacks that only apply to RHEL 5.
...RHEL 5. - */ -#if !defined(HAVE_BE32TOH) && !defined(be32toh) - #if defined __APPLE__ && defined __MACH__ /* Define/include necessary items on MacOS X */ #include <machine/endian.h> @@ -46,13 +40,6 @@ #define __bswap_32 OSSwapConstInt32 #endif /* __APPLE__ */ -#if __BYTE_ORDER == __LITTLE_ENDIAN -#define be32toh(x) __bswap_32 (x) -#else -#define be32toh(x) (x) -#endif -#endif - #include "guestfs.h" #include "guestfs-internal.h" #include "guestfs-internal-actions.h" diff --git a/tests/regressions/rhbz975797.sh b/tests/regressions/rhbz97579...
2019 Jan 14
6
[PATCH nbdkit incomplete 0/5] Port to Windows.
This is an incomplete port to Windows. Currently the server compiles and starts up successfully, but goes into an infinite loop when you connect to it. Nevertheless I think the approach is ready for feedback. This being Windows the changes go quite deep. Rich.
2011 Apr 16
20
[PATCH 00/20] Switch to ELF modules
From: Matt Fleming <matt.fleming at linux.intel.com> This series fixes some bugs and switches the elflink branch to be entirely ELF modules. It applies on top of, http://syslinux.zytor.com/archives/2011-April/016369.html The deletions in the diff stat below are mainly from deleting com32/elflink/modules (finally!). Now there should be no duplicate code because we don't need COM32 and