From: Yonggang Luo <luoyonggang@gmail.com>
To: elfutils-devel@sourceware.org
Cc: Yonggang Luo <luoyonggang@gmail.com>
Subject: [PATCH 06/25] move platform depended include into system.h of libebl
Date: Fri, 21 Oct 2022 02:25:45 +0800 [thread overview]
Message-ID: <20221020182603.815-7-luoyonggang@gmail.com> (raw)
In-Reply-To: <20221020182603.815-1-luoyonggang@gmail.com>
Because all source in libebl #include <libeblP.h>, so #include <system.h> in
libeblP.h is enough, there is multiple memory-access.h file, so use relative path to
include it properly,
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com
---
libebl/eblauxvinfo.c | 3 +--
libebl/eblcorenote.c | 3 +--
libebl/ebldynamictagname.c | 2 +-
libebl/eblobjnote.c | 10 +++++-----
libebl/eblobjnotetypename.c | 3 +--
libebl/eblopenbackend.c | 4 ++--
libebl/eblresolvesym.c | 3 ++-
libebl/libeblP.h | 4 +++-
8 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/libebl/eblauxvinfo.c b/libebl/eblauxvinfo.c
index ce1141b8..36554693 100644
--- a/libebl/eblauxvinfo.c
+++ b/libebl/eblauxvinfo.c
@@ -31,11 +31,10 @@
#endif
#include <assert.h>
-#include <byteswap.h>
-#include <endian.h>
#include <inttypes.h>
#include <stdio.h>
#include <stddef.h>
+
#include <libeblP.h>
#define AUXV_TYPES \
diff --git a/libebl/eblcorenote.c b/libebl/eblcorenote.c
index 7fab3974..9573e93e 100644
--- a/libebl/eblcorenote.c
+++ b/libebl/eblcorenote.c
@@ -31,12 +31,11 @@
#endif
#include <assert.h>
-#include <byteswap.h>
-#include <endian.h>
#include <inttypes.h>
#include <stdio.h>
#include <stddef.h>
#include <string.h>
+
#include <libeblP.h>
diff --git a/libebl/ebldynamictagname.c b/libebl/ebldynamictagname.c
index 5d4a3a58..018a2ff7 100644
--- a/libebl/ebldynamictagname.c
+++ b/libebl/ebldynamictagname.c
@@ -33,8 +33,8 @@
#include <inttypes.h>
#include <stdio.h>
+
#include <libeblP.h>
-#include "system.h"
const char *
diff --git a/libebl/eblobjnote.c b/libebl/eblobjnote.c
index 5a7c5c62..83ac4f47 100644
--- a/libebl/eblobjnote.c
+++ b/libebl/eblobjnote.c
@@ -35,13 +35,13 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <libeblP.h>
-#include "common.h"
-#include "libelfP.h"
-#include "libdwP.h"
-#include "memory-access.h"
+#include <libeblP.h>
+#include "../libelf/common.h"
+#include "../libelf/libelfP.h"
+#include "../libdw/libdwP.h"
+#include "../libdw/memory-access.h"
void
ebl_object_note (Ebl *ebl, uint32_t namesz, const char *name, uint32_t type,
diff --git a/libebl/eblobjnotetypename.c b/libebl/eblobjnotetypename.c
index 473a1f2f..c15379d6 100644
--- a/libebl/eblobjnotetypename.c
+++ b/libebl/eblobjnotetypename.c
@@ -31,11 +31,10 @@
# include <config.h>
#endif
-#include <system.h>
-
#include <inttypes.h>
#include <stdio.h>
#include <string.h>
+
#include <libeblP.h>
diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
index 02f80653..7dc760d8 100644
--- a/libebl/eblopenbackend.c
+++ b/libebl/eblopenbackend.c
@@ -31,15 +31,15 @@
#endif
#include <assert.h>
-#include <libelfP.h>
#include <dwarf.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
-#include <system.h>
#include <libeblP.h>
+#include "../libelf/libelfP.h"
+
Ebl *i386_init (Elf *, GElf_Half, Ebl *);
Ebl *sh_init (Elf *, GElf_Half, Ebl *);
Ebl *x86_64_init (Elf *, GElf_Half, Ebl *);
diff --git a/libebl/eblresolvesym.c b/libebl/eblresolvesym.c
index 470f6f06..b859bba3 100644
--- a/libebl/eblresolvesym.c
+++ b/libebl/eblresolvesym.c
@@ -30,9 +30,10 @@
# include <config.h>
#endif
-#include <libeblP.h>
#include <assert.h>
+#include <libeblP.h>
+
bool
ebl_resolve_sym_value (Ebl *ebl, GElf_Addr *addr)
{
diff --git a/libebl/libeblP.h b/libebl/libeblP.h
index c408ed97..14cb70f3 100644
--- a/libebl/libeblP.h
+++ b/libebl/libeblP.h
@@ -30,9 +30,11 @@
#define _LIBEBLP_H 1
#include <gelf.h>
-#include <libasm.h>
#include <libebl.h>
+#include <system.h>
+
+#include <../libasm/libasm.h>
/* Backend handle. */
struct ebl
--
2.36.1.windows.1
next prev parent reply other threads:[~2022-10-20 18:26 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-20 18:25 [PATCH 00/25] Patches for building with mingw/gcc msvc/clang-cl Yonggang Luo
2022-10-20 18:25 ` [PATCH 01/25] Rename 'hello2.spec.' -> 'hello2.spec' 'hello3.spec.' -> 'hello3.spec' Yonggang Luo
2022-10-27 13:02 ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 02/25] ignore build directory Yonggang Luo
2022-10-27 13:03 ` Mark Wielaard
2022-12-16 21:14 ` 罗勇刚(Yonggang Luo)
2022-12-20 12:35 ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 03/25] libebl: There is no need #include <dlfcn.h> in eblclosebackend.c and eblopenbackend.c Yonggang Luo
2022-10-27 13:09 ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 04/25] libelf/libdwfl: Remove "#define LIB_SYSTEM_H 1" in libelf_crc32.c and libdwfl_crc32.c Yonggang Luo
2022-10-27 13:20 ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 05/25] use #include <system.h> instead platform depended header <endian.h> in libdw/memory-access.h Yonggang Luo
2022-10-27 13:26 ` Mark Wielaard
2022-10-20 18:25 ` Yonggang Luo [this message]
2022-10-28 11:35 ` [PATCH 06/25] move platform depended include into system.h of libebl Mark Wielaard
2022-12-16 21:19 ` 罗勇刚(Yonggang Luo)
2022-12-20 13:59 ` Mark Wielaard
2022-12-20 17:44 ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 07/25] move platform depended include into system.h of libasm, libcpu, libdw, libdwfl and libdwelf Yonggang Luo
2022-10-28 12:07 ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 08/25] Use configure to detect HAVE_DECL_MMAP and use it for system doesn't provide sys/mman.h Yonggang Luo
2022-10-28 11:41 ` Mark Wielaard
2022-12-16 21:21 ` 罗勇刚(Yonggang Luo)
2022-12-20 14:04 ` Mark Wielaard
2022-12-20 16:30 ` 罗勇刚(Yonggang Luo)
2022-12-21 16:54 ` Mark Wielaard
2022-12-22 3:50 ` 罗勇刚(Yonggang Luo)
2022-10-20 18:25 ` [PATCH 09/25] include libgen.h in system.h Yonggang Luo
2022-10-28 11:45 ` Mark Wielaard
2022-12-16 21:22 ` 罗勇刚(Yonggang Luo)
2022-12-16 21:34 ` 罗勇刚(Yonggang Luo)
2022-12-20 15:05 ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 10/25] libcpu: Remove the need of NMNES by using enum Yonggang Luo
2022-12-12 12:37 ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 11/25] libcpu: Use __asm instead asm that can be recognized by both clang-cl and gcc Yonggang Luo
2022-12-12 12:42 ` Mark Wielaard
2022-12-16 21:36 ` 罗勇刚(Yonggang Luo)
2022-10-20 18:25 ` [PATCH 12/25] libcpu: Use "#define FCT_mod$64r_m FCT_mod$r_m" is enough and can be recognized by clang-cl on windows in i386_data.h Yonggang Luo
2022-12-12 12:58 ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 13/25] libdw: typeof -> __typeof that can be recognized by both clang-cl and gcc Yonggang Luo
2022-12-12 13:12 ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 14/25] libdw: check __OPTIMIZE__ in dwarf_whatattr.c and dwarf_whatform.c to match the header Yonggang Luo
2022-12-12 13:31 ` Mark Wielaard
2022-12-16 21:47 ` 罗勇刚(Yonggang Luo)
2022-12-20 15:08 ` Mark Wielaard
2022-12-20 16:31 ` 罗勇刚(Yonggang Luo)
2022-10-20 18:25 ` [PATCH 15/25] lib: Implement error properly even when not HAVE_ERR_H Yonggang Luo
2022-12-12 15:37 ` Mark Wielaard
2022-12-16 21:50 ` 罗勇刚(Yonggang Luo)
2022-12-20 15:10 ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 16/25] libeu: Move the implementation of pwrite_retry, write_retry and pread_retry from header to source Yonggang Luo
2022-12-12 15:45 ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 17/25] libelf: uid_t, gid_t and mode_t are not comes with msvcrt, so using long/unsigned long instead on win32 Yonggang Luo
2022-10-20 18:25 ` [PATCH 18/25] lib: Use NOT_HAVE_LIBINTL to guard #include <libintl.h> Yonggang Luo
2022-10-20 18:25 ` [PATCH 19/25] libelf: F_GETFD may not predefined with msvc/mingw, guard the usage of it Yonggang Luo
2022-12-12 15:54 ` Mark Wielaard
2022-10-20 18:25 ` [PATCH 20/25] Add function sys_get_page_size to replace platform dependent sysconf (_SC_PAGESIZE) Yonggang Luo
2022-10-20 18:26 ` [PATCH 21/25] libasm: stdio_ext.h are not present on win32 Yonggang Luo
2022-10-20 18:26 ` [PATCH 22/25] libebl/libdwelf: define ssize_t and pid_t for MSVC within installed header libdwelf.h and libebl.h Yonggang Luo
2022-10-20 18:26 ` [PATCH 23/25] libasm/debuginfod: fchmod doesn't present on win32 Yonggang Luo
2022-10-20 18:26 ` [PATCH 24/25] lib: isatty is not available on windows Yonggang Luo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221020182603.815-7-luoyonggang@gmail.com \
--to=luoyonggang@gmail.com \
--cc=elfutils-devel@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).