diff options
-rw-r--r-- | trunk/ChangeLog.cross | 14 | ||||
-rw-r--r-- | trunk/configure.in | 26 | ||||
-rw-r--r-- | trunk/src/Makefile.am | 8 | ||||
-rw-r--r-- | trunk/src/execstack.c | 6 | ||||
-rw-r--r-- | trunk/src/ld-libs.c | 6 | ||||
-rw-r--r-- | trunk/src/main.c | 4 | ||||
-rw-r--r-- | trunk/src/wrap-file.c | 2 |
7 files changed, 55 insertions, 11 deletions
diff --git a/trunk/ChangeLog.cross b/trunk/ChangeLog.cross index d57b3d3..1f200b2 100644 --- a/trunk/ChangeLog.cross +++ b/trunk/ChangeLog.cross @@ -2,7 +2,19 @@ * Integrate prelinker/cross-prelinking patches - 006-11-30 Mark Shinwell <shinwell@codesourcery.com> + 2006-11-30 Mark Shinwell <shinwell@codesourcery.com> + + * configure.in: Recognize --with-pkgversion and ---with-bugurl. + * src/Makefile.am: Pass package version and bug URL through + AM_CFLAGS, together with the new EXECSTACK_PROG. + * src/main.c: Use PKGVERSION and REPORT_BUGS_TO. + * src/execstack.c: Likewise. Also use EXECSTACK_PROG. + + Mark Hatle <mark.hatle@windriver.com> + * src/ld-libs.c: Use PRELINK_RTLD_PROG, PKGVERSION and REPORT_BUGS_TO + * src/execstack.c: Use EXECSTACK_PROG in (argp_doc) + + 2006-11-30 Mark Shinwell <shinwell@codesourcery.com> * wrap-file.c (wrap_stat_body): New. (wrap_lstat64, wrap_stat64): Use wrap_stat_body. diff --git a/trunk/configure.in b/trunk/configure.in index 86a2513..724262b 100644 --- a/trunk/configure.in +++ b/trunk/configure.in @@ -93,6 +93,32 @@ fi AC_LIBELF_SXWORD +# Package version. +AC_ARG_WITH(pkgversion, + AS_HELP_STRING([--with-pkgversion=PKG], + [Add PKG to the version string]), + [case "$withval" in + yes) AC_MSG_ERROR([package version not specified]) ;; + no) PKGVERSION= ;; + *) PKGVERSION=" ($withval)" ;; + esac], + PKGVERSION= +) +AC_SUBST(PKGVERSION) + +# The location to which bugs should be reported. +AC_ARG_WITH(bugurl, + AS_HELP_STRING([--with-bugurl=URL], + [Direct users to URL to report a bug]), + [case "$withval" in + yes) AC_MSG_ERROR([bug URL not specified]) ;; + no) REPORT_BUGS_TO="" ;; + *) REPORT_BUGS_TO="<URL:$withval>" ;; + esac], + REPORT_BUGS_TO="<jakub@redhat.com>" +) +AC_SUBST(REPORT_BUGS_TO) + AC_OUTPUT([Makefile src/Makefile gelfx/Makefile diff --git a/trunk/src/Makefile.am b/trunk/src/Makefile.am index 34760e9..5afb671 100644 --- a/trunk/src/Makefile.am +++ b/trunk/src/Makefile.am @@ -2,13 +2,19 @@ AUTOMAKE_OPTIONS = 1.4 gnu +PKGVERSION = "\"@PKGVERSION@\"" +REPORT_BUGS_TO = "\"@REPORT_BUGS_TO@\"" + DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -Wall AM_CFLAGS = -Wall AM_CPPFLAGS = -DSBINDIR='"@sbindir@"' -DBINDIR='"@bindir@"' \ + -DEXECSTACK_PROG="\"`echo execstack | sed '$(transform)'`\"" \ -DPRELINK_PROG="\"`echo prelink | sed '$(transform)'`\"" \ -DPRELINK_RTLD_PROG="\"`echo prelink-rtld | \ sed '$(transform)'`\"" \ - -DEXEEXT='"$(EXEEXT)"' + -DEXEEXT='"$(EXEEXT)"' \ + -DPKGVERSION=$(PKGVERSION) \ + -DREPORT_BUGS_TO=$(REPORT_BUGS_TO) INCLUDES = @GELFINCLUDE@ sbin_PROGRAMS = prelink prelink-rtld diff --git a/trunk/src/execstack.c b/trunk/src/execstack.c index 686e170..28ca9c8 100644 --- a/trunk/src/execstack.c +++ b/trunk/src/execstack.c @@ -32,11 +32,11 @@ int set; int execflag; -const char *argp_program_version = "execstack 1.0 (20061201) Wind River"; +const char *argp_program_version = EXECSTACK_PROG PKGVERSION " 1.0"; -const char *argp_program_bug_address = "<support@windriver.com>"; +const char *argp_program_bug_address = REPORT_BUGS_TO; -static char argp_doc[] = "execstack -- program to query or set executable stack flag"; +static char argp_doc[] = EXECSTACK_PROG " -- program to query or set executable stack flag"; static struct argp_option options[] = { {"set-execstack", 's', 0, 0, "Set executable stack flag bit" }, diff --git a/trunk/src/ld-libs.c b/trunk/src/ld-libs.c index d159821..4694174 100644 --- a/trunk/src/ld-libs.c +++ b/trunk/src/ld-libs.c @@ -44,11 +44,11 @@ int host_paths; void string_to_path (struct search_path *path, const char *string); -const char *argp_program_version = "prelink-rtld 1.0 (20061201) Wind River Linux"; +const char *argp_program_version = PRELINK_RTLD_PROG PKGVERSION " 1.0"; -const char *argp_program_bug_address = "<support@windriver.com>"; +const char *argp_program_bug_address = REPORT_BUGS_TO; -static char argp_doc[] = "prelink-rtld -- program to simulate the runtime linker"; +static char argp_doc[] = PRELINK_RTLD_PROG " -- program to simulate the runtime linker"; #define OPT_SYSROOT 0x8c #define OPT_LIBRARY_PATH 0x8e diff --git a/trunk/src/main.c b/trunk/src/main.c index e7e87c9..7c3e1a4 100644 --- a/trunk/src/main.c +++ b/trunk/src/main.c @@ -61,9 +61,9 @@ const char *undo_output; int noreexecinit; time_t initctime; -const char *argp_program_version = PRELINK_PROG "1.0 (20061201) Wind River Linux"; +const char *argp_program_version = PRELINK_PROG PKGVERSION " 1.0"; -const char *argp_program_bug_address = "<support@windriver.com>"; +const char *argp_program_bug_address = REPORT_BUGS_TO; static char argp_doc[] = PRELINK_PROG " -- program to relocate and prelink ELF shared libraries and programs"; diff --git a/trunk/src/wrap-file.c b/trunk/src/wrap-file.c index 6b0c3f1..6218f41 100644 --- a/trunk/src/wrap-file.c +++ b/trunk/src/wrap-file.c @@ -334,7 +334,7 @@ wrap_stat_body (const char *file, struct stat64 *buf, int lstat) return -1; len = strlen (file_copy); - if (len && file_copy[len - 1] == '/' || file_copy[len - 1] == '\\')) + if (len && (file_copy[len - 1] == '/' || file_copy[len - 1] == '\\')) file_copy[len - 1] = '\0'; ret = lstat ? lstat64 (file_copy, buf) : stat64 (file_copy, buf); |