comparison liboctave/system/oct-env.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 40de9f8f23a6
children eff26982a19b
comparison
equal deleted inserted replaced
21608:80258bb3a14b 21609:46f059de4dce
464 } 464 }
465 #endif 465 #endif
466 466
467 if (hd.empty ()) 467 if (hd.empty ())
468 { 468 {
469 octave_passwd pw = octave_passwd::getpwuid (octave_syscalls::getuid ()); 469 octave_passwd pw = octave_passwd::getpwuid (octave::syscalls::getuid ());
470 470
471 hd = pw ? pw.dir () : std::string (file_ops::dir_sep_str ()); 471 hd = pw ? pw.dir () : std::string (file_ops::dir_sep_str ());
472 } 472 }
473 473
474 return hd; 474 return hd;
477 std::string 477 std::string
478 octave_env::do_get_user_name (void) const 478 octave_env::do_get_user_name (void) const
479 { 479 {
480 if (user_name.empty ()) 480 if (user_name.empty ())
481 { 481 {
482 octave_passwd pw = octave_passwd::getpwuid (octave_syscalls::getuid ()); 482 octave_passwd pw = octave_passwd::getpwuid (octave::syscalls::getuid ());
483 483
484 user_name = pw ? pw.name () : std::string ("unknown"); 484 user_name = pw ? pw.name () : std::string ("unknown");
485 } 485 }
486 486
487 return user_name; 487 return user_name;