diff -u pax-utils-0.1.2/Makefile pax-utils-0.1.2.ported/Makefile --- pax-utils-0.1.2/Makefile 2005-07-03 14:14:29 -0400 +++ pax-utils-0.1.2.ported/Makefile 2005-07-04 01:26:25 -0400 @@ -23,10 +23,10 @@ #################################################### WFLAGS := -Wall -Wunused -Wimplicit -Wshadow -Wformat=2 \ -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings \ - -Wbad-function-cast -Wnested-externs -Wcomment -Wsequence-point \ + -Wbad-function-cast -Wnested-externs -Wcomment \ -Wchar-subscripts -Wcast-align -Winline \ + $(call check_gcc, -Wsequence-point) \ $(call check_gcc, -Wdeclaration-after-statement -Wextra) - CFLAGS ?= -O2 -pipe #CFLAGS += -DEBUG -g #LDFLAGS := -pie Common subdirectories: pax-utils-0.1.2/man and pax-utils-0.1.2.ported/man diff -u pax-utils-0.1.2/paxelf.h pax-utils-0.1.2.ported/paxelf.h --- pax-utils-0.1.2/paxelf.h 2005-07-03 14:14:29 -0400 +++ pax-utils-0.1.2.ported/paxelf.h 2005-07-04 01:25:08 -0400 @@ -76,6 +76,7 @@ #define NORM COLOR("00", "00") #define RED COLOR("31", "01") #define YELLOW COLOR("33", "01") +#if 0 #define warn(fmt, args...) \ fprintf(stderr, "%s%s%s: " fmt "\n", RED, argv0, NORM, ## args) #define warnf(fmt, args...) warn("%s%s%s(): " fmt, YELLOW, __FUNCTION__, NORM, ## args) @@ -86,7 +87,17 @@ } while (0) #define err(fmt, args...) _err(warn, fmt, ## args) #define errf(fmt, args...) _err(warnf, fmt, ## args) +#else +#define warn(fmt, args...) +#define warnf(fmt, args...) +#define _err(wfunc, fmt, args...) \ + do { \ + exit(EXIT_FAILURE); \ + } while (0) +#define err(fmt, args...) _err(warn, fmt) +#define errf(fmt, args...) _err(warnf, fmt) +#endif /* PaX flags (to be read in elfhdr.e_flags) */ #define HF_PAX_PAGEEXEC 1 /* 0: Paging based non-exec pages */ #define HF_PAX_EMUTRAMP 2 /* 0: Emulate trampolines */ diff -u pax-utils-0.1.2/scanelf.c pax-utils-0.1.2.ported/scanelf.c --- pax-utils-0.1.2/scanelf.c 2005-07-03 14:14:29 -0400 +++ pax-utils-0.1.2.ported/scanelf.c 2005-07-04 01:25:49 -0400 @@ -52,7 +52,7 @@ static char *xstrdup(const char *s); static void *xmalloc(size_t size); static void xstrcat(char **dst, const char *src, size_t *curr_len); -static inline void xchrcat(char **dst, const char append, size_t *curr_len); +static void xchrcat(char **dst, const char append, size_t *curr_len); /* variables to control behavior */ static char *ldpaths[256]; @@ -1206,7 +1206,7 @@ strcat(*dst, src); } -static inline void xchrcat(char **dst, const char append, size_t *curr_len) +static void xchrcat(char **dst, const char append, size_t *curr_len) { static char my_app[2]; my_app[0] = append;