Upgrade to Net::Ping 2.06.
[p5sagit/p5-mst-13.2.git] / perl.h
diff --git a/perl.h b/perl.h
index 659d8b6..e0250ae 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -413,11 +413,11 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER));
 #   include <unistd.h>
 #endif
 
-#if defined(HAS_SYSCALL) && !defined(HAS_SYSCALL_PROTO)
+#if defined(HAS_SYSCALL) && !defined(HAS_SYSCALL_PROTO) && !defined(PERL_MICRO)
 int syscall(int, ...);
 #endif
 
-#if defined(HAS_USLEEP) && !defined(HAS_USLEEP_PROTO)
+#if defined(HAS_USLEEP) && !defined(HAS_USLEEP_PROTO) && !defined(PERL_MICRO)
 int usleep(unsigned int);
 #endif
 
@@ -803,7 +803,7 @@ int sockatmark(int);
  * in the face of half-implementations.)
  */
 
-#ifdef I_SYSMODE
+#if defined(I_SYSMODE) && !defined(PERL_MICRO)
 #include <sys/mode.h>
 #endif
 
@@ -1285,7 +1285,7 @@ typedef NVTYPE NV;
 #    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)
+#if !defined(Perl_fp_class) && defined(HAS_FP_CLASS) && !defined(PERL_MICRO)
 #    include <math.h>
 #    if !defined(FP_SNAN) && defined(I_FP_CLASS)
 #        include <fp_class.h>
@@ -1360,6 +1360,10 @@ typedef NVTYPE NV;
 #   endif
 #endif
 
+#ifdef UNDER_CE
+int isnan(double d);
+#endif
+
 #ifndef Perl_isinf
 #   ifdef HAS_ISINF
 #       define Perl_isinf(x) isinf((NV)x)
@@ -1740,7 +1744,7 @@ typedef struct clone_params CLONE_PARAMS;
 #   endif
 #endif
 
-#if defined(OS2)
+#if defined(OS2) || defined(MACOS_TRADITIONAL)
 #  include "iperlsys.h"
 #endif
 
@@ -2095,7 +2099,7 @@ typedef I32 (*filter_t) (pTHX_ int, SV *, int);
 #define FILTER_DATA(idx)          (AvARRAY(PL_rsfp_filters)[idx])
 #define FILTER_ISREADER(idx)      (idx >= AvFILLp(PL_rsfp_filters))
 
-#if !defined(OS2)
+#if !defined(OS2) && !defined(MACOS_TRADITIONAL)
 #  include "iperlsys.h"
 #endif
 #include "regexp.h"
@@ -2322,30 +2326,50 @@ Gid_t getegid (void);
 #define DEBUG_TOP_FLAG         0x80000000 /* XXX what's this for ??? */
 
 
+#  define DEBUG_p_TEST_ (PL_debug & DEBUG_p_FLAG)
+#  define DEBUG_s_TEST_ (PL_debug & DEBUG_s_FLAG)
+#  define DEBUG_l_TEST_ (PL_debug & DEBUG_l_FLAG)
+#  define DEBUG_t_TEST_ (PL_debug & DEBUG_t_FLAG)
+#  define DEBUG_o_TEST_ (PL_debug & DEBUG_o_FLAG)
+#  define DEBUG_c_TEST_ (PL_debug & DEBUG_c_FLAG)
+#  define DEBUG_P_TEST_ (PL_debug & DEBUG_P_FLAG)
+#  define DEBUG_m_TEST_ (PL_debug & DEBUG_m_FLAG)
+#  define DEBUG_f_TEST_ (PL_debug & DEBUG_f_FLAG)
+#  define DEBUG_r_TEST_ (PL_debug & DEBUG_r_FLAG)
+#  define DEBUG_x_TEST_ (PL_debug & DEBUG_x_FLAG)
+#  define DEBUG_u_TEST_ (PL_debug & DEBUG_u_FLAG)
+#  define DEBUG_L_TEST_ (PL_debug & DEBUG_L_FLAG)
+#  define DEBUG_H_TEST_ (PL_debug & DEBUG_H_FLAG)
+#  define DEBUG_X_TEST_ (PL_debug & DEBUG_X_FLAG)
+#  define DEBUG_D_TEST_ (PL_debug & DEBUG_D_FLAG)
+#  define DEBUG_S_TEST_ (PL_debug & DEBUG_S_FLAG)
+#  define DEBUG_T_TEST_ (PL_debug & DEBUG_T_FLAG)
+#  define DEBUG_R_TEST_ (PL_debug & DEBUG_R_FLAG)
+
 #ifdef DEBUGGING
 
 #  undef  YYDEBUG
 #  define YYDEBUG 1
 
