[gedit-list] Problem with diff plugin on Solaris



Gedit Team:

On Solaris the diff plugin does not work (it just does nothing), unless you
have the GNU diffutils version of diff installed.

In the plugins/diff/diff.c, the following are lines 170-175:

		argv[0] = "diff";
		argv[1] = "-u";
		argv[2] = file_name_1;
		argv[3] = file_name_2;
		argv[4] = NULL;
		execv (program_location, argv);

This only works if the "diff" is the GNU diffutils version of diff, which
accedts the "-u" (unified output) argument.  /usr/bin/diff is the version of
diff provided with Solaris, and it returns the following when I try and enter
"diff -u":

  $ diff -u
  diff: illegal option -- u
  usage: diff [-bitw] [-c | -e | -f | -h | -n] file1 file2
       diff [-bitw] [-C number] file1 file2
       diff [-bitw] [-D string] file1 file2
       diff [-bitw] [-c | -e | -f | -h | -n] [-l] [-r] [-s] [-S name] directory1 
  directory2

Since unified output is nice, it would be nice if the gedit configure script
could check whether the available diff is the GNU diffutils version of diff. 
If not, then the "-u" option should be replaced with "-c" (context format)
which works on all flavors of diff.

Please cc: me on any response since I am not on this list.

Thanks!

Brian





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]