Mercurial > octave
diff libinterp/corefcn/syscalls.cc @ 21609:46f059de4dce
use namespace instead of struct with static members for system call wrappers
* oct-syscalls.h, oct-syscalls.cc: Use octave::syscalls namespace
instead of struct with static members. Change all uses.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 11 Apr 2016 14:39:02 -0400 |
parents | d7a268e68e69 |
children | c579ab9ee4f3 |
line wrap: on
line diff
--- a/libinterp/corefcn/syscalls.cc Mon Apr 11 13:53:17 2016 -0400 +++ b/libinterp/corefcn/syscalls.cc Mon Apr 11 14:39:02 2016 -0400 @@ -122,7 +122,7 @@ { std::string msg; - int status = octave_syscalls::dup2 (i_old, i_new, msg); + int status = octave::syscalls::dup2 (i_old, i_new, msg); return ovl (status, msg); } @@ -187,7 +187,7 @@ std::string msg; - int status = octave_syscalls::execvp (exec_file, exec_args, msg); + int status = octave::syscalls::execvp (exec_file, exec_args, msg); return ovl (status, msg); } @@ -274,7 +274,7 @@ std::string msg; pid_t pid; - pid = octave_syscalls::popen2 (exec_file, arg_list, sync_mode, + pid = octave::syscalls::popen2 (exec_file, arg_list, sync_mode, filedesc, msg, interactive); if (pid < 0) error (msg.c_str ()); @@ -440,7 +440,7 @@ std::string msg; - int status = octave_fcntl (fid, req, arg, msg); + int status = octave::syscalls::fcntl (fid, req, arg, msg); return ovl (status, msg); } @@ -476,7 +476,7 @@ std::string msg; - pid_t pid = octave_syscalls::fork (msg); + pid_t pid = octave::syscalls::fork (msg); return ovl (pid, msg); } @@ -492,7 +492,7 @@ std::string msg; - pid_t pid = octave_syscalls::getpgrp (msg); + pid_t pid = octave::syscalls::getpgrp (msg); return ovl (pid, msg); } @@ -507,7 +507,7 @@ if (args.length () != 0) print_usage (); - return ovl (octave_syscalls::getpid ()); + return ovl (octave::syscalls::getpid ()); } DEFUNX ("getppid", Fgetppid, args, , @@ -520,7 +520,7 @@ if (args.length () != 0) print_usage (); - return ovl (octave_syscalls::getppid ()); + return ovl (octave::syscalls::getppid ()); } DEFUNX ("getegid", Fgetegid, args, , @@ -533,7 +533,7 @@ if (args.length () != 0) print_usage (); - return ovl (octave_syscalls::getegid ()); + return ovl (octave::syscalls::getegid ()); } DEFUNX ("getgid", Fgetgid, args, , @@ -546,7 +546,7 @@ if (args.length () != 0) print_usage (); - return ovl (octave_syscalls::getgid ()); + return ovl (octave::syscalls::getgid ()); } DEFUNX ("geteuid", Fgeteuid, args, , @@ -559,7 +559,7 @@ if (args.length () != 0) print_usage (); - return ovl (octave_syscalls::geteuid ()); + return ovl (octave::syscalls::geteuid ()); } DEFUNX ("getuid", Fgetuid, args, , @@ -572,7 +572,7 @@ if (args.length () != 0) print_usage (); - return ovl (octave_syscalls::getuid ()); + return ovl (octave::syscalls::getuid ()); } DEFUNX ("kill", Fkill, args, , @@ -606,7 +606,7 @@ std::string msg; - int status = octave_syscalls::kill (pid, sig, msg); + int status = octave::syscalls::kill (pid, sig, msg); return ovl (status, msg); } @@ -725,7 +725,7 @@ int fid[2]; std::string msg; - int status = octave_syscalls::pipe (fid, msg); + int status = octave::syscalls::pipe (fid, msg); if (status < 0) return ovl (-1, -1, -1, msg); @@ -1132,7 +1132,7 @@ std::string msg; int status; - pid_t result = octave_syscalls::waitpid (pid, &status, options, msg); + pid_t result = octave::syscalls::waitpid (pid, &status, options, msg); return ovl (result, status, msg); }