summaryrefslogtreecommitdiff
path: root/sysutils/xbattbar/files/patch-xbattbar.c
diff options
context:
space:
mode:
authorRene Ladan <rene@FreeBSD.org>2019-10-16 15:29:32 +0000
committerRene Ladan <rene@FreeBSD.org>2019-10-16 15:29:32 +0000
commit13d4527a34237c3848445140a659128518ca196f (patch)
treea59de3287464c291f091b739fe407ba6df10c951 /sysutils/xbattbar/files/patch-xbattbar.c
parentnet-p2p/monero-cli: fix build on non-x86 (diff)
Remove expired ports:
2019-10-16 archivers/freetar: Unfetchable, unmaintained 2019-10-16 archivers/hffzip: Unfetchable, unmaintained 2019-10-16 archivers/hpack.non-usa.only: Unfetchable, unmaintained 2019-10-16 archivers/untar: Unfetchable, unmaintained 2019-10-16 astro/gpsdrive: Unfetchable, unmaintained 2019-10-16 astro/planets: Unfetchable, unmaintained 2019-10-16 audio/ascd: Unfetchable, unmaintained 2019-10-16 audio/audiotag: Unfetchable, unmaintained 2019-10-16 audio/gmidimonitor: Unfetchable, unmaintained 2019-10-16 audio/gmpc-lyricwiki: Unfetchable, unmaintained 2019-10-16 audio/jack_mixer: Unfetchable, unmaintained 2019-10-16 audio/jmusic: Unfetchable, unmaintained 2019-10-16 audio/maplay: Unfetchable, unmaintained 2019-10-16 audio/mbox: Unfetchable, unmaintained 2019-10-16 audio/nuvolaplayer: Unfetchable, unmaintained 2019-10-16 audio/vagalume: Unfetchable, unmaintained 2019-10-16 audio/wmsmixer: Unfetchable, unmaintained 2019-10-16 audio/xmms2-scrobbler: Unfetchable, unmaintained 2019-10-16 benchmarks/filebench: Unfetchable, unmaintained 2019-10-16 biology/chemeq: Unfetchable, unmaintained 2019-10-16 biology/linux-foldingathome: Unfetchable, unmaintained 2019-10-16 cad/dxf2fig: Unfetchable, unmaintained 2019-10-16 cad/gerbv: Unfetchable, unmaintained 2019-10-16 cad/ghdl: Unfetchable, unmaintained 2019-10-16 comms/gsmlib: Unfetchable, unmaintained 2019-10-16 comms/nokryptia: Unfetchable, unmaintained 2019-10-16 databases/mrtg-mysql-load: Unfetchable, unmaintained 2019-10-16 databases/postgres-xl: Unfetchable, unmaintained 2019-10-16 databases/wmjsql: Unfetchable, unmaintained 2019-10-16 deskutils/dlume: Unfetchable, unmaintained 2019-10-16 deskutils/gkrellm-reminder2: Unfetchable, unmaintained 2019-10-16 deskutils/ljit: Unfetchable, unmaintained 2019-10-16 deskutils/mdh: Unfetchable, unmaintained 2019-10-16 devel/atlassian-plugin-sdk: Unfetchable, unmaintained 2019-10-15 devel/bingo: Abandoned upstream 2019-10-16 devel/dprog: Unfetchable, unmaintained 2019-10-16 devel/eblob: Unfetchable, unmaintained 2019-10-16 devel/elftoaout: Unfetchable, unmaintained 2019-10-16 devel/fga: Unfetchable, unmaintained 2019-10-16 devel/fib: Unfetchable, unmaintained 2019-10-16 devel/flickrnet: Unfetchable, unmaintained 2019-10-16 devel/fujaba: Unfetchable, unmaintained 2019-10-16 devel/funnelweb: Unfetchable, unmaintained 2019-10-16 devel/genproto: Unfetchable, unmaintained 2019-10-16 devel/gitphp: Unfetchable, unmaintained 2019-10-16 devel/gnatcoll: Unfetchable, unmaintained 2019-10-16 devel/kimwitu: Unfetchable, unmaintained 2019-10-16 devel/libghthash: Unfetchable, unmaintained 2019-10-16 devel/lua-alien: Unfetchable, unmaintained 2019-10-16 devel/monotone-viz: Unfetchable, unmaintained 2019-10-16 devel/noweb: Unfetchable, unmaintained 2019-10-16 devel/p65: Unfetchable, unmaintained 2019-10-16 devel/py-fileutils: Unfetchable, unmaintained 2019-10-16 devel/py-mercurialserver: Unfetchable, unmaintained 2019-10-16 devel/py-pqueue: Unfetchable, unmaintained 2019-10-16 devel/pypersrc: Unfetchable, unmaintained 2019-10-16 devel/root-doc: Unfetchable, unmaintained 2019-10-16 devel/sfio: Unfetchable, unmaintained 2019-10-16 devel/styx: Unfetchable, unmaintained 2019-10-16 devel/tclmore: Unfetchable, unmaintained 2019-10-16 devel/umem: Unfetchable, unmaintained 2019-10-16 dns/ez-ipupdate: Unfetchable, unmaintained 2019-10-16 editors/zoinks: Unfetchable, unmaintained 2019-10-16 emulators/aftp: Unfetchable, unmaintained 2019-10-16 emulators/ia64sim: Unfetchable, unmaintained 2019-10-16 emulators/loemu: Unfetchable, unmaintained 2019-10-16 emulators/pipelight: Unfetchable, unmaintained 2019-10-16 finance/ledgersmb: Unfetchable, unmaintained 2019-10-16 ftp/atftp: Unfetchable, unmaintained 2019-10-16 ftp/cftp: Unfetchable, unmaintained 2019-10-16 games/arkanoidsb: Unfetchable, unmaintained 2019-10-16 games/balazar: Unfetchable, unmaintained 2019-10-16 games/blockade: Unfetchable, unmaintained 2019-10-16 games/cleanq3: Unfetchable, unmaintained 2019-10-16 games/conquest: Unfetchable, unmaintained 2019-10-16 games/crafty-tablebase-no-pawn: Unfetchable, unmaintained 2019-10-16 games/epiar: Unfetchable, unmaintained 2019-10-16 games/exmars: Unfetchable, unmaintained 2019-10-16 games/fteqw: Unfetchable, unmaintained 2019-10-16 games/gnake: Unfetchable, unmaintained 2019-10-16 games/gru: Unfetchable, unmaintained 2019-10-16 games/gtkpool: Unfetchable, unmaintained 2019-10-16 games/imaze: Unfetchable, unmaintained 2019-10-16 games/inform: Unfetchable, unmaintained 2019-10-16 games/iourbanterror: Unfetchable, unmaintained 2019-10-16 games/iourbanterror-server: Unfetchable, unmaintained 2019-10-16 games/jools: Unfetchable, unmaintained 2019-10-16 games/legends: Unfetchable, unmaintained 2019-10-16 games/linux-enemyterritory-etpro: Unfetchable, unmaintained 2019-10-16 games/linux-worldofgoo-demo: Unfetchable, unmaintained 2019-10-16 games/noegnud-data: Unfetchable, unmaintained 2019-10-16 games/poker-engine: Unfetchable, unmaintained 2019-10-16 games/ptools: Unfetchable, unmaintained 2019-10-16 games/pyawale: Unfetchable, unmaintained 2019-10-16 games/pysycache-lang: Unfetchable, unmaintained 2019-10-16 games/qmars: Unfetchable, unmaintained 2019-10-16 games/quake-reaper: Unfetchable, unmaintained 2019-10-16 games/quake3-ra3: Unfetchable, unmaintained 2019-10-16 games/sdlCC: Unfetchable, unmaintained 2019-10-16 games/speyes: Unfetchable, unmaintained 2019-10-16 games/vodovod: Unfetchable, unmaintained 2019-10-16 games/wmeyes: Unfetchable, unmaintained 2019-10-16 games/wmshuffle: Unfetchable, unmaintained 2019-10-16 games/xabacus: Unfetchable, unmaintained 2019-10-16 games/xpacman: Unfetchable, unmaintained 2019-10-16 games/xscorch: Unfetchable, unmaintained 2019-10-16 graphics/aeskulap: Unfetchable, unmaintained 2019-10-16 graphics/agave: Unfetchable, unmaintained 2019-10-16 graphics/cbview: Unfetchable, unmaintained 2019-10-16 graphics/copperspice: Unfetchable, unmaintained 2019-10-16 graphics/cthumb: Unfetchable, unmaintained 2019-10-16 graphics/fujiplay: Unfetchable, unmaintained 2019-10-16 graphics/gimp-ez-perspective-plugin: Unfetchable, unmaintained 2019-10-16 graphics/gimp-focusblur-plugin: Unfetchable, unmaintained 2019-10-16 graphics/gimp-jagged-border-script: Unfetchable, unmaintained 2019-10-16 graphics/gimp-manual-html: Unfetchable, unmaintained 2019-10-16 graphics/gimp-save-for-web: Unfetchable, unmaintained 2019-10-16 graphics/gimp-wavelet-denoise-plugin: Unfetchable, unmaintained 2019-10-16 graphics/gimp-wavelet-sharpen-plugin: Unfetchable, unmaintained 2019-10-16 graphics/giram: Unfetchable, unmaintained 2019-10-16 graphics/inventor: Unfetchable, unmaintained, Depends on expiring graphics/libGLw 2019-10-16 graphics/jpg2pdf: Unfetchable, unmaintained 2019-10-16 graphics/jpgraph2: Unfetchable, unmaintained 2019-10-16 graphics/makehuman: Unfetchable, unmaintained 2019-10-16 graphics/pstoepsi: Unfetchable, unmaintained 2019-10-16 graphics/xmandel: Unfetchable, unmaintained 2019-10-16 irc/minbif: Unfetchable, unmaintained 2019-10-16 japanese/VTPSfont: Unfetchable, unmaintained 2019-10-16 japanese/asterisk-sounds: Unfetchable, unmaintained 2019-10-16 japanese/cannadic: Unfetchable, unmaintained 2019-10-16 japanese/edict-utf-8: Unfetchable, unmaintained 2019-10-16 japanese/kpcal: Unfetchable, unmaintained 2019-10-16 japanese/multiskkserv: Unfetchable, unmaintained 2019-10-16 japanese/skkfep: Unfetchable, unmaintained 2019-10-16 java/eclipse-log4e: Unfetchable, unmaintained 2019-10-16 java/eclipse-lomboz: Unfetchable, unmaintained 2019-10-16 java/java-checkstyle: Unfetchable, unmaintained 2019-10-16 korean/baekmukfonts-ttf: Unfetchable, unmaintained 2019-10-16 korean/gtkcomm: Unfetchable, unmaintained 2019-10-16 lang/arena: Unfetchable, unmaintained 2019-10-16 lang/diveintopython: Unfetchable, unmaintained 2019-10-16 lang/modula3: Unfetchable, unmaintained 2019-10-16 lang/p2c: Unfetchable, unmaintained 2019-10-16 lang/quack: Unfetchable, unmaintained 2019-10-16 lang/stldoc: Unfetchable, unmaintained 2019-10-16 mail/altermime: Unfetchable, unmaintained 2019-10-16 mail/autosig: Unfetchable, unmaintained 2019-10-16 mail/gkrellmmailwatch2: Unfetchable, unmaintained 2019-10-16 mail/mboxcheck-applet: Unfetchable, unmaintained 2019-10-16 mail/nmzmail: Unfetchable, unmaintained 2019-10-16 mail/poppy: Unfetchable, unmaintained 2019-10-16 mail/prom-wl: Unfetchable, unmaintained 2019-10-16 mail/py-apolicy: Unfetchable, unmaintained 2019-10-16 mail/spamdb-curses: Unfetchable, unmaintained 2019-10-16 mail/xlbiff: Unfetchable, unmaintained 2019-10-16 math/algotutor: Unfetchable, unmaintained 2019-10-16 math/nyh-hoc: Unfetchable, unmaintained 2019-10-16 math/superlu_mt: Unfetchable, unmaintained 2019-10-16 math/testu01: Unfetchable, unmaintained 2019-10-16 misc/astrolog: Unfetchable, unmaintained 2019-10-16 misc/chord2html: Unfetchable, unmaintained 2019-10-16 misc/crosspad: Unfetchable, unmaintained 2019-10-16 misc/detachtty: Unfetchable, unmaintained 2019-10-16 misc/dphys-config: Unfetchable, unmaintained 2019-10-16 misc/dvorakng: Unfetchable, unmaintained 2019-10-16 misc/gctpc: Unfetchable, unmaintained 2019-10-16 misc/gkrellm-helium: Unfetchable, unmaintained 2019-10-16 misc/gkrellweather2: Unfetchable, unmaintained 2019-10-16 misc/linm: Unfetchable, unmaintained 2019-10-16 misc/mc-light: Unfetchable, unmaintained 2019-10-16 misc/newer: Unfetchable, unmaintained 2019-10-16 misc/telbook: Unfetchable, unmaintained 2019-10-16 misc/valspeak: Unfetchable, unmaintained 2019-10-16 misc/xd: Unfetchable, unmaintained 2019-10-16 multimedia/audiopreview: Unfetchable, unmaintained 2019-10-16 multimedia/dvts: Unfetchable, unmaintained 2019-10-16 multimedia/gcfilms: Unfetchable, unmaintained 2019-10-16 multimedia/kissdx: Unfetchable, unmaintained 2019-10-16 multimedia/playd: Unfetchable, unmaintained 2019-10-16 multimedia/subtitleeditor: Unfetchable, unmaintained 2019-10-16 multimedia/umr: Unfetchable, unmaintained 2019-10-16 net/bluemix-cli: Unfetchable, unmaintained 2019-10-16 net/boclient: Unfetchable, unmaintained 2019-10-16 net/csync2: Unfetchable, unmaintained 2019-10-16 net/dictd-database: Unfetchable, unmaintained 2019-10-16 net/gtic: Unfetchable, unmaintained 2019-10-16 net/hidentd: Unfetchable, unmaintained 2019-10-16 net/ldap2dns: Unfetchable, unmaintained 2019-10-16 net/libmxp: Unfetchable, unmaintained 2019-10-16 net/librouteros: Unfetchable, unmaintained 2019-10-16 net/nettest: Unfetchable, unmaintained 2019-10-16 net/py-netstring: Unfetchable, unmaintained 2019-10-16 net/radiusd-cistron: Unfetchable, unmaintained 2019-10-16 net/rtptools: Unfetchable, unmaintained 2019-10-16 net/smbldap-tools: Unfetchable, unmaintained 2019-10-16 net/tcptrace: Unfetchable, unmaintained 2019-10-16 net/wackford-squeers: Unfetchable, unmaintained 2019-10-16 net/wmnet2: Unfetchable, unmaintained 2019-10-16 net-im/pidgin-birthday-reminder: Unfetchable, unmaintained 2019-10-16 net-im/pidgin-pidgimpd: Unfetchable, unmaintained 2019-10-16 net-im/poezio: Unfetchable, unmaintained 2019-10-16 net-mgmt/bsnmp-jails: Unfetchable, unmaintained 2019-10-16 net-mgmt/iog: Unfetchable, unmaintained 2019-10-16 net-mgmt/lanmap: Unfetchable, unmaintained 2019-10-16 net-mgmt/nagios-spamd-plugin: Unfetchable, unmaintained 2019-10-16 net-mgmt/nefu: Unfetchable, unmaintained 2019-10-16 net-mgmt/pixilate: Unfetchable, unmaintained 2019-10-16 net-mgmt/slate: Unfetchable, unmaintained 2019-10-16 net-mgmt/weplab: Unfetchable, unmaintained 2019-10-16 net-p2p/bnbt: Unfetchable, unmaintained 2019-10-16 net-p2p/btpd: Unfetchable, unmaintained 2019-10-16 net-p2p/gkremldk: Unfetchable, unmaintained 2019-10-16 news/newscache: Unfetchable, unmaintained 2019-10-16 news/nntpbtr: Unfetchable, unmaintained 2019-10-16 news/slrnconf: Unfetchable, unmaintained 2019-10-16 news/xpn: Unfetchable, unmaintained 2019-10-16 polish/ekg: Unfetchable, unmaintained 2019-10-16 polish/ekg2: Unfetchable, unmaintained 2019-10-16 ports-mgmt/fastest_sites: Unfetchable, unmaintained 2019-10-16 ports-mgmt/pkg-plist: Unfetchable, unmaintained 2019-10-16 ports-mgmt/symports: Unfetchable, unmaintained 2019-10-16 print/poster: Unfetchable, unmaintained 2019-10-16 russian/d1489: Unfetchable, unmaintained 2019-10-16 science/metaf2xml: Unfetchable, unmaintained 2019-10-16 security/authforce: Unfetchable, unmaintained 2019-10-16 security/avcheck: Unfetchable, unmaintained 2019-10-16 security/digest: Unfetchable, unmaintained 2019-10-16 security/fpm2: Unfetchable, unmaintained 2019-10-16 security/fwipe: Unfetchable, unmaintained 2019-10-16 security/gnome-password-generator: Unfetchable, unmaintained 2019-10-16 security/httprint: Unfetchable, unmaintained 2019-10-16 security/ike-scan: Unfetchable, unmaintained 2019-10-16 security/ipfwcount: Unfetchable, unmaintained 2019-10-16 security/libsparkcrypto: Unfetchable, unmaintained 2019-10-16 security/md4coll: Unfetchable, unmaintained 2019-10-16 security/md5coll: Unfetchable, unmaintained 2019-10-16 security/osiris: Unfetchable, unmaintained 2019-10-16 security/ranpwd: Unfetchable, unmaintained 2019-10-16 security/rdigest: Unfetchable, unmaintained 2019-10-16 security/smap: Unfetchable, unmaintained 2019-10-16 security/sshblock: Unfetchable, unmaintained 2019-10-16 shells/bashc: Unfetchable, unmaintained 2019-10-16 shells/flash: Unfetchable, unmaintained 2019-10-16 sysutils/cotty: Unfetchable, unmaintained 2019-10-16 sysutils/dt: Unfetchable, unmaintained 2019-10-16 sysutils/gkrellfire: Unfetchable, unmaintained 2019-10-16 sysutils/log_analysis: Unfetchable, unmaintained 2019-10-16 sysutils/mksunbootcd: Unfetchable, unmaintained 2019-10-16 sysutils/rfstool: Unfetchable, unmaintained 2019-10-16 sysutils/skill: Unfetchable, unmaintained 2019-10-16 sysutils/sloth: Unfetchable, unmaintained 2019-10-16 sysutils/snowlog: Unfetchable, unmaintained 2019-10-16 sysutils/wmfire: Unfetchable, unmaintained 2019-10-16 sysutils/xbattbar: Unfetchable, unmaintained 2019-10-16 textproc/bedic-data: Unfetchable, unmaintained 2019-10-16 textproc/clit: Unfetchable, unmaintained 2019-10-16 textproc/docbook-tdg: Unfetchable, unmaintained 2019-10-16 textproc/emacs-wiki: Depends on expiring ports 2019-10-16 textproc/htmlize.el: Unfetchable, unmaintained 2019-10-16 textproc/libflate: Unfetchable, unmaintained 2019-10-16 textproc/mguesser: Unfetchable, unmaintained 2019-10-16 textproc/opensched: Unfetchable, unmaintained 2019-10-16 textproc/opentoken: Unfetchable, unmaintained 2019-10-16 textproc/rot: Unfetchable, unmaintained 2019-10-16 textproc/rtfx: Unfetchable, unmaintained 2019-10-16 textproc/supercat: Unfetchable, unmaintained 2019-10-16 textproc/xml_ez_out: Unfetchable, unmaintained 2019-10-16 textproc/xmldiff: Unfetchable, unmaintained 2019-10-16 textproc/xqilla: Unfetchable, unmaintained 2019-10-16 www/WebMagick: Unfetchable, unmaintained 2019-10-16 www/bins: Unfetchable, unmaintained 2019-10-16 www/blogsum: Unfetchable, unmaintained 2019-10-16 www/boa: Unfetchable, unmaintained 2019-10-16 www/cgihtml: Unfetchable, unmaintained 2019-10-16 www/cgiparse: Unfetchable, unmaintained 2019-10-16 www/flot: Unfetchable, unmaintained 2019-10-16 www/ftasv: Unfetchable, unmaintained 2019-10-16 www/hastymail2-devel: Unfetchable, unmaintained 2019-10-16 www/htmlpp: Unfetchable, unmaintained 2019-10-16 www/http-analyze: Unfetchable, unmaintained 2019-10-16 www/junkbuster: Unfetchable, unmaintained 2019-10-16 www/links-hacked: Unfetchable, unmaintained 2019-10-16 www/llgal: Unfetchable, unmaintained 2019-10-16 www/mgstat: Unfetchable, unmaintained 2019-10-16 www/php-screw: Unfetchable, unmaintained 2019-10-16 www/phproxy: Unfetchable, unmaintained 2019-10-16 www/py-prewikka: Unfetchable, unmaintained 2019-10-16 www/redmine-backlogs: Unfetchable, unmaintained 2019-10-16 www/swfdec-plugin: Unfetchable, unmaintained 2019-10-16 www/swish-e: Unfetchable, unmaintained 2019-10-16 x11/blast: Unfetchable, unmaintained 2019-10-16 x11/dynamag: Unfetchable, unmaintained 2019-10-16 x11/xcurs: Unfetchable, unmaintained 2019-10-16 x11/xscreensaver-gnome: Unfetchable, unmaintained 2019-10-16 x11/xscreensaver-gnome-hacks: Unfetchable, unmaintained 2019-10-16 x11-clocks/cairo-clock: Unfetchable, unmaintained 2019-10-16 x11-clocks/pclock: Unfetchable, unmaintained 2019-10-16 x11-clocks/stopwatch: Unfetchable, unmaintained 2019-10-16 x11-clocks/wmfuzzy: Unfetchable, unmaintained 2019-10-16 x11-fm/emelfm2: Unfetchable, unmaintained 2019-10-16 x11-fm/ezfm: Unfetchable, unmaintained 2019-10-16 x11-fm/ultracopier: Unfetchable, unmaintained 2019-10-16 x11-fm/xplore: Unfetchable, unmaintained 2019-10-16 x11-fonts/indic-ttf: Unfetchable, unmaintained 2019-10-16 x11-fonts/pingwi: Unfetchable, unmaintained 2019-10-16 x11-themes/cursor-ecliz: Unfetchable, unmaintained 2019-10-16 x11-themes/cursor-grounation-theme: Unfetchable, unmaintained 2019-10-16 x11-themes/cursor-neutral-theme: Unfetchable, unmaintained 2019-10-16 x11-themes/cursor-polar-theme: Unfetchable, unmaintained 2019-10-16 x11-themes/gtk-envy-theme: Unfetchable, unmaintained 2019-10-16 x11-themes/gtk-equinox-engine: Unfetchable, unmaintained 2019-10-16 x11-themes/gtk-qnxtheme: Unfetchable, unmaintained 2019-10-16 x11-themes/plank-theme-moka: Unfetchable, unmaintained 2019-10-15 x11-toolkits/swt-devel: Obsolete. Superseded by x11-toolkits/swt 2019-10-16 x11-wm/genmenu: Unfetchable, unmaintained 2019-10-16 x11-wm/musca: Unfetchable, unmaintained 2019-10-16 x11-wm/weewm: Unfetchable, unmaintained 2019-10-16 x11-wm/windowlab: Unfetchable, unmaintained 2019-10-16 x11-wm/wmfs: Unfetchable, unmaintained
Notes
Notes: svn path=/head/; revision=514601
Diffstat (limited to 'sysutils/xbattbar/files/patch-xbattbar.c')
-rw-r--r--sysutils/xbattbar/files/patch-xbattbar.c149
1 files changed, 0 insertions, 149 deletions
diff --git a/sysutils/xbattbar/files/patch-xbattbar.c b/sysutils/xbattbar/files/patch-xbattbar.c
deleted file mode 100644
index 65d3eaa7b1f8..000000000000
--- a/sysutils/xbattbar/files/patch-xbattbar.c
+++ /dev/null
@@ -1,149 +0,0 @@
---- xbattbar.c.orig 2001-02-02 06:25:29.000000000 +0100
-+++ xbattbar.c 2012-04-04 17:47:34.000000000 +0200
-@@ -29,6 +29,8 @@ static char *ReleaseVersion="1.4.2";
- #include <sys/time.h>
- #include <signal.h>
- #include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
- #include <unistd.h>
- #include <sys/file.h>
- #include <sys/ioctl.h>
-@@ -501,6 +503,10 @@ void battery_check(void)
-
- #ifdef __FreeBSD__
-
-+#include <sys/types.h>
-+#include <sys/sysctl.h>
-+
-+#if defined(__i386__)
- #include <machine/apm_bios.h>
-
- #define APMDEV21 "/dev/apm0"
-@@ -515,54 +521,90 @@ void battery_check(void)
- #define APM_STAT_BATT_LOW 1
- #define APM_STAT_BATT_CRITICAL 2
- #define APM_STAT_BATT_CHARGING 3
-+#endif /* i386 */
-
- int first = 1;
- void battery_check(void)
- {
-- int fd, r, p;
-- struct apm_info info;
-+ int r, p;
-+ static int sysctl = 1;
-
-- if ((fd = open(APMDEV21, O_RDWR)) == -1 &&
-- (fd = open(APMDEV22, O_RDWR)) == -1) {
-- fprintf(stderr, "xbattbar: cannot open apm device\n");
-- exit(1);
-- }
-- if (ioctl(fd, APMIO_GETINFO, &info) == -1) {
-- fprintf(stderr, "xbattbar: ioctl APMIO_GETINFO failed\n");
-- exit(1);
-+ if (sysctl) {
-+ size_t r_size, p_size;
-+
-+ /* get current status */
-+ r_size = sizeof(r);
-+ if (sysctl && sysctlbyname("hw.acpi.battery.life", &r, &r_size, NULL, 0) == -1) {
-+#if defined(__i386__)
-+ fprintf(stderr, "xbattbar: fall back to apm interface\n");
-+ sysctl = 0;
-+#else /* !i386 */
-+ fprintf(stderr, "xbattbar: can not get battery status\n");
-+ exit(1);
-+#endif /* i386 */
-+ }
-+
-+ /* get AC-line status */
-+ p_size = sizeof(p);
-+ if (sysctl && sysctlbyname("hw.acpi.acline", &p, &p_size, NULL, 0) == -1) {
-+#if defined(__i386__)
-+ fprintf(stderr, "xbattbar: fall back to apm interface\n");
-+ sysctl = 0;
-+#else /* !i386 */
-+ fprintf(stderr, "xbattbar: can not get AC-line status\n");
-+ exit(1);
-+#endif /* i386 */
-+ }
- }
-- close (fd);
-
-- ++elapsed_time;
-+#if defined(__i386__)
-+ if (!sysctl) {
-+ int fd;
-+ struct apm_info info;
-+
-+ if ((fd = open(APMDEV21, O_RDONLY)) == -1 &&
-+ (fd = open(APMDEV22, O_RDONLY)) == -1) {
-+ fprintf(stderr, "xbattbar: cannot open apm device\n");
-+ exit(1);
-+ }
-+ if (ioctl(fd, APMIO_GETINFO, &info) == -1) {
-+ fprintf(stderr, "xbattbar: ioctl APMIO_GETINFO failed\n");
-+ exit(1);
-+ }
-+ close (fd);
-
-- /* get current status */
-- if (info.ai_batt_life == APM_STAT_UNKNOWN) {
-- switch (info.ai_batt_stat) {
-- case APM_STAT_BATT_HIGH:
-- r = 100;
-- break;
-- case APM_STAT_BATT_LOW:
-- r = 40;
-- break;
-- case APM_STAT_BATT_CRITICAL:
-- r = 10;
-- break;
-- default: /* expected to be APM_STAT_UNKNOWN */
-+ /* get current status */
-+ if (info.ai_batt_life == APM_STAT_UNKNOWN) {
-+ switch (info.ai_batt_stat) {
-+ case APM_STAT_BATT_HIGH:
-+ r = 100;
-+ break;
-+ case APM_STAT_BATT_LOW:
-+ r = 40;
-+ break;
-+ case APM_STAT_BATT_CRITICAL:
-+ r = 10;
-+ break;
-+ default: /* expected to be APM_STAT_UNKNOWN */
-+ r = 100;
-+ }
-+ } else if (info.ai_batt_life > 100) {
-+ /* some APM BIOSes return values slightly > 100 */
- r = 100;
-+ } else {
-+ r = info.ai_batt_life;
- }
-- } else if (info.ai_batt_life > 100) {
-- /* some APM BIOSes return values slightly > 100 */
-- r = 100;
-- } else {
-- r = info.ai_batt_life;
-- }
-
-- /* get AC-line status */
-- if (info.ai_acline == APM_STAT_LINE_ON) {
-- p = APM_STAT_LINE_ON;
-- } else {
-- p = APM_STAT_LINE_OFF;
-+ /* get AC-line status */
-+ if (info.ai_acline == APM_STAT_LINE_ON) {
-+ p = APM_STAT_LINE_ON;
-+ } else {
-+ p = APM_STAT_LINE_OFF;
-+ }
- }
-+#endif /* i386 */
-+
-+ ++elapsed_time;
-
- if (first || ac_line != p || battery_level != r) {
- first = 0;