patchgrep - Patches: patch #3832, fix savedir issue for gnulib import

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

patch #3832: fix savedir issue for gnulib import

Submitted by:  Claudio Fontana <sick_soul>
Submitted on:  Wed 16 Mar 2005 01:14:42 AM UTC  
 
Category: NonePriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open

Mon 21 Mar 2005 08:56:54 AM UTC, comment #4:

I trusted the current code too much.
The more portable code is in the .2.patch then.

Claudio Fontana <sick_soul>
Mon 21 Mar 2005 06:37:40 AM UTC, comment #3:

You were better off omitting the size parameter, and staying
compatible with gnulib. That is because POSIX says that the value
of st_size is undefined for directories, and we've encountered
hosts where st_size is effectively garbage. If you try to invoke
malloc with a garbage argument, you're likely to allocate wayyyy
too much storage and break your program one way or another.

So I would stick with the gnulib approach here.

Paul Eggert <eggert>
Sun 20 Mar 2005 03:28:58 PM UTC, comment #2:

reverted to include the size parameter again, because it makes a lot of sense, and effectively use it instead of NAME_SIZE_DEFAULT.

Claudio Fontana <sick_soul>
Sun 20 Mar 2005 10:36:16 AM UTC, comment #1:

patch modified to eliminate the size parameter (the newest savedir() from gnulib does not need it anymore).

Claudio Fontana <sick_soul>
Wed 16 Mar 2005 01:14:42 AM UTC, original submission:

This patch addresses a problem with current lib/savedir.c, where the changes to savedir prototype and functionality from gnulib savedir would be overwritten by a gnulib import, breaking grep.

New files: src/savedir_exclude.c|h , built adapting the newest savedir() from gnulib with grep prototype and functionality.

Changes:
src/grep.c : call savedir_exclude instead of savedir
src/Makefile.am : add new files to build process

Apply from srcdir using patch -p1

Claudio Fontana <sick_soul>

 

Attached Files
file #8590:  fix_savedir_exclude.p1.3.patch added by sick_soul (8kB - text/x-patch - reverted to include name_size parameter, and effectively use it instead of NAME_SIZE_DEFAULT)
file #8588:  fix_savedir_exclude.p1.2.patch added by sick_soul (8kB - text/x-patch - better version of the patch that removes unneeded parameter)
file #8582:  fix_savedir_exclude.p1.patch added by sick_soul (8kB - text/x-patch - p1 patch that fixes the savedir + gnulib import issue)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter 421 here (basic anti-spam test):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sun 20 Mar 2005 03:28:58 PM UTCsick_soulAttached File-=>Added fix_savedir_exclude.p1.3.patch, #4366
Sun 20 Mar 2005 10:36:17 AM UTCsick_soulAttached File-=>Added fix_savedir_exclude.p1.2.patch, #4364
Wed 16 Mar 2005 01:14:42 AM UTCsick_soulAttached File-=>Added fix_savedir_exclude.p1.patch, #4354
Show feedback again

Back to the top


Powered by Savane 3.1-cleanup