diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-31 22:25:00 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-31 22:25:00 +0000 |
commit | 4a34ce0854e16bd546f7048dc9364441b62d7ea1 (patch) | |
tree | 9ce5e2fb380834cad7ec8f64d7d15f965bd8c752 /base/process_util.h | |
parent | 1de04bb69e44c7f2d62fb553c0b7e1c9ec6501b3 (diff) | |
download | chromium_src-4a34ce0854e16bd546f7048dc9364441b62d7ea1.zip chromium_src-4a34ce0854e16bd546f7048dc9364441b62d7ea1.tar.gz chromium_src-4a34ce0854e16bd546f7048dc9364441b62d7ea1.tar.bz2 |
Port some of the base module to FreeBSD. Extracted from
http://codereview.chromium.org/172032.
The patch is contributed by Ben Laurie of Google.
Original review URL: http://codereview.chromium.org/180037
R=wtc
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/183016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24950 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util.h')
-rw-r--r-- | base/process_util.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/base/process_util.h b/base/process_util.h index 450dbc2..f002f85 100644 --- a/base/process_util.h +++ b/base/process_util.h @@ -13,7 +13,11 @@ #if defined(OS_WIN) #include <windows.h> #include <tlhelp32.h> -#elif defined(OS_LINUX) +#elif defined(OS_MACOSX) +// kinfo_proc is defined in <sys/sysctl.h>, but this forward declaration +// is sufficient for the vector<kinfo_proc> below. +struct kinfo_proc; +#elif defined(OS_POSIX) #include <dirent.h> #include <limits.h> #include <sys/types.h> @@ -50,10 +54,6 @@ struct IoCounters { #include "base/file_descriptor_shuffle.h" #endif -#if defined(OS_MACOSX) -struct kinfo_proc; -#endif - namespace base { // A minimalistic but hopefully cross-platform set of exit codes. @@ -273,11 +273,11 @@ class NamedProcessIterator { #if defined(OS_WIN) HANDLE snapshot_; bool started_iteration_; -#elif defined(OS_LINUX) - DIR *procfs_dir_; #elif defined(OS_MACOSX) std::vector<kinfo_proc> kinfo_procs_; size_t index_of_kinfo_proc_; +#elif defined(OS_POSIX) + DIR *procfs_dir_; #endif ProcessEntry entry_; const ProcessFilter* filter_; |