In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/45ed5e1b00da4aecc4751dbc6583302752186d25?hp=bbd7bacc48bc053e51f3c115412abb4137bea796>
- Log ----------------------------------------------------------------- commit 45ed5e1b00da4aecc4751dbc6583302752186d25 Author: Craig A. Berry <[email protected]> Date: Sun Jun 3 20:31:31 2012 -0500 Version bump for POSIX.pm. M ext/POSIX/lib/POSIX.pm commit a2e65780dd8343d36e832b250013a219b40e0fc5 Author: Craig A. Berry <[email protected]> Date: Sun Jun 3 18:38:30 2012 -0500 extern "C" for POSIX.xs. We are repeating standard prototypes but we haven't been making them compatible with the standard versions when compiling under C++. Now we do. M ext/POSIX/POSIX.xs commit 938f40b7bc0ceab111fbb5619a242158aa040f06 Author: Craig A. Berry <[email protected]> Date: Sun Jun 3 18:17:28 2012 -0500 extern "C" for sdbm.c. Whether we really need to be rolling our own prototypes for malloc and free in this day and age is unclear, but since we do, we need to keep them in the unmangled C namespace rather than in C++'s std:: namespace. M ext/SDBM_File/sdbm/sdbm.c ----------------------------------------------------------------------- Summary of changes: ext/POSIX/POSIX.xs | 2 ++ ext/POSIX/lib/POSIX.pm | 2 +- ext/SDBM_File/sdbm/sdbm.c | 7 +++++++ 3 files changed, 10 insertions(+), 1 deletions(-) diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 681532c..6d08800 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -373,9 +373,11 @@ typedef struct termios* POSIX__Termios; /* Possibly needed prototypes */ #ifndef WIN32 +START_EXTERN_C double strtod (const char *, char **); long strtol (const char *, char **, int); unsigned long strtoul (const char *, char **, int); +END_EXTERN_C #endif #ifndef HAS_DIFFTIME diff --git a/ext/POSIX/lib/POSIX.pm b/ext/POSIX/lib/POSIX.pm index 457af50..3a61b78 100644 --- a/ext/POSIX/lib/POSIX.pm +++ b/ext/POSIX/lib/POSIX.pm @@ -4,7 +4,7 @@ use warnings; our ($AUTOLOAD, %SIGRT); -our $VERSION = '1.30'; +our $VERSION = '1.31'; require XSLoader; diff --git a/ext/SDBM_File/sdbm/sdbm.c b/ext/SDBM_File/sdbm/sdbm.c index 46be83e..f01a08a 100644 --- a/ext/SDBM_File/sdbm/sdbm.c +++ b/ext/SDBM_File/sdbm/sdbm.c @@ -37,10 +37,17 @@ #include <errno.h> /* See notes in perl.h about avoiding extern int errno; */ +#ifdef __cplusplus +extern "C" { +#endif extern Malloc_t malloc proto((MEM_SIZE)); extern Free_t free proto((Malloc_t)); +#ifdef __cplusplus +} +#endif + /* * forward */ -- Perl5 Master Repository
