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
av.c Array value code
av.h Array value header
installperl Perl script to do "make install" dirty work
interp.sym Interpreter specific symbols to hide in a struct
intrpvar.h Variables held in each interpreter instance
+ipdir.h Directory interface for Perl Object
+ipenv.h Environment interface for Perl Object
+iplio.h Low level IO interface for Perl Object
+ipmem.h Memory interface for Perl Object
+ipproc.h Process interface for Perl Object
+ipsock.h Socket interface for Perl Object
+ipstdio.h Stdio interface for Perl Object
keywords.h The keyword numbers
keywords.pl Program to write keywords.h
lib/AnyDBM_File.pm Perl module to emulate dbmopen
mv-if-diff Script to mv a file if it changed
myconfig Prints summary of the current configuration
nostdio.h Cause compile error on stdio calls
+objpp.h Scoping macros for Perl Object
+ObjXSub.h Scoping macros for Perl Object in extensions
op.c Opcode syntax tree code
op.h Opcode syntax tree header
opcode.h Automatically generated opcode header
perl.c main()
perl.h Global declarations
perl_exp.SH Creates list of exported symbols for AIX
-perldir.h perldir stuff
-perlenv.h perlenv stuff
+perldir.h Macros for directory abstraction
+perlenv.h Macros for environment abstraction
perlio.c C code for PerlIO abstraction
perlio.h Interface to PerlIO abstraction
perlio.sym Symbols for PerlIO abstraction
-perllio.h perllio stuff
-perlmem.h perlmem stuff
-perlproc.h perlproc stuff
+perllio.h Macros for Low level IO abstraction
+perlmem.h Macros for memory allocation abstraction
+perlproc.h Macros for process abstraction
perlsdio.h Fake stdio using perlio
perlsfio.h Prototype sfio mapping for PerlIO
perlsh A poor man's perl shell
-perlsock.h perlsock stuff
+perlsock.h Macros for socket abstraction
perlvars.h Global variables
perly.c A byacc'ed perly.y
perly.c.diff Fixup perly.c to allow recursion
if ($^O eq 'MSWin32') {
--f 'perl.' . $dlext || die "No perl DLL built\n";
+$perldll = 'perl.' . $dlext;
+$perldll = 'perlcore.' . $dlext if $Config{'ccflags'} =~ /PERL_OBJECT/i;
+
+-f $perldll || die "No perl DLL built\n";
# Install the DLL
-safe_unlink("$installbin/perl.$dlext");
-copy("perl.$dlext", "$installbin/perl.$dlext");
-chmod(0755, "$installbin/perl.$dlext");
+safe_unlink("$installbin/$perldll");
+copy("$perldll", "$installbin/$perldll");
+chmod(0755, "$installbin/$perldll");
}
# First we install the version-numbered executables.
/*
- ipdir.h
- Interface for perl directory functions
+ ipdir.h
+ Interface for perl directory functions
*/
class IPerlDir
{
public:
- virtual int MKdir(const char *dirname, int mode, int &err) = 0;
- virtual int Chdir(const char *dirname, int &err) = 0;
- virtual int Rmdir(const char *dirname, int &err) = 0;
- virtual int Close(DIR *dirp, int &err) = 0;
- virtual DIR *Open(char *filename, int &err) = 0;
- virtual struct direct *Read(DIR *dirp, int &err) = 0;
- virtual void Rewind(DIR *dirp, int &err) = 0;
- virtual void Seek(DIR *dirp, long loc, int &err) = 0;
- virtual long Tell(DIR *dirp, int &err) = 0;
+ virtual int Makedir(const char *dirname, int mode, int &err) = 0;
+ virtual int Chdir(const char *dirname, int &err) = 0;
+ virtual int Rmdir(const char *dirname, int &err) = 0;
+ virtual int Close(DIR *dirp, int &err) = 0;
+ virtual DIR *Open(char *filename, int &err) = 0;
+ virtual struct direct *Read(DIR *dirp, int &err) = 0;
+ virtual void Rewind(DIR *dirp, int &err) = 0;
+ virtual void Seek(DIR *dirp, long loc, int &err) = 0;
+ virtual long Tell(DIR *dirp, int &err) = 0;
};
#endif /* __Inc__IPerlDir___ */
/*
- ipenv.h
- Interface for perl environment functions
+ ipenv.h
+ Interface for perl environment functions
*/
class IPerlEnv
{
public:
- virtual char* Getenv(const char *varname, int &err) = 0;
- virtual int Putenv(const char *envstring, int &err) = 0;
- virtual char* LibPath(char *sfx, ...) =0;
+ virtual char* Getenv(const char *varname, int &err) = 0;
+ virtual int Putenv(const char *envstring, int &err) = 0;
+ virtual char* LibPath(char *sfx, ...) =0;
};
#endif /* __Inc__IPerlEnv___ */
/*
- iplio.h
- Interface for perl Low IO functions
+ iplio.h
+ Interface for perl Low IO functions
*/
class IPerlLIO
{
public:
- virtual int Access(const char *path, int mode, int &err) = 0;
- virtual int Chmod(const char *filename, int pmode, int &err) = 0;
- virtual int Chsize(int handle, long size, int &err) = 0;
- virtual int Close(int handle, int &err) = 0;
- virtual int Dup(int handle, int &err) = 0;
- virtual int Dup2(int handle1, int handle2, int &err) = 0;
- virtual int Flock(int fd, int oper, int &err) = 0;
- virtual int FStat(int handle, struct stat *buffer, int &err) = 0;
- virtual int IOCtl(int i, unsigned int u, char *data, int &err) = 0;
- virtual int Isatty(int handle, int &err) = 0;
- virtual long Lseek(int handle, long offset, int origin, int &err) = 0;
- virtual int Lstat(const char *path, struct stat *buffer, int &err) = 0;
- virtual char *Mktemp(char *Template, int &err) = 0;
- virtual int Open(const char *filename, int oflag, int &err) = 0;
- virtual int Open(const char *filename, int oflag, int pmode, int &err) = 0;
- virtual int Read(int handle, void *buffer, unsigned int count, int &err) = 0;
- virtual int Rename(const char *oldname, const char *newname, int &err) = 0;
- virtual int Setmode(int handle, int mode, int &err) = 0;
- virtual int STat(const char *path, struct stat *buffer, int &err) = 0;
- virtual char *Tmpnam(char *string, int &err) = 0;
- virtual int Umask(int pmode, int &err) = 0;
- virtual int Unlink(const char *filename, int &err) = 0;
- virtual int Utime(char *filename, struct utimbuf *times, int &err) = 0;
- virtual int Write(int handle, const void *buffer, unsigned int count, int &err) = 0;
+ virtual int Access(const char *path, int mode, int &err) = 0;
+ virtual int Chmod(const char *filename, int pmode, int &err) = 0;
+ virtual int Chsize(int handle, long size, int &err) = 0;
+ virtual int Close(int handle, int &err) = 0;
+ virtual int Dup(int handle, int &err) = 0;
+ virtual int Dup2(int handle1, int handle2, int &err) = 0;
+ virtual int Flock(int fd, int oper, int &err) = 0;
+ virtual int FileStat(int handle, struct stat *buffer, int &err) = 0;
+ virtual int IOCtl(int i, unsigned int u, char *data, int &err) = 0;
+ virtual int Isatty(int handle, int &err) = 0;
+ virtual long Lseek(int handle, long offset, int origin, int &err) = 0;
+ virtual int Lstat(const char *path, struct stat *buffer, int &err) = 0;
+ virtual char *Mktemp(char *Template, int &err) = 0;
+ virtual int Open(const char *filename, int oflag, int &err) = 0;
+ virtual int Open(const char *filename, int oflag, int pmode, int &err) = 0;
+ virtual int Read(int handle, void *buffer, unsigned int count, int &err) = 0;
+ virtual int Rename(const char *oldname, const char *newname, int &err) = 0;
+ virtual int Setmode(int handle, int mode, int &err) = 0;
+ virtual int NameStat(const char *path, struct stat *buffer, int &err) = 0;
+ virtual char *Tmpnam(char *string, int &err) = 0;
+ virtual int Umask(int pmode, int &err) = 0;
+ virtual int Unlink(const char *filename, int &err) = 0;
+ virtual int Utime(char *filename, struct utimbuf *times, int &err) = 0;
+ virtual int Write(int handle, const void *buffer, unsigned int count, int &err) = 0;
};
#endif /* __Inc__IPerlLIO___ */
/*
- ipmem.h
- Interface for perl memory allocation
+ ipmem.h
+ Interface for perl memory allocation
*/
class IPerlMem
{
public:
- virtual void* Malloc(size_t) = 0;
- virtual void* Realloc(void*, size_t) = 0;
- virtual void Free(void*) = 0;
+ virtual void* Malloc(size_t) = 0;
+ virtual void* Realloc(void*, size_t) = 0;
+ virtual void Free(void*) = 0;
};
#endif /* __Inc__IPerlMem___ */
/*
- ipproc.h
- Interface for perl process functions
+ ipproc.h
+ Interface for perl process functions
*/
class IPerlProc
{
public:
- virtual void Abort(void) = 0;
- virtual void Exit(int status) = 0;
- virtual void _Exit(int status) = 0;
- virtual int Execl(const char *cmdname, const char *arg0, const char *arg1, const char *arg2, const char *arg3) = 0;
- virtual int Execv(const char *cmdname, const char *const *argv) = 0;
- virtual int Execvp(const char *cmdname, const char *const *argv) = 0;
- virtual uid_t Getuid(void) = 0;
- virtual uid_t Geteuid(void) = 0;
- virtual gid_t Getgid(void) = 0;
- virtual gid_t Getegid(void) = 0;
- virtual char *Getlogin(void) = 0;
- virtual int Kill(int pid, int sig) = 0;
- virtual int Killpg(int pid, int sig) = 0;
- virtual int PauseProc(void) = 0;
- virtual PerlIO* Popen(const char *command, const char *mode) = 0;
- virtual int Pclose(PerlIO *stream) = 0;
- virtual int Pipe(int *phandles) = 0;
- virtual int Setuid(uid_t uid) = 0;
- virtual int Setgid(gid_t gid) = 0;
- virtual int Sleep(unsigned int) = 0;
- virtual int Times(struct tms *timebuf) = 0;
- virtual int Wait(int *status) = 0;
- virtual Sighandler_t Signal(int sig, Sighandler_t subcode) = 0;
+ virtual void Abort(void) = 0;
+ virtual void Exit(int status) = 0;
+ virtual void _Exit(int status) = 0;
+ virtual int Execl(const char *cmdname, const char *arg0, const char *arg1, const char *arg2, const char *arg3) = 0;
+ virtual int Execv(const char *cmdname, const char *const *argv) = 0;
+ virtual int Execvp(const char *cmdname, const char *const *argv) = 0;
+ virtual uid_t Getuid(void) = 0;
+ virtual uid_t Geteuid(void) = 0;
+ virtual gid_t Getgid(void) = 0;
+ virtual gid_t Getegid(void) = 0;
+ virtual char *Getlogin(void) = 0;
+ virtual int Kill(int pid, int sig) = 0;
+ virtual int Killpg(int pid, int sig) = 0;
+ virtual int PauseProc(void) = 0;
+ virtual PerlIO* Popen(const char *command, const char *mode) = 0;
+ virtual int Pclose(PerlIO *stream) = 0;
+ virtual int Pipe(int *phandles) = 0;
+ virtual int Setuid(uid_t uid) = 0;
+ virtual int Setgid(gid_t gid) = 0;
+ virtual int Sleep(unsigned int) = 0;
+ virtual int Times(struct tms *timebuf) = 0;
+ virtual int Wait(int *status) = 0;
+ virtual Sighandler_t Signal(int sig, Sighandler_t subcode) = 0;
#ifdef WIN32
- virtual void GetSysMsg(char*& msg, DWORD& dwLen, DWORD dwErr) = 0;
- virtual void FreeBuf(char* msg) = 0;
- virtual BOOL DoCmd(char *cmd) = 0;
- virtual int Spawn(char*cmds) = 0;
- virtual int Spawnvp(int mode, const char *cmdname, const char *const *argv) = 0;
- virtual int ASpawn(void *vreally, void **vmark, void **vsp) = 0;
+ virtual void GetSysMsg(char*& msg, DWORD& dwLen, DWORD dwErr) = 0;
+ virtual void FreeBuf(char* msg) = 0;
+ virtual BOOL DoCmd(char *cmd) = 0;
+ virtual int Spawn(char*cmds) = 0;
+ virtual int Spawnvp(int mode, const char *cmdname, const char *const *argv) = 0;
+ virtual int ASpawn(void *vreally, void **vmark, void **vsp) = 0;
#endif
};
/*
- ipsock.h
- Interface for perl socket functions
+ ipsock.h
+ Interface for perl socket functions
*/
class IPerlSock
{
public:
- virtual u_long Htonl(u_long hostlong) = 0;
- virtual u_short Htons(u_short hostshort) = 0;
- virtual u_long Ntohl(u_long netlong) = 0;
- virtual u_short Ntohs(u_short netshort) = 0;
- virtual SOCKET Accept(SOCKET s, struct sockaddr* addr, int* addrlen, int &err) = 0;
- virtual int Bind(SOCKET s, const struct sockaddr* name, int namelen, int &err) = 0;
- virtual int Connect(SOCKET s, const struct sockaddr* name, int namelen, int &err) = 0;
- virtual void Endhostent(int &err) = 0;
- virtual void Endnetent(int &err) = 0;
- virtual void Endprotoent(int &err) = 0;
- virtual void Endservent(int &err) = 0;
- virtual struct hostent* Gethostbyaddr(const char* addr, int len, int type, int &err) = 0;
- virtual struct hostent* Gethostbyname(const char* name, int &err) = 0;
- virtual struct hostent* Gethostent(int &err) = 0;
- virtual int Gethostname(char* name, int namelen, int &err) = 0;
- virtual struct netent *Getnetbyaddr(long net, int type, int &err) = 0;
- virtual struct netent *Getnetbyname(const char *, int &err) = 0;
- virtual struct netent *Getnetent(int &err) = 0;
- virtual int Getpeername(SOCKET s, struct sockaddr* name, int* namelen, int &err) = 0;
- virtual struct protoent* Getprotobyname(const char* name, int &err) = 0;
- virtual struct protoent* Getprotobynumber(int number, int &err) = 0;
- virtual struct protoent* Getprotoent(int &err) = 0;
- virtual struct servent* Getservbyname(const char* name, const char* proto, int &err) = 0;
- virtual struct servent* Getservbyport(int port, const char* proto, int &err) = 0;
- virtual struct servent* Getservent(int &err) = 0;
- virtual int Getsockname(SOCKET s, struct sockaddr* name, int* namelen, int &err) = 0;
- virtual int Getsockopt(SOCKET s, int level, int optname, char* optval, int* optlen, int &err) = 0;
- virtual unsigned long InetAddr(const char* cp, int &err) = 0;
- virtual char* InetNtoa(struct in_addr in, int &err) = 0;
- virtual int Listen(SOCKET s, int backlog, int &err) = 0;
- virtual int Recvfrom(SOCKET s, char* buf, int len, int flags, struct sockaddr* from, int* fromlen, int &err) = 0;
- virtual int Select(int nfds, char* readfds, char* writefds, char* exceptfds, const struct timeval* timeout, int &err) = 0;
- virtual int Send(SOCKET s, const char* buf, int len, int flags, int &err) = 0;
- virtual int Sendto(SOCKET s, const char* buf, int len, int flags, const struct sockaddr* to, int tolen, int &err) = 0;
- virtual void Sethostent(int stayopen, int &err) = 0;
- virtual void Setnetent(int stayopen, int &err) = 0;
- virtual void Setprotoent(int stayopen, int &err) = 0;
- virtual void Setservent(int stayopen, int &err) = 0;
- virtual int Setsockopt(SOCKET s, int level, int optname, const char* optval, int optlen, int &err) = 0;
- virtual int Shutdown(SOCKET s, int how, int &err) = 0;
- virtual SOCKET Socket(int af, int type, int protocol, int &err) = 0;
- virtual int Socketpair(int domain, int type, int protocol, int* fds, int &err) = 0;
+ virtual u_long Htonl(u_long hostlong) = 0;
+ virtual u_short Htons(u_short hostshort) = 0;
+ virtual u_long Ntohl(u_long netlong) = 0;
+ virtual u_short Ntohs(u_short netshort) = 0;
+ virtual SOCKET Accept(SOCKET s, struct sockaddr* addr, int* addrlen, int &err) = 0;
+ virtual int Bind(SOCKET s, const struct sockaddr* name, int namelen, int &err) = 0;
+ virtual int Connect(SOCKET s, const struct sockaddr* name, int namelen, int &err) = 0;
+ virtual void Endhostent(int &err) = 0;
+ virtual void Endnetent(int &err) = 0;
+ virtual void Endprotoent(int &err) = 0;
+ virtual void Endservent(int &err) = 0;
+ virtual struct hostent* Gethostbyaddr(const char* addr, int len, int type, int &err) = 0;
+ virtual struct hostent* Gethostbyname(const char* name, int &err) = 0;
+ virtual struct hostent* Gethostent(int &err) = 0;
+ virtual int Gethostname(char* name, int namelen, int &err) = 0;
+ virtual struct netent *Getnetbyaddr(long net, int type, int &err) = 0;
+ virtual struct netent *Getnetbyname(const char *, int &err) = 0;
+ virtual struct netent *Getnetent(int &err) = 0;
+ virtual int Getpeername(SOCKET s, struct sockaddr* name, int* namelen, int &err) = 0;
+ virtual struct protoent* Getprotobyname(const char* name, int &err) = 0;
+ virtual struct protoent* Getprotobynumber(int number, int &err) = 0;
+ virtual struct protoent* Getprotoent(int &err) = 0;
+ virtual struct servent* Getservbyname(const char* name, const char* proto, int &err) = 0;
+ virtual struct servent* Getservbyport(int port, const char* proto, int &err) = 0;
+ virtual struct servent* Getservent(int &err) = 0;
+ virtual int Getsockname(SOCKET s, struct sockaddr* name, int* namelen, int &err) = 0;
+ virtual int Getsockopt(SOCKET s, int level, int optname, char* optval, int* optlen, int &err) = 0;
+ virtual unsigned long InetAddr(const char* cp, int &err) = 0;
+ virtual char* InetNtoa(struct in_addr in, int &err) = 0;
+ virtual int Listen(SOCKET s, int backlog, int &err) = 0;
+ virtual int Recvfrom(SOCKET s, char* buf, int len, int flags, struct sockaddr* from, int* fromlen, int &err) = 0;
+ virtual int Select(int nfds, char* readfds, char* writefds, char* exceptfds, const struct timeval* timeout, int &err) = 0;
+ virtual int Send(SOCKET s, const char* buf, int len, int flags, int &err) = 0;
+ virtual int Sendto(SOCKET s, const char* buf, int len, int flags, const struct sockaddr* to, int tolen, int &err) = 0;
+ virtual void Sethostent(int stayopen, int &err) = 0;
+ virtual void Setnetent(int stayopen, int &err) = 0;
+ virtual void Setprotoent(int stayopen, int &err) = 0;
+ virtual void Setservent(int stayopen, int &err) = 0;
+ virtual int Setsockopt(SOCKET s, int level, int optname, const char* optval, int optlen, int &err) = 0;
+ virtual int Shutdown(SOCKET s, int how, int &err) = 0;
+ virtual SOCKET Socket(int af, int type, int protocol, int &err) = 0;
+ virtual int Socketpair(int domain, int type, int protocol, int* fds, int &err) = 0;
};
#endif /* __Inc__IPerlSock___ */
/*
- ipstdio.h
- Interface for perl stdio functions
+ ipstdio.h
+ Interface for perl stdio functions
*/
class IPerlStdIO
{
public:
- virtual PerlIO* Stdin(void) = 0;
- virtual PerlIO* Stdout(void) = 0;
- virtual PerlIO* Stderr(void) = 0;
- virtual PerlIO* Open(const char *, const char *, int &err) = 0;
- virtual int Close(PerlIO*, int &err) = 0;
- virtual int Eof(PerlIO*, int &err) = 0;
- virtual int Error(PerlIO*, int &err) = 0;
- virtual void Clearerr(PerlIO*, int &err) = 0;
- virtual int Getc(PerlIO*, int &err) = 0;
- virtual char* GetBase(PerlIO *, int &err) = 0;
- virtual int GetBufsiz(PerlIO *, int &err) = 0;
- virtual int GetCnt(PerlIO *, int &err) = 0;
- virtual char* GetPtr(PerlIO *, int &err) = 0;
- virtual int Putc(PerlIO*, int, int &err) = 0;
- virtual int Puts(PerlIO*, const char *, int &err) = 0;
- virtual int Flush(PerlIO*, int &err) = 0;
- virtual int Ungetc(PerlIO*,int, int &err) = 0;
- virtual int Fileno(PerlIO*, int &err) = 0;
- virtual PerlIO* Fdopen(int, const char *, int &err) = 0;
- virtual PerlIO* Reopen(const char*, const char*, PerlIO*, int &err) = 0;
- virtual SSize_t Read(PerlIO*,void *,Size_t, int &err) = 0;
- virtual SSize_t Write(PerlIO*,const void *,Size_t, int &err) = 0;
- virtual void SetBuf(PerlIO *, char*, int &err) = 0;
- virtual int SetVBuf(PerlIO *, char*, int, Size_t, int &err) = 0;
- virtual void SetCnt(PerlIO *, int, int &err) = 0;
- virtual void SetPtrCnt(PerlIO *, char *, int, int& err) = 0;
- virtual void Setlinebuf(PerlIO*, int &err) = 0;
- virtual int Printf(PerlIO*, int &err, const char *,...) = 0;
- virtual int Vprintf(PerlIO*, int &err, const char *, va_list) = 0;
- virtual long Tell(PerlIO*, int &err) = 0;
- virtual int Seek(PerlIO*, off_t, int, int &err) = 0;
- virtual void Rewind(PerlIO*, int &err) = 0;
- virtual PerlIO* Tmpfile(int &err) = 0;
- virtual int Getpos(PerlIO*, Fpos_t *, int &err) = 0;
- virtual int Setpos(PerlIO*, const Fpos_t *, int &err) = 0;
- virtual void Init(int &err) = 0;
- virtual void InitOSExtras(void* p) = 0;
+ virtual PerlIO* Stdin(void) = 0;
+ virtual PerlIO* Stdout(void) = 0;
+ virtual PerlIO* Stderr(void) = 0;
+ virtual PerlIO* Open(const char *, const char *, int &err) = 0;
+ virtual int Close(PerlIO*, int &err) = 0;
+ virtual int Eof(PerlIO*, int &err) = 0;
+ virtual int Error(PerlIO*, int &err) = 0;
+ virtual void Clearerr(PerlIO*, int &err) = 0;
+ virtual int Getc(PerlIO*, int &err) = 0;
+ virtual char* GetBase(PerlIO *, int &err) = 0;
+ virtual int GetBufsiz(PerlIO *, int &err) = 0;
+ virtual int GetCnt(PerlIO *, int &err) = 0;
+ virtual char* GetPtr(PerlIO *, int &err) = 0;
+ virtual int Putc(PerlIO*, int, int &err) = 0;
+ virtual int Puts(PerlIO*, const char *, int &err) = 0;
+ virtual int Flush(PerlIO*, int &err) = 0;
+ virtual int Ungetc(PerlIO*,int, int &err) = 0;
+ virtual int Fileno(PerlIO*, int &err) = 0;
+ virtual PerlIO* Fdopen(int, const char *, int &err) = 0;
+ virtual PerlIO* Reopen(const char*, const char*, PerlIO*, int &err) = 0;
+ virtual SSize_t Read(PerlIO*,void *,Size_t, int &err) = 0;
+ virtual SSize_t Write(PerlIO*,const void *,Size_t, int &err) = 0;
+ virtual void SetBuf(PerlIO *, char*, int &err) = 0;
+ virtual int SetVBuf(PerlIO *, char*, int, Size_t, int &err) = 0;
+ virtual void SetCnt(PerlIO *, int, int &err) = 0;
+ virtual void SetPtrCnt(PerlIO *, char *, int, int& err) = 0;
+ virtual void Setlinebuf(PerlIO*, int &err) = 0;
+ virtual int Printf(PerlIO*, int &err, const char *,...) = 0;
+ virtual int Vprintf(PerlIO*, int &err, const char *, va_list) = 0;
+ virtual long Tell(PerlIO*, int &err) = 0;
+ virtual int Seek(PerlIO*, off_t, int, int &err) = 0;
+ virtual void Rewind(PerlIO*, int &err) = 0;
+ virtual PerlIO* Tmpfile(int &err) = 0;
+ virtual int Getpos(PerlIO*, Fpos_t *, int &err) = 0;
+ virtual int Setpos(PerlIO*, const Fpos_t *, int &err) = 0;
+ virtual void Init(int &err) = 0;
+ virtual void InitOSExtras(void* p) = 0;
};
#endif /* __Inc__IPerlStdIO___ */
sub perl_archive
{
- return '$(PERL_INC)\perl$(LIB_EXT)';
+ if($OBJ) {
+ return '$(PERL_INC)\perlcore$(LIB_EXT)';
+ }
+ return '$(PERL_INC)\perl$(LIB_EXT)';
}
sub export_list
#include "ipdir.h"
-#define PerlDir_mkdir(name, mode) piDir->MKdir((name), (mode), ErrorNo())
+#define PerlDir_mkdir(name, mode) piDir->Makedir((name), (mode), ErrorNo())
#define PerlDir_chdir(name) piDir->Chdir((name), ErrorNo())
#define PerlDir_rmdir(name) piDir->Rmdir((name), ErrorNo())
#define PerlDir_close(dir) piDir->Close((dir), ErrorNo())
#define PerlEnv_putenv(str) piENV->Putenv((str), ErrorNo())
#define PerlEnv_getenv(str) piENV->Getenv((str), ErrorNo())
-#define PerlEnv_lib_path piENV->LibPath
+#define PerlEnv_lib_path piENV->LibPath
#else
#define PerlEnv_putenv(str) putenv((str))
#define PerlEnv_getenv(str) getenv((str))
#include "ipstdio.h"
#define PerlIO_canset_cnt(f) 1
-#define PerlIO_has_base(f) 1
+#define PerlIO_has_base(f) 1
#define PerlIO_has_cntptr(f) 1
-#define PerlIO_fast_gets(f) 1
-
-#define PerlIO_stdin() piStdIO->Stdin()
-#define PerlIO_stdout() piStdIO->Stdout()
-#define PerlIO_stderr() piStdIO->Stderr()
-#define PerlIO_open(x,y) piStdIO->Open((x),(y), ErrorNo())
-#define PerlIO_close(f) piStdIO->Close((f), ErrorNo())
-#define PerlIO_eof(f) piStdIO->Eof((f), ErrorNo())
-#define PerlIO_error(f) piStdIO->Error((f), ErrorNo())
-#define PerlIO_clearerr(f) piStdIO->Clearerr((f), ErrorNo())
-#define PerlIO_getc(f) piStdIO->Getc((f), ErrorNo())
-#define PerlIO_get_base(f) piStdIO->GetBase((f), ErrorNo())
+#define PerlIO_fast_gets(f) 1
+
+#define PerlIO_stdin() piStdIO->Stdin()
+#define PerlIO_stdout() piStdIO->Stdout()
+#define PerlIO_stderr() piStdIO->Stderr()
+#define PerlIO_open(x,y) piStdIO->Open((x),(y), ErrorNo())
+#define PerlIO_close(f) piStdIO->Close((f), ErrorNo())
+#define PerlIO_eof(f) piStdIO->Eof((f), ErrorNo())
+#define PerlIO_error(f) piStdIO->Error((f), ErrorNo())
+#define PerlIO_clearerr(f) piStdIO->Clearerr((f), ErrorNo())
+#define PerlIO_getc(f) piStdIO->Getc((f), ErrorNo())
+#define PerlIO_get_base(f) piStdIO->GetBase((f), ErrorNo())
#define PerlIO_get_bufsiz(f) piStdIO->GetBufsiz((f), ErrorNo())
-#define PerlIO_get_cnt(f) piStdIO->GetCnt((f), ErrorNo())
-#define PerlIO_get_ptr(f) piStdIO->GetPtr((f), ErrorNo())
-#define PerlIO_putc(f,c) piStdIO->Putc((f),(c), ErrorNo())
-#define PerlIO_puts(f,s) piStdIO->Puts((f),(s), ErrorNo())
-#define PerlIO_flush(f) piStdIO->Flush((f), ErrorNo())
-#define PerlIO_ungetc(f,c) piStdIO->Ungetc((f),(c), ErrorNo())
-#define PerlIO_fileno(f) piStdIO->Fileno((f), ErrorNo())
-#define PerlIO_fdopen(f, s) piStdIO->Fdopen((f),(s), ErrorNo())
+#define PerlIO_get_cnt(f) piStdIO->GetCnt((f), ErrorNo())
+#define PerlIO_get_ptr(f) piStdIO->GetPtr((f), ErrorNo())
+#define PerlIO_putc(f,c) piStdIO->Putc((f),(c), ErrorNo())
+#define PerlIO_puts(f,s) piStdIO->Puts((f),(s), ErrorNo())
+#define PerlIO_flush(f) piStdIO->Flush((f), ErrorNo())
+#define PerlIO_ungetc(f,c) piStdIO->Ungetc((f),(c), ErrorNo())
+#define PerlIO_fileno(f) piStdIO->Fileno((f), ErrorNo())
+#define PerlIO_fdopen(f, s) piStdIO->Fdopen((f),(s), ErrorNo())
#define PerlIO_reopen(p, m, f) piStdIO->Reopen((p), (m), (f), ErrorNo())
#define PerlIO_read(f,buf,count) (SSize_t)piStdIO->Read((f), (buf), (count), ErrorNo())
#define PerlIO_write(f,buf,count) piStdIO->Write((f), (buf), (count), ErrorNo())
-#define PerlIO_setbuf(f,b) piStdIO->SetBuf((f), (b), ErrorNo())
+#define PerlIO_setbuf(f,b) piStdIO->SetBuf((f), (b), ErrorNo())
#define PerlIO_setvbuf(f,b,t,s) piStdIO->SetVBuf((f), (b), (t), (s), ErrorNo())
-#define PerlIO_set_cnt(f,c) piStdIO->SetCnt((f), (c), ErrorNo())
+#define PerlIO_set_cnt(f,c) piStdIO->SetCnt((f), (c), ErrorNo())
#define PerlIO_set_ptrcnt(f,p,c) piStdIO->SetPtrCnt((f), (p), (c), ErrorNo())
#define PerlIO_setlinebuf(f) piStdIO->Setlinebuf((f), ErrorNo())
-#define PerlIO_printf fprintf
-#define PerlIO_stdoutf piStdIO->Printf
-#define PerlIO_vprintf(f,fmt,a) piStdIO->Vprintf((f), ErrorNo(), (fmt),a)
-#define PerlIO_tell(f) piStdIO->Tell((f), ErrorNo())
-#define PerlIO_seek(f,o,w) piStdIO->Seek((f),(o),(w), ErrorNo())
-#define PerlIO_getpos(f,p) piStdIO->Getpos((f),(p), ErrorNo())
-#define PerlIO_setpos(f,p) piStdIO->Setpos((f),(p), ErrorNo())
-#define PerlIO_rewind(f) piStdIO->Rewind((f), ErrorNo())
-#define PerlIO_tmpfile() piStdIO->Tmpfile(ErrorNo())
-#define PerlIO_init() piStdIO->Init(ErrorNo())
+#define PerlIO_printf fprintf
+#define PerlIO_stdoutf piStdIO->Printf
+#define PerlIO_vprintf(f,fmt,a) piStdIO->Vprintf((f), ErrorNo(), (fmt),a)
+#define PerlIO_tell(f) piStdIO->Tell((f), ErrorNo())
+#define PerlIO_seek(f,o,w) piStdIO->Seek((f),(o),(w), ErrorNo())
+#define PerlIO_getpos(f,p) piStdIO->Getpos((f),(p), ErrorNo())
+#define PerlIO_setpos(f,p) piStdIO->Setpos((f),(p), ErrorNo())
+#define PerlIO_rewind(f) piStdIO->Rewind((f), ErrorNo())
+#define PerlIO_tmpfile() piStdIO->Tmpfile(ErrorNo())
+#define PerlIO_init() piStdIO->Init(ErrorNo())
#undef init_os_extras
-#define init_os_extras() piStdIO->InitOSExtras(this)
+#define init_os_extras() piStdIO->InitOSExtras(this)
#else
#include "perlsdio.h"
#define PerlLIO_dup(fd) piLIO->Dup((fd), ErrorNo())
#define PerlLIO_dup2(fd1, fd2) piLIO->Dup2((fd1), (fd2), ErrorNo())
#define PerlLIO_flock(fd, op) piLIO->Flock((fd), (op), ErrorNo())
-#define PerlLIO_fstat(fd, buf) piLIO->FStat((fd), (buf), ErrorNo())
+#define PerlLIO_fstat(fd, buf) piLIO->FileStat((fd), (buf), ErrorNo())
#define PerlLIO_ioctl(fd, u, buf) piLIO->IOCtl((fd), (u), (buf), ErrorNo())
#define PerlLIO_isatty(fd) piLIO->Isatty((fd), ErrorNo())
#define PerlLIO_lseek(fd, offset, mode) piLIO->Lseek((fd), (offset), (mode), ErrorNo())
#define PerlLIO_read(fd, buf, count) piLIO->Read((fd), (buf), (count), ErrorNo())
#define PerlLIO_rename(oldname, newname) piLIO->Rename((oldname), (newname), ErrorNo())
#define PerlLIO_setmode(fd, mode) piLIO->Setmode((fd), (mode), ErrorNo())
-#define PerlLIO_stat(name, buf) piLIO->STat((name), (buf), ErrorNo())
+#define PerlLIO_stat(name, buf) piLIO->NameStat((name), (buf), ErrorNo())
#define PerlLIO_tmpnam(str) piLIO->Tmpnam((str), ErrorNo())
#define PerlLIO_umask(mode) piLIO->Umask((mode), ErrorNo())
#define PerlLIO_unlink(file) piLIO->Unlink((file), ErrorNo())
# Options
#
!IF "$(RUNTIME)" == ""
+! IF "$(OBJECT)" == "-DPERL_OBJECT"
+OBJECTFLAGS = -TP $(OBJECT)
+RUNTIME = -MT
+! ELSE
+OBJECTFLAGS =
RUNTIME = -MD
+! ENDIF
!ENDIF
INCLUDES = -I.\include -I. -I..
#PCHFLAGS = -Fp"$(INTDIR)/modules.pch" -YX
-DEFINES = -DWIN32 -D_CONSOLE $(BUILDOPT) $(CRYPT_FLAG) $(OBJECT)
+DEFINES = -DWIN32 -D_CONSOLE $(BUILDOPT) $(CRYPT_FLAG)
LOCDEFS = -DPERLDLL -DPERL_CORE
SUBSYS = console
LIBC = msvcrt.lib
WINIOMAYBE =
!ELSE
-LIBC = libcmt.lib
+LIBC =
WINIOMAYBE =
!ENDIF
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)
+
!IF "$(OBJECT)" == "-DPERL_OBJECT"
-CFLAGS = -nologo -Gf -W3 -TP $(INCLUDES) $(DEFINES) $(LOCDEFS) $(PCHFLAGS) $(OPTIMIZE)
+COBJFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(OBJECTFLAGS) $(LOCDEFS) $(PCHFLAGS) $(OPTIMIZE)
+DMYMALLOC = undef
!ELSE
-CFLAGS = -nologo -Gf -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) $(PCHFLAGS) $(OPTIMIZE)
+COBJFLAGS = $(CFLAGS)
+DMYMALLOC = define
!ENDIF
LINK_FLAGS = -nologo $(LINK_DBG) -machine:$(PROCESSOR_ARCHITECTURE)
OBJOUT_FLAG = -Fo
#
# various targets
+!IF "$(OBJECT)" == "-DPERL_OBJECT"
+PERLIMPLIB=..\perlcore.lib
+PERLDLL=..\perlcore.dll
+!ELSE
PERLIMPLIB=..\perl.lib
-MINIPERL=..\miniperl.exe
PERLDLL=..\perl.dll
+!ENDIF
+MINIPERL=..\miniperl.exe
PERLEXE=..\perl.exe
GLOBEXE=..\perlglob.exe
CONFIGPM=..\lib\Config.pm
copy $(CFGH_TMPL) config.h
..\config.sh : config.w32 $(MINIPERL) config_sh.PL
- $(MINIPERL) -I..\lib config_sh.PL \
- "INST_DRV=$(INST_DRV)" \
- "INST_TOP=$(INST_TOP)" \
- "archname=$(ARCHNAME)" \
- "cc=$(CC)" \
- "ccflags=$(OPTIMIZE) $(DEFINES)" \
- "cf_email=$(EMAIL)" \
- "d_crypt=$(D_CRYPT)" \
- "libs=$(LIBFILES)" \
- "incpath=$(CCINCDIR)" \
- "libpth=$(CCLIBDIR)" \
- "libc=$(LIBC)" \
- "static_ext=$(STATIC_EXT)" \
- "dynamic_ext=$(DYNAMIC_EXT)" \
- "LINK_FLAGS=$(LINK_FLAGS)" \
- "optimize=$(OPTIMIZE)" \
- config.w32 > ..\config.sh
+ $(MINIPERL) -I..\lib config_sh.PL \
+ "INST_DRV=$(INST_DRV)" \
+ "INST_TOP=$(INST_TOP)" \
+ "archname=$(ARCHNAME)" \
+ "cc=$(CC)" \
+ "ccflags=$(OPTIMIZE) $(DEFINES) $(OBJECTFLAGS)"\
+ "cf_email=$(EMAIL)" \
+ "d_crypt=$(D_CRYPT)" \
+ "libs=$(LIBFILES)" \
+ "incpath=$(CCINCDIR)" \
+ "libpth=$(CCLIBDIR)" \
+ "libc=$(LIBC)" \
+ "static_ext=$(STATIC_EXT)" \
+ "dynamic_ext=$(DYNAMIC_EXT)" \
+ "LINK_FLAGS=$(LINK_FLAGS)" \
+ "optimize=$(OPTIMIZE)" \
+ "libperl=$(PERLIMPLIB)" \
+ "d_mymalloc=$(DMYMALLOC)" \
+ config.w32 > ..\config.sh
$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
cd .. && miniperl configpm
$(PERL95_OBJ) : $(CORE_H)
$(X2P_OBJ) : $(CORE_H)
+
+!IF "$(OBJECT)" == "-DPERL_OBJECT"
+perldll.def : makefile
+ echo LIBRARY PerlCore >perldll.def
+ echo DESCRIPTION 'Perl interpreter' >>perldll.def
+ echo EXPORTS >>perldll.def
+ echo perl_alloc >>perldll.def
+
+!ELSE
perldll.def : $(MINIPERL) $(CONFIGPM) ..\global.sym makedef.pl
$(MINIPERL) -w makedef.pl $(OPTIMIZE) $(DEFINES) \
CCTYPE=$(CCTYPE) > perldll.def
+!ENDIF
+
+
$(PERLDLL): perldll.def $(CORE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
$(LINK32) -dll -def:perldll.def -out:$@ @<<
$(LINK_FLAGS) $(LIBFILES) $(CORE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
$(MINIMOD) : $(MINIPERL) ..\minimod.pl
cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
+..\x2p\a2p$(o) : ..\x2p\a2p.c
+ $(CC) $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
+
+..\x2p\hash$(o) : ..\x2p\hash.c
+ $(CC) $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\hash.c
+
+..\x2p\str$(o) : ..\x2p\str.c
+ $(CC) $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\str.c
+
+..\x2p\util$(o) : ..\x2p\util.c
+ $(CC) $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\util.c
+
+..\x2p\walk$(o) : ..\x2p\walk.c
+ $(CC) $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\walk.c
+
$(X2P) : $(X2P_OBJ)
$(LINK32) -subsystem:console -out:$@ @<<
$(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ)