summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1996-03-17 10:31:40 +0000
committerCharles Bailey <bailey@genetics.upenn.edu>1996-03-17 10:31:40 +0000
commit728e280303ae3d3b605c94069c3edec14b19d24e (patch)
tree6ea58da7f3b5425be1911f22f1160c53c1913970 /perl.h
parentab821d7fdc14a438ddd6cd70714e543a4552fdd9 (diff)
downloadperl-728e280303ae3d3b605c94069c3edec14b19d24e.tar.gz
perl 5.002_01: perl.h
Provide hook for single-statement macro definitions which keeps different C compilers happy; add $^O and local patch list
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/perl.h b/perl.h
index cf12d63149..bfb921034c 100644
--- a/perl.h
+++ b/perl.h
@@ -10,6 +10,29 @@
#define H_PERL 1
#define OVERLOAD
+/*
+ * STMT_START { statements; } STMT_END;
+ * can be used as a single statement, as in
+ * if (x) STMT_START { ... } STMT_END; else ...
+ *
+ * Trying to select a version that gives no warnings...
+ */
+#if !(defined(STMT_START) && defined(STMT_END))
+# if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+# define STMT_START (void)( /* gcc supports ``({ STATEMENTS; })'' */
+# define STMT_END )
+# else
+ /* Now which other defined()s do we need here ??? */
+# if (VOIDFLAGS) && (defined(sun) || defined(__sun__))
+# define STMT_START if (1)
+# define STMT_END else (void)0
+# else
+# define STMT_START do
+# define STMT_END while (0)
+# endif
+# endif
+#endif
+
#include "embed.h"
#define VOIDUSED 1
@@ -283,7 +306,7 @@
#else
# define FIXSTATUS(sts) (U_L(sts))
# define SHIFTSTATUS(sts) (sts)
-# define SETERRNO(errcode,vmserrcode) {set_errno(errcode); set_vaxc_errno(vmserrcode);}
+# define SETERRNO(errcode,vmserrcode) STMT_START {set_errno(errcode); set_vaxc_errno(vmserrcode);} STMT_END
#endif
#ifndef MSDOS
@@ -861,6 +884,7 @@ EXT char ** origenviron;
EXT U32 origalen;
EXT U32 * profiledata;
EXT int maxo INIT(MAXO);/* Number of ops */
+EXT char * osname; /* operating system */
EXT XPV* xiv_arenaroot; /* list of allocated xiv areas */
EXT IV ** xiv_root; /* free xiv list--shared by interpreters */
@@ -1207,6 +1231,7 @@ IEXT SV * Iparsehook;
IEXT char * Icddir;
IEXT bool Iminus_c;
IEXT char Ipatchlevel[10];
+IEXT char ** Ilocalpatches;
IEXT SV * Inrs;
IEXT char * Isplitstr IINIT(" ");
IEXT bool Ipreprocess;