Mercurial > octave
comparison liboctave/system/oct-syscalls.h @ 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 | 1473547f50f5 |
children | e0da98857c19 |
comparison
equal
deleted
inserted
replaced
21608:80258bb3a14b | 21609:46f059de4dce |
---|---|
29 | 29 |
30 class string_vector; | 30 class string_vector; |
31 | 31 |
32 #include <sys/types.h> | 32 #include <sys/types.h> |
33 | 33 |
34 struct | 34 namespace |
35 OCTAVE_API | 35 octave |
36 octave_syscalls | |
37 { | 36 { |
38 static int dup2 (int, int); | 37 namespace |
39 static int dup2 (int, int, std::string&); | 38 syscalls |
39 { | |
40 extern OCTAVE_API int dup2 (int, int); | |
41 extern OCTAVE_API int dup2 (int, int, std::string&); | |
40 | 42 |
41 static int execvp (const std::string&, const string_vector&); | 43 extern OCTAVE_API int execvp (const std::string&, const string_vector&); |
42 static int execvp (const std::string&, const string_vector&, std::string&); | 44 extern OCTAVE_API int execvp (const std::string&, const string_vector&, |
45 std::string&); | |
43 | 46 |
44 static pid_t fork (std::string&); | 47 extern OCTAVE_API pid_t fork (std::string&); |
45 static pid_t vfork (std::string&); | |
46 | 48 |
47 static pid_t getpgrp (std::string&); | 49 extern OCTAVE_API pid_t vfork (std::string&); |
48 | 50 |
49 static pid_t getpid (void); | 51 extern OCTAVE_API pid_t getpgrp (std::string&); |
50 static pid_t getppid (void); | |
51 | 52 |
52 static gid_t getgid (void); | 53 extern OCTAVE_API pid_t getpid (void); |
53 static gid_t getegid (void); | |
54 | 54 |
55 static uid_t getuid (void); | 55 extern OCTAVE_API pid_t getppid (void); |
56 static uid_t geteuid (void); | |
57 | 56 |
58 static int pipe (int *); | 57 extern OCTAVE_API gid_t getgid (void); |
59 static int pipe (int *, std::string&); | |
60 | 58 |
61 static pid_t waitpid (pid_t, int *status, int); | 59 extern OCTAVE_API gid_t getegid (void); |
62 static pid_t waitpid (pid_t, int *status, int, std::string&); | |
63 | 60 |
64 static int kill (pid_t, int); | 61 extern OCTAVE_API uid_t getuid (void); |
65 static int kill (pid_t, int, std::string&); | |
66 | 62 |
67 static pid_t popen2 (const std::string&, const string_vector&, bool, int *); | 63 extern OCTAVE_API uid_t geteuid (void); |
68 static pid_t popen2 (const std::string&, const string_vector&, bool, int *, | 64 |
69 std::string&); | 65 extern OCTAVE_API int pipe (int *); |
70 static pid_t popen2 (const std::string&, const string_vector&, bool, int *, | 66 extern OCTAVE_API int pipe (int *, std::string&); |
71 std::string&, bool &interactive); | 67 |
72 }; | 68 extern OCTAVE_API pid_t waitpid (pid_t, int *status, int); |
69 extern OCTAVE_API pid_t waitpid (pid_t, int *status, int, std::string&); | |
70 | |
71 extern OCTAVE_API int kill (pid_t, int); | |
72 extern OCTAVE_API int kill (pid_t, int, std::string&); | |
73 | |
74 extern OCTAVE_API pid_t | |
75 popen2 (const std::string&, const string_vector&, bool, int *); | |
76 | |
77 extern OCTAVE_API pid_t | |
78 popen2 (const std::string&, const string_vector&, bool, int *, | |
79 std::string&); | |
80 | |
81 extern OCTAVE_API pid_t | |
82 popen2 (const std::string&, const string_vector&, bool, int *, | |
83 std::string&, bool &interactive); | |
84 | |
85 extern OCTAVE_API int fcntl (int, int, long); | |
86 extern OCTAVE_API int fcntl (int, int, long, std::string&); | |
87 } | |
88 } | |
73 | 89 |
74 #endif | 90 #endif |
75 | 91 |
76 extern OCTAVE_API int octave_fcntl (int, int, long); | |
77 extern OCTAVE_API int octave_fcntl (int, int, long, std::string&); |