* to include <sys/stat.h> and <sys/types.h> to get any typedef'ed
* information.
*/
-#if defined(WIN64) || defined(USE_LARGE_FILES)
-# define Stat_t struct _stati64
-#else
-# define Stat_t struct stat
-#endif
+#define Stat_t struct _stati64
/* USE_STAT_RDEV:
* This symbol is defined if this system has a stat structure declaring
USE_PERLIO := define
#
-# Comment this out if you don't want to enable large file support for
-# some reason. Should normally only be changed to maintain compatibility
-# with an older release of perl.
-#
-USE_LARGE_FILES := define
-
-#
# Uncomment this if you're building a 32-bit perl and want 64-bit integers.
# (If you're building a 64-bit perl then you will have 64-bit integers whether
# or not this is uncommented.)
"useperlio=$(USE_PERLIO)" \
"use64bitint=$(USE_64_BIT_INT)" \
"uselongdouble=$(USE_LONG_DOUBLE)" \
- "uselargefiles=$(USE_LARGE_FILES)" \
"usesitecustomize=$(USE_SITECUST)" \
"default_inc_excludes_dot=$(DEFAULT_INC_EXCLUDES_DOT)" \
"LINK_FLAGS=$(subst ",\",$(LINK_FLAGS))"\
@(echo.&& \
echo #ifndef _config_h_footer_&& \
echo #define _config_h_footer_&& \
- echo #undef Off_t&& \
- echo #undef LSEEKSIZE&& \
- echo #undef Off_t_size&& \
echo #undef PTRSIZE&& \
echo #undef SSize_t&& \
echo #undef HAS_ATOLL&& \
echo #define FILE_bufsiz^(fp^) ^(PERLIO_FILE_cnt^(fp^) + PERLIO_FILE_ptr^(fp^) - PERLIO_FILE_base^(fp^)^)&& \
echo #define I_STDBOOL)>> config.h
endif
-ifeq ($(USE_LARGE_FILES),define)
- @(echo #define Off_t $(INT64)&& \
- echo #define LSEEKSIZE ^8&& \
- echo #define Off_t_size ^8)>> config.h
-else
- @(echo #define Off_t long&& \
- echo #define LSEEKSIZE ^4&& \
- echo #define Off_t_size ^4)>> config.h
-endif
ifeq ($(WIN64),define)
ifeq ($(CCTYPE),GCC)
@(echo #define LONG_DOUBLESIZE ^16)>> config.h
USE_IMP_SYS = define
#
-# Comment this out if you don't want to enable large file support for
-# some reason. Should normally only be changed to maintain compatibility
-# with an older release of perl.
-#
-USE_LARGE_FILES = define
-
-#
# Uncomment this if you're building a 32-bit perl and want 64-bit integers.
# (If you're building a 64-bit perl then you will have 64-bit integers whether
# or not this is uncommented.)
USE_IMP_SYS = undef
!ENDIF
-!IF "$(USE_LARGE_FILES)" == ""
-USE_LARGE_FILES = undef
-!ENDIF
-
!IF "$(USE_64_BIT_INT)" == ""
USE_64_BIT_INT = undef
!ENDIF
"usemultiplicity=$(USE_MULTI)" \
"use64bitint=$(USE_64_BIT_INT)" \
"uselongdouble=undef" \
- "uselargefiles=$(USE_LARGE_FILES)" \
"usesitecustomize=$(USE_SITECUST)" \
"default_inc_excludes_dot=$(DEFAULT_INC_EXCLUDES_DOT)" \
"LINK_FLAGS=$(LINK_FLAGS:"=\")" \
@(echo.&& \
echo #ifndef _config_h_footer_&& \
echo #define _config_h_footer_&& \
- echo #undef Off_t&& \
- echo #undef LSEEKSIZE&& \
- echo #undef Off_t_size&& \
echo #undef PTRSIZE&& \
echo #undef SSize_t&& \
echo #undef HAS_ATOLL&& \
echo #define FILE_bufsiz^(fp^) ^(PERLIO_FILE_cnt^(fp^) + PERLIO_FILE_ptr^(fp^) - PERLIO_FILE_base^(fp^)^)&& \
echo #define I_STDBOOL)>> config.h
!ENDIF
-!IF "$(USE_LARGE_FILES)"=="define"
- @(echo #define Off_t $(INT64)&& \
- echo #define LSEEKSIZE ^8&& \
- echo #define Off_t_size ^8)>> config.h
-!ELSE
- @(echo #define Off_t long&& \
- echo #define LSEEKSIZE ^4&& \
- echo #define Off_t_size ^4)>> config.h
-!ENDIF
!IF "$(WIN64)"=="define"
@(echo #define PTRSIZE ^8&& \
echo #define SSize_t $(INT64)&& \
lp=''
lpr=''
ls='dir'
-lseeksize='4'
-lseektype='long'
+lseeksize='8'
+lseektype='long long'
mad='undef'
mail=''
mailx=''
usefaststdio='undef'
useithreads='undef'
usekernprocpathname='undef'
-uselargefiles='undef'
+uselargefiles='define'
uselongdouble='undef'
usemallocwrap='define'
usemorebits='undef'
lp=''
lpr=''
ls='dir'
-lseeksize='4'
-lseektype='long'
+lseeksize='8'
+lseektype='__int64'
mad='undef'
mail=''
mailx=''
usefaststdio='undef'
useithreads='undef'
usekernprocpathname='undef'
-uselargefiles='undef'
+uselargefiles='define'
uselongdouble='undef'
usemallocwrap='define'
usemorebits='undef'
* should be used when available.
*/
#ifndef USE_LARGE_FILES
-/*#define USE_LARGE_FILES / **/
+#define USE_LARGE_FILES /**/
#endif
/* USE_LONG_DOUBLE:
/* Off_t_size:
* This symbol holds the number of bytes used by the Off_t.
*/
-#define Off_t long /* <offset> type */
-#define LSEEKSIZE 4 /* <offset> size */
-#define Off_t_size 4 /* <offset> size */
+#define Off_t long long /* <offset> type */
+#define LSEEKSIZE 8 /* <offset> size */
+#define Off_t_size 8 /* <offset> size */
/* Mode_t:
* This symbol holds the type used to declare file modes
* should be used when available.
*/
#ifndef USE_LARGE_FILES
-/*#define USE_LARGE_FILES / **/
+#define USE_LARGE_FILES /**/
#endif
/* USE_LONG_DOUBLE:
/* Off_t_size:
* This symbol holds the number of bytes used by the Off_t.
*/
-#define Off_t long /* <offset> type */
-#define LSEEKSIZE 4 /* <offset> size */
-#define Off_t_size 4 /* <offset> size */
+#define Off_t __int64 /* <offset> type */
+#define LSEEKSIZE 8 /* <offset> size */
+#define Off_t_size 8 /* <offset> size */
/* Mode_t:
* This symbol holds the type used to declare file modes
$int64 = 'long long';
}
-# set large files options
-if ($opt{uselargefiles} eq 'define') {
- $opt{lseeksize} = 8;
- $opt{lseektype} = $int64;
-}
-else {
- $opt{lseeksize} = 4;
- $opt{lseektype} = 'long';
-}
-
# set 64-bit options
if ($opt{WIN64} eq 'define') {
$opt{d_atoll} = 'define';
USE_IMP_SYS *= define
#
-# Comment this out if you don't want to enable large file support for
-# some reason. Should normally only be changed to maintain compatibility
-# with an older release of perl.
-#
-USE_LARGE_FILES *= define
-
-#
# Uncomment this if you're building a 32-bit perl and want 64-bit integers.
# (If you're building a 64-bit perl then you will have 64-bit integers whether
# or not this is uncommented.)
USE_MULTI *= undef
USE_ITHREADS *= undef
USE_IMP_SYS *= undef
-USE_LARGE_FILES *= undef
USE_64_BIT_INT *= undef
USE_LONG_DOUBLE *= undef
DEFAULT_INC_EXCLUDES_DOT *= undef
usemultiplicity=$(USE_MULTI) ~ \
use64bitint=$(USE_64_BIT_INT) ~ \
uselongdouble=$(USE_LONG_DOUBLE) ~ \
- uselargefiles=$(USE_LARGE_FILES) ~ \
usesitecustomize=$(USE_SITECUST) ~ \
default_inc_excludes_dot=$(DEFAULT_INC_EXCLUDES_DOT) ~ \
LINK_FLAGS=$(LINK_FLAGS) ~ \
@(echo.&& \
echo #ifndef _config_h_footer_&& \
echo #define _config_h_footer_&& \
- echo #undef Off_t&& \
- echo #undef LSEEKSIZE&& \
- echo #undef Off_t_size&& \
echo #undef PTRSIZE&& \
echo #undef SSize_t&& \
echo #undef HAS_ATOLL&& \
echo #define FILE_bufsiz^(fp^) ^(PERLIO_FILE_cnt^(fp^) + PERLIO_FILE_ptr^(fp^) - PERLIO_FILE_base^(fp^)^)&& \
echo #define I_STDBOOL)>> config.h
.ENDIF
-.IF "$(USE_LARGE_FILES)"=="define"
- @(echo #define Off_t $(INT64)&& \
- echo #define LSEEKSIZE ^8&& \
- echo #define Off_t_size ^8)>> config.h
-.ELSE
- @(echo #define Off_t long&& \
- echo #define LSEEKSIZE ^4&& \
- echo #define Off_t_size ^4)>> config.h
-.ENDIF
.IF "$(WIN64)"=="define"
.IF "$(CCTYPE)" == "GCC"
@(echo #define LONG_DOUBLESIZE ^16)>> config.h
}
/* path will be mapped correctly above */
-#if defined(WIN64) || defined(USE_LARGE_FILES)
res = _stati64(path, sbuf);
-#else
- res = stat(path, sbuf);
-#endif
sbuf->st_nlink = nlink;
if (res < 0) {
DllExport Off_t
win32_ftell(FILE *pf)
{
-#if defined(WIN64) || defined(USE_LARGE_FILES)
fpos_t pos;
if (fgetpos(pf, &pos))
return -1;
return (Off_t)pos;
-#else
- return ftell(pf);
-#endif
}
DllExport int
win32_fseek(FILE *pf, Off_t offset,int origin)
{
-#if defined(WIN64) || defined(USE_LARGE_FILES)
fpos_t pos;
switch (origin) {
case SEEK_CUR:
return -1;
}
return fsetpos(pf, &offset);
-#else
- return fseek(pf, (long)offset, origin);
-#endif
}
DllExport int
DllExport int
win32_fstat(int fd, Stat_t *sbufptr)
{
-#if defined(WIN64) || defined(USE_LARGE_FILES)
return _fstati64(fd, sbufptr);
-#else
- return fstat(fd, sbufptr);
-#endif
}
DllExport int
DllExport int
win32_chsize(int fd, Off_t size)
{
-#if defined(WIN64) || defined(USE_LARGE_FILES)
int retval = 0;
Off_t cur, end, extend;
}
win32_lseek(fd, cur, SEEK_SET);
return retval;
-#else
- return chsize(fd, (long)size);
-#endif
}
DllExport Off_t
win32_lseek(int fd, Off_t offset, int origin)
{
-#if defined(WIN64) || defined(USE_LARGE_FILES)
return _lseeki64(fd, offset, origin);
-#else
- return lseek(fd, (long)offset, origin);
-#endif
}
DllExport Off_t
win32_tell(int fd)
{
-#if defined(WIN64) || defined(USE_LARGE_FILES)
return _telli64(fd);
-#else
- return tell(fd);
-#endif
}
DllExport int