Date: Mon, 12 Aug 2002 05:30:04 -0700 (PDT) From: Marco Molteni <molter@tin.it> To: freebsd-ports@FreeBSD.org Subject: Re: ports/41469: [MAINTAINER UPDATE] astro/gpsdrive Message-ID: <200208121230.g7CCU4Ns009828@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/41469; it has been noted by GNATS. From: Marco Molteni <molter@tin.it> To: Christian Weisgerber <naddy@freebsd.org> Cc: freebsd-gnats-submit@freebsd.org Subject: Re: ports/41469: [MAINTAINER UPDATE] astro/gpsdrive Date: Mon, 12 Aug 2002 14:23:31 +0200 On Sun, 11 Aug 2002 17:38:06 +0200, Christian Weisgerber <naddy@freebsd.org> wrote: > Marco Molteni: > > > Could you tell me a macro (and the include file in which it is > > defined) like __FreeBSD__ to detect if the platform is i386 or > > alpha? > > __alpha__ and __i386__ are defined on the respective platforms. ok, could you check the following patch? marco --- battery.c.orig Mon Aug 12 14:07:55 2002 +++ battery.c Mon Aug 12 14:16:49 2002 @@ -70,10 +70,11 @@ #include <gdk-pixbuf/gdk-pixbuf.h> #include <gtk/gtk.h> -#ifdef __FreeBSD__ +/* APM is i386-specific. */ +#if defined(__FreeBSD__) && defined(__i386__) #include <fcntl.h> #include <machine/apm_bios.h> -#endif /* __FreeBSD__ */ +#endif /* __FreeBSD__ && __i386__ */ #include "../config.h" #include "battery.h" @@ -237,7 +238,7 @@ #endif /* Linux */ -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) && defined(__i386__) /* * Return TRUE on success, FALSE on error. */ @@ -311,7 +312,7 @@ close (fd); return TRUE; } -#endif /* __FreeBSD__ */ +#endif /* __FreeBSD__ && __i386__ */ /* @@ -326,7 +327,7 @@ } #if defined(__linux__) return battery_get_values_linux (&batlevel, &batloading); -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) && defined(__i386__) return battery_get_values_fbsd (&batlevel, &batloading); #else /* add support for your favourite OS here */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208121230.g7CCU4Ns009828>