NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/53741: /dev/apm is not MI



The following reply was made to PR kern/53741; it has been noted by GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: Christos Zoulas <christos%zoulas.com@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, kern-bug-people%netbsd.org@localhost,
	gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: Re: kern/53741: /dev/apm is not MI
Date: Sun, 25 Nov 2018 21:53:54 +0100

 Hmm, maybe we should just document this better. The code in question does:
 
 #if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && (defined(i386) || defined(__i386__))
 #include <machine/apm_bios.h>
 #elif (defined(__OpenBSD__) || defined(__NetBSD__))
 #include <sys/param.h>
 #include <sys/ioctl.h>
 #if defined(__sparc64__)
 #include <sparc/apmvar.h>
 #elif defined(__x86_64__)
 #include <dev/apm/apmbios.h>
 #include <dev/apm/apmio.h>
 #else
 #include <machine/apmvar.h>
 #endif
 #define APMDEVICE "/dev/apm"
 
 
 ... and as you point out, we can just collapse all of NetBSD in a MI
 way and be done:
 
 #ifdef __NetBSD__
 #include <sys/param.h>
 #include <sys/ioctl.h>
 #include <dev/apm/apmbios.h>
 #include <dev/apm/apmio.h>
 #define APMDEVICE "/dev/apm"
 #define _ACPI_APM_BATT_UNKNOWN  0xffff /* from sys/dev/acpi/acpi_apm.c */
 #elif (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && (defined(i386) || defined(__i386__))
 
 
 and this compiles - I'll deal at the pkgsrc level.
 
 Martin
 


Home | Main Index | Thread Index | Old Index