From ac63110dad47457d428b1de543f5085ca7dac6eb Mon Sep 17 00:00:00 2001 From: Roman Bogorodskiy Date: Thu, 29 Sep 2005 03:22:31 +0000 Subject: [PATCH] APM is i386-only thing. git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@336 7f574dfc-610e-0410-a909-a81674777703 --- src/conky.c | 8 ++++---- src/conky.h | 4 ++-- src/freebsd.c | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/conky.c b/src/conky.c index 3342d50b..e52617c7 100644 --- a/src/conky.c +++ b/src/conky.c @@ -844,7 +844,7 @@ enum text_object_type { OBJ_upspeedgraph, OBJ_uptime, OBJ_uptime_short, -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) && (defined(i386) || defined(__i386__)) OBJ_apm_adapter, OBJ_apm_battery_time, OBJ_apm_battery_life, @@ -1686,8 +1686,8 @@ int a = stippled_borders, b = 1; } END OBJ(uptime_short, INFO_UPTIME) END OBJ(uptime, INFO_UPTIME) END OBJ(adt746xcpu, 0) END OBJ(adt746xfan, 0) END -#ifdef __FreeBSD__ - OBJ(apm_adapter, 0) END +#if defined(__FreeBSD__) && (defined(i386) || defined(__i386__)) + OBJ(apm_adapter, 0) END OBJ(apm_battery_life, 0) END OBJ(apm_battery_time, 0) END #endif /* __FreeBSD__ */ @@ -2713,7 +2713,7 @@ static void generate_text() format_seconds(p, n, (int) cur->uptime); } -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) && (defined(i386) || defined(__i386__)) OBJ(apm_adapter) { snprintf(p, n, "%s", get_apm_adapter()); } diff --git a/src/conky.h b/src/conky.h index 83166ee5..ca953920 100644 --- a/src/conky.h +++ b/src/conky.h @@ -30,7 +30,7 @@ #endif #endif /* X11 */ -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) && (defined(i386) || defined(__i386__)) #include #endif /* __FreeBSD__ */ @@ -360,7 +360,7 @@ void update_seti(); #endif /* in freebsd.c */ -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) && (defined(i386) || defined(__i386__)) int apm_getinfo(int fd, apm_info_t aip); char *get_apm_adapter(void); char *get_apm_battery_life(void); diff --git a/src/freebsd.c b/src/freebsd.c index d57b898f..a70530a3 100644 --- a/src/freebsd.c +++ b/src/freebsd.c @@ -590,6 +590,7 @@ inline void proc_find_top(struct process **cpu, struct process **mem) return; } +#if defined(i386) || defined(__i386__) #define APMDEV "/dev/apm" #define APM_UNKNOWN 255 @@ -706,3 +707,4 @@ char *get_apm_battery_time() return out; } +#endif