-#  define DEBUG_p_TEST (PL_debug & DEBUG_p_FLAG)
-#  define DEBUG_s_TEST (PL_debug & DEBUG_s_FLAG)
-#  define DEBUG_l_TEST (PL_debug & DEBUG_l_FLAG)
-#  define DEBUG_t_TEST (PL_debug & DEBUG_t_FLAG)
-#  define DEBUG_o_TEST (PL_debug & DEBUG_o_FLAG)
-#  define DEBUG_c_TEST (PL_debug & DEBUG_c_FLAG)
-#  define DEBUG_P_TEST (PL_debug & DEBUG_P_FLAG)
-#  define DEBUG_m_TEST (PL_debug & DEBUG_m_FLAG)
-#  define DEBUG_f_TEST (PL_debug & DEBUG_f_FLAG)
-#  define DEBUG_r_TEST (PL_debug & DEBUG_r_FLAG)
-#  define DEBUG_x_TEST (PL_debug & DEBUG_x_FLAG)
-#  define DEBUG_u_TEST (PL_debug & DEBUG_u_FLAG)
-#  define DEBUG_L_TEST (PL_debug & DEBUG_L_FLAG)
-#  define DEBUG_H_TEST (PL_debug & DEBUG_H_FLAG)
-#  define DEBUG_X_TEST (PL_debug & DEBUG_X_FLAG)
-#  define DEBUG_D_TEST (PL_debug & DEBUG_D_FLAG)
-#  define DEBUG_S_TEST (PL_debug & DEBUG_S_FLAG)
-#  define DEBUG_T_TEST (PL_debug & DEBUG_T_FLAG)
-#  define DEBUG_R_TEST (PL_debug & DEBUG_R_FLAG)
+#  define DEBUG_p_TEST DEBUG_p_TEST_
+#  define DEBUG_s_TEST DEBUG_s_TEST_
+#  define DEBUG_l_TEST DEBUG_l_TEST_
+#  define DEBUG_t_TEST DEBUG_t_TEST_
+#  define DEBUG_o_TEST DEBUG_o_TEST_
+#  define DEBUG_c_TEST DEBUG_c_TEST_
+#  define DEBUG_P_TEST DEBUG_P_TEST_
+#  define DEBUG_m_TEST DEBUG_m_TEST_
+#  define DEBUG_f_TEST DEBUG_f_TEST_
+#  define DEBUG_r_TEST DEBUG_r_TEST_
+#  define DEBUG_x_TEST DEBUG_x_TEST_
+#  define DEBUG_u_TEST DEBUG_u_TEST_
+#  define DEBUG_L_TEST DEBUG_L_TEST_
+#  define DEBUG_H_TEST DEBUG_H_TEST_
+#  define DEBUG_X_TEST DEBUG_X_TEST_
+#  define DEBUG_D_TEST DEBUG_D_TEST_
+#  define DEBUG_S_TEST DEBUG_S_TEST_
+#  define DEBUG_T_TEST DEBUG_T_TEST_
+#  define DEBUG_R_TEST DEBUG_R_TEST_
 
 #  define DEB(a)     a
 #  define DEBUG(a)   if (PL_debug)   a
@@ -2433,7 +2457,7 @@ Gid_t getegid (void);
 #endif /* DEBUGGING */
 
 
