head 1.4; access; symbols pkgsrc-2013Q2:1.4.0.32 pkgsrc-2013Q2-base:1.4 pkgsrc-2012Q4:1.4.0.30 pkgsrc-2012Q4-base:1.4 pkgsrc-2011Q4:1.4.0.28 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q2:1.4.0.26 pkgsrc-2011Q2-base:1.4 pkgsrc-2009Q4:1.4.0.24 pkgsrc-2009Q4-base:1.4 pkgsrc-2008Q4:1.4.0.22 pkgsrc-2008Q4-base:1.4 pkgsrc-2008Q3:1.4.0.20 pkgsrc-2008Q3-base:1.4 cube-native-xorg:1.4.0.18 cube-native-xorg-base:1.4 pkgsrc-2008Q2:1.4.0.16 pkgsrc-2008Q2-base:1.4 pkgsrc-2008Q1:1.4.0.14 pkgsrc-2008Q1-base:1.4 pkgsrc-2007Q4:1.4.0.12 pkgsrc-2007Q4-base:1.4 pkgsrc-2007Q3:1.4.0.10 pkgsrc-2007Q3-base:1.4 pkgsrc-2007Q2:1.4.0.8 pkgsrc-2007Q2-base:1.4 pkgsrc-2007Q1:1.4.0.6 pkgsrc-2007Q1-base:1.4 pkgsrc-2006Q4:1.4.0.4 pkgsrc-2006Q4-base:1.4 pkgsrc-2006Q3:1.4.0.2 pkgsrc-2006Q3-base:1.4 pkgsrc-2006Q2:1.2.0.30 pkgsrc-2006Q2-base:1.2 pkgsrc-2006Q1:1.2.0.28 pkgsrc-2006Q1-base:1.2 pkgsrc-2005Q4:1.2.0.26 pkgsrc-2005Q4-base:1.2 pkgsrc-2005Q3:1.2.0.24 pkgsrc-2005Q3-base:1.2 pkgsrc-2005Q2:1.2.0.22 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.2.0.20 pkgsrc-2005Q1-base:1.2 pkgsrc-2004Q4:1.2.0.18 pkgsrc-2004Q4-base:1.2 pkgsrc-2004Q3:1.2.0.16 pkgsrc-2004Q3-base:1.2 pkgsrc-2004Q2:1.2.0.14 pkgsrc-2004Q2-base:1.2 pkgsrc-2004Q1:1.2.0.12 pkgsrc-2004Q1-base:1.2 pkgsrc-2003Q4:1.2.0.10 pkgsrc-2003Q4-base:1.2 netbsd-1-6-1:1.2.0.6 netbsd-1-6-1-base:1.2 netbsd-1-6:1.2.0.8 netbsd-1-6-RELEASE-base:1.2 pkgviews:1.2.0.4 pkgviews-base:1.2 buildlink2:1.2.0.2 buildlink2-base:1.2 netbsd-1-5-PATCH003:1.2 netbsd-1-5-PATCH001:1.1 netbsd-1-5-RELEASE:1.1 netbsd-1-4-PATCH003:1.1 netbsd-1-4-PATCH002:1.1 comdex-fall-1999:1.1; locks; strict; comment @# @; 1.4 date 2006.08.05.19.54.26; author wiz; state dead; branches; next 1.3; 1.3 date 2006.08.04.19.23.39; author christos; state Exp; branches; next 1.2; 1.2 date 2002.02.27.09.07.43; author joda; state Exp; branches; next 1.1; 1.1 date 99.09.25.04.06.42; author mrg; state Exp; branches; next ; desc @@ 1.4 log @Complete move of id-utils to its new home, idutils. @ text @$NetBSD: patch-ab,v 1.3 2006/08/04 19:23:39 christos Exp $ --- libidu/idfile.h.orig 2005-11-01 04:18:33.000000000 -0500 +++ libidu/idfile.h 2006-08-03 13:00:35.159831999 -0400 @@@@ -147,7 +147,7 @@@@ #define token_string(buf) (buf) extern unsigned int token_flags (char const *buf); -extern unsigned short token_count (char const *buf); +extern unsigned int token_count (char const *buf); extern unsigned char const *token_hits_addr (char const *buf); #define MAYBE_RETURN_PREFIX_MATCH(arg, str, val) do { \ @ 1.3 log @welcome to idutils-4.1 @ text @d1 1 a1 1 $NetBSD$ @ 1.2 log @get rid of the last few evil calls to alloca; this fixes some stack overflow segfaults @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.1 1999/09/25 04:06:42 mrg Exp $ d3 3 a5 7 --- libidu/walker.c.orig Wed Jul 17 22:43:41 1996 +++ libidu/walker.c Wed Feb 27 09:57:28 2002 @@@@ -33,7 +33,6 @@@@ #include "dynvec.h" #include "scanners.h" #include "pathmax.h" -#include "xalloca.h" d7 5 a11 13 int walk_dir __P((struct file_link *dir_link)); struct member_file *get_member_file __P((struct file_link *flink)); @@@@ -98,7 +97,7 @@@@ dirp = opendir ("."); if (dirp == 0) { - char *file_name = ALLOCA (char, PATH_MAX); + char file_name[PATH_MAX]; absolute_file_name (file_name, dir_link); error (0, errno, _("can't read directory `%s' (`.' from `%s')"), file_name, xgetcwd ()); return 0; @@@@ -116,6 +115,8 @@@@ continue; d13 1 a13 75 flink = get_link_from_dirent (dirent, dir_link); + if (flink == 0) + break; if (!(flink->fl_flags & FL_PRUNE)) walk_flink (flink, sub_dirs_vec); } @@@@ -165,7 +166,7 @@@@ if ((old_flags & FL_TYPE_MASK) && (old_flags & FL_TYPE_MASK) != (new_flags & FL_TYPE_MASK)) { - char *file_name = ALLOCA (char, PATH_MAX); + char file_name[PATH_MAX]; absolute_file_name (file_name, flink); error (0, 0, _("notice: `%s' was a %s, but is now a %s!"), file_name, (FL_IS_FILE (old_flags) ? _("file") : _("directory")), @@@@ -284,8 +285,8 @@@@ int alias_ancestry = symlink_ancestry (alias_link); if (member->mf_lang_args != alias_member->mf_lang_args) { - char *file_name = ALLOCA (char, PATH_MAX); - char *alias_file_name = ALLOCA (char, PATH_MAX); + char file_name[PATH_MAX]; + char alias_file_name[PATH_MAX]; absolute_file_name (file_name, flink); absolute_file_name (alias_file_name, alias_link); error (0, 0, _("warning: `%s' and `%s' are the same file, but yield different scans!"), @@@@ -380,7 +381,7 @@@@ #if 0 if (member->mf_lang_args != args) { - char *file_name = ALLOCA (char, PATH_MAX); + char file_name[PATH_MAX]; absolute_file_name (file_name, flink); error (0, 0, _("notice: scan parameters changed for `%s'"), file_name); member->mf_old_index = -1; @@@@ -418,7 +419,7 @@@@ { if (strchr (args->la_pattern, SLASH_CHAR)) { - char *file_name = ALLOCA (char, PATH_MAX); + char file_name[PATH_MAX]; absolute_file_name (file_name, flink); if (fnmatch (args->la_pattern, file_name, MAYBE_FNM_CASEFOLD | FNM_FILE_NAME) == 0) return (args->la_language ? args : 0); @@@@ -622,7 +623,7 @@@@ int chdir_to_link (struct file_link *dir_link) { - char *to_dir_name = ALLOCA (char, PATH_MAX); + char to_dir_name[PATH_MAX]; if (current_dir_link == dir_link) return 1; @@@@ -637,7 +638,7 @@@@ error (0, errno, _("can't chdir to `%s'"), to_dir_name); else { - char *from_dir_name = ALLOCA (char, PATH_MAX); + char from_dir_name[PATH_MAX]; absolute_file_name (from_dir_name, current_dir_link); error (0, errno, _("can't chdir to `%s' from `%s'"), to_dir_name, from_dir_name); } @@@@ -811,8 +812,10 @@@@ char * maybe_relative_file_name (char *buf_0, struct file_link const *to_link, struct file_link const *from_link) { - struct file_link const **to_link_vec_0 = ALLOCA (struct file_link const *, PATH_MAX/2); - struct file_link const **from_link_vec_0 = ALLOCA (struct file_link const *, PATH_MAX/2); + struct file_link const *to_link_vec_1[PATH_MAX/2]; + struct file_link const *from_link_vec_1[PATH_MAX/2]; + struct file_link const **to_link_vec_0 = to_link_vec_1; + struct file_link const **from_link_vec_0 = from_link_vec_1; struct file_link const **to_link_vec = to_link_vec_0; struct file_link const **from_link_vec = from_link_vec_0; struct file_link const **from_link_end; @ 1.1 log @fix a SEGV here; don't use null pointers... XXX this may not be a "correct and valid" fix; i get this feeling that "this [flink == NULL] shouldn't happen" ever and that this is also the symptom of another bug. this change does allow `mkid' to complete over my NetBSD /usr/src now, something that it hasn't done for several months. @ text @d1 1 a1 1 $NetBSD$ d3 20 a22 3 --- libidu/walker.c.orig Thu Jul 18 06:43:41 1996 +++ libidu/walker.c Sat Sep 25 13:36:51 1999 @@@@ -116,6 +116,8 @@@@ d31 69 @