Sprinkle some copyrights (use the oldest timestamp to
[p5sagit/p5-mst-13.2.git] / perl.h
diff --git a/perl.h b/perl.h
index 47ebb09..4ca34df 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -1,11 +1,12 @@
 /*    perl.h
  *
- *    Copyright (c) 1987-2001, Larry Wall
+ *    Copyright (c) 1987-2002, Larry Wall
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
  *
  */
+
 #ifndef H_PERL
 #define H_PERL 1
 
 /* See L<perlguts/"The Perl API"> for detailed notes on
  * PERL_IMPLICIT_CONTEXT and PERL_IMPLICIT_SYS */
 
+#ifdef PERL_IMPLICIT_SYS
+/* PERL_IMPLICIT_SYS implies PerlMemShared != PerlMem
+   so use slab allocator to avoid lots of MUTEX overhead
+ */
+#  ifndef PL_OP_SLAB_ALLOC
+#    define PL_OP_SLAB_ALLOC
+#  endif
+#endif
+
 #ifdef USE_ITHREADS
 #  if !defined(MULTIPLICITY)
 #    define MULTIPLICITY
@@ -254,7 +264,7 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER));
 
 #if defined(HASVOLATILE) || defined(STANDARD_C)
 #   ifdef __cplusplus
-#      define VOL              // to temporarily suppress warnings
+#      define VOL              /* to temporarily suppress warnings */
 #   else
 #      define VOL volatile
 #   endif
@@ -425,7 +435,7 @@ int usleep(unsigned int);
 #  define MYSWAP
 #endif
 
-/* Cannot include embed.h here on Win32 as win32.h has not
+/* Cannot include embed.h here on Win32 as win32.h has not 
    yet been included and defines some config variables e.g. HAVE_INTERP_INTERN
  */
 #if !defined(PERL_FOR_X2P) && !(defined(WIN32)||defined(VMS))
@@ -755,6 +765,12 @@ int sockatmark(int);
 #   endif
 #endif
 
+#ifndef HAS_SOCKETPAIR
+#   ifdef HAS_SOCKET
+#      define socketpair Perl_my_socketpair
+#   endif
+#endif
+
 #if INTSIZE == 2
 #   define htoni htons
 #   define ntohi ntohs
@@ -1783,7 +1799,11 @@ typedef struct clone_params CLONE_PARAMS;
 #endif
 
 #if defined(__VOS__)
-#   include "vosish.h"
+#   ifdef __GNUC__
+#     include "./vos/vosish.h"
+#   else
+#     include "vos/vosish.h"
+#   endif
 #   define ISHISH "vos"
 #endif
 
@@ -3937,12 +3957,17 @@ int flock(int fd, int op);
 #if O_TEXT != O_BINARY
     /* If you have different O_TEXT and O_BINARY and you are a CLRF shop,
      * that is, you are somehow DOSish. */
-#   if !defined(__BEOS__)
-#      define PERLIO_USING_CRLF 1
-#   else
+#   if defined(__BEOS__) || defined(__VOS__)
+    /* BeOS has O_TEXT != O_BINARY but O_TEXT and O_BINARY have no effect;
+     * BeOS is always UNIXoid (LF), not DOSish (CRLF). */
+    /* VOS has O_TEXT != O_BINARY, and they have effect,
+     * but VOS always uses LF, never CRLF. */
     /* If you have O_TEXT different from your O_BINARY but you still are
      * not a CRLF shop. */
 #       undef PERLIO_USING_CRLF
+#   else
+    /* If you really are DOSish. */
+#      define PERLIO_USING_CRLF 1
 #   endif
 #endif
 
@@ -4090,7 +4115,7 @@ extern void moncontrol(int);
    HAS_STRUCT_CMSGHDR
 
    HAS_NL_LANGINFO
-   
+
    HAS_DIRFD
 
    so that Configure picks them up. */