accept() leaks memory on windows due to incorrect ordering of
[p5sagit/p5-mst-13.2.git] / perl.h
diff --git a/perl.h b/perl.h
index 04b6196..fa33269 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -164,8 +164,8 @@ class CPerlObj;
 #define aTHXo_                 this,
 #define PERL_OBJECT_THIS       aTHXo
 #define PERL_OBJECT_THIS_      aTHXo_
-#define dTHXoa(a)              pTHXo = a
-#define dTHXo                  dTHXoa(PERL_GET_THX)
+#define dTHXoa(a)              pTHXo = (CPerlObj*)a
+#define dTHXo                  pTHXo = PERL_GET_THX
 
 #define pTHXx          void
 #define pTHXx_
@@ -180,15 +180,16 @@ struct perl_thread;
 #    define pTHX       register struct perl_thread *thr
 #    define aTHX       thr
 #    define dTHR       dNOOP
+#    define dTHXa(a)   pTHX = (struct perl_thread*)a
 #  else
 #    ifndef MULTIPLICITY
 #      define MULTIPLICITY
 #    endif
 #    define pTHX       register PerlInterpreter *my_perl
 #    define aTHX       my_perl
+#    define dTHXa(a)   pTHX = (PerlInterpreter*)a
 #  endif
-#  define dTHXa(a)     pTHX = a
-#  define dTHX         dTHXa(PERL_GET_THX)
+#  define dTHX         pTHX = PERL_GET_THX
 #  define pTHX_                pTHX,
 #  define aTHX_                aTHX,
 #  define pTHX_1       2       
@@ -242,6 +243,7 @@ struct perl_thread;
 #  define aTHXo                aTHX
 #  define aTHXo_       aTHX_
 #  define dTHXo                dTHX
+#  define dTHXoa(x)    dTHXa(x)
 #endif
 
 #ifndef pTHXx
@@ -1144,6 +1146,9 @@ typedef NVTYPE NV;
 #       include <sunmath.h>
 #   endif
 #   define NV_DIG LDBL_DIG
+#   ifdef LDBL_MANT_DIG
+#       define NV_MANT_DIG LDBL_MANT_DIG
+#   endif
 #   ifdef HAS_SQRTL
 #       define Perl_cos cosl
 #       define Perl_sin sinl
@@ -1162,9 +1167,9 @@ typedef NVTYPE NV;
 #       define Perl_modf(x,y) ((long double)modf((double)(x),(double*)(y)))
 #   endif
 #   ifdef HAS_FREXPL
-#       define Perl_frexp(x) frexpl(x)
+#       define Perl_frexp(x,y) frexpl(x,y)
 #   else
-#       define Perl_frexp(x) ((long double)frexp((double)(x)))
+#       define Perl_frexp(x,y) ((long double)frexp((double)(x),y))
 #   endif
 #   ifdef HAS_ISNANL
 #       define Perl_isnan(x) isnanl(x)
@@ -1177,6 +1182,9 @@ typedef NVTYPE NV;
 #   endif
 #else
 #   define NV_DIG DBL_DIG
+#   ifdef DBL_MANT_DIG
+#       define NV_MANT_DIG DBL_MANT_DIG
+#   endif
 #   define Perl_cos cos
 #   define Perl_sin sin
 #   define Perl_sqrt sqrt
@@ -1187,7 +1195,7 @@ typedef NVTYPE NV;
 #   define Perl_floor floor
 #   define Perl_fmod fmod
 #   define Perl_modf(x,y) modf(x,y)
-#   define Perl_frexp(x) frexp(x)
+#   define Perl_frexp(x,y) frexp(x,y)
 #   ifdef HAS_ISNAN
 #       define Perl_isnan(x) isnan(x)
 #   else