summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Bailey <bailey@newman.upenn.edu>1998-03-01 20:48:27 -0500
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1998-03-05 19:01:25 +0000
commitf7d144c835d02593edb2388cf7cb0c7395c53ae2 (patch)
tree1fae522e32540a6212b0e04d3f56172642fa698c
parentef2f54b068d6db9a696444bbfd2ffbf3ed35f3d3 (diff)
downloadperl-f7d144c835d02593edb2388cf7cb0c7395c53ae2.tar.gz
Miscellaneous minor fixes
p4raw-id: //depot/perl@779
-rw-r--r--bytecode.h62
-rw-r--r--ext/B/Makefile.PL1
-rw-r--r--ext/B/byteperl.c1
-rw-r--r--ext/Thread/Makefile.PL3
-rw-r--r--patchlevel.h4
-rw-r--r--perldir.h2
6 files changed, 39 insertions, 34 deletions
diff --git a/bytecode.h b/bytecode.h
index 8cdb0010e6..4676b5ad60 100644
--- a/bytecode.h
+++ b/bytecode.h
@@ -36,7 +36,7 @@ EXT I32 obj_list_fill INIT(-1);
#define BGET_U8(arg) arg = BGET_FGETC()
#if INDIRECT_BGET_MACROS
-#define BGET_PV(arg) do { \
+#define BGET_PV(arg) STMT_START { \
BGET_U32(arg); \
if (arg) \
bs.freadpv(arg, bs.data); \
@@ -45,13 +45,13 @@ EXT I32 obj_list_fill INIT(-1);
pv.xpv_len = 0; \
pv.xpv_cur = 0; \
} \
- } while (0)
+ } STMT_END
#else
-#define BGET_PV(arg) do { \
+#define BGET_PV(arg) STMT_START { \
BGET_U32(arg); \
if (arg) { \
New(666, pv.xpv_pv, arg, char); \
- PerlIO_fread(pv.xpv_pv, 1, arg, fp); \
+ PerlIO_fread(pv.xpv_pv, 1, arg, fp);\
pv.xpv_len = arg; \
pv.xpv_cur = arg - 1; \
} else { \
@@ -59,7 +59,7 @@ EXT I32 obj_list_fill INIT(-1);
pv.xpv_len = 0; \
pv.xpv_cur = 0; \
} \
- } while (0)
+ } STMT_END
#endif /* INDIRECT_BGET_MACROS */
#define BGET_comment(arg) \
@@ -70,7 +70,7 @@ EXT I32 obj_list_fill INIT(-1);
* machines such that 32-bit machine compilers don't whine about the shift
* count being too high even though the code is never reached there.
*/
-#define BGET_IV64(arg) do { \
+#define BGET_IV64(arg) STMT_START { \
U32 hi, lo; \
BGET_U32(hi); \
BGET_U32(lo); \
@@ -84,7 +84,7 @@ EXT I32 obj_list_fill INIT(-1);
iv_overflows++; \
arg = 0; \
} \
- } while (0)
+ } STMT_END
#define BGET_op_tr_array(arg) do { \
unsigned short *ary; \
@@ -97,31 +97,31 @@ EXT I32 obj_list_fill INIT(-1);
} while (0)
#define BGET_pvcontents(arg) arg = pv.xpv_pv
-#define BGET_strconst(arg) do { \
+#define BGET_strconst(arg) STMT_START { \
for (arg = tokenbuf; (*arg = BGET_FGETC()); arg++) /* nothing */; \
arg = tokenbuf; \
- } while (0)
+ } STMT_END
-#define BGET_double(arg) do { \
+#define BGET_double(arg) STMT_START { \
char *str; \
BGET_strconst(str); \
arg = atof(str); \
- } while (0)
+ } STMT_END
-#define BGET_objindex(arg) do { \
- U32 ix; \
- BGET_U32(ix); \
- arg = obj_list[ix]; \
- } while (0)
+#define BGET_objindex(arg) STMT_START { \
+ U32 ix; \
+ BGET_U32(ix); \
+ arg = obj_list[ix]; \
+ } STMT_END
#define BSET_ldspecsv(sv, arg) sv = specialsv_list[arg]
#define BSET_sv_refcnt_add(svrefcnt, arg) svrefcnt += arg
#define BSET_gp_refcnt_add(gprefcnt, arg) gprefcnt += arg
-#define BSET_gp_share(sv, arg) do { \
- gp_free((GV*)sv); \
- GvGP(sv) = GvGP(arg); \
- } while (0)
+#define BSET_gp_share(sv, arg) STMT_START { \
+ gp_free((GV*)sv); \
+ GvGP(sv) = GvGP(arg); \
+ } STMT_END
#define BSET_gv_fetchpv(sv, arg) sv = (SV*)gv_fetchpv(arg, TRUE, SVt_PV)
#define BSET_gv_stashpv(sv, arg) sv = (SV*)gv_stashpv(arg, TRUE)
@@ -144,11 +144,11 @@ EXT I32 obj_list_fill INIT(-1);
pregcomp(arg, arg + pv.xpv_cur, ((PMOP*)o)) : 0
#define BSET_newsv(sv, arg) sv = NEWSV(666,0); SvUPGRADE(sv, arg)
#define BSET_newop(o, arg) o = (OP*)safemalloc(optype_size[arg])
-#define BSET_newopn(o, arg) do { \
- OP *oldop = o; \
- BSET_newop(o, arg); \
- oldop->op_next = o; \
- } while (0)
+#define BSET_newopn(o, arg) STMT_START { \
+ OP *oldop = o; \
+ BSET_newop(o, arg); \
+ oldop->op_next = o; \
+ } STMT_END
#define BSET_ret(foo) return
@@ -156,12 +156,12 @@ EXT I32 obj_list_fill INIT(-1);
* Kludge special-case workaround for OP_MAPSTART
* which needs the ppaddr for OP_GREPSTART. Blech.
*/
-#define BSET_op_type(o, arg) do { \
- o->op_type = arg; \
- if (arg == OP_MAPSTART) \
- arg = OP_GREPSTART; \
- o->op_ppaddr = ppaddr[arg]; \
- } while (0)
+#define BSET_op_type(o, arg) STMT_START { \
+ o->op_type = arg; \
+ if (arg == OP_MAPSTART) \
+ arg = OP_GREPSTART; \
+ o->op_ppaddr = ppaddr[arg]; \
+ } STMT_END
#define BSET_op_ppaddr(o, arg) croak("op_ppaddr not yet implemented")
#define BSET_curpad(pad, arg) pad = AvARRAY(arg)
diff --git a/ext/B/Makefile.PL b/ext/B/Makefile.PL
index 92f01e24c4..cdcc4ed71b 100644
--- a/ext/B/Makefile.PL
+++ b/ext/B/Makefile.PL
@@ -16,6 +16,7 @@ if ($^O eq 'MSWin32') {
WriteMakefile(
NAME => "B",
VERSION => "a5",
+ MAN3PODS => ' ',
clean => {
FILES => "perl$e byteperl$e *$o B.c *~"
}
diff --git a/ext/B/byteperl.c b/ext/B/byteperl.c
index c4bf6d7dd8..a42edfb8d5 100644
--- a/ext/B/byteperl.c
+++ b/ext/B/byteperl.c
@@ -3,7 +3,6 @@
#ifndef PATCHLEVEL
#include "patchlevel.h"
#endif
-#include "byterun.h"
static void xs_init _((void));
static PerlInterpreter *my_perl;
diff --git a/ext/Thread/Makefile.PL b/ext/Thread/Makefile.PL
index bed0db43d7..e252d4e6c3 100644
--- a/ext/Thread/Makefile.PL
+++ b/ext/Thread/Makefile.PL
@@ -1,6 +1,7 @@
use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'Thread',
- VERSION_FROM => 'Thread.pm'
+ VERSION_FROM => 'Thread.pm',
+ MAN3PODS => ' '
);
diff --git a/patchlevel.h b/patchlevel.h
index 1fe5ee8e2a..aad5161b96 100644
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -1,3 +1,4 @@
+#ifndef __PATCHLEVEL_H_INCLUDED__
#define PATCHLEVEL 4
#define SUBVERSION 61
@@ -44,3 +45,6 @@ static char *local_patches[] = {
/* Initial space prevents this variable from being inserted in config.sh */
# define LOCAL_PATCH_COUNT \
(sizeof(local_patches)/sizeof(local_patches[0])-2)
+
+#define __PATCHLEVEL_H_INCLUDED__
+#endif
diff --git a/perldir.h b/perldir.h
index 45b3ba61c8..23d20ac60b 100644
--- a/perldir.h
+++ b/perldir.h
@@ -3,7 +3,7 @@
#ifdef PERL_OBJECT
#else
-#define PerlDir_mkdir(name, mode) mkdir((name), (mode))
+#define PerlDir_mkdir(name, mode) Mkdir((name), (mode))
#define PerlDir_chdir(name) chdir((name))
#define PerlDir_rmdir(name) rmdir((name))
#define PerlDir_close(dir) closedir((dir))