};
virtual int Putenv(const char *envstring, int &err)
{
- return putenv(envstring);
+ return win32_putenv(envstring);
};
virtual char* LibPath(char *pl)
{
{
return g_win32_get_sitelib(pl);
};
+ virtual int Uname(struct utsname *name, int &err)
+ {
+ 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
{
win32_abort();
};
+ virtual char * Crypt(const char* clear, const char* salt)
+ {
+ return win32_crypt(clear, salt);
+ };
virtual void Exit(int status)
{
exit(status);
};
virtual char* GetBase(PerlIO* pf, int &err)
{
- return (PerlIO_has_base(pf) ? PerlIO_get_base(pf) : Nullch);
+#ifdef FILE_base
+ FILE *f = (FILE*)pf;
+ return FILE_base(f);
+#else
+ return Nullch;
+#endif
};
virtual int GetBufsiz(PerlIO* pf, int &err)
{
- return PerlIO_get_bufsiz(pf);
+#ifdef FILE_bufsiz
+ FILE *f = (FILE*)pf;
+ return FILE_bufsiz(f);
+#else
+ return (-1);
+#endif
};
virtual int GetCnt(PerlIO* pf, int &err)
{
- return PerlIO_get_cnt(pf);
+#ifdef USE_STDIO_PTR
+ FILE *f = (FILE*)pf;
+ return FILE_cnt(f);
+#else
+ return (-1);
+#endif
};
virtual char* GetPtr(PerlIO* pf, int &err)
{
- return PerlIO_get_ptr(pf);
+#ifdef USE_STDIO_PTR
+ FILE *f = (FILE*)pf;
+ return FILE_ptr(f);
+#else
+ return Nullch;
+#endif
};
virtual char* Gets(PerlIO* pf, char* s, int n, int& err)
{
};
virtual void SetCnt(PerlIO* pf, int n, int &err)
{
- if (PerlIO_canset_cnt(pf)) {
- PerlIO_set_cnt(pf,n);
- }
+#ifdef STDIO_CNT_LVALUE
+ FILE *f = (FILE*)pf;
+ FILE_cnt(f) = n;
+#endif
};
virtual void SetPtrCnt(PerlIO* pf, char * ptr, int n, int& err)
{
- if (PerlIO_canset_cnt(pf)) {
- PerlIO_set_ptrcnt(pf,ptr,n);
- }
+#ifdef STDIO_PTR_LVALUE
+ FILE *f = (FILE*)pf;
+ FILE_ptr(f) = ptr;
+ FILE_cnt(f) = n;
+#endif
};
virtual void Setlinebuf(PerlIO* pf, int &err)
{
{
try
{
- pPerl->perl_construct();
+ perl_construct();
}
catch(...)
{
win32_fprintf(stderr, "%s\n",
"Error: Unable to construct data structures");
- pPerl->perl_free();
+ perl_free();
pPerl = NULL;
}
}
int retVal;
try
{
- retVal = pPerl->perl_parse(xs_init, argc, argv, env);
+ retVal = perl_parse(xs_init, argc, argv, env);
}
catch(int x)
{
int retVal;
try
{
- retVal = pPerl->perl_run();
+ retVal = perl_run();
}
catch(int x)
{
{
try
{
- pPerl->perl_destruct();
- pPerl->perl_free();
+ perl_destruct();
+ perl_free();
}
catch(...)
{