roland 570047
--- elfutils/ChangeLog
roland 570047
+++ elfutils/ChangeLog
roland 65b080
@@ -23,6 +23,17 @@
roland f995fa
 	* Makefile.am (all_SUBDIRS): Add libdwfl.
roland f995fa
 	* configure.ac: Write libdwfl/Makefile.
roland f995fa
 
roland f995fa
+2005-05-31  Roland McGrath  <roland@redhat.com>
roland 678843
+
roland 678843
+	* configure.ac (WEXTRA): Check for -Wextra and set this substitution.
roland 678843
+
roland f995fa
+ 	* configure.ac: Check for struct stat st_?tim members.
roland f995fa
+ 	* src/strip.c (process_file): Use st_?time if st_?tim are not there.
roland 678843
+
roland f995fa
+ 	* configure.ac: Check for futimes function.
roland f995fa
+ 	* src/strip.c (handle_elf) [! HAVE_FUTIMES]: Use utimes instead.
roland f995fa
+ 	(handle_ar) [! HAVE_FUTIMES]: Likewise.
roland 678843
+
roland f995fa
 2005-05-19  Roland McGrath  <roland@redhat.com>
roland 678843
 
roland f995fa
 	* configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros.
roland 570047
--- elfutils/config/Makefile.in
roland 570047
+++ elfutils/config/Makefile.in
roland 65b080
@@ -113,6 +113,7 @@ SHELL = @SHELL@
roland b73b6e
 STRIP = @STRIP@
roland b73b6e
 USE_NLS = @USE_NLS@
roland b73b6e
 VERSION = @VERSION@
roland b73b6e
+WEXTRA = @WEXTRA@
roland b73b6e
 XGETTEXT = @XGETTEXT@
roland b73b6e
 YACC = @YACC@
roland b73b6e
 ac_ct_CC = @ac_ct_CC@
roland 570047
--- elfutils/configure
roland 570047
+++ elfutils/configure
roland 65b080
@@ -276,7 +276,7 @@ PACKAGE_STRING='Red Hat elfutils 0.115'
roland b73b6e
 PACKAGE_BUGREPORT='http://bugzilla.redhat.com/bugzilla/'
roland b73b6e
 
roland b73b6e
 ac_unique_file="libelf/libelf.h"
roland 65b080
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MODVERSION build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE RANLIB ac_ct_RANLIB YACC LEX LEXLIB LEX_OUTPUT_ROOT LOCALEDIR DATADIRNAME NATIVE_LD_TRUE NATIVE_LD_FALSE base_cpu MUDFLAP_TRUE MUDFLAP_FALSE GPROF_TRUE GPROF_FALSE GCOV_TRUE GCOV_FALSE BUILD_STATIC_TRUE BUILD_STATIC_FALSE LIBEBL_SUBDIR USE_NLS MKINSTALLDIRS MSGFMT GMSGFMT XGETTEXT MSGMERGE LIBOBJS LTLIBOBJS'
roland 65b080
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MODVERSION build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE RANLIB ac_ct_RANLIB YACC LEX LEXLIB LEX_OUTPUT_ROOT WEXTRA LOCALEDIR DATADIRNAME NATIVE_LD_TRUE NATIVE_LD_FALSE base_cpu MUDFLAP_TRUE MUDFLAP_FALSE GPROF_TRUE GPROF_FALSE GCOV_TRUE GCOV_FALSE BUILD_STATIC_TRUE BUILD_STATIC_FALSE LIBEBL_SUBDIR USE_NLS MKINSTALLDIRS MSGFMT GMSGFMT XGETTEXT MSGMERGE LIBOBJS LTLIBOBJS'
roland b73b6e
 ac_subst_files=''
roland b73b6e
 
roland b73b6e
 # Initialize some variables set by options.
roland 65b080
@@ -3384,6 +3384,58 @@ echo "$as_me: error: gcc with C99 suppor
roland b73b6e
 fi
roland b73b6e
 
roland b73b6e
 
roland b73b6e
+echo "$as_me:$LINENO: checking for -Wextra option to $CC" >&5
roland b73b6e
+echo $ECHO_N "checking for -Wextra option to $CC... $ECHO_C" >&6
roland b73b6e
+if test "${ac_cv_cc_wextra+set}" = set; then
roland b73b6e
+  echo $ECHO_N "(cached) $ECHO_C" >&6
roland b73b6e
+else
roland b73b6e
+  old_CFLAGS="$CFLAGS"
roland b73b6e
+CFLAGS="$CFLAGS -Wextra"
roland b73b6e
+cat >conftest.$ac_ext <<_ACEOF
roland b73b6e
+void foo (void) { }
roland b73b6e
+_ACEOF
roland b73b6e
+rm -f conftest.$ac_objext
roland b73b6e
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
roland b73b6e
+  (eval $ac_compile) 2>conftest.er1
roland b73b6e
+  ac_status=$?
roland b73b6e
+  grep -v '^ *+' conftest.er1 >conftest.err
roland b73b6e
+  rm -f conftest.er1
roland b73b6e
+  cat conftest.err >&5
roland b73b6e
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
roland b73b6e
+  (exit $ac_status); } &&
roland b73b6e
+	 { ac_try='test -z "$ac_c_werror_flag"
roland b73b6e
+			 || test ! -s conftest.err'
roland b73b6e
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
roland b73b6e
+  (eval $ac_try) 2>&5
roland b73b6e
+  ac_status=$?
roland b73b6e
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
roland b73b6e
+  (exit $ac_status); }; } &&
roland b73b6e
+	 { ac_try='test -s conftest.$ac_objext'
roland b73b6e
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
roland b73b6e
+  (eval $ac_try) 2>&5
roland b73b6e
+  ac_status=$?
roland b73b6e
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
roland b73b6e
+  (exit $ac_status); }; }; then
roland b4dfab
+  ac_cv_cc_wextra=yes
roland b73b6e
+else
roland b73b6e
+  echo "$as_me: failed program was:" >&5
roland b73b6e
+sed 's/^/| /' conftest.$ac_ext >&5
roland b73b6e
+
roland b73b6e
+ac_cv_cc_wextra=no
roland b73b6e
+fi
roland b73b6e
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
roland b73b6e
+CFLAGS="$old_CFLAGS"
roland b73b6e
+fi
roland b73b6e
+echo "$as_me:$LINENO: result: $ac_cv_cc_wextra" >&5
roland b73b6e
+echo "${ECHO_T}$ac_cv_cc_wextra" >&6
roland b73b6e
+
roland f995fa
+if test "x$ac_cv_cc_wextra" = xyes; then
roland b73b6e
+  WEXTRA=-Wextra
roland 678843
+else
roland 678843
+  WEXTRA=-W
roland b73b6e
+fi
roland b73b6e
+
roland b73b6e
+
roland b73b6e
 LOCALEDIR=$datadir
