* [gentoo-commits] proj/pax-utils:master commit in: tests/source/, /
@ 2022-07-12 6:33 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2022-07-12 6:33 UTC (permalink / raw
To: gentoo-commits
commit: 7b95b1831d71396150c5cb10d4edf899e135d068
Author: Arsen Arsenović <arsen <AT> aarsen <DOT> me>
AuthorDate: Fri Jun 24 14:03:46 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jul 12 06:33:20 2022 +0000
URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=7b95b183
Probe the target system for needed headers
This prevents new or unconventional systems requiring upstream changes,
though, this is not perfect, as it doesn't address some of the other
defines related to OSes the preprocessor does (namely, wrt the ldso
cache handling). I didn't touch these yet as I took a more conservative
approach of (probably) not changing what happens at runtime.
Signed-off-by: Arsen Arsenović <arsen <AT> aarsen.me>
Signed-off-by: Sam James <sam <AT> gentoo.org>
porting.h | 25 +++++++++++--------------
tests/source/dotest | 2 +-
2 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/porting.h b/porting.h
index 8e5542d..0d43a92 100644
--- a/porting.h
+++ b/porting.h
@@ -11,9 +11,7 @@
#ifndef _PORTING_H
#define _PORTING_H
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include "probes.h"
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(*arr))
@@ -41,36 +39,36 @@
#include <sys/stat.h>
#include <sys/types.h>
#include "elf.h"
-#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__)
+#if HAS_ALLOCA_H
# include <alloca.h>
#endif
-#if defined(__linux__)
+#if HAS_SYS_PRCTL_H
# include <sys/prctl.h>
-# if !defined(HAVE_CONFIG_H) || defined(HAVE_LINUX_SECCOMP_H)
+# if HAS_LINUX_SECCOMP_H
# include <linux/seccomp.h>
# endif
-# if !defined(HAVE_CONFIG_H) || defined(HAVE_LINUX_SECUREBITS_H)
+# if HAS_LINUX_SECUREBITS_H
# include <linux/securebits.h>
# endif
#endif
-#if defined(__GLIBC__) || defined(__UCLIBC__) || defined(__ANDROID__)
+#if HAS_ENDIAN_H && HAS_BYTESWAP_H
# include <byteswap.h>
# include <endian.h>
-#elif defined(__FreeBSD__)
+#elif HAS_SYS_ENDIAN_H
# include <sys/endian.h>
-#elif defined(__sun__)
+#elif HAS_ISA_DEFS_H
# include <sys/isa_defs.h>
-#elif defined(__MACH__)
+#elif HAS_MACHINE_ENDIAN_H
# include <machine/endian.h>
#endif
-#if defined(__GLIBC__) || defined(__UCLIBC__) || defined(__NetBSD__)
+#ifdef HAS_GLOB_H
# include <glob.h>
#endif
#if defined(__GLIBC__) || defined(__UCLIBC__) || defined(__NetBSD__)
# define __PAX_UTILS_DEFAULT_LD_CACHE_CONFIG "/etc/ld.so.conf"
-#elif defined(__FreeBSD__) || defined(__DragonFly__)
+#elif HAS_ELF_HINTS_H
# include <elf-hints.h>
# define __PAX_UTILS_DEFAULT_LD_CACHE_CONFIG _PATH_ELF_HINTS
#else
@@ -168,7 +166,6 @@
# define __PAX_UTILS_PATH_MAX PATH_MAX
#endif
-/* fall back case for non-Linux hosts ... so lame */
#if !defined(ELF_DATA)
# if defined(BYTE_ORDER)
# if BYTE_ORDER == LITTLE_ENDIAN
diff --git a/tests/source/dotest b/tests/source/dotest
index c97e8cb..cc278a5 100755
--- a/tests/source/dotest
+++ b/tests/source/dotest
@@ -5,7 +5,7 @@
findfiles() {
find "${top_srcdir}" \
'(' -type d -a '(' -name .git -o -name autotools ')' -prune ')' \
- -o '(' '(' -name '*.[ch]' -a ! -name 'config.h' ')' -print0 ')'
+ -o '(' '(' -name '*.[ch]' -a ! -name 'probes.h' ')' -print0 ')'
}
#
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] proj/pax-utils:master commit in: tests/source/, /
@ 2024-01-24 15:44 Mike Frysinger
0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2024-01-24 15:44 UTC (permalink / raw
To: gentoo-commits
commit: e679f9bd82197f0f1831a0a4a282851994aa172c
Author: Mike Frysinger <vapier <AT> chromium <DOT> org>
AuthorDate: Wed Jan 24 15:32:52 2024 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Jan 24 15:32:52 2024 +0000
URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=e679f9bd
build: use standard config.h naming
Signed-off-by: Mike Frysinger <vapier <AT> chromium.org>
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
meson.build | 2 +-
porting.h | 2 +-
tests/source/dotest | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/meson.build b/meson.build
index 255107b..c91bb64 100644
--- a/meson.build
+++ b/meson.build
@@ -56,7 +56,7 @@ foreach x : [
endforeach
configure_file(
- output : 'probes.h',
+ output : 'config.h',
configuration : probe_results,
)
diff --git a/porting.h b/porting.h
index 61018fb..1ace55e 100644
--- a/porting.h
+++ b/porting.h
@@ -11,7 +11,7 @@
#ifndef _PORTING_H
#define _PORTING_H
-#include "probes.h"
+#include "config.h"
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(*arr))
diff --git a/tests/source/dotest b/tests/source/dotest
index cc278a5..c97e8cb 100755
--- a/tests/source/dotest
+++ b/tests/source/dotest
@@ -5,7 +5,7 @@
findfiles() {
find "${top_srcdir}" \
'(' -type d -a '(' -name .git -o -name autotools ')' -prune ')' \
- -o '(' '(' -name '*.[ch]' -a ! -name 'probes.h' ')' -print0 ')'
+ -o '(' '(' -name '*.[ch]' -a ! -name 'config.h' ')' -print0 ')'
}
#
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-24 15:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-12 6:33 [gentoo-commits] proj/pax-utils:master commit in: tests/source/, / Sam James
-- strict thread matches above, loose matches on Subject: below --
2024-01-24 15:44 Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox