1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 13:07:46 +00:00

Userland: Prefer using ARCH() over __LP64__

This commit is contained in:
Gunnar Beutner 2021-07-13 15:50:19 +02:00 committed by Andreas Kling
parent de4ba1f39b
commit 4cf24c6ba2
5 changed files with 13 additions and 18 deletions

View file

@ -38,7 +38,7 @@
# include <AK/Types.h>
#endif
#ifdef __LP64__
#ifdef __x86_64__
# define ElfW(type) Elf64_##type
#else
# define ElfW(type) Elf32_##type

View file

@ -6,6 +6,7 @@
#pragma once
#include <AK/Platform.h>
#include <bits/stdint.h>
#include <sys/cdefs.h>
@ -18,7 +19,7 @@ __BEGIN_DECLS
#define PRIi8 "d"
#define PRIi16 "d"
#define PRIi32 "d"
#ifndef __LP64__
#if ARCH(I386)
# define PRIi64 "lld"
#else
# define PRIi64 "ld"
@ -27,14 +28,14 @@ __BEGIN_DECLS
#define PRIo8 "o"
#define PRIo16 "o"
#define PRIo32 "o"
#ifndef __LP64__
#if ARCH(I386)
# define PRIo64 "llo"
#else
# define PRIo64 "lo"
#endif
#define PRIu16 "u"
#define PRIu32 "u"
#ifndef __LP64__
#if ARCH(I386)
# define PRIu64 "llu"
# define PRIuPTR "x"
#else
@ -47,7 +48,7 @@ __BEGIN_DECLS
#define PRIX16 "hX"
#define PRIx32 "x"
#define PRIX32 "X"
#ifndef __LP64__
#if ARCH(I386)
# define PRIx64 "llx"
# define PRIX64 "llX"
# define PRIxPTR "x"

View file

@ -16,12 +16,6 @@
__BEGIN_DECLS
#ifdef __LP64__
# define ElfW(type) Elf64_##type
#else
# define ElfW(type) Elf32_##type
#endif
struct dl_phdr_info {
ElfW(Addr) dlpi_addr;
const char* dlpi_name;