roland b73b6e
 
roland b73b6e
 cat >>confdefs.h <<_ACEOF
roland 65b080
@@ -4925,6 +4977,7 @@ s,@YACC@,$YACC,;t t
roland b73b6e
 s,@LEX@,$LEX,;t t
roland b73b6e
 s,@LEXLIB@,$LEXLIB,;t t
roland b73b6e
 s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
roland b73b6e
+s,@WEXTRA@,$WEXTRA,;t t
roland b73b6e
 s,@LOCALEDIR@,$LOCALEDIR,;t t
roland b73b6e
 s,@DATADIRNAME@,$DATADIRNAME,;t t
roland b73b6e
 s,@NATIVE_LD_TRUE@,$NATIVE_LD_TRUE,;t t
roland 570047
--- elfutils/configure.ac
roland 570047
+++ elfutils/configure.ac
roland a0b693
@@ -69,6 +69,15 @@ CFLAGS="$old_CFLAGS"])
Jakub Jelinek a769ac
 AS_IF([test "x$ac_cv_c99" != xyes],
Jakub Jelinek a769ac
       AC_MSG_ERROR([gcc with C99 support required]))
Jakub Jelinek a769ac
 
Jakub Jelinek a769ac
+AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra, [dnl
Jakub Jelinek a769ac
+old_CFLAGS="$CFLAGS"
Jakub Jelinek a769ac
+CFLAGS="$CFLAGS -Wextra"
Jakub Jelinek a769ac
+AC_COMPILE_IFELSE([void foo (void) { }],
roland b4dfab
+		  ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no)
Jakub Jelinek a769ac
+CFLAGS="$old_CFLAGS"])
Jakub Jelinek a769ac
+AC_SUBST(WEXTRA)
roland f995fa
+AS_IF([test "x$ac_cv_cc_wextra" = xyes], [WEXTRA=-Wextra], [WEXTRA=-W])
Jakub Jelinek a769ac
+
Jakub Jelinek a769ac
 LOCALEDIR=$datadir
Jakub Jelinek a769ac
 AC_SUBST(LOCALEDIR)
Jakub Jelinek a769ac
 AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR")
roland 570047
--- elfutils/lib/ChangeLog
roland 570047
+++ elfutils/lib/ChangeLog
roland 65b080
@@ -12,6 +12,11 @@
roland 5fa386
 	* Makefile.am (libeu_a_SOURCES): Add it.
roland 5fa386
 	* system.h: Declare crc32_file.
roland 5fa386
 
Jakub Jelinek a769ac
+2005-02-07  Roland McGrath  <roland@redhat.com>
Jakub Jelinek a769ac
+
Jakub Jelinek a769ac
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
Jakub Jelinek a769ac
+	(AM_CFLAGS): Use it in place of -Wextra.
Jakub Jelinek a769ac
+
roland 5fa386
 2005-04-30  Ulrich Drepper  <drepper@redhat.com>
Jakub Jelinek a769ac
 
roland 5fa386
 	* Makefile.am: Use -ffunction-sections for xmalloc.c.
roland 570047
--- elfutils/lib/Makefile.am
roland 570047
+++ elfutils/lib/Makefile.am
roland b73b6e
@@ -16,12 +16,13 @@
Jakub Jelinek a769ac
 ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Jakub Jelinek a769ac
 ##
Jakub Jelinek a769ac
 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
Jakub Jelinek a769ac
+WEXTRA = @WEXTRA@
Jakub Jelinek a769ac
 if MUDFLAP
Jakub Jelinek a769ac
 AM_CFLAGS = -fmudflap
Jakub Jelinek a769ac
 else
Jakub Jelinek a769ac
 AM_CFLAGS =
Jakub Jelinek a769ac
 endif
Jakub Jelinek a769ac
-AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused -Wextra $($(*F)_CFLAGS)
Jakub Jelinek a769ac
+AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused $(WEXTRA) $($(*F)_CFLAGS)
Jakub Jelinek a769ac
 INCLUDES = -I$(srcdir)/../libelf -I..
Jakub Jelinek a769ac
 
Jakub Jelinek a769ac
 noinst_LIBRARIES = libeu.a
roland 570047
--- elfutils/lib/Makefile.in
roland 570047
+++ elfutils/lib/Makefile.in
roland 65b080
@@ -135,6 +135,7 @@ SHELL = @SHELL@
roland b73b6e
 STRIP = @STRIP@
roland b73b6e
 USE_NLS = @USE_NLS@
roland b73b6e
 VERSION = @VERSION@
roland b73b6e
+WEXTRA = @WEXTRA@
roland b73b6e
 XGETTEXT = @XGETTEXT@
roland b73b6e
 YACC = @YACC@
roland b73b6e
 ac_ct_CC = @ac_ct_CC@
roland 65b080
@@ -177,9 +178,9 @@ sharedstatedir = @sharedstatedir@
roland b73b6e
 sysconfdir = @sysconfdir@
roland b73b6e
 target_alias = @target_alias@
roland b73b6e
 @MUDFLAP_FALSE@AM_CFLAGS = -fpic -Wall -Wshadow -Werror -Wunused \
roland b73b6e
-@MUDFLAP_FALSE@	-Wextra $($(*F)_CFLAGS)
roland b73b6e
+@MUDFLAP_FALSE@	$(WEXTRA) $($(*F)_CFLAGS)
roland b73b6e
 @MUDFLAP_TRUE@AM_CFLAGS = -fmudflap -fpic -Wall -Wshadow -Werror \
