summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-05-11 09:34:13 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-05-11 09:34:13 +0000
commita6c403648ecd5cc72235fdb1e7535523a8ff2ac9 (patch)
treeae379cb0349ea1800627a86bc0ddf04fea4403ec /win32
parent312caa8e97f1c7ee342a9895c2f0e749625b4929 (diff)
downloadperl-a6c403648ecd5cc72235fdb1e7535523a8ff2ac9.tar.gz
various fixes for clean build and test on win32; configpm broken,
needed to open myconfig.SH rather than myconfig; sundry adjustments to bytecode stuff; tweaks to DYNAMIC_ENV_FETCH code to make it work under win32; getenv_sv() changed to getenv_len() since SVs aren't visible in the lower echelons; remove bogus exports from config.sym; PERL_OBJECT-ness for C++ exception support; null out IoDIRP in filter_del() or sv_free() will attempt to close it p4raw-id: //depot/perl@3387
Diffstat (limited to 'win32')
-rw-r--r--win32/GenCAPI.pl11
-rw-r--r--win32/Makefile2
-rw-r--r--win32/config.bc2
-rw-r--r--win32/config.gc2
-rw-r--r--win32/config.vc2
-rw-r--r--win32/makedef.pl2
-rw-r--r--win32/makefile.mk2
-rw-r--r--win32/perlhost.h7
-rw-r--r--win32/runperl.c5
-rw-r--r--win32/win32.c7
-rw-r--r--win32/win32.h2
11 files changed, 28 insertions, 16 deletions
diff --git a/win32/GenCAPI.pl b/win32/GenCAPI.pl
index 77e7aad8b8..82e0b32fc7 100644
--- a/win32/GenCAPI.pl
+++ b/win32/GenCAPI.pl
@@ -73,6 +73,8 @@ safexrealloc
safexfree
Perl_GetVars
malloced_size
+do_exec3
+getenv_len
)];
@@ -155,14 +157,11 @@ while () {
#undef $name
extern "C" $type $funcName ($args)
{
- char *pstr;
- char *pmsg;
+ SV *pmsg;
va_list args;
va_start(args, $arg);
- pmsg = pPerl->Perl_mess($arg, &args);
- New(0, pstr, strlen(pmsg)+1, char);
- strcpy(pstr, pmsg);
-$return pPerl->Perl_$name($start pstr);
+ pmsg = pPerl->Perl_sv_2mortal(pPerl->Perl_newSVsv(pPerl->Perl_mess($arg, &args)));
+$return pPerl->Perl_$name($start SvPV_nolen(pmsg));
va_end(args);
}
ENDCODE
diff --git a/win32/Makefile b/win32/Makefile
index ffa8c6b1a4..41d88ed042 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -527,7 +527,7 @@ RE = $(EXTDIR)\re\re
DUMPER = $(EXTDIR)\Data\Dumper\Dumper
ERRNO = $(EXTDIR)\Errno\Errno
PEEK = $(EXTDIR)\Devel\Peek\Peek
-BYTELOADER = $(EXTDIR)\ByteLoader
+BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
diff --git a/win32/config.bc b/win32/config.bc
index 691dfbbcd4..6936dcc98f 100644
--- a/win32/config.bc
+++ b/win32/config.bc
@@ -1,7 +1,7 @@
## Configured by: ~cf_email~
## Target system: WIN32
Author=''
-CONFIG='true'
+CONFIGDOTSH='true'
Date='$Date'
Header=''
Id='$Id'
diff --git a/win32/config.gc b/win32/config.gc
index 39b77015ae..200b10c33c 100644
--- a/win32/config.gc
+++ b/win32/config.gc
@@ -1,7 +1,7 @@
## Configured by: ~cf_email~
## Target system: WIN32
Author=''
-CONFIG='true'
+CONFIGDOTSH='true'
Date='$Date'
Header=''
Id='$Id'
diff --git a/win32/config.vc b/win32/config.vc
index ea86e5f530..09fa5af202 100644
--- a/win32/config.vc
+++ b/win32/config.vc
@@ -1,7 +1,7 @@
## Configured by: ~cf_email~
## Target system: WIN32
Author=''
-CONFIG='true'
+CONFIGDOTSH='true'
Date='$Date'
Header=''
Id='$Id'
diff --git a/win32/makedef.pl b/win32/makedef.pl
index f13c1da0a7..212f0000fd 100644
--- a/win32/makedef.pl
+++ b/win32/makedef.pl
@@ -79,6 +79,7 @@ PL_pending_ident
PL_sortcxix
PL_sublex_info
PL_timesbuf
+Perl_do_exec3
Perl_do_ipcctl
Perl_do_ipcget
Perl_do_msgrcv
@@ -302,7 +303,6 @@ sub output_symbol {
__DATA__
# extra globals not included above.
perl_init_i18nl10n
-perl_init_ext
perl_alloc
perl_atexit
perl_construct
diff --git a/win32/makefile.mk b/win32/makefile.mk
index bee351ce03..7f2b515024 100644
--- a/win32/makefile.mk
+++ b/win32/makefile.mk
@@ -642,7 +642,7 @@ RE = $(EXTDIR)\re\re
DUMPER = $(EXTDIR)\Data\Dumper\Dumper
ERRNO = $(EXTDIR)\Errno\Errno
PEEK = $(EXTDIR)\Devel\Peek\Peek
-BYTELOADER = $(EXTDIR)\ByteLoader
+BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
diff --git a/win32/perlhost.h b/win32/perlhost.h
index cc5b5e5cd4..458ff9afc9 100644
--- a/win32/perlhost.h
+++ b/win32/perlhost.h
@@ -102,6 +102,13 @@ public:
{
return win32_uname(name);
};
+ virtual char *Getenv_len(const char *varname, unsigned long *len, int &err)
+ {
+ char *e = win32_getenv(varname);
+ if (e)
+ *len = strlen(e);
+ return e;
+ };
};
class CPerlSock : public IPerlSock
diff --git a/win32/runperl.c b/win32/runperl.c
index 1b569d2557..336f2a87a5 100644
--- a/win32/runperl.c
+++ b/win32/runperl.c
@@ -28,9 +28,6 @@ xs_init(CPERLarg)
CPerlObj *pPerl;
-#undef PERL_SYS_INIT
-#define PERL_SYS_INIT(a, c)
-
int
main(int argc, char **argv, char **env)
{
@@ -48,6 +45,8 @@ main(int argc, char **argv, char **env)
argv[0] = szModuleName;
#endif
+ PERL_SYS_INIT(&argc,&argv);
+
if (!host.PerlCreate())
exit(exitstatus);
diff --git a/win32/win32.c b/win32/win32.c
index 414e4c5dfc..4988e31648 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -1307,7 +1307,12 @@ win32_uname(struct utsname *name)
SYSTEM_INFO info;
char *arch;
GetSystemInfo(&info);
+
+#ifdef __BORLANDC__
+ switch (info.u.s.wProcessorArchitecture) {
+#else
switch (info.wProcessorArchitecture) {
+#endif
case PROCESSOR_ARCHITECTURE_INTEL:
arch = "x86"; break;
case PROCESSOR_ARCHITECTURE_MIPS:
@@ -2860,8 +2865,8 @@ static
XS(w32_GetTickCount)
{
dXSARGS;
- EXTEND(SP,1);
DWORD msec = GetTickCount();
+ EXTEND(SP,1);
if ((IV)msec > 0)
XSRETURN_IV(msec);
XSRETURN_NV(msec);
diff --git a/win32/win32.h b/win32/win32.h
index a072b875c9..f712928cf0 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -12,6 +12,7 @@
#ifdef PERL_OBJECT
# define DYNAMIC_ENV_FETCH
# define ENV_HV_NAME "___ENV_HV_NAME___"
+# define HAS_GETENV_LEN
# define prime_env_iter()
# define WIN32IO_IS_STDIO /* don't pull in custom stdio layer */
# ifdef PERL_GLOBAL_STRUCT
@@ -184,6 +185,7 @@ struct utsname {
typedef long uid_t;
typedef long gid_t;
+typedef unsigned short mode_t;
#pragma warning(disable: 4018 4035 4101 4102 4244 4245 4761)
#ifndef PERL_OBJECT