X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/58e24efff3e72032a19e2adb55a951735452dbca..15dc519fb7cb1c4b51fbc196af8ecf273c534ad1:/iperlsys.h diff --git a/iperlsys.h b/iperlsys.h index 28e6719..f82d9c5 100644 --- a/iperlsys.h +++ b/iperlsys.h @@ -51,7 +51,11 @@ #include "perlio.h" #ifndef Sighandler_t +# if defined(HAS_SIGACTION) && defined(SA_SIGINFO) +typedef Signal_t (*Sighandler_t) (int, siginfo_t*, void*); +# else typedef Signal_t (*Sighandler_t) (int); +# endif #endif #if defined(PERL_IMPLICIT_SYS) @@ -69,10 +73,10 @@ typedef int (*LPEof)(struct IPerlStdIO*, FILE*); typedef int (*LPError)(struct IPerlStdIO*, FILE*); typedef void (*LPClearerr)(struct IPerlStdIO*, FILE*); typedef int (*LPGetc)(struct IPerlStdIO*, FILE*); -typedef char* (*LPGetBase)(struct IPerlStdIO*, FILE*); +typedef STDCHAR* (*LPGetBase)(struct IPerlStdIO*, FILE*); typedef int (*LPGetBufsiz)(struct IPerlStdIO*, FILE*); typedef int (*LPGetCnt)(struct IPerlStdIO*, FILE*); -typedef char* (*LPGetPtr)(struct IPerlStdIO*, FILE*); +typedef STDCHAR* (*LPGetPtr)(struct IPerlStdIO*, FILE*); typedef char* (*LPGets)(struct IPerlStdIO*, FILE*, char*, int); typedef int (*LPPutc)(struct IPerlStdIO*, FILE*, int); typedef int (*LPPuts)(struct IPerlStdIO*, FILE*, const char*); @@ -90,9 +94,9 @@ typedef int (*LPSetVBuf)(struct IPerlStdIO*, FILE*, char*, int, typedef void (*LPSetCnt)(struct IPerlStdIO*, FILE*, int); #ifndef NETWARE -typedef void (*LPSetPtr)(struct IPerlStdIO*, FILE*, char*); +typedef void (*LPSetPtr)(struct IPerlStdIO*, FILE*, STDCHAR*); #elif defined(NETWARE) -typedef void (*LPSetPtr)(struct IPerlStdIO*, FILE*, char*, int); +typedef void (*LPSetPtr)(struct IPerlStdIO*, FILE*, STDCHAR*, int); #endif typedef void (*LPSetlinebuf)(struct IPerlStdIO*, FILE*); @@ -335,7 +339,7 @@ struct IPerlStdIOInfo #define PerlSIO_set_cnt(f,c) PerlIOProc_abort() #endif #if defined(USE_STDIO_PTR) && defined(STDIO_PTR_LVALUE) -#define PerlSIO_set_ptr(f,p) FILE_ptr(f) = (p) +#define PerlSIO_set_ptr(f,p) (FILE_ptr(f) = (p)) #else #define PerlSIO_set_ptr(f,p) PerlIOProc_abort() #endif @@ -366,7 +370,7 @@ typedef int (*LPMakedir)(struct IPerlDir*, const char*, int); typedef int (*LPChdir)(struct IPerlDir*, const char*); typedef int (*LPRmdir)(struct IPerlDir*, const char*); typedef int (*LPDirClose)(struct IPerlDir*, DIR*); -typedef DIR* (*LPDirOpen)(struct IPerlDir*, char*); +typedef DIR* (*LPDirOpen)(struct IPerlDir*, const char*); typedef struct direct* (*LPDirRead)(struct IPerlDir*, DIR*); typedef void (*LPDirRewind)(struct IPerlDir*, DIR*); typedef void (*LPDirSeek)(struct IPerlDir*, DIR*, long); @@ -472,9 +476,12 @@ typedef char* (*LPENVGetenv_len)(struct IPerlEnv*, #endif #ifdef WIN32 typedef unsigned long (*LPEnvOsID)(struct IPerlEnv*); -typedef char* (*LPEnvLibPath)(struct IPerlEnv*, const char*); -typedef char* (*LPEnvSiteLibPath)(struct IPerlEnv*, const char*); -typedef char* (*LPEnvVendorLibPath)(struct IPerlEnv*, const char*); +typedef char* (*LPEnvLibPath)(struct IPerlEnv*, const char*, + STRLEN *const len); +typedef char* (*LPEnvSiteLibPath)(struct IPerlEnv*, const char*, + STRLEN *const len); +typedef char* (*LPEnvVendorLibPath)(struct IPerlEnv*, const char*, + STRLEN *const len); typedef void (*LPEnvGetChildIO)(struct IPerlEnv*, child_IO_table*); #endif @@ -540,12 +547,12 @@ struct IPerlEnvInfo #ifdef WIN32 #define PerlEnv_os_id() \ (*PL_Env->pEnvOsID)(PL_Env) -#define PerlEnv_lib_path(str) \ - (*PL_Env->pLibPath)(PL_Env,(str)) -#define PerlEnv_sitelib_path(str) \ - (*PL_Env->pSiteLibPath)(PL_Env,(str)) -#define PerlEnv_vendorlib_path(str) \ - (*PL_Env->pVendorLibPath)(PL_Env,(str)) +#define PerlEnv_lib_path(str, lenp) \ + (*PL_Env->pLibPath)(PL_Env,(str),(lenp)) +#define PerlEnv_sitelib_path(str, lenp) \ + (*PL_Env->pSiteLibPath)(PL_Env,(str),(lenp)) +#define PerlEnv_vendorlib_path(str, lenp) \ + (*PL_Env->pVendorLibPath)(PL_Env,(str),(lenp)) #define PerlEnv_get_child_IO(ptr) \ (*PL_Env->pGetChildIO)(PL_Env, ptr) #endif @@ -566,9 +573,9 @@ struct IPerlEnvInfo #ifdef WIN32 #define PerlEnv_os_id() win32_os_id() -#define PerlEnv_lib_path(str) win32_get_privlib(str) -#define PerlEnv_sitelib_path(str) win32_get_sitelib(str) -#define PerlEnv_vendorlib_path(str) win32_get_vendorlib(str) +#define PerlEnv_lib_path(str, lenp) win32_get_privlib(str, lenp) +#define PerlEnv_sitelib_path(str, lenp) win32_get_sitelib(str, lenp) +#define PerlEnv_vendorlib_path(str, lenp) win32_get_vendorlib(str, lenp) #define PerlEnv_get_child_IO(ptr) win32_get_child_IO(ptr) #define PerlEnv_clearenv() win32_clearenv() #define PerlEnv_get_childenv() win32_get_childenv() @@ -628,7 +635,7 @@ typedef int (*LPLIONameStat)(struct IPerlLIO*, const char*, typedef char* (*LPLIOTmpnam)(struct IPerlLIO*, char*); typedef int (*LPLIOUmask)(struct IPerlLIO*, int); typedef int (*LPLIOUnlink)(struct IPerlLIO*, const char*); -typedef int (*LPLIOUtime)(struct IPerlLIO*, char*, struct utimbuf*); +typedef int (*LPLIOUtime)(struct IPerlLIO*, const char*, struct utimbuf*); typedef int (*LPLIOWrite)(struct IPerlLIO*, int, const void*, unsigned int); @@ -915,8 +922,10 @@ struct IPerlProcInfo; typedef void (*LPProcAbort)(struct IPerlProc*); typedef char* (*LPProcCrypt)(struct IPerlProc*, const char*, const char*); -typedef void (*LPProcExit)(struct IPerlProc*, int); -typedef void (*LPProc_Exit)(struct IPerlProc*, int); +typedef void (*LPProcExit)(struct IPerlProc*, int) + __attribute__noreturn__; +typedef void (*LPProc_Exit)(struct IPerlProc*, int) + __attribute__noreturn__; typedef int (*LPProcExecl)(struct IPerlProc*, const char*, const char*, const char*, const char*, const char*); @@ -1403,3 +1412,12 @@ struct IPerlSockInfo #endif /* __Inc__IPerl___ */ +/* + * Local variables: + * c-indentation-style: bsd + * c-basic-offset: 4 + * indent-tabs-mode: t + * End: + * + * ex: set ts=8 sts=4 sw=4 noet: + */