#
SRCDIR = ..
-PV = 59
-INST_VER = 5.17.6
+PV = 517
# INSTALL_ROOT specifies a path where this perl will be installed on CE device
INSTALL_ROOT=/netzwerk/sprache/perl
MINIMOD = ..\lib\ExtUtils\Miniperl.pm
# Unicode data files generated by mktables
+FIRSTUNIFILE = ..\lib\unicore\Decomposition.pl
UNIDATAFILES = ..\lib\unicore\Decomposition.pl \
..\lib\unicore\CombiningClass.pl ..\lib\unicore\Name.pl \
..\lib\unicore\Heavy.pl ..\lib\unicore\mktables.lst \
..\lib\unicore\UCD.pl ..\lib\unicore\Name.pm \
..\lib\unicore\TestProp.pl
+PERLEXE_MANIFEST= .\perlexe.manifest
+PERLEXE_ICO = .\perlexe.ico
+PERLEXE_RES = .\perlexe.res
+PERLDLL_RES =
+
# Directories of Unicode data files generated by mktables
UNIDATADIR1 = ..\lib\unicore\To
UNIDATADIR2 = ..\lib\unicore\lib
CFGSH_TMPL = config.ce
CFGH_TMPL = config_H.ce
-#
-# filenames given to xsubpp must have forward slashes (since it puts
-# full pathnames in #line strings)
-XSUBPP = $(HPERL) -I..\..\lib -MCross=$(CROSS_NAME) ..\$(EXTUTILSDIR)\xsubpp \
- -C++ -prototypes
-
MICROCORE_SRC = \
..\av.c \
..\deb.c \
"LINK_FLAGS=$(LDLIBPATH) $(LINK_FLAGS) $(SUBSYS)" \
"optimize=$(OPTIMIZE)"
+ICWD = -I..\dist\Cwd -I..\dist\Cwd\lib
+ICWD1 = -I..\..\dist\Cwd -I..\..\dist\Cwd\lib
+
+#
+# filenames given to xsubpp must have forward slashes (since it puts
+# full pathnames in #line strings)
+XSUBPP = $(HPERL) -I..\..\lib $(ICWD1) -MCross=$(CROSS_NAME) ..\$(EXTUTILSDIR)\xsubpp \
+ -C++ -prototypes
+
+
#
# Top targets
#
$(DYNALOADER)$(o) : $(DYNALOADER).c xconfig.h $(EXTDIR)\DynaLoader\dlutils.c
-$(CONFIGPM) : $(HPERL) ..\config.sh .\xconfig.h config_h.PL ..\minimod.pl
- cd .. && $(HPERL) configpm --cross=$(CROSS_NAME) --no-glossary
+$(CONFIGPM) : $(HPERL) ..\config.sh config_h.PL ..\minimod.pl
+ cd .. && $(HPERL) -Ilib configpm --cross=$(CROSS_NAME) --no-glossary
-mkdir $(XCOREDIR)
$(XCOPY) ..\*.h $(XCOREDIR)\*.*
$(XCOPY) ..\*.inc $(XCOREDIR)\*.*
.\xconfig.h:
-del /f xconfig.h
-mkdir $(XCOREDIR)
- -$(HPERL) -I..\lib -MCross=$(CROSS_NAME) config_h.PL "INST_VER=$(INST_VER)" "CORE_DIR=$(XCOREDIR)" "CONFIG_H=xconfig.h"
+ -$(HPERL) -I..\lib $(ICWD) -MCross=$(CROSS_NAME) config_h.PL "INST_VER=$(INST_VER)" "CORE_DIR=$(XCOREDIR)" "CONFIG_H=xconfig.h"
$(XCOPY) xconfig.h $(XCOREDIR)\config.h
..\config.sh: config.ce config_sh.PL
if not exist $(AUTODIR) mkdir $(AUTODIR)
cd $(EXTDIR)\$(*B)
$(HPERL) -I..\..\lib -MCross=$(CROSS_NAME) $(*B)_pm.PL
- $(HPERL) -I..\..\lib -MCross=$(CROSS_NAME) XSLoader_pm.PL
cd ..\..\win32
$(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
- $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
cd $(EXTDIR)\$(*B)
$(XSUBPP) dl_win32.xs > $(*B).c
cd ..\..\win32
#----------------------------------------------------------------------------------
-$(PERLEXE_RES): perl.rc perl.ico
- rc $(RCDEFS) perl.rc
+$(PERLEXE_RES): perlexe.rc perl.rc $(PERLEXE_MANIFEST) $(PERLEXE_ICO)
+ rc $(RCDEFS) perlexe.rc
clean:
-rm -f $(MACHINE)/dll/*
$(DLLDIR)\mro.obj \
$(DLLDIR)\hv.obj \
$(DLLDIR)\locale.obj \
+$(DLLDIR)\keywords.obj \
$(DLLDIR)\mathoms.obj \
$(DLLDIR)\mg.obj \
$(DLLDIR)\numeric.obj \
!ENDIF
perldll.def : $(HPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl create_perllibst_h.pl
- $(HPERL) -MCross -I..\lib create_perllibst_h.pl
- $(HPERL) -MCross -w ..\makedef.pl PLATFORM=wince $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
+ $(HPERL) -I..\lib -MCross create_perllibst_h.pl
+ $(HPERL) -I..\lib -MCross -w ..\makedef.pl PLATFORM=wince $(OPTIMIZE) $(DEFINES) $(BUILDOPT) \
CCTYPE=$(CCTYPE) -DPERL_DLL=$(PERLDLL) TARG_DIR=..\ > perldll.def
$(PERLDLL) : $(DLLDIR) perldll.def $(XDLLOBJS) $(PERLDLL_RES)
$(UNIDATAFILES) : $(HPERL) $(CONFIGPM) ..\lib\unicore\mktables
cd ..\lib\unicore && \
- $(HPERL) -I.. mktables -P ..\..\pod -maketest -makelist -p
+ $(HPERL) -I.. -I..\..\lib $(ICWD1) -MCross=$(CROSS_NAME) mktables -P ..\..\pod -maketest -makelist -p -check $@ $(FIRSTUNIFILE)
dist: all
$(HPERL) -I..\lib -MCross=$(CROSS_NAME) ce-helpers\makedist.pl --distdir=dist-$(CROSS_NAME) --cross-name=$(CROSS_NAME)
dTHX;
char regstr[40];
char pathstr[MAX_PATH+1];
- DWORD datalen;
- int len, newsize;
SV *sv1 = NULL;
SV *sv2 = NULL;
return path;
}
+static void
+out_of_memory(void)
+{
+ if (PL_curinterp) {
+ dTHX;
+ /* Can't use PerlIO to write as it allocates memory */
+ PerlLIO_write(PerlIO_fileno(Perl_error_log),
+ PL_no_mem, strlen(PL_no_mem));
+ my_exit(1);
+ }
+ exit(1);
+}
+
+/* The win32_ansipath() function takes a Unicode filename and converts it
+ * into the current Windows codepage. If some characters cannot be mapped,
+ * then it will convert the short name instead.
+ *
+ * The buffer to the ansi pathname must be freed with win32_free() when it
+ * it no longer needed.
+ *
+ * The argument to win32_ansipath() must exist before this function is
+ * called; otherwise there is no way to determine the short path name.
+ *
+ * Ideas for future refinement:
+ * - Only convert those segments of the path that are not in the current
+ * codepage, but leave the other segments in their long form.
+ * - If the resulting name is longer than MAX_PATH, start converting
+ * additional path segments into short names until the full name
+ * is shorter than MAX_PATH. Shorten the filename part last!
+ */
+DllExport char *
+win32_ansipath(const WCHAR *widename)
+{
+ char *name;
+ size_t widelen = wcslen(widename)+1;
+ int len = WideCharToMultiByte(CP_ACP, WC_NO_BEST_FIT_CHARS, widename, widelen,
+ NULL, 0, NULL, NULL);
+ name = win32_malloc(len);
+ if (!name)
+ out_of_memory();
+
+ WideCharToMultiByte(CP_ACP, WC_NO_BEST_FIT_CHARS, widename, widelen,
+ name, len, NULL, NULL);
+ return name;
+}
+
DllExport char *
win32_getenv(const char *name)
{