summaryrefslogtreecommitdiff
path: root/os2/os2ish.h
diff options
context:
space:
mode:
authorLarry Wall <lwall@scalpel.netlabs.com>1995-11-21 10:01:00 +1200
committerLarry <lwall@scalpel.netlabs.com>1995-11-21 10:01:00 +1200
commit4633a7c4bad06b471d9310620b7fe8ddd158cccd (patch)
tree37ebeb26a64f123784fd8fac6243b124767243b0 /os2/os2ish.h
parent8e07c86ebc651fe92eb7e3b25f801f57cfb8dd6f (diff)
downloadperl-4633a7c4bad06b471d9310620b7fe8ddd158cccd.tar.gz
5.002 beta 1
If you're adventurous, have a look at ftp://ftp.sems.com/pub/outgoing/perl5.0/perl5.002beta1.tar.gz Many thanks to Andy for doing the integration. Obviously, if you consult the bugs database, you'll note there are still plenty of buglets that need fixing, and several enhancements that I've intended to put in still haven't made it in (Hi, Tim and Ilya). But I think it'll be pretty stable. And you can start to fiddle around with prototypes (which are, of course, still totally undocumented). Packrats, don't worry too much about readvertising this widely. Nowadays we're on a T1 here, so our bandwidth is okay. Have the appropriate amount of jollity. Larry
Diffstat (limited to 'os2/os2ish.h')
-rw-r--r--os2/os2ish.h72
1 files changed, 72 insertions, 0 deletions
diff --git a/os2/os2ish.h b/os2/os2ish.h
new file mode 100644
index 0000000000..061726dc2d
--- /dev/null
+++ b/os2/os2ish.h
@@ -0,0 +1,72 @@
+#include <signal.h>
+
+/* HAS_IOCTL:
+ * This symbol, if defined, indicates that the ioctl() routine is
+ * available to set I/O characteristics
+ */
+#define HAS_IOCTL /**/
+
+/* HAS_UTIME:
+ * This symbol, if defined, indicates that the routine utime() is
+ * available to update the access and modification times of files.
+ */
+#define HAS_UTIME /**/
+
+#define HAS_KILL
+#define HAS_WAIT
+
+#ifndef SIGABRT
+# define SIGABRT SIGILL
+#endif
+#ifndef SIGILL
+# define SIGILL 6 /* blech */
+#endif
+#define ABORT() kill(getpid(),SIGABRT);
+
+/*
+ * fwrite1() should be a routine with the same calling sequence as fwrite(),
+ * but which outputs all of the bytes requested as a single stream (unlike
+ * fwrite() itself, which on some systems outputs several distinct records
+ * if the number_of_items parameter is >1).
+ */
+#define fwrite1 fwrite
+
+#define my_getenv(var) getenv(var)
+
+/*****************************************************************************/
+
+#include <stdlib.h> /* before the following definitions */
+#include <unistd.h> /* before the following definitions */
+
+#define chdir _chdir2
+#define getcwd _getcwd2
+
+/* This guy is needed for quick stdstd */
+
+#if defined(USE_STDIO_PTR) && defined(STDIO_PTR_LVALUE) && defined(STDIO_CNT_LVALUE)
+# define _filbuf _fill
+ /* Perl uses ungetc only with successful return */
+# define ungetc(c,fp) \
+ (FILE_ptr(fp) > FILE_base(fp) && c == (int)*(FILE_ptr(fp) - 1) \
+ ? (--FILE_ptr(fp), ++FILE_cnt(fp), (int)c) : ungetc(c,fp))
+#endif
+
+#define OP_BINARY O_BINARY
+
+#define OS2_STAT_HACK 1
+#if OS2_STAT_HACK
+
+#define Stat(fname,bufptr) os2_stat((fname),(bufptr))
+#define Fstat(fd,bufptr) fstat((fd),(bufptr))
+
+#undef S_IFBLK
+#undef S_ISBLK
+#define S_IFBLK 0120000
+#define S_ISBLK(mode) (((mode) & S_IFMT) == S_IFBLK)
+
+#else
+
+#define Stat(fname,bufptr) stat((fname),(bufptr))
+#define Fstat(fd,bufptr) fstat((fd),(bufptr))
+
+#endif