Mercurial > hg > octave-lyh
diff liboctave/file-ops.cc @ 1773:5215571ea783
[project @ 1996-01-23 08:10:26 by jwe]
author | jwe |
---|---|
date | Tue, 23 Jan 1996 08:11:08 +0000 |
parents | 95c4c5705909 |
children | d53c27b14236 |
line wrap: on
line diff
--- a/liboctave/file-ops.cc +++ b/liboctave/file-ops.cc @@ -34,6 +34,8 @@ #endif #include "file-ops.h" +#include "safe-lstat.h" +#include "safe-stat.h" #include "statdefs.h" // XXX FIXME XXX -- the is_* and mode_as_string functions are only valid @@ -111,7 +113,7 @@ struct stat buf; int status = follow_links - ? stat (cname, &buf) : lstat (cname, &buf); + ? safe_stat (cname, &buf) : safe_lstat (cname, &buf); if (status < 0) { @@ -167,9 +169,9 @@ } int -oct_rmdir (const string& name) +oct_mkfifo (const string& name, mode_t mode) { - return rmdir (name.c_str ()); + return mkfifo (name.c_str (), mode); } int @@ -179,9 +181,9 @@ } int -oct_mkfifo (const string& name, mode_t mode) +oct_rmdir (const string& name) { - return mkfifo (name.c_str (), mode); + return rmdir (name.c_str ()); } int @@ -194,6 +196,12 @@ #endif } +int +oct_unlink (const string& name) +{ + return unlink (name.c_str ()); +} + /* ;;; Local Variables: *** ;;; mode: C++ ***