roland b73b6e
-@MUDFLAP_TRUE@	-Wunused -Wextra $($(*F)_CFLAGS)
roland b73b6e
+@MUDFLAP_TRUE@	-Wunused $(WEXTRA) $($(*F)_CFLAGS)
roland b73b6e
 INCLUDES = -I$(srcdir)/../libelf -I..
roland b73b6e
 noinst_LIBRARIES = libeu.a
roland 5fa386
 libeu_a_SOURCES = xstrdup.c xstrndup.c xmalloc.c next_prime.c \
roland f995fa
--- elfutils/libasm/ChangeLog
roland f995fa
+++ elfutils/libasm/ChangeLog
roland 65b080
@@ -24,6 +24,11 @@
roland 2ca692
 	* asm_error.c: Add new error ASM_E_IOERROR.
roland 2ca692
 	* libasmP.h: Add ASM_E_IOERROR definition.
roland 2ca692
 
roland f995fa
+2005-05-31  Roland McGrath  <roland@redhat.com>
roland f995fa
+
roland f995fa
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
roland f995fa
+	(AM_CFLAGS): Use it in place of -Wextra.
roland f995fa
+
roland f995fa
 2005-02-15  Ulrich Drepper  <drepper@redhat.com>
roland f995fa
 
roland 2ca692
 	* Makefile.am (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
roland 570047
--- elfutils/libasm/Makefile.am
roland 570047
+++ elfutils/libasm/Makefile.am
roland b73b6e
@@ -13,12 +13,13 @@
Jakub Jelinek a769ac
 ## 3001 King Ranch Road, Ukiah, CA 95482.
Jakub Jelinek a769ac
 ##
Jakub Jelinek a769ac
 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
Jakub Jelinek a769ac
+WEXTRA = @WEXTRA@
Jakub Jelinek a769ac
 if MUDFLAP
Jakub Jelinek a769ac
 AM_CFLAGS = -fmudflap
Jakub Jelinek a769ac
 else
Jakub Jelinek a769ac
 AM_CFLAGS =
Jakub Jelinek a769ac
 endif
roland 2ca692
-AM_CFLAGS += -std=gnu99 -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2
roland 2ca692
+AM_CFLAGS += -std=gnu99 -Wall -Wshadow -Werror -Wunused $(WEXTRA) -Wformat=2
Jakub Jelinek a769ac
 INCLUDES = -I. -I$(srcdir) -I.. -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl \
Jakub Jelinek a769ac
 	   -I$(top_srcdir)/lib
Jakub Jelinek a769ac
 GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include)
roland 570047
--- elfutils/libasm/Makefile.in
roland 570047
+++ elfutils/libasm/Makefile.in
roland 65b080
@@ -167,6 +167,7 @@ SHELL = @SHELL@
roland b73b6e
 STRIP = @STRIP@
roland b73b6e
 USE_NLS = @USE_NLS@
roland b73b6e
 VERSION = 1
roland b73b6e
+WEXTRA = @WEXTRA@
roland b73b6e
 XGETTEXT = @XGETTEXT@
roland b73b6e
 YACC = @YACC@
roland b73b6e
 ac_ct_CC = @ac_ct_CC@
roland 65b080
@@ -209,9 +210,9 @@ sharedstatedir = @sharedstatedir@
roland b73b6e
 sysconfdir = @sysconfdir@
roland b73b6e
 target_alias = @target_alias@
roland 2ca692
 @MUDFLAP_FALSE@AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Werror -Wunused \
roland 2ca692
-@MUDFLAP_FALSE@	-Wextra -Wformat=2
roland 2ca692
+@MUDFLAP_FALSE@	$(WEXTRA) -Wformat=2
roland 2ca692
 @MUDFLAP_TRUE@AM_CFLAGS = -fmudflap -std=gnu99 -Wall -Wshadow -Werror \
roland 2ca692
-@MUDFLAP_TRUE@	-Wunused -Wextra -Wformat=2
roland 2ca692
+@MUDFLAP_TRUE@	-Wunused $(WEXTRA) -Wformat=2
roland b73b6e
 INCLUDES = -I. -I$(srcdir) -I.. -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl \
roland b73b6e
 	   -I$(top_srcdir)/lib
roland b73b6e
 
roland 570047
--- elfutils/libcpu/ChangeLog
roland 570047
+++ elfutils/libcpu/ChangeLog
roland 678843
@@ -1,3 +1,8 @@
roland 678843
+2005-04-04  Roland McGrath  <roland@redhat.com>
roland 678843
+
roland 678843
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
roland 678843
+	(AM_CFLAGS): Use it instead of -Wextra.
roland 678843
+
roland 678843
 2005-02-15  Ulrich Drepper  <drepper@redhat.com>
roland 678843
 
roland 678843
 	* Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
roland 570047
--- elfutils/libcpu/Makefile.am
roland 570047
+++ elfutils/libcpu/Makefile.am
roland c881c2
@@ -13,7 +13,8 @@
roland c881c2
 ## 3001 King Ranch Road, Ukiah, CA 95482.
roland c881c2
 ##
roland c881c2
 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
roland c881c2
-AM_CFLAGS = -Wall -Wshadow -Werror -Wextra -Wformat=2 -Wunused
roland c881c2
+WEXTRA = @WEXTRA@
roland c881c2
+AM_CFLAGS = -Wall -Wshadow -Werror $(WEXTRA) -Wformat=2 -Wunused
roland c881c2
 INCLUDES = -I$(srcdir)
roland c881c2
 
roland c881c2
 noinst_LIBRARIES = libcpu_i386.a
roland 570047
--- elfutils/libcpu/Makefile.in
roland 570047
+++ elfutils/libcpu/Makefile.in
roland 65b080
@@ -130,6 +130,7 @@ SHELL = @SHELL@
roland b73b6e
 STRIP = @STRIP@
roland b73b6e
 USE_NLS = @USE_NLS@
roland b73b6e
 VERSION = @VERSION@
roland b73b6e
+WEXTRA = @WEXTRA@
roland b73b6e
 XGETTEXT = @XGETTEXT@
roland b73b6e
 YACC = @YACC@
roland b73b6e
 ac_ct_CC = @ac_ct_CC@
roland 65b080
@@ -171,7 +172,7 @@ sbindir = @sbindir@
roland b73b6e
 sharedstatedir = @sharedstatedir@
roland b73b6e
 sysconfdir = @sysconfdir@
