dhrystone diff dirname dis88 diskctl du dumpcore \
ed eject elle elvis env expand factor file \
find finger fingerd fix fold format fortune fsck.mfs \
- fsck1 ftp101 ftpd200 gcov-pull getty grep gomoku head host \
+ fsck1 ftp101 ftpd200 gcov-pull getty grep gomoku head hexdump host \
hostaddr id ifconfig ifdef indent install \
intr ipcrm ipcs irdpd isoread join kill last leave \
less lex life loadkeys loadramdisk logger login look lp \
SUBDIR+= acd asmconv gas2ack
.endif
-# Build only with clang and GCC
-.if ${COMPILER_TYPE} == "gnu"
-SUBDIR+= hexdump
-.endif
-
.include <bsd.subdir.mk>
float f4;
int16_t s2;
int32_t s4;
+#ifdef __LONG_LONG_SUPPORTED
int64_t s8;
+#endif
uint16_t u2;
uint32_t u4;
+#ifdef __LONG_LONG_SUPPORTED
uint64_t u8;
+#endif
switch(pr->flags) {
case F_ADDRESS:
memmove(&s4, bp, sizeof(s4));
(void)printf(pr->fmt, (int64_t)s4);
break;
+#ifdef __LONG_LONG_SUPPORTED
case 8:
memmove(&s8, bp, sizeof(s8));
(void)printf(pr->fmt, (int64_t)s8);
break;
+#endif
}
break;
case F_P:
memmove(&u4, bp, sizeof(u4));
(void)printf(pr->fmt, (uint64_t)u4);
break;
+#ifdef __LONG_LONG_SUPPORTED
case 8:
memmove(&u8, bp, sizeof(u8));
(void)printf(pr->fmt, (uint64_t)u8);
break;
+#endif
}
break;
}
.Pp
.Nm
exits 0 on success and \*[Gt]0 if an error occurred.
+.Sh MINIX-SPECIFIC notes
+If hexdump is compiled on a compiler that does not support long long (that is,
+ACK), 64-bit (8 byte) integer formats are not supported. Conversions where this
+is the default are changed to use a 32-bit 4 byte) default instead.
.Sh EXAMPLES
Display the input in perusal format:
.Bd -literal -offset indent
int bcnt;
} FS;
+#ifdef __minix
+#define inline
+
+#ifndef __LONG_LONG_SUPPORTED
+#include <minix/u64.h>
+typedef long int64_t;
+typedef unsigned long uint64_t;
+#define PRId64 "ld"
+#endif
+#endif
+
enum _vflag { ALL, DUP, FIRST, WAIT }; /* -v values */
extern int blocksize; /* data block size */
bcnt += 4;
break;
case 'e': case 'E': case 'f': case 'g': case 'G':
+#ifdef __LONG_LONG_SUPPORTED
bcnt += 8;
+#else
+ bcnt += 4;
+#endif
break;
case 's':
bcnt += prec;
case 2:
pr->bcnt = 2;
break;
+#ifdef __LONG_LONG_SUPPORTED
case 8:
pr->bcnt = 8;
break;
+#endif
default:
p1[1] = '\0';
badcnt(p1);
case 'e': case 'E': case 'f': case 'g': case 'G':
pr->flags = F_DBL;
switch(fu->bcnt) {
+#ifdef __LONG_LONG_SUPPORTED
case 0: case 8:
pr->bcnt = 8;
break;
+#else
+ case 0:
+#endif
case 4:
pr->bcnt = 4;
break;