diff options
author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-02-25 04:03:33 +0000 |
---|---|---|
committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-02-25 04:03:33 +0000 |
commit | cb6a88484ce0b5ffba2fe98a40e2d51f4af92eb8 (patch) | |
tree | 520f8e8d113184cfa7954ebd274564b8c255fa9a /extra | |
parent | e4461be66e2655058aef358b00050bc70ac72861 (diff) | |
download | uClibc-alpine-cb6a88484ce0b5ffba2fe98a40e2d51f4af92eb8.tar.bz2 uClibc-alpine-cb6a88484ce0b5ffba2fe98a40e2d51f4af92eb8.tar.xz |
Merge from trunk. Going pretty good so far. Kind of. Okay, not really.
Diffstat (limited to 'extra')
-rw-r--r-- | extra/config/conf.c | 26 | ||||
-rw-r--r-- | extra/config/confdata.c | 59 | ||||
-rw-r--r-- | extra/config/lkc.h | 18 | ||||
-rw-r--r-- | extra/config/mconf.c | 87 | ||||
-rw-r--r-- | extra/config/menu.c | 8 | ||||
-rw-r--r-- | extra/config/symbol.c | 2 | ||||
-rw-r--r-- | extra/config/zconf.tab.c_shipped | 8 | ||||
-rw-r--r-- | extra/config/zconf.y | 8 | ||||
-rw-r--r-- | extra/locale/Makefile.in | 7 | ||||
-rw-r--r-- | extra/locale/gen_collate.c | 5 | ||||
-rw-r--r-- | extra/locale/gen_locale.c | 1 | ||||
-rw-r--r-- | extra/locale/gen_wc8bit.c | 1 | ||||
-rw-r--r-- | extra/locale/gen_wctype.c | 2 | ||||
-rw-r--r-- | extra/locale/tst_nl_langinfo.c | 2 | ||||
-rwxr-xr-x | extra/scripts/fix_includes.sh | 14 | ||||
-rwxr-xr-x | extra/scripts/gen_bits_syscall_h.sh | 7 | ||||
-rwxr-xr-x | extra/scripts/getent | 5 |
17 files changed, 151 insertions, 109 deletions
diff --git a/extra/config/conf.c b/extra/config/conf.c index 98b0015ae..0907369dd 100644 --- a/extra/config/conf.c +++ b/extra/config/conf.c @@ -31,14 +31,14 @@ char *defconfig_file; static int indent = 1; static int valid_stdin = 1; static int conf_cnt; -static signed char line[128]; +static char line[128]; static struct menu *rootEntry; -static char nohelp_text[] = "Sorry, no help available for this option yet.\n"; +static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n"); -static void strip(signed char *str) +static void strip(char *str) { - signed char *p = str; + char *p = str; int l; while ((isspace(*p))) @@ -56,9 +56,9 @@ static void strip(signed char *str) static void check_stdin(void) { if (!valid_stdin && input_mode == ask_silent) { - printf("aborted!\n\n"); - printf("Console input/output is redirected. "); - printf("Run 'make oldconfig' to update configuration.\n\n"); + printf(_("aborted!\n\n")); + printf(_("Console input/output is redirected. ")); + printf(_("Run 'make oldconfig' to update configuration.\n\n")); exit(1); } } @@ -470,7 +470,7 @@ static void check_conf(struct menu *menu) if (sym) { if (sym_is_changable(sym) && !sym_has_value(sym)) { if (!conf_cnt++) - printf("*\n* Restart config...\n*\n"); + printf(_("*\n* Restart config...\n*\n")); rootEntry = menu_get_parent_menu(menu); conf(rootEntry); } @@ -504,7 +504,7 @@ int main(int ac, char **av) input_mode = set_default; defconfig_file = av[i++]; if (!defconfig_file) { - printf("%s: No default config file specified\n", + printf(_("%s: No default config file specified\n"), av[0]); exit(1); } @@ -530,7 +530,7 @@ int main(int ac, char **av) } name = av[i]; if (!name) { - printf("%s: configuration file missing\n", av[0]); + printf(_("%s: Kconfig file missing\n"), av[0]); } conf_parse(name); //zconfdump(stdout); @@ -547,12 +547,12 @@ int main(int ac, char **av) break; case ask_silent: if (stat(".config", &tmpstat)) { - printf("***\n" + printf(_("***\n" "*** You have not yet configured uClibc!\n" "***\n" "*** Please run some configurator (e.g. \"make oldconfig\" or\n" "*** \"make menuconfig\" or \"make config\").\n" - "***\n"); + "***\n")); exit(1); } case ask_all: @@ -576,7 +576,7 @@ int main(int ac, char **av) check_conf(&rootmenu); } while (conf_cnt); if (conf_write(NULL)) { - fprintf(stderr, "\n*** Error during writing of the uClibc configuration.\n\n"); + fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n")); return 1; } return 0; diff --git a/extra/config/confdata.c b/extra/config/confdata.c index a3f19091e..60bfe77c4 100644 --- a/extra/config/confdata.c +++ b/extra/config/confdata.c @@ -8,6 +8,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <time.h> #include <unistd.h> #define LKC_DIRECT_LINK @@ -23,10 +24,10 @@ const char *conf_confnames[] = { NULL, }; -static char *conf_expand_value(const signed char *in) +static char *conf_expand_value(const char *in) { struct symbol *sym; - const signed char *src; + const char *src; static char res_value[SYMBOL_MAXLENGTH]; char *dst, name[SYMBOL_MAXLENGTH]; @@ -84,9 +85,9 @@ int conf_read(const char *name) name = conf_expand_value(name); in = zconf_fopen(name); if (in) { - printf("#\n" - "# using defaults found in %s\n" - "#\n", name); + printf(_("#\n" + "# using defaults found in %s\n" + "#\n"), name); break; } } @@ -264,6 +265,9 @@ int conf_write(const char *name) char dirname[128], tmpname[128], newname[128]; int type, l; const char *str; + time_t now; + int use_timestamp = 1; + char *env; dirname[0] = 0; if (name && name[0]) { @@ -297,25 +301,36 @@ int conf_write(const char *name) if (!out_h) return 1; } - fprintf(out, "#\n" - "# Automatically generated make config: don't edit\n" - "#\n"); + time(&now); + env = getenv("KCONFIG_NOTIMESTAMP"); + if (env && *env) + use_timestamp = 0; + + fprintf(out, _("#\n" + "# Automatically generated make config: don't edit\n" + "%s%s" + "#\n"), + use_timestamp ? "# " : "", + use_timestamp ? ctime(&now) : ""); if (out_h) fprintf(out_h, "/*\n" - " * Automatically generated C config: don't edit\n" - " */\n" - "#if !defined __FEATURES_H && !defined __need_uClibc_config_h\n" - "#error Never include <bits/uClibc_config.h> directly; use <features.h> instead\n" - "#endif\n\n" - "/*\n" - " * Version Number\n" - " */\n" - "#define __UCLIBC_MAJOR__ %s\n" - "#define __UCLIBC_MINOR__ %s\n" - "#define __UCLIBC_SUBLEVEL__ %s\n", - getenv("MAJOR_VERSION"), - getenv("MINOR_VERSION"), - getenv("SUBLEVEL")); + " * Automatically generated C config: don't edit\n" + "%s%s" + " */\n" + "#if !defined __FEATURES_H && !defined __need_uClibc_config_h\n" + "#error Never include <bits/uClibc_config.h> directly; use <features.h> instead\n" + "#endif\n\n" + "/*\n" + " * Version Number\n" + " */\n" + "#define __UCLIBC_MAJOR__ %s\n" + "#define __UCLIBC_MINOR__ %s\n" + "#define __UCLIBC_SUBLEVEL__ %s\n", + use_timestamp ? " * " : "", + use_timestamp ? ctime(&now) : "", + getenv("MAJOR_VERSION"), + getenv("MINOR_VERSION"), + getenv("SUBLEVEL")); if (!sym_change_count) sym_clear_all_valid(); diff --git a/extra/config/lkc.h b/extra/config/lkc.h index b8a67fc9d..5e5073a3b 100644 --- a/extra/config/lkc.h +++ b/extra/config/lkc.h @@ -8,6 +8,8 @@ #include "expr.h" +//#include <libintl.h> + #ifdef __cplusplus extern "C" { #endif @@ -23,6 +25,20 @@ extern "C" { #define SRCTREE "srctree" +#define PACKAGE "linux" +#define LOCALEDIR "/usr/share/locale" + +#if 0 +#define _(text) gettext(text) +#define N_(text) (text) +#else +#define _(text) (text) +#define N_(text) (text) +#define setlocale(a,b) +#define bindtextdomain(p,l) +#define textdomain(p) +#endif + int zconfparse(void); void zconfdump(FILE *out); @@ -51,7 +67,7 @@ void menu_add_entry(struct symbol *sym); void menu_end_entry(void); void menu_add_dep(struct expr *dep); struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep); -void menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); +struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep); void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep); void menu_finalize(struct menu *parent); diff --git a/extra/config/mconf.c b/extra/config/mconf.c index e60f01889..749d5760e 100644 --- a/extra/config/mconf.c +++ b/extra/config/mconf.c @@ -5,8 +5,7 @@ * Introduced single menu mode (show all sub-menus in one large tree). * 2002-11-06 Petr Baudis <pasky@ucw.cz> * - * Directly use liblxdialog library routines. - * 2002-11-14 Petr Baudis <pasky@ucw.cz> + * i18n, 2005, Arnaldo Carvalho de Melo <acme@conectiva.com.br> */ #include <sys/ioctl.h> @@ -23,13 +22,15 @@ #include <termios.h> #include <unistd.h> +//#include <locale.h> + #include "lxdialog/dialog.h" #define LKC_DIRECT_LINK #include "lkc.h" static char menu_backtitle[128]; -static const char mconf_readme[] = +static const char mconf_readme[] = N_( "Overview\n" "--------\n" "Some features may be built directly into uClibc. Some features\n" @@ -160,39 +161,39 @@ static const char mconf_readme[] = "\n" "Note that this mode can eventually be a little more CPU expensive\n" "(especially with a larger number of unrolled categories) than the\n" -"default mode.\n", -menu_instructions[] = +"default mode.\n"), +menu_instructions[] = N_( "Arrow keys navigate the menu. " "<Enter> selects submenus --->. " "Highlighted letters are hotkeys. " "Pressing <Y> selectes a feature, while <N> will exclude a feature. " "Press <Esc><Esc> to exit, <?> for Help, </> for Search. " - "Legend: [*] feature is selected [ ] feature is excluded", -radiolist_instructions[] = + "Legend: [*] feature is selected [ ] feature is excluded"), +radiolist_instructions[] = N_( "Use the arrow keys to navigate this window or " "press the hotkey of the item you wish to select " "followed by the <SPACE BAR>. " - "Press <?> for additional information about this option.", -inputbox_instructions_int[] = + "Press <?> for additional information about this option."), +inputbox_instructions_int[] = N_( "Please enter a decimal value. " "Fractions will not be accepted. " - "Use the <TAB> key to move from the input field to the buttons below it.", -inputbox_instructions_hex[] = + "Use the <TAB> key to move from the input field to the buttons below it."), +inputbox_instructions_hex[] = N_( "Please enter a hexadecimal value. " - "Use the <TAB> key to move from the input field to the buttons below it.", -inputbox_instructions_string[] = + "Use the <TAB> key to move from the input field to the buttons below it."), +inputbox_instructions_string[] = N_( "Please enter a string value. " - "Use the <TAB> key to move from the input field to the buttons below it.", -setmod_text[] = + "Use the <TAB> key to move from the input field to the buttons below it."), +setmod_text[] = N_( "This feature depends on another which has been configured as a module.\n" - "As a result, this feature will be built as a module.", -nohelp_text[] = - "There is no help available for this option.\n", -load_config_text[] = + "As a result, this feature will be built as a module."), +nohelp_text[] = N_( + "There is no help available for this option.\n"), +load_config_text[] = N_( "Enter the name of the configuration file you wish to load. " "Accept the name shown to restore the configuration you " - "last retrieved. Leave blank to abort.", -load_config_help[] = + "last retrieved. Leave blank to abort."), +load_config_help[] = N_( "\n" "For various reasons, one may wish to keep several different uClibc\n" "configurations available on a single machine.\n" @@ -202,11 +203,11 @@ load_config_help[] = "to modify that configuration.\n" "\n" "If you are uncertain, then you have probably never used alternate\n" - "configuration files. You should therefor leave this blank to abort.\n", -save_config_text[] = + "configuration files. You should therefor leave this blank to abort.\n"), +save_config_text[] = N_( "Enter a filename to which this configuration should be saved " - "as an alternate. Leave blank to abort.", -save_config_help[] = + "as an alternate. Leave blank to abort."), +save_config_help[] = N_( "\n" "For various reasons, one may wish to keep different uClibc\n" "configurations available on a single machine.\n" @@ -216,8 +217,8 @@ save_config_help[] = "configuration options you have selected at that time.\n" "\n" "If you are uncertain what all this means then you should probably\n" - "leave this blank.\n", -search_help[] = + "leave this blank.\n"), +search_help[] = N_( "\n" "Search for CONFIG_ symbols and display their relations.\n" "Example: search for \"^FOO\"\n" @@ -254,7 +255,7 @@ search_help[] = "Examples: USB => find all CONFIG_ symbols containing USB\n" " ^USB => find all CONFIG_ symbols starting with USB\n" " USB$ => find all CONFIG_ symbols ending with USB\n" - "\n"; + "\n"); static char filename[PATH_MAX+1] = ".config"; static int indent; @@ -303,8 +304,8 @@ static void init_wsize(void) } if (rows < 19 || cols < 80) { - fprintf(stderr, "Your display is too small to run Menuconfig!\n"); - fprintf(stderr, "It must be at least 19 lines by 80 columns.\n"); + fprintf(stderr, N_("Your display is too small to run Menuconfig!\n")); + fprintf(stderr, N_("It must be at least 19 lines by 80 columns.\n")); exit(1); } @@ -935,12 +936,16 @@ int main(int ac, char **av) char *mode; int stat; + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + conf_parse(av[1]); conf_read(NULL); sym = sym_lookup("VERSION", 0); sym_calc_value(sym); - snprintf(menu_backtitle, 128, "uClibc v%s Configuration", + snprintf(menu_backtitle, sizeof(menu_backtitle), _("uClibc v%s Configuration"), sym_get_string_value(sym)); mode = getenv("MENUCONFIG_MODE"); @@ -966,12 +971,22 @@ int main(int ac, char **av) end_dialog(); if (stat == 0) { - conf_write(NULL); - printf("\n\n" + if (conf_write(NULL)) { + fprintf(stderr, _("\n\n" + "Error during writing of the uClibc configuration.\n" + "Your uClibc configuration changes were NOT saved." + "\n\n")); + return 1; + } + printf(_("\n\n" "*** End of uClibc configuration.\n" - "*** Check the top-level Makefile for additional configuration options.\n\n"); - } else - printf("\n\nYour uClibc configuration changes were NOT saved.\n\n"); + "*** Execute 'make' to build uClibc." + "\n\n")); + } else { + fprintf(stderr, _("\n\n" + "Your uClibc configuration changes were NOT saved." + "\n\n")); + } return 0; } diff --git a/extra/config/menu.c b/extra/config/menu.c index 0c13156f3..5cfa6c405 100644 --- a/extra/config/menu.c +++ b/extra/config/menu.c @@ -136,9 +136,9 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e return prop; } -void menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep) +struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep) { - menu_add_prop(type, prompt, NULL, dep); + return menu_add_prop(type, prompt, NULL, dep); } void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep) @@ -365,9 +365,9 @@ bool menu_is_visible(struct menu *menu) const char *menu_get_prompt(struct menu *menu) { if (menu->prompt) - return menu->prompt->text; + return _(menu->prompt->text); else if (menu->sym) - return menu->sym->name; + return _(menu->sym->name); return NULL; } diff --git a/extra/config/symbol.c b/extra/config/symbol.c index ea629728a..e0286331e 100644 --- a/extra/config/symbol.c +++ b/extra/config/symbol.c @@ -727,7 +727,7 @@ struct symbol *sym_check_deps(struct symbol *sym) if (sym->flags & SYMBOL_CHECK_DONE) return NULL; if (sym->flags & SYMBOL_CHECK) { - printf("Warning! Found recursive dependency: %s", sym->name); + fprintf(stderr, "Warning! Found recursive dependency: %s\n", sym->name); return sym; } diff --git a/extra/config/zconf.tab.c_shipped b/extra/config/zconf.tab.c_shipped index 3f0f7bb6a..20a39c152 100644 --- a/extra/config/zconf.tab.c_shipped +++ b/extra/config/zconf.tab.c_shipped @@ -1531,7 +1531,7 @@ yyreduce: { menu_add_entry(NULL); - menu_add_prop(P_MENU, yyvsp[-1].string, NULL, NULL); + menu_add_prompt(P_MENU, yyvsp[-1].string, NULL); printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); ;} break; @@ -1586,7 +1586,7 @@ yyreduce: { menu_add_entry(NULL); - menu_add_prop(P_COMMENT, yyvsp[-1].string, NULL, NULL); + menu_add_prompt(P_COMMENT, yyvsp[-1].string, NULL); printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); ;} break; @@ -1640,7 +1640,7 @@ yyreduce: case 86: { - menu_add_prop(P_PROMPT, yyvsp[-1].string, NULL, yyvsp[0].expr); + menu_add_prompt(P_PROMPT, yyvsp[-1].string, yyvsp[0].expr); ;} break; @@ -1925,7 +1925,7 @@ void conf_parse(const char *name) sym_init(); menu_init(); modules_sym = sym_lookup("MODULES", 0); - rootmenu.prompt = menu_add_prop(P_MENU, "uClibc Configuration", NULL, NULL); + rootmenu.prompt = menu_add_prompt(P_MENU, "uClibc Configuration", NULL); //zconfdebug = 1; zconfparse(); diff --git a/extra/config/zconf.y b/extra/config/zconf.y index 41ca0cc67..e1a0f455d 100644 --- a/extra/config/zconf.y +++ b/extra/config/zconf.y @@ -342,7 +342,7 @@ if_block: menu: T_MENU prompt T_EOL { menu_add_entry(NULL); - menu_add_prop(P_MENU, $2, NULL, NULL); + menu_add_prompt(P_MENU, $2, NULL); printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); }; @@ -392,7 +392,7 @@ source_stmt: source comment: T_COMMENT prompt T_EOL { menu_add_entry(NULL); - menu_add_prop(P_COMMENT, $2, NULL, NULL); + menu_add_prompt(P_COMMENT, $2, NULL); printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); }; @@ -443,7 +443,7 @@ prompt_stmt_opt: /* empty */ | prompt if_expr { - menu_add_prop(P_PROMPT, $1, NULL, $2); + menu_add_prompt(P_PROMPT, $1, $2); }; prompt: T_WORD @@ -487,7 +487,7 @@ void conf_parse(const char *name) sym_init(); menu_init(); modules_sym = sym_lookup("MODULES", 0); - rootmenu.prompt = menu_add_prop(P_MENU, "uClibc Configuration", NULL, NULL); + rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); //zconfdebug = 1; zconfparse(); diff --git a/extra/locale/Makefile.in b/extra/locale/Makefile.in index deaa74110..57c9ba213 100644 --- a/extra/locale/Makefile.in +++ b/extra/locale/Makefile.in @@ -1,6 +1,6 @@ # Makefile for uClibc # -# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org> +# Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org> # # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # @@ -41,8 +41,9 @@ CFLAGS-locale_data.c := -D__WCHAR_ENABLED -I$(locale_OUT) -I$(locale_DIR) # produces a loop #headers-$(UCLIBC_HAS_LOCALE) += locale_headers -libc-a-$(UCLIBC_HAS_LOCALE) += $(locale_OBJ) -libc-so-$(UCLIBC_HAS_LOCALE) += $(locale_OBJ:.o=.os) +libc-$(UCLIBC_HAS_LOCALE) += $(locale_OBJ) + +libc-nomulti-$(UCLIBC_HAS_LOCALE) += $(locale_OBJ) locale_headers: $(top_builddir)include/bits/uClibc_locale_data.h diff --git a/extra/locale/gen_collate.c b/extra/locale/gen_collate.c index 0a41a6215..7d90bcd71 100644 --- a/extra/locale/gen_collate.c +++ b/extra/locale/gen_collate.c @@ -15,11 +15,6 @@ * */ - -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif - #include <stddef.h> #include <stdio.h> #include <stdlib.h> diff --git a/extra/locale/gen_locale.c b/extra/locale/gen_locale.c index 388f543c5..b44be318e 100644 --- a/extra/locale/gen_locale.c +++ b/extra/locale/gen_locale.c @@ -1,4 +1,3 @@ -#define _GNU_SOURCE #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/extra/locale/gen_wc8bit.c b/extra/locale/gen_wc8bit.c index 510b4e25f..cf72a180c 100644 --- a/extra/locale/gen_wc8bit.c +++ b/extra/locale/gen_wc8bit.c @@ -1,4 +1,3 @@ -#define _GNU_SOURCE #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/extra/locale/gen_wctype.c b/extra/locale/gen_wctype.c index 72be49c40..c29c1b952 100644 --- a/extra/locale/gen_wctype.c +++ b/extra/locale/gen_wctype.c @@ -1,5 +1,3 @@ - -#define _GNU_SOURCE #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/extra/locale/tst_nl_langinfo.c b/extra/locale/tst_nl_langinfo.c index 373f9343c..fcf2fe2eb 100644 --- a/extra/locale/tst_nl_langinfo.c +++ b/extra/locale/tst_nl_langinfo.c @@ -1,5 +1,3 @@ -#define _GNU_SOURCE - #include <locale.h> #include <stdio.h> #include <stdlib.h> diff --git a/extra/scripts/fix_includes.sh b/extra/scripts/fix_includes.sh index 34058a966..465d567bf 100755 --- a/extra/scripts/fix_includes.sh +++ b/extra/scripts/fix_includes.sh @@ -89,11 +89,12 @@ then fi if [ "$MAKE_IS_SILENT" != "y" ]; then +echo "" echo "Current kernel version is $VERSION.$PATCHLEVEL.$SUBLEVEL${EXTRAVERSION}" -echo -e "\n" +echo "" echo "Using kernel headers from $VERSION.$PATCHLEVEL.$SUBLEVEL${EXTRAVERSION} for architecture '$TARGET_ARCH'" echo -e "\tprovided in directory $KERNEL_SOURCE" -echo -e "\n" +echo "" fi # Create a symlink to include/asm @@ -152,17 +153,18 @@ if [ ! -d "$KERNEL_SOURCE/include/asm" ]; then fi; else # No guessing required..... -ln -fs $KERNEL_SOURCE/include/asm include/asm -if [ -e $KERNEL_SOURCE/include/asm-$TARGET_ARCH ] ; then -ln -fs $KERNEL_SOURCE/include/asm-$TARGET_ARCH include/asm-$TARGET_ARCH -fi +for x in $KERNEL_SOURCE/include/asm* ; do + ln -fs ${x} include/ +done fi; # Annoyingly, 2.6.x kernel headers also need an include/asm-generic/ directory +if [ ! -e include/asm-generic ] ; then if [ $VERSION -eq 2 ] && [ $PATCHLEVEL -ge 6 ] ; then ln -fs $KERNEL_SOURCE/include/asm-generic include/asm-generic fi; +fi # Create the include/linux symlink. diff --git a/extra/scripts/gen_bits_syscall_h.sh b/extra/scripts/gen_bits_syscall_h.sh index 78c54a935..718253e90 100755 --- a/extra/scripts/gen_bits_syscall_h.sh +++ b/extra/scripts/gen_bits_syscall_h.sh @@ -17,8 +17,13 @@ UNISTD_H_PATH=$top_builddir/include/asm/unistd.h INCLUDE_OPTS="-I$top_builddir/include" +case $CC in +*icc*) CC_SYSNUM_ARGS="-dM" ;; +*) CC_SYSNUM_ARGS="-dN" ;; +esac + ( echo "#include \"$UNISTD_H_PATH\"" ; - $CC -E -dN $INCLUDE_OPTS $UNISTD_H_PATH | # needed to strip out any kernel-internal defines + $CC -E $CC_SYSNUM_ARGS $INCLUDE_OPTS $UNISTD_H_PATH | # needed to strip out any kernel-internal defines sed -ne 's/^[ ]*#define[ ]*__NR_\([A-Za-z0-9_]*\).*/UCLIBC_\1 __NR_\1/gp' ) | $CC -E $INCLUDE_OPTS - | diff --git a/extra/scripts/getent b/extra/scripts/getent index 9ffffa171..03b5f28a9 100755 --- a/extra/scripts/getent +++ b/extra/scripts/getent @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org> +# Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org> # # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # @@ -65,8 +65,7 @@ case $1 in esac if [ -z "$2" ] ; then - cat $file - retval=$? + exec cat $file else search_entry "$file" "$2" fi |