diff options
author | David Mitchell <davem@iabyn.com> | 2014-02-23 16:04:38 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2014-02-23 16:04:38 +0000 |
commit | a41b5f99ba8b69b03630b003ff250b87073971a6 (patch) | |
tree | ec4b2079cb8de18fa4ce8c8f57c7870ca9071295 /sv.c | |
parent | dca36a0cc0663875200afd26d6396a4bd3f4736e (diff) | |
download | perl-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.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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; |