From 00a193b8416aad2d42020b0475f76280ab4bce8f Mon Sep 17 00:00:00 2001 From: Neil Horman Date: Mon, 1 Mar 2010 16:24:48 +0000 Subject: [PATCH] Resolves: bz 569043 --- .cvsignore | 1 + cscope-15.6-incdir-overflow.patch | 99 ----------------------------- cscope-15.6-qrebuild.patch | 40 ------------ cscope-15.6-sigwinch-linemode.patch | 30 --------- cscope.spec | 15 ++--- sources | 2 +- 6 files changed, 8 insertions(+), 179 deletions(-) delete mode 100644 cscope-15.6-incdir-overflow.patch delete mode 100644 cscope-15.6-qrebuild.patch delete mode 100644 cscope-15.6-sigwinch-linemode.patch diff --git a/.cvsignore b/.cvsignore index f1ee227..a26f483 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,3 +1,4 @@ cscope-15.5.tar.gz cscope-15.5-inverted.patch cscope-15.6.tar.gz +cscope-15.7a.tar.bz2 diff --git a/cscope-15.6-incdir-overflow.patch b/cscope-15.6-incdir-overflow.patch deleted file mode 100644 index a2aae49..0000000 --- a/cscope-15.6-incdir-overflow.patch +++ /dev/null @@ -1,99 +0,0 @@ -diff -pruN cscope-15.6.orig/src/dir.c cscope-15.6/src/dir.c ---- cscope-15.6.orig/src/dir.c 2006-09-30 10:13:00.000000000 +0200 -+++ cscope-15.6/src/dir.c 2009-06-12 16:56:33.000000000 +0200 -@@ -129,7 +129,6 @@ sourcedir(char *dirlist) - /* parse the directory list */ - dir = strtok(dirlist, DIRSEPS); - while (dir != NULL) { -- int dir_len = strlen(dir); - - addsrcdir(dir); - -@@ -139,8 +138,7 @@ sourcedir(char *dirlist) - - /* compute its path from higher view path source dirs */ - for (i = 1; i < nvpsrcdirs; ++i) { -- sprintf(path, "%.*s/%s", -- PATHLEN - 2 - dir_len, -+ snprintf(path, PATHLEN, "%s/%s", - srcdirs[i], dir); - addsrcdir(path); - } -@@ -197,7 +195,6 @@ includedir(char *dirlist) - /* parse the directory list */ - dir = strtok(dirlist, DIRSEPS); - while (dir != NULL) { -- size_t dir_len = strlen(dir); - - addincdir(dir, dir); - -@@ -207,8 +204,7 @@ includedir(char *dirlist) - - /* compute its path from higher view path source dirs */ - for (i = 1; i < nvpsrcdirs; ++i) { -- sprintf(path, "%.*s/%s", -- PATHLEN - 2 - dir_len, -+ snprintf(path, PATHLEN, "%s/%s", - srcdirs[i], dir); - addincdir(dir, path); - } -@@ -480,9 +476,6 @@ static void - scan_dir(const char *adir, BOOL recurse_dir) - { - DIR *dirfile; -- int adir_len = strlen(adir); -- -- /* FIXME: no guards against adir_len > PATHLEN, yet */ - - if ((dirfile = opendir(adir)) != NULL) { - struct dirent *entry; -@@ -494,8 +487,7 @@ scan_dir(const char *adir, BOOL recurse_ - && (strcmp("..",entry->d_name) != 0)) { - struct stat buf; - -- sprintf(path,"%s/%.*s", adir, -- PATHLEN - 2 - adir_len, -+ snprintf(path, PATHLEN, "%s/%s", adir, - entry->d_name); - - if (lstat(path,&buf) == 0) { -@@ -599,20 +591,19 @@ incfile(char *file, char *type) - if (type[0] == '"' && (s = inviewpath(file)) != NULL) { - addsrcfile(s); - } else { -- size_t file_len = strlen(file); - - /* search for the file in the #include directory list */ - for (i = 0; i < nincdirs; ++i) { - /* don't include the file from two directories */ -- sprintf(name, "%.*s/%s", -- PATHLEN - 2 - file_len, incnames[i], -+ snprintf(name, PATHLEN, "%s/%s", -+ incnames[i], - file); - if (infilelist(name) == YES) { - break; - } - /* make sure it exists and is readable */ -- sprintf(path, "%.*s/%s", -- PATHLEN - 2 - file_len, incdirs[i], -+ snprintf(path, PATHLEN, "%s/%s", -+ incdirs[i], - file); - if (access(compath(path), READ) == 0) { - addsrcfile(path); -@@ -655,12 +646,11 @@ inviewpath(char *file) - /* if it isn't a full path name and there is a multi-directory - * view path */ - if (*file != '/' && vpndirs > 1) { -- int file_len = strlen(file); - - /* compute its path from higher view path source dirs */ - for (i = 1; i < nvpsrcdirs; ++i) { -- sprintf(path, "%.*s/%s", -- PATHLEN - 2 - file_len, srcdirs[i], -+ snprintf(path, PATHLEN, "%s/%s", -+ srcdirs[i], - file); - if (access(compath(path), READ) == 0) { - return(path); diff --git a/cscope-15.6-qrebuild.patch b/cscope-15.6-qrebuild.patch deleted file mode 100644 index 1900709..0000000 --- a/cscope-15.6-qrebuild.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff -up cscope-15.6/src/build.c.orig cscope-15.6/src/build.c ---- cscope-15.6/src/build.c.orig 2006-09-30 04:13:00.000000000 -0400 -+++ cscope-15.6/src/build.c 2008-07-08 11:28:53.000000000 -0400 -@@ -124,7 +124,7 @@ samelist(FILE *oldrefs, char **names, in - } - /* see if the name list is the same */ - for (i = 0; i < count; ++i) { -- if (! fgets(oldname, sizeof(oldname), oldrefs)|| -+ if ((1 != fscanf(oldrefs," %[^\n]",oldname)) || - strnotequal(oldname, names[i])) { - return(NO); - } -@@ -305,10 +305,11 @@ cscope: -q option mismatch between comma - /* see if the list of source files is the same and - none have been changed up to the included files */ - for (i = 0; i < nsrcfiles; ++i) { -- if (! fgets(oldname, sizeof(oldname), oldrefs) || -- strnotequal(oldname, srcfiles[i]) || -- lstat(srcfiles[i], &statstruct) != 0 || -- statstruct.st_mtime > reftime) { -+ if ((1 != fscanf(oldrefs," %[^\n]",oldname)) -+ || strnotequal(oldname, srcfiles[i]) -+ || (lstat(srcfiles[i], &statstruct) != 0) -+ || (statstruct.st_mtime > reftime) -+ ) { - goto outofdate; - } - } -@@ -338,8 +339,9 @@ cscope: converting to new symbol databas - scanpast('\t'); /* skip the header */ - oldfile = getoldfile(); - } else { /* force cross-referencing of all the source files */ -- force: reftime = 0; -- oldfile = NULL; -+ force: -+ reftime = 0; -+ oldfile = NULL; - } - /* open the new cross-reference file */ - if ((newrefs = myfopen(newreffile, "wb")) == NULL) { diff --git a/cscope-15.6-sigwinch-linemode.patch b/cscope-15.6-sigwinch-linemode.patch deleted file mode 100644 index 7508a32..0000000 --- a/cscope-15.6-sigwinch-linemode.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- cscope-15.6/src/main.c.orig 2007-05-25 10:11:02.000000000 -0400 -+++ cscope-15.6/src/main.c 2007-05-25 10:12:43.000000000 -0400 -@@ -153,12 +153,7 @@ - yyout = stdout; - /* save the command name for messages */ - argv0 = argv[0]; --#if defined(KEY_RESIZE) && !defined(__DJGPP__) -- winch_action.sa_sigaction = sigwinch_handler; -- sigemptyset(&winch_action.sa_mask); -- winch_action.sa_flags = SA_SIGINFO; -- sigaction(SIGWINCH,&winch_action,NULL); --#endif -+ - /* set the options */ - while (--argc > 0 && (*++argv)[0] == '-') { - /* HBB 20030814: add GNU-style --help and --version options */ -@@ -400,6 +395,13 @@ - } - - if (linemode == NO) { -+ -+#if defined(KEY_RESIZE) && !defined(__DJGPP__) -+ winch_action.sa_sigaction = sigwinch_handler; -+ sigemptyset(&winch_action.sa_mask); -+ winch_action.sa_flags = SA_SIGINFO; -+ sigaction(SIGWINCH,&winch_action,NULL); -+#endif - signal(SIGINT, SIG_IGN); /* ignore interrupts */ - signal(SIGPIPE, SIG_IGN);/* | command can cause pipe signal */ - diff --git a/cscope.spec b/cscope.spec index 9da795b..ff55c1e 100644 --- a/cscope.spec +++ b/cscope.spec @@ -1,8 +1,8 @@ Summary: C source code tree search and browse tool Name: cscope -Version: 15.6 -Release: 5%{?dist} -Source0: http://unc.dl.sourceforge.net/sourceforge/cscope/cscope-15.6.tar.gz +Version: 15.7a +Release: 1%{?dist} +Source0: http://unc.dl.sourceforge.net/sourceforge/cscope/cscope-15.7a.tar.bz2 URL: http://cscope.sourceforge.net License: BSD Group: Development/Tools @@ -16,9 +16,6 @@ BuildRequires: pkgconfig ncurses-devel flex bison m4 Patch0:cscope-15.6-findassign.patch Patch1:cscope-15.6-ocs.patch Patch2:cscope-15.6-xcscope-man.patch -Patch3:cscope-15.6-sigwinch-linemode.patch -Patch4:cscope-15.6-qrebuild.patch -Patch5:cscope-15.6-incdir-overflow.patch %description cscope is a mature, ncurses based, C source code tree browsing tool. It @@ -32,9 +29,6 @@ matches for use in file editing. %patch0 -p1 %patch1 -p1 %patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 %build %configure @@ -83,6 +77,9 @@ rm -f %{xemacs_lisp_path}/xcscope.el rm -f %{emacs_lisp_path}/xcscope.el %changelog +* Mon Mar 1 2010 Neil Horman - 15.7a-1 +- Update to latest upstream release (bz 569043) + * Fri Jul 24 2009 Fedora Release Engineering - 15.6-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild diff --git a/sources b/sources index 8b85cb7..d6fea78 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -db87833f90d8267b1fc0c419cfc4d219 cscope-15.6.tar.gz +da43987622ace8c36bbf14c15a350ec1 cscope-15.7a.tar.bz2