diff options
| author | Jérémie Koenig <jk@jk.fr.eu.org> | 2010-03-26 19:08:53 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-03-26 19:08:53 +0100 |
| commit | fbedacfc8caa1ec8f14e664a881cb0a93c8f8712 (patch) | |
| tree | 6c08780bbaad6320149930bdbcfbee5a2eed9f5d /scripts/kconfig | |
| parent | 35fdb1bc9cb82fa5630c2d40ae49110ecd7c88ea (diff) | |
| download | busybox-w32-fbedacfc8caa1ec8f14e664a881cb0a93c8f8712.tar.gz busybox-w32-fbedacfc8caa1ec8f14e664a881cb0a93c8f8712.tar.bz2 busybox-w32-fbedacfc8caa1ec8f14e664a881cb0a93c8f8712.zip | |
Hurd compat fixes. Mostly dealing with absent PATH_MAX
Signed-off-by: Jérémie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'scripts/kconfig')
| -rw-r--r-- | scripts/kconfig/confdata.c | 3 | ||||
| -rw-r--r-- | scripts/kconfig/mconf.c | 2 | ||||
| -rw-r--r-- | scripts/kconfig/zconf.l | 3 | ||||
| -rw-r--r-- | scripts/kconfig/zconf.y | 6 |
4 files changed, 9 insertions, 5 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 9365a12c2..4f83fbfa2 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c | |||
| @@ -70,12 +70,13 @@ static char *conf_expand_value(const char *in) | |||
| 70 | char *conf_get_default_confname(void) | 70 | char *conf_get_default_confname(void) |
| 71 | { | 71 | { |
| 72 | struct stat buf; | 72 | struct stat buf; |
| 73 | static char fullname[PATH_MAX+1]; | 73 | static char *fullname = NULL; |
| 74 | char *env, *name; | 74 | char *env, *name; |
| 75 | 75 | ||
| 76 | name = conf_expand_value(conf_defname); | 76 | name = conf_expand_value(conf_defname); |
| 77 | env = getenv(SRCTREE); | 77 | env = getenv(SRCTREE); |
| 78 | if (env) { | 78 | if (env) { |
| 79 | fullname = realloc(fullname, strlen(env) + strlen(name) + 2); | ||
| 79 | sprintf(fullname, "%s/%s", env, name); | 80 | sprintf(fullname, "%s/%s", env, name); |
| 80 | if (!stat(fullname, &buf)) | 81 | if (!stat(fullname, &buf)) |
| 81 | return fullname; | 82 | return fullname; |
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index 647ec09f1..0c548bfc0 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c | |||
| @@ -258,7 +258,7 @@ search_help[] = N_( | |||
| 258 | 258 | ||
| 259 | static char buf[4096], *bufptr = buf; | 259 | static char buf[4096], *bufptr = buf; |
| 260 | static char input_buf[4096]; | 260 | static char input_buf[4096]; |
| 261 | static char filename[PATH_MAX+1] = ".config"; | 261 | static const char filename[] = ".config"; |
| 262 | static char *args[1024], **argptr = args; | 262 | static char *args[1024], **argptr = args; |
| 263 | static int indent; | 263 | static int indent; |
| 264 | static struct termios ios_org; | 264 | static struct termios ios_org; |
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index d839577ca..6a58b80d3 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l | |||
| @@ -265,13 +265,14 @@ static void zconf_endhelp(void) | |||
| 265 | */ | 265 | */ |
| 266 | FILE *zconf_fopen(const char *name) | 266 | FILE *zconf_fopen(const char *name) |
| 267 | { | 267 | { |
| 268 | char *env, fullname[PATH_MAX+1]; | 268 | char *env; |
| 269 | FILE *f; | 269 | FILE *f; |
| 270 | 270 | ||
| 271 | f = fopen(name, "r"); | 271 | f = fopen(name, "r"); |
| 272 | if (!f && name[0] != '/') { | 272 | if (!f && name[0] != '/') { |
| 273 | env = getenv(SRCTREE); | 273 | env = getenv(SRCTREE); |
| 274 | if (env) { | 274 | if (env) { |
| 275 | char *fullname = alloca(strlen(env) + strlen(name) + 2); | ||
| 275 | sprintf(fullname, "%s/%s", env, name); | 276 | sprintf(fullname, "%s/%s", env, name); |
| 276 | f = fopen(fullname, "r"); | 277 | f = fopen(fullname, "r"); |
| 277 | } | 278 | } |
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y index 0a7a79664..2007a4e02 100644 --- a/scripts/kconfig/zconf.y +++ b/scripts/kconfig/zconf.y | |||
| @@ -14,8 +14,6 @@ | |||
| 14 | #define LKC_DIRECT_LINK | 14 | #define LKC_DIRECT_LINK |
| 15 | #include "lkc.h" | 15 | #include "lkc.h" |
| 16 | 16 | ||
| 17 | #include "zconf.hash.c" | ||
| 18 | |||
| 19 | #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) | 17 | #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) |
| 20 | 18 | ||
| 21 | #define PRINTD 0x0001 | 19 | #define PRINTD 0x0001 |
| @@ -99,6 +97,10 @@ static struct menu *current_menu, *current_entry; | |||
| 99 | menu_end_menu(); | 97 | menu_end_menu(); |
| 100 | } if_entry menu_entry choice_entry | 98 | } if_entry menu_entry choice_entry |
| 101 | 99 | ||
| 100 | %{ | ||
| 101 | #include "zconf.hash.c" | ||
| 102 | %} | ||
| 103 | |||
| 102 | %% | 104 | %% |
| 103 | input: stmt_list; | 105 | input: stmt_list; |
| 104 | 106 | ||