roland b73b6e
 target_alias = @target_alias@
roland b73b6e
-AM_CFLAGS = -Wall -Wshadow -Werror -Wextra -Wformat=2 -Wunused
roland b73b6e
+AM_CFLAGS = -Wall -Wshadow -Werror $(WEXTRA) -Wformat=2 -Wunused
roland b73b6e
 INCLUDES = -I$(srcdir)
roland b73b6e
 noinst_LIBRARIES = libcpu_i386.a
roland b73b6e
 libcpu_i386_a_SOURCES = i386_dis.c
roland f995fa
--- elfutils/libdw/ChangeLog
roland f995fa
+++ elfutils/libdw/ChangeLog
roland 65b080
@@ -140,6 +140,11 @@
roland f995fa
 
roland f995fa
 2005-05-31  Roland McGrath  <roland@redhat.com>
roland f995fa
 
roland f995fa
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
roland f995fa
+	(AM_CFLAGS): Use it in place of -Wextra.
roland f995fa
+
roland f995fa
+2005-05-31  Roland McGrath  <roland@redhat.com>
roland f995fa
+
roland f995fa
 	* dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
roland f995fa
 	formref offset.
roland f995fa
 
roland 570047
--- elfutils/libdw/Makefile.am
roland 570047
+++ elfutils/libdw/Makefile.am
roland b73b6e
@@ -13,12 +13,13 @@
Jakub Jelinek a769ac
 ## 3001 King Ranch Road, Ukiah, CA 95482.
Jakub Jelinek a769ac
 ##
roland f995fa
 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DIS_LIBDW
Jakub Jelinek a769ac
+WEXTRA = @WEXTRA@
Jakub Jelinek a769ac
 if MUDFLAP
Jakub Jelinek a769ac
 AM_CFLAGS = -fmudflap
Jakub Jelinek a769ac
 else
Jakub Jelinek a769ac
 AM_CFLAGS =
Jakub Jelinek a769ac
 endif
Jakub Jelinek a769ac
-AM_CFLAGS += -Wall -Werror -Wshadow -Wunused -Wformat=2 -Wextra -std=gnu99
Jakub Jelinek a769ac
+AM_CFLAGS += -Wall -Werror -Wshadow -Wunused -Wformat=2 $(WEXTRA) -std=gnu99
Jakub Jelinek a769ac
 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I.. -I$(srcdir)/../lib
Jakub Jelinek a769ac
 VERSION = 1
Jakub Jelinek a769ac
 
roland 570047
--- elfutils/libdw/Makefile.in
roland 570047
+++ elfutils/libdw/Makefile.in
roland 65b080
@@ -207,6 +207,7 @@ SHELL = @SHELL@
roland b73b6e
 STRIP = @STRIP@
roland b73b6e
 USE_NLS = @USE_NLS@
roland b73b6e
 VERSION = 1
roland b73b6e
+WEXTRA = @WEXTRA@
roland b73b6e
 XGETTEXT = @XGETTEXT@
roland b73b6e
 YACC = @YACC@
roland b73b6e
 ac_ct_CC = @ac_ct_CC@
roland 65b080
@@ -249,9 +250,9 @@ sharedstatedir = @sharedstatedir@
roland b73b6e
 sysconfdir = @sysconfdir@
roland b73b6e
 target_alias = @target_alias@
roland b73b6e
 @MUDFLAP_FALSE@AM_CFLAGS = -Wall -Werror -Wshadow -Wunused -Wformat=2 \
roland b73b6e
-@MUDFLAP_FALSE@	-Wextra -std=gnu99
roland b73b6e
+@MUDFLAP_FALSE@	$(WEXTRA) -std=gnu99
roland b73b6e
 @MUDFLAP_TRUE@AM_CFLAGS = -fmudflap -Wall -Werror -Wshadow -Wunused \
roland b73b6e
-@MUDFLAP_TRUE@	-Wformat=2 -Wextra -std=gnu99
roland b73b6e
+@MUDFLAP_TRUE@	-Wformat=2 $(WEXTRA) -std=gnu99
roland b73b6e
 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I.. -I$(srcdir)/../lib
roland 65b080
 COMPILE.os = $(filter-out -fprofile-arcs, $(filter-out -ftest-coverage, \
roland 65b080
 						       $(COMPILE)))
roland f995fa
--- elfutils/libdwfl/ChangeLog
roland f995fa
+++ elfutils/libdwfl/ChangeLog
roland 65b080
@@ -192,6 +192,11 @@
roland 469b3c
 
roland f995fa
 2005-07-21  Roland McGrath  <roland@redhat.com>
roland f995fa
 
roland f995fa
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
roland f995fa
+	(AM_CFLAGS): Use it in place of -Wextra.
roland f995fa
+
roland f995fa
+2005-07-21  Roland McGrath  <roland@redhat.com>
roland f995fa
+
roland f995fa
 	* Makefile.am (noinst_HEADERS): Add loc2c.c.
roland f995fa
 
roland f995fa
 	* test2.c (main): Check sscanf result to quiet warning.
roland f995fa
--- elfutils/libdwfl/Makefile.am
roland f995fa
+++ elfutils/libdwfl/Makefile.am
roland 850d0e
@@ -15,12 +15,13 @@
roland f995fa
 ## 3001 King Ranch Road, Ukiah, CA 95482.
roland f995fa
 ##
roland f995fa
 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
roland f995fa
+WEXTRA = @WEXTRA@
roland f995fa
 if MUDFLAP
roland f995fa
 AM_CFLAGS = -fmudflap
roland f995fa
 else
roland f995fa
 AM_CFLAGS =
roland f995fa
 endif
roland f995fa
-AM_CFLAGS += -Wall -Werror -Wshadow -Wunused -Wformat=2 -Wextra -std=gnu99
roland f995fa
+AM_CFLAGS += -Wall -Werror -Wshadow -Wunused -Wformat=2 $(WEXTRA) -std=gnu99
roland f995fa
 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
roland f995fa
 	   -I$(srcdir)/../libdw -I.. -I$(srcdir)/../lib
roland f995fa
 VERSION = 1
roland f995fa
--- elfutils/libdwfl/Makefile.in
roland f995fa
+++ elfutils/libdwfl/Makefile.in
roland 65b080
@@ -163,6 +163,7 @@ SHELL = @SHELL@
roland f995fa
 STRIP = @STRIP@
