mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
Large file support.
Dumping checks for stat64(), since flags from --enable-largefile will solve this
This commit is contained in:
34
m4/largefile.m4
Normal file
34
m4/largefile.m4
Normal file
@ -0,0 +1,34 @@
|
||||
dnl
|
||||
dnl $Id$
|
||||
dnl
|
||||
dnl Copyright (c) 2009 edelib authors
|
||||
dnl Copyright 1998-2007 by Bill Spitzak and others.
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU Lesser General Public
|
||||
dnl License as published by the Free Software Foundation; either
|
||||
dnl version 2 of the License, or (at your option) any later version.
|
||||
dnl
|
||||
dnl This library is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl Lesser General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU Lesser General Public License
|
||||
dnl along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
AC_DEFUN([EDE_LARGEFILE], [
|
||||
AC_ARG_ENABLE(largefile, [ --enable-largefile enable large file support],,[enable_largefile=no])
|
||||
LARGEFILE=""
|
||||
|
||||
if test "$enable_largefile" = yes; then
|
||||
LARGEFILE="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
|
||||
if test "x$ac_cv_sys_large_files" = "x1"; then
|
||||
LARGEFILE="$LARGEFILE -D_LARGE_FILES"
|
||||
fi
|
||||
|
||||
if test "x$ac_cv_sys_file_offset_bits" = "x64"; then
|
||||
LARGEFILE="$LARGEFILE -D_FILE_OFFSET_BITS=64"
|
||||
fi
|
||||
fi
|
||||
])
|
32
m4/stat64.m4
32
m4/stat64.m4
@ -1,32 +0,0 @@
|
||||
dnl
|
||||
dnl $Id$
|
||||
dnl
|
||||
dnl Part of edelib.
|
||||
dnl Copyright (c) 2009 EDE Authors.
|
||||
dnl
|
||||
dnl This program is licenced under terms of the
|
||||
dnl GNU General Public Licence version 2 or newer.
|
||||
dnl See COPYING for details.
|
||||
|
||||
AC_DEFUN([EDE_CHECK_STAT64], [
|
||||
AC_MSG_CHECKING([for stat64])
|
||||
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
AC_TRY_COMPILE([
|
||||
/* C++ already defines this, but C does not and 'struct stat64' will not be seen */
|
||||
#define _LARGEFILE64_SOURCE 1
|
||||
#include <sys/stat.h>
|
||||
],[
|
||||
struct stat64 s;
|
||||
stat64("/", &s);
|
||||
],[have_stat64=yes],[have_stat64=no])
|
||||
AC_LANG_RESTORE
|
||||
|
||||
if eval "test $have_stat64 = yes"; then
|
||||
AC_DEFINE(HAVE_STAT64, 1, [Define to 1 if you have stat64])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
])
|
Reference in New Issue
Block a user