extern void PerlIO_init (void);
#endif
-#ifdef PERL_OBJECT
+#ifndef Sighandler_t
+typedef Signal_t (*Sighandler_t) (int);
+#endif
+
+#if defined(PERL_IMPLICIT_SYS)
#ifndef PerlIO
typedef struct _PerlIO PerlIO;
(*PL_StdIO->pSetPtrCnt)(PL_StdIO, (f), (p), (c))
#define PerlIO_setlinebuf(f) \
(*PL_StdIO->pSetlinebuf)(PL_StdIO, (f))
-#define PerlIO_printf fprintf
+#define PerlIO_printf Perl_fprintf_nocontext
#define PerlIO_stdoutf *PL_StdIO->pPrintf
#define PerlIO_vprintf(f,fmt,a) \
(*PL_StdIO->pVprintf)(PL_StdIO, (f),(fmt),a)
#define PerlIO_init() \
(*PL_StdIO->pInit)(PL_StdIO)
#undef init_os_extras
-#define init_os_extras(x) \
+#define init_os_extras() \
(*PL_StdIO->pInitOSExtras)(PL_StdIO)
-#else /* PERL_OBJECT */
+#else /* PERL_IMPLICIT_SYS */
#include "perlsdio.h"
+#include "perl.h"
-#endif /* PERL_OBJECT */
+#endif /* PERL_IMPLICIT_SYS */
#ifndef PERLIO_IS_STDIO
#ifdef USE_SFIO
* Interface for directory functions
*/
-#ifdef PERL_OBJECT
+#if defined(PERL_IMPLICIT_SYS)
/* IPerlDir */
struct IPerlDir;
#define PerlDir_tell(dir) \
(*PL_Dir->pTell)(PL_Dir, (dir))
-#else /* PERL_OBJECT */
+#else /* PERL_IMPLICIT_SYS */
#define PerlDir_mkdir(name, mode) Mkdir((name), (mode))
#ifdef VMS
#define PerlDir_seek(dir, loc) seekdir((dir), (loc))
#define PerlDir_tell(dir) telldir((dir))
-#endif /* PERL_OBJECT */
+#endif /* PERL_IMPLICIT_SYS */
/*
Interface for perl environment functions
*/
-#ifdef PERL_OBJECT
+#if defined(PERL_IMPLICIT_SYS)
/* IPerlEnv */
struct IPerlEnv;
typedef char* (*LPEnvGetenv)(struct IPerlEnv*, const char*);
typedef int (*LPEnvPutenv)(struct IPerlEnv*, const char*);
-typedef char * (*LPEnvGetenv_len)(struct IPerlEnv*,
+typedef char* (*LPEnvGetenv_len)(struct IPerlEnv*,
const char *varname, unsigned long *len);
typedef int (*LPEnvUname)(struct IPerlEnv*, struct utsname *name);
typedef void (*LPEnvClearenv)(struct IPerlEnv*);
-typedef unsigned long (*LPEnvOsID)(struct IPerlEnv*);
+typedef void* (*LPEnvGetChildenv)(struct IPerlEnv*);
+typedef void (*LPEnvFreeChildenv)(struct IPerlEnv*, void* env);
+typedef char* (*LPEnvGetChilddir)(struct IPerlEnv*);
+typedef void (*LPEnvFreeChilddir)(struct IPerlEnv*, char* dir);
#ifdef HAS_ENVGETENV
-typedef char * (*LPENVGetenv)(struct IPerlEnv*, const char *varname);
-typedef char * (*LPENVGetenv_len)(struct IPerlEnv*,
+typedef char* (*LPENVGetenv)(struct IPerlEnv*, const char *varname);
+typedef char* (*LPENVGetenv_len)(struct IPerlEnv*,
const char *varname, unsigned long *len);
#endif
#ifdef WIN32
+typedef unsigned long (*LPEnvOsID)(struct IPerlEnv*);
typedef char* (*LPEnvLibPath)(struct IPerlEnv*, char*);
typedef char* (*LPEnvSiteLibPath)(struct IPerlEnv*, char*);
#endif
LPEnvGetenv_len pGetenv_len;
LPEnvUname pEnvUname;
LPEnvClearenv pClearenv;
+ LPEnvGetChildenv pGetChildenv;
+ LPEnvFreeChildenv pFreeChildenv;
+ LPEnvGetChilddir pGetChilddir;
+ LPEnvFreeChilddir pFreeChilddir;
#ifdef HAS_ENVGETENV
LPENVGetenv pENVGetenv;
LPENVGetenv_len pENVGetenv_len;
(*PL_Env->pGetenv)(PL_Env,(str))
#define PerlEnv_getenv_len(str,l) \
(*PL_Env->pGetenv_len)(PL_Env,(str), (l))
-#define PerlEnv_Clear() \
- (*PL_Env->pClearenv)(PL_Env)
-#define PerlEnv_Clear() \
+#define PerlEnv_clearenv() \
(*PL_Env->pClearenv)(PL_Env)
+#define PerlEnv_get_childenv() \
+ (*PL_Env->pGetChildenv)(PL_Env)
+#define PerlEnv_free_childenv(e) \
+ (*PL_Env->pFreeChildenv)(PL_Env, (e))
+#define PerlEnv_get_childdir() \
+ (*PL_Env->pGetChilddir)(PL_Env)
+#define PerlEnv_free_childdir(d) \
+ (*PL_Env->pFreeChilddir)(PL_Env, (d))
#ifdef HAS_ENVGETENV
# define PerlEnv_ENVgetenv(str) \
(*PL_Env->pENVGetenv)(PL_Env,(str))
(*PL_Env->pSiteLibPath)(PL_Env,(str))
#endif
-#else /* PERL_OBJECT */
+#else /* PERL_IMPLICIT_SYS */
#define PerlEnv_putenv(str) putenv((str))
#define PerlEnv_getenv(str) getenv((str))
#define PerlEnv_getenv_len(str,l) getenv_len((str), (l))
+#define PerlEnv_clear() clearenv()
+#define PerlEnv_get_childenv() get_childenv()
+#define PerlEnv_free_childenv(e) free_childenv((e))
+#define PerlEnv_get_childdir() get_childdir()
+#define PerlEnv_free_childdir(d) free_childdir((d))
#ifdef HAS_ENVGETENV
# define PerlEnv_ENVgetenv(str) ENVgetenv((str))
# define PerlEnv_ENVgetenv_len(str,l) ENVgetenv_len((str), (l))
#define PerlEnv_os_id() win32_os_id()
#endif
-#endif /* PERL_OBJECT */
+#endif /* PERL_IMPLICIT_SYS */
/*
Interface for perl low-level IO functions
*/
-#ifdef PERL_OBJECT
+#if defined(PERL_IMPLICIT_SYS)
/* IPerlLIO */
struct IPerlLIO;
#define PerlLIO_write(fd, buf, count) \
(*PL_LIO->pWrite)(PL_LIO, (fd), (buf), (count))
-#else /* PERL_OBJECT */
+#else /* PERL_IMPLICIT_SYS */
#define PerlLIO_access(file, mode) access((file), (mode))
#define PerlLIO_chmod(file, mode) chmod((file), (mode))
#define PerlLIO_utime(file, time) utime((file), (time))
#define PerlLIO_write(fd, buf, count) write((fd), (buf), (count))
-#endif /* PERL_OBJECT */
+#endif /* PERL_IMPLICIT_SYS */
/*
Interface for perl memory allocation
*/
-#ifdef PERL_OBJECT
+#if defined(PERL_IMPLICIT_SYS)
/* IPerlMem */
struct IPerlMem;
#define PerlMem_free(buf) \
(*PL_Mem->pFree)(PL_Mem, (buf))
-#else /* PERL_OBJECT */
+#else /* PERL_IMPLICIT_SYS */
#define PerlMem_malloc(size) malloc((size))
#define PerlMem_realloc(buf, size) realloc((buf), (size))
#define PerlMem_free(buf) free((buf))
-#endif /* PERL_OBJECT */
+#endif /* PERL_IMPLICIT_SYS */
/*
Interface for perl process functions
*/
-#ifdef PERL_OBJECT
+#if defined(PERL_IMPLICIT_SYS)
-#ifndef Sighandler_t
-typedef Signal_t (*Sighandler_t) (int);
-#endif
#ifndef jmp_buf
#include <setjmp.h>
#endif
(*PL_Proc->pASpawn)(PL_Proc, (m), (c), (a))
#endif
-#else /* PERL_OBJECT */
+#else /* PERL_IMPLICIT_SYS */
#define PerlProc_abort() abort()
#define PerlProc_crypt(c,s) crypt((c), (s))
#ifdef WIN32
#define PerlProc_DynaLoad(f) \
- win32_dynaload(aTHX_ (f))
+ win32_dynaload((f))
#define PerlProc_GetOSError(s,e) \
- win32_str_os_error(aTHX_ (s), (e))
+ win32_str_os_error((s), (e))
#endif
-#endif /* PERL_OBJECT */
+#endif /* PERL_IMPLICIT_SYS */
/*
Interface for perl socket functions
*/
-#ifdef PERL_OBJECT
+#if defined(PERL_IMPLICIT_SYS)
/* PerlSock */
struct IPerlSock;
(*PL_Sock->pClosesocket)(PL_Sock, s)
#endif
-#else /* PERL_OBJECT */
+#else /* PERL_IMPLICIT_SYS */
#define PerlSock_htonl(x) htonl(x)
#define PerlSock_htons(x) htons(x)
#define PerlSock_closesocket(s) closesocket(s)
#endif
-#endif /* PERL_OBJECT */
-
-/* Mention
-
- HAS_READV
- HAS_RECVMSG
- HAS_SENDMSG
- HAS_WRITEV
- HAS_STRUCT_MSGHDR
- HAS_STRUCT_CMSGHDR
-
- here so that Configure picks them up. Perl core does not
- use them but somebody might want to extend Socket:: or IO::
- someday.
-
- Jarkko Hietaniemi November 1998
-
- */
+#endif /* PERL_IMPLICIT_SYS */
#endif /* __Inc__IPerl___ */