⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 perl.h

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 H
📖 第 1 页 / 共 5 页
字号:
/*    perl.h * *    Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, *    2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, by Larry Wall and others * *    You may distribute under the terms of either the GNU General Public *    License or the Artistic License, as specified in the README file. * */#ifndef H_PERL#define H_PERL 1#ifdef PERL_FOR_X2P/* * This file is being used for x2p stuff. * Above symbol is defined via -D in 'x2p/Makefile.SH' * Decouple x2p stuff from some of perls more extreme eccentricities. */#undef MULTIPLICITY#undef USE_STDIO#define USE_STDIO#endif /* PERL_FOR_X2P */#if defined(DGUX)#include <sys/fcntl.h>#endif#ifdef VOIDUSED#   undef VOIDUSED#endif #define VOIDUSED 1#ifdef PERL_MICRO#   include "uconfig.h"#else#   ifndef USE_CROSS_COMPILE#       include "config.h"#   else#       include "xconfig.h"#   endif#endif/* See L<perlguts/"The Perl API"> for detailed notes on * PERL_IMPLICIT_CONTEXT and PERL_IMPLICIT_SYS *//* Note that from here --> to <-- the same logic is * repeated in makedef.pl, so be certain to update * both places when editing. */#ifdef PERL_IMPLICIT_SYS/* PERL_IMPLICIT_SYS implies PerlMemShared != PerlMem   so use slab allocator to avoid lots of MUTEX overhead */#  ifndef PL_OP_SLAB_ALLOC#    define PL_OP_SLAB_ALLOC#  endif#endif#ifdef USE_ITHREADS#  if !defined(MULTIPLICITY)#    define MULTIPLICITY#  endif#endif#ifdef PERL_GLOBAL_STRUCT_PRIVATE#  ifndef PERL_GLOBAL_STRUCT#    define PERL_GLOBAL_STRUCT#  endif#endif#ifdef PERL_GLOBAL_STRUCT#  ifndef MULTIPLICITY#    define MULTIPLICITY#  endif#endif#ifdef MULTIPLICITY#  ifndef PERL_IMPLICIT_CONTEXT#    define PERL_IMPLICIT_CONTEXT#  endif#endif/* undef WIN32 when building on Cygwin (for libwin32) - gph */#ifdef __CYGWIN__#   undef WIN32#   undef _WIN32#endif#if defined(__SYMBIAN32__) || (defined(__VC32__) && defined(WINS))#   ifndef SYMBIAN#       define SYMBIAN#   endif#endif#ifdef __SYMBIAN32__#  include "symbian/symbian_proto.h"#endif/* Any stack-challenged places.  The limit varies (and often * is configurable), but using more than a kilobyte of stack * is usually dubious in these systems. */#if defined(EPOC) || defined(__SYMBIAN32__)/* EPOC/Symbian: need to work around the SDK features. * * On WINS: MS VC5 generates calls to _chkstk,         * * if a "large" stack frame is allocated.              * * gcc on MARM does not generate calls like these.     */#   define USE_HEAP_INSTEAD_OF_STACK#endif#/* Use the reentrant APIs like localtime_r and getpwent_r *//* Win32 has naturally threadsafe libraries, no need to use any _r variants. */#if defined(USE_ITHREADS) && !defined(USE_REENTRANT_API) && !defined(NETWARE) && !defined(WIN32) && !defined(PERL_DARWIN)#   define USE_REENTRANT_API#endif/* <--- here ends the logic shared by perl.h and makedef.pl *//* * PERL_DARWIN for MacOSX (__APPLE__ exists but is not officially sanctioned) * (The -DPERL_DARWIN comes from the hints/darwin.sh.) * __bsdi__ for BSD/OS */#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(PERL_DARWIN) || defined(__bsdi__) || defined(BSD41) || defined(BSD42) || defined(BSD43) || defined(BSD44)#   ifndef BSDish#       define BSDish#   endif#endif#ifdef PERL_GLOBAL_STRUCT#  ifndef PERL_GET_VARS#    ifdef PERL_GLOBAL_STRUCT_PRIVATE       extern struct perl_vars* Perl_GetVarsPrivate();#      define PERL_GET_VARS() Perl_GetVarsPrivate() /* see miniperlmain.c */#      ifndef PERLIO_FUNCS_CONST#        define PERLIO_FUNCS_CONST /* Can't have these lying around. */#      endif#    else#      define PERL_GET_VARS() PL_VarsPtr#    endif#  endif#endif#define pVAR    register struct perl_vars* my_vars PERL_UNUSED_DECL#ifdef PERL_GLOBAL_STRUCT#  define dVAR		pVAR    = (struct perl_vars*)PERL_GET_VARS()#else#  define dVAR		dNOOP#endif#ifdef PERL_IMPLICIT_CONTEXT#  ifndef MULTIPLICITY#    define MULTIPLICITY#  endif#  define tTHX	PerlInterpreter*#  define pTHX  register tTHX my_perl PERL_UNUSED_DECL#  define aTHX	my_perl#  ifdef PERL_GLOBAL_STRUCT#    define dTHXa(a)	dVAR; pTHX = (tTHX)a#  else#    define dTHXa(a)	pTHX = (tTHX)a#  endif#  ifdef PERL_GLOBAL_STRUCT#    define dTHX		dVAR; pTHX = PERL_GET_THX#  else#    define dTHX		pTHX = PERL_GET_THX#  endif#  define pTHX_		pTHX,#  define aTHX_		aTHX,#  define pTHX_1	2#  define pTHX_2	3#  define pTHX_3	4#  define pTHX_4	5#  define pTHX_5	6#  define pTHX_6	7#  define pTHX_7	8#  define pTHX_8	9#  define pTHX_9	10#  if defined(DEBUGGING) && !defined(PERL_TRACK_MEMPOOL)#    define PERL_TRACK_MEMPOOL#  endif#else#  undef PERL_TRACK_MEMPOOL#endif#define STATIC static#define CPERLscope(x) x#define CPERLarg void#define CPERLarg_#define _CPERLarg#define PERL_OBJECT_THIS#define _PERL_OBJECT_THIS#define PERL_OBJECT_THIS_#define CALL_FPTR(fptr) (*fptr)#define CALLRUNOPS  CALL_FPTR(PL_runops)#define CALLREGCOMP(sv, flags) Perl_pregcomp(aTHX_ (sv),(flags))#define CALLREGCOMP_ENG(prog, sv, flags) \    CALL_FPTR(((prog)->comp))(aTHX_ sv, flags)#define CALLREGEXEC(prog,stringarg,strend,strbeg,minend,screamer,data,flags) \    CALL_FPTR((prog)->engine->exec)(aTHX_ (prog),(stringarg),(strend), \        (strbeg),(minend),(screamer),(data),(flags))#define CALLREG_INTUIT_START(prog,sv,strpos,strend,flags,data) \    CALL_FPTR((prog)->engine->intuit)(aTHX_ (prog), (sv), (strpos), \        (strend),(flags),(data))#define CALLREG_INTUIT_STRING(prog) \    CALL_FPTR((prog)->engine->checkstr)(aTHX_ (prog))#define CALLREG_AS_STR(mg,lp,flags,haseval) \        Perl_reg_stringify(aTHX_ (mg), (lp), (flags), (haseval))#define CALLREG_STRINGIFY(mg,lp,flags) CALLREG_AS_STR(mg,lp,flags,0)#define CALLREGFREE(prog) \    Perl_pregfree(aTHX_ (prog))#define CALLREGFREE_PVT(prog) \    if(prog) CALL_FPTR((prog)->engine->free)(aTHX_ (prog))#define CALLREG_NUMBUF_FETCH(rx,paren,usesv)                                \    CALL_FPTR((rx)->engine->numbered_buff_FETCH)(aTHX_ (rx),(paren),(usesv))#define CALLREG_NUMBUF_STORE(rx,paren,value) \    CALL_FPTR((rx)->engine->numbered_buff_STORE)(aTHX_ (rx),(paren),(value))#define CALLREG_NUMBUF_LENGTH(rx,sv,paren)                              \    CALL_FPTR((rx)->engine->numbered_buff_LENGTH)(aTHX_ (rx),(sv),(paren))#define CALLREG_NAMED_BUFF_FETCH(rx, key, flags) \    CALL_FPTR((rx)->engine->named_buff)(aTHX_ (rx), (key), NULL, ((flags) | RXapif_FETCH))#define CALLREG_NAMED_BUFF_STORE(rx, key, value, flags) \    CALL_FPTR((rx)->engine->named_buff)(aTHX_ (rx), (key), (value), ((flags) | RXapif_STORE))#define CALLREG_NAMED_BUFF_DELETE(rx, key, flags) \    CALL_FPTR((rx)->engine->named_buff)(aTHX_ (rx),(key), NULL, ((flags) | RXapif_DELETE))#define CALLREG_NAMED_BUFF_CLEAR(rx, flags) \    CALL_FPTR((rx)->engine->named_buff)(aTHX_ (rx), NULL, NULL, ((flags) | RXapif_CLEAR))#define CALLREG_NAMED_BUFF_EXISTS(rx, key, flags) \    CALL_FPTR((rx)->engine->named_buff)(aTHX_ (rx), (key), NULL, ((flags) | RXapif_EXISTS))#define CALLREG_NAMED_BUFF_FIRSTKEY(rx, flags) \    CALL_FPTR((rx)->engine->named_buff_iter)(aTHX_ (rx), NULL, ((flags) | RXapif_FIRSTKEY))#define CALLREG_NAMED_BUFF_NEXTKEY(rx, lastkey, flags) \    CALL_FPTR((rx)->engine->named_buff_iter)(aTHX_ (rx), (lastkey), ((flags) | RXapif_NEXTKEY))#define CALLREG_NAMED_BUFF_SCALAR(rx, flags) \    CALL_FPTR((rx)->engine->named_buff)(aTHX_ (rx), NULL, NULL, ((flags) | RXapif_SCALAR))#define CALLREG_NAMED_BUFF_COUNT(rx) \    CALL_FPTR((rx)->engine->named_buff)(aTHX_ (rx), NULL, NULL, RXapif_REGNAMES_COUNT)#define CALLREG_NAMED_BUFF_ALL(rx, flags) \    CALL_FPTR((rx)->engine->named_buff)(aTHX_ (rx), NULL, NULL, flags)#define CALLREG_PACKAGE(rx) \    CALL_FPTR((rx)->engine->qr_package)(aTHX_ (rx))#if defined(USE_ITHREADS)         #define CALLREGDUPE(prog,param) \    Perl_re_dup(aTHX_ (prog),(param))#define CALLREGDUPE_PVT(prog,param) \    (prog ? CALL_FPTR((prog)->engine->dupe)(aTHX_ (prog),(param)) \          : (REGEXP *)NULL) #endif/* * Because of backward compatibility reasons the PERL_UNUSED_DECL * cannot be changed from postfix to PERL_UNUSED_DECL(x).  Sigh. * * Note that there are C compilers such as MetroWerks CodeWarrior * which do not have an "inlined" way (like the gcc __attribute__) of * marking unused variables (they need e.g. a #pragma) and therefore * cpp macros like PERL_UNUSED_DECL cannot work for this purpose, even * if it were PERL_UNUSED_DECL(x), which it cannot be (see above). * */#if defined(__SYMBIAN32__) && defined(__GNUC__)#  ifdef __cplusplus#    define PERL_UNUSED_DECL#  else#    define PERL_UNUSED_DECL __attribute__((unused))#  endif#endif#ifndef PERL_UNUSED_DECL#  if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus)#    define PERL_UNUSED_DECL __attribute__unused__#  else#    define PERL_UNUSED_DECL#  endif#endif /* gcc -Wall: * for silencing unused variables that are actually used most of the time, * but we cannot quite get rid of, such as "ax" in PPCODE+noargs xsubs */#ifndef PERL_UNUSED_ARG#  if defined(lint) && defined(S_SPLINT_S) /* www.splint.org */#    include <note.h>#    define PERL_UNUSED_ARG(x) NOTE(ARGUNUSED(x))#  else#    define PERL_UNUSED_ARG(x) ((void)x)#  endif#endif#ifndef PERL_UNUSED_VAR#  define PERL_UNUSED_VAR(x) ((void)x)#endif#ifdef USE_ITHREADS#  define PERL_UNUSED_CONTEXT PERL_UNUSED_ARG(my_perl)#else#  define PERL_UNUSED_CONTEXT#endif#define NOOP /*EMPTY*/(void)0#if !defined(HASATTRIBUTE_UNUSED) && defined(__cplusplus)#define dNOOP /*EMPTY*/(void)0 /* Older g++ has no __attribute((unused))__ */#else#define dNOOP extern int /*@unused@*/ Perl___notused PERL_UNUSED_DECL#endif#ifndef pTHX/* Don't bother defining tTHX and sTHX; using them outside * code guarded by PERL_IMPLICIT_CONTEXT is an error. */#  define pTHX		void#  define pTHX_#  define aTHX#  define aTHX_#  define dTHXa(a)	dNOOP#  define dTHX		dNOOP#  define pTHX_1	1	#  define pTHX_2	2#  define pTHX_3	3#  define pTHX_4	4#  define pTHX_5	5#  define pTHX_6	6#  define pTHX_7	7#  define pTHX_8	8#  define pTHX_9	9#endif#ifndef dVAR#  define dVAR		dNOOP#endif/* these are only defined for compatibility; should not be used internally */#if !defined(pTHXo) && !defined(PERL_CORE)#  define pTHXo		pTHX#  define pTHXo_	pTHX_#  define aTHXo		aTHX#  define aTHXo_	aTHX_#  define dTHXo		dTHX#  define dTHXoa(x)	dTHXa(x)#endif#ifndef pTHXx#  define pTHXx		register PerlInterpreter *my_perl#  define pTHXx_	pTHXx,#  define aTHXx		my_perl#  define aTHXx_	aTHXx,#  define dTHXx		dTHX#endif/* Under PERL_IMPLICIT_SYS (used in Windows for fork emulation) * PerlIO_foo() expands to PL_StdIO->pFOO(PL_StdIO, ...). * dTHXs is therefore needed for all functions using PerlIO_foo(). */#ifdef PERL_IMPLICIT_SYS#  ifdef PERL_GLOBAL_STRUCT_PRIVATE#    define dTHXs		dVAR; dTHX#  else#    define dTHXs		dTHX#  endif#else#  ifdef PERL_GLOBAL_STRUCT_PRIVATE#    define dTHXs		dVAR#  else#    define dTHXs		dNOOP#  endif#endif#undef START_EXTERN_C#undef END_EXTERN_C#undef EXTERN_C#ifdef __cplusplus#  define START_EXTERN_C extern "C" {#  define END_EXTERN_C }#  define EXTERN_C extern "C"#else#  define START_EXTERN_C#  define END_EXTERN_C#  define EXTERN_C extern#endif/* Some platforms require marking function declarations * for them to be exportable.  Used in perlio.h, proto.h * is handled either by the makedef.pl or by defining the * PERL_CALLCONV to be something special.  See also the * definition of XS() in XSUB.h. */#ifndef PERL_EXPORT_C#  ifdef __cplusplus#    define PERL_EXPORT_C extern "C"#  else#    define PERL_EXPORT_C extern#  endif#endif#ifndef PERL_XS_EXPORT_C#  ifdef __cplusplus#    define PERL_XS_EXPORT_C extern "C"#  else#    define PERL_XS_EXPORT_C#  endif#endif#ifdef OP_IN_REGISTER#  ifdef __GNUC__#    define stringify_immed(s) #s#    define stringify(s) stringify_immed(s)register struct op *Perl_op asm(stringify(OP_IN_REGISTER));#  endif#endif/* gcc (-ansi) -pedantic doesn't allow gcc statement expressions, * g++ allows them but seems to have problems with them * (insane errors ensue). */#if defined(PERL_GCC_PEDANTIC) || (defined(__GNUC__) && defined(__cplusplus))#  ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN#    define PERL_GCC_BRACE_GROUPS_FORBIDDEN#  endif#endif#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__cplusplus)#  ifndef PERL_USE_GCC_BRACE_GROUPS#    define PERL_USE_GCC_BRACE_GROUPS#  endif#endif/* * STMT_START { statements; } STMT_END; * can be used as a single statement, as in * if (x) STMT_START { ... } STMT_END; else ... * * Trying to select a version that gives no warnings... */#if !(defined(STMT_START) && defined(STMT_END))# ifdef PERL_USE_GCC_BRACE_GROUPS#   define STMT_START	(void)(	/* gcc supports "({ STATEMENTS; })" */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -