[gnome-control-center] info: Make 64-bit detection work on all systems
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] info: Make 64-bit detection work on all systems
- Date: Fri, 14 Jan 2011 14:16:37 +0000 (UTC)
commit 76459723b0d506a7b3fe804a35e43dcc38fae086
Author: Bastien Nocera <hadess hadess net>
Date: Fri Jan 14 14:14:50 2011 +0000
info: Make 64-bit detection work on all systems
Check the pointer size as defined by GLib.
panels/info/cc-info-panel.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/panels/info/cc-info-panel.c b/panels/info/cc-info-panel.c
index aa32682..c051d11 100644
--- a/panels/info/cc-info-panel.c
+++ b/panels/info/cc-info-panel.c
@@ -234,11 +234,14 @@ static char *
get_os_type (void)
{
int bits;
-#if defined(__x86_64__) || defined(_M_X64)
- bits = 64;
-#else
- bits = 32;
-#endif
+
+ if (GLIB_SIZEOF_VOID_P == 8)
+ bits = 64;
+ else
+ bits = 32;
+
+ /* translators: This is the type of architecture, for example:
+ * "64-bit" or "32-bit" */
return g_strdup_printf (_("%d-bit"), bits);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]