summaryrefslogtreecommitdiff
path: root/os2
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1996-03-17 09:51:02 +0000
committerCharles Bailey <bailey@genetics.upenn.edu>1996-03-17 09:51:02 +0000
commit365eb7b5cc874d31d9a97b588bd3a6f94da0b073 (patch)
treef3929464ad2c202ce3c831bc57646fc244968f78 /os2
parent7a2f0d5b3763c9782cbc0769b86ce68630c0ca21 (diff)
downloadperl-365eb7b5cc874d31d9a97b588bd3a6f94da0b073.tar.gz
Update OS/2-specific C header file
Diffstat (limited to 'os2')
-rw-r--r--os2/os2ish.h33
1 files changed, 28 insertions, 5 deletions
diff --git a/os2/os2ish.h b/os2/os2ish.h
index 0a8720cf8d..41caa422b1 100644
--- a/os2/os2ish.h
+++ b/os2/os2ish.h
@@ -25,15 +25,20 @@
#define BIT_BUCKET "/dev/null" /* Will this work? */
-#define PERL_SYS_INIT(argcp, argvp) do { \
+void Perl_OS2_init();
+
+#define PERL_SYS_INIT(argcp, argvp) STMT_START { \
_response(argcp, argvp); \
_wildcard(argcp, argvp); \
- settmppath(); } while (0)
+ Perl_OS2_init(); } STMT_END
+
+#define PERL_SYS_TERM()
+
+#define dXSUB_SYS int fake = OS2_XS_init()
#define TMPPATH tmppath
#define TMPPATH1 "plXXXXXX"
extern char *tmppath;
-void settmppath();
/*
* fwrite1() should be a routine with the same calling sequence as fwrite(),
@@ -70,7 +75,7 @@ void settmppath();
#define Stat(fname,bufptr) os2_stat((fname),(bufptr))
#define Fstat(fd,bufptr) fstat((fd),(bufptr))
-#define FFlush(fp) fflush(fp)
+#define Fflush(fp) fflush(fp)
#undef S_IFBLK
#undef S_ISBLK
@@ -81,6 +86,24 @@ void settmppath();
#define Stat(fname,bufptr) stat((fname),(bufptr))
#define Fstat(fd,bufptr) fstat((fd),(bufptr))
-#define FFlush(fp) fflush(fp)
+#define Fflush(fp) fflush(fp)
#endif
+
+/* Our private OS/2 specific data. */
+
+typedef struct OS2_Perl_data {
+ unsigned long flags;
+ unsigned long phab;
+ int (*xs_init)();
+} OS2_Perl_data_t;
+
+extern OS2_Perl_data_t OS2_Perl_data;
+
+#define hab ((HAB)OS2_Perl_data->phab)
+#define OS2_Perl_flag (OS2_Perl_data->flag)
+#define Perl_HAB_set_f 1
+#define Perl_HAB_set (OS2_Perl_flag & Perl_HAB_set_f)
+#define set_Perl_HAB_f (OS2_Perl_flag |= Perl_HAB_set_f)
+#define set_Perl_HAB(h) (set_Perl_HAB_f, hab = h)
+#define OS2_XS_init() (*OS2_Perl_data.xs_init)()