roland f995fa
 USE_NLS = @USE_NLS@
roland f995fa
 VERSION = 1
roland f995fa
+WEXTRA = @WEXTRA@
roland f995fa
 XGETTEXT = @XGETTEXT@
roland f995fa
 YACC = @YACC@
roland f995fa
 ac_ct_CC = @ac_ct_CC@
roland 65b080
@@ -205,9 +206,9 @@ sharedstatedir = @sharedstatedir@
roland f995fa
 sysconfdir = @sysconfdir@
roland f995fa
 target_alias = @target_alias@
roland f995fa
 @MUDFLAP_FALSE@AM_CFLAGS = -Wall -Werror -Wshadow -Wunused -Wformat=2 \
roland f995fa
-@MUDFLAP_FALSE@	-Wextra -std=gnu99
roland f995fa
+@MUDFLAP_FALSE@	$(WEXTRA) -std=gnu99
roland f995fa
 @MUDFLAP_TRUE@AM_CFLAGS = -fmudflap -Wall -Werror -Wshadow -Wunused \
roland f995fa
-@MUDFLAP_TRUE@	-Wformat=2 -Wextra -std=gnu99
roland f995fa
+@MUDFLAP_TRUE@	-Wformat=2 $(WEXTRA) -std=gnu99
roland f995fa
 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
roland f995fa
 	   -I$(srcdir)/../libdw -I.. -I$(srcdir)/../lib
roland f995fa
 
roland f995fa
--- elfutils/libebl/ChangeLog
roland f995fa
+++ elfutils/libebl/ChangeLog
roland 65b080
@@ -152,6 +152,11 @@
roland f995fa
 	* Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency
roland f995fa
 	tracking works right.
roland f995fa
 
roland f995fa
+2005-05-31  Roland McGrath  <roland@redhat.com>
roland f995fa
+
roland f995fa
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
roland f995fa
+	(AM_CFLAGS): Use it in place of -Wextra.
roland f995fa
+
roland f995fa
 2005-05-21  Ulrich Drepper  <drepper@redhat.com>
roland f995fa
 
roland f995fa
 	* libebl_x86_64.map: Add x86_64_core_note.
roland 570047
--- elfutils/libebl/Makefile.am
roland 570047
+++ elfutils/libebl/Makefile.am
roland b73b6e
@@ -13,12 +13,13 @@
Jakub Jelinek a769ac
 ## 3001 King Ranch Road, Ukiah, CA 95482.
Jakub Jelinek a769ac
 ##
Jakub Jelinek a769ac
 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DOBJDIR=\"$(shell pwd)\"
Jakub Jelinek a769ac
+WEXTRA = @WEXTRA@
Jakub Jelinek a769ac
 if MUDFLAP
Jakub Jelinek a769ac
 AM_CFLAGS = -fmudflap
Jakub Jelinek a769ac
 else
Jakub Jelinek a769ac
 AM_CFLAGS =
Jakub Jelinek a769ac
 endif
Jakub Jelinek a769ac
-AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 \
Jakub Jelinek a769ac
+AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused $(WEXTRA) -Wformat=2 \
Jakub Jelinek a769ac
 	     -std=gnu99
Jakub Jelinek a769ac
 
Jakub Jelinek a769ac
 INCLUDES = -I$(srcdir) -I$(top_srcdir)/libelf -I$(top_srcdir)/lib -I..
roland 570047
--- elfutils/libebl/Makefile.in
roland 570047
+++ elfutils/libebl/Makefile.in
roland 65b080
@@ -258,6 +258,7 @@ SHELL = @SHELL@
roland b73b6e
 STRIP = @STRIP@
roland b73b6e
 USE_NLS = @USE_NLS@
roland b73b6e
 VERSION = 1
roland b73b6e
+WEXTRA = @WEXTRA@
roland b73b6e
 XGETTEXT = @XGETTEXT@
roland b73b6e
 YACC = @YACC@
roland b73b6e
 ac_ct_CC = @ac_ct_CC@
roland 65b080
@@ -300,9 +301,9 @@ sharedstatedir = @sharedstatedir@
roland b73b6e
 sysconfdir = @sysconfdir@
roland b73b6e
 target_alias = @target_alias@
roland b73b6e
 @MUDFLAP_FALSE@AM_CFLAGS = -fpic -Wall -Wshadow -Werror -Wunused \
roland b73b6e
-@MUDFLAP_FALSE@	-Wextra -Wformat=2 -std=gnu99
roland b73b6e
+@MUDFLAP_FALSE@	$(WEXTRA) -Wformat=2 -std=gnu99
roland b73b6e
 @MUDFLAP_TRUE@AM_CFLAGS = -fmudflap -fpic -Wall -Wshadow -Werror \
roland b73b6e
-@MUDFLAP_TRUE@	-Wunused -Wextra -Wformat=2 -std=gnu99
roland b73b6e
+@MUDFLAP_TRUE@	-Wunused $(WEXTRA) -Wformat=2 -std=gnu99
roland b73b6e
 INCLUDES = -I$(srcdir) -I$(top_srcdir)/libelf -I$(top_srcdir)/lib -I..
roland b73b6e
 lib_LIBRARIES = libebl.a
roland f995fa
 modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64
roland f995fa
--- elfutils/libelf/ChangeLog
roland f995fa
+++ elfutils/libelf/ChangeLog
roland 65b080
@@ -86,6 +86,11 @@
roland 469b3c
 	If section content hasn't been read yet, do it before looking for the
roland 469b3c
 	block size.  If no section data present, infer size of section header.
roland 469b3c
 
roland f995fa
+2005-05-31  Roland McGrath  <roland@redhat.com>
roland f995fa
+
roland f995fa
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
roland f995fa
+	(AM_CFLAGS): Use it in place of -Wextra.
roland f995fa
+
roland f995fa
 2005-05-11  Ulrich Drepper  <drepper@redhat.com>
roland f995fa
 
roland f995fa
 	* elf.h: Update again.
