[PATCH 1/7] Rename 'hello2.spec.' -> 'hello2.spec' 'hello3.spec.' -> 'hello3.spec'

2022-09-20 Thread Yonggang Luo via Elfutils-devel
These filenames are invalid on win32 Signed-off-by: Yonggang Luo --- tests/Makefile.am | 2 +- tests/debuginfod-rpms/{hello2.spec. => hello2.spec} | 0 tests/debuginfod-rpms/{hello3.spec. => hello3.spec} | 0 3 files changed, 1 insertion(+), 1 deletion(-) renam

[PATCH 3/7] lib: Use NOT_HAVE_LIBINTL to guard if need #include

2022-09-20 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- lib/eu-config.h | 8 1 file changed, 8 insertions(+) diff --git a/lib/eu-config.h b/lib/eu-config.h index c7d7cbb2..5e6c3c72 100644 --- a/lib/eu-config.h +++ b/lib/eu-config.h @@ -52,9 +52,17 @@ # define rwlock_unlock(lock) ((void) (lock)) #endif /* USE

[PATCH 0/7] Enable building libelf of elfutils on win32

2022-09-20 Thread Yonggang Luo via Elfutils-devel
After these changes, now libelf can be build with mingw/gcc and msvc/clang Yonggang Luo (7): Rename 'hello2.spec.' -> 'hello2.spec' 'hello3.spec.' -> 'hello3.spec' move platform depended include into system.h lib: Use NOT_HAVE_LIBINTL to guard if need #include Remove duplicated #include

[PATCH 6/7] Fixes building with msvc/clang mingw/gcc

2022-09-20 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- configure.ac | 1 + lib/system.h | 61 +- lib/system_win32.c| 162 ++ libelf/elf32_updatefile.c | 3 +- libelf/elf_begin.c| 7 +- libelf/elf_end.c | 2 + lib

[PATCH 4/7] Remove duplicated #include

2022-09-20 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- debuginfod/debuginfod.cxx | 1 - lib/color.c | 1 - lib/printversion.c| 1 - lib/xasprintf.c | 1 - lib/xmalloc.c | 1 - libasm/asm_end.c | 1 - libasm/asm_error.c| 1 - libasm/asm_newscn.c | 1 - l

[PATCH 2/7] move platform depended include into system.h

2022-09-20 Thread Yonggang Luo via Elfutils-devel
All of these files either #include directly or #include "libelfP.h" And now "libelfP.h also #include , so the platform depended include can be moved to system.h safely Signed-off-by: Yonggang Luo --- lib/system.h | 11 +++ libebl/eblmachineflagname.c | 1 - libebl/eb

[PATCH 5/7] Strip __ prefix from __BYTE_ORDER __LITTLE_ENDIAN and __BIG_ENDIAN

2022-09-20 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- lib/system.h | 4 ++-- libcpu/i386_disasm.c | 2 +- libcpu/memory-access.h | 26 +- libcpu/riscv_disasm.c| 2 +- libdw/memory-access.h| 8 lib

[PATCH 7/7] Add CMake build files

2022-09-20 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- .gitignore | 1 + CMakeLists.txt | 47 + libelf/CMakeLists.txt| 192 +++ libelf/config-cmake/config.h | 27 + 4 files changed, 267 insertions(+) create mode 100644 CMakeLists.t

[PATCH v2 2/7] move platform depended include into system.h of libelf

2022-10-15 Thread Yonggang Luo via Elfutils-devel
All of these files either #include directly or #include "libelfP.h" And now "libelfP.h also #include , so the platform depended include can be moved to system.h safely Signed-off-by: Yonggang Luo --- lib/system.h | 11 +++ libelf/common.h | 3 --- libelf/

[PATCH v2 0/7] Enable building libelf of elfutils on win32

2022-10-15 Thread Yonggang Luo via Elfutils-devel
After these changes, now libelf can be build with mingw/gcc and msvc/clang v1 -> v2 Do no modify libebl in commit move platform depended include into system.h of libelf Add commit Move the #include into eu-config.h to Yonggang Luo (7): Rename 'hello2.spec.' -> 'hello2.spec' 'hello3.spec.' ->

[PATCH v2 3/7] Move the #include into eu-config.h

2022-10-15 Thread Yonggang Luo via Elfutils-devel
So we do not need include in each file. And indeed the macro #define _(Str) dgettext ("elfutils", Str) access libintl function dgettext, so it's make more sense #include in file eu-config.h Signed-off-by: Yonggang Luo --- debuginfod/debuginfod.cxx | 1 - lib/color.c | 1 - lib/eu-

