summaryrefslogtreecommitdiffstats
path: root/text-utils/more.c
diff options
context:
space:
mode:
authorMike Frysinger2008-06-07 19:22:45 +0200
committerKarel Zak2008-06-16 11:54:37 +0200
commite9eb4dad0ece03914f67f6d1ded74cfbbe694ba4 (patch)
tree13381872fc21c2dfabc0fd6748f34d22ab7d2d2e /text-utils/more.c
parentmore: minor fixes to magic() (diff)
downloadkernel-qcow2-util-linux-e9eb4dad0ece03914f67f6d1ded74cfbbe694ba4.tar.gz
kernel-qcow2-util-linux-e9eb4dad0ece03914f67f6d1ded74cfbbe694ba4.tar.xz
kernel-qcow2-util-linux-e9eb4dad0ece03914f67f6d1ded74cfbbe694ba4.zip
more: dont use a.out.h
The a.out.h header is not friendly to portable systems (iow, those that lack a.out support), and since the defines are only used in a cheesy magic, just use the magic constants. It's not like they're ever going to change. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'text-utils/more.c')
-rw-r--r--text-utils/more.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/text-utils/more.c b/text-utils/more.c
index f251b279f..45a58e271 100644
--- a/text-utils/more.c
+++ b/text-utils/more.c
@@ -54,7 +54,6 @@
#include <sys/stat.h>
#include <sys/file.h>
#include <sys/wait.h>
-#include <a.out.h>
#include "xstrncpy.h"
#include "nls.h"
#include "widechar.h"
@@ -546,9 +545,9 @@ magic(f, fs)
if (fread(twobytes, 2, 1, f) == 1) {
switch(twobytes[0] + (twobytes[1]<<8)) {
- case OMAGIC: /* 0407 */
- case NMAGIC: /* 0410 */
- case ZMAGIC: /* 0413 */
+ case 0407: /* a.out obj */
+ case 0410: /* a.out exec */
+ case 0413: /* a.out demand exec */
case 0405:
case 0411:
case 0177545: