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

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

AC_DEFUN([jm_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)
])