1
0
mirror of https://github.com/PDP-10/klh10.git synced 2026-02-26 16:54:11 +00:00

Let configure check for Large File Support

This commit is contained in:
Olaf Seibert
2016-01-20 23:10:42 +01:00
parent 0ac7cd4cdb
commit 8d683650f7
2 changed files with 31 additions and 1 deletions

View File

@@ -127,6 +127,22 @@ then
echo 'Compiling without bridge support'
fi
# -------------------------------------------------------------------------
# Check large file support and the sizes of related types
# -------------------------------------------------------------------------
AC_SYS_LARGEFILE
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
# Only try to find the size of off_t if it really exists
if test "x$ac_cv_type_off_t" = xyes
then
AC_CHECK_SIZEOF(off_t)
else
AC_DEFINE([SIZEOF_OFF_T], [0])
fi
# -------------------------------------------------------------------------
# Output section. State which @VARIABLES@ are going to be substituted
# -------------------------------------------------------------------------

View File

@@ -250,10 +250,24 @@
*/
#ifndef CENV_SYSF_LFS /* Predefining this must predefine the rest */
# if defined(SIZEOF_OFF_T) /* system inspected by configure */
# if SIZEOF_OFF_T == 0 || SIZEOF_OFF_T == 4
# define CENV_SYSF_LFS 0 /* No off_t, use long */
# define CENV_SYSF_LFS_FMT "l" /* printf format is long */
# elif SIZEOF_OFF_T == 8
# define CENV_SYSF_LFS 64 /* off_t exists and has 64 bits */
# if SIZEOF_OFF_T == SIZEOF_LONG
# define CENV_SYSF_LFS_FMT "l" /* printf format is long */
# elif SIZEOF_OFF_T == SIZEOF_LONG_LONG
# define CENV_SYSF_LFS_FMT "ll" /* printf format is long long */
# endif
# endif
# define CENV_SYSF_FSEEKO HAVE_FSEEKO
/* FreeBSD defaults to 64-bit file off_t but calls the type "quad_t"
* instead of "long long". Always has fseeko.
*/
# if CENV_SYS_FREEBSD
# elif CENV_SYS_FREEBSD
# define CENV_SYSF_LFS 64 /* off_t exists and has 64 bits */
# define CENV_SYSF_FSEEKO 1 /* And have some flavor of fseeko */
# define CENV_SYSF_LFS_FMT "q" /* printf format is quad_t */