]> git.gag.com Git - debian/gzip/commitdiff
gzip 1.3.5
authorJean-loup Gailly <jloup@chorus.fr>
Wed, 26 May 1993 01:54:12 +0000 (01:54 +0000)
committerJean-loup Gailly <jloup@chorus.fr>
Wed, 26 May 1993 01:54:12 +0000 (01:54 +0000)
primos/ci.opts [new file with mode: 0644]
primos/include/errno.h [new file with mode: 0644]
primos/include/fcntl.h [new file with mode: 0644]
primos/include/stdlib.h [new file with mode: 0644]
primos/include/sysStat.h [new file with mode: 0644]
primos/include/sysTypes.h [new file with mode: 0644]

diff --git a/primos/ci.opts b/primos/ci.opts
new file mode 100644 (file)
index 0000000..bb4f9b3
--- /dev/null
@@ -0,0 +1,6 @@
+-define PRIMOS
+-include *>PRIMOS>INCLUDE
+-ignoreregister
+-packbytes
+-sof
+
diff --git a/primos/include/errno.h b/primos/include/errno.h
new file mode 100644 (file)
index 0000000..ee89146
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+** errno.h
+**
+** Emulation of the Unix errno.h header file for PRIMOS
+**
+** Author: Peter Eriksson <pen@lysator.liu.se>
+*/
+
+#ifndef __ERRNO_H__
+#define __ERRNO_H__
+
+#include <errd.h>
+
+#define ENOENT e$fntf
+
+#endif
+
diff --git a/primos/include/fcntl.h b/primos/include/fcntl.h
new file mode 100644 (file)
index 0000000..9e4b1dc
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+** fcntl.h
+**
+** Emulation of the Unix fcntl.h header file for PRIMOS
+**
+** Author: Peter Eriksson <pen@lysator.liu.se>
+*/
+
+#ifndef __FCNTL_H__
+#define __FCNTL_H__
+
+#define O_RDONLY 0
+#define O_WRONLY 1
+#define O_RDWR   2
+
+#define O_BINARY 0
+#define O_EXCL   0
+#define O_NDELAY 0
+#define O_CREAT  0
+#define O_TRUNC  0
+
+#endif
diff --git a/primos/include/stdlib.h b/primos/include/stdlib.h
new file mode 100644 (file)
index 0000000..49fbfc3
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+** stdlib.h
+**
+** Emulation of the Unix stdlib.h header file for PRIMOS
+**
+** Author: Peter Eriksson <pen@lysator.liu.se>
+*/
+
+#ifndef __STDLIB_H__
+#define __STDLIB_H__
+
+extern char *malloc();
+extern char *calloc();
+
+#endif
+
diff --git a/primos/include/sysStat.h b/primos/include/sysStat.h
new file mode 100644 (file)
index 0000000..c24d20b
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+** sys/stat.h
+**
+** Emulation of the Unix sys/stat.h header file for PRIMOS
+**
+** Author: Peter Eriksson <pen@lysator.liu.se>
+*/
+
+#ifndef __SYS_STAT_H__
+#define __SYS_STAT_H__
+
+
+#include <sys/types.h>
+
+struct stat {
+        /* First some PRIMOS standard entries */
+       off_t   st_size;
+       time_t  st_mtime;
+       short   st_type;        /* Primos file type */
+       short   st_rwlock;      /* Primos read/write lock */
+
+       /* Begin Unix compatibility - don't believe these entries! */
+       dev_t   st_dev;       
+       ino_t   st_ino;
+       mode_t  st_mode;
+       short   st_nlink;
+       uid_t   st_uid;
+       gid_t   st_gid;
+       dev_t   st_rdev;
+       time_t  st_atime;
+       time_t  st_ctime;
+       long    st_blksize;
+       long    st_blocks;
+};
+
+#define        _IFMT           0170000 /* type of file */
+#define        _IFREG          0100000 /* regular */
+#define        _IFDIR          0040000 /* directory */
+
+/* Some stupid programs check if these are defined and then
+   believe these are supported in the OS - not so in PRIMOS ... */
+#ifndef __50SERIES
+#  define _IFCHR       0020000
+#  define _IFBLK       0060000
+#  define _IFLNK       0120000
+#  define _IFSOCK      0140000
+#  define _IFIFO       0010000
+#endif
+
+#define        S_ISUID         0004000
+#define        S_ISGID         0002000
+#define        S_ISVTX         0001000
+#define        S_IREAD         0000400
+#define        S_IWRITE        0000200
+#define        S_IEXEC         0000100
+
+#define        S_ENFMT         0002000
+
+#define        S_IFMT          _IFMT
+#define        S_IFREG         _IFREG
+#define        S_IFDIR         _IFDIR
+#ifndef __50SERIES
+#  define S_IFCHR      _IFCHR
+#  define S_IFBLK      _IFBLK
+#  define S_IFLNK      _IFLNK
+#  define S_IFSOCK     _IFSOCK
+#  define S_IFIFO      _IFIFO
+#endif
+
+#define        S_IRWXU         0000700
+#define        S_IRUSR         0000400
+#define        S_IWUSR         0000200
+#define        S_IXUSR         0000100
+#define        S_IRWXG         0000070
+#define        S_IRGRP         0000040
+#define        S_IWGRP         0000020
+#define        S_IXGRP         0000010
+#define        S_IRWXO         0000007
+#define        S_IROTH         0000004
+#define        S_IWOTH         0000002
+#define        S_IXOTH         0000001
+
+#define        S_ISREG(m)      (((m) & _IFMT) == _IFREG)
+#define        S_ISDIR(m)      (((m) & _IFMT) == _IFDIR)
+#ifndef __50SERIES
+#  define S_ISBLK(m)   (((m) & _IFMT) == _IFBLK)
+#  define S_ISCHR(m)   (((m) & _IFMT) == _IFCHR)
+#  define S_ISFIFO(m)  (((m) & _IFMT) == _IFIFO)
+#endif
+
+
+#endif
diff --git a/primos/include/sysTypes.h b/primos/include/sysTypes.h
new file mode 100644 (file)
index 0000000..ec6c5b1
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+** sys/types.h
+**
+** Emulation of the Unix sys/types.h header file for PRIMOS
+**
+** Author: Peter Eriksson <pen@lysator.liu.se>
+*/
+
+#ifndef __SYS_TYPES_H__
+#define __SYS_TYPES_H__
+
+typedef long   size_t;
+typedef long   time_t;
+
+typedef long   off_t;
+typedef short  dev_t;
+typedef short  ino_t;
+typedef short  mode_t;
+typedef short  uid_t;
+typedef short  gid_t;
+
+typedef char   *caddr_t;
+
+#endif
+