Regen Configure.
[p5sagit/p5-mst-13.2.git] / perl.h
diff --git a/perl.h b/perl.h
index 5baf49a..e8d0cc9 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -31,7 +31,9 @@
 #    define PERL_IMPLICIT_CONTEXT
 #  endif
 #  ifndef PERL_IMPLICIT_SYS
-/*#    define PERL_IMPLICIT_SYS*/              /* XXX not done yet */
+#    ifdef WIN32
+#      define PERL_IMPLICIT_SYS                /* XXX not implemented everywhere yet */
+#    endif
 #  endif
 #endif
 
@@ -40,7 +42,9 @@
 #    define PERL_IMPLICIT_CONTEXT
 #  endif
 #  ifndef PERL_IMPLICIT_SYS
-/*#    define PERL_IMPLICIT_SYS*/              /* XXX not done yet */
+#    ifdef WIN32
+#      define PERL_IMPLICIT_SYS                /* XXX not implemented everywhere yet */
+#    endif
 #  endif
 #endif
 
@@ -86,8 +90,8 @@ the perl interpreter.
 | Perl Host |
 +-----------+
       ^
-         |
-         v
+      |
+      v
 +-----------+   +-----------+
 | Perl Core |<->| Extension |
 +-----------+   +-----------+ ...
@@ -1073,9 +1077,7 @@ Free_t   Perl_mfree (Malloc_t where);
 #define PTR2NV(p)      NUM2PTR(NV,p)
   
 #ifdef USE_LONG_DOUBLE
-#  if defined(HAS_LONG_DOUBLE) && (LONG_DOUBLESIZE > DOUBLESIZE)
-#    define LDoub_t long double
-#  else
+#  if !(defined(HAS_LONG_DOUBLE) && (LONG_DOUBLESIZE > DOUBLESIZE))
 #     undef USE_LONG_DOUBLE /* Ouch! */
 #  endif
 #endif
@@ -1119,43 +1121,48 @@ Free_t   Perl_mfree (Malloc_t where);
    default value for printing floating point numbers in Gconvert.
    (see config.h)
 */
-#ifdef I_LIMITS
-#include <limits.h>
-#endif
-#ifdef I_FLOAT
-#include <float.h>
-#endif
-#ifndef HAS_LDBL_DIG
-#if LONG_DOUBLESIZE == 10
-#define LDBL_DIG 18 /* assume IEEE */
-#else
-#if LONG_DOUBLESIZE == 16
-#define LDBL_DIG 33 /* assume IEEE */
-#else
-#if LONG_DOUBLESIZE == DOUBLESIZE
-#define LDBL_DIG DBL_DIG /* bummer */
-#endif
-#endif
-#endif
-#endif
+# ifdef I_LIMITS
+#   include <limits.h>
+# endif
+# ifdef I_FLOAT
+#  include <float.h>
+# endif
+# ifndef HAS_LDBL_DIG
+#  if LONG_DOUBLESIZE == 10
+#   define LDBL_DIG 18 /* assume IEEE */
+#  else
+#   if LONG_DOUBLESIZE == 12
+#    define LDBL_DIG 18 /* gcc? */
+#   else
+#    if LONG_DOUBLESIZE == 16
+#     define LDBL_DIG 33 /* assume IEEE */
+#    else
+#     if LONG_DOUBLESIZE == DOUBLESIZE
+#      define LDBL_DIG DBL_DIG /* bummer */
+#     endif
+#    endif
+#   endif
+#  endif
+# endif
 #endif
 
 #ifdef USE_LONG_DOUBLE
-#   define HAS_LDOUB
-    typedef LDoub_t NV;
+    typedef long double NV;
 #   define NVSIZE LONG_DOUBLESIZE
 #   define NV_DIG LDBL_DIG
-#   define Perl_modf modfl
-#   define Perl_frexp frexpl
-#   define Perl_cos cosl
-#   define Perl_sin sinl
-#   define Perl_sqrt sqrtl
-#   define Perl_exp expl
-#   define Perl_log logl
-#   define Perl_atan2 atan2l
-#   define Perl_pow powl
-#   define Perl_floor floorl
-#   define Perl_fmod fmodl
+#   ifdef HAS_SQRTL
+#       define Perl_modf modfl
+#       define Perl_frexp frexpl
+#       define Perl_cos cosl
+#       define Perl_sin sinl
+#       define Perl_sqrt sqrtl
+#       define Perl_exp expl
+#       define Perl_log logl
+#       define Perl_atan2 atan2l
+#       define Perl_pow powl
+#       define Perl_floor floorl
+#       define Perl_fmod fmodl
+#   endif
 #else
     typedef double NV;
 #   define NVSIZE DOUBLESIZE
@@ -1388,9 +1395,6 @@ typedef struct loop LOOP;
 
 typedef struct Outrec Outrec;
 typedef struct interpreter PerlInterpreter;
-#ifndef __BORLANDC__
-typedef struct ff FF;          /* XXX not defined anywhere, should go? */
-#endif
 typedef struct sv SV;
 typedef struct av AV;
 typedef struct hv HV;
@@ -1684,7 +1688,6 @@ typedef pthread_key_t     perl_key;
 
 /* This defines a way to flush all output buffers.  This may be a
  * performance issue, so we allow people to disable it.
- * XXX the default needs a Configure test, as it may not work everywhere.
  */
 #ifndef PERL_FLUSHALL_FOR_CHILD
 # if defined(FFLUSH_NULL) || defined(USE_SFIO)
@@ -3199,12 +3202,23 @@ typedef struct am_table_short AMTS;
 #   include <sys/statvfs.h>     /* for f?statvfs() */
 #endif
 #ifdef I_SYS_MOUNT
-#   include <sys/mount.h>       /* for *BSD f?statfs() */
+#   include <sys/mount.h>       /* for *BSD f?statfs() or getmnt() */
 #endif
 #ifdef I_MNTENT
 #   include <mntent.h>          /* for getmntent() */
 #endif
 
+#undef PERL_MOUNT_NOSUID
+#if !defined(PERL_MOUNT_NOSUID) && defined(MNT_NOSUID)
+#   define PERL_MOUNT_NOSUID MNT_NOSUID
+#endif
+#if !defined(PERL_MOUNT_NOSUID) && defined(MS_NOSUID)
+#   define PERL_MOUNT_NOSUID MS_NOSUID
+#endif
+#if !defined(PERL_MOUNT_NOSUID) && defined(M_NOSUID)
+#   define PERL_MOUNT_NOSUID M_NOSUID
+#endif
+
 #endif /* IAMSUID */
 
 /* and finally... */