diff options
| author | Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp> | 2016-10-11 23:06:48 +0900 |
|---|---|---|
| committer | Mark Wielaard <mjw@redhat.com> | 2016-10-12 15:43:14 +0200 |
| commit | 60b2bf1b08c621492410b24e469b2bdf58d167d5 (patch) | |
| tree | 9a9f16d5a686b42469c190a7d3b0bd245344dc48 /libelf | |
| parent | 7bf4b63a4980788e6c1969cae02f0483e79c069f (diff) | |
| download | platform_external_elfutils-60b2bf1b08c621492410b24e469b2bdf58d167d5.tar.gz platform_external_elfutils-60b2bf1b08c621492410b24e469b2bdf58d167d5.tar.bz2 platform_external_elfutils-60b2bf1b08c621492410b24e469b2bdf58d167d5.zip | |
lib: Provide MAX and MIN in system.h
This change also creates a new header file libeu.h to provide the
prototypes for the function of libeu. That hides the definition of function
crc32, which can conflict with zlib, from libelf. It also prevents mistakes
to refer those functions from a component which doesn't link with libeu,
such as libelf.
Signed-off-by: Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
Diffstat (limited to 'libelf')
| -rw-r--r-- | libelf/ChangeLog | 8 | ||||
| -rw-r--r-- | libelf/elf32_updatefile.c | 1 | ||||
| -rw-r--r-- | libelf/elf32_updatenull.c | 2 | ||||
| -rw-r--r-- | libelf/elf_begin.c | 1 | ||||
| -rw-r--r-- | libelf/elf_compress.c | 6 |
5 files changed, 10 insertions, 8 deletions
diff --git a/libelf/ChangeLog b/libelf/ChangeLog index 77991446..cf672bf2 100644 --- a/libelf/ChangeLog +++ b/libelf/ChangeLog @@ -1,3 +1,11 @@ +2015-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp> + + * elf32_updatefile.c: Remove sys/param.h include. + * elf32_updatenull.c: Likewise. Add system.h include. + * elf_begin.c: Remove sys/param.h. + * elf_compress: Likewise. Add system.h include. + (MAX): Remove definition. + 2016-08-07 Mark Wielaard <mjw@redhat.com> * elf_compress.c (__libelf_reset_rawdata): Check scn->flags and diff --git a/libelf/elf32_updatefile.c b/libelf/elf32_updatefile.c index d0fabb16..8dd85d1a 100644 --- a/libelf/elf32_updatefile.c +++ b/libelf/elf32_updatefile.c @@ -39,7 +39,6 @@ #include <string.h> #include <unistd.h> #include <sys/mman.h> -#include <sys/param.h> #include <system.h> #include "libelfP.h" diff --git a/libelf/elf32_updatenull.c b/libelf/elf32_updatenull.c index 939aa13e..d83c0b3f 100644 --- a/libelf/elf32_updatenull.c +++ b/libelf/elf32_updatenull.c @@ -36,8 +36,8 @@ #include <libelf.h> #include <stdbool.h> #include <string.h> -#include <sys/param.h> +#include <system.h> #include "libelfP.h" #include "elf-knowledge.h" diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c index 147f5f4b..8fdb3764 100644 --- a/libelf/elf_begin.c +++ b/libelf/elf_begin.c @@ -40,7 +40,6 @@ #include <string.h> #include <unistd.h> #include <sys/mman.h> -#include <sys/param.h> #include <sys/stat.h> #include <system.h> diff --git a/libelf/elf_compress.c b/libelf/elf_compress.c index 3aebe820..dac0ac6d 100644 --- a/libelf/elf_compress.c +++ b/libelf/elf_compress.c @@ -31,20 +31,16 @@ #endif #include <libelf.h> +#include <system.h> #include "libelfP.h" #include "common.h" #include <stddef.h> #include <stdlib.h> #include <string.h> -#include <sys/param.h> #include <unistd.h> #include <zlib.h> -#ifndef MAX -# define MAX(a, b) ((a) > (b) ? (a) : (b)) -#endif - /* Cleanup and return result. Don't leak memory. */ static void * do_deflate_cleanup (void *result, z_stream *z, void *out_buf, |
