summaryrefslogtreecommitdiff
path: root/m4/ftruncate.m4
blob: b2ce6dd568dc93b254b4b252de2ed9a231315dfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#serial 6

# See if we need to emulate a missing ftruncate function using fcntl or chsize.

AC_DEFUN([gl_FUNC_FTRUNCATE],
[
  AC_REPLACE_FUNCS(ftruncate)
  if test $ac_cv_func_ftruncate = no; then
    gl_PREREQ_FTRUNCATE
  fi
])

# Prerequisites of lib/ftruncate.c.
AC_DEFUN([gl_PREREQ_FTRUNCATE],
[
  AC_CHECK_HEADERS_ONCE(unistd.h)
  AC_CHECK_FUNCS(chsize)
])