added USE_64BIT_API option
This commit is contained in:
parent
d5ad7d65b0
commit
c5d306fadd
@ -1,4 +1,4 @@
|
||||
/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_unix.c,v 1.2 1999-09-24 03:05:12 warmerda Exp $ */
|
||||
/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_unix.c,v 1.3 2000-01-28 21:46:30 warmerda Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988-1997 Sam Leffler
|
||||
@ -47,7 +47,11 @@ _tiffWriteProc(thandle_t fd, tdata_t buf, tsize_t size)
|
||||
static toff_t
|
||||
_tiffSeekProc(thandle_t fd, toff_t off, int whence)
|
||||
{
|
||||
#if USE_64BIT_API == 1
|
||||
return ((toff_t) lseek64((int) fd, (off64_t) off, whence));
|
||||
#else
|
||||
return ((toff_t) lseek((int) fd, (off_t) off, whence));
|
||||
#endif
|
||||
}
|
||||
|
||||
static int
|
||||
@ -64,10 +68,15 @@ _tiffSizeProc(thandle_t fd)
|
||||
#ifdef _AM29K
|
||||
long fsize;
|
||||
return ((fsize = lseek((int) fd, 0, SEEK_END)) < 0 ? 0 : fsize);
|
||||
#else
|
||||
#if USE_64BIT_API == 1
|
||||
struct stat64 sb;
|
||||
return (toff_t) (fstat64((int) fd, &sb) < 0 ? 0 : sb.st_size);
|
||||
#else
|
||||
struct stat sb;
|
||||
return (toff_t) (fstat((int) fd, &sb) < 0 ? 0 : sb.st_size);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_MMAP
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/Attic/tiffconf.h,v 1.1 1999-07-27 21:50:27 mike Exp $ */
|
||||
/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/Attic/tiffconf.h,v 1.2 2000-01-28 21:46:30 warmerda Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1988-1997 Sam Leffler
|
||||
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
|
||||
@ -51,6 +51,8 @@
|
||||
* HOST_BIGENDIAN native cpu byte order: 1 if big-endian (Motorola)
|
||||
* or 0 if little-endian (Intel); this may be used
|
||||
* in codecs to optimize code
|
||||
* USE_64BIT_API set to 1 if tif_unix.c should use lseek64(),
|
||||
* fstat64() and stat64 allowing 2-4GB files.
|
||||
*/
|
||||
#ifndef HAVE_IEEEFP
|
||||
#define HAVE_IEEEFP 1
|
||||
@ -62,6 +64,10 @@
|
||||
#define HOST_BIGENDIAN 1
|
||||
#endif
|
||||
|
||||
#ifndef USE_64BIT_API
|
||||
# define USE_64BIT_API 0
|
||||
#endif
|
||||
|
||||
#ifndef FEATURE_SUPPORT
|
||||
/*
|
||||
* Feature support definitions:
|
||||
|
Loading…
Reference in New Issue
Block a user