Project

General

Profile

Bug #2717

tail is not largefile aware

Added by Rich Lowe over 8 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
2012-05-11
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

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?

#1

Updated by Rich Lowe over 8 years ago

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.

#2

Updated by Rich Lowe over 8 years ago

  • Assignee set to Rich Lowe
  • % Done changed from 0 to 30
  • Tags deleted (needs-triage)
#3

Updated by Rich Lowe over 8 years ago

  • 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