diff options
Diffstat (limited to 'm4/ungetc.m4')
-rw-r--r-- | m4/ungetc.m4 | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/m4/ungetc.m4 b/m4/ungetc.m4 index eb652356b5..e2a3f1fff4 100644 --- a/m4/ungetc.m4 +++ b/m4/ungetc.m4 @@ -13,21 +13,21 @@ AC_DEFUN_ONCE([gl_FUNC_UNGETC_WORKS], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]], [FILE *f; - if (!(f = fopen ("conftest.tmp", "w+"))) return 1; - if (fputs ("abc", f) < 0) return 2; - rewind (f); - if (fgetc (f) != 'a') return 3; - if (fgetc (f) != 'b') return 4; - if (ungetc ('d', f) != 'd') return 5; - if (ftell (f) != 1) return 6; - if (fgetc (f) != 'd') return 7; - if (ftell (f) != 2) return 8; - if (fseek (f, 0, SEEK_CUR) != 0) return 9; - if (ftell (f) != 2) return 10; - if (fgetc (f) != 'c') return 11; - fclose (f); remove ("conftest.tmp");])], - [gl_cv_func_ungetc_works=yes], [gl_cv_func_ungetc_works=no], - [gl_cv_func_ungetc_works='guessing no']) + if (!(f = fopen ("conftest.tmp", "w+"))) return 1; + if (fputs ("abc", f) < 0) return 2; + rewind (f); + if (fgetc (f) != 'a') return 3; + if (fgetc (f) != 'b') return 4; + if (ungetc ('d', f) != 'd') return 5; + if (ftell (f) != 1) return 6; + if (fgetc (f) != 'd') return 7; + if (ftell (f) != 2) return 8; + if (fseek (f, 0, SEEK_CUR) != 0) return 9; + if (ftell (f) != 2) return 10; + if (fgetc (f) != 'c') return 11; + fclose (f); remove ("conftest.tmp");])], + [gl_cv_func_ungetc_works=yes], [gl_cv_func_ungetc_works=no], + [gl_cv_func_ungetc_works='guessing no']) ]) if test "$gl_cv_func_ungetc_works" != yes; then AC_DEFINE([FUNC_UNGETC_BROKEN], [1], |