This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
small os390 tweaks (from Peter Prymmer)
[perl5.git] / op.h
diff --git a/op.h b/op.h
index c9ec2df..081d10c 100644 (file)
--- a/op.h
+++ b/op.h
@@ -197,6 +197,15 @@ Deprecated.  Use C<GIMME_V> instead.
 /* Private for OP_THREADSV */
 #define OPpDONE_SVREF          64      /* Been through newSVREF once */
 
+/* Private for OP_OPEN and OP_BACKTICK */
+#define OPpOPEN_IN_RAW         16      /* binmode(F,":raw") on input fh */
+#define OPpOPEN_IN_CRLF                32      /* binmode(F,":crlf") on input fh */
+#define OPpOPEN_OUT_RAW                64      /* binmode(F,":raw") on output fh */
+#define OPpOPEN_OUT_CRLF       128     /* binmode(F,":crlf") on output fh */
+
+/* Private for OP_EXIT */
+#define OPpEXIT_VMSISH         128     /* exit(0) vs. exit(1) vmsish mode*/
+
 struct op {
     BASEOP
 };
@@ -401,3 +410,25 @@ struct loop {
 #define OA_SCALARREF 7
 #define OA_OPTIONAL 8
 
+#ifdef USE_ITHREADS
+#  define OP_REFCNT_INIT               MUTEX_INIT(&PL_op_mutex)
+#  define OP_REFCNT_LOCK               MUTEX_LOCK(&PL_op_mutex)
+#  define OP_REFCNT_UNLOCK             MUTEX_UNLOCK(&PL_op_mutex)
+#  define OP_REFCNT_TERM               MUTEX_DESTROY(&PL_op_mutex)
+#  define OpREFCNT_set(o,n)            ((o)->op_targ = (n))
+#  define OpREFCNT_inc(o)              ((o) ? (++(o)->op_targ, (o)) : Nullop)
+#  define OpREFCNT_dec(o)              (--(o)->op_targ)
+#else
+#  define OP_REFCNT_INIT               NOOP
+#  define OP_REFCNT_LOCK               NOOP
+#  define OP_REFCNT_UNLOCK             NOOP
+#  define OP_REFCNT_TERM               NOOP
+#  define OpREFCNT_set(o,n)            NOOP
+#  define OpREFCNT_inc(o)              (o)
+#  define OpREFCNT_dec(o)              0
+#endif
+
+/* flags used by Perl_load_module() */
+#define PERL_LOADMOD_DENY              0x1
+#define PERL_LOADMOD_NOIMPORT          0x2
+#define PERL_LOADMOD_IMPORT_OPS                0x4