roland f995fa
--- elfutils/libelf/common.h
roland f995fa
+++ elfutils/libelf/common.h
roland f995fa
@@ -122,7 +122,7 @@ libelf_release_all (Elf *elf)
roland f995fa
   (Var) = (sizeof (Var) == 1						      \
roland f995fa
 	   ? (unsigned char) (Var)					      \
roland f995fa
 	   : (sizeof (Var) == 2						      \
roland f995fa
-	      ? bswap_16 (Var)						      \
roland f995fa
+	      ? (unsigned short int) bswap_16 (Var)			      \
roland f995fa
 	      : (sizeof (Var) == 4					      \
roland f995fa
 		 ? bswap_32 (Var)					      \
roland f995fa
 		 : bswap_64 (Var))))
roland f995fa
@@ -131,7 +131,7 @@ libelf_release_all (Elf *elf)
roland f995fa
   (Dst) = (sizeof (Var) == 1						      \
roland f995fa
 	   ? (unsigned char) (Var)					      \
roland f995fa
 	   : (sizeof (Var) == 2						      \
roland f995fa
-	      ? bswap_16 (Var)						      \
roland f995fa
+	      ? (unsigned short int) bswap_16 (Var)			      \
roland f995fa
 	      : (sizeof (Var) == 4					      \
roland f995fa
 		 ? bswap_32 (Var)					      \
roland f995fa
 		 : bswap_64 (Var))))
roland 570047
--- elfutils/libelf/Makefile.am
roland 570047
+++ elfutils/libelf/Makefile.am
roland 511c10
@@ -16,6 +16,7 @@
Jakub Jelinek a769ac
 ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Jakub Jelinek a769ac
 ##
Jakub Jelinek a769ac
 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
Jakub Jelinek a769ac
+WEXTRA = @WEXTRA@
Jakub Jelinek a769ac
 if MUDFLAP
roland 511c10
 AM_CFLAGS = -fmudflap
Jakub Jelinek a769ac
 else
roland 850d0e
@@ -24,7 +25,10 @@ endif
roland 511c10
 if BUILD_STATIC
roland 511c10
 AM_CFLAGS += -fpic
Jakub Jelinek a769ac
 endif
Jakub Jelinek a769ac
-AM_CFLAGS += -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 -std=gnu99 \
roland 850d0e
+if BUILD_STATIC
roland 850d0e
+AM_CFLAGS += -fpic
roland 850d0e
+endif
Jakub Jelinek a769ac
+AM_CFLAGS += -Wall -Wshadow -Werror -Wunused $(WEXTRA) -Wformat=2 -std=gnu99 \
Jakub Jelinek a769ac
 	     $($(*F)_CFLAGS)
Jakub Jelinek a769ac
 INCLUDES = -I$(srcdir) -I$(top_srcdir)/lib -I..
Jakub Jelinek a769ac
 GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include)
roland 570047
--- elfutils/libelf/Makefile.in
roland 570047
+++ elfutils/libelf/Makefile.in
roland 850d0e
@@ -40,7 +40,7 @@ PRE_UNINSTALL = :
roland 850d0e
 POST_UNINSTALL = :
roland 850d0e
 build_triplet = @build@
roland 850d0e
 host_triplet = @host@
roland 850d0e
-@BUILD_STATIC_TRUE@am__append_1 = -fpic
roland 850d0e
+@BUILD_STATIC_TRUE@am__append_1 = -fpic -fpic
roland 850d0e
 @MUDFLAP_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1)
roland 850d0e
 @MUDFLAP_TRUE@am_libelf_pic_a_OBJECTS =
roland 850d0e
 subdir = libelf
roland 65b080
@@ -210,6 +210,7 @@ SHELL = @SHELL@
roland b73b6e
 STRIP = @STRIP@
roland b73b6e
 USE_NLS = @USE_NLS@
roland b73b6e
 VERSION = 1
roland b73b6e
+WEXTRA = @WEXTRA@
roland b73b6e
 XGETTEXT = @XGETTEXT@
roland b73b6e
 YACC = @YACC@
roland b73b6e
 ac_ct_CC = @ac_ct_CC@
roland 65b080
@@ -252,10 +253,10 @@ sharedstatedir = @sharedstatedir@
roland b73b6e
 sysconfdir = @sysconfdir@
roland b73b6e
 target_alias = @target_alias@
roland 511c10
 @MUDFLAP_FALSE@AM_CFLAGS = $(am__append_1) -Wall -Wshadow -Werror \
roland 511c10
-@MUDFLAP_FALSE@	-Wunused -Wextra -Wformat=2 -std=gnu99 \
roland 511c10
+@MUDFLAP_FALSE@	-Wunused $(WEXTRA) -Wformat=2 -std=gnu99 \
roland 511c10
 @MUDFLAP_FALSE@	$($(*F)_CFLAGS)
roland 511c10
 @MUDFLAP_TRUE@AM_CFLAGS = -fmudflap $(am__append_1) -Wall -Wshadow \
roland 511c10
-@MUDFLAP_TRUE@	-Werror -Wunused -Wextra -Wformat=2 -std=gnu99 \
roland 511c10
+@MUDFLAP_TRUE@	-Werror -Wunused $(WEXTRA) -Wformat=2 -std=gnu99 \
roland b73b6e
 @MUDFLAP_TRUE@	$($(*F)_CFLAGS)
roland b73b6e
 INCLUDES = -I$(srcdir) -I$(top_srcdir)/lib -I..
roland b73b6e
 GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include)
roland 570047
--- elfutils/m4/Makefile.in
roland 570047
+++ elfutils/m4/Makefile.in
roland 65b080
@@ -111,6 +111,7 @@ SHELL = @SHELL@
roland f995fa
 STRIP = @STRIP@
roland f995fa
 USE_NLS = @USE_NLS@
roland f995fa
 VERSION = @VERSION@
roland f995fa
+WEXTRA = @WEXTRA@
roland f995fa
 XGETTEXT = @XGETTEXT@
roland f995fa
 YACC = @YACC@
roland f995fa
 ac_ct_CC = @ac_ct_CC@
roland f995fa
--- elfutils/Makefile.in
roland f995fa
+++ elfutils/Makefile.in
roland 65b080
@@ -135,6 +135,7 @@ SHELL = @SHELL@
roland b73b6e
 STRIP = @STRIP@
roland b73b6e
 USE_NLS = @USE_NLS@
roland b73b6e
 VERSION = @VERSION@
