pipe: Set errno upon failure.
[gnulib.git] / m4 / inttypes.m4
index 45bbac8..3ee174d 100644 (file)
@@ -1,5 +1,5 @@
-# inttypes.m4 serial 15
-dnl Copyright (C) 2006-2009 Free Software Foundation, Inc.
+# inttypes.m4 serial 17
+dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -11,6 +11,7 @@ AC_DEFUN([gl_INTTYPES_H],
 [
   AC_REQUIRE([gl_STDINT_H])
   AC_REQUIRE([gt_INTTYPES_PRI])
+  AC_CHECK_HEADERS_ONCE([inttypes.h])
   AC_CHECK_DECLS_ONCE([imaxabs])
   AC_CHECK_DECLS_ONCE([imaxdiv])
   AC_CHECK_DECLS_ONCE([strtoimax])
@@ -232,6 +233,11 @@ const char *l = /* implicit string concatenation */
   else
     UINT64_MAX_EQ_ULONG_MAX=-1
   fi
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[#include <inttypes.h>
+    ]], [imaxabs imaxdiv strtoimax strtoumax])
 ])
 
 # Define the symbol $1 to be 1 if the condition is true, 0 otherwise.