In perl.git, the branch blead has been updated <https://perl5.git.perl.org/perl.git/commitdiff/e7a4ac29db6bdae9bd692f8f1f2471eee03bbb66?hp=7c07b4b54b42243e151c5943143c0af7c19b29b7>
- Log ----------------------------------------------------------------- commit e7a4ac29db6bdae9bd692f8f1f2471eee03bbb66 Author: Steve Hay <steve.m....@googlemail.com> Date: Mon Apr 23 13:53:55 2018 +0100 Make gets() declaration extern "C" This, together with the previous commit, fixes the C++-mode build on Windows using VS2017 except for the remaining problem with PL_nan when linking POSIX - see RT#132955. commit 002a84150d55738667ea8a7243b124db949436ca Author: Leon Timmermans <faw...@gmail.com> Date: Thu Apr 19 19:05:35 2018 +0200 Make PERLIO_FILE_file() an lvalue ----------------------------------------------------------------------- Summary of changes: win32/win32.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win32/win32.h b/win32/win32.h index 29621c0cd3..26c3ac254f 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -314,7 +314,7 @@ __PL_nan_u = { 0x7FF8000000000000UI64 }; #if _MSC_VER >= 1900 /* No longer declared in stdio.h */ -char *gets(char* buffer); +EXTERN_C char *gets(char* buffer); #define tzname _tzname @@ -344,7 +344,7 @@ typedef struct #define PERLIO_FILE_base(f) (((__crt_stdio_stream_data*)(f))->_base) #define PERLIO_FILE_cnt(f) (((__crt_stdio_stream_data*)(f))->_cnt) #define PERLIO_FILE_flag(f) ((int)(((__crt_stdio_stream_data*)(f))->_flags)) -#define PERLIO_FILE_file(f) ((int)(((__crt_stdio_stream_data*)(f))->_file)) +#define PERLIO_FILE_file(f) (*(int*)(&((__crt_stdio_stream_data*)(f))->_file)) #endif -- Perl5 Master Repository