]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - gnu/usr.bin/diff/diff.c.diff
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / gnu / usr.bin / diff / diff.c.diff
1 $FreeBSD$
2 --- diff.c.orig 2004-04-12 15:44:35.000000000 +0800
3 +++ diff.c      2007-06-15 14:51:05.506679851 +0800
4 @@ -137,7 +137,7 @@
5  }
6  \f
7  static char const shortopts[] =
8 -"0123456789abBcC:dD:eEfF:hHiI:lL:nNpPqrsS:tTuU:vwW:x:X:y";
9 +"0123456789abBcC:dD:eEfF:hHiI:lL:nNopPqrsS:tTuU:vwW:x:X:y";
10  
11  /* Values for long options that do not have single-letter equivalents.  */
12  enum
13 @@ -265,14 +265,15 @@
14    initialize_main (&argc, &argv);
15    program_name = argv[0];
16    setlocale (LC_ALL, "");
17 -  bindtextdomain (PACKAGE, LOCALEDIR);
18    textdomain (PACKAGE);
19    c_stack_action (0);
20    function_regexp_list.buf = &function_regexp;
21    ignore_regexp_list.buf = &ignore_regexp;
22 -  re_set_syntax (RE_SYNTAX_GREP | RE_NO_POSIX_BACKTRACKING);
23 +  re_set_syntax (RE_SYNTAX_GREP);
24    excluded = new_exclude ();
25  
26 +  prepend_default_options (getenv ("DIFF_OPTIONS"), &argc, &argv);
27 +
28    /* Decode the options.  */
29  
30    while ((c = getopt_long (argc, argv, shortopts, longopts, 0)) != -1)
31 @@ -428,6 +429,11 @@
32           new_file = true;
33           break;
34  
35 +       case 'o':
36 +         /* Output in the old tradition style.  */
37 +         specify_style (OUTPUT_NORMAL);
38 +         break;
39 +
40         case 'p':
41           show_c_function = true;
42           add_regexp (&function_regexp_list, "^[[:alpha:]$_]");
43 @@ -983,8 +989,6 @@
44  {
45    if (output_style != style)
46      {
47 -      if (output_style != OUTPUT_UNSPECIFIED)
48 -       try_help ("conflicting output style options", 0);
49        output_style = style;
50      }
51  }
52 @@ -997,7 +1001,7 @@
53  #ifdef ST_MTIM_NSEC
54  
55  # if HAVE_CLOCK_GETTIME && defined CLOCK_REALTIME
56 -  if (clock_gettime (CLOCK_REALTIME, &st->st_mtim) == 0)
57 +  if (clock_gettime (CLOCK_REALTIME, &st->st_mtimespec) == 0)
58      return;
59  # endif
60  
61 @@ -1007,7 +1011,7 @@
62      if (gettimeofday (&timeval, 0) == 0)
63        {
64         st->st_mtime = timeval.tv_sec;
65 -       st->st_mtim.ST_MTIM_NSEC = timeval.tv_usec * 1000;
66 +       st->st_mtimespec.ST_MTIM_NSEC = timeval.tv_usec * 1000;
67         return;
68        }
69    }