This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Revert #29307. It doesn't fix the XXX after all. Using "$(shell @type )"
[perl5.git] / win32 / perlhost.h
index e2227e3..fe026dd 100644 (file)
@@ -7,12 +7,16 @@
  *    License or the Artistic License, as specified in the README file.
  */
 
+#ifndef UNDER_CE
 #define CHECK_HOST_INTERP
+#endif
 
 #ifndef ___PerlHost_H___
 #define ___PerlHost_H___
 
+#ifndef UNDER_CE
 #include <signal.h>
+#endif
 #include "iperlsys.h"
 #include "vmem.h"
 #include "vdir.h"
@@ -823,6 +827,7 @@ PerlStdIOGetOSfhandle(struct IPerlStdIO* piPerl, int filenum)
 FILE*
 PerlStdIOFdupopen(struct IPerlStdIO* piPerl, FILE* pf)
 {
+#ifndef UNDER_CE
     FILE* pfdup;
     fpos_t pos;
     char mode[3];
@@ -870,6 +875,9 @@ PerlStdIOFdupopen(struct IPerlStdIO* piPerl, FILE* pf)
        fsetpos(pfdup, &pos);
     }
     return pfdup;
+#else
+    return 0;
+#endif
 }
 
 struct IPerlStdIO perlStdIO =
@@ -1837,7 +1845,7 @@ PerlProcFork(struct IPerlProc* piPerl)
         w32_message_hwnd = win32_create_message_window();
     new_perl->Isys_intern.message_hwnd = w32_message_hwnd;
     w32_pseudo_child_message_hwnds[w32_num_pseudo_children] =
-        (w32_message_hwnd == NULL) ? NULL : INVALID_HANDLE_VALUE;
+        (w32_message_hwnd == NULL) ? (HWND)NULL : (HWND)INVALID_HANDLE_VALUE;
 #    ifdef USE_RTL_THREAD_API
     handle = (HANDLE)_beginthreadex((void*)NULL, 0, win32_start_child,
                                    (void*)new_perl, 0, (unsigned*)&id);
@@ -2132,6 +2140,10 @@ lookup(const void *arg1, const void *arg2)
 LPSTR*
 CPerlHost::Lookup(LPCSTR lpStr)
 {
+#ifdef UNDER_CE
+    if (!m_lppEnvList || !m_dwEnvCount)
+       return NULL;
+#endif
     if (!lpStr)
        return NULL;
     return (LPSTR*)bsearch(&lpStr, m_lppEnvList, m_dwEnvCount, sizeof(LPSTR), lookup);