add Pod-Parser-1.08 (verbatim module =include tests elided owing
[p5sagit/p5-mst-13.2.git] / win32 / perlhost.h
index b8a59e4..e514bf1 100644 (file)
@@ -88,7 +88,7 @@ public:
     };
     virtual int Putenv(const char *envstring, int &err)
     {
-       return putenv(envstring);
+       return win32_putenv(envstring);
     };
     virtual char* LibPath(char *pl)
     {
@@ -468,6 +468,10 @@ public:
     {
        win32_abort();
     };
+    virtual char * Crypt(const char* clear, const char* salt)
+    {
+       return win32_crypt(clear, salt);
+    };
     virtual void Exit(int status)
     {
        exit(status);
@@ -652,23 +656,39 @@ public:
     };
     virtual char* GetBase(PerlIO* pf, int &err)
     {
+#ifdef FILE_base
        FILE *f = (FILE*)pf;
        return FILE_base(f);
+#else
+       return Nullch;
+#endif
     };
     virtual int GetBufsiz(PerlIO* pf, int &err)
     {
+#ifdef FILE_bufsiz
        FILE *f = (FILE*)pf;
        return FILE_bufsiz(f);
+#else
+       return (-1);
+#endif
     };
     virtual int GetCnt(PerlIO* pf, int &err)
     {
+#ifdef USE_STDIO_PTR
        FILE *f = (FILE*)pf;
        return FILE_cnt(f);
+#else
+       return (-1);
+#endif
     };
     virtual char* GetPtr(PerlIO* pf, int &err)
     {
+#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)
     {
@@ -738,14 +758,18 @@ public:
     };
     virtual void SetCnt(PerlIO* pf, int n, int &err)
     {
+#ifdef STDIO_CNT_LVALUE
        FILE *f = (FILE*)pf;
        FILE_cnt(f) = n;
+#endif
     };
     virtual void SetPtrCnt(PerlIO* pf, char * ptr, int n, int& err)
     {
+#ifdef STDIO_PTR_LVALUE
        FILE *f = (FILE*)pf;
        FILE_ptr(f) = ptr;
        FILE_cnt(f) = n;
+#endif
     };
     virtual void Setlinebuf(PerlIO* pf, int &err)
     {
@@ -837,13 +861,13 @@ public:
            {
                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;
                }
            }
@@ -860,7 +884,7 @@ public:
        int retVal;
        try
        {
-           retVal = pPerl->perl_parse(xs_init, argc, argv, env);
+           retVal = perl_parse(xs_init, argc, argv, env);
        }
        catch(int x)
        {
@@ -880,7 +904,7 @@ public:
        int retVal;
        try
        {
-           retVal = pPerl->perl_run();
+           retVal = perl_run();
        }
        catch(int x)
        {
@@ -898,8 +922,8 @@ public:
     {
        try
        {
-           pPerl->perl_destruct();
-           pPerl->perl_free();
+           perl_destruct();
+           perl_free();
        }
        catch(...)
        {