aboutsummaryrefslogtreecommitdiffstats
path: root/vms
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2012-07-29 16:33:00 +0300
committerArnold D. Robbins <arnold@skeeve.com>2012-07-29 16:33:00 +0300
commit82816b279615b27f7c4f87349a8c830a96939d8c (patch)
treecf30bf71692e090ca6ca4934e65184aa990a3055 /vms
parent207fc1458c7f168822e454a89f23428c64163427 (diff)
downloadegawk-82816b279615b27f7c4f87349a8c830a96939d8c.tar.gz
egawk-82816b279615b27f7c4f87349a8c830a96939d8c.tar.bz2
egawk-82816b279615b27f7c4f87349a8c830a96939d8c.zip
Finish work on iop management. New readdir test.
Diffstat (limited to 'vms')
-rw-r--r--vms/ChangeLog5
-rw-r--r--vms/gawkmisc.vms7
2 files changed, 11 insertions, 1 deletions
diff --git a/vms/ChangeLog b/vms/ChangeLog
index c4cb6ed9..f65274f9 100644
--- a/vms/ChangeLog
+++ b/vms/ChangeLog
@@ -1,3 +1,8 @@
+2012-07-29 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawkmisc.c (os_isreadable): Add isdir pointer parameter to be
+ set to true if fd is for a directory.
+
2012-07-26 Arnold D. Robbins <arnold@skeeve.com>
* gawkmisc.vms (os_isreadable): New function.
diff --git a/vms/gawkmisc.vms b/vms/gawkmisc.vms
index f373b5f2..773b3556 100644
--- a/vms/gawkmisc.vms
+++ b/vms/gawkmisc.vms
@@ -147,10 +147,12 @@ int fd;
/* os_isreadable --- fd can be read from */
int
-os_isreadable(int fd)
+os_isreadable(int fd, bool *isdir)
{
struct stat sbuf;
+ *isdir = false;
+
if (fstat(fd, &sbuf) != 0)
return false;
@@ -164,6 +166,9 @@ os_isreadable(int fd)
case S_IFIFO:
#endif
return true;
+ case S_IFDIR:
+ *isdir = true;
+ /* fall through */
default:
return false;
}