maint: avoid compiler warnings in m4 macros
authorEric Blake <ebb9@byu.net>
Mon, 2 Nov 2009 13:03:20 +0000 (06:03 -0700)
committerEric Blake <ebb9@byu.net>
Mon, 2 Nov 2009 13:14:55 +0000 (06:14 -0700)
* m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Avoid unused variable.
* m4/rmdir.m4 (gl_FUNC_RMDIR): Include correct header.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
m4/rmdir.m4
m4/ungetc.m4

index bcc837e..8fd4b77 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-11-02  Eric Blake  <ebb9@byu.net>
+
+       maint: avoid compiler warnings in m4 macros
+       * m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Avoid unused variable.
+       * m4/rmdir.m4 (gl_FUNC_RMDIR): Include correct header.
+
 2009-11-02  Simon Josefsson  <simon@josefsson.org>
 
        * m4/pmccabe2html.m4: Remove file.
index addd69d..599b789 100644 (file)
@@ -1,4 +1,4 @@
-# rmdir.m4 serial 6
+# rmdir.m4 serial 7
 dnl Copyright (C) 2002, 2005, 2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -30,6 +30,7 @@ AC_DEFUN([gl_FUNC_RMDIR],
          [AC_LANG_PROGRAM(
            [[#include <stdio.h>
              #include <errno.h>
+             #include <unistd.h>
 ]], [[return !rmdir ("conftest.file/") || errno != ENOTDIR
        || !rmdir ("conftest.dir/./");]])],
          [gl_cv_func_rmdir_works=yes], [gl_cv_func_rmdir_works=no],
index 9236d4c..eb65235 100644 (file)
@@ -1,4 +1,4 @@
-# ungetc.m4 serial 1
+# ungetc.m4 serial 2
 dnl Copyright (C) 2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -12,7 +12,7 @@ AC_DEFUN_ONCE([gl_FUNC_UNGETC_WORKS],
     [gl_cv_func_ungetc_works],
     [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
 #include <stdio.h>
-      ]], [FILE *f; long l;
+      ]], [FILE *f;
           if (!(f = fopen ("conftest.tmp", "w+"))) return 1;
           if (fputs ("abc", f) < 0) return 2;
           rewind (f);