Bug #2717
closed
tail is not largefile aware
Added by Rich Lowe about 10 years ago.
Updated about 10 years ago.
Category:
cmd - userland programs
Description
I just tried to tail a 14G file using /bin/tail, and received:
tail: foo: Value too large for defined data type
It looks like tail lost it's largefile smarts at some point?
diff --git a/usr/src/cmd/tail/Makefile b/usr/src/cmd/tail/Makefile
index d1e2eda..293920c 100644
--- a/usr/src/cmd/tail/Makefile
+++ b/usr/src/cmd/tail/Makefile
@@ -23,7 +23,7 @@ SRCS= $(OBJS:%.o=%.c)
include ../Makefile.cmd
CLOBBERFILES= $(PROG)
-
+CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
C99MODE= -xc99=%all
C99LMODE= -Xc99=%all
Should be sufficient, but I've barely tested it.
- Assignee set to Rich Lowe
- % Done changed from 0 to 30
- Tags deleted (
needs-triage)
- Status changed from New to Resolved
- % Done changed from 30 to 100
- Difficulty changed from Medium to Bite-size
Resolved in r13690 commit:db7ab359c5d7
Also available in: Atom
PDF