Skip to content

Commit

Permalink
Update build skeleton after diffutils 2.8.7 update.
Browse files Browse the repository at this point in the history
  • Loading branch information
delphij committed Jun 15, 2007
1 parent 3070b40 commit b6ee682
Show file tree
Hide file tree
Showing 11 changed files with 164 additions and 937 deletions.
24 changes: 19 additions & 5 deletions gnu/usr.bin/diff/Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
# $FreeBSD$

.PATH: ${.CURDIR}/../../../contrib/diff
DIFFSRC=${.CURDIR}/../../../contrib/diff/src
.PATH: ${DIFFSRC} \
${.CURDIR}/../../../contrib/diff/lib \
${.CURDIR}/../../../contrib/diff/man

PROG= diff
SRCS= analyze.c cmpbuf.c context.c diff.c dir.c ed.c \
ifdef.c io.c normal.c prepend_args.c side.c util.c version.c
SRCS= analyze.c context.c diff.c dir.c ed.c ifdef.c io.c \
normal.c side.c util.c \
xmalloc.c strtoumax.c cmpbuf.c exitfail.c error.c quotesys.c \
strftime.c c-stack.c basename.c exclude.c hard-locale.c \
file-type.c posixver.c prepargs.c version-etc.c

# Important for ctype macros!
CFLAGS+=-funsigned-char

CFLAGS+=-I${.CURDIR}/../../../contrib/diff \
-I${DESTDIR}/usr/include/gnu
CFLAGS+=-I${DESTDIR}/usr/include/gnu
CFLAGS+=-I${.CURDIR}/../../../contrib/diff
CFLAGS+=-I${.CURDIR}/../../../contrib/diff/src
CFLAGS+=-I${.CURDIR}/../../../contrib/diff/lib
CFLAGS+=-DHAVE_CONFIG_H
CFLAGS+=-DPR_PROGRAM=\"/usr/bin/pr\"

Expand All @@ -19,4 +27,10 @@ SUBDIR+=doc
DPADD= ${LIBGNUREGEX}
LDADD= -lgnuregex

.for f in diff.c context.c
${f}: ${DIFFSRC}/${f} ${.CURDIR}/${f}.diff
patch -s -b .orig -o ${.TARGET} < ${.CURDIR}/${f}.diff ${DIFFSRC}/${f}
CLEANFILES+= ${f}
.endfor

.include <bsd.prog.mk>
21 changes: 21 additions & 0 deletions gnu/usr.bin/diff/context.c.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
$FreeBSD$
--- context.c.orig 2004-04-12 15:44:35.000000000 +0800
+++ context.c 2007-06-15 14:51:05.497679903 +0800
@@ -29,7 +29,7 @@
# define TIMESPEC_NS(timespec) 0
#endif

-size_t nstrftime (char *, size_t, char const *, struct tm const *, int, int);
+size_t nstrftime (char *, size_t, char const *, struct tm const *, int, long);

static char const *find_function (char const * const *, lin);
static struct change *find_hunk (struct change *);
@@ -57,7 +57,7 @@
char buf[MAX (INT_STRLEN_BOUND (int) + 32,
INT_STRLEN_BOUND (time_t) + 11)];
struct tm const *tm = localtime (&inf->stat.st_mtime);
- int nsec = TIMESPEC_NS (inf->stat.st_mtim);
+ long nsec = TIMESPEC_NS (inf->stat.st_mtimespec);
if (! (tm && nstrftime (buf, sizeof buf, time_format, tm, 0, nsec)))
{
long int sec = inf->stat.st_mtime;
Loading

0 comments on commit b6ee682

Please sign in to comment.