roland b73b6e
+WEXTRA = @WEXTRA@
roland b73b6e
 XGETTEXT = @XGETTEXT@
roland b73b6e
 YACC = @YACC@
roland b73b6e
 ac_ct_CC = @ac_ct_CC@
roland f995fa
--- elfutils/src/ChangeLog
roland f995fa
+++ elfutils/src/ChangeLog
roland 65b080
@@ -216,6 +216,11 @@
roland f995fa
 	* readelf.c (print_debug_loc_section): Fix indentation for larger
roland f995fa
 	address size.
roland f995fa
 
roland f995fa
+2005-05-31  Roland McGrath  <roland@redhat.com>
roland f995fa
+
roland f995fa
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
roland f995fa
+	(AM_CFLAGS): Use it in place of -Wextra.
roland f995fa
+
roland f995fa
 2005-05-30  Roland McGrath  <roland@redhat.com>
roland f995fa
 
roland f995fa
 	* readelf.c (print_debug_line_section): Print section offset of each
roland f995fa
--- elfutils/src/findtextrel.c
roland f995fa
+++ elfutils/src/findtextrel.c
roland f995fa
@@ -476,7 +476,11 @@ ptrcompare (const void *p1, const void *
roland f995fa
 
roland f995fa
 
roland f995fa
 static void
roland f995fa
-check_rel (size_t nsegments, struct segments segments[nsegments],
roland f995fa
+check_rel (size_t nsegments, struct segments segments[
roland f995fa
+#if __GNUC__ >= 4
roland f995fa
+						      nsegments
roland f995fa
+#endif
roland f995fa
+	   ],
roland f995fa
 	   GElf_Addr addr, Elf *elf, Elf_Scn *symscn, Dwarf *dw,
roland f995fa
 	   const char *fname, bool more_than_one, void **knownsrcs)
roland f995fa
 {
roland 570047
--- elfutils/src/Makefile.am
roland 570047
+++ elfutils/src/Makefile.am
roland 850d0e
@@ -14,6 +14,7 @@
Jakub Jelinek a769ac
 ##
Jakub Jelinek a769ac
 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H $(YYDEBUG) \
Jakub Jelinek a769ac
        -DSRCDIR=\"$(shell cd $(srcdir);pwd)\" -DOBJDIR=\"$(shell pwd)\"
Jakub Jelinek a769ac
+WEXTRA = @WEXTRA@
Jakub Jelinek a769ac
 if MUDFLAP
roland 850d0e
 AM_CFLAGS = -fmudflap
Jakub Jelinek a769ac
 else
roland 850d0e
@@ -21,7 +22,7 @@ AM_CFLAGS =
Jakub Jelinek a769ac
 endif
roland 511c10
 AM_CFLAGS += -Wall -Wshadow -std=gnu99 $(native_ld_cflags) \
roland 511c10
 	     $(if $($(*F)_no_Werror),,-Werror) \
roland 511c10
-	     $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
roland 511c10
+	     $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \
roland 511c10
 	     $(if $($(*F)_no_Wformat),,-Wformat=2)
roland 511c10
 
roland fb15a5
 INCLUDES = -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
roland 570047
--- elfutils/src/Makefile.in
roland 570047
+++ elfutils/src/Makefile.in
roland 65b080
@@ -221,6 +221,7 @@ SHELL = @SHELL@
roland b73b6e
 STRIP = @STRIP@
roland b73b6e
 USE_NLS = @USE_NLS@
roland b73b6e
 VERSION = @VERSION@
roland b73b6e
+WEXTRA = @WEXTRA@
roland b73b6e
 XGETTEXT = @XGETTEXT@
roland b73b6e
 YACC = @YACC@ -d
roland b73b6e
 ac_ct_CC = @ac_ct_CC@
roland 65b080
@@ -265,12 +266,12 @@ target_alias = @target_alias@
roland 511c10
 @MUDFLAP_FALSE@AM_CFLAGS = -Wall -Wshadow -std=gnu99 \
roland 511c10
 @MUDFLAP_FALSE@	$(native_ld_cflags) $(if \
roland 511c10
 @MUDFLAP_FALSE@	$($(*F)_no_Werror),,-Werror) $(if \
roland 511c10
-@MUDFLAP_FALSE@	$($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
roland 511c10
+@MUDFLAP_FALSE@	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
roland 511c10
 @MUDFLAP_FALSE@	$($(*F)_no_Wformat),,-Wformat=2)
roland 850d0e
 @MUDFLAP_TRUE@AM_CFLAGS = -fmudflap -Wall -Wshadow -std=gnu99 \
roland 850d0e
 @MUDFLAP_TRUE@	$(native_ld_cflags) $(if \
roland 511c10
 @MUDFLAP_TRUE@	$($(*F)_no_Werror),,-Werror) $(if \
roland 511c10
-@MUDFLAP_TRUE@	$($(*F)_no_Wunused),,-Wunused -Wextra) $(if \
roland 511c10
+@MUDFLAP_TRUE@	$($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \
roland 511c10
 @MUDFLAP_TRUE@	$($(*F)_no_Wformat),,-Wformat=2)
roland fb15a5
 INCLUDES = -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
roland fb15a5
 	   -I$(srcdir)/../libdw -I$(srcdir)/../libdwfl \
roland 570047
--- elfutils/src/strip.c
roland 570047
+++ elfutils/src/strip.c
roland b73b6e
@@ -40,6 +40,12 @@
roland b73b6e
 #include <libebl.h>
roland b73b6e
 #include <system.h>
roland b73b6e
 
roland b73b6e
+#ifdef HAVE_FUTIMES
roland b73b6e
+# define FUTIMES(fd, fname, tvp) futimes (fd, tvp)
roland b73b6e
+#else
roland b73b6e
+# define FUTIMES(fd, fname, tvp) utimes (fname, tvp)
roland b73b6e
+#endif
roland b73b6e
+
roland b73b6e
 
roland b73b6e
 /* Name and version of program.  */
roland b73b6e
 static void print_version (FILE *stream, struct argp_state *state);
roland fb15a5
@@ -288,8 +294,18 @@ process_file (const char *fname)
Jakub Jelinek a769ac
 
Jakub Jelinek a769ac
       /* If we have to preserve the timestamp, we need it in the
Jakub Jelinek a769ac
 	 format utimes() understands.  */
Jakub Jelinek a769ac
+#ifdef HAVE_STRUCT_STAT_ST_ATIM
Jakub Jelinek a769ac
       TIMESPEC_TO_TIMEVAL (&tv[0], &pre_st.st_atim);
Jakub Jelinek a769ac
+#else
Jakub Jelinek a769ac
+      tv[0].tv_sec = pre_st.st_atime;
Jakub Jelinek a769ac
+      tv[0].tv_usec = 0;
Jakub Jelinek a769ac
+#endif
Jakub Jelinek a769ac
+#ifdef HAVE_STRUCT_STAT_ST_MTIM
Jakub Jelinek a769ac
       TIMESPEC_TO_TIMEVAL (&tv[1], &pre_st.st_mtim);
Jakub Jelinek a769ac
+#else
Jakub Jelinek a769ac
+      tv[1].tv_sec = pre_st.st_atime;
Jakub Jelinek a769ac
+      tv[1].tv_usec = 0;
Jakub Jelinek a769ac
+#endif
Jakub Jelinek a769ac
     }
Jakub Jelinek a769ac
 
Jakub Jelinek a769ac
   /* Open the file.  */
roland fb15a5
@@ -1679,7 +1695,7 @@ handle_elf (int fd, Elf *elf, const char
Jakub Jelinek a769ac
   /* If requested, preserve the timestamp.  */
Jakub Jelinek a769ac
   if (tvp != NULL)
Jakub Jelinek a769ac
     {
Jakub Jelinek a769ac
-      if (futimes (fd, tvp) != 0)
roland b73b6e
+      if (FUTIMES (fd, output_fname, tvp) != 0)
Jakub Jelinek a769ac
 	{
Jakub Jelinek a769ac
 	  error (0, errno, gettext ("\
roland 5fa386
 cannot set access and modification date of '%s'"),
roland fb15a5
@@ -1736,7 +1752,7 @@ handle_ar (int fd, Elf *elf, const char 
Jakub Jelinek a769ac
 
Jakub Jelinek a769ac
   if (tvp != NULL)
Jakub Jelinek a769ac
     {
Jakub Jelinek a769ac
-      if (unlikely (futimes (fd, tvp) != 0))
roland b73b6e
+      if (unlikely (FUTIMES (fd, fname, tvp) != 0))
Jakub Jelinek a769ac
 	{
Jakub Jelinek a769ac
 	  error (0, errno, gettext ("\
roland 5fa386
 cannot set access and modification date of '%s'"), fname);
roland f995fa
--- elfutils/tests/ChangeLog
roland f995fa
+++ elfutils/tests/ChangeLog
roland 65b080
@@ -161,6 +161,11 @@
roland f995fa
 	* Makefile.am (TESTS): Add run-elflint-test.sh.
roland f995fa
 	(EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2.
roland f995fa
 
roland f995fa
+2005-05-31  Roland McGrath  <roland@redhat.com>
roland f995fa
+
roland f995fa
+	* Makefile.am (WEXTRA): New variable, substituted by configure.
roland f995fa
+	(AM_CFLAGS): Use it in place of -Wextra.
roland f995fa
+
roland f995fa
 2005-05-24  Ulrich Drepper  <drepper@redhat.com>
roland f995fa
 
roland f995fa
 	* get-files.c (main): Use correct format specifier.
roland f995fa
--- elfutils/tests/Makefile.am
roland f995fa
+++ elfutils/tests/Makefile.am
roland 850d0e
@@ -13,12 +13,13 @@
roland f995fa
 ## 3001 King Ranch Road, Ukiah, CA 95482.
roland f995fa
 ##
roland f995fa
 DEFS = -DHAVE_CONFIG_H -D_GNU_SOURCE
roland f995fa
+WEXTRA = @WEXTRA@
roland f995fa
 if MUDFLAP
roland f995fa
-AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 -fmudflap\
roland f995fa
+AM_CFLAGS = -Wall -Werror $(WEXTRA) -std=gnu99 -fmudflap\
roland f995fa
 	    $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
roland 850d0e
 AM_LDFLAGS = -Wl,-rpath,\$$ORIGIN/../libebl
roland f995fa
 else
roland f995fa
-AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 \
roland f995fa
+AM_CFLAGS = -Wall -Werror $(WEXTRA) -std=gnu99 \
roland f995fa
 	    $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
roland f995fa
 AM_LDFLAGS = -Wl,-rpath,\$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../libebl:\$$ORIGIN/../libelf
roland f995fa
 endif
roland 570047
--- elfutils/tests/Makefile.in
roland 570047
+++ elfutils/tests/Makefile.in
roland 65b080
@@ -287,6 +287,7 @@ SHELL = @SHELL@
roland b73b6e
 STRIP = @STRIP@
roland b73b6e
 USE_NLS = @USE_NLS@
roland b73b6e
 VERSION = @VERSION@
roland b73b6e
+WEXTRA = @WEXTRA@
roland b73b6e
 XGETTEXT = @XGETTEXT@
roland b73b6e
 YACC = @YACC@
roland b73b6e
 ac_ct_CC = @ac_ct_CC@
roland 65b080
@@ -328,10 +329,10 @@ sbindir = @sbindir@
roland f995fa
 sharedstatedir = @sharedstatedir@
roland f995fa
 sysconfdir = @sysconfdir@
roland f995fa
 target_alias = @target_alias@
roland f995fa
-@MUDFLAP_FALSE@AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 \
roland f995fa
+@MUDFLAP_FALSE@AM_CFLAGS = -Wall -Werror $(WEXTRA) -std=gnu99 \
roland f995fa
 @MUDFLAP_FALSE@	    $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
roland f995fa
 
roland f995fa
-@MUDFLAP_TRUE@AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 -fmudflap\
roland f995fa
+@MUDFLAP_TRUE@AM_CFLAGS = -Wall -Werror $(WEXTRA) -std=gnu99 -fmudflap\
roland f995fa
 @MUDFLAP_TRUE@	    $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
roland f995fa
 
roland f995fa
 @MUDFLAP_FALSE@AM_LDFLAGS = -Wl,-rpath,\$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../libebl:\$$ORIGIN/../libelf