00b0d75796
- Add two patches, to avoid error: incompatible types when assigning to type '__off_t' from type 'fpos_t' fp_->_offset = u.f; - Remove one patch patch-af, which had a comment, not necessary for now " also look in *.mk files as makefiles. bump pkg revision." (upstream) - Update 4.2 to 4.6 ---------------------- * Noteworthy changes in release 4.6 (2012-02-03) [stable] ** Bug fixes - lid -L no longer mishandles open-ended ranges like "..2" and "2.." - lid's -d, -o and -x options now work properly * Noteworthy changes in release 4.5 (2010-06-17) [stable] * Noteworthy changes in release 4.4 (2009-10-30) [beta] ------------ ** New features mkid and xtokid accept a new option --files0-from=FILE, to make them process only the files named in FILE. FILE must contain a list of NUL-terminated file names. ** Bug fixes mkid and xtokid now accept language specific options via the command line. * Noteworthy changes in release 4.3.92 (2008-10-18) [beta] -------------- ** Bug fixes fid: avoid a buffer overrun handle failed allocation, e.g., by strdup avoid potential realloc overflow mkid: avoid an infloop on some .el files all programs: detect write error on stdout ** Miscellaneous improvements revamp code and infrastructure, bringing it closer to coreutils' standards add automatically-generated man pages mkid recognize more suffixes: .ac, .mk, .bz2, .lzma. idutils is now licensed under the General Public License version 3 or later (GPLv3+).
48 lines
1.4 KiB
Text
48 lines
1.4 KiB
Text
$NetBSD: patch-ak,v 1.4 2014/12/15 11:35:42 mef Exp $
|
|
|
|
--- src/mkid.c.orig 2012-01-31 21:22:05.000000000 +0900
|
|
+++ src/mkid.c 2014-11-20 23:17:41.000000000 +0900
|
|
@@ -28,7 +28,6 @@
|
|
#include <sys/stat.h>
|
|
#include <limits.h>
|
|
|
|
-#include "alloca.h"
|
|
#include "argv-iter.h"
|
|
#include "closeout.h"
|
|
#include "dirname.h"
|
|
@@ -484,11 +483,21 @@ assert_writeable (char const *filename)
|
|
{
|
|
if (errno == ENOENT)
|
|
{
|
|
- char *dirname = dir_name (filename);
|
|
- if (access (dirname, 06) < 0)
|
|
- error (EXIT_FAILURE, errno, _("can't create `%s' in `%s'"),
|
|
- base_name (filename), dirname);
|
|
- free(dirname);
|
|
+ char *dir_copy, *dir_name = strrchr (filename, '/');
|
|
+ if (dir_name)
|
|
+ {
|
|
+ while (*--dir_name == '/')
|
|
+ continue;
|
|
+ dir_name++;
|
|
+ dir_copy = strdup(filename);
|
|
+ dir_copy[dir_name - filename] = '\0';
|
|
+ }
|
|
+ else
|
|
+ dir_copy = strdup(".");
|
|
+ if (access (dir_copy, 06) < 0)
|
|
+ error (1, errno, _("can't create `%s' in `%s'"),
|
|
+ base_name (filename), dir_copy);
|
|
+ free(dir_copy);
|
|
}
|
|
else
|
|
error (EXIT_FAILURE, errno, _("can't modify `%s'"), filename);
|
|
@@ -562,7 +571,7 @@ scan_member_file (struct member_file con
|
|
source_FILE = fopen (flink->fl_name, "r");
|
|
if (source_FILE)
|
|
{
|
|
- char *file_name = alloca (PATH_MAX);
|
|
+ char file_name[PATH_MAX];
|
|
if (statistics_flag)
|
|
{
|
|
if (fstat (fileno (source_FILE), &st) < 0)
|