summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2014-02-23 16:04:38 +0000
committerDavid Mitchell <davem@iabyn.com>2014-02-23 16:04:38 +0000
commita41b5f99ba8b69b03630b003ff250b87073971a6 (patch)
treeec4b2079cb8de18fa4ce8c8f57c7870ca9071295 /sv.c
parentdca36a0cc0663875200afd26d6396a4bd3f4736e (diff)
downloadperl-a41b5f99ba8b69b03630b003ff250b87073971a6.tar.gz
fix win32 build
dca36a0cc embedded #ifdefs within a macro call, which is naughty (I think). So have the ifdef outside the macro instead
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sv.c b/sv.c
index 655a8addd9..e277d76a78 100644
--- a/sv.c
+++ b/sv.c
@@ -8066,13 +8066,13 @@ Perl_sv_gets(pTHX_ SV *const sv, PerlIO *const fp, I32 append)
if (!PerlLIO_fstat(PerlIO_fileno(fp), &st) && S_ISREG(st.st_mode)) {
const Off_t offset = PerlIO_tell(fp);
if (offset != (Off_t) -1 && st.st_size + append > offset) {
- (void) SvGROW(sv, (STRLEN)((st.st_size - offset) + append + 1
#ifdef PERL_NEW_COPY_ON_WRITE
- /* Add an extra byte for the sake of copy-on-
- write's buffer reference count. */
- + 1
+ /* Add an extra byte for the sake of copy-on-write's
+ * buffer reference count. */
+ (void) SvGROW(sv, (STRLEN)((st.st_size - offset) + append + 2));
+#else
+ (void) SvGROW(sv, (STRLEN)((st.st_size - offset) + append + 1));
#endif
- ));
}
}
rsptr = NULL;