changeset 2433:3952436ca2c2

[project @ 1996-10-27 04:39:00 by jwe]
author jwe
date Sun, 27 Oct 1996 04:39:00 +0000
parents 874f758eade5
children ced642d8ba6a
files liboctave/ChangeLog liboctave/file-ops.cc
diffstat 2 files changed, 21 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/ChangeLog
+++ b/liboctave/ChangeLog
@@ -1,3 +1,8 @@
+Sat Oct 26 23:37:34 1996  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* file-ops.cc (mkfifo) [! HAVE_MKFIFO]: Just print an error
+	message and return -1.
+
 Fri Oct 25 01:24:51 1996  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* str-vec.h (str_vec_compare): Declare args as const void *, then
--- a/liboctave/file-ops.cc
+++ b/liboctave/file-ops.cc
@@ -34,6 +34,7 @@
 #include <unistd.h>
 #endif
 
+#include "error.h"
 #include "file-ops.h"
 #include "lo-error.h"
 #include "statdefs.h"
@@ -199,30 +200,45 @@
   return fs ? fs.is_newer (time) : -1;
 }
 
+// We provide a replacement for mkdir().
+
 int
 oct_mkdir (const string& name, mode_t mode)
 {
   return mkdir (name.c_str (), mode);
 }
 
+// I don't know how to emulate this on systems that don't provide it.
+
 int
 oct_mkfifo (const string& name, mode_t mode)
 {
+#if defined (HAVE_MKFIFO)
   return mkfifo (name.c_str (), mode);
+#else
+  ::error ("mkfifo: not implemented on this system");
+  return -1;
+#endif
 }
 
+// We provide a replacement for rename().
+
 int
 oct_rename (const string& from, const string& to)
 {
   return rename (from.c_str (), to.c_str ());
 }
 
+// We provide a replacement for rmdir().
+
 int
 oct_rmdir (const string& name)
 {
   return rmdir (name.c_str ());
 }
 
+// We provide a replacement for tempnam().
+
 string
 oct_tempnam (void)
 {