On Tue, Jul 27, 2010 at 2:03 PM, Darryl L. Pierce dpierce@redhat.com wrote:
Signed-off-by: Darryl L. Pierce dpierce@redhat.com
src/host.cpp | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/host.cpp b/src/host.cpp index d6955a5..29dcc29 100644 --- a/src/host.cpp +++ b/src/host.cpp @@ -162,7 +162,6 @@ host_get_architecture()
if(architecture.empty()) {
#ifdef __linux__ struct utsname details;
@@ -170,8 +169,9 @@ host_get_architecture() { architecture = string(details.machine); } -#endif +#elif defined WIN32
Should we fill in a default here? Perhaps:
architecture = string("win32");
Otherwise, ACK
+#endif }
return architecture; @@ -184,15 +184,18 @@ host_get_memory()
if(!memory) {
#ifdef __linux__ struct sysinfo sysinf; if(!sysinfo(&sysinf)) { memory = sysinf.totalram / 1024L; } -#endif +#elif defined WIN32
MEMORYSTATUS status;
GlobalMemoryStatus(&status);
memory = status.dwTotalPhys / 1024L;
+#endif }
return memory;
1.7.2
Matahari mailing list Matahari@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/matahari