| 1 |
dnl Copyright (c) 2005-2021, Christopher C. Hulbert |
| 2 |
dnl All rights reserved. |
| 3 |
dnl |
| 4 |
dnl Redistribution and use in source and binary forms, with or without |
| 5 |
dnl modification, are permitted provided that the following conditions are met: |
| 6 |
dnl |
| 7 |
dnl 1. Redistributions of source code must retain the above copyright notice, this |
| 8 |
dnl list of conditions and the following disclaimer. |
| 9 |
dnl |
| 10 |
dnl 2. Redistributions in binary form must reproduce the above copyright notice, |
| 11 |
dnl this list of conditions and the following disclaimer in the documentation |
| 12 |
dnl and/or other materials provided with the distribution. |
| 13 |
dnl |
| 14 |
dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 15 |
dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 16 |
dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 17 |
dnl DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
| 18 |
dnl FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 19 |
dnl DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 20 |
dnl SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 21 |
dnl CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 22 |
dnl OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 |
dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 |
AC_DEFUN([AC_TYPE_OFF64_T], |
| 25 |
[ |
| 26 |
AC_MSG_CHECKING([for off64_t]) |
| 27 |
|
| 28 |
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
| 29 |
#define _FILE_OFFSET_BITS 64 |
| 30 |
#include <sys/types.h> |
| 31 |
]], [[off64_t off = 42;]])],[ac_cv_type_off64_t=yes],[ac_cv_type_off64_t=no]) |
| 32 |
if test $ac_cv_type_off64_t = yes; |
| 33 |
then |
| 34 |
AC_DEFINE(HAVE_OFF64_T, [], [whether off64_t is defined in sys/types.h using _LARGEFILE64_SOURCE]) |
| 35 |
fi |
| 36 |
if test "x$ac_cv_type_off64_t" != "xyes" |
| 37 |
then |
| 38 |
AC_MSG_RESULT([yes]) |
| 39 |
else |
| 40 |
AC_MSG_RESULT([no]) |
| 41 |
fi |
| 42 |
]) |