summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2010-02-04 07:26:26 +0000
committerimp <imp@FreeBSD.org>2010-02-04 07:26:26 +0000
commit6db2453429c4a733846d86797a80dc47edc2aba9 (patch)
treea3f33c728c28d5ace5276f00ab7c326b0727c241
parent7abc35f9b435f61b3c3ebff97b7fb2837aa19901 (diff)
downloadFreeBSD-src-6db2453429c4a733846d86797a80dc47edc2aba9.zip
FreeBSD-src-6db2453429c4a733846d86797a80dc47edc2aba9.tar.gz
Since APM is a legacy technology, that won't be adapted to other
platforms, move the test for i386 from the Makefile to powerd.c. The powerpc specific checks are already done this way...
-rw-r--r--usr.sbin/powerd/Makefile4
-rw-r--r--usr.sbin/powerd/powerd.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/powerd/Makefile b/usr.sbin/powerd/Makefile
index b1d8d11..62f8da1 100644
--- a/usr.sbin/powerd/Makefile
+++ b/usr.sbin/powerd/Makefile
@@ -6,8 +6,4 @@ MAN= powerd.8
DPADD= ${LIBUTIL}
LDADD= -lutil
-.if ${MACHINE_ARCH} == "i386"
-CFLAGS+=-DUSE_APM
-.endif
-
.include <bsd.prog.mk>
diff --git a/usr.sbin/powerd/powerd.c b/usr.sbin/powerd/powerd.c
index 59ac1ca..b4ba05d 100644
--- a/usr.sbin/powerd/powerd.c
+++ b/usr.sbin/powerd/powerd.c
@@ -46,6 +46,10 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <unistd.h>
+#ifdef __i386__
+#define USE_APM
+#endif
+
#ifdef USE_APM
#include <machine/apm_bios.h>
#endif
OpenPOWER on IntegriCloud