From owner-svn-src-all@FreeBSD.ORG Fri Aug 17 18:20:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7B16106564A; Fri, 17 Aug 2012 18:20:38 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1C208FC08; Fri, 17 Aug 2012 18:20:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7HIKcHI005984; Fri, 17 Aug 2012 18:20:38 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7HIKcoX005980; Fri, 17 Aug 2012 18:20:38 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201208171820.q7HIKcoX005980@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 17 Aug 2012 18:20:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239360 - in head: contrib/diff/src gnu/usr.bin/diff X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2012 18:20:38 -0000 Author: obrien Date: Fri Aug 17 18:20:38 2012 New Revision: 239360 URL: http://svn.freebsd.org/changeset/base/239360 Log: Catch up with the subversion conversion and apply these build-time patches. Deleted: head/gnu/usr.bin/diff/context.c.diff head/gnu/usr.bin/diff/diff.c.diff Modified: head/contrib/diff/src/context.c head/contrib/diff/src/diff.c head/gnu/usr.bin/diff/Makefile Modified: head/contrib/diff/src/context.c ============================================================================== --- head/contrib/diff/src/context.c Fri Aug 17 17:45:27 2012 (r239359) +++ head/contrib/diff/src/context.c Fri Aug 17 18:20:38 2012 (r239360) @@ -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,12 +57,12 @@ print_context_label (char const *mark, 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_mtim); if (! (tm && nstrftime (buf, sizeof buf, time_format, tm, 0, nsec))) { - long int sec = inf->stat.st_mtime; + time_t sec = inf->stat.st_mtime; verify (info_preserved, sizeof inf->stat.st_mtime <= sizeof sec); - sprintf (buf, "%ld.%.9d", sec, nsec); + sprintf (buf, "%jd.%.9d", (intmax_t)sec, nsec); } fprintf (outfile, "%s %s\t%s\n", mark, inf->name, buf); } Modified: head/contrib/diff/src/diff.c ============================================================================== --- head/contrib/diff/src/diff.c Fri Aug 17 17:45:27 2012 (r239359) +++ head/contrib/diff/src/diff.c Fri Aug 17 18:20:38 2012 (r239360) @@ -137,7 +137,7 @@ exclude_options (void) } static char const shortopts[] = -"0123456789abBcC:dD:eEfF:hHiI:lL:nNpPqrsS:tTuU:vwW:x:X:y"; +"0123456789abBcC:dD:eEfF:hHiI:lL:nNopPqrsS:tTuU:vwW:x:X:y"; /* Values for long options that do not have single-letter equivalents. */ enum @@ -265,14 +265,15 @@ main (int argc, char **argv) initialize_main (&argc, &argv); program_name = argv[0]; setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); c_stack_action (0); function_regexp_list.buf = &function_regexp; ignore_regexp_list.buf = &ignore_regexp; - re_set_syntax (RE_SYNTAX_GREP | RE_NO_POSIX_BACKTRACKING); + re_set_syntax (RE_SYNTAX_GREP); excluded = new_exclude (); + prepend_default_options (getenv ("DIFF_OPTIONS"), &argc, &argv); + /* Decode the options. */ while ((c = getopt_long (argc, argv, shortopts, longopts, 0)) != -1) @@ -428,6 +429,11 @@ main (int argc, char **argv) new_file = true; break; + case 'o': + /* Output in the old tradition style. */ + specify_style (OUTPUT_NORMAL); + break; + case 'p': show_c_function = true; add_regexp (&function_regexp_list, "^[[:alpha:]$_]"); @@ -983,8 +989,6 @@ specify_style (enum output_style style) { if (output_style != style) { - if (output_style != OUTPUT_UNSPECIFIED) - try_help ("conflicting output style options", 0); output_style = style; } } Modified: head/gnu/usr.bin/diff/Makefile ============================================================================== --- head/gnu/usr.bin/diff/Makefile Fri Aug 17 17:45:27 2012 (r239359) +++ head/gnu/usr.bin/diff/Makefile Fri Aug 17 18:20:38 2012 (r239360) @@ -27,10 +27,4 @@ SUBDIR+=doc DPADD= ${LIBGNUREGEX} LDADD= -lgnuregex -.for f in diff.c context.c -${f}: ${DIFFSRC}/${f} ${.CURDIR}/${f}.diff - patch -s -o ${.TARGET} < ${.CURDIR}/${f}.diff ${DIFFSRC}/${f} -CLEANFILES+= ${f} -.endfor - .include