* 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"
FILE*
PerlStdIOFdupopen(struct IPerlStdIO* piPerl, FILE* pf)
{
+#ifndef UNDER_CE
FILE* pfdup;
fpos_t pos;
char mode[3];
fsetpos(pfdup, &pos);
}
return pfdup;
+#else
+ return 0;
+#endif
}
struct IPerlStdIO perlStdIO =
}
int
-PerlLIOUtime(struct IPerlLIO* piPerl, char *filename, struct utimbuf *times)
+PerlLIOUtime(struct IPerlLIO* piPerl, const char *filename, struct utimbuf *times)
{
return win32_utime(filename, times);
}
PerlInterpreter *my_perl = (PerlInterpreter*)arg;
GV *tmpgv;
int status;
+ HWND parent_message_hwnd;
#ifdef PERL_SYNC_FORK
static long sync_fork_id = 0;
long id = ++sync_fork_id;
sv_setiv(sv, -(IV)w32_pseudo_id);
SvREADONLY_on(sv);
}
+#ifdef PERL_USES_PL_PIDSTATUS
hv_clear(PL_pidstatus);
+#endif
+
+ /* create message window and tell parent about it */
+ parent_message_hwnd = w32_message_hwnd;
+ w32_message_hwnd = win32_create_message_window();
+ if (parent_message_hwnd != NULL)
+ PostMessage(parent_message_hwnd, WM_USER_MESSAGE, w32_pseudo_id, (LONG)w32_message_hwnd);
/* push a zero on the stack (we are the child) */
{
id = win32_start_child((LPVOID)new_perl);
PERL_SET_THX(aTHX);
# else
+ if (w32_message_hwnd == INVALID_HANDLE_VALUE)
+ 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) ? (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);
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);
errno = ENOENT;
return -1;
}
- if (USING_WIDE()) {
- WCHAR wBuffer[MAX_PATH];
- A2WHELPER(dirname, wBuffer, sizeof(wBuffer));
- ret = m_pvDir->SetCurrentDirectoryW(wBuffer);
- }
- else
- ret = m_pvDir->SetCurrentDirectoryA((char*)dirname);
+ ret = m_pvDir->SetCurrentDirectoryA((char*)dirname);
if(ret < 0) {
errno = ENOENT;
}