summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2012-10-10 18:27:07 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2012-10-10 18:27:07 +0100
commit73f2c082cce3e45af05f993af5e9294bb30e6ee5 (patch)
tree24664733c44ddc630c61def90d2a83e94aa66250 /win32
parent0334a26770c8f67919793a1de2e9255c85665e5f (diff)
downloadperl-73f2c082cce3e45af05f993af5e9294bb30e6ee5.tar.gz
Add extern "C" to definitions of four win32_ functions
This makes them match their declarations in perlhost.h, which fixes linker errors when linking perl5XX.dll in a C++ build with VC.
Diffstat (limited to 'win32')
-rw-r--r--win32/perlhost.h9
-rw-r--r--win32/win32.c8
2 files changed, 8 insertions, 9 deletions
diff --git a/win32/perlhost.h b/win32/perlhost.h
index ae422ef9f4..f2bb1334f1 100644
--- a/win32/perlhost.h
+++ b/win32/perlhost.h
@@ -26,11 +26,10 @@
#endif
START_EXTERN_C
-extern char * g_win32_get_privlib(const char *pl, STRLEN *const len);
-extern char * g_win32_get_sitelib(const char *pl, STRLEN *const len);
-extern char * g_win32_get_vendorlib(const char *pl,
- STRLEN *const len);
-extern char * g_getlogin(void);
+extern char * g_win32_get_privlib(const char *pl, STRLEN *const len);
+extern char * g_win32_get_sitelib(const char *pl, STRLEN *const len);
+extern char * g_win32_get_vendorlib(const char *pl, STRLEN *const len);
+extern char * g_getlogin(void);
END_EXTERN_C
class CPerlHost
diff --git a/win32/win32.c b/win32/win32.c
index 603acfe6c6..4427e06f5e 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -381,7 +381,7 @@ get_emd_part(SV **prev_pathp, STRLEN *const len, char *trailing_path, ...)
return NULL;
}
-char *
+EXTERN_C char *
win32_get_privlib(const char *pl, STRLEN *const len)
{
dTHX;
@@ -439,7 +439,7 @@ win32_get_xlib(const char *pl, const char *xlib, const char *libname,
return SvPVX(sv1);
}
-char *
+EXTERN_C char *
win32_get_sitelib(const char *pl, STRLEN *const len)
{
return win32_get_xlib(pl, "sitelib", "site", len);
@@ -449,7 +449,7 @@ win32_get_sitelib(const char *pl, STRLEN *const len)
# define PERL_VENDORLIB_NAME "vendor"
#endif
-char *
+EXTERN_C char *
win32_get_vendorlib(const char *pl, STRLEN *const len)
{
return win32_get_xlib(pl, "vendorlib", PERL_VENDORLIB_NAME, len);
@@ -1109,7 +1109,7 @@ setgid(gid_t agid)
return (agid == ROOT_GID ? 0 : -1);
}
-char *
+EXTERN_C char *
getlogin(void)
{
dTHX;