In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/39c93f118871e902c28143d60c85541536aad537?hp=cfd916dd0186076c8aa8e70771a9fb4b37d0dd70>
- Log ----------------------------------------------------------------- commit 39c93f118871e902c28143d60c85541536aad537 Author: Steve Hay <[email protected]> Date: Wed Dec 24 13:50:55 2014 +0000 Fix link error in perl521.dll with MinGW/gcc -xc++ perl.exp:fake:(.edata+0x1214): undefined reference to `win32_async_check' M win32/win32.h commit 1ea760a1752743f62a7abd01a89e4d8ffdd594d9 Author: Steve Hay <[email protected]> Date: Wed Dec 24 13:11:45 2014 +0000 Fix compilation errors in globals.c with MinGW/gcc -xc++ error: external linkage required for symbol 'PL_charclass' because of 'dllexport' attribute and likewise for many other symbols declared EXTCONST. M INTERN.h commit 5c5f0d52fc42141069a3d6406c7f85eaa0455ea1 Author: Steve Hay <[email protected]> Date: Sat Dec 20 13:08:37 2014 +0000 Fix compilation errors in DynaLoader.c with MinGW/gcc -xc++ error: invalid conversion from 'void*' to 'HMODULE' M ext/DynaLoader/DynaLoader_pm.PL M ext/DynaLoader/dl_win32.xs commit 6fc8e9130585a1ee4218f0f202dc83ed942f802d Author: Steve Hay <[email protected]> Date: Sat Dec 20 13:06:41 2014 +0000 Fix compilation errors in win32sck.c with MinGW/gcc -xc++ error: invalid conversion from 'const timeval*' to 'PTIMEVAL' M win32/win32sck.c commit 8fdfe84a7f78d727c928bb1d09cc1e31b2dd689d Author: Steve Hay <[email protected]> Date: Sat Dec 20 13:05:30 2014 +0000 Fix compilation errors in win32.c with MinGW/gcc -xc++ In MinGW-w64 builds, there are warnings/errors like this (depending on the compiler version used): gcc-4.5.3: warning: passing argument 2 of 'execv' from incompatible pointer type gcc-4.8.0: error: invalid conversion from 'const char* const*' to 'char* const*' This happens because MinGW-w64's process.h declares execv/execvp's second argument as 'char * const*' instead of 'const char * const*'. The _execv/_execvp versions don't have this problem so use them instead. MSDN says execv/execvp are deprecated POSIX functions; use the ISO C++ conformant _execv/_execvp instead anyway so it is not even worth sticking with execv/execvp for those compilers (namely, MinGW and VC++) that have the correct declarations. Likewise with spawnv/spawnvp vs. _spawnv/_spawnvp. M win32/win32.c commit 1271a1bef9e811fe58a09dbdc00ddfdf292f686b Author: Steve Hay <[email protected]> Date: Sat Dec 20 13:02:23 2014 +0000 Fix compilation errors in mg.c with MinGW/gcc -xc++ error: 'sip' was not declared in this scope error: 'uap' was not declared in this scope M mg.c ----------------------------------------------------------------------- Summary of changes: INTERN.h | 15 +++++++++++---- ext/DynaLoader/DynaLoader_pm.PL | 2 +- ext/DynaLoader/dl_win32.xs | 2 +- mg.c | 2 ++ win32/win32.c | 8 ++++---- win32/win32.h | 3 +-- win32/win32sck.c | 2 +- 7 files changed, 21 insertions(+), 13 deletions(-) diff --git a/INTERN.h b/INTERN.h index da3057a..39b48f4 100644 --- a/INTERN.h +++ b/INTERN.h @@ -29,10 +29,17 @@ # define dEXTCONST globaldef {"$GLOBAL_RO_VARS"} readonly #else # if (defined(WIN32) && defined(__MINGW32__)) || defined(__SYMBIAN32__) -# define EXT __declspec(dllexport) -# define dEXT -# define EXTCONST __declspec(dllexport) const -# define dEXTCONST const +# ifdef __cplusplus +# define EXT __declspec(dllexport) +# define dEXT +# define EXTCONST __declspec(dllexport) extern const +# define dEXTCONST const +# else +# define EXT __declspec(dllexport) +# define dEXT +# define EXTCONST __declspec(dllexport) const +# define dEXTCONST const +# endif # else # ifdef __cplusplus # define EXT diff --git a/ext/DynaLoader/DynaLoader_pm.PL b/ext/DynaLoader/DynaLoader_pm.PL index f2c082e..c9800b7 100644 --- a/ext/DynaLoader/DynaLoader_pm.PL +++ b/ext/DynaLoader/DynaLoader_pm.PL @@ -85,7 +85,7 @@ package DynaLoader; # [email protected], August 1994 BEGIN { - $VERSION = '1.29'; + $VERSION = '1.30'; } use Config; diff --git a/ext/DynaLoader/dl_win32.xs b/ext/DynaLoader/dl_win32.xs index 178ca7c..d99f116 100644 --- a/ext/DynaLoader/dl_win32.xs +++ b/ext/DynaLoader/dl_win32.xs @@ -148,7 +148,7 @@ dl_unload_file(libref) void * libref CODE: DLDEBUG(1,PerlIO_printf(Perl_debug_log, "dl_unload_file(%lx):\n", PTR2ul(libref))); - RETVAL = FreeLibrary(libref); + RETVAL = FreeLibrary((HMODULE)libref); if (!RETVAL) SaveError(aTHX_ "unload_file:%s", OS_Error_String(aTHX)) ; DLDEBUG(2,PerlIO_printf(Perl_debug_log, " retval = %d\n", RETVAL)); diff --git a/mg.c b/mg.c index 77dd9c0..4e6dcaf 100644 --- a/mg.c +++ b/mg.c @@ -1389,12 +1389,14 @@ Perl_csighandler(int sig) #else dTHX; #endif +#if defined(HAS_SIGACTION) && defined(SA_SIGINFO) #if defined(__cplusplus) && defined(__GNUC__) /* g++ doesn't support PERL_UNUSED_DECL, so the sip and uap * parameters would be warned about. */ PERL_UNUSED_ARG(sip); PERL_UNUSED_ARG(uap); #endif +#endif #ifdef FAKE_PERSISTENT_SIGNAL_HANDLERS (void) rsignal(sig, PL_csighandlerp); if (PL_sig_ignoring[sig]) return; diff --git a/win32/win32.c b/win32/win32.c index 21cdcc6..d388975 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -3710,7 +3710,7 @@ DllExport int win32_spawnvp(int mode, const char *cmdname, const char *const *argv) { #ifdef USE_RTL_SPAWNVP - return spawnvp(mode, cmdname, (char * const *)argv); + return _spawnvp(mode, cmdname, (char * const *)argv); #else return do_spawnvp_handles(mode, cmdname, argv, NULL); #endif @@ -3885,9 +3885,9 @@ win32_execv(const char *cmdname, const char *const *argv) /* if this is a pseudo-forked child, we just want to spawn * the new program, and return */ if (w32_pseudo_id) - return spawnv(P_WAIT, cmdname, argv); + return _spawnv(P_WAIT, cmdname, argv); #endif - return execv(cmdname, argv); + return _execv(cmdname, argv); } DllExport int @@ -3907,7 +3907,7 @@ win32_execvp(const char *cmdname, const char *const *argv) return status; } #endif - return execvp(cmdname, argv); + return _execvp(cmdname, argv); } DllExport void diff --git a/win32/win32.h b/win32/win32.h index 735c450..2d5eda9 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -366,6 +366,7 @@ typedef struct { DllExport void win32_get_child_IO(child_IO_table* ptr); DllExport HWND win32_create_message_window(void); +DllExport int win32_async_check(pTHX); extern int my_fclose(FILE *); extern char * win32_get_privlib(const char *pl, STRLEN *const len); @@ -470,8 +471,6 @@ struct interp_intern { Sighandler_t sigtable[SIG_SIZE]; }; -DllExport int win32_async_check(pTHX); - #define WIN32_POLL_INTERVAL 32768 #define PERL_ASYNC_CHECK() if (w32_do_async || PL_sig_pending) win32_async_check(aTHX) diff --git a/win32/win32sck.c b/win32/win32sck.c index 674add2..3f97241 100644 --- a/win32/win32sck.c +++ b/win32/win32sck.c @@ -533,7 +533,7 @@ win32_select(int nfds, Perl_fd_set* rd, Perl_fd_set* wr, Perl_fd_set* ex, const } errno = save_errno; - SOCKET_TEST_ERROR(r = select(nfds, &nrd, &nwr, &nex, timeout)); + SOCKET_TEST_ERROR(r = select(nfds, &nrd, &nwr, &nex, (PTIMEVAL)timeout)); save_errno = errno; for (i = 0; i < nfds; i++) { -- Perl5 Master Repository
