[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ANN: BatMon 0.2
From: |
Chris B. Vetter |
Subject: |
Re: ANN: BatMon 0.2 |
Date: |
Tue, 8 Nov 2005 10:30:03 +0100 |
On 11/5/05, Riccardo <multix@ngi.it> wrote:
[...]
> could be easy. FreeBSD support is now included, but not tested by myself.
[...]
To actually get OS specific compilations, you either need to set
ADDITIONAL_OBJCFLAGS += -D$(GNUSTEP_HOST_OS)
in any of your makefiles (eg. GNUmakefile.preamble) so you can use
#if defined( freebsd )
...
#else
...
#endif
OR
you need to specify the predefined OS like
#if defined( __FreeBSD__ )
...
#else
...
#endif
The current version of BatMon does neither, so if you're running
FreeBSD (or others) BatMon just sits there and does nothing.
The following two unified DIFFs take care of both:
--- GNUmakefile.preamble.ORG Sun Aug 14 14:59:53 2005
+++ GNUmakefile.preamble Tue Nov 8 10:26:42 2005
@@ -6,7 +6,7 @@
ADDITIONAL_CPPFLAGS +=
# Additional flags to pass to Objective C compiler
-ADDITIONAL_OBJCFLAGS +=
+ADDITIONAL_OBJCFLAGS += -D$(GNUSTEP_HOST_OS)
# Additional flags to pass to C compiler
ADDITIONAL_CFLAGS +=
--- AppController.m.ORG Sat Nov 5 17:45:04 2005
+++ AppController.m Tue Nov 8 10:29:20 2005
@@ -28,7 +28,7 @@
#include <math.h>
#import "AppController.h"
-#if defined(freebsd)
+#if defined(freebsd) || defined(__FreeBSD__)
# include <fcntl.h>
# include <sys/ioctl.h>
# include <dev/acpica/acpiio.h>
@@ -123,7 +123,7 @@
- (void)getInfo
{
-#if defined(freebsd)
+#if defined(freebsd) || defined(__FreeBSD__)
union acpi_battery_ioctl_arg
battio;
Cheers,
--
Chris
- ANN: BatMon 0.2, Riccardo, 2005/11/05
- Re: ANN: BatMon 0.2,
Chris B. Vetter <=