Debian Codegraph @

tools/gnulib/m4/off64_t.m4

raw
1 # off64_t.m4
2 # serial 1
3 dnl Copyright (C) 2024 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
7
8 dnl Check whether <sys/types.h> defines the 'off64_t' type.
9 dnl Set HAVE_OFF64_T.
10
11 AC_DEFUN([gl_TYPE_OFF64_T],
12 [
13 dnl Persuade glibc <sys/types.h>, <stdio.h>, <fcntl.h>, <unistd.h>, <aio.h>
14 dnl to define off64_t.
15 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
16
17 AC_CACHE_CHECK([for off64_t], [gl_cv_off64_t],
18 [AC_COMPILE_IFELSE(
19 [AC_LANG_PROGRAM(
20 [[#include <sys/types.h>]],
21 [[int x = sizeof (off64_t *) + sizeof (off64_t);
22 return !x;]])],
23 [gl_cv_off64_t=yes], [gl_cv_off64_t=no])])
24
25 if test $gl_cv_off64_t != no; then
26 HAVE_OFF64_T=1
27 else
28 HAVE_OFF64_T=0
29 fi
30 AC_SUBST([HAVE_OFF64_T])
31 ])