[PATCH v2 4/7] lib: Use NOT_HAVE_LIBINTL to guard #include

2022-10-15 Thread Yonggang Luo via Elfutils-devel
Add NOT_HAVE_LIBINTL macro to disable internationalization, sometimes we have don't want access internationalization such as MSVC, so the macro NOT_HAVE_LIBINTL can help that. Signed-off-by: Yonggang Luo --- lib/eu-config.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/lib/eu-config

[PATCH 02/25] ignore build directory

2022-10-20 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8bcd88d7..ca06 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ Makefile.in /INSTALL /aclocal.m4 /autom4te.* +/build /config.cache /config.h /config.h.i

[PATCH 00/25] Patches for building with mingw/gcc msvc/clang-cl

2022-10-20 Thread Yonggang Luo via Elfutils-devel
I split it into small patches for easier to review Yonggang Luo (25): Rename 'hello2.spec.' -> 'hello2.spec' 'hello3.spec.' -> 'hello3.spec' ignore build directory libebl: There is no need #include in eblclosebackend.c and eblopenbackend.c libelf/libdwfl: Remove "#define LIB_SYSTEM_H

[PATCH 06/25] move platform depended include into system.h of libebl

2022-10-20 Thread Yonggang Luo via Elfutils-devel
Because all source in libebl #include , so #include 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 -#include -#include #include #include #include + #include #define AUXV_TYPES

[PATCH 04/25] libelf/libdwfl: Remove "#define LIB_SYSTEM_H 1" in libelf_crc32.c and libdwfl_crc32.c

2022-10-20 Thread Yonggang Luo via Elfutils-devel
rationale: https://sourceware.org/bugzilla/show_bug.cgi?id=21001 If we don't remove this macro, when try #include in libdw/memory-access.h wont' take effect because "#define LIB_SYSTEM_H 1" The compile error: ./../libdw/memory-access.h:390:12: error: implicit declaration of function ‘bswap_32’

[PATCH 01/25] Rename 'hello2.spec.' -> 'hello2.spec' 'hello3.spec.' -> 'hello3.spec'

2022-10-20 Thread Yonggang Luo via Elfutils-devel
These filenames are invalid on win32 Signed-off-by: Yonggang Luo --- tests/Makefile.am | 2 +- tests/debuginfod-rpms/{hello2.spec. => hello2.spec} | 0 tests/debuginfod-rpms/{hello3.spec. => hello3.spec} | 0 3 files changed, 1 insertion(+), 1 deletion(-) renam

[PATCH 07/25] move platform depended include into system.h of libasm, libcpu, libdw, libdwfl and libdwelf

2022-10-20 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- lib/color.c| 1 - libasm/asm_abort.c | 1 - libasm/asm_addint8.c | 2 -- libasm/asm_begin.c | 2 -- libasm/asm_end.c | 2 -- libasm/libasmP.h

[PATCH 03/25] libebl: There is no need #include in eblclosebackend.c and eblopenbackend.c

2022-10-20 Thread Yonggang Luo via Elfutils-devel
It's not accessed symbols in dlfcn.h in eblclosebackend.c and eblopenbackend.c Signed-off-by: Yonggang Luo --- libebl/eblclosebackend.c | 1 - libebl/eblopenbackend.c | 1 - 2 files changed, 2 deletions(-) diff --git a/libebl/eblclosebackend.c b/libebl/eblclosebackend.c index 501e5c7b..7fa068e

