Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F97534552
D35229.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D35229.diff
View Options
Index: lib/libsysdecode/errno.c
===================================================================
--- lib/libsysdecode/errno.c
+++ lib/libsysdecode/errno.c
@@ -35,7 +35,7 @@
#include <stdio.h>
#include <sysdecode.h>
-#if defined(__aarch64__) || defined(__amd64__) || defined(__i386__)
+#ifdef LINUX_ABI_PRESENT
#include <compat/linux/linux_errno.h>
#include <compat/linux/linux_errno.inc>
#endif
@@ -48,7 +48,7 @@
case SYSDECODE_ABI_FREEBSD:
case SYSDECODE_ABI_FREEBSD32:
return (error);
-#if defined(__aarch64__) || defined(__amd64__) || defined(__i386__)
+#ifdef LINUX_ABI_PRESENT
case SYSDECODE_ABI_LINUX:
case SYSDECODE_ABI_LINUX32: {
unsigned int i;
@@ -78,7 +78,7 @@
case SYSDECODE_ABI_FREEBSD:
case SYSDECODE_ABI_FREEBSD32:
return (error);
-#if defined(__aarch64__) || defined(__amd64__) || defined(__i386__)
+#ifdef LINUX_ABI_PRESENT
case SYSDECODE_ABI_LINUX:
case SYSDECODE_ABI_LINUX32:
if (error >= 0 && error <= ELAST)
Index: lib/libsysdecode/signal.c
===================================================================
--- lib/libsysdecode/signal.c
+++ lib/libsysdecode/signal.c
@@ -136,7 +136,7 @@
[SIGRTMIN + 61] = "SIGRT61",
};
-#if defined(__amd64__) || defined(__i386__) || defined(__aarch64__)
+#ifdef LINUX_ABI_PRESENT
static const char *linux_signames[] = {
[LINUX_SIGHUP] = "SIGHUP",
[LINUX_SIGINT] = "SIGINT",
@@ -206,7 +206,7 @@
};
_Static_assert(nitems(linux_signames) == LINUX_SIGRTMAX + 1,
"invalid entries count in linux_signames");
-#endif /* __amd64__ || __i386__ || __aarch64__ */
+#endif /* LINUX_ABI_PRESENT */
const char *
sysdecode_signal(int sig)
@@ -217,7 +217,7 @@
return (NULL);
}
-#if defined(__amd64__) || defined(__i386__) || defined(__aarch64__)
+#ifdef LINUX_ABI_PRESENT
const char *
sysdecode_linux_signal(int sig)
{
Index: lib/libsysdecode/syscallnames.c
===================================================================
--- lib/libsysdecode/syscallnames.c
+++ lib/libsysdecode/syscallnames.c
@@ -48,7 +48,7 @@
#include <compat/freebsd32/freebsd32_syscalls.c>
#endif
-#if defined(__aarch64__) || defined(__amd64__) || defined(__i386__)
+#ifdef LINUX_ABI_PRESENT
static
#ifdef __aarch64__
#include <arm64/linux/linux_syscalls.c>
@@ -79,7 +79,7 @@
return (freebsd32_syscallnames[code]);
break;
#endif
-#if defined(__aarch64__) || defined(__amd64__) || defined(__i386__)
+#ifdef LINUX_ABI_PRESENT
case SYSDECODE_ABI_LINUX:
if (code < nitems(linux_syscallnames))
return (linux_syscallnames[code]);
Index: lib/libsysdecode/sysdecode.h
===================================================================
--- lib/libsysdecode/sysdecode.h
+++ lib/libsysdecode/sysdecode.h
@@ -32,6 +32,10 @@
#include <stdbool.h>
#include <stdio.h>
+#if defined(__amd64__) || defined(__i386__) || defined(__aarch64__)
+#define LINUX_ABI_PRESENT
+#endif
+
enum sysdecode_abi {
SYSDECODE_ABI_UNKNOWN = 0,
SYSDECODE_ABI_FREEBSD,
@@ -134,8 +138,8 @@
const char *sysdecode_whence(int _whence);
bool sysdecode_shmflags(FILE *_fp, int _flags, int *_rem);
-#if defined(__amd64__) || defined(__i386__) || defined(__aarch64__)
+#ifdef LINUX_ABI_PRESENT
const char *sysdecode_linux_signal(int _sig);
-#endif /* __amd64__ || __i386__ || __aarch64__ */
+#endif /* LINUX_ABI_PRESENT */
#endif /* !__SYSDECODE_H__ */
Index: usr.bin/kdump/kdump.c
===================================================================
--- usr.bin/kdump/kdump.c
+++ usr.bin/kdump/kdump.c
@@ -136,11 +136,11 @@
void ktrsigset(char *, sigset_t *, size_t);
void ktrsyscall_freebsd(struct ktr_syscall *ktr, register_t **resip,
int *resnarg, char *resc, u_int sv_flags);
-#if defined(__amd64__) || defined(__i386__) || defined(__aarch64__)
+#ifdef LINUX_ABI_PRESENT
void ktrsyscall_linux(struct ktr_syscall *ktr, register_t **resip,
int *resnarg, char *resc);
#endif
-#ifdef __amd64__
+#if defined(__amd64__) && defined(LINUX_ABI_PRESENT)
void ktrsyscall_linux32(struct ktr_syscall *ktr, register_t **resip,
int *resnarg, char *resc);
#endif
@@ -815,7 +815,7 @@
printf("SIG %d", signo);
}
-#if defined(__amd64__) || defined(__i386__) || defined(__aarch64__)
+#ifdef LINUX_ABI_PRESENT
static void
print_linux_signal(int signo)
{
@@ -845,7 +845,7 @@
ktrsyscall_freebsd(ktr, &ip, &narg, &c,
sv_flags);
break;
-#if defined(__amd64__) || defined(__i386__) || defined(__aarch64__)
+#ifdef LINUX_ABI_PRESENT
case SV_ABI_LINUX:
#ifdef __amd64__
if (sv_flags & SV_ILP32)
@@ -2348,7 +2348,7 @@
return;
}
-#if defined(__amd64__) || defined(__i386__) || defined(__aarch64__)
+#ifdef LINUX_ABI_PRESENT
void
ktrsyscall_linux(struct ktr_syscall *ktr, register_t **resip,
int *resnarg, char *resc)
@@ -2399,7 +2399,6 @@
*resip = ip;
*resnarg = narg;
}
-#endif /* __amd64__ || __i386__ || __aarch64__ */
#if defined(__amd64__)
void
@@ -2455,6 +2454,7 @@
*resnarg = narg;
}
#endif /* __amd64__ */
+#endif /* LINUX_ABI_PRESENT */
void
usage(void)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Sep 30, 11:01 PM (12 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13210520
Default Alt Text
D35229.diff (4 KB)
Attached To
Mode
D35229: libsysdecode: Introduce LINUX_ABI_PRESENT
Attached
Detach File
Event Timeline
Log In to Comment