[PATCH 2/7] update scripts/kconfig/*_shipped

Denys Vlasenko vda.linux at googlemail.com
Mon Aug 2 00:18:25 UTC 2010


On Sunday 01 August 2010 06:18, Jeremie Koenig wrote:
> On Sun, Aug 01, 2010 at 01:10:22AM +0200, Denys Vlasenko wrote:
> > On Friday 30 July 2010 22:18, Jeremie Koenig wrote:
> > > One of my patches was blocked because of its size and didn't make it to
> > > the list. The attached gzipped version should go through without
> > > problems I think.
> > 
> > You need to explain what this patch fixes.
> 
> Commit fbedacfc8 modified scripts/kconfig/zconf.y and zconf.l to deal
> with the absence of PATH_MAX on Hurd. When LKC_GENPARSER is defined on
> the make command line, those are used to generate lex.zconf.c and
> zconf.tab.c. 
> 
> However, the "_shipped" version of these .c files are usually used
> instead of generating them, to allow users to compile without bison,
> flex or gperf installed.
> 
> This patch updates the "_shipped" files generated from the new .y and .l
> files, using recent versions of bison, flex and gperf. I also removed
> the trailing whitespace from the generated files.
> 
> So this patch basically "activates" the fix from fbedacfc8.

Well, the patch contains much more changes, which are difficult to check.
I looked at the changes in fbedacfc8 and it looks like corresponding
fix to _shipped files is just:

--- a/scripts/kconfig/lex.zconf.c_shipped
+++ b/scripts/kconfig/lex.zconf.c_shipped
@@ -265,13 +265,14 @@ static void zconf_endhelp(void)
  */
 FILE *zconf_fopen(const char *name)
 {
-       char *env, fullname[PATH_MAX+1];
+       char *env;
        FILE *f;
 
        f = fopen(name, "r");
        if (!f && name[0] != '/') {
                env = getenv(SRCTREE);
                if (env) {
+                       char *fullname = alloca(strlen(env) + strlen(name) + 2);
                        sprintf(fullname, "%s/%s", env, name);
                        f = fopen(fullname, "r");
                }

I applied the above patch to git. Does it work for you now?
-- 
vda


More information about the busybox mailing list