"""glob.*""" patch for VMS, from Peter Prymmer.
[p5sagit/p5-mst-13.2.git] / perl.h
diff --git a/perl.h b/perl.h
index 462f0e3..547165a 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -1,6 +1,6 @@
 /*    perl.h
  *
- *    Copyright (c) 1987-2002, Larry Wall
+ *    Copyright (c) 1987-2003, 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.
@@ -2161,8 +2161,13 @@ typedef pthread_key_t    perl_key;
  *   of bytes occurs on read or write operations.
  */
 #  define USEMYBINMODE / **/
+#  include <io.h> /* for setmode() prototype */
 #  define my_binmode(fp, iotype, mode) \
-            (PerlLIO_setmode(PerlIO_fileno(fp), mode) != -1 ? TRUE : FALSE)
+            (PerlLIO_setmode(fileno(fp), mode) != -1 ? TRUE : FALSE)
+#endif
+
+#ifdef __CYGWIN__
+void init_os_extras(void);
 #endif
 
 #ifdef UNION_ANY_DEFINITION
@@ -3241,7 +3246,9 @@ enum {            /* pass one of these to get_vtbl */
 #define HINT_FILETEST_ACCESS   0x00400000 /* filetest pragma */
 #define HINT_UTF8              0x00800000 /* utf8 pragma */
 
+/* assertions pragma */
 #define HINT_ASSERTING          0x01000000
+#define HINT_ASSERTIONSSEEN     0x02000000
 
 /* The following are stored in $sort::hints, not in PL_hints */
 #define HINT_SORT_SORT_BITS    0x000000FF /* allow 256 different ones */
@@ -4175,15 +4182,22 @@ extern void moncontrol(int);
 #define PERL_UNICODE_STDIN_FLAG                        0x0001
 #define PERL_UNICODE_STDOUT_FLAG               0x0002
 #define PERL_UNICODE_STDERR_FLAG               0x0004
-#define PERL_UNICODE_STD_FLAG                  0x0007
 #define PERL_UNICODE_IN_FLAG                   0x0008
 #define PERL_UNICODE_OUT_FLAG                  0x0010
-#define PERL_UNICODE_INOUT_FLAG                        0x0018
-#define PERL_UNICODE_ARGV_FLAG                 0x0020 /* For @ARGV? */
+#define PERL_UNICODE_ARGV_FLAG                 0x0020
 #define PERL_UNICODE_LOCALE_FLAG               0x0040
 #define PERL_UNICODE_WIDESYSCALLS_FLAG         0x0080 /* for Sarathy */
 
-#define PERL_UNICODE_DEFAULT_FLAGS \
+#define PERL_UNICODE_STD_FLAG          \
+       (PERL_UNICODE_STDIN_FLAG        | \
+        PERL_UNICODE_STDOUT_FLAG       | \
+        PERL_UNICODE_STDERR_FLAG)
+
+#define PERL_UNICODE_INOUT_FLAG                \
+       (PERL_UNICODE_IN_FLAG   | \
+        PERL_UNICODE_OUT_FLAG)
+
+#define PERL_UNICODE_DEFAULT_FLAGS     \
        (PERL_UNICODE_STD_FLAG          | \
         PERL_UNICODE_INOUT_FLAG        | \
         PERL_UNICODE_LOCALE_FLAG)
@@ -4233,6 +4247,10 @@ extern void moncontrol(int);
 #   define PERL_BLOCKSIG_UNBLOCK(set)  NOOP
 #endif
 
+/* Use instead of abs() since abs() forces its argument to be an int,
+ * but also beware since this evaluates its argument twice, so no x++. */
+#define PERL_ABS(x) ((x) < 0 ? -(x) : (x))
+
 /* and finally... */
 #define PERL_PATCHLEVEL_H_IMPLICIT
 #include "patchlevel.h"