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 8068381..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       
@@ -1145,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
@@ -1178,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