-/* These constants should be used in preference to to raw characters
+/* These constants should be used in preference to raw characters
  * when using magic. Note that some perl guts still assume
  * certain character properties of these constants, namely that
  * isUPPER() and toLOWER() may do useful mappings.
@@ -3082,6 +3106,18 @@ enum {           /* pass one of these to get_vtbl */
 #define RsPARA(sv)    (SvPOK(sv) && ! SvCUR(sv))
 #define RsRECORD(sv)  (SvROK(sv) && (SvIV(SvRV(sv)) > 0))
 
+#ifdef DEBUGGING
+/* A struct for keeping various DEBUGGING related stuff
+ * neatly packed.  Currently only scratch variables for
+ * constructing debug output are included. */
+struct perl_debug_pad {
+  SV pad[3];
+};
+
+#define PERL_DEBUG_PAD(i)      &(PL_debug_pad.pad[i])
+#define PERL_DEBUG_PAD_ZERO(i) (sv_setpvn(PERL_DEBUG_PAD(i), "", 0), PERL_DEBUG_PAD(i))
+#endif
+
 /* Enable variables which are pointers to functions */
 typedef void (CPERLscope(*peep_t))(pTHX_ OP* o);
 typedef regexp*(CPERLscope(*regcomp_t)) (pTHX_ char* exp, char* xend, PMOP* pm);
@@ -3795,7 +3831,7 @@ typedef struct am_table_short AMTS;
  *    access MY_CXT.
  */
 
-#if defined(USE_ITHREADS)
+#if defined(PERL_IMPLICIT_CONTEXT)
 
 /* This must appear in all extensions that define a my_cxt_t structure,
  * right after the definition (i.e. at file scope).  The non-threads
@@ -3811,7 +3847,7 @@ typedef struct am_table_short AMTS;
  * interpreter-local data. */
 #define dMY_CXT        \
        dMY_CXT_SV;                                                     \
-       my_cxt_t *my_cxtp = (my_cxt_t*)SvUV(my_cxt_sv)
+       my_cxt_t *my_cxtp = INT2PTR(my_cxt_t*, SvUV(my_cxt_sv))
 
 /* Creates and zeroes the per-interpreter data.
  * (We allocate my_cxtp in a Perl SV so that it will be released when
@@ -3821,7 +3857,7 @@ typedef struct am_table_short AMTS;
        /* newSV() allocates one more than needed */                    \
        my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\
        Zero(my_cxtp, 1, my_cxt_t);                                     \
-       sv_setuv(my_cxt_sv, (UV)my_cxtp)
+       sv_setuv(my_cxt_sv, PTR2UV(my_cxtp))
 
 /* This macro must be used to access members of the my_cxt_t structure.
  * e.g. MYCXT.some_data */
@@ -4008,4 +4044,24 @@ extern void moncontrol(int);
 #include "wince.h"
 #endif
 
+/* ISO 6429 NEL - C1 control NExt Line */
+/* See http://www.unicode.org/unicode/reports/tr13/ */
+#ifdef EBCDIC  /* In EBCDIC NEL is just an alias for LF */
+#   if '^' == 95       /* CP 1047: MVS OpenEdition - OS/390 - z/OS */
+#       define NEXT_LINE_CHAR  0x15
+#   else               /* CDRA */
+#       define NEXT_LINE_CHAR  0x25
+#   endif
+#else
+#   define NEXT_LINE_CHAR      0x85
+#endif
+
+/* The UTF-8 bytes of the Unicode LS and PS, U+2028 and U+2029 */
+#define UNICODE_LINE_SEPA_0    0xE2
+#define UNICODE_LINE_SEPA_1    0x80
+#define UNICODE_LINE_SEPA_2    0xA8
+#define UNICODE_PARA_SEPA_0    0xE2
+#define UNICODE_PARA_SEPA_1    0x80
+#define UNICODE_PARA_SEPA_2    0xA9
+
 #endif /* Include guard */