summaryrefslogtreecommitdiff
path: root/os2
diff options
context:
space:
mode:
authorLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1990-11-09 13:39:17 +0000
committerLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1990-11-09 13:39:17 +0000
commit5303340c1eb77f5b18e12347ed4a7fa2eb6cd9f7 (patch)
treebe6a2e2430c813552b7d1453cc690167c68a66b4 /os2
parente5d73d7778736a8bd9f7f44aad5289ad2c783a16 (diff)
downloadperl-5303340c1eb77f5b18e12347ed4a7fa2eb6cd9f7.tar.gz
perl 3.0 patch #38 (combined patch)
Forget the description, it's too late at night...
Diffstat (limited to 'os2')
-rw-r--r--os2/README.OS227
-rw-r--r--os2/a2p.cs2
-rw-r--r--os2/dir.h117
3 files changed, 42 insertions, 104 deletions
diff --git a/os2/README.OS2 b/os2/README.OS2
index 99cd9a24c1..11ff14c4d4 100644
--- a/os2/README.OS2
+++ b/os2/README.OS2
@@ -336,6 +336,7 @@ a2p.def linker definition file for a2p
makefile Makefile, not tested
perlsh.cmd the converted perlsh
+perldb.dif changes required for perldb.pl (change for your needs)
selfrun.cmd sample selfrunning perl script for OS/2
selfrun.bat sample selfrunning perl script for DOS mode
@@ -353,4 +354,28 @@ especially not with -DDEBUGGING
rommel@lan.informatik.tu-muenchen.dbp.de
Breslauer Str. 25
D-8756 Kahl/Main
- West (yes, still!) Germany
+
++ I have verified with patchlevel 37, that the OS/2 port compiles,
+ after doing two minor changes. HPFS filenames support was also added.
+ Some bugs were fixed.
++ To compile,
+ - you need the bison parser generator
+ - copy config.h from os2 into the main perl directory (important !)
+ - copy perl.cs and perlglob.cs from the os2 subdir to the main dir
+ - copy a2p.cs from os2 to x2p
+ - say "bison -d perl.y"
+ "ren perl_tab.c perl.c" and
+ "ren perl_tab.h perly.h" in the main directory
+ - say "cs perl" and
+ "cs perlglob" in the main directory
+ - say "cs a2p" in the x2p subdir
++ If you don't have CS or don't want to use it, you have to
+ construct a makefile ...
++ If you have GNU gdbm, you can define NDBM in config.h and link with a
+ large model library of gdbm.
++ I am not shure if I can verify the OS/2 port with each release
+ from Larry Wall. Therefore, in future releases there may be
+ changes required to compile perl for OS/2.
+ October 1990
+ Kai Uwe Rommel
+ rommel@lan.informatik.tu-muenchen.dbp.de
diff --git a/os2/a2p.cs b/os2/a2p.cs
index 1141c4ff17..c12e226efa 100644
--- a/os2/a2p.cs
+++ b/os2/a2p.cs
@@ -2,7 +2,7 @@
(-W1 -Od -Ocgelt hash.c str.c util.c walk.c)
setargv.obj
-a2p.def
+..\os2\a2p.def
a2p.exe
-AL -LB -S0xA000
diff --git a/os2/dir.h b/os2/dir.h
index 92c6923ac3..8ebfae988a 100644
--- a/os2/dir.h
+++ b/os2/dir.h
@@ -7,11 +7,12 @@
*
* Enhanced and ported to OS/2 by Kai Uwe Rommel; added scandir() prototype
* December 1989, February 1990
+ * Change of MAXPATHLEN for HPFS, October 1990
*/
-#define MAXNAMLEN 12
-#define MAXPATHLEN 128
+#define MAXNAMLEN 256
+#define MAXPATHLEN 256
#define A_RONLY 0x01
#define A_HIDDEN 0x02
@@ -23,12 +24,15 @@
struct direct
{
- ino_t d_ino; /* a bit of a farce */
- int d_reclen; /* more farce */
- int d_namlen; /* length of d_name */
- char d_name[MAXNAMLEN + 1]; /* null terminated */
- long d_size; /* size in bytes */
- int d_mode; /* DOS or OS/2 file attributes */
+ ino_t d_ino; /* a bit of a farce */
+ int d_reclen; /* more farce */
+ int d_namlen; /* length of d_name */
+ char d_name[MAXNAMLEN + 1]; /* null terminated */
+ /* nonstandard fields */
+ long d_size; /* size in bytes */
+ unsigned d_mode; /* DOS or OS/2 file attributes */
+ unsigned d_time;
+ unsigned d_date;
};
/* The fields d_size and d_mode are extensions by me (Kai Uwe Rommel).
@@ -41,7 +45,7 @@ struct _dircontents
{
char *_d_entry;
long _d_size;
- int _d_mode;
+ unsigned _d_mode, _d_time, _d_date;
struct _dircontents *_d_next;
};
@@ -55,6 +59,8 @@ typedef struct _dirdesc
DIR;
+extern int attributes;
+
extern DIR *opendir(char *);
extern struct direct *readdir(DIR *);
extern void seekdir(DIR *, long);
@@ -68,96 +74,3 @@ extern int scandir(char *, struct direct ***,
extern int getfmode(char *);
extern int setfmode(char *, unsigned);
-
-/*
-NAME
- opendir, readdir, telldir, seekdir, rewinddir, closedir -
- directory operations
-
-SYNTAX
- #include <sys/types.h>
- #include <sys/dir.h>
-
- DIR *opendir(filename)
- char *filename;
-
- struct direct *readdir(dirp)
- DIR *dirp;
-
- long telldir(dirp)
- DIR *dirp;
-
- seekdir(dirp, loc)
- DIR *dirp;
- long loc;
-
- rewinddir(dirp)
- DIR *dirp;
-
- int closedir(dirp)
- DIR *dirp;
-
-DESCRIPTION
- The opendir library routine opens the directory named by
- filename and associates a directory stream with it. A
- pointer is returned to identify the directory stream in sub-
- sequent operations. The pointer NULL is returned if the
- specified filename can not be accessed, or if insufficient
- memory is available to open the directory file.
-
- The readdir routine returns a pointer to the next directory
- entry. It returns NULL upon reaching the end of the direc-
- tory or on detecting an invalid seekdir operation. The
- readdir routine uses the getdirentries system call to read
- directories. Since the readdir routine returns NULL upon
- reaching the end of the directory or on detecting an error,
- an application which wishes to detect the difference must
- set errno to 0 prior to calling readdir.
-
- The telldir routine returns the current location associated
- with the named directory stream. Values returned by telldir
- are good only for the lifetime of the DIR pointer from which
- they are derived. If the directory is closed and then reo-
- pened, the telldir value may be invalidated due to
- undetected directory compaction.
-
- The seekdir routine sets the position of the next readdir
- operation on the directory stream. Only values returned by
- telldir should be used with seekdir.
-
- The rewinddir routine resets the position of the named
- directory stream to the beginning of the directory.
-
- The closedir routine closes the named directory stream and
- returns a value of 0 if successful. Otherwise, a value of -1
- is returned and errno is set to indicate the error. All
- resources associated with this directory stream are
- released.
-
-EXAMPLE
- The following sample code searches a directory for the entry
- name.
-
- len = strlen(name);
-
- dirp = opendir(".");
-
- for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp))
-
- if (dp->d_namlen == len && !strcmp(dp->d_name, name)) {
-
- closedir(dirp);
-
- return FOUND;
-
- }
-
- closedir(dirp);
-
- return NOT_FOUND;
-
-
-SEE ALSO
- close(2), getdirentries(2), lseek(2), open(2), read(2),
- dir(5)
-*/