#define USE_STDIO
#endif /* PERL_FOR_X2P */
-#ifdef VOIDUSED
-# undef VOIDUSED
-#endif
-#define VOIDUSED 1
-
#ifdef PERL_MICRO
# include "uconfig.h"
#else
# define STMT_END )
# else
/* Now which other defined()s do we need here ??? */
-# if (VOIDFLAGS) && (defined(sun) || defined(__sun__)) && !defined(__GNUC__)
+# if (defined(sun) || defined(__sun__)) && !defined(__GNUC__)
# define STMT_START if (1)
# define STMT_END else (void)0
# else
# undef _SC_ARG_MAX /* Symbian has _SC_ARG_MAX but no sysconf() */
#endif
-#if defined(HAS_SYSCALL) && !defined(HAS_SYSCALL_PROTO) && !defined(PERL_MICRO)
+#if defined(HAS_SYSCALL) && !defined(HAS_SYSCALL_PROTO)
EXTERN_C int syscall(int, ...);
#endif
-#if defined(HAS_USLEEP) && !defined(HAS_USLEEP_PROTO) && !defined(PERL_MICRO)
+#if defined(HAS_USLEEP) && !defined(HAS_USLEEP_PROTO)
EXTERN_C int usleep(unsigned int);
#endif
# define SS_IVCHAN SS$_IVCHAN
# define SS_NORMAL SS$_NORMAL
#else
-# define SETERRNO(errcode,vmserrcode) (errno = (errcode))
-# define dSAVEDERRNO int saved_errno
-# define dSAVE_ERRNO int saved_errno = errno
-# define SAVE_ERRNO (saved_errno = errno)
-# define RESTORE_ERRNO (errno = saved_errno)
-
# define LIB_INVARG 0
# define RMS_DIR 0
# define RMS_FAC 0
# define SS_NORMAL 0
#endif
+#ifdef WIN32
+# define dSAVEDERRNO int saved_errno; DWORD saved_win32_errno
+# define dSAVE_ERRNO int saved_errno = errno; DWORD saved_win32_errno = GetLastError()
+# define SAVE_ERRNO ( saved_errno = errno, saved_win32_errno = GetLastError() )
+# define RESTORE_ERRNO ( errno = saved_errno, SetLastError(saved_win32_errno) )
+#endif
+
+#ifdef OS2
+# define dSAVEDERRNO int saved_errno; unsigned long saved_os2_errno
+# define dSAVE_ERRNO int saved_errno = errno; unsigned long saved_os2_errno = Perl_rc
+# define SAVE_ERRNO ( saved_errno = errno, saved_os2_errno = Perl_rc )
+# define RESTORE_ERRNO ( errno = saved_errno, Perl_rc = saved_os2_errno )
+#endif
+
+#ifndef SETERRNO
+# define SETERRNO(errcode,vmserrcode) (errno = (errcode))
+#endif
+
+#ifndef dSAVEDERRNO
+# define dSAVEDERRNO int saved_errno
+# define dSAVE_ERRNO int saved_errno = errno
+# define SAVE_ERRNO (saved_errno = errno)
+# define RESTORE_ERRNO (errno = saved_errno)
+#endif
+
#define ERRSV GvSVn(PL_errgv)
#define CLEAR_ERRSV() STMT_START { \
# endif
#endif
-#ifdef PERL_MICRO
-# ifndef DIR
-# define DIR void
-# endif
-#endif
-
#ifdef FPUTS_BOTCH
/* work around botch in SunOS 4.0.1 and 4.0.2 */
# ifndef fputs
* in the face of half-implementations.)
*/
-#if defined(I_SYSMODE) && !defined(PERL_MICRO)
+#if defined(I_SYSMODE)
#include <sys/mode.h>
#endif
# define Perl_fp_class_zero(x) (Perl_fp_class(x)==FP_CLASS_NZERO||Perl_fp_class(x)==FP_CLASS_PZERO)
#endif
-#if !defined(Perl_fp_class) && defined(HAS_FP_CLASS) && !defined(PERL_MICRO)
+#if !defined(Perl_fp_class) && defined(HAS_FP_CLASS)
# include <math.h>
# if !defined(FP_SNAN) && defined(I_FP_CLASS)
# include <fp_class.h>
248-32, 249-32, 250-32, 251-32, 252-32, 253-32, 254-32,
255 /* y with diaeresis */
};
-#endif /* !EBCDIC, but still in DOINIT */
/* If these tables are accessed through ebcdic, the access will be converted to
* latin1 first */
240-32, 241-32, 242-32, 243-32, 244-32, 245-32, 246-32, 247,
248-32, 249-32, 250-32, 251-32, 252-32, 253-32, 254-32, 255
};
+#endif /* !EBCDIC, but still in DOINIT */
#else /* ! DOINIT */
-#ifndef EBCDIC
+# ifndef EBCDIC
EXTCONST unsigned char PL_fold[];
EXTCONST unsigned char PL_fold_latin1[];
-#endif
EXTCONST unsigned char PL_mod_latin1_uc[];
EXTCONST unsigned char PL_latin1_lc[];
+# endif
#endif
#ifndef PERL_GLOBAL_STRUCT /* or perlvars.h */
/* check embedded \0 characters in pathnames passed to syscalls,
but allow one ending \0 */
-#define IS_SAFE_SYSCALL(pv, what, op_name) (S_is_safe_syscall(aTHX_ (pv), (what), (op_name)))
+#define IS_SAFE_SYSCALL(p, len, what, op_name) (S_is_safe_syscall(aTHX_ (p), (len), (what), (op_name)))
-#define IS_SAFE_PATHNAME(pv, op_name) IS_SAFE_SYSCALL((pv), "pathname", (op_name))
+#define IS_SAFE_PATHNAME(p, len, op_name) IS_SAFE_SYSCALL((p), (len), "pathname", (op_name))
#if defined(OEMVS)
#define NO_ENV_ARRAY_IN_MAIN