]> git.eshelyaron.com Git - emacs.git/commitdiff
Merge from gnulib.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 25 Sep 2013 03:44:34 +0000 (20:44 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 25 Sep 2013 03:44:34 +0000 (20:44 -0700)
This incorporates:
2013-09-24 manywarnings: enable nicer gcc warning messages
2013-09-23 warnings: port --enable-gcc-warnings to Solaris Studio 12.3
2013-09-21 timespec: use the new TIMESPEC_RESOLUTION elsewhere
* configure.ac (WERROR_CFLAGS): Omit -fdiagnostics-show-option
and -funit-at-a-time, since manywarnings does that for us now.

ChangeLog
configure.ac
lib/timespec-add.c
lib/timespec-sub.c
m4/manywarnings.m4
m4/warnings.m4

index d2a27b7b6ee4c1d3b44b667607e3258b1a4357a5..f8a219d6a155f58139a1d44305d9c5a6db279297 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2013-09-25  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Merge from gnulib, incorporating:
+       2013-09-24 manywarnings: enable nicer gcc warning messages
+       2013-09-23 warnings: port --enable-gcc-warnings to Solaris Studio 12.3
+       2013-09-21 timespec: use the new TIMESPEC_RESOLUTION elsewhere
+       * configure.ac (WERROR_CFLAGS): Omit -fdiagnostics-show-option
+       and -funit-at-a-time, since manywarnings does that for us now.
+
 2013-09-23  Jan Djärv  <jan.h.d@swipnet.se>
 
        * configure.ac: With clang, check for and use -Wno-switch,
index 16259f01ed27b2fe6b760353e5d81555fcf65ab3..53426b67e45827f5598cd9eae65f500e0fd800ce 100644 (file)
@@ -886,9 +886,6 @@ else
     gl_WARN_ADD([-Wno-unused-value])
   fi
 
-  gl_WARN_ADD([-fdiagnostics-show-option])
-  gl_WARN_ADD([-funit-at-a-time])
-
   AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.])
   AH_VERBATIM([FORTIFY_SOURCE],
   [/* Enable compile-time and run-time bounds-checking, and some warnings,
index 51323a63207d50eb25dcc16b7d658629da8cecc1..d628237fe5683ba09eaf9d54eaeeb8004bf1c32c 100644 (file)
@@ -18,7 +18,7 @@
 /* Written by Paul Eggert.  */
 
 /* Return the sum of two timespec values A and B.  On overflow, return
-   an extremal value.  This assumes 0 <= tv_nsec <= 999999999.  */
+   an extremal value.  This assumes 0 <= tv_nsec < TIMESPEC_RESOLUTION.  */
 
 #include <config.h>
 #include "timespec.h"
@@ -58,7 +58,7 @@ timespec_add (struct timespec a, struct timespec b)
         {
         high_overflow:
           rs = TYPE_MAXIMUM (time_t);
-          rns = 999999999;
+          rns = TIMESPEC_RESOLUTION - 1;
         }
     }
   else
index b164a8380d0b2ce4beffcf11b915d57184b74d25..3f3adea28d6f1f6923a19252376179c6c0bcc6f0 100644 (file)
@@ -18,8 +18,8 @@
 /* Written by Paul Eggert.  */
 
 /* Return the difference between two timespec values A and B.  On
-   overflow, return an extremal value.  This assumes 0 <= tv_nsec <=
-   999999999.  */
+   overflow, return an extremal value.  This assumes 0 <= tv_nsec <
+   TIMESPEC_RESOLUTION.  */
 
 #include <config.h>
 #include "timespec.h"
@@ -58,7 +58,7 @@ timespec_sub (struct timespec a, struct timespec b)
       else
         {
           rs = TYPE_MAXIMUM (time_t);
-          rns = 999999999;
+          rns = TIMESPEC_RESOLUTION - 1;
         }
     }
   else
index be6d4c91c50eebc6dbacf962fac9b3cf651ef4ba..80b2476d2505a254ebd24b77abbdfc0f9c765e2d 100644 (file)
@@ -1,4 +1,4 @@
-# manywarnings.m4 serial 5
+# manywarnings.m4 serial 6
 dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -204,6 +204,8 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
     -Wvla \
     -Wvolatile-register-var \
     -Wwrite-strings \
+    -fdiagnostics-show-option \
+    -funit-at-a-time \
     \
     ; do
     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
index 5f5da51606b2f905205512b57601a6e4c83a7216..e3d239b64ffbc737d4f6ce993355c477a4884925 100644 (file)
@@ -1,4 +1,4 @@
-# warnings.m4 serial 10
+# warnings.m4 serial 11
 dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -36,9 +36,9 @@ AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], m4_defn([gl_Warn]), [
   gl_save_compiler_FLAGS="$gl_Flags"
   gl_AS_VAR_APPEND(m4_defn([gl_Flags]),
     [" $gl_unknown_warnings_are_errors ]m4_defn([gl_Positive])["])
-  AC_COMPILE_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([])])],
-                    [AS_VAR_SET(gl_Warn, [yes])],
-                    [AS_VAR_SET(gl_Warn, [no])])
+  AC_LINK_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([])])],
+                 [AS_VAR_SET(gl_Warn, [yes])],
+                 [AS_VAR_SET(gl_Warn, [no])])
   gl_Flags="$gl_save_compiler_FLAGS"
 ])
 AS_VAR_IF(gl_Warn, [yes], [$2], [$3])