README.win32 Notes about Win32 port
Todo The Wishlist
Todo.5.005 What needs doing before 5.005 release
+XSLock.h Include file for extensions built with PERL_OBJECT defined
XSUB.h Include file for extension subroutines
+ atomic.h Atomic refcount handling for multi-threading
av.c Array value code
av.h Array value header
bytecode.h Bytecode header for compiler
return off;
}
-static PADOFFSET
+STATIC PADOFFSET
- #ifndef CAN_PROTOTYPE
- pad_findlex(name, newoff, seq, startcv, cx_ix)
- char *name;
- PADOFFSET newoff;
- U32 seq;
- CV* startcv;
- I32 cx_ix;
- #else
pad_findlex(char *name, PADOFFSET newoff, U32 seq, CV* startcv, I32 cx_ix)
- #endif
{
dTHR;
CV *cv;
sv_setpvn(GvSV(gv_fetchpv("/", TRUE, SVt_PV)), "\n", 1);
}
- #ifdef CAN_PROTOTYPE
-static void
+STATIC void
open_script(char *scriptname, bool dosearch, SV *sv)
- #else
- STATIC void
- open_script(scriptname,dosearch,sv)
- char *scriptname;
- bool dosearch;
- SV *sv;
- #endif
{
dTHR;
char *xfound = Nullch;
#include "hv.h"
#include "mg.h"
#include "scope.h"
+ #include "bytecode.h"
+ #include "byterun.h"
+/* Current curly descriptor */
+typedef struct curcur CURCUR;
+struct curcur {
+ int parenfloor; /* how far back to strip paren data */
+ int cur; /* how many instances of scan we've matched */
+ int min; /* the minimal number of scans to match */
+ int max; /* the maximal number of scans to match */
+ int minmod; /* whether to work our way up or down */
+ regnode * scan; /* the thing to match */
+ regnode * next; /* what has to match after it */
+ char * lastloc; /* where we started matching this scan */
+ CURCUR * oldcc; /* current curly before we started this one */
+};
+
+typedef struct _sublex_info SUBLEXINFO;
+struct _sublex_info {
+ I32 super_state; /* lexer state to save */
+ I32 sub_inwhat; /* "lex_inwhat" to use */
+ OP *sub_op; /* "lex_op" to use */
+};
+
+#ifdef PERL_OBJECT
+struct magic_state {
+ SV* mgs_sv;
+ U32 mgs_flags;
+};
+typedef struct magic_state MGS;
+
+typedef struct {
+ I32 len_min;
+ I32 len_delta;
+ I32 pos_min;
+ I32 pos_delta;
+ SV *last_found;
+ I32 last_end; /* min value, <0 unless valid. */
+ I32 last_start_min;
+ I32 last_start_max;
+ SV **longest; /* Either &l_fixed, or &l_float. */
+ SV *longest_fixed;
+ I32 offset_fixed;
+ SV *longest_float;
+ I32 offset_float_min;
+ I32 offset_float_max;
+ I32 flags;
+} scan_data_t;
+
+typedef I32 CHECKPOINT;
+#endif /* PERL_OBJECT */
+
/* work around some libPW problems */
#ifdef DOINIT
EXT char Error[1];
#define ARGS
#define dARGS
#endif /* USE_THREADS */
- #ifdef CAN_PROTOTYPE
+#ifdef PERL_OBJECT
- #define PP(s) OP* CPerlObj::s _((ARGSproto))
++#define PP(s) OP * CPerlObj::s(ARGSproto)
+#else
#define PP(s) OP * s(ARGSproto)
+#endif
- #else /* CAN_PROTOTYPE */
- #define PP(s) OP* s(ARGS) dARGS
- #endif /* CAN_PROTOTYPE */
#define SP sp
#define MARK mark
/*
- reg_node - emit a node
*/
-static regnode * /* Location. */
+STATIC regnode * /* Location. */
- #ifdef CAN_PROTOTYPE
reg_node(U8 op)
- #else
- reg_node(op)
- U8 op;
- #endif
{
register regnode *ret;
register regnode *ptr;
/*
- reganode - emit a node with an argument
*/
-static regnode * /* Location. */
+STATIC regnode * /* Location. */
- #ifdef CAN_PROTOTYPE
reganode(U8 op, U32 arg)
- #else
- reganode(op, arg)
- U8 op;
- U32 arg;
- #endif
{
register regnode *ret;
register regnode *ptr;
/*
- regc - emit (if appropriate) a byte of code
*/
- #ifdef CAN_PROTOTYPE
-static void
+STATIC void
regc(U8 b, char* s)
- #else
- static void
- regc(b, s)
- U8 b;
- char *s;
- #endif
{
if (!SIZE_ONLY)
*s = b;
*
* Means relocating the operand.
*/
- #ifdef CAN_PROTOTYPE
-static void
+STATIC void
reginsert(U8 op, regnode *opnd)
- #else
- static void
- reginsert(op, opnd)
- U8 op;
- regnode *opnd;
- #endif
{
register regnode *src;
register regnode *dst;
#define LOP(f,x) return lop(f,x,s)
-static I32
+STATIC I32
- lop
- #ifdef CAN_PROTOTYPE
- (I32 f, expectation x, char *s)
- #else
- (f,x,s)
- I32 f;
- expectation x;
- char *s;
- #endif /* CAN_PROTOTYPE */
+ lop(I32 f, expectation x, char *s)
{
dTHR;
yylval.ival = f;
oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib \
version.lib odbc32.lib odbccp32.lib
-CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) $(PCHFLAGS) $(OPTIMIZE)
+CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(OBJECTDEF) $(LOCDEFS) $(PCHFLAGS) $(OPTIMIZE)
+
+
+!IF "$(OBJECT)" == "-DPERL_OBJECT"
+DMYMALLOC = undef
+!ELSE
+DMYMALLOC = define
+!ENDIF
+
+!IF "$(OBJECTDEF)" == "-DPERL_OBJECT"
+MINI_SRC =
+!ELSE
- MINI_SRC = ..\perlio.c ..\malloc.c
++MINI_SRC = ..\perlio.c
+!ENDIF
LINK_FLAGS = -nologo $(LINK_DBG) -machine:$(PROCESSOR_ARCHITECTURE)
OBJOUT_FLAG = -Fo
EXEOUT_FLAG = -Fe
CRYPT_OBJ=$(CRYPT_SRC:.c=.obj)
!ENDIF
+ !IF "$(PERL_MALLOC)" == "define"
+ MALLOC_SRC = ..\malloc.c
+ MALLOC_OBJ = ..\malloc$(o)
+ !ENDIF
+
+!IF "$(MINI_SRC)" != ""
- MINI_OBJ=..\perlio$(o) ..\malloc$(o)
++MINI_OBJ=..\perlio$(o)
+!ENDIF
+
#
# filenames given to xsubpp must have forward slashes (since it puts
# full pathnames in #line strings)
-XSUBPP=..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp -C++ -prototypes
+XSUBPP=..\$(MINIPERLEXE) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp -C++ -prototypes
CORE_C= ..\av.c \
+ ..\byterun.c \
..\deb.c \
..\doio.c \
..\doop.c \
..\toke.c \
..\universal.c \
..\util.c \
- $(MINI_SRC) \
+ $(MALLOC_SRC) \
++ $(MINI_SRC) \
$(CRYPT_SRC)
CORE_OBJ= ..\av$(o) \
..\toke$(o) \
..\universal$(o)\
..\util$(o) \
- $(MINI_OBJ) \
+ $(MALLOC_OBJ) \
++ $(MINI_OBJ) \
$(CRYPT_OBJ)
WIN32_C = perllib.c \
#ifndef _config_h_
#define _config_h_
+#ifdef PERL_OBJECT
+#ifdef PERL_GLOBAL_STRUCT
+#error PERL_GLOBAL_STRUCT cannot be defined with PERL_OBJECT
+#endif
+#define win32_perllib_path PerlEnv_lib_path
+#endif
+
-
- /* MEM_ALIGNBYTES:
- * This symbol contains the number of bytes required to align a
- * double. Usual values are 2, 4 and 8.
- * On NeXT starting with 3.2, you can build "Fat" Multiple Architecture
- * Binaries (MAB) for targets with varying alignment. This only matters
- * for perl, where the config.h can be generated and installed on one
- * system, and used by a different architecture to build an extension.
- * The default is eight, for safety.
- */
- #ifndef NeXT
- #define MEM_ALIGNBYTES 8 /**/
- #else /* NeXT */
- #ifdef __m68k__
- #define MEM_ALIGNBYTES 2
- #else
- #ifdef __i386__
- #define MEM_ALIGNBYTES 4
- #else /* __hppa__, __sparc__ and default for unknown architectures */
- #define MEM_ALIGNBYTES 8
- #endif /* __i386__ */
- #endif /* __m68k__ */
- #endif /* NeXT */
-
- /* ARCHNAME:
- * This symbol holds a string representing the architecture name.
- * It may be used to construct an architecture-dependant pathname
- * where library files may be held under a private library, for
- * instance.
+ /* LOC_SED:
+ * This symbol holds the complete pathname to the sed program.
*/
- #define ARCHNAME "MSWin32-x86" /**/
+ #define LOC_SED "" /**/
/* BIN:
* This symbol holds the path of the bin directory where the package will
}
return 0;
}
--
++
/*
* File system stuff
*/