summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dosish.h6
-rw-r--r--win32/GNUmakefile20
-rw-r--r--win32/Makefile24
-rw-r--r--win32/config.gc6
-rw-r--r--win32/config.vc6
-rw-r--r--win32/config_H.gc8
-rw-r--r--win32/config_H.vc8
-rw-r--r--win32/config_sh.PL10
-rw-r--r--win32/makefile.mk21
-rw-r--r--win32/win32.c28
10 files changed, 15 insertions, 122 deletions
diff --git a/dosish.h b/dosish.h
index 5b2716046d..1860a0f066 100644
--- a/dosish.h
+++ b/dosish.h
@@ -70,11 +70,7 @@
* 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
diff --git a/win32/GNUmakefile b/win32/GNUmakefile
index 7c45d00e25..084cb5031e 100644
--- a/win32/GNUmakefile
+++ b/win32/GNUmakefile
@@ -116,13 +116,6 @@ USE_IMP_SYS := define
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.)
@@ -1213,7 +1206,6 @@ CFG_VARS = \
"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))"\
@@ -1331,9 +1323,6 @@ $(MINIDIR)\.exists : $(CFGH_TMPL)
@(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&& \
@@ -1403,15 +1392,6 @@ else ifeq ($(CCTYPE),MSVC142)
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
diff --git a/win32/Makefile b/win32/Makefile
index ecbfd7a819..93d55f7ca6 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -81,13 +81,6 @@ USE_ITHREADS = 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.)
@@ -296,10 +289,6 @@ USE_ITHREADS = undef
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
@@ -915,7 +904,6 @@ CFG_VARS = \
"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:"=\")" \
@@ -1007,9 +995,6 @@ $(MINIDIR)\.exists : $(CFGH_TMPL)
@(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&& \
@@ -1041,15 +1026,6 @@ $(MINIDIR)\.exists : $(CFGH_TMPL)
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)&& \
diff --git a/win32/config.gc b/win32/config.gc
index b0af7d42e9..c632ba93c3 100644
--- a/win32/config.gc
+++ b/win32/config.gc
@@ -888,8 +888,8 @@ longsize='4'
lp=''
lpr=''
ls='dir'
-lseeksize='4'
-lseektype='long'
+lseeksize='8'
+lseektype='long long'
mad='undef'
mail=''
mailx=''
@@ -1126,7 +1126,7 @@ usedtrace='undef'
usefaststdio='undef'
useithreads='undef'
usekernprocpathname='undef'
-uselargefiles='undef'
+uselargefiles='define'
uselongdouble='undef'
usemallocwrap='define'
usemorebits='undef'
diff --git a/win32/config.vc b/win32/config.vc
index 234de8da62..3f68e7554f 100644
--- a/win32/config.vc
+++ b/win32/config.vc
@@ -887,8 +887,8 @@ longsize='4'
lp=''
lpr=''
ls='dir'
-lseeksize='4'
-lseektype='long'
+lseeksize='8'
+lseektype='__int64'
mad='undef'
mail=''
mailx=''
@@ -1125,7 +1125,7 @@ usedtrace='undef'
usefaststdio='undef'
useithreads='undef'
usekernprocpathname='undef'
-uselargefiles='undef'
+uselargefiles='define'
uselongdouble='undef'
usemallocwrap='define'
usemorebits='undef'
diff --git a/win32/config_H.gc b/win32/config_H.gc
index 72b7013d4d..233eea3f65 100644
--- a/win32/config_H.gc
+++ b/win32/config_H.gc
@@ -4149,7 +4149,7 @@
* should be used when available.
*/
#ifndef USE_LARGE_FILES
-/*#define USE_LARGE_FILES / **/
+#define USE_LARGE_FILES /**/
#endif
/* USE_LONG_DOUBLE:
@@ -5068,9 +5068,9 @@
/* 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
diff --git a/win32/config_H.vc b/win32/config_H.vc
index be0d90a964..62addd119a 100644
--- a/win32/config_H.vc
+++ b/win32/config_H.vc
@@ -4140,7 +4140,7 @@
* should be used when available.
*/
#ifndef USE_LARGE_FILES
-/*#define USE_LARGE_FILES / **/
+#define USE_LARGE_FILES /**/
#endif
/* USE_LONG_DOUBLE:
@@ -5059,9 +5059,9 @@
/* 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
diff --git a/win32/config_sh.PL b/win32/config_sh.PL
index bffd4ecf9f..d1543889dc 100644
--- a/win32/config_sh.PL
+++ b/win32/config_sh.PL
@@ -117,16 +117,6 @@ elsif ($opt{cc} =~ /\bgcc\b/) {
$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';
diff --git a/win32/makefile.mk b/win32/makefile.mk
index d9d90c6654..6ddc4d0fbd 100644
--- a/win32/makefile.mk
+++ b/win32/makefile.mk
@@ -88,13 +88,6 @@ USE_ITHREADS *= 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.)
@@ -306,7 +299,6 @@ USE_SITECUST *= undef
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
@@ -1156,7 +1148,6 @@ CFG_VARS = \
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) ~ \
@@ -1279,9 +1270,6 @@ $(MINIDIR)\.exists : $(CFGH_TMPL)
@(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&& \
@@ -1331,15 +1319,6 @@ $(MINIDIR)\.exists : $(CFGH_TMPL)
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
diff --git a/win32/win32.c b/win32/win32.c
index 9719f14fa3..80b4008863 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -1526,11 +1526,7 @@ win32_stat(const char *path, Stat_t *sbuf)
}
/* 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) {
@@ -2853,20 +2849,15 @@ win32_fflush(FILE *pf)
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:
@@ -2886,9 +2877,6 @@ win32_fseek(FILE *pf, Off_t offset,int origin)
return -1;
}
return fsetpos(pf, &offset);
-#else
- return fseek(pf, (long)offset, origin);
-#endif
}
DllExport int
@@ -2967,11 +2955,7 @@ win32_abort(void)
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
@@ -3256,7 +3240,6 @@ win32_setmode(int fd, int mode)
DllExport int
win32_chsize(int fd, Off_t size)
{
-#if defined(WIN64) || defined(USE_LARGE_FILES)
int retval = 0;
Off_t cur, end, extend;
@@ -3296,29 +3279,18 @@ win32_chsize(int fd, Off_t size)
}
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