[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

2022-10-20 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- libcpu/i386_data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcpu/i386_data.h b/libcpu/i386_data.h index 06356b8a..fe3c4ae1 100644 --- a/libcpu/i386_data.h +++ b/libcpu/i386_data.h @@ -1153,7 +1153,7 @@ FCT_mod$64r_m (struct output_data

[PATCH 08/25] Use configure to detect HAVE_DECL_MMAP and use it for system doesn't provide sys/mman.h

2022-10-20 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- configure.ac | 1 + lib/crc32_file.c | 4 ++-- lib/system.h | 2 ++ libelf/elf32_updatefile.c | 3 ++- libelf/elf_begin.c| 5 - libelf/elf_end.c | 2 ++ libelf/elf_update.c | 5 - 7 files changed, 17

[PATCH 09/25] include libgen.h in system.h

2022-10-20 Thread Yonggang Luo via Elfutils-devel
basename function are accessed multiple place, but used without include libgen.h Signed-off-by: Yonggang Luo --- lib/system.h | 1 + libdw/dwarf_getsrc_file.c| 2 +- libdwfl/dwfl_module_getsrc_file.c| 2 +- libdwfl/dwfl_segment_report_module.c | 2 +- libd

[PATCH 05/25] use #include instead platform depended header in libdw/memory-access.h

2022-10-20 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- libdw/memory-access.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libdw/memory-access.h b/libdw/memory-access.h index 800b517c..16c8c851 100644 --- a/libdw/memory-access.h +++ b/libdw/memory-access.h @@ -29,11 +29,10 @@ #ifndef _MEMORY_AC

[PATCH 13/25] libdw: typeof -> __typeof that can be recognized by both clang-cl and gcc

2022-10-20 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- libdw/memory-access.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libdw/memory-access.h b/libdw/memory-access.h index 16c8c851..fca4129a 100644 --- a/libdw/memory-access.h +++ b/libdw/memory-access.h @@ -64,7 +64,7 @@ __libdw_max_

[PATCH 10/25] libcpu: Remove the need of NMNES by using enum

2022-10-20 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- libcpu/Makefile.am | 2 +- libcpu/i386_parse.y | 13 + 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/libcpu/Makefile.am b/libcpu/Makefile.am index 57d0a164..259ed838 100644 --- a/libcpu/Makefile.am +++ b/libcpu/Makefile.am @@ -92,7 +

[PATCH 11/25] libcpu: Use __asm instead asm that can be recognized by both clang-cl and gcc

2022-10-20 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- libcpu/i386_disasm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c index 599d1654..cc75a7b1 100644 --- a/libcpu/i386_disasm.c +++ b/libcpu/i386_disasm.c @@ -480,7 +480,7 @@ i386_disasm (Ebl *ebl __at

[PATCH 14/25] libdw: check __OPTIMIZE__ in dwarf_whatattr.c and dwarf_whatform.c to match the header

2022-10-20 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- libdw/dwarf_whatattr.c | 3 ++- libdw/dwarf_whatform.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libdw/dwarf_whatattr.c b/libdw/dwarf_whatattr.c index d664b021..59769865 100644 --- a/libdw/dwarf_whatattr.c +++ b/libdw/dwarf_whatattr.c

[PATCH 18/25] lib: Use NOT_HAVE_LIBINTL to guard #include

2022-10-20 Thread Yonggang Luo via Elfutils-devel
Add NOT_HAVE_LIBINTL macro to disable internationalization, sometimes we have don't want access internationalization such as MSVC, so the macro NOT_HAVE_LIBINTL can help that. Signed-off-by: Yonggang Luo --- lib/eu-config.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/lib/eu-config

[PATCH 16/25] libeu: Move the implementation of pwrite_retry, write_retry and pread_retry from header to source

2022-10-20 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- lib/Makefile.am | 2 +- lib/system.c| 87 + lib/system.h| 59 - 3 files changed, 94 insertions(+), 54 deletions(-) create mode 100644 lib/system.c diff --git a/lib/Makefile.a

[PATCH 22/25] libebl/libdwelf: define ssize_t and pid_t for MSVC within installed header libdwelf.h and libebl.h

2022-10-20 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- libdwelf/libdwelf.h | 5 + libebl/libebl.h | 5 + 2 files changed, 10 insertions(+) diff --git a/libdwelf/libdwelf.h b/libdwelf/libdwelf.h index 263ca60e..167ac0dc 100644 --- a/libdwelf/libdwelf.h +++ b/libdwelf/libdwelf.h @@ -31,6 +31,11 @@ #includ

[PATCH 15/25] lib: Implement error properly even when not HAVE_ERR_H

2022-10-20 Thread Yonggang Luo via Elfutils-devel
on win32, there is no err.h Signed-off-by: Yonggang Luo --- lib/error.c | 9 - lib/system.h | 4 +--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/error.c b/lib/error.c index 5186fc15..7924735e 100644 --- a/lib/error.c +++ b/lib/error.c @@ -28,12 +28,14 @@ #incl

[PATCH 20/25] Add function sys_get_page_size to replace platform dependent sysconf (_SC_PAGESIZE)

2022-10-20 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- lib/crc32_file.c | 2 +- lib/system.c | 17 + lib/system.h | 3 +++ libdw/dwarf_begin_elf.c| 2 +- libdwelf/dwelf_strtab.c| 2 +- libdwfl/linux-kernel-modules.c | 2 +- libdwfl/l

[PATCH 19/25] libelf: F_GETFD may not predefined with msvc/mingw, guard the usage of it

2022-10-20 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- libelf/elf_begin.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c index 6d31882e..d867cd6f 100644 --- a/libelf/elf_begin.c +++ b/libelf/elf_begin.c @@ -1163,12 +1163,14 @@ elf_begin (int fildes, Elf_Cmd cmd, Elf *ref)

[PATCH 23/25] libasm/debuginfod: fchmod doesn't present on win32

2022-10-20 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- debuginfod/debuginfod-client.c | 4 +++- libasm/asm_end.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c index 2a14d9d9..4b7f837b 100644 --- a/debuginfod/debuginfod

[PATCH 17/25] libelf: uid_t, gid_t and mode_t are not comes with msvcrt, so using long/unsigned long instead on win32

2022-10-20 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- libelf/libelf.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libelf/libelf.h b/libelf/libelf.h index a139e733..2fa3838b 100644 --- a/libelf/libelf.h +++ b/libelf/libelf.h @@ -195,9 +195,15 @@ typedef struct { char *ar_name; /* Name of

[PATCH 21/25] libasm: stdio_ext.h are not present on win32

2022-10-20 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- libasm/asm_begin.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libasm/asm_begin.c b/libasm/asm_begin.c index 9e4dfe43..9b6d974e 100644 --- a/libasm/asm_begin.c +++ b/libasm/asm_begin.c @@ -34,10 +34,13 @@ #include #include #includ

[PATCH 24/25] lib: isatty is not available on windows

2022-10-20 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- lib/color.c | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/color.c b/lib/color.c index 8063dc26..963a2ec2 100644 --- a/lib/color.c +++ b/lib/color.c @@ -117,9 +117,14 @@ parse_opt (int key, char *arg, if (strcmp (arg, values[i].str) == 0)

[PATCH v2 01/16] ignore build directory

2022-12-17 Thread Yonggang Luo via Elfutils-devel
This is for in in three building and won't affect IDE for example mkdir build && cd build && ../configure && make install Signed-off-by: Yonggang Luo --- .gitignore | 1 + ChangeLog | 4 2 files changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 8bcd88d7..ca06 100644

[PATCH v2 02/16] move platform depended include into system.h of libebl

2022-12-17 Thread Yonggang Luo via Elfutils-devel
Because all source in libebl #include , so #include 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 -#include -#include #include #include #include diff --git a/libebl/eblcorenote.c b/libebl/eblcoren

[PATCH v2 00/16] Patches for building with mingw/gcc msvc/clang-cl

2022-12-17 Thread Yonggang Luo via Elfutils-devel
I split it into small patches for easier to review Changes v1->v2: The reviews are applied Yonggang Luo (16): ignore build directory move platform depended include into system.h of libebl Use configure to detect HAVE_DECL_MMAP and use it for system doesn't provide sys/mman.h Fixes us

[PATCH v2 03/16] Use configure to detect HAVE_DECL_MMAP and use it for system doesn't provide sys/mman.h

2022-12-17 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- configure.ac | 1 + lib/crc32_file.c | 4 ++-- lib/system.h | 2 ++ libelf/elf32_updatefile.c | 3 ++- libelf/elf_begin.c| 5 - libelf/elf_end.c | 2 ++ libelf/elf_update.c | 5 - 7 files changed, 17

[PATCH v2 04/16] Fixes usage of basename about prototype differences

2022-12-17 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- libdw/dwarf_getsrc_file.c| 2 +- libdwfl/dwfl_module_getsrc_file.c| 2 +- libdwfl/dwfl_segment_report_module.c | 2 +- libdwfl/find-debuginfo.c | 6 +++--- libdwfl/link_map.c | 2 +- src/addr2line.c

[PATCH v2 05/16] libcpu: Remove the need of NMNES by using enum

2022-12-17 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- libcpu/Makefile.am | 2 +- libcpu/i386_disasm.c | 14 +- libcpu/i386_mne.h| 36 libcpu/i386_parse.y | 9 +++-- 4 files changed, 41 insertions(+), 20 deletions(-) create mode 100644 libcpu/i386_mne.h di

[PATCH v2 06/16] libcpu: Use __asm instead asm that can be recognized by both clang-cl and gcc

2022-12-17 Thread Yonggang Luo via Elfutils-devel
This block of code can not be removed. As it's contains a goto label enomem that been used elsewhere Signed-off-by: Yonggang Luo --- libcpu/i386_disasm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c index c34f03d6..44bf7d37 10064

[PATCH v2 07/16] libdw: Fixes compile of dwarf_whatattr.c and dwarf_whatform.c

2022-12-17 Thread Yonggang Luo via Elfutils-devel
If __OPTIMIZE__ is defined, then compile dwarf_whatattr.c and dwarf_whatform.c will cause symbol conflict between dwarf_whatattr.c and libdw.h, dwarf_whatform.c and libdw.h, So always undefined __OPTIMIZE__ when compiling these two files The error message is: dwarf_whatform.c [build] C:\work\xe

[PATCH v2 10/16] libasm: stdio_ext.h are not present on win32

2022-12-17 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- libasm/asm_begin.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libasm/asm_begin.c b/libasm/asm_begin.c index 9e4dfe43..9b6d974e 100644 --- a/libasm/asm_begin.c +++ b/libasm/asm_begin.c @@ -34,10 +34,13 @@ #include #include #includ

[PATCH v2 11/16] libebl/libdwelf: define ssize_t and pid_t for MSVC within installed header libdwelf.h and libebl.h

2022-12-17 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- libdwelf/libdwelf.h | 5 + libebl/libebl.h | 5 + 2 files changed, 10 insertions(+) diff --git a/libdwelf/libdwelf.h b/libdwelf/libdwelf.h index 263ca60e..167ac0dc 100644 --- a/libdwelf/libdwelf.h +++ b/libdwelf/libdwelf.h @@ -31,6 +31,11 @@ #includ

[PATCH v2 13/16] lib: isatty is not available on windows

2022-12-17 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- lib/color.c | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/color.c b/lib/color.c index 8063dc26..963a2ec2 100644 --- a/lib/color.c +++ b/lib/color.c @@ -117,9 +117,14 @@ parse_opt (int key, char *arg, if (strcmp (arg, values[i].str) == 0)

[PATCH v2 08/16] lib: Implement error properly even when not HAVE_ERR_H

2022-12-17 Thread Yonggang Luo via Elfutils-devel
on win32, there is no err.h Signed-off-by: Yonggang Luo --- lib/error.c | 16 +++- lib/system.h | 4 +--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/lib/error.c b/lib/error.c index 5186fc15..d4cbf0ff 100644 --- a/lib/error.c +++ b/lib/error.c @@ -28,12 +28,14 @

[PATCH v2 12/16] libasm/debuginfod: fchmod doesn't present on win32

2022-12-17 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- debuginfod/debuginfod-client.c | 4 +++- libasm/asm_end.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c index 8873fcc8..7a67a440 100644 --- a/debuginfod/debuginfod

[PATCH v2 09/16] libelf: uid_t, gid_t and mode_t are not comes with msvcrt, so using long/unsigned long instead on win32

2022-12-17 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- libelf/libelf.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libelf/libelf.h b/libelf/libelf.h index a139e733..2fa3838b 100644 --- a/libelf/libelf.h +++ b/libelf/libelf.h @@ -195,9 +195,15 @@ typedef struct { char *ar_name; /* Name of

[PATCH v2 16/16] lib: Use HAVE_LIBINTL_H to guard #include

2022-12-17 Thread Yonggang Luo via Elfutils-devel
MSVC doesn't have libintl.h, so use macro to guard it. Signed-off-by: Yonggang Luo --- configure.ac| 2 ++ lib/eu-config.h | 7 +++ 2 files changed, 9 insertions(+) diff --git a/configure.ac b/configure.ac index b84623fe..aea12be3 100644 --- a/configure.ac +++ b/configure.ac @@ -441,6 +

[PATCH v2 14/16] Add function sys_get_page_size to replace platform dependent sysconf (_SC_PAGESIZE)

2022-12-17 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- lib/Makefile.am| 2 +- lib/crc32_file.c | 2 +- lib/system.c | 48 ++ lib/system.h | 3 +++ libdw/dwarf_begin_elf.c| 2 +- libdwelf/dwelf_strtab.c|

[PATCH v2 15/16] libelf: F_GETFD may not predefined with msvc/mingw, guard the usage of it

2022-12-17 Thread Yonggang Luo via Elfutils-devel
Signed-off-by: Yonggang Luo --- libelf/elf_begin.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c index 6d31882e..3d324694 100644 --- a/libelf/elf_begin.c +++ b/libelf/elf_begin.c @@ -1163,12 +1163,19 @@ elf_begin (int fildes, Elf_Cmd cmd, Elf *