Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/AnonR/smanonr..../lib64/perl5/CORE
File: iperlsys.h
/*
[0] Fix | Delete
* iperlsys.h - Perl's interface to the system
[1] Fix | Delete
*
[2] Fix | Delete
* This file defines the system level functionality that perl needs.
[3] Fix | Delete
*
[4] Fix | Delete
* When using C, this definition is in the form of a set of macros
[5] Fix | Delete
* that can be #defined to the system-level function (or a wrapper
[6] Fix | Delete
* provided elsewhere).
[7] Fix | Delete
*
[8] Fix | Delete
* GSAR 21-JUN-98
[9] Fix | Delete
*/
[10] Fix | Delete
[11] Fix | Delete
#ifndef __Inc__IPerl___
[12] Fix | Delete
#define __Inc__IPerl___
[13] Fix | Delete
[14] Fix | Delete
/*
[15] Fix | Delete
* PerlXXX_YYY explained - DickH and DougL @ ActiveState.com
[16] Fix | Delete
*
[17] Fix | Delete
* XXX := functional group
[18] Fix | Delete
* YYY := stdlib/OS function name
[19] Fix | Delete
*
[20] Fix | Delete
* Continuing with the theme of PerlIO, all OS functionality was
[21] Fix | Delete
* encapsulated into one of several interfaces.
[22] Fix | Delete
*
[23] Fix | Delete
* PerlIO - stdio
[24] Fix | Delete
* PerlLIO - low level I/O
[25] Fix | Delete
* PerlMem - malloc, realloc, free
[26] Fix | Delete
* PerlDir - directory related
[27] Fix | Delete
* PerlEnv - process environment handling
[28] Fix | Delete
* PerlProc - process control
[29] Fix | Delete
* PerlSock - socket functions
[30] Fix | Delete
*
[31] Fix | Delete
*
[32] Fix | Delete
* The features of this are:
[33] Fix | Delete
* 1. All OS dependant code is in the Perl Host and not the Perl Core.
[34] Fix | Delete
* (At least this is the holy grail goal of this work)
[35] Fix | Delete
* 2. The Perl Host (see perl.h for description) can provide a new and
[36] Fix | Delete
* improved interface to OS functionality if required.
[37] Fix | Delete
* 3. Developers can easily hook into the OS calls for instrumentation
[38] Fix | Delete
* or diagnostic purposes.
[39] Fix | Delete
*
[40] Fix | Delete
* What was changed to do this:
[41] Fix | Delete
* 1. All calls to OS functions were replaced with PerlXXX_YYY
[42] Fix | Delete
*
[43] Fix | Delete
*/
[44] Fix | Delete
[45] Fix | Delete
/*
[46] Fix | Delete
Interface for perl stdio functions, or whatever we are Configure-d
[47] Fix | Delete
to use.
[48] Fix | Delete
*/
[49] Fix | Delete
#include "perlio.h"
[50] Fix | Delete
[51] Fix | Delete
#ifndef Sighandler_t
[52] Fix | Delete
# if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
[53] Fix | Delete
typedef Signal_t (*Sighandler_t) (int, siginfo_t*, void*);
[54] Fix | Delete
# else
[55] Fix | Delete
typedef Signal_t (*Sighandler_t) (int);
[56] Fix | Delete
# endif
[57] Fix | Delete
#endif
[58] Fix | Delete
[59] Fix | Delete
#if defined(PERL_IMPLICIT_SYS)
[60] Fix | Delete
[61] Fix | Delete
/* IPerlStdIO */
[62] Fix | Delete
struct IPerlStdIO;
[63] Fix | Delete
struct IPerlStdIOInfo;
[64] Fix | Delete
typedef FILE* (*LPStdin)(struct IPerlStdIO*);
[65] Fix | Delete
typedef FILE* (*LPStdout)(struct IPerlStdIO*);
[66] Fix | Delete
typedef FILE* (*LPStderr)(struct IPerlStdIO*);
[67] Fix | Delete
typedef FILE* (*LPOpen)(struct IPerlStdIO*, const char*,
[68] Fix | Delete
const char*);
[69] Fix | Delete
typedef int (*LPClose)(struct IPerlStdIO*, FILE*);
[70] Fix | Delete
typedef int (*LPEof)(struct IPerlStdIO*, FILE*);
[71] Fix | Delete
typedef int (*LPError)(struct IPerlStdIO*, FILE*);
[72] Fix | Delete
typedef void (*LPClearerr)(struct IPerlStdIO*, FILE*);
[73] Fix | Delete
typedef int (*LPGetc)(struct IPerlStdIO*, FILE*);
[74] Fix | Delete
typedef STDCHAR* (*LPGetBase)(struct IPerlStdIO*, FILE*);
[75] Fix | Delete
typedef int (*LPGetBufsiz)(struct IPerlStdIO*, FILE*);
[76] Fix | Delete
typedef int (*LPGetCnt)(struct IPerlStdIO*, FILE*);
[77] Fix | Delete
typedef STDCHAR* (*LPGetPtr)(struct IPerlStdIO*, FILE*);
[78] Fix | Delete
typedef char* (*LPGets)(struct IPerlStdIO*, char*, int, FILE*);
[79] Fix | Delete
typedef int (*LPPutc)(struct IPerlStdIO*, int, FILE*);
[80] Fix | Delete
typedef int (*LPPuts)(struct IPerlStdIO*, const char *, FILE*);
[81] Fix | Delete
typedef int (*LPFlush)(struct IPerlStdIO*, FILE*);
[82] Fix | Delete
typedef int (*LPUngetc)(struct IPerlStdIO*, int,FILE*);
[83] Fix | Delete
typedef int (*LPFileno)(struct IPerlStdIO*, FILE*);
[84] Fix | Delete
typedef FILE* (*LPFdopen)(struct IPerlStdIO*, int, const char*);
[85] Fix | Delete
typedef FILE* (*LPReopen)(struct IPerlStdIO*, const char*,
[86] Fix | Delete
const char*, FILE*);
[87] Fix | Delete
typedef SSize_t (*LPRead)(struct IPerlStdIO*, void*, Size_t, Size_t, FILE *);
[88] Fix | Delete
typedef SSize_t (*LPWrite)(struct IPerlStdIO*, const void*, Size_t, Size_t, FILE *);
[89] Fix | Delete
typedef void (*LPSetBuf)(struct IPerlStdIO*, FILE*, char*);
[90] Fix | Delete
typedef int (*LPSetVBuf)(struct IPerlStdIO*, FILE*, char*, int,
[91] Fix | Delete
Size_t);
[92] Fix | Delete
typedef void (*LPSetCnt)(struct IPerlStdIO*, FILE*, int);
[93] Fix | Delete
[94] Fix | Delete
#ifndef NETWARE
[95] Fix | Delete
typedef void (*LPSetPtr)(struct IPerlStdIO*, FILE*, STDCHAR*);
[96] Fix | Delete
#elif defined(NETWARE)
[97] Fix | Delete
typedef void (*LPSetPtr)(struct IPerlStdIO*, FILE*, STDCHAR*, int);
[98] Fix | Delete
#endif
[99] Fix | Delete
[100] Fix | Delete
typedef void (*LPSetlinebuf)(struct IPerlStdIO*, FILE*);
[101] Fix | Delete
typedef int (*LPPrintf)(struct IPerlStdIO*, FILE*, const char*,
[102] Fix | Delete
...);
[103] Fix | Delete
typedef int (*LPVprintf)(struct IPerlStdIO*, FILE*, const char*,
[104] Fix | Delete
va_list);
[105] Fix | Delete
typedef Off_t (*LPTell)(struct IPerlStdIO*, FILE*);
[106] Fix | Delete
typedef int (*LPSeek)(struct IPerlStdIO*, FILE*, Off_t, int);
[107] Fix | Delete
typedef void (*LPRewind)(struct IPerlStdIO*, FILE*);
[108] Fix | Delete
typedef FILE* (*LPTmpfile)(struct IPerlStdIO*);
[109] Fix | Delete
typedef int (*LPGetpos)(struct IPerlStdIO*, FILE*, Fpos_t*);
[110] Fix | Delete
typedef int (*LPSetpos)(struct IPerlStdIO*, FILE*,
[111] Fix | Delete
const Fpos_t*);
[112] Fix | Delete
typedef void (*LPInit)(struct IPerlStdIO*);
[113] Fix | Delete
typedef void (*LPInitOSExtras)(struct IPerlStdIO*);
[114] Fix | Delete
typedef FILE* (*LPFdupopen)(struct IPerlStdIO*, FILE*);
[115] Fix | Delete
[116] Fix | Delete
struct IPerlStdIO
[117] Fix | Delete
{
[118] Fix | Delete
LPStdin pStdin;
[119] Fix | Delete
LPStdout pStdout;
[120] Fix | Delete
LPStderr pStderr;
[121] Fix | Delete
LPOpen pOpen;
[122] Fix | Delete
LPClose pClose;
[123] Fix | Delete
LPEof pEof;
[124] Fix | Delete
LPError pError;
[125] Fix | Delete
LPClearerr pClearerr;
[126] Fix | Delete
LPGetc pGetc;
[127] Fix | Delete
LPGetBase pGetBase;
[128] Fix | Delete
LPGetBufsiz pGetBufsiz;
[129] Fix | Delete
LPGetCnt pGetCnt;
[130] Fix | Delete
LPGetPtr pGetPtr;
[131] Fix | Delete
LPGets pGets;
[132] Fix | Delete
LPPutc pPutc;
[133] Fix | Delete
LPPuts pPuts;
[134] Fix | Delete
LPFlush pFlush;
[135] Fix | Delete
LPUngetc pUngetc;
[136] Fix | Delete
LPFileno pFileno;
[137] Fix | Delete
LPFdopen pFdopen;
[138] Fix | Delete
LPReopen pReopen;
[139] Fix | Delete
LPRead pRead;
[140] Fix | Delete
LPWrite pWrite;
[141] Fix | Delete
LPSetBuf pSetBuf;
[142] Fix | Delete
LPSetVBuf pSetVBuf;
[143] Fix | Delete
LPSetCnt pSetCnt;
[144] Fix | Delete
LPSetPtr pSetPtr;
[145] Fix | Delete
LPSetlinebuf pSetlinebuf;
[146] Fix | Delete
LPPrintf pPrintf;
[147] Fix | Delete
LPVprintf pVprintf;
[148] Fix | Delete
LPTell pTell;
[149] Fix | Delete
LPSeek pSeek;
[150] Fix | Delete
LPRewind pRewind;
[151] Fix | Delete
LPTmpfile pTmpfile;
[152] Fix | Delete
LPGetpos pGetpos;
[153] Fix | Delete
LPSetpos pSetpos;
[154] Fix | Delete
LPInit pInit;
[155] Fix | Delete
LPInitOSExtras pInitOSExtras;
[156] Fix | Delete
LPFdupopen pFdupopen;
[157] Fix | Delete
};
[158] Fix | Delete
[159] Fix | Delete
struct IPerlStdIOInfo
[160] Fix | Delete
{
[161] Fix | Delete
unsigned long nCount; /* number of entries expected */
[162] Fix | Delete
struct IPerlStdIO perlStdIOList;
[163] Fix | Delete
};
[164] Fix | Delete
[165] Fix | Delete
/* These do not belong here ... NI-S, 14 Nov 2000 */
[166] Fix | Delete
[167] Fix | Delete
#ifdef USE_STDIO_PTR
[168] Fix | Delete
# define PerlSIO_has_cntptr(f) 1
[169] Fix | Delete
# ifdef STDIO_PTR_LVALUE
[170] Fix | Delete
# ifdef STDIO_CNT_LVALUE
[171] Fix | Delete
# define PerlSIO_canset_cnt(f) 1
[172] Fix | Delete
# ifdef STDIO_PTR_LVAL_NOCHANGE_CNT
[173] Fix | Delete
# define PerlSIO_fast_gets(f) 1
[174] Fix | Delete
# endif
[175] Fix | Delete
# else /* STDIO_CNT_LVALUE */
[176] Fix | Delete
# define PerlSIO_canset_cnt(f) 0
[177] Fix | Delete
# endif
[178] Fix | Delete
# else /* STDIO_PTR_LVALUE */
[179] Fix | Delete
# ifdef STDIO_PTR_LVAL_SETS_CNT
[180] Fix | Delete
# define PerlSIO_fast_gets(f) 1
[181] Fix | Delete
# endif
[182] Fix | Delete
# endif
[183] Fix | Delete
#else /* USE_STDIO_PTR */
[184] Fix | Delete
# define PerlSIO_has_cntptr(f) 0
[185] Fix | Delete
# define PerlSIO_canset_cnt(f) 0
[186] Fix | Delete
#endif /* USE_STDIO_PTR */
[187] Fix | Delete
[188] Fix | Delete
#ifndef PerlSIO_fast_gets
[189] Fix | Delete
#define PerlSIO_fast_gets(f) 0
[190] Fix | Delete
#endif
[191] Fix | Delete
[192] Fix | Delete
#ifdef FILE_base
[193] Fix | Delete
#define PerlSIO_has_base(f) 1
[194] Fix | Delete
#else
[195] Fix | Delete
#define PerlSIO_has_base(f) 0
[196] Fix | Delete
#endif
[197] Fix | Delete
[198] Fix | Delete
/* Now take FILE * via function table */
[199] Fix | Delete
[200] Fix | Delete
#define PerlSIO_stdin \
[201] Fix | Delete
(*PL_StdIO->pStdin)(PL_StdIO)
[202] Fix | Delete
#define PerlSIO_stdout \
[203] Fix | Delete
(*PL_StdIO->pStdout)(PL_StdIO)
[204] Fix | Delete
#define PerlSIO_stderr \
[205] Fix | Delete
(*PL_StdIO->pStderr)(PL_StdIO)
[206] Fix | Delete
#define PerlSIO_fopen(x,y) \
[207] Fix | Delete
(*PL_StdIO->pOpen)(PL_StdIO, (x),(y))
[208] Fix | Delete
#define PerlSIO_fclose(f) \
[209] Fix | Delete
(*PL_StdIO->pClose)(PL_StdIO, (f))
[210] Fix | Delete
#define PerlSIO_feof(f) \
[211] Fix | Delete
(*PL_StdIO->pEof)(PL_StdIO, (f))
[212] Fix | Delete
#define PerlSIO_ferror(f) \
[213] Fix | Delete
(*PL_StdIO->pError)(PL_StdIO, (f))
[214] Fix | Delete
#define PerlSIO_clearerr(f) \
[215] Fix | Delete
(*PL_StdIO->pClearerr)(PL_StdIO, (f))
[216] Fix | Delete
#define PerlSIO_fgetc(f) \
[217] Fix | Delete
(*PL_StdIO->pGetc)(PL_StdIO, (f))
[218] Fix | Delete
#define PerlSIO_get_base(f) \
[219] Fix | Delete
(*PL_StdIO->pGetBase)(PL_StdIO, (f))
[220] Fix | Delete
#define PerlSIO_get_bufsiz(f) \
[221] Fix | Delete
(*PL_StdIO->pGetBufsiz)(PL_StdIO, (f))
[222] Fix | Delete
#define PerlSIO_get_cnt(f) \
[223] Fix | Delete
(*PL_StdIO->pGetCnt)(PL_StdIO, (f))
[224] Fix | Delete
#define PerlSIO_get_ptr(f) \
[225] Fix | Delete
(*PL_StdIO->pGetPtr)(PL_StdIO, (f))
[226] Fix | Delete
#define PerlSIO_fputc(c,f) \
[227] Fix | Delete
(*PL_StdIO->pPutc)(PL_StdIO, (c),(f))
[228] Fix | Delete
#define PerlSIO_fputs(s,f) \
[229] Fix | Delete
(*PL_StdIO->pPuts)(PL_StdIO, (s),(f))
[230] Fix | Delete
#define PerlSIO_fflush(f) \
[231] Fix | Delete
(*PL_StdIO->pFlush)(PL_StdIO, (f))
[232] Fix | Delete
#define PerlSIO_fgets(s, n, f) \
[233] Fix | Delete
(*PL_StdIO->pGets)(PL_StdIO, s, n, (f))
[234] Fix | Delete
#define PerlSIO_ungetc(c,f) \
[235] Fix | Delete
(*PL_StdIO->pUngetc)(PL_StdIO, (c),(f))
[236] Fix | Delete
#define PerlSIO_fileno(f) \
[237] Fix | Delete
(*PL_StdIO->pFileno)(PL_StdIO, (f))
[238] Fix | Delete
#define PerlSIO_fdopen(f, s) \
[239] Fix | Delete
(*PL_StdIO->pFdopen)(PL_StdIO, (f),(s))
[240] Fix | Delete
#define PerlSIO_freopen(p, m, f) \
[241] Fix | Delete
(*PL_StdIO->pReopen)(PL_StdIO, (p), (m), (f))
[242] Fix | Delete
#define PerlSIO_fread(buf,sz,count,f) \
[243] Fix | Delete
(*PL_StdIO->pRead)(PL_StdIO, (buf), (sz), (count), (f))
[244] Fix | Delete
#define PerlSIO_fwrite(buf,sz,count,f) \
[245] Fix | Delete
(*PL_StdIO->pWrite)(PL_StdIO, (buf), (sz), (count), (f))
[246] Fix | Delete
#define PerlSIO_setbuf(f,b) \
[247] Fix | Delete
(*PL_StdIO->pSetBuf)(PL_StdIO, (f), (b))
[248] Fix | Delete
#define PerlSIO_setvbuf(f,b,t,s) \
[249] Fix | Delete
(*PL_StdIO->pSetVBuf)(PL_StdIO, (f),(b),(t),(s))
[250] Fix | Delete
#define PerlSIO_set_cnt(f,c) \
[251] Fix | Delete
(*PL_StdIO->pSetCnt)(PL_StdIO, (f), (c))
[252] Fix | Delete
#define PerlSIO_set_ptr(f,p) \
[253] Fix | Delete
(*PL_StdIO->pSetPtr)(PL_StdIO, (f), (p))
[254] Fix | Delete
#define PerlSIO_setlinebuf(f) \
[255] Fix | Delete
(*PL_StdIO->pSetlinebuf)(PL_StdIO, (f))
[256] Fix | Delete
#define PerlSIO_printf Perl_fprintf_nocontext
[257] Fix | Delete
#define PerlSIO_stdoutf Perl_printf_nocontext
[258] Fix | Delete
#define PerlSIO_vprintf(f,fmt,a) \
[259] Fix | Delete
(*PL_StdIO->pVprintf)(PL_StdIO, (f),(fmt),a)
[260] Fix | Delete
#define PerlSIO_ftell(f) \
[261] Fix | Delete
(*PL_StdIO->pTell)(PL_StdIO, (f))
[262] Fix | Delete
#define PerlSIO_fseek(f,o,w) \
[263] Fix | Delete
(*PL_StdIO->pSeek)(PL_StdIO, (f),(o),(w))
[264] Fix | Delete
#define PerlSIO_fgetpos(f,p) \
[265] Fix | Delete
(*PL_StdIO->pGetpos)(PL_StdIO, (f),(p))
[266] Fix | Delete
#define PerlSIO_fsetpos(f,p) \
[267] Fix | Delete
(*PL_StdIO->pSetpos)(PL_StdIO, (f),(p))
[268] Fix | Delete
#define PerlSIO_rewind(f) \
[269] Fix | Delete
(*PL_StdIO->pRewind)(PL_StdIO, (f))
[270] Fix | Delete
#define PerlSIO_tmpfile() \
[271] Fix | Delete
(*PL_StdIO->pTmpfile)(PL_StdIO)
[272] Fix | Delete
#define PerlSIO_init() \
[273] Fix | Delete
(*PL_StdIO->pInit)(PL_StdIO)
[274] Fix | Delete
#undef init_os_extras
[275] Fix | Delete
#define init_os_extras() \
[276] Fix | Delete
(*PL_StdIO->pInitOSExtras)(PL_StdIO)
[277] Fix | Delete
#define PerlSIO_fdupopen(f) \
[278] Fix | Delete
(*PL_StdIO->pFdupopen)(PL_StdIO, (f))
[279] Fix | Delete
[280] Fix | Delete
#else /* PERL_IMPLICIT_SYS */
[281] Fix | Delete
[282] Fix | Delete
#define PerlSIO_stdin stdin
[283] Fix | Delete
#define PerlSIO_stdout stdout
[284] Fix | Delete
#define PerlSIO_stderr stderr
[285] Fix | Delete
#define PerlSIO_fopen(x,y) fopen(x,y)
[286] Fix | Delete
#ifdef __VOS__
[287] Fix | Delete
/* Work around VOS bug posix-979, wrongly setting errno when at end of file. */
[288] Fix | Delete
#define PerlSIO_fclose(f) (((errno==1025)?errno=0:0),fclose(f))
[289] Fix | Delete
#define PerlSIO_feof(f) (((errno==1025)?errno=0:0),feof(f))
[290] Fix | Delete
#define PerlSIO_ferror(f) (((errno==1025)?errno=0:0),ferror(f))
[291] Fix | Delete
#else
[292] Fix | Delete
#define PerlSIO_fclose(f) fclose(f)
[293] Fix | Delete
#define PerlSIO_feof(f) feof(f)
[294] Fix | Delete
#define PerlSIO_ferror(f) ferror(f)
[295] Fix | Delete
#endif
[296] Fix | Delete
#define PerlSIO_clearerr(f) clearerr(f)
[297] Fix | Delete
#define PerlSIO_fgetc(f) fgetc(f)
[298] Fix | Delete
#ifdef FILE_base
[299] Fix | Delete
#define PerlSIO_get_base(f) FILE_base(f)
[300] Fix | Delete
#define PerlSIO_get_bufsiz(f) FILE_bufsiz(f)
[301] Fix | Delete
#else
[302] Fix | Delete
#define PerlSIO_get_base(f) NULL
[303] Fix | Delete
#define PerlSIO_get_bufsiz(f) 0
[304] Fix | Delete
#endif
[305] Fix | Delete
#ifdef USE_STDIO_PTR
[306] Fix | Delete
#define PerlSIO_get_cnt(f) FILE_cnt(f)
[307] Fix | Delete
#define PerlSIO_get_ptr(f) FILE_ptr(f)
[308] Fix | Delete
#else
[309] Fix | Delete
#define PerlSIO_get_cnt(f) 0
[310] Fix | Delete
#define PerlSIO_get_ptr(f) NULL
[311] Fix | Delete
#endif
[312] Fix | Delete
#define PerlSIO_fputc(c,f) fputc(c,f)
[313] Fix | Delete
#define PerlSIO_fputs(s,f) fputs(s,f)
[314] Fix | Delete
#define PerlSIO_fflush(f) Fflush(f)
[315] Fix | Delete
#define PerlSIO_fgets(s, n, f) fgets(s,n,f)
[316] Fix | Delete
#if defined(__VMS)
[317] Fix | Delete
/* Unusual definition of ungetc() here to accommodate fast_sv_gets()'
[318] Fix | Delete
* belief that it can mix getc/ungetc with reads from stdio buffer */
[319] Fix | Delete
START_EXTERN_C
[320] Fix | Delete
int decc$ungetc(int __c, FILE *__stream);
[321] Fix | Delete
END_EXTERN_C
[322] Fix | Delete
# define PerlSIO_ungetc(c,f) ((c) == EOF ? EOF : \
[323] Fix | Delete
((*(f) && !((*(f))->_flag & _IONBF) && \
[324] Fix | Delete
((*(f))->_ptr > (*(f))->_base)) ? \
[325] Fix | Delete
((*(f))->_cnt++, *(--(*(f))->_ptr) = (c)) : decc$ungetc(c,f)))
[326] Fix | Delete
#else
[327] Fix | Delete
# define PerlSIO_ungetc(c,f) ungetc(c,f)
[328] Fix | Delete
#endif
[329] Fix | Delete
#define PerlSIO_fileno(f) fileno(f)
[330] Fix | Delete
#define PerlSIO_fdopen(f, s) fdopen(f,s)
[331] Fix | Delete
#define PerlSIO_freopen(p, m, f) freopen(p,m,f)
[332] Fix | Delete
#define PerlSIO_fread(buf,sz,count,f) fread(buf,sz,count,f)
[333] Fix | Delete
#define PerlSIO_fwrite(buf,sz,count,f) fwrite(buf,sz,count,f)
[334] Fix | Delete
#define PerlSIO_setbuf(f,b) setbuf(f,b)
[335] Fix | Delete
#define PerlSIO_setvbuf(f,b,t,s) setvbuf(f,b,t,s)
[336] Fix | Delete
#if defined(USE_STDIO_PTR) && defined(STDIO_CNT_LVALUE)
[337] Fix | Delete
#define PerlSIO_set_cnt(f,c) FILE_cnt(f) = (c)
[338] Fix | Delete
#else
[339] Fix | Delete
#define PerlSIO_set_cnt(f,c) PerlIOProc_abort()
[340] Fix | Delete
#endif
[341] Fix | Delete
#if defined(USE_STDIO_PTR) && defined(STDIO_PTR_LVALUE)
[342] Fix | Delete
#define PerlSIO_set_ptr(f,p) (FILE_ptr(f) = (p))
[343] Fix | Delete
#else
[344] Fix | Delete
#define PerlSIO_set_ptr(f,p) PerlIOProc_abort()
[345] Fix | Delete
#endif
[346] Fix | Delete
#define PerlSIO_setlinebuf(f) setlinebuf(f)
[347] Fix | Delete
#define PerlSIO_printf fprintf
[348] Fix | Delete
#define PerlSIO_stdoutf printf
[349] Fix | Delete
#define PerlSIO_vprintf(f,fmt,a) vfprintf(f,fmt,a)
[350] Fix | Delete
#define PerlSIO_ftell(f) ftell(f)
[351] Fix | Delete
#define PerlSIO_fseek(f,o,w) fseek(f,o,w)
[352] Fix | Delete
#define PerlSIO_fgetpos(f,p) fgetpos(f,p)
[353] Fix | Delete
#define PerlSIO_fsetpos(f,p) fsetpos(f,p)
[354] Fix | Delete
#define PerlSIO_rewind(f) rewind(f)
[355] Fix | Delete
#define PerlSIO_tmpfile() tmpfile()
[356] Fix | Delete
#define PerlSIO_fdupopen(f) (f)
[357] Fix | Delete
[358] Fix | Delete
#endif /* PERL_IMPLICIT_SYS */
[359] Fix | Delete
[360] Fix | Delete
/*
[361] Fix | Delete
* Interface for directory functions
[362] Fix | Delete
*/
[363] Fix | Delete
[364] Fix | Delete
#if defined(PERL_IMPLICIT_SYS)
[365] Fix | Delete
[366] Fix | Delete
/* IPerlDir */
[367] Fix | Delete
struct IPerlDir;
[368] Fix | Delete
struct IPerlDirInfo;
[369] Fix | Delete
typedef int (*LPMakedir)(struct IPerlDir*, const char*, int);
[370] Fix | Delete
typedef int (*LPChdir)(struct IPerlDir*, const char*);
[371] Fix | Delete
typedef int (*LPRmdir)(struct IPerlDir*, const char*);
[372] Fix | Delete
typedef int (*LPDirClose)(struct IPerlDir*, DIR*);
[373] Fix | Delete
typedef DIR* (*LPDirOpen)(struct IPerlDir*, const char*);
[374] Fix | Delete
typedef struct direct* (*LPDirRead)(struct IPerlDir*, DIR*);
[375] Fix | Delete
typedef void (*LPDirRewind)(struct IPerlDir*, DIR*);
[376] Fix | Delete
typedef void (*LPDirSeek)(struct IPerlDir*, DIR*, long);
[377] Fix | Delete
typedef long (*LPDirTell)(struct IPerlDir*, DIR*);
[378] Fix | Delete
#ifdef WIN32
[379] Fix | Delete
typedef char* (*LPDirMapPathA)(struct IPerlDir*, const char*);
[380] Fix | Delete
typedef WCHAR* (*LPDirMapPathW)(struct IPerlDir*, const WCHAR*);
[381] Fix | Delete
#endif
[382] Fix | Delete
[383] Fix | Delete
struct IPerlDir
[384] Fix | Delete
{
[385] Fix | Delete
LPMakedir pMakedir;
[386] Fix | Delete
LPChdir pChdir;
[387] Fix | Delete
LPRmdir pRmdir;
[388] Fix | Delete
LPDirClose pClose;
[389] Fix | Delete
LPDirOpen pOpen;
[390] Fix | Delete
LPDirRead pRead;
[391] Fix | Delete
LPDirRewind pRewind;
[392] Fix | Delete
LPDirSeek pSeek;
[393] Fix | Delete
LPDirTell pTell;
[394] Fix | Delete
#ifdef WIN32
[395] Fix | Delete
LPDirMapPathA pMapPathA;
[396] Fix | Delete
LPDirMapPathW pMapPathW;
[397] Fix | Delete
#endif
[398] Fix | Delete
};
[399] Fix | Delete
[400] Fix | Delete
struct IPerlDirInfo
[401] Fix | Delete
{
[402] Fix | Delete
unsigned long nCount; /* number of entries expected */
[403] Fix | Delete
struct IPerlDir perlDirList;
[404] Fix | Delete
};
[405] Fix | Delete
[406] Fix | Delete
#define PerlDir_mkdir(name, mode) \
[407] Fix | Delete
(*PL_Dir->pMakedir)(PL_Dir, (name), (mode))
[408] Fix | Delete
#define PerlDir_chdir(name) \
[409] Fix | Delete
(*PL_Dir->pChdir)(PL_Dir, (name))
[410] Fix | Delete
#define PerlDir_rmdir(name) \
[411] Fix | Delete
(*PL_Dir->pRmdir)(PL_Dir, (name))
[412] Fix | Delete
#define PerlDir_close(dir) \
[413] Fix | Delete
(*PL_Dir->pClose)(PL_Dir, (dir))
[414] Fix | Delete
#define PerlDir_open(name) \
[415] Fix | Delete
(*PL_Dir->pOpen)(PL_Dir, (name))
[416] Fix | Delete
#define PerlDir_read(dir) \
[417] Fix | Delete
(*PL_Dir->pRead)(PL_Dir, (dir))
[418] Fix | Delete
#define PerlDir_rewind(dir) \
[419] Fix | Delete
(*PL_Dir->pRewind)(PL_Dir, (dir))
[420] Fix | Delete
#define PerlDir_seek(dir, loc) \
[421] Fix | Delete
(*PL_Dir->pSeek)(PL_Dir, (dir), (loc))
[422] Fix | Delete
#define PerlDir_tell(dir) \
[423] Fix | Delete
(*PL_Dir->pTell)(PL_Dir, (dir))
[424] Fix | Delete
#ifdef WIN32
[425] Fix | Delete
#define PerlDir_mapA(dir) \
[426] Fix | Delete
(*PL_Dir->pMapPathA)(PL_Dir, (dir))
[427] Fix | Delete
#define PerlDir_mapW(dir) \
[428] Fix | Delete
(*PL_Dir->pMapPathW)(PL_Dir, (dir))
[429] Fix | Delete
#endif
[430] Fix | Delete
[431] Fix | Delete
#else /* PERL_IMPLICIT_SYS */
[432] Fix | Delete
[433] Fix | Delete
#define PerlDir_mkdir(name, mode) Mkdir((name), (mode))
[434] Fix | Delete
#ifdef VMS
[435] Fix | Delete
# define PerlDir_chdir(n) Chdir((n))
[436] Fix | Delete
#else
[437] Fix | Delete
# define PerlDir_chdir(name) chdir((name))
[438] Fix | Delete
#endif
[439] Fix | Delete
#define PerlDir_rmdir(name) rmdir((name))
[440] Fix | Delete
#define PerlDir_close(dir) closedir((dir))
[441] Fix | Delete
#define PerlDir_open(name) opendir((name))
[442] Fix | Delete
#define PerlDir_read(dir) readdir((dir))
[443] Fix | Delete
#define PerlDir_rewind(dir) rewinddir((dir))
[444] Fix | Delete
#define PerlDir_seek(dir, loc) seekdir((dir), (loc))
[445] Fix | Delete
#define PerlDir_tell(dir) telldir((dir))
[446] Fix | Delete
#ifdef WIN32
[447] Fix | Delete
#define PerlDir_mapA(dir) dir
[448] Fix | Delete
#define PerlDir_mapW(dir) dir
[449] Fix | Delete
#endif
[450] Fix | Delete
[451] Fix | Delete
#endif /* PERL_IMPLICIT_SYS */
[452] Fix | Delete
[453] Fix | Delete
/*
[454] Fix | Delete
Interface for perl environment functions
[455] Fix | Delete
*/
[456] Fix | Delete
[457] Fix | Delete
#if defined(PERL_IMPLICIT_SYS)
[458] Fix | Delete
[459] Fix | Delete
/* IPerlEnv */
[460] Fix | Delete
struct IPerlEnv;
[461] Fix | Delete
struct IPerlEnvInfo;
[462] Fix | Delete
typedef char* (*LPEnvGetenv)(struct IPerlEnv*, const char*);
[463] Fix | Delete
typedef int (*LPEnvPutenv)(struct IPerlEnv*, const char*);
[464] Fix | Delete
typedef char* (*LPEnvGetenv_len)(struct IPerlEnv*,
[465] Fix | Delete
const char *varname, unsigned long *len);
[466] Fix | Delete
typedef int (*LPEnvUname)(struct IPerlEnv*, struct utsname *name);
[467] Fix | Delete
typedef void (*LPEnvClearenv)(struct IPerlEnv*);
[468] Fix | Delete
typedef void* (*LPEnvGetChildenv)(struct IPerlEnv*);
[469] Fix | Delete
typedef void (*LPEnvFreeChildenv)(struct IPerlEnv*, void* env);
[470] Fix | Delete
typedef char* (*LPEnvGetChilddir)(struct IPerlEnv*);
[471] Fix | Delete
typedef void (*LPEnvFreeChilddir)(struct IPerlEnv*, char* dir);
[472] Fix | Delete
#ifdef HAS_ENVGETENV
[473] Fix | Delete
typedef char* (*LPENVGetenv)(struct IPerlEnv*, const char *varname);
[474] Fix | Delete
typedef char* (*LPENVGetenv_len)(struct IPerlEnv*,
[475] Fix | Delete
const char *varname, unsigned long *len);
[476] Fix | Delete
#endif
[477] Fix | Delete
#ifdef WIN32
[478] Fix | Delete
typedef unsigned long (*LPEnvOsID)(struct IPerlEnv*);
[479] Fix | Delete
typedef char* (*LPEnvLibPath)(struct IPerlEnv*, WIN32_NO_REGISTRY_M_(const char*)
[480] Fix | Delete
STRLEN *const len);
[481] Fix | Delete
typedef char* (*LPEnvSiteLibPath)(struct IPerlEnv*, const char*,
[482] Fix | Delete
STRLEN *const len);
[483] Fix | Delete
typedef char* (*LPEnvVendorLibPath)(struct IPerlEnv*, const char*,
[484] Fix | Delete
STRLEN *const len);
[485] Fix | Delete
typedef void (*LPEnvGetChildIO)(struct IPerlEnv*, child_IO_table*);
[486] Fix | Delete
#endif
[487] Fix | Delete
[488] Fix | Delete
struct IPerlEnv
[489] Fix | Delete
{
[490] Fix | Delete
LPEnvGetenv pGetenv;
[491] Fix | Delete
LPEnvPutenv pPutenv;
[492] Fix | Delete
LPEnvGetenv_len pGetenv_len;
[493] Fix | Delete
LPEnvUname pEnvUname;
[494] Fix | Delete
LPEnvClearenv pClearenv;
[495] Fix | Delete
LPEnvGetChildenv pGetChildenv;
[496] Fix | Delete
LPEnvFreeChildenv pFreeChildenv;
[497] Fix | Delete
LPEnvGetChilddir pGetChilddir;
[498] Fix | Delete
LPEnvFreeChilddir pFreeChilddir;
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function