bump standards-version
[gnulib.git] / m4 / nanosleep.m4
index 233f1c1..8c66940 100644 (file)
@@ -1,11 +1,11 @@
-# serial 32
+# serial 34
 
 dnl From Jim Meyering.
 dnl Check for the nanosleep function.
 dnl If not found, use the supplied replacement.
 dnl
 
 
 dnl From Jim Meyering.
 dnl Check for the nanosleep function.
 dnl If not found, use the supplied replacement.
 dnl
 
-# Copyright (C) 1999-2001, 2003-2011 Free Software Foundation, Inc.
+# Copyright (C) 1999-2001, 2003-2012 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -58,7 +58,7 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
           #define TYPE_MAXIMUM(t) \
             ((t) (! TYPE_SIGNED (t) \
                   ? (t) -1 \
           #define TYPE_MAXIMUM(t) \
             ((t) (! TYPE_SIGNED (t) \
                   ? (t) -1 \
-                  : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
+                  : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
 
           static void
           check_for_SIGALRM (int sig)
 
           static void
           check_for_SIGALRM (int sig)
@@ -121,10 +121,6 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
    HAVE_NANOSLEEP=0
  fi
  LIBS=$nanosleep_save_libs
    HAVE_NANOSLEEP=0
  fi
  LIBS=$nanosleep_save_libs
- if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then
-   AC_LIBOBJ([nanosleep])
-   gl_PREREQ_NANOSLEEP
- fi
 ])
 
 # Prerequisites of lib/nanosleep.c.
 ])
 
 # Prerequisites of lib/nanosleep.c.