view m4/fseeko.m4 @ 8713:aad7ea346fbf

Make the combination of fflush and fseek/fseeko POSIX compliant.
author Bruno Haible <bruno@clisp.org>
date Wed, 25 Apr 2007 09:14:49 +0000
parents 53c8c606b9b7
children c541fe12ef9e
line wrap: on
line source

# fseeko.m4 serial 1
dnl Copyright (C) 2007 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.

AC_DEFUN([gl_FUNC_FSEEKO],
[
  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
  gl_CHECK_FSEEKO
  if test $gl_cv_func_fseeko = no; then
    HAVE_FSEEKO=0
  fi
])

AC_DEFUN([gl_CHECK_FSEEKO],
[
  AC_REQUIRE([AC_PROG_CC])
  AC_CACHE_CHECK([for fseeko], [gl_cv_func_fseeko],
    [
      AC_TRY_LINK([#include <stdio.h>], [fseeko (stdin, 0, 0);],
        [gl_cv_func_fseeko=yes], [gl_cv_func_fseeko=no])
    ])
])