diff --git a/board/beagleboard/xm/kernel-patches/linux-added-fixes-for-OMAP-DSS.patch b/board/beagleboard/xm/kernel-patches/linux-added-fixes-for-OMAP-DSS.patch deleted file mode 100644 index 28dc719..0000000 --- a/board/beagleboard/xm/kernel-patches/linux-added-fixes-for-OMAP-DSS.patch +++ /dev/null @@ -1,81 +0,0 @@ -From e3dd8dcf37976c1aefc3f269ec295c89a38103bd Mon Sep 17 00:00:00 2001 -From: Max Galemin -Date: Sun, 29 May 2011 12:56:33 +1000 -Subject: [PATCH 4/7] Issue 5: added fixes for OMAP DSS from Koen Kooi git repository: - -1. Patches applied (see http://dominion.thruhere.net/git/cgit.cgi/linux-omap/ for details): - a) OMAP2PLUS: DSS2: Fix: Return correct lcd clock source for OMAP2/3 (Archit Taneja ); - b) OMAP: DSS: DSI: Fix DSI PLL power bug (Tomi Valkeinen ). ---- - drivers/video/omap2/dss/dsi.c | 5 +++++ - drivers/video/omap2/dss/dss.c | 10 ++++++++-- - drivers/video/omap2/dss/dss_features.c | 2 +- - drivers/video/omap2/dss/dss_features.h | 2 ++ - 4 files changed, 16 insertions(+), 3 deletions(-) - -diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c -index 0a7f1a4..5945283 100644 ---- a/drivers/video/omap2/dss/dsi.c -+++ b/drivers/video/omap2/dss/dsi.c -@@ -1059,6 +1059,11 @@ static int dsi_pll_power(enum dsi_pll_power_state state) - { - int t = 0; - -+ /* DSI-PLL power command 0x3 is not working */ -+ if (dss_has_feature(FEAT_DSI_PLL_PWR_BUG) && -+ state == DSI_PLL_POWER_ON_DIV) -+ state = DSI_PLL_POWER_ON_ALL; -+ - REG_FLD_MOD(DSI_CLK_CTRL, state, 31, 30); /* PLL_PWR_CMD */ - - /* PLL_PWR_STATUS */ -diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c -index 3f1fee6..c3b48a0 100644 ---- a/drivers/video/omap2/dss/dss.c -+++ b/drivers/video/omap2/dss/dss.c -@@ -385,8 +385,14 @@ enum dss_clk_source dss_get_dsi_clk_source(void) - - enum dss_clk_source dss_get_lcd_clk_source(enum omap_channel channel) - { -- int ix = channel == OMAP_DSS_CHANNEL_LCD ? 0 : 1; -- return dss.lcd_clk_source[ix]; -+ if (dss_has_feature(FEAT_LCD_CLK_SRC)) { -+ int ix = channel == OMAP_DSS_CHANNEL_LCD ? 0 : 1; -+ return dss.lcd_clk_source[ix]; -+ } else { -+ /* LCD_CLK source is the same as DISPC_FCLK source for -+ * OMAP2 and OMAP3 */ -+ return dss.dispc_clk_source; -+ } - } - - /* calculate clock rates using dividers in cinfo */ -diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c -index aa16222..8c50e18 100644 ---- a/drivers/video/omap2/dss/dss_features.c -+++ b/drivers/video/omap2/dss/dss_features.c -@@ -271,7 +271,7 @@ static struct omap_dss_features omap3630_dss_features = { - FEAT_LCDENABLESIGNAL | FEAT_PCKFREEENABLE | - FEAT_PRE_MULT_ALPHA | FEAT_FUNCGATED | - FEAT_ROWREPEATENABLE | FEAT_LINEBUFFERSPLIT | -- FEAT_RESIZECONF, -+ FEAT_RESIZECONF | FEAT_DSI_PLL_PWR_BUG, - - .num_mgrs = 2, - .num_ovls = 3, -diff --git a/drivers/video/omap2/dss/dss_features.h b/drivers/video/omap2/dss/dss_features.h -index 12e9c4e..37922ce 100644 ---- a/drivers/video/omap2/dss/dss_features.h -+++ b/drivers/video/omap2/dss/dss_features.h -@@ -40,6 +40,8 @@ enum dss_feat_id { - /* Independent core clk divider */ - FEAT_CORE_CLK_DIV = 1 << 11, - FEAT_LCD_CLK_SRC = 1 << 12, -+ /* DSI-PLL power command 0x3 is not working */ -+ FEAT_DSI_PLL_PWR_BUG = 1 << 13, - }; - - /* DSS register field id */ --- -1.7.4.1 - diff --git a/board/beagleboard/xm/kernel-patches/linux-added-support-for-RTC-backup-battery-recharge.patch b/board/beagleboard/xm/kernel-patches/linux-added-support-for-RTC-backup-battery-recharge.patch deleted file mode 100644 index 10c241e..0000000 --- a/board/beagleboard/xm/kernel-patches/linux-added-support-for-RTC-backup-battery-recharge.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 6875044da02daa3653d244b80e93ecc56345e89c Mon Sep 17 00:00:00 2001 -From: Max Galemin -Date: Mon, 30 May 2011 08:29:52 +1000 -Subject: [PATCH 7/7] Issue 6: added support for RTC backup battery recharge. - -Not related to Issue 6 item. For details plese see - -http://dominion.thruhere.net/git/cgit.cgi/linux-omap/log/?h=beagle-2.6.39. - -1. Applied patch "RTC: add support for backup battery recharge" (Steve Sakoman ). ---- - drivers/rtc/rtc-twl.c | 25 +++++++++++++++++++++++++ - 1 files changed, 25 insertions(+), 0 deletions(-) - -diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c -index f9a2799..c617a27 100644 ---- a/drivers/rtc/rtc-twl.c -+++ b/drivers/rtc/rtc-twl.c -@@ -30,6 +30,23 @@ - - #include - -+/* -+ * PM_RECEIVER block register offsets (use TWL4030_MODULE_PM_RECEIVER) -+ */ -+#define REG_BB_CFG 0x12 -+ -+/* PM_RECEIVER BB_CFG bitfields */ -+#define BIT_PM_RECEIVER_BB_CFG_BBCHEN 0x10 -+#define BIT_PM_RECEIVER_BB_CFG_BBSEL 0x0C -+#define BIT_PM_RECEIVER_BB_CFG_BBSEL_2V5 0x00 -+#define BIT_PM_RECEIVER_BB_CFG_BBSEL_3V0 0x04 -+#define BIT_PM_RECEIVER_BB_CFG_BBSEL_3V1 0x08 -+#define BIT_PM_RECEIVER_BB_CFG_BBSEL_3v2 0x0c -+#define BIT_PM_RECEIVER_BB_CFG_BBISEL 0x03 -+#define BIT_PM_RECEIVER_BB_CFG_BBISEL_25UA 0x00 -+#define BIT_PM_RECEIVER_BB_CFG_BBISEL_150UA 0x01 -+#define BIT_PM_RECEIVER_BB_CFG_BBISEL_500UA 0x02 -+#define BIT_PM_RECEIVER_BB_CFG_BBISEL_1MA 0x03 - - /* - * RTC block register offsets (use TWL_MODULE_RTC) -@@ -495,6 +512,14 @@ static int __devinit twl_rtc_probe(struct platform_device *pdev) - if (ret < 0) - goto out2; - -+ /* enable backup battery charging */ -+ /* use a conservative 25uA @ 3.1V */ -+ ret = twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, -+ BIT_PM_RECEIVER_BB_CFG_BBCHEN | -+ BIT_PM_RECEIVER_BB_CFG_BBSEL_3V1 | -+ BIT_PM_RECEIVER_BB_CFG_BBISEL_25UA, -+ REG_BB_CFG); -+ - return ret; - - out2: --- -1.7.4.1 - diff --git a/board/beagleboard/xm/kernel-patches/linux-enabled-1-GHz-clock-for-Beagleboard-xM.patch b/board/beagleboard/xm/kernel-patches/linux-enabled-1-GHz-clock-for-Beagleboard-xM.patch deleted file mode 100644 index 94118c9..0000000 --- a/board/beagleboard/xm/kernel-patches/linux-enabled-1-GHz-clock-for-Beagleboard-xM.patch +++ /dev/null @@ -1,68 +0,0 @@ -From bb8ddf64d7b099994654fdf26c9dd8c16d8e0e35 Mon Sep 17 00:00:00 2001 -From: Maksym Galemin -Date: Sat, 28 May 2011 10:41:06 +1000 -Subject: [PATCH 2/7] Issue 3: enabled 1 GHz clock for Beagleboard-xM. - ---- - arch/arm/mach-omap2/board-omap3beagle.c | 17 +++++++++++++---- - arch/arm/plat-omap/clock.c | 2 +- - 2 files changed, 14 insertions(+), 5 deletions(-) - -diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c -index 33007fd..5ae251a 100644 ---- a/arch/arm/mach-omap2/board-omap3beagle.c -+++ b/arch/arm/mach-omap2/board-omap3beagle.c -@@ -629,14 +629,23 @@ static void __init beagle_opp_init(void) - __func__, mh, dh); - return; - } -+ -+#ifdef CONFIG_OMAP_SMARTREFLEX -+ unsigned long mpu_freq = 1000000000; -+ unsigned long dsp_freq = 800000000; -+#else -+ unsigned long mpu_freq = 800000000; -+ unsigned long dsp_freq = 660000000; -+#endif -+ - /* Enable MPU 1GHz and lower opps */ - dev = &mh->od->pdev.dev; -- r = opp_enable(dev, 800000000); -+ r = opp_enable(dev, mpu_freq); - /* TODO: MPU 1GHz needs SR and ABB */ - - /* Enable IVA 800MHz and lower opps */ - dev = &dh->od->pdev.dev; -- r |= opp_enable(dev, 660000000); -+ r |= opp_enable(dev, dsp_freq); - /* TODO: DSP 800MHz needs SR and ABB */ - if (r) { - pr_err("%s: failed to enable higher opp %d\n", -@@ -646,9 +655,9 @@ static void __init beagle_opp_init(void) - * about the results - */ - dev = &mh->od->pdev.dev; -- opp_disable(dev, 800000000); -+ opp_disable(dev, mpu_freq); - dev = &dh->od->pdev.dev; -- opp_disable(dev, 660000000); -+ opp_disable(dev, dsp_freq); - } - } - return; -diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c -index c9122dd..6d12f35 100644 ---- a/arch/arm/plat-omap/clock.c -+++ b/arch/arm/plat-omap/clock.c -@@ -185,7 +185,7 @@ static int __init omap_clk_setup(char *str) - if (!mpurate) - return 1; - -- if (mpurate < 1000) -+ if (mpurate <= 1000) - mpurate *= 1000000; - - return 1; --- -1.7.4.1 - diff --git a/board/beagleboard/xm/kernel-patches/linux-enabled-Alignment-trap-menu-item-for-ARM.patch b/board/beagleboard/xm/kernel-patches/linux-enabled-Alignment-trap-menu-item-for-ARM.patch deleted file mode 100644 index ef93f13..0000000 --- a/board/beagleboard/xm/kernel-patches/linux-enabled-Alignment-trap-menu-item-for-ARM.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 8a1019cf1ee09cecfe9b17cbab2f6804fad1bb0a Mon Sep 17 00:00:00 2001 -From: Maksym Galemin -Date: Sat, 28 May 2011 10:20:11 +1000 -Subject: [PATCH] Issue 1: enabled "Alignment trap" menu item for ARM architecture. - ---- - arch/arm/Kconfig | 2 +- - arch/arm/configs/omap2plus_defconfig | 1 + - 2 files changed, 2 insertions(+), 1 deletions(-) - -diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index 377a7a5..ed31252 100644 ---- a/arch/arm/Kconfig -+++ b/arch/arm/Kconfig -@@ -1621,7 +1621,7 @@ config LEDS_CPU - will overrule the CPU usage LED. - - config ALIGNMENT_TRAP -- bool -+ bool "Alignment trap" - depends on CPU_CP15_MMU - default y if !ARCH_EBSA110 - select HAVE_PROC_CPU if PROC_FS -diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig -index 076db52..8d32420 100644 ---- a/arch/arm/configs/omap2plus_defconfig -+++ b/arch/arm/configs/omap2plus_defconfig -@@ -303,3 +303,4 @@ CONFIG_CRC_T10DIF=y - CONFIG_CRC_ITU_T=y - CONFIG_CRC7=y - CONFIG_LIBCRC32C=y -+# CONFIG_ALIGNMENT_TRAP is not set --- -1.7.4.1 - diff --git a/board/beagleboard/xm/linux-2.6.39.1.config b/board/beagleboard/xm/linux-2.6.39.1.config deleted file mode 100644 index 0a10eb8..0000000 --- a/board/beagleboard/xm/linux-2.6.39.1.config +++ /dev/null @@ -1,327 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=16 -CONFIG_BLK_DEV_INITRD=y -CONFIG_EXPERT=y -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_SLAB=y -CONFIG_PROFILING=y -CONFIG_OPROFILE=y -CONFIG_KPROBES=y -CONFIG_MODULES=y -CONFIG_MODULE_FORCE_LOAD=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_OMAP=y -CONFIG_ARCH_OMAP2=y -CONFIG_ARCH_OMAP3=y -CONFIG_ARCH_OMAP4=y -CONFIG_OMAP_RESET_CLOCKS=y -CONFIG_OMAP_MUX_DEBUG=y -CONFIG_OMAP_32K_TIMER=y -CONFIG_MACH_OMAP_GENERIC=y -CONFIG_ARCH_OMAP2420=y -CONFIG_ARCH_OMAP2430=y -CONFIG_ARCH_OMAP3430=y -CONFIG_MACH_OMAP_H4=y -CONFIG_MACH_OMAP_APOLLON=y -CONFIG_MACH_OMAP_2430SDP=y -CONFIG_MACH_OMAP3_BEAGLE=y -CONFIG_MACH_DEVKIT8000=y -CONFIG_MACH_OMAP_LDP=y -CONFIG_MACH_OVERO=y -CONFIG_MACH_OMAP3EVM=y -CONFIG_MACH_OMAP3517EVM=y -CONFIG_MACH_OMAP3_PANDORA=y -CONFIG_MACH_OMAP3_TOUCHBOOK=y -CONFIG_MACH_OMAP_3430SDP=y -CONFIG_MACH_NOKIA_N8X0=y -CONFIG_MACH_NOKIA_RX51=y -CONFIG_MACH_OMAP_ZOOM2=y -CONFIG_MACH_OMAP_ZOOM3=y -CONFIG_MACH_CM_T35=y -CONFIG_MACH_IGEP0020=y -CONFIG_MACH_SBC3530=y -CONFIG_MACH_OMAP_3630SDP=y -CONFIG_MACH_OMAP_4430SDP=y -CONFIG_ARM_THUMBEE=y -CONFIG_ARM_L1_CACHE_SHIFT=5 -CONFIG_ARM_ERRATA_411920=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_SMP=y -CONFIG_NR_CPUS=2 -# CONFIG_LOCAL_TIMERS is not set -CONFIG_AEABI=y -CONFIG_LEDS=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyO2,115200" -CONFIG_KEXEC=y -CONFIG_FPE_NWFPE=y -CONFIG_VFP=y -CONFIG_NEON=y -CONFIG_BINFMT_MISC=y -CONFIG_PM=y -CONFIG_PM_DEBUG=y -CONFIG_PM_RUNTIME=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_XFRM_USER=y -CONFIG_NET_KEY=y -CONFIG_NET_KEY_MIGRATE=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_NETFILTER=y -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=y -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_LL=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_CFG80211=m -CONFIG_MAC80211=m -CONFIG_MAC80211_RC_PID=y -CONFIG_MAC80211_RC_DEFAULT_PID=y -CONFIG_MAC80211_LEDS=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_CONNECTOR=y -CONFIG_MTD=y -CONFIG_MTD_CONCAT=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_OOPS=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_OMAP2=y -CONFIG_MTD_ONENAND=y -CONFIG_MTD_ONENAND_VERIFY_WRITE=y -CONFIG_MTD_ONENAND_OMAP2=y -CONFIG_MTD_UBI=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_EEPROM_LEGACY=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_MULTI_LUN=y -CONFIG_SCSI_SCAN_ASYNC=y -CONFIG_MD=y -CONFIG_NETDEVICES=y -CONFIG_SMSC_PHY=y -CONFIG_NET_ETHERNET=y -CONFIG_SMC91X=y -CONFIG_SMSC911X=y -CONFIG_KS8851=y -CONFIG_KS8851_MLL=y -CONFIG_LIBERTAS=m -CONFIG_LIBERTAS_USB=m -CONFIG_LIBERTAS_SDIO=m -CONFIG_LIBERTAS_DEBUG=y -CONFIG_USB_USBNET=y -CONFIG_USB_ALI_M5632=y -CONFIG_USB_AN2720=y -CONFIG_USB_EPSON2888=y -CONFIG_USB_KC2190=y -CONFIG_INPUT_JOYDEV=y -CONFIG_INPUT_EVDEV=y -CONFIG_KEYBOARD_GPIO=y -CONFIG_KEYBOARD_TWL4030=y -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_ADS7846=y -CONFIG_INPUT_MISC=y -CONFIG_INPUT_TWL4030_PWRBUTTON=y -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=32 -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_DETECT_IRQ=y -CONFIG_SERIAL_8250_RSA=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_OMAP=y -CONFIG_SPI=y -CONFIG_SPI_OMAP24XX=y -CONFIG_DEBUG_GPIO=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_TWL4030=y -CONFIG_W1=y -CONFIG_POWER_SUPPLY=y -CONFIG_WATCHDOG=y -CONFIG_OMAP_WATCHDOG=y -CONFIG_TWL4030_WATCHDOG=y -CONFIG_MENELAUS=y -CONFIG_TWL4030_CORE=y -CONFIG_TWL4030_POWER=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_TWL4030=y -CONFIG_REGULATOR_TPS65023=y -CONFIG_REGULATOR_TPS6507X=y -CONFIG_FB=y -CONFIG_FIRMWARE_EDID=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FB_OMAP_LCD_VGA=y -CONFIG_OMAP2_DSS=y -CONFIG_OMAP2_DSS_RFBI=y -CONFIG_OMAP2_DSS_SDI=y -CONFIG_OMAP2_DSS_DSI=y -CONFIG_FB_OMAP2=y -CONFIG_PANEL_GENERIC_DPI=y -CONFIG_PANEL_SHARP_LS037V7DW01=m -CONFIG_PANEL_NEC_NL8048HL11_01B=m -CONFIG_PANEL_TAAL=m -CONFIG_PANEL_TPO_TD043MTEA1=m -CONFIG_PANEL_ACX565AKM=m -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_PLATFORM=y -CONFIG_DISPLAY_SUPPORT=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -CONFIG_FONTS=y -CONFIG_FONT_8x8=y -CONFIG_FONT_8x16=y -CONFIG_LOGO=y -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_MIXER_OSS=y -CONFIG_SND_PCM_OSS=y -CONFIG_SND_VERBOSE_PRINTK=y -CONFIG_SND_DEBUG=y -CONFIG_SND_USB_AUDIO=y -CONFIG_SND_SOC=y -CONFIG_SND_OMAP_SOC=y -CONFIG_USB=y -CONFIG_USB_DEBUG=y -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -CONFIG_USB_DEVICEFS=y -CONFIG_USB_SUSPEND=y -# CONFIG_USB_OTG_WHITELIST is not set -CONFIG_USB_MON=y -# CONFIG_USB_MUSB_HDRC is not set -# CONFIG_USB_MUSB_OTG is not set -# CONFIG_USB_GADGET_MUSB_HDRC is not set -CONFIG_USB_MUSB_DEBUG=y -CONFIG_USB_WDM=y -CONFIG_USB_STORAGE=y -CONFIG_USB_LIBUSUAL=y -CONFIG_USB_TEST=y -CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_DEBUG=y -CONFIG_USB_GADGET_DEBUG_FILES=y -CONFIG_USB_GADGET_DEBUG_FS=y -CONFIG_USB_ZERO=m -CONFIG_MMC=y -CONFIG_MMC_UNSAFE_RESUME=y -CONFIG_SDIO_UART=y -CONFIG_MMC_OMAP=y -CONFIG_MMC_OMAP_HS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_TWL92330=y -CONFIG_RTC_DRV_TWL4030=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_INOTIFY=y -CONFIG_QUOTA=y -CONFIG_QFMT_V2=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_SUMMARY=y -CONFIG_JFFS2_FS_XATTR=y -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_LZO=y -CONFIG_JFFS2_RUBIN=y -CONFIG_UBIFS_FS=y -CONFIG_CRAMFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y -CONFIG_ROOT_NFS=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_KERNEL=y -CONFIG_SCHEDSTATS=y -CONFIG_TIMER_STATS=y -CONFIG_PROVE_LOCKING=y -# CONFIG_LOCK_STAT is not set -CONFIG_DEBUG_SPINLOCK_SLEEP=y -# CONFIG_DEBUG_BUGVERBOSE is not set -CONFIG_DEBUG_INFO=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SECURITY=y -CONFIG_CRYPTO_MICHAEL_MIC=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRC_CCITT=y -CONFIG_CRC_T10DIF=y -CONFIG_CRC_ITU_T=y -CONFIG_CRC7=y -CONFIG_LIBCRC32C=y -# CONFIG_ALIGNMENT_TRAP is not set -CONFIG_CROSS_COMPILE="arm-none-linux-gnueabi-" -CONFIG_LOCALVERSION="-mg00" -CONFIG_OMAP_SMARTREFLEX=y -CONFIG_OMAP_SMARTREFLEX_CLASS3=y -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_USB_NET_SMSC95XX=y -CONFIG_DEBUG_LL=y -CONFIG_EARLY_PRINTK=y -CONFIG_USB_ETH=y -CONFIG_USB_EHCI_HCD=y -CONFIG_TWL4030_USB=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_GPIO_PLATFORM=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_VIDEO_OUTPUT_CONTROL=y -CONFIG_FB_OMAP_BOOTLOADER_INIT=y -CONFIG_OMAP2_VRAM_SIZE=14 -CONFIG_OMAP2_DSS_USE_DSI_PLL=y -CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE=y diff --git a/board/friendlyarm/mini2440/linux-2.6.32.2.config b/board/friendlyarm/mini2440/linux-2.6.32.2.config deleted file mode 100644 index b0c383e..0000000 --- a/board/friendlyarm/mini2440/linux-2.6.32.2.config +++ /dev/null @@ -1,1409 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.32.2 -# Fri Jul 2 21:15:21 2010 -# -CONFIG_ARM=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_GENERIC_GPIO=y -CONFIG_NO_IOPORT=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_HAVE_LATENCYTOP_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_ARCH_HAS_CPUFREQ=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y -CONFIG_VECTORS_BASE=0xffff0000 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" -CONFIG_CONSTRUCTORS=y - -# -# General setup -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_LOCALVERSION="-FriendlyARM" -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set -# CONFIG_AUDIT is not set - -# -# RCU Subsystem -# -CONFIG_TREE_RCU=y -# CONFIG_TREE_PREEMPT_RCU is not set -# CONFIG_RCU_TRACE is not set -CONFIG_RCU_FANOUT=32 -# CONFIG_RCU_FANOUT_EXACT is not set -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_IKCONFIG is not set -CONFIG_LOG_BUF_SHIFT=17 -# CONFIG_GROUP_SCHED is not set -# CONFIG_CGROUPS is not set -# CONFIG_SYSFS_DEPRECATED_V2 is not set -# CONFIG_RELAY is not set -# CONFIG_NAMESPACES is not set -# CONFIG_BLK_DEV_INITRD is not set -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_EMBEDDED=y -CONFIG_UID16=y -CONFIG_SYSCTL_SYSCALL=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_AIO=y - -# -# Kernel Performance Events And Counters -# -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_SLUB_DEBUG=y -# CONFIG_COMPAT_BRK is not set -# CONFIG_SLAB is not set -CONFIG_SLUB=y -# CONFIG_SLOB is not set -# CONFIG_PROFILING is not set -CONFIG_HAVE_OPROFILE=y -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_CLK=y - -# -# GCOV-based kernel profiling -# -CONFIG_SLOW_WORK=y -CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_SLABINFO=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -# CONFIG_MODULES is not set -CONFIG_BLOCK=y -CONFIG_LBDAF=y -CONFIG_BLK_DEV_BSG=y -# CONFIG_BLK_DEV_INTEGRITY is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -# CONFIG_DEFAULT_AS is not set -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -CONFIG_DEFAULT_NOOP=y -CONFIG_DEFAULT_IOSCHED="noop" -# CONFIG_FREEZER is not set - -# -# System Type -# -CONFIG_MMU=y -# CONFIG_ARCH_AAEC2000 is not set -# CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_REALVIEW is not set -# CONFIG_ARCH_VERSATILE is not set -# CONFIG_ARCH_AT91 is not set -# CONFIG_ARCH_CLPS711X is not set -# CONFIG_ARCH_GEMINI is not set -# CONFIG_ARCH_EBSA110 is not set -# CONFIG_ARCH_EP93XX is not set -# CONFIG_ARCH_FOOTBRIDGE is not set -# CONFIG_ARCH_MXC is not set -# CONFIG_ARCH_STMP3XXX is not set -# CONFIG_ARCH_NETX is not set -# CONFIG_ARCH_H720X is not set -# CONFIG_ARCH_NOMADIK is not set -# CONFIG_ARCH_IOP13XX is not set -# CONFIG_ARCH_IOP32X is not set -# CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IXP23XX is not set -# CONFIG_ARCH_IXP2000 is not set -# CONFIG_ARCH_IXP4XX is not set -# CONFIG_ARCH_L7200 is not set -# CONFIG_ARCH_KIRKWOOD is not set -# CONFIG_ARCH_LOKI is not set -# CONFIG_ARCH_MV78XX0 is not set -# CONFIG_ARCH_ORION5X is not set -# CONFIG_ARCH_MMP is not set -# CONFIG_ARCH_KS8695 is not set -# CONFIG_ARCH_NS9XXX is not set -# CONFIG_ARCH_W90X900 is not set -# CONFIG_ARCH_PNX4008 is not set -# CONFIG_ARCH_PXA is not set -# CONFIG_ARCH_MSM is not set -# CONFIG_ARCH_RPC is not set -# CONFIG_ARCH_SA1100 is not set -CONFIG_ARCH_S3C2410=y -# CONFIG_ARCH_S3C64XX is not set -# CONFIG_ARCH_S5PC1XX is not set -# CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_LH7A40X is not set -# CONFIG_ARCH_U300 is not set -# CONFIG_ARCH_DAVINCI is not set -# CONFIG_ARCH_OMAP is not set -# CONFIG_ARCH_BCMRING is not set -CONFIG_PLAT_S3C24XX=y -CONFIG_S3C2410_CLOCK=y -CONFIG_CPU_S3C244X=y -CONFIG_S3C2440_XTAL_12000000=y -# CONFIG_S3C24XX_PWM is not set -CONFIG_S3C24XX_GPIO_EXTRA=0 -CONFIG_S3C2410_DMA=y -# CONFIG_S3C2410_DMA_DEBUG is not set -CONFIG_S3C24XX_ADC=y -CONFIG_PLAT_S3C=y -CONFIG_CPU_LLSERIAL_S3C2440_ONLY=y -CONFIG_CPU_LLSERIAL_S3C2440=y - -# -# Boot options -# -# CONFIG_S3C_BOOT_WATCHDOG is not set -# CONFIG_S3C_BOOT_ERROR_RESET is not set -CONFIG_S3C_BOOT_UART_FORCE_FIFO=y - -# -# Power management -# -CONFIG_S3C_LOWLEVEL_UART_PORT=0 -CONFIG_S3C_GPIO_SPACE=0 -CONFIG_S3C_DMA=y -CONFIG_S3C_DEV_USB_HOST=y -CONFIG_S3C_DEV_NAND=y - -# -# S3C2400 Machines -# -CONFIG_S3C2410_GPIO=y - -# -# S3C2410 Machines -# -# CONFIG_ARCH_SMDK2410 is not set -# CONFIG_ARCH_H1940 is not set -# CONFIG_MACH_N30 is not set -# CONFIG_ARCH_BAST is not set -# CONFIG_MACH_OTOM is not set -# CONFIG_MACH_AML_M5900 is not set -# CONFIG_MACH_TCT_HAMMER is not set -# CONFIG_MACH_VR1000 is not set -# CONFIG_MACH_QT2410 is not set - -# -# S3C2412 Machines -# -# CONFIG_MACH_JIVE is not set -# CONFIG_MACH_SMDK2413 is not set -# CONFIG_MACH_SMDK2412 is not set -# CONFIG_MACH_VSTMS is not set -CONFIG_CPU_S3C2440=y -CONFIG_S3C2440_DMA=y - -# -# S3C2440 Machines -# -# CONFIG_MACH_ANUBIS is not set -# CONFIG_MACH_OSIRIS is not set -# CONFIG_MACH_RX3715 is not set -# CONFIG_ARCH_S3C2440 is not set -# CONFIG_MACH_NEXCODER_2440 is not set -# CONFIG_MACH_AT2440EVB is not set -CONFIG_MACH_MINI2440=y - -# -# S3C2442 Machines -# -# CONFIG_MACH_NEO1973_GTA02 is not set - -# -# S3C2443 Machines -# -# CONFIG_MACH_SMDK2443 is not set - -# -# Processor Type -# -CONFIG_CPU_32=y -CONFIG_CPU_ARM920T=y -CONFIG_CPU_32v4T=y -CONFIG_CPU_ABRT_EV4T=y -CONFIG_CPU_PABRT_LEGACY=y -CONFIG_CPU_CACHE_V4WT=y -CONFIG_CPU_CACHE_VIVT=y -CONFIG_CPU_COPY_V4WB=y -CONFIG_CPU_TLB_V4WBI=y -CONFIG_CPU_CP15=y -CONFIG_CPU_CP15_MMU=y - -# -# Processor Features -# -# CONFIG_ARM_THUMB is not set -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_DISABLE is not set -# CONFIG_CPU_DCACHE_WRITETHROUGH is not set -CONFIG_ARM_L1_CACHE_SHIFT=5 - -# -# Bus support -# -# CONFIG_PCI_SYSCALL is not set -# CONFIG_ARCH_SUPPORTS_MSI is not set -# CONFIG_PCCARD is not set - -# -# Kernel Features -# -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -# CONFIG_PREEMPT_NONE is not set -CONFIG_PREEMPT_VOLUNTARY=y -# CONFIG_PREEMPT is not set -CONFIG_HZ=200 -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set -# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set -# CONFIG_HIGHMEM is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_PAGEFLAGS_EXTENDED=y -CONFIG_SPLIT_PTLOCK_CPUS=4096 -# CONFIG_PHYS_ADDR_T_64BIT is not set -CONFIG_ZONE_DMA_FLAG=0 -CONFIG_VIRT_TO_BUS=y -CONFIG_HAVE_MLOCK=y -CONFIG_HAVE_MLOCKED_PAGE_BIT=y -# CONFIG_KSM is not set -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_ALIGNMENT_TRAP=y -# CONFIG_UACCESS_WITH_MEMCPY is not set - -# -# Boot options -# -CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZBOOT_ROM_BSS=0 -CONFIG_CMDLINE="" -# CONFIG_XIP_KERNEL is not set -# CONFIG_KEXEC is not set - -# -# CPU Power Management -# -# CONFIG_CPU_FREQ is not set -# CONFIG_CPU_IDLE is not set - -# -# Floating point emulation -# - -# -# At least one emulation must be selected -# - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_HAVE_AOUT=y -# CONFIG_BINFMT_AOUT is not set -# CONFIG_BINFMT_MISC is not set - -# -# Power management options -# -# CONFIG_PM is not set -CONFIG_ARCH_SUSPEND_POSSIBLE=y -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set -CONFIG_UNIX=y -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set -# CONFIG_XFRM_SUB_POLICY is not set -# CONFIG_XFRM_MIGRATE is not set -# CONFIG_XFRM_STATISTICS is not set -CONFIG_NET_KEY=y -# CONFIG_NET_KEY_MIGRATE is not set -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_FIB_HASH=y -# CONFIG_IP_PNP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -# CONFIG_SYN_COOKIES is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set -# CONFIG_INET_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -# CONFIG_IPV6 is not set -# CONFIG_NETWORK_SECMARK is not set -# CONFIG_NETFILTER is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_RDS is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_NET_DSA is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set -# CONFIG_PHONET is not set -# CONFIG_IEEE802154 is not set -# CONFIG_NET_SCHED is not set -# CONFIG_DCB is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_CAN is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_AF_RXRPC is not set -# CONFIG_WIRELESS is not set -# CONFIG_WIMAX is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_UEVENT_HELPER_PATH="" -# CONFIG_DEVTMPFS is not set -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_FIRMWARE_IN_KERNEL is not set -CONFIG_EXTRA_FIRMWARE="" -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_CONNECTOR is not set -# CONFIG_MTD is not set -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_UB is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_MG_DISK is not set -# CONFIG_MISC_DEVICES is not set -CONFIG_HAVE_IDE=y -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -# CONFIG_SCSI_TGT is not set -# CONFIG_SCSI_NETLINK is not set -# CONFIG_SCSI_PROC_FS is not set - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -CONFIG_CHR_DEV_SG=y -# CONFIG_CHR_DEV_SCH is not set -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -# CONFIG_SCSI_SCAN_ASYNC is not set - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -# CONFIG_SCSI_LOWLEVEL is not set -# CONFIG_SCSI_DH is not set -# CONFIG_SCSI_OSD_INITIATOR is not set -# CONFIG_ATA is not set -# CONFIG_MD is not set -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_MACVLAN is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set -# CONFIG_VETH is not set -# CONFIG_PHYLIB is not set -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -# CONFIG_AX88796 is not set -# CONFIG_SMC91X is not set -CONFIG_DM9000=y -CONFIG_DM9000_DEBUGLEVEL=4 -# CONFIG_DM9000_FORCE_SIMPLE_PHY_POLL is not set -# CONFIG_ETHOC is not set -# CONFIG_SMC911X is not set -# CONFIG_SMSC911X is not set -# CONFIG_DNET is not set -# CONFIG_IBM_NEW_EMAC_ZMII is not set -# CONFIG_IBM_NEW_EMAC_RGMII is not set -# CONFIG_IBM_NEW_EMAC_TAH is not set -# CONFIG_IBM_NEW_EMAC_EMAC4 is not set -# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set -# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set -# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set -# CONFIG_B44 is not set -# CONFIG_KS8842 is not set -# CONFIG_KS8851_MLL is not set -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -# CONFIG_WLAN is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_WAN is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -# CONFIG_ISDN is not set -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_MOUSEDEV_SCREEN_X=640 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480 -# CONFIG_INPUT_JOYDEV is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_TOUCHSCREEN_S3C2410=y -# CONFIG_TOUCHSCREEN_AD7879_I2C is not set -# CONFIG_TOUCHSCREEN_AD7879 is not set -# CONFIG_TOUCHSCREEN_EETI is not set -# CONFIG_TOUCHSCREEN_FUJITSU is not set -# CONFIG_TOUCHSCREEN_GUNZE is not set -# CONFIG_TOUCHSCREEN_ELO is not set -# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set -# CONFIG_TOUCHSCREEN_MCS5000 is not set -# CONFIG_TOUCHSCREEN_MTOUCH is not set -# CONFIG_TOUCHSCREEN_INEXIO is not set -# CONFIG_TOUCHSCREEN_MK712 is not set -# CONFIG_TOUCHSCREEN_PENMOUNT is not set -# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set -# CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set -# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set -# CONFIG_TOUCHSCREEN_TSC2007 is not set -# CONFIG_TOUCHSCREEN_W90X900 is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_CONSOLE_TRANSLATIONS=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set -# CONFIG_DEVKMEM is not set -CONFIG_MINI2440_HELLO_MODULE=y -CONFIG_LEDS_MINI2440=y -CONFIG_MINI2440_BUTTONS=y -CONFIG_MINI2440_BUZZER=y -CONFIG_MINI2440_ADC=y -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -# CONFIG_SERIAL_8250 is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_SAMSUNG=y -CONFIG_SERIAL_SAMSUNG_UARTS=3 -CONFIG_SERIAL_SAMSUNG_CONSOLE=y -CONFIG_SERIAL_S3C2440=y -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set -# CONFIG_LEGACY_PTYS is not set -# CONFIG_IPMI_HANDLER is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -# CONFIG_I2C_COMPAT is not set -CONFIG_I2C_CHARDEV=y -# CONFIG_I2C_HELPER_AUTO is not set - -# -# I2C Algorithms -# -# CONFIG_I2C_ALGOBIT is not set -# CONFIG_I2C_ALGOPCF is not set -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# - -# -# I2C system bus drivers (mostly embedded / system-on-chip) -# -# CONFIG_I2C_DESIGNWARE is not set -# CONFIG_I2C_GPIO is not set -# CONFIG_I2C_OCORES is not set -CONFIG_I2C_S3C2410=y -# CONFIG_I2C_SIMTEC is not set - -# -# External I2C/SMBus adapter drivers -# -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_TINY_USB is not set - -# -# Other I2C/SMBus bus drivers -# -# CONFIG_I2C_PCA_PLATFORM is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_DS1682 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set -# CONFIG_SPI is not set - -# -# PPS support -# -# CONFIG_PPS is not set -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_GPIOLIB=y -# CONFIG_GPIO_SYSFS is not set - -# -# Memory mapped GPIO expanders: -# - -# -# I2C GPIO expanders: -# -# CONFIG_GPIO_MAX732X is not set -# CONFIG_GPIO_PCA953X is not set -# CONFIG_GPIO_PCF857X is not set - -# -# PCI GPIO expanders: -# - -# -# SPI GPIO expanders: -# - -# -# AC97 GPIO expanders: -# -# CONFIG_W1 is not set -# CONFIG_POWER_SUPPLY is not set -# CONFIG_HWMON is not set -# CONFIG_THERMAL is not set -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -# CONFIG_SOFT_WATCHDOG is not set -CONFIG_S3C2410_WATCHDOG=y - -# -# USB-based Watchdog Cards -# -# CONFIG_USBPCWATCHDOG is not set -CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# -# CONFIG_SSB is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_MFD_ASIC3 is not set -# CONFIG_HTC_EGPIO is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_TPS65010 is not set -# CONFIG_TWL4030_CORE is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_MFD_T7L66XB is not set -# CONFIG_MFD_TC6387XB is not set -# CONFIG_MFD_TC6393XB is not set -# CONFIG_PMIC_DA903X is not set -# CONFIG_MFD_WM8400 is not set -# CONFIG_MFD_WM831X is not set -# CONFIG_MFD_WM8350_I2C is not set -# CONFIG_MFD_PCF50633 is not set -# CONFIG_AB3100_CORE is not set -# CONFIG_REGULATOR is not set -# CONFIG_MEDIA_SUPPORT is not set - -# -# Graphics support -# -# CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set -CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set -# CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set -# CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set -# CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set - -# -# Frame buffer hardware drivers -# -# CONFIG_FB_S1D13XXX is not set -CONFIG_FB_S3C2410=y -CONFIG_FB_S3C2410_DEBUG=y -# CONFIG_FB_S3C2410_T240320 is not set -# CONFIG_FB_S3C2410_N240320 is not set -CONFIG_FB_S3C2410_TFT640480=y -# CONFIG_FB_S3C2410_TFT800480 is not set -# CONFIG_FB_S3C2410_VGA1024768 is not set -# CONFIG_BACKLIGHT_MINI2440 is not set -# CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_MB862XX is not set -# CONFIG_FB_BROADSHEET is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Display device support -# -# CONFIG_DISPLAY_SUPPORT is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y -# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set -CONFIG_FONTS=y -# CONFIG_FONT_8x8 is not set -CONFIG_FONT_8x16=y -# CONFIG_FONT_6x11 is not set -# CONFIG_FONT_7x14 is not set -# CONFIG_FONT_PEARL_8x8 is not set -# CONFIG_FONT_ACORN_8x8 is not set -# CONFIG_FONT_MINI_4x6 is not set -# CONFIG_FONT_SUN8x16 is not set -# CONFIG_FONT_SUN12x22 is not set -# CONFIG_FONT_10x18 is not set -# CONFIG_LOGO is not set -CONFIG_SOUND=y -# CONFIG_SOUND_OSS_CORE is not set -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -CONFIG_SND_JACK=y -# CONFIG_SND_SEQUENCER is not set -# CONFIG_SND_MIXER_OSS is not set -# CONFIG_SND_PCM_OSS is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set -# CONFIG_SND_RAWMIDI_SEQ is not set -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -# CONFIG_SND_EMU10K1_SEQ is not set -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_USB is not set -CONFIG_SND_SOC=y -CONFIG_SND_S3C24XX_SOC=y -CONFIG_SND_S3C24XX_SOC_I2S=y -# CONFIG_SND_S3C24XX_SOC_LN2440SBC_ALC650 is not set -CONFIG_SND_S3C24XX_SOC_S3C24XX_UDA134X=y -# CONFIG_SND_S3C24XX_SOC_SIMTEC_TLV320AIC23 is not set -# CONFIG_SND_S3C24XX_SOC_SIMTEC_HERMES is not set -CONFIG_SND_SOC_I2C_AND_SPI=y -# CONFIG_SND_SOC_ALL_CODECS is not set -CONFIG_SND_SOC_L3=y -CONFIG_SND_SOC_UDA134X=y -# CONFIG_SOUND_PRIME is not set -CONFIG_HID_SUPPORT=y -CONFIG_HID=y -# CONFIG_HIDRAW is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=y -# CONFIG_HID_PID is not set -# CONFIG_USB_HIDDEV is not set - -# -# Special HID drivers -# -# CONFIG_HID_A4TECH is not set -# CONFIG_HID_APPLE is not set -# CONFIG_HID_BELKIN is not set -# CONFIG_HID_CHERRY is not set -# CONFIG_HID_CHICONY is not set -# CONFIG_HID_CYPRESS is not set -# CONFIG_HID_DRAGONRISE is not set -# CONFIG_HID_EZKEY is not set -# CONFIG_HID_KYE is not set -# CONFIG_HID_GYRATION is not set -# CONFIG_HID_TWINHAN is not set -# CONFIG_HID_KENSINGTON is not set -# CONFIG_HID_LOGITECH is not set -# CONFIG_HID_MICROSOFT is not set -# CONFIG_HID_MONTEREY is not set -# CONFIG_HID_NTRIG is not set -# CONFIG_HID_PANTHERLORD is not set -# CONFIG_HID_PETALYNX is not set -# CONFIG_HID_SAMSUNG is not set -# CONFIG_HID_SONY is not set -# CONFIG_HID_SUNPLUS is not set -# CONFIG_HID_GREENASIA is not set -# CONFIG_HID_SMARTJOYPLUS is not set -# CONFIG_HID_TOPSEED is not set -# CONFIG_HID_THRUSTMASTER is not set -# CONFIG_HID_ZEROPLUS is not set -CONFIG_USB_SUPPORT=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -# CONFIG_USB_ARCH_HAS_EHCI is not set -CONFIG_USB=y -# CONFIG_USB_DEBUG is not set -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y - -# -# Miscellaneous USB options -# -# CONFIG_USB_DEVICEFS is not set -# CONFIG_USB_DEVICE_CLASS is not set -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -# CONFIG_USB_MON is not set -# CONFIG_USB_WUSB is not set -# CONFIG_USB_WUSB_CBAF is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_C67X00_HCD is not set -# CONFIG_USB_OXU210HP_HCD is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1760_HCD is not set -# CONFIG_USB_ISP1362_HCD is not set -CONFIG_USB_OHCI_HCD=y -# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set -# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -# CONFIG_USB_SL811_HCD is not set -# CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_HWA_HCD is not set -# CONFIG_USB_MUSB_HDRC is not set - -# -# USB Device Class drivers -# -# CONFIG_USB_ACM is not set -# CONFIG_USB_PRINTER is not set -# CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# - -# -# also be needed; see USB_STORAGE Help for more info -# -CONFIG_USB_STORAGE=y -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_ISD200 is not set -# CONFIG_USB_STORAGE_USBAT is not set -CONFIG_USB_STORAGE_SDDR09=y -CONFIG_USB_STORAGE_SDDR55=y -# CONFIG_USB_STORAGE_JUMPSHOT is not set -# CONFIG_USB_STORAGE_ALAUDA is not set -# CONFIG_USB_STORAGE_ONETOUCH is not set -# CONFIG_USB_STORAGE_KARMA is not set -# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Imaging devices -# -# CONFIG_USB_MDC800 is not set -# CONFIG_USB_MICROTEK is not set - -# -# USB port drivers -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set -# CONFIG_USB_RIO500 is not set -# CONFIG_USB_LEGOTOWER is not set -# CONFIG_USB_LCD is not set -# CONFIG_USB_BERRY_CHARGE is not set -# CONFIG_USB_LED is not set -# CONFIG_USB_CYPRESS_CY7C63 is not set -# CONFIG_USB_CYTHERM is not set -# CONFIG_USB_IDMOUSE is not set -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TRANCEVIBRATOR is not set -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set -# CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_VST is not set -# CONFIG_USB_GADGET is not set - -# -# OTG and related infrastructure -# -# CONFIG_USB_GPIO_VBUS is not set -# CONFIG_NOP_USB_XCEIV is not set -CONFIG_MMC=y -# CONFIG_MMC_DEBUG is not set -# CONFIG_MMC_UNSAFE_RESUME is not set - -# -# MMC/SD/SDIO Card Drivers -# -CONFIG_MMC_BLOCK=y -CONFIG_MMC_BLOCK_BOUNCE=y -# CONFIG_SDIO_UART is not set -# CONFIG_MMC_TEST is not set - -# -# MMC/SD/SDIO Host Controller Drivers -# -# CONFIG_MMC_SDHCI is not set -# CONFIG_MMC_AT91 is not set -# CONFIG_MMC_ATMELMCI is not set -CONFIG_MMC_S3C=y -CONFIG_MMC_S3C_HW_SDIO_IRQ=y -CONFIG_MMC_S3C_PIO=y -# CONFIG_MMC_S3C_DMA is not set -# CONFIG_MMC_S3C_PIODMA is not set -# CONFIG_MEMSTICK is not set -# CONFIG_NEW_LEDS is not set -# CONFIG_ACCESSIBILITY is not set -CONFIG_RTC_LIB=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_HCTOSYS=y -CONFIG_RTC_HCTOSYS_DEVICE="rtc0" -CONFIG_RTC_DEBUG=y - -# -# RTC interfaces -# -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -# CONFIG_RTC_DRV_TEST is not set - -# -# I2C RTC drivers -# -# CONFIG_RTC_DRV_DS1307 is not set -# CONFIG_RTC_DRV_DS1374 is not set -# CONFIG_RTC_DRV_DS1672 is not set -# CONFIG_RTC_DRV_MAX6900 is not set -# CONFIG_RTC_DRV_RS5C372 is not set -# CONFIG_RTC_DRV_ISL1208 is not set -# CONFIG_RTC_DRV_X1205 is not set -# CONFIG_RTC_DRV_PCF8563 is not set -# CONFIG_RTC_DRV_PCF8583 is not set -# CONFIG_RTC_DRV_M41T80 is not set -# CONFIG_RTC_DRV_S35390A is not set -# CONFIG_RTC_DRV_FM3130 is not set -# CONFIG_RTC_DRV_RX8581 is not set -# CONFIG_RTC_DRV_RX8025 is not set - -# -# SPI RTC drivers -# - -# -# Platform RTC drivers -# -# CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_DS1286 is not set -# CONFIG_RTC_DRV_DS1511 is not set -# CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_DS1742 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T35 is not set -# CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_BQ4802 is not set -# CONFIG_RTC_DRV_V3020 is not set - -# -# on-CPU RTC drivers -# -CONFIG_RTC_DRV_S3C=y -# CONFIG_DMADEVICES is not set -# CONFIG_AUXDISPLAY is not set -# CONFIG_UIO is not set - -# -# TI VLYNQ -# -# CONFIG_STAGING is not set - -# -# File systems -# -# CONFIG_EXT2_FS is not set -# CONFIG_EXT3_FS is not set -CONFIG_EXT4_FS=y -CONFIG_EXT4_FS_XATTR=y -# CONFIG_EXT4_FS_POSIX_ACL is not set -# CONFIG_EXT4_FS_SECURITY is not set -CONFIG_EXT4_DEBUG=y -CONFIG_JBD2=y -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set -# CONFIG_NILFS2_FS is not set -CONFIG_FILE_LOCKING=y -CONFIG_FSNOTIFY=y -# CONFIG_DNOTIFY is not set -# CONFIG_INOTIFY is not set -CONFIG_INOTIFY_USER=y -# CONFIG_QUOTA is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_FS is not set -CONFIG_GENERIC_ACL=y - -# -# Caches -# -# CONFIG_FSCACHE is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=y -# CONFIG_MSDOS_FS is not set -CONFIG_VFAT_FS=y -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_CONFIGFS_FS=y -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -# CONFIG_NFS_V3_ACL is not set -# CONFIG_NFS_V4 is not set -# CONFIG_NFSD is not set -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -# CONFIG_RPCSEC_GSS_KRB5 is not set -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -CONFIG_CIFS=y -# CONFIG_CIFS_STATS is not set -# CONFIG_CIFS_WEAK_PW_HASH is not set -# CONFIG_CIFS_XATTR is not set -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=y -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -# CONFIG_NLS_CODEPAGE_850 is not set -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -CONFIG_NLS_CODEPAGE_936=y -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ASCII is not set -CONFIG_NLS_ISO8859_1=y -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -# CONFIG_NLS_KOI8_R is not set -# CONFIG_NLS_KOI8_U is not set -CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -# CONFIG_ENABLE_WARN_DEPRECATED is not set -# CONFIG_ENABLE_MUST_CHECK is not set -CONFIG_FRAME_WARN=1024 -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_UNUSED_SYMBOLS is not set -# CONFIG_DEBUG_FS is not set -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_KERNEL is not set -# CONFIG_SLUB_DEBUG_ON is not set -# CONFIG_SLUB_STATS is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_DEBUG_MEMORY_INIT is not set -CONFIG_FRAME_POINTER=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -# CONFIG_LATENCYTOP is not set -# CONFIG_SYSCTL_SYSCALL_CHECK is not set -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_TRACING_SUPPORT=y -# CONFIG_FTRACE is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -# CONFIG_ARM_UNWIND is not set -# CONFIG_DEBUG_USER is not set -CONFIG_DEBUG_S3C_UART=0 - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set -# CONFIG_SECURITYFS is not set -# CONFIG_SECURITY_FILE_CAPABILITIES is not set -CONFIG_CRYPTO=y - -# -# Crypto core or helper -# -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_PCOMP=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y -# CONFIG_CRYPTO_GF128MUL is not set -# CONFIG_CRYPTO_NULL is not set -CONFIG_CRYPTO_WORKQUEUE=y -# CONFIG_CRYPTO_CRYPTD is not set -# CONFIG_CRYPTO_AUTHENC is not set - -# -# Authenticated Encryption with Associated Data -# -# CONFIG_CRYPTO_CCM is not set -# CONFIG_CRYPTO_GCM is not set -# CONFIG_CRYPTO_SEQIV is not set - -# -# Block modes -# -# CONFIG_CRYPTO_CBC is not set -# CONFIG_CRYPTO_CTR is not set -# CONFIG_CRYPTO_CTS is not set -# CONFIG_CRYPTO_ECB is not set -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set - -# -# Hash modes -# -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_VMAC is not set - -# -# Digest -# -CONFIG_CRYPTO_CRC32C=y -# CONFIG_CRYPTO_GHASH is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_RMD128 is not set -# CONFIG_CRYPTO_RMD160 is not set -# CONFIG_CRYPTO_RMD256 is not set -# CONFIG_CRYPTO_RMD320 is not set -CONFIG_CRYPTO_SHA1=y -# CONFIG_CRYPTO_SHA256 is not set -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -# CONFIG_CRYPTO_AES is not set -# CONFIG_CRYPTO_ANUBIS is not set -# CONFIG_CRYPTO_ARC4 is not set -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_CAMELLIA is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -# CONFIG_CRYPTO_DES is not set -# CONFIG_CRYPTO_FCRYPT is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set -# CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -# CONFIG_CRYPTO_TWOFISH is not set - -# -# Compression -# -# CONFIG_CRYPTO_DEFLATE is not set -# CONFIG_CRYPTO_ZLIB is not set -# CONFIG_CRYPTO_LZO is not set - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set -# CONFIG_CRYPTO_HW is not set -# CONFIG_BINARY_PRINTF is not set - -# -# Library routines -# -CONFIG_BITREVERSE=y -CONFIG_GENERIC_FIND_LAST_BIT=y -CONFIG_CRC_CCITT=y -CONFIG_CRC16=y -# CONFIG_CRC_T10DIF is not set -CONFIG_CRC_ITU_T=y -CONFIG_CRC32=y -# CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_DMA=y -CONFIG_NLATTR=y diff --git a/board/qemu/arm-versatile/linux-2.6.38.config b/board/qemu/arm-versatile/linux-2.6.38.config deleted file mode 100644 index 5f58b97..0000000 --- a/board/qemu/arm-versatile/linux-2.6.38.config +++ /dev/null @@ -1,89 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_BLK_DEV_INITRD=y -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MACH_VERSATILE_AB=y -CONFIG_PCI=y -CONFIG_AEABI=y -# CONFIG_OABI_COMPAT is not set -CONFIG_LEDS=y -CONFIG_LEDS_CPU=y -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="root=1f03 mem=32M" -CONFIG_VFP=y -CONFIG_PM=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -CONFIG_MTD=y -CONFIG_MTD_PARTITIONS=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_ARM_INTEGRATOR=y -CONFIG_BLK_DEV_RAM=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_SCSI_SYM53C8XX_2=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_SMC91X=y -# CONFIG_SERIO_SERPORT is not set -CONFIG_SERIO_AMBAKMI=y -CONFIG_SERIAL_8250=m -CONFIG_SERIAL_8250_EXTENDED=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_SHARE_IRQ=y -CONFIG_SERIAL_8250_RSA=y -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -CONFIG_LEGACY_PTY_COUNT=16 -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=m -# CONFIG_HWMON is not set -CONFIG_FB=y -CONFIG_FB_ARMCLCD=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FONTS=y -CONFIG_FONT_ACORN_8x8=y -CONFIG_SOUND=y -CONFIG_SND=m -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_ARMAACI=m -CONFIG_MMC=y -CONFIG_MMC_ARMMMCI=m -CONFIG_EXT2_FS=y -CONFIG_VFAT_FS=m -CONFIG_TMPFS=y -CONFIG_JFFS2_FS=y -CONFIG_CRAMFS=y -CONFIG_MINIX_FS=y -CONFIG_ROMFS_FS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -CONFIG_NFSD=y -CONFIG_NFSD_V3=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_ISO8859_1=m -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y diff --git a/board/qemu/mipsel-malta/linux-2.6.38.config b/board/qemu/mipsel-malta/linux-2.6.38.config deleted file mode 100644 index b51de4b..0000000 --- a/board/qemu/mipsel-malta/linux-2.6.38.config +++ /dev/null @@ -1,77 +0,0 @@ -CONFIG_MIPS_MALTA=y -CONFIG_CPU_LITTLE_ENDIAN=y -CONFIG_CPU_MIPS32_R2=y -CONFIG_MIPS_MT_SMP=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_HZ_100=y -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_LOG_BUF_SHIFT=15 -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_RELAY=y -CONFIG_NAMESPACES=y -CONFIG_UTS_NS=y -CONFIG_IPC_NS=y -CONFIG_PID_NS=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_EMBEDDED=y -# CONFIG_SYSCTL_SYSCALL is not set -# CONFIG_COMPAT_BRK is not set -CONFIG_SLAB=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_PCI=y -CONFIG_PM=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -# CONFIG_WIRELESS is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -# CONFIG_MISC_DEVICES is not set -CONFIG_IDE=y -CONFIG_BLK_DEV_IDECD=y -CONFIG_IDE_GENERIC=y -CONFIG_BLK_DEV_GENERIC=y -CONFIG_BLK_DEV_PIIX=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_NET_PCI=y -CONFIG_PCNET32=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -# CONFIG_WLAN is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO_I8042 is not set -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -# CONFIG_MFD_SUPPORT is not set -CONFIG_FB=y -CONFIG_FB_CIRRUS=y -# CONFIG_VGA_CONSOLE is not set -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -CONFIG_QUOTA=y -CONFIG_PROC_KCORE=y -CONFIG_TMPFS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -CONFIG_ROOT_NFS=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set diff --git a/board/qemu/powerpc-g3beige/linux-2.6.36.config b/board/qemu/powerpc-g3beige/linux-2.6.36.config deleted file mode 100644 index 098dae3..0000000 --- a/board/qemu/powerpc-g3beige/linux-2.6.36.config +++ /dev/null @@ -1,86 +0,0 @@ -CONFIG_ALTIVEC=y -CONFIG_EXPERIMENTAL=y -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_COMPAT_BRK=y -CONFIG_SLAB=y -CONFIG_LBDAF=y -CONFIG_PPC_PMAC=y -CONFIG_PPC_OF_BOOT_TRAMPOLINE=y -CONFIG_PPC601_SYNC_FIX=y -CONFIG_HIGHMEM=y -CONFIG_NO_HZ=y -CONFIG_BINFMT_ELF=y -CONFIG_PROC_DEVICETREE=y -CONFIG_PM=y -CONFIG_SECCOMP=y -CONFIG_PCCARD=y -CONFIG_PCMCIA=y -CONFIG_PCMCIA_LOAD_CIS=y -CONFIG_PCMCIA_IOCTL=y -CONFIG_YENTA=y -CONFIG_ADVANCED_OPTIONS=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_INET_LRO=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y -CONFIG_BLK_DEV=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_IDE=y -CONFIG_IDE_GD=y -CONFIG_IDE_GD_ATA=y -CONFIG_BLK_DEV_IDECD=y -CONFIG_IDE_PROC_FS=y -CONFIG_BLK_DEV_CMD64X=y -CONFIG_BLK_DEV_IDE_PMAC=y -CONFIG_IEEE1394=y -CONFIG_IEEE1394_OHCI1394=y -CONFIG_IEEE1394_ETH1394=y -CONFIG_IEEE1394_RAWIO=y -CONFIG_IEEE1394_VIDEO1394=y -CONFIG_IEEE1394_DV1394=y -CONFIG_MACINTOSH_DRIVERS=y -CONFIG_ADB=y -CONFIG_ADB_CUDA=y -CONFIG_ADB_PMU=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_MACE=y -CONFIG_BMAC=y -CONFIG_HAPPYMEAL=y -CONFIG_SUNGEM=y -CONFIG_CASSINI=y -CONFIG_NET_PCI=y -CONFIG_PCNET32=y -CONFIG_NE2K_PCI=y -CONFIG_8139CP=y -CONFIG_8139TOO=y -CONFIG_8139TOO_PIO=y -CONFIG_SERIO=y -CONFIG_SERIAL_PMACZILOG=y -CONFIG_SERIAL_PMACZILOG_TTYS=y -CONFIG_SERIAL_PMACZILOG_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_SSB=y -CONFIG_SSB_PCIHOST=y -CONFIG_SSB_PCMCIAHOST=y -CONFIG_SSB_DRIVER_PCICORE=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -CONFIG_DNOTIFY=y -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -CONFIG_PROC_KCORE=y -CONFIG_TMPFS=y -CONFIG_MISC_FILESYSTEMS=y -CONFIG_SQUASHFS=y -CONFIG_LIBCRC32C=y -CONFIG_BOOTX_TEXT=y -CONFIG_CRYPTO_HW=y diff --git a/board/qemu/sh4-r2d/kernel-patches/linux-06-17-SH-Add-missing-consts-to-sys_execve-declaration.patch b/board/qemu/sh4-r2d/kernel-patches/linux-06-17-SH-Add-missing-consts-to-sys_execve-declaration.patch deleted file mode 100644 index f702abe..0000000 --- a/board/qemu/sh4-r2d/kernel-patches/linux-06-17-SH-Add-missing-consts-to-sys_execve-declaration.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/arch/sh/include/asm/syscalls_32.h b/arch/sh/include/asm/syscalls_32.h -index be201fd..454538a 100644 ---- a/arch/sh/include/asm/syscalls_32.h -+++ b/arch/sh/include/asm/syscalls_32.h -@@ -19,8 +19,10 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, - asmlinkage int sys_vfork(unsigned long r4, unsigned long r5, - unsigned long r6, unsigned long r7, - struct pt_regs __regs); --asmlinkage int sys_execve(const char __user *ufilename, char __user * __user *uargv, -- char __user * __user *uenvp, unsigned long r7, -+asmlinkage int sys_execve(const char __user *ufilename, -+ const char __user *const __user *uargv, -+ const char __user *const __user *uenvp, -+ unsigned long r7, - struct pt_regs __regs); - asmlinkage int sys_sigsuspend(old_sigset_t mask, unsigned long r5, - unsigned long r6, unsigned long r7, diff --git a/board/qemu/sh4-r2d/kernel-patches/linux-sh-fix-kconfig-warning.patch b/board/qemu/sh4-r2d/kernel-patches/linux-sh-fix-kconfig-warning.patch deleted file mode 100644 index 0ac07f2..0000000 --- a/board/qemu/sh4-r2d/kernel-patches/linux-sh-fix-kconfig-warning.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig -index 33990fa..06645b6 100644 ---- a/arch/sh/Kconfig -+++ b/arch/sh/Kconfig -@@ -45,7 +45,7 @@ config SUPERH32 - select HAVE_ARCH_KGDB - select HAVE_HW_BREAKPOINT - select HAVE_MIXED_BREAKPOINTS_REGS -- select PERF_EVENTS if HAVE_HW_BREAKPOINT -+ select PERF_EVENTS - select ARCH_HIBERNATION_POSSIBLE if MMU - - config SUPERH64 diff --git a/board/qemu/sh4-r2d/linux-2.6.36.config b/board/qemu/sh4-r2d/linux-2.6.36.config deleted file mode 100644 index 638e4e0..0000000 --- a/board/qemu/sh4-r2d/linux-2.6.36.config +++ /dev/null @@ -1,106 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSVIPC=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -# CONFIG_SYSCTL_SYSCALL is not set -CONFIG_SLAB=y -CONFIG_PROFILING=y -CONFIG_OPROFILE=y -CONFIG_MODULES=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_CPU_SUBTYPE_SH7751R=y -CONFIG_MEMORY_START=0x0c000000 -CONFIG_FLATMEM_MANUAL=y -CONFIG_SH_RTS7751R2D=y -CONFIG_RTS7751R2D_PLUS=y -CONFIG_HEARTBEAT=y -CONFIG_PCI=y -CONFIG_HOTPLUG_PCI=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -# CONFIG_INET_LRO is not set -# CONFIG_IPV6 is not set -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_FW_LOADER=m -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_SD=y -CONFIG_ATA=y -CONFIG_PATA_PLATFORM=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_NET_PCI=y -CONFIG_8139CP=y -CONFIG_8139TOO=y -# CONFIG_8139TOO_PIO is not set -# CONFIG_WLAN is not set -CONFIG_INPUT_FF_MEMLESS=m -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_VT_HW_CONSOLE_BINDING=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_SH_SCI=y -CONFIG_SERIAL_SH_SCI_NR_UARTS=1 -CONFIG_SERIAL_SH_SCI_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_SPI=y -CONFIG_SPI_SH_SCI=y -CONFIG_MFD_SM501=y -CONFIG_VIDEO_OUTPUT_CONTROL=m -CONFIG_FB=y -CONFIG_FB_SH_MOBILE_LCDC=m -CONFIG_FB_SH_MOBILE_HDMI=m -CONFIG_FB_SM501=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -# CONFIG_LOGO_LINUX_MONO is not set -# CONFIG_LOGO_LINUX_VGA16 is not set -# CONFIG_LOGO_LINUX_CLUT224 is not set -# CONFIG_LOGO_SUPERH_MONO is not set -# CONFIG_LOGO_SUPERH_VGA16 is not set -CONFIG_SOUND=y -CONFIG_SND=m -CONFIG_SND_YMFPCI=m -CONFIG_SOUND_PRIME=m -CONFIG_HID_A4TECH=y -CONFIG_HID_APPLE=y -CONFIG_HID_BELKIN=y -CONFIG_HID_CHERRY=y -CONFIG_HID_CHICONY=y -CONFIG_HID_CYPRESS=y -CONFIG_HID_EZKEY=y -CONFIG_HID_GYRATION=y -CONFIG_HID_LOGITECH=y -CONFIG_HID_MICROSOFT=y -CONFIG_HID_MONTEREY=y -CONFIG_HID_PANTHERLORD=y -CONFIG_HID_PETALYNX=y -CONFIG_HID_SAMSUNG=y -CONFIG_HID_SONY=y -CONFIG_HID_SUNPLUS=y -CONFIG_USB=y -CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_USB_LIBUSUAL=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_R9701=y -CONFIG_EXT2_FS=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_PROC_KCORE=y -CONFIG_TMPFS=y -CONFIG_MINIX_FS=y -CONFIG_NLS_CODEPAGE_932=y -CONFIG_DEBUG_FS=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRC_T10DIF=y diff --git a/board/qemu/x86/linux-2.6.36.config b/board/qemu/x86/linux-2.6.36.config deleted file mode 100644 index a578041..0000000 --- a/board/qemu/x86/linux-2.6.36.config +++ /dev/null @@ -1,71 +0,0 @@ -CONFIG_EXPERIMENTAL=y -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_RCU_FANOUT=32 -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -# CONFIG_COMPAT_BRK is not set -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -# CONFIG_X86_EXTENDED_PLATFORM is not set -# CONFIG_SCHED_OMIT_FRAME_POINTER is not set -# CONFIG_NO_BOOTMEM is not set -# CONFIG_X86_RESERVE_LOW_64K is not set -# CONFIG_MTRR_SANITIZER is not set -# CONFIG_SECCOMP is not set -# CONFIG_RELOCATABLE is not set -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -# CONFIG_INET_DIAG is not set -# CONFIG_IPV6 is not set -# CONFIG_WIRELESS is not set -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -# CONFIG_FIRMWARE_IN_KERNEL is not set -# CONFIG_BLK_DEV is not set -# CONFIG_MISC_DEVICES is not set -CONFIG_BLK_DEV_SD=y -CONFIG_ATA=y -CONFIG_ATA_PIIX=y -CONFIG_NETDEVICES=y -CONFIG_NET_ETHERNET=y -CONFIG_NET_PCI=y -CONFIG_NE2K_PCI=y -CONFIG_8139CP=y -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -# CONFIG_WLAN is not set -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO_SERPORT is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_HWMON is not set -# CONFIG_MFD_SUPPORT is not set -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -# CONFIG_X86_PLATFORM_DEVICES is not set -# CONFIG_DMIID is not set -CONFIG_EXT2_FS=y -# CONFIG_DNOTIFY is not set -# CONFIG_INOTIFY_USER is not set -# CONFIG_MISC_FILESYSTEMS is not set -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -# CONFIG_ENABLE_WARN_DEPRECATED is not set -# CONFIG_ENABLE_MUST_CHECK is not set -CONFIG_FRAME_WARN=1024 -# CONFIG_UNUSED_SYMBOLS is not set -# CONFIG_FRAME_POINTER is not set -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -# CONFIG_X86_VERBOSE_BOOTUP is not set -# CONFIG_VIRTUALIZATION is not set diff --git a/boot/grub/grub.400-nic_update2.patch.bz2 b/boot/grub/grub.400-nic_update2.patch.bz2 deleted file mode 100644 index 8592f15..0000000 Binary files a/boot/grub/grub.400-nic_update2.patch.bz2 and /dev/null differ diff --git a/boot/grub2/Config.in b/boot/grub2/Config.in deleted file mode 100644 index 1301b5b..0000000 --- a/boot/grub2/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_TARGET_GRUB2 - bool "grub2" - # Only supports PC, Mac (Power, x86 and x86-64), Pegasos - depends on BR2_i386 || BR2_powerpc - # Build process is broken (./configure doesn't work, Ruby - # required, etc.) - depends on BROKEN - help - The GRand Unified Bootloader for x86 systems, take #2. diff --git a/boot/grub2/grub2.mk b/boot/grub2/grub2.mk deleted file mode 100644 index f939d9a..0000000 --- a/boot/grub2/grub2.mk +++ /dev/null @@ -1,93 +0,0 @@ -############################################################# -# -# grub2 -# -# TODO -# -# * grub2's autogen uses ruby, which isn't part of the core Debian -# installation. So either decide it is a requirement for Buildroot, -# or build it for the host. -# -# * improve the installation procedure. For the moment, it just -# installs everything in $(TARGET_DIR). -# -############################################################# -GRUB2_SOURCE:=grub2_1.98.orig.tar.gz -GRUB2_PATCH:=grub2_1.98-1.diff.gz -GRUB2_SITE=$(BR2_DEBIAN_MIRROR)/debian/pool/main/g/grub2 -GRUB2_PATCH_SITE:=$(GRUB2_SITE) -GRUB2_CAT:=$(ZCAT) -GRUB2_DIR:=$(BUILD_DIR)/grub-1.98 - -GRUB2_CFLAGS=-DSUPPORT_LOOPDEV -ifeq ($(BR2_LARGEFILE),) -GRUB2_CFLAGS+=-U_FILE_OFFSET_BITS -endif - -$(DL_DIR)/$(GRUB2_SOURCE): - $(call DOWNLOAD,$(GRUB2_SITE),$(GRUB2_SOURCE)) - -$(DL_DIR)/$(GRUB2_PATCH): - $(call DOWNLOAD,$(GRUB2_PATCH_SITE),$(GRUB2_PATCH)) - -grub2-source: $(DL_DIR)/$(GRUB2_SOURCE) $(DL_DIR)/$(GRUB2_PATCH) - -$(GRUB2_DIR)/.unpacked: $(DL_DIR)/$(GRUB2_SOURCE) $(DL_DIR)/$(GRUB2_PATCH) - mkdir -p $(@D) - $(GRUB2_CAT) $(DL_DIR)/$(GRUB2_SOURCE) | tar $(TAR_STRIP_COMPONENTS)=1 -C $(@D) -xvf - - toolchain/patch-kernel.sh $(@D) $(DL_DIR) $(GRUB2_PATCH) - for i in `grep -v "^#" $(@D)/debian/patches/00list`; do \ - cat $(@D)/debian/patches/$$i | patch -p1 -d $(@D); \ - done - toolchain/patch-kernel.sh $(@D) boot/grub2 grub-\*.patch - touch $@ - -$(GRUB2_DIR)/.configured: $(GRUB2_DIR)/.unpacked - (cd $(GRUB2_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) ; \ - ./autogen.sh ; \ - $(TARGET_CONFIGURE_OPTS) \ - $(TARGET_CONFIGURE_ARGS) \ - CPPFLAGS="$(GRUB2_CFLAGS)" \ - grub_cv_i386_check_nested_functions=no \ - ./configure $(QUIET) \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/ \ - --mandir=/usr/man \ - --infodir=/usr/info \ - --disable-grub-mkfont \ - --disable-grub-fstest \ - --disable-grub-emu-usb \ - --disable-werror \ - $(DISABLE_LARGEFILE) \ - $(GRUB2_CONFIG-y) \ - ) - touch $@ - -$(GRUB2_DIR)/.compiled: $(GRUB2_DIR)/.configured - $(MAKE) CC="$(TARGET_CC)" -C $(@D) - touch $@ - -$(GRUB2_DIR)/.installed: $(GRUB2_DIR)/.compiled - $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install - touch $@ - -grub2: host-automake host-autoconf $(GRUB2_DIR)/.installed - -grub2-clean: - $(MAKE) DESTDIR=$(TARGET_DIR) CC="$(TARGET_CC)" -C $(GRUB2_DIR) uninstall - -$(MAKE) -C $(GRUB2_DIR) clean - -grub2-dirclean: - rm -rf $(GRUB2_DIR) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_TARGET_GRUB2),y) -TARGETS+=grub2 -endif diff --git a/boot/u-boot/Config.in b/boot/u-boot/Config.in deleted file mode 100644 index ecb86f9..0000000 --- a/boot/u-boot/Config.in +++ /dev/null @@ -1,148 +0,0 @@ -menuconfig BR2_TARGET_UBOOT - bool "U-Boot" - help - Build "Das U-Boot" Boot Monitor - -if BR2_TARGET_UBOOT -config BR2_TARGET_UBOOT_BOARDNAME - string "U-Boot board name" - help - One of U-Boot supported boards to be built. - This will be suffixed with _config to meet U-Boot standard naming. - -choice - prompt "U-Boot Version" - default BR2_TARGET_UBOOT_2011_03 - help - Select the specific U-Boot version you want to use - -config BR2_TARGET_UBOOT_2011_03 - bool "2011.03" - -config BR2_TARGET_UBOOT_2010_12 - bool "2010.12" - -config BR2_TARGET_UBOOT_2010_09 - bool "2010.09" - -config BR2_TARGET_UBOOT_2010_06 - bool "2010.06" - -config BR2_TARGET_UBOOT_2010_03 - bool "2010.03" - -config BR2_TARGET_UBOOT_CUSTOM_TARBALL - bool "Custom tarball" - -endchoice - -if BR2_TARGET_UBOOT_CUSTOM_TARBALL - -config BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION - string "URL of custom U-Boot tarball" - -endif - -config BR2_TARGET_UBOOT_VERSION - string - default "2011.03" if BR2_TARGET_UBOOT_2011_03 - default "2010.12" if BR2_TARGET_UBOOT_2010_12 - default "2010.09" if BR2_TARGET_UBOOT_2010_09 - default "2010.06" if BR2_TARGET_UBOOT_2010_06 - default "2010.03" if BR2_TARGET_UBOOT_2010_03 - default "custom" if BR2_TARGET_UBOOT_CUSTOM_TARBALL - -config BR2_TARGET_UBOOT_EXTRAVERSION - string "U-Boot Extraversion" - default "" - help - U-Boot extraversion string - - -config BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR - string "custom patch dir" - help - If your board requires custom patches, add the path to the - directory containing the patches here. The patches must be - named u-boot--.patch. - - Most users may leave this empty - -choice - prompt "U-Boot binary format" - -config BR2_TARGET_UBOOT_FORMAT_BIN - bool "u-boot.bin" - -config BR2_TARGET_UBOOT_FORMAT_KWB - depends on BR2_arm - bool "u-boot.kwb (Marvell)" - -config BR2_TARGET_UBOOT_FORMAT_LDR - depends on BR2_bfin - bool "u-boot.ldr" - -endchoice - -config BR2_TARGET_UBOOT_TOOL_MKIMAGE - bool "mkimage tool in target" - help - Install mkimage tool in target. - -config BR2_TARGET_UBOOT_TOOL_ENV - bool "fw_printenv tool in target" - help - Install fw_printenv / fw_setenv tools in target. - -menuconfig BR2_TARGET_UBOOT_NETWORK - bool "Network Settings" - default y - help - Network settings for U-boot - -if BR2_TARGET_UBOOT_NETWORK - -config BR2_TARGET_UBOOT_SERVERIP - string "server ip" - default "10.175.196.221" - help - TFTP server ip address - -config BR2_TARGET_UBOOT_IPADDR - string "ip address" - default "10.175.196.18" - help - Target ip address - -config BR2_TARGET_UBOOT_GATEWAY - string "gateway ip" - default "10.175.196.1" - help - Gateway ip address - -config BR2_TARGET_UBOOT_NETMASK - string "netmask" - default "255.255.255.0" - help - Network Mask - -config BR2_TARGET_UBOOT_ETHADDR - string "ethernet address" - default "04:25:fe:ed:00:18" - help - Target MAC address for the ethernet interface. - This should be changed for production units - -config BR2_TARGET_UBOOT_ETH1ADDR - string "ethernet 2 address" - help - Target MAC address for the second ethernet interface. - -endif # BR2_TARGET_UBOOT_NETWORK - -config BR2_TARGET_UBOOT_DEFAULT_UENV - bool "Generate default uEnv.txt" - help - Generate uEnv.txt file with default U-Boot parameters. - -endif # BR2_TARGET_UBOOT diff --git a/boot/u-boot/u-boot-2010.03-fix-avr32.patch b/boot/u-boot/u-boot-2010.03-fix-avr32.patch deleted file mode 100644 index 1f9aab8..0000000 --- a/boot/u-boot/u-boot-2010.03-fix-avr32.patch +++ /dev/null @@ -1,5 +0,0 @@ -diff -Naur u-boot-2010.03-orig/include/asm-avr32/unaligned.h u-boot-2010.03/include/asm-avr32/unaligned.h ---- u-boot-2010.03-orig/include/asm-avr32/unaligned.h 1969-12-31 21:00:00.000000000 -0300 -+++ u-boot-2010.03/include/asm-avr32/unaligned.h 2010-06-22 23:09:49.000000000 -0300 -@@ -0,0 +1 @@ -+#include diff --git a/boot/u-boot/u-boot-2011.03-beagleboard-xm-fix-default-console-name.patch b/boot/u-boot/u-boot-2011.03-beagleboard-xm-fix-default-console-name.patch deleted file mode 100644 index 8bab0f9..0000000 --- a/boot/u-boot/u-boot-2011.03-beagleboard-xm-fix-default-console-name.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 4194bd4bc2af937a20782a4321a91a8cc431d32c Mon Sep 17 00:00:00 2001 -From: Maksym Galemin -Date: Sat, 28 May 2011 11:43:10 +1000 -Subject: [PATCH] Issue 1: fixed default console name. - ---- - include/configs/omap3_beagle.h | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h -index 5cfa4cb..b6491d7 100644 ---- a/include/configs/omap3_beagle.h -+++ b/include/configs/omap3_beagle.h -@@ -184,12 +184,12 @@ - /* partition */ - - /* Environment information */ --#define CONFIG_BOOTDELAY 10 -+#define CONFIG_BOOTDELAY 3 - - #define CONFIG_EXTRA_ENV_SETTINGS \ - "loadaddr=0x82000000\0" \ - "usbtty=cdc_acm\0" \ -- "console=ttyS2,115200n8\0" \ -+ "console=ttyO2,115200n8\0" \ - "mpurate=500\0" \ - "vram=12M\0" \ - "dvimode=1024x768MR-16@60\0" \ --- -1.7.4.1 - diff --git a/boot/u-boot/u-boot-2011.03-drop-configh.patch b/boot/u-boot/u-boot-2011.03-drop-configh.patch deleted file mode 100644 index bf524c9..0000000 --- a/boot/u-boot/u-boot-2011.03-drop-configh.patch +++ /dev/null @@ -1,27 +0,0 @@ -"make tools-all" should allow building tools such as mkimage and the new -imximage without any config, but imximage.c currently fails to build -with: -imximage.h:27:20: error: config.h: No such file or directory - -config.h is not needed in imximage.h nor in imximage.c, and imximage.h -is only included from imximage.c, so drop this include to fix the build. - -Signed-off-by: Lo?c Minier ---- - tools/imximage.h | 2 -- - 1 files changed, 0 insertions(+), 2 deletions(-) - -diff --git a/tools/imximage.h b/tools/imximage.h -index 38ca6be..d126a46 100644 ---- a/tools/imximage.h -+++ b/tools/imximage.h -@@ -24,8 +24,6 @@ - #ifndef _IMXIMAGE_H_ - #define _IMXIMAGE_H_ - --#include -- - #define MAX_HW_CFG_SIZE_V2 121 /* Max number of registers imx can set for v2 */ - #define MAX_HW_CFG_SIZE_V1 60 /* Max number of registers imx can set for v1 */ - #define APP_CODE_BARKER 0xB1 --- 1.7.2.3 diff --git a/boot/u-boot/u-boot.mk b/boot/u-boot/u-boot.mk deleted file mode 100644 index c29a0ee..0000000 --- a/boot/u-boot/u-boot.mk +++ /dev/null @@ -1,209 +0,0 @@ -############################################################# -# -# U-Boot -# -############################################################# -U_BOOT_VERSION:=$(call qstrip,$(BR2_TARGET_UBOOT_VERSION)) -U_BOOT_BOARD_NAME:=$(call qstrip,$(BR2_TARGET_UBOOT_BOARDNAME)) - -# U-Boot may not be selected in the configuration, but mkimage might -# be needed to build/prepare a kernel image. In this case, we just -# pick some random stable U-Boot version that will be used just to -# build mkimage. -ifeq ($(U_BOOT_VERSION),) -U_BOOT_VERSION=2011.03 -endif - -ifeq ($(U_BOOT_VERSION),custom) -# Handle custom U-Boot tarballs as specified by the configuration -U_BOOT_TARBALL=$(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION)) -U_BOOT_SITE:=$(dir $(U_BOOT_TARBALL)) -U_BOOT_SOURCE:=$(notdir $(U_BOOT_TARBALL)) -else -# Handle stable official U-Boot versions -U_BOOT_SITE:=ftp://ftp.denx.de/pub/u-boot -U_BOOT_SOURCE:=u-boot-$(U_BOOT_VERSION).tar.bz2 -endif - -U_BOOT_DIR:=$(BUILD_DIR)/u-boot-$(U_BOOT_VERSION) -U_BOOT_CAT:=$(BZCAT) - -ifeq ($(BR2_TARGET_UBOOT_FORMAT_KWB),y) -U_BOOT_BIN:=u-boot.kwb -U_BOOT_MAKE_OPT:=$(U_BOOT_BIN) -else ifeq ($(BR2_TARGET_UBOOT_FORMAT_LDR),y) -U_BOOT_BIN:=u-boot.ldr -else -U_BOOT_BIN:=u-boot.bin -endif - -MKIMAGE:=$(HOST_DIR)/usr/bin/mkimage - -U_BOOT_TARGETS:=$(BINARIES_DIR)/$(U_BOOT_BIN) $(MKIMAGE) -U_BOOT_ARCH=$(KERNEL_ARCH) - -# u-boot in the past used arch=ppc for powerpc -ifneq ($(findstring x2010.03,x$(U_BOOT_VERSION)),) -U_BOOT_ARCH=$(KERNEL_ARCH:powerpc=ppc) -endif - -U_BOOT_INC_CONF_FILE:=$(U_BOOT_DIR)/include/config.h - -ifeq ($(BR2_TARGET_UBOOT_TOOL_MKIMAGE),y) -U_BOOT_TARGETS+=$(TARGET_DIR)/usr/bin/mkimage -endif -ifeq ($(BR2_TARGET_UBOOT_TOOL_ENV),y) -U_BOOT_TARGETS+=$(TARGET_DIR)/usr/sbin/fw_printenv -endif - -U_BOOT_CONFIGURE_OPTS += CONFIG_NOSOFTFLOAT=1 - -# Define a helper function -define insert_define -@echo "#ifdef $(strip $(1))" >> $(U_BOOT_INC_CONF_FILE) -@echo "#undef $(strip $(1))" >> $(U_BOOT_INC_CONF_FILE) -@echo "#endif" >> $(U_BOOT_INC_CONF_FILE) -@echo '#define $(strip $(1)) $(call qstrip,$(2))' >> $(U_BOOT_INC_CONF_FILE) -endef - -$(DL_DIR)/$(U_BOOT_SOURCE): - $(call DOWNLOAD,$(U_BOOT_SITE),$(U_BOOT_SOURCE)) - -$(U_BOOT_DIR)/.unpacked: $(DL_DIR)/$(U_BOOT_SOURCE) - mkdir -p $(@D) - $(INFLATE$(suffix $(U_BOOT_SOURCE))) $(DL_DIR)/$(U_BOOT_SOURCE) \ - | tar $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) - - touch $@ - -$(U_BOOT_DIR)/.patched: $(U_BOOT_DIR)/.unpacked - toolchain/patch-kernel.sh $(U_BOOT_DIR) boot/u-boot \ - u-boot-$(U_BOOT_VERSION)-\*.patch \ - u-boot-$(U_BOOT_VERSION)-\*.patch.$(ARCH) -ifneq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR)),) - toolchain/patch-kernel.sh $(U_BOOT_DIR) $(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR) u-boot-$(U_BOOT_VERSION)-\*.patch -endif - touch $@ - -$(U_BOOT_DIR)/.configured: $(U_BOOT_DIR)/.patched -ifeq ($(U_BOOT_BOARD_NAME),) - $(error NO U-Boot board name set. Check your BR2_TARGET_UBOOT_BOARDNAME setting) -endif - $(TARGET_CONFIGURE_OPTS) \ - $(U_BOOT_CONFIGURE_OPTS) \ - $(MAKE) -C $(U_BOOT_DIR) \ - CROSS_COMPILE="$(TARGET_CROSS)" ARCH=$(U_BOOT_ARCH) \ - $(U_BOOT_BOARD_NAME)_config - touch $@ - -$(U_BOOT_DIR)/.header_modified: $(U_BOOT_DIR)/.configured - # Modify configuration header in $(U_BOOT_INC_CONF_FILE) -ifdef BR2_TARGET_UBOOT_NETWORK - @echo >> $(U_BOOT_INC_CONF_FILE) - @echo "/* Add a wrapper around the values Buildroot sets. */" >> $(U_BOOT_INC_CONF_FILE) - @echo "#ifndef __BR2_ADDED_CONFIG_H" >> $(U_BOOT_INC_CONF_FILE) - @echo "#define __BR2_ADDED_CONFIG_H" >> $(U_BOOT_INC_CONF_FILE) - $(call insert_define, DATE, $(DATE)) - $(call insert_define, CONFIG_LOAD_SCRIPTS, 1) -ifneq ($(strip $(BR2_TARGET_UBOOT_IPADDR)),"") - $(call insert_define, CONFIG_IPADDR, $(BR2_TARGET_UBOOT_IPADDR)) -endif -ifneq ($(strip $(BR2_TARGET_UBOOT_GATEWAY)),"") - $(call insert_define, CONFIG_GATEWAYIP, $(BR2_TARGET_UBOOT_GATEWAY)) -endif -ifneq ($(strip $(BR2_TARGET_UBOOT_NETMASK)),"") - $(call insert_define, CONFIG_NETMASK, $(BR2_TARGET_UBOOT_NETMASK)) -endif -ifneq ($(strip $(BR2_TARGET_UBOOT_SERVERIP)),"") - $(call insert_define, CONFIG_SERVERIP, $(BR2_TARGET_UBOOT_SERVERIP)) -endif -ifneq ($(strip $(BR2_TARGET_UBOOT_ETHADDR)),"") - $(call insert_define, CONFIG_ETHADDR, $(BR2_TARGET_UBOOT_ETHADDR)) -endif -ifneq ($(strip $(BR2_TARGET_UBOOT_ETH1ADDR)),"") - $(call insert_define, CONFIG_ETH1ADDR, $(BR2_TARGET_UBOOT_ETH1ADDR)) -endif - @echo "#endif /* __BR2_ADDED_CONFIG_H */" >> $(U_BOOT_INC_CONF_FILE) -endif # BR2_TARGET_UBOOT_NETWORK - touch $@ - -# Build U-Boot itself -$(U_BOOT_DIR)/$(U_BOOT_BIN): $(U_BOOT_DIR)/.header_modified - $(TARGET_CONFIGURE_OPTS) \ - $(U_BOOT_CONFIGURE_OPTS) \ - $(MAKE) EXTRAVERSION=$(BR2_TARGET_UBOOT_EXTRAVERSION) \ - CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" \ - ARCH=$(U_BOOT_ARCH) \ - $(U_BOOT_MAKE_OPT) -C $(U_BOOT_DIR) - -U_BOOT_UENV_FILE:=uEnv.txt - -# Copy the result to the images/ directory -$(BINARIES_DIR)/$(U_BOOT_BIN): $(U_BOOT_DIR)/$(U_BOOT_BIN) - rm -f $(BINARIES_DIR)/$(U_BOOT_BIN) - cp -dpf $(U_BOOT_DIR)/$(U_BOOT_BIN) $(BINARIES_DIR)/ -ifeq ($(BR2_TARGET_UBOOT_DEFAULT_UENV),y) - rm -f $(BINARIES_DIR)/$(U_BOOT_UENV_FILE) - echo "mpurate=1000" >> $(BINARIES_DIR)/$(U_BOOT_UENV_FILE) - echo "uenvcmd=mmc init; run loaduimage; run mmcboot" >> $(BINARIES_DIR)/$(U_BOOT_UENV_FILE) -endif - - -# Build just mkimage for the host. It might have already been built by -# the U-Boot build procedure, but mkimage may also be needed even if -# U-Boot isn't selected in the configuration, to generate a kernel -# uImage. -$(MKIMAGE): $(U_BOOT_DIR)/.patched - mkdir -p $(@D) - $(MAKE) -C $(U_BOOT_DIR) CROSS_COMPILE="$(TARGET_CROSS)" ARCH=$(U_BOOT_ARCH) tools - cp -dpf $(U_BOOT_DIR)/tools/mkimage $(@D) - -# Build manually mkimage for the target -$(TARGET_DIR)/usr/bin/mkimage: $(U_BOOT_DIR)/.configured - mkdir -p $(@D) - $(TARGET_CC) -I$(U_BOOT_DIR)/include -I$(U_BOOT_DIR)/tools \ - -DUSE_HOSTCC -o $@ \ - $(U_BOOT_DIR)/common/image.c \ - $(wildcard $(addprefix $(U_BOOT_DIR)/tools/,default_image.c \ - fit_image.c imximage.c kwbimage.c mkimage.c)) \ - $(addprefix $(U_BOOT_DIR)/lib*/,crc32.c md5.c sha1.c) \ - $(U_BOOT_DIR)/tools/os_support.c \ - $(wildcard $(U_BOOT_DIR)/libfdt/fdt*.c $(U_BOOT_DIR)/lib/libfdt/fdt*.c) - -# Build manually fw_printenv for the target -$(TARGET_DIR)/usr/sbin/fw_printenv: $(U_BOOT_DIR)/.configured - $(TARGET_CONFIGURE_OPTS) \ - $(MAKE) HOSTCC="$(TARGET_CC)" -C $(U_BOOT_DIR) env - $(INSTALL) -m 0755 -D $(U_BOOT_DIR)/tools/env/fw_printenv $@ - ln -sf fw_printenv $(TARGET_DIR)/usr/sbin/fw_setenv - -u-boot: $(U_BOOT_TARGETS) - -u-boot-clean: - -$(MAKE) -C $(U_BOOT_DIR) clean - rm -f $(MKIMAGE) - -u-boot-dirclean: - rm -rf $(U_BOOT_DIR) - -u-boot-source: $(DL_DIR)/$(U_BOOT_SOURCE) - -u-boot-unpacked: $(U_BOOT_DIR)/.patched - -u-boot-configured: $(U_BOOT_DIR)/.header_modified - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_TARGET_UBOOT),y) -TARGETS+=u-boot - -# we NEED a board name unless we're at make source -ifeq ($(filter source,$(MAKECMDGOALS)),) -ifeq ($(U_BOOT_BOARD_NAME),) -$(error NO U-Boot board name set. Check your BR2_TARGET_UBOOT_BOARDNAME setting) -endif -endif - -endif diff --git a/boot/x-loader/Config.in b/boot/x-loader/Config.in deleted file mode 100644 index 771ac70..0000000 --- a/boot/x-loader/Config.in +++ /dev/null @@ -1,51 +0,0 @@ -menuconfig BR2_TARGET_XLOADER - bool "X-Loader" - help - Build "X-Loader" first stage boot loader - -if BR2_TARGET_XLOADER -config BR2_TARGET_XLOADER_BOARDNAME - string "X-Loader board name" - help - One of X-Loader supported boards to be built. - This will be suffixed with _config to meet X-Loader standard naming. - -choice - prompt "X-Loader Version" - default BR2_TARGET_XLOADER_1_51 - help - Select the specific X-Loader version you want to use - -config BR2_TARGET_XLOADER_1_51 - bool "1.51" - -config BR2_TARGET_XLOADER_1_48 - bool "1.48" - -config BR2_TARGET_XLOADER_1_46 - bool "1.46" - -endchoice - -config BR2_TARGET_XLOADER_VERSION - string - default "1.51" if BR2_TARGET_XLOADER_1_51 - default "1.48" if BR2_TARGET_XLOADER_1_48 - default "1.46" if BR2_TARGET_XLOADER_1_46 - -config BR2_TARGET_XLOADER_EXTRAVERSION - string "X-Loader Extraversion" - default "" - help - X-Loader extraversion string - -config BR2_TARGET_XLOADER_CUSTOM_PATCH_DIR - string "custom patch dir" - help - If your board requires custom patches, add the path to the - directory containing the patches here. The patches must be - named x-loader--.patch. - - Most users may leave this empty - -endif # BR2_TARGET_XLOADER diff --git a/boot/x-loader/x-loader-v1.51_OMAPPSP_04.02.00.07-add-extraversion-string.patch b/boot/x-loader/x-loader-v1.51_OMAPPSP_04.02.00.07-add-extraversion-string.patch deleted file mode 100644 index 99c6e2c..0000000 --- a/boot/x-loader/x-loader-v1.51_OMAPPSP_04.02.00.07-add-extraversion-string.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -Nuar a/config.mk b/config.mk ---- a/config.mk 2011-04-09 00:08:24.000000000 +1000 -+++ b/config.mk 2011-06-05 16:10:31.726553065 +1000 -@@ -116,7 +116,7 @@ - gccincdir := $(shell $(CC) -print-file-name=include) - - CPPFLAGS := $(DBGFLAGS) $(OPTFLAGS) $(RELFLAGS) \ -- -D__KERNEL__ -DTEXT_BASE=$(TEXT_BASE) \ -+ -D__KERNEL__ -DTEXT_BASE=$(TEXT_BASE) -D__EXTRAVERSION__=\"$(EXTRAVERSION)\" \ - -I$(TOPDIR)/include \ - -fno-builtin -ffreestanding -nostdinc -isystem \ - $(gccincdir) -pipe $(PLATFORM_CPPFLAGS) -diff -Nuar a/lib/board.c b/lib/board.c ---- a/lib/board.c 2011-06-05 10:41:18.000000000 +1000 -+++ b/lib/board.c 2011-06-05 12:26:52.455256139 +1000 -@@ -40,8 +40,8 @@ - #ifdef CFG_PRINTF - int print_info(void) - { -- printf("\n\nTexas Instruments X-Loader 1.51 (" -- __DATE__ " - " __TIME__ ")\n"); -+ printf("\n\nTexas Instruments X-Loader 1.51" -+ __EXTRAVERSION__ " (" __DATE__ " - " __TIME__ ")\n"); - return 0; - } - #endif diff --git a/boot/x-loader/x-loader-v1.51_OMAPPSP_04.02.00.07-add-signGP-source.patch b/boot/x-loader/x-loader-v1.51_OMAPPSP_04.02.00.07-add-signGP-source.patch deleted file mode 100644 index f2ae0f9..0000000 --- a/boot/x-loader/x-loader-v1.51_OMAPPSP_04.02.00.07-add-signGP-source.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff -Nuar a/signGP.c b/signGP.c ---- a/signGP.c 1970-01-01 10:00:00.000000000 +1000 -+++ b/signGP.c 2011-06-05 11:23:05.000000000 +1000 -@@ -0,0 +1,73 @@ -+// -+// signGP.c -+// Read the x-load.bin file and write out the x-load.bin.ift file. -+// The signed image is the original pre-pended with the size of the image -+// and the load address. If not entered on command line, file name is -+// assumed to be x-load.bin in current directory and load address is -+// 0x40200800. -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+ -+main(int argc, char *argv[]) -+{ -+ int i; -+ char ifname[FILENAME_MAX], ofname[FILENAME_MAX], ch; -+ FILE *ifile, *ofile; -+ unsigned long loadaddr, len; -+ struct stat sinfo; -+ -+ -+ // Default to x-load.bin and 0x40200800. -+ strcpy(ifname, "x-load.bin"); -+ loadaddr = 0x40200800; -+ -+ if ((argc == 2) || (argc == 3)) -+ strcpy(ifname, argv[1]); -+ -+ if (argc == 3) -+ loadaddr = strtol(argv[2], NULL, 16); -+ -+ // Form the output file name. -+ strcpy(ofname, ifname); -+ strcat(ofname, ".ift"); -+ -+ // Open the input file. -+ ifile = fopen(ifname, "rb"); -+ if (ifile == NULL) { -+ printf("Cannot open %s\n", ifname); -+ exit(0); -+ } -+ -+ // Get file length. -+ stat(ifname, &sinfo); -+ len = sinfo.st_size; -+ -+ // Open the output file and write it. -+ ofile = fopen(ofname, "wb"); -+ if (ofile == NULL) { -+ printf("Cannot open %s\n", ofname); -+ fclose(ifile); -+ exit(0); -+ } -+ -+ // Pad 1 sector of zeroes. -+ //ch = 0x00; -+ //for (i=0; i<0x200; i++) -+ // fwrite(&ch, 1, 1, ofile); -+ -+ fwrite(&len, 1, 4, ofile); -+ fwrite(&loadaddr, 1, 4, ofile); -+ for (i=0; i - -

uClibc vs. glibc

- -

- uClibc and Glibc are not the same -- there are a number of differences which - may or may not cause you problems. This document attempts to list these - differences and, when completed, will contain a full list of all relevant - differences. -

-
    -
  1. uClibc is smaller than glibc. We attempt to maintain a glibc compatible - interface, allowing applications that compile with glibc to easily compile with - uClibc. However, we do not include _everything_ that glibc includes, and - therefore some applications may not compile. If this happens to you, please - report the failure to the uclibc mailing list, with detailed error messages. -

  2. -
  3. uClibc is much more configurable then glibc. This means that a developer - may have compiled uClibc in such a way that significant amounts of - functionality have been omitted. -

  4. -
  5. uClibc does not even attempt to ensure binary compatibility across releases. - When a new version of uClibc is released, you may or may not need to recompile - all your binaries. -

  6. -
    • malloc(0) in glibc returns a valid pointer to something(!?!?) while in - uClibc calling malloc(0) returns a NULL. The behavior of malloc(0) is listed - as implementation-defined by SuSv3, so both libraries are equally correct. - This difference also applies to realloc(NULL, 0). I personally feel glibc's - behavior is not particularly safe. To enable glibc behavior, one has to - explicitly enable the MALLOC_GLIBC_COMPAT option. -

    • - glibc's malloc() implementation has behavior that is tunable via the - MALLOC_CHECK_ environment variable. This is primarily used to provide extra - malloc debugging features. These extended malloc debugging features are not - available within uClibc. There are many good malloc debugging libraries - available for Linux (dmalloc, electric fence, valgrind, etc) that work much - better than the glibc extended malloc debugging. So our omitting this - functionality from uClibc is not a great loss. -

    • -
  7. -
  8. uClibc does not provide a database library (libdb). -

  9. -
  10. uClibc does not support NSS (/lib/libnss_*), which allows glibc to easily - support various methods of authentication and DNS resolution. uClibc only - supports flat password files and shadow password files for storing - authentication information. If you need something more complex than this, - you can compile and install pam. -

  11. -
  12. uClibc's libresolv is only a stub. Some, but not all of the functionality - provided by glibc's libresolv is provided internal to uClibc. Other functions - are not at all implemented. -

  13. -
  14. libnsl provides support for Network Information Service (NIS) which was - originally called "Yellow Pages" or "YP", which is an extension of RPC invented - by Sun to share Unix password files over the network. I personally think NIS - is an evil abomination and should not be used. These days, using ldap is much - more effective mechanism for doing the same thing. uClibc provides a stub - libnsl, but has no actual support for Network Information Service (NIS). - We therefore, also do not provide any of the headers files provided by glibc - under /usr/include/rpcsvc. -

  15. -
  16. uClibc's locale support is not 100% complete yet. We are working on it. -

  17. -
  18. uClibc's math library only supports long double as inlines, and even - then the long double support is quite limited. Also, very few of the - float math functions are implemented. Stick with double and you should - be just fine. -

  19. -
  20. uClibc's libcrypt does not support the reentrant crypt_r, setkey_r and - encrypt_r, since these are not required by SuSv3. -

  21. -
  22. uClibc directly uses kernel types to define most opaque data types. -

  23. -
  24. uClibc directly uses the linux kernel's arch specific 'stuct stat'. -

  25. -
  26. uClibc's librt library currently lacks all aio routines, all clock - routines, and all shm routines (only the timer routines and the mq - routines are implemented). -

  27. -
-
-

Manuel's Notes

- - Some general comments...
-

- The intended target for all my uClibc code is ANSI/ISO C99 and SUSv3 - compliance. While some glibc extensions are present, many will eventually - be configurable. Also, even when present, the glibc-like extensions may - differ slightly or be more restrictive than the native glibc counterparts. - They are primarily meant to be porting _aides_ and not necessarily - drop-in replacements. -


-Now for some details...

- -time functions
-
    -
  1. Leap seconds are not supported.

  2. -
  3. /etc/timezone and the whole zoneinfo directory tree are not supported. - To set the timezone, set the TZ environment variable as specified in - http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html - or you may also create an /etc/TZ file of a single line, ending with a - newline, containing the TZ setting. For example - echo CST6CDT > /etc/TZ -

  4. -
  5. Currently, locale specific eras and alternate digits are not supported. - They are on my TODO list. -
  6. -

-wide char support
-
    -
  1. The only multibyte encoding currently supported is UTF-8. The various - ISO-8859-* encodings are (optionally) supported. The internal - representation of wchar's is assumed to be 31 bit unicode values in - native endian representation. Also, the underlying char encoding is - assumed to match ASCII in the range 0-0x7f. -
  2. -
  3. In the next iteration of locale support, I plan to add support for - (at least some) other multibyte encodings. -
  4. -
-locale support
-
    -
  1. The target for support is SUSv3 locale functionality. While nl_langinfo - has been extended, similar to glibc, it only returns values for related - locale entries. -
  2. -
  3. Currently, all SUSv3 libc locale functionality should be implemented - except for wcsftime and collating item support in regex. -
  4. -
-stdio
-
    -
  1. Conversion of large magnitude floating-point values by printf suffers a loss - of precision due to the algorithm used. -

  2. -
  3. uClibc's printf is much stricter than glibcs, especially regarding positional - args. The entire format string is parsed first and an error is returned if - a problem is detected. In locales other than C, the format string is checked - to be a valid multibyte sequence as well. Also, currently at most 10 positional - args are allowed (although this is configurable). -

  4. -
  5. BUFSIZ is configurable, but no attempt is made at automatic tuning of internal - buffer sizes for stdio streams. In fact, the stdio code in general sacrifices - sophistication/performace for minimal size. -

  6. -
  7. uClibc allows glibc-like custom printf functions. However, while not - currently checked, the specifier must be <= 0x7f. -

  8. -
  9. uClibc allows glibc-like custom streams. However, no in-buffer seeking is - done. -

  10. -
  11. The functions fcloseall() and __fpending() can behave differently than their - glibc counterparts. -

  12. -
  13. uClibc's setvbuf is more restrictive about when it can be called than glibc's - is. The standards specify that setvbuf must occur before any other operations - take place on the stream. -

  14. -
  15. Right now, %m is not handled properly by printf when the format uses positional - args. -

  16. -
  17. The FILEs created by glibc's fmemopen(), open_memstream(), and fopencookie() - are not capable of wide orientation. The corresponding uClibc routines do - not have this limitation. -

  18. -
  19. For scanf, the C99 standard states "The fscanf function returns the value of - the macro EOF if an input failure occurs before any conversion." But glibc's - scanf does not respect conversions for which assignment was surpressed, even - though the standard states that the value is converted but not stored. -

-

Glibc bugs


-glibc bugs that Ulrich Drepper has refused to acknowledge or comment on - ( http://sources.redhat.com/ml/libc-alpha/2003-09/ ) -
-
    -
  1. The C99 standard says that for printf, a %s conversion makes no special - provisions for multibyte characters. SUSv3 is even more clear, stating - that bytes are written and a specified precision is in bytes. Yet glibc - treats the arg as a multibyte string when a precision is specified and - not otherwise. -

  2. -
  3. Both C99 and C89 state that the %c conversion for scanf reads the exact - number of bytes specified by the optional field width (or 1 if not specified). - uClibc complies with the standard. There is an argument that perhaps the - specified width should be treated as an upper bound, based on some historical - use. However, such behavior should be mentioned in the Conformance document. -

  4. -
  5. glibc's scanf is broken regarding some numeric patterns. Some invalid - strings are accepted as valid ("0x.p", "1e", digit grouped strings). - In spite of my posting examples clearly illustrating the bugs, they remain - unacknowledged by the glibc developers. -

  6. -
  7. glibc's scanf seems to require a 'p' exponent for hexadecimal float strings. - According to the standard, this is optional. -

  8. -
  9. C99 requires that once an EOF is encountered, the stream should be treated - as if at end-of-file even if more data becomes available. Further reading - can be attempted by clearing the EOF flag though, via clearerr() or a file - positioning function. For details concerning the original change, see - Defect Report #141. glibc is currently non-compliant, and the developers - did not comment when I asked for their official position on this issue. -

  10. -
  11. glibc's collation routines and/or localedef are broken regarding implicit - and explicit UNDEFINED rules. -

-More to follow as I think of it... -


-

Profiling:

-

-uClibc no longer supports 'gcc -fprofile-arcs -pg' style profiling, which -causes your application to generate a 'gmon.out' file that can then be analyzed -by 'gprof'. Not only does this require explicit extra support in uClibc, it -requires that you rebuild everything with profiling support. There is both a -size and performance penalty to profiling your applications this way, as well -as Heisenberg effects, where the act of measuring changes what is measured. -

-

-There exist a number of less invasive alternatives that do not require you to -specially instrument your application, and recompile and relink everything. -

-The OProfile system-wide profiler is an excellent alternative: - http://oprofile.sourceforge.net/ -

-Many people have had good results using the combination of Valgrind -to generate profiling information and KCachegrind for analysis: - http://developer.kde.org/~sewardj/ - http://kcachegrind.sourceforge.net/ -

-Prospect is another alternative based on OProfile: - http://prospect.sourceforge.net/ -

-And the Linux Trace Toolkit (LTT) is also a fine tool: - http://www.opersys.com/LTT/ -

-FunctionCheck: - http://www710.univ-lyon1.fr/~yperret/fnccheck/ -

- - diff --git a/fs/initramfs/gen_initramfs_list.sh b/fs/initramfs/gen_initramfs_list.sh deleted file mode 100644 index 26252b6..0000000 --- a/fs/initramfs/gen_initramfs_list.sh +++ /dev/null @@ -1,203 +0,0 @@ -#!/bin/sh -# Copyright (C) Martin Schlemmer -# Released under the terms of the GNU GPL -# -# Generate a newline separated list of entries from the file/directory -# supplied as an argument. -# -# If a file/directory is not supplied then generate a small dummy file. -# -# The output is suitable for gen_init_cpio built from usr/gen_init_cpio.c. -# - -default_initramfs() { - cat <<-EOF - # This is a very simple, default initramfs - - dir /dev 0755 0 0 - nod /dev/console 0600 0 0 c 5 1 - dir /root 0700 0 0 - EOF -} - -filetype() { - local argv1="$1" - - # symlink test must come before file test - if [ -L "$argv1" ]; then - echo "slink" - elif [ -f "$argv1" ]; then - echo "file" - elif [ -d "$argv1" ]; then - echo "dir" - elif [ -b "$argv1" -o -c "$argv1" ]; then - echo "nod" - elif [ -p "$argv1" ]; then - echo "pipe" - elif [ -S "$argv1" ]; then - echo "sock" - else - echo "invalid" - fi - return 0 -} - -print_mtime() { - local argv1="$1" - local mymtime="0" - - if [ -e "$argv1" ]; then - mymtime=$(find "$argv1" -printf "%T@\n" | sort -r | head -n 1) - fi - - echo "# Last modified: $mymtime" - echo -} - -parse() { - local location="$1" - local name=$(echo "$location" | sed -e "s,$srcdir,,") - # change '//' into '/' - name=$(echo $name | sed -e 's,/[/]*,/,g') - local mode="$2" - local uid="$3" - local gid="$4" - local ftype=$(filetype "$location") - # remap uid/gid to 0 if necessary - [ "x$uid" != "x" ] && [ $uid -eq $root_uid ] && uid=0 - [ "x$gid" != "x" ] && [ $gid -eq $root_gid ] && gid=0 - local str="$mode $uid $gid" - - [ "$ftype" = "invalid" ] && return 0 - [ "$location" = "$srcdir" ] && return 0 - - case "$ftype" in - "file") - str="$ftype $name $location $str" - ;; - "nod") - local devtype= - local maj=$(LC_ALL=C ls -l "$location" | \ - awk '{sub(/,/, "", $5); print $5}') - local min=$(LC_ALL=C ls -l "$location" | \ - awk '{print $6}') - - if [ -b "$location" ]; then - devtype="b" - else - devtype="c" - fi - str="$ftype $name $str $devtype $maj $min" - ;; - "slink") - local target=$(LC_ALL=C ls -l "$location" | \ - awk '{print $11}') - str="$ftype $name $target $str" - ;; - *) - str="$ftype $name $str" - ;; - esac - - echo "$str" - - return 0 -} - -usage() { - printf "Usage:\n" - printf "$0 [ [-u ] [-g ] [-d | ] ] . . .\n" - printf "\n" - printf -- "-u User ID to map to user ID 0 (root).\n" - printf " is only meaningful if \n" - printf " is a directory.\n" - printf -- "-g Group ID to map to group ID 0 (root).\n" - printf " is only meaningful if \n" - printf " is a directory.\n" - printf " File list or directory for cpio archive.\n" - printf " If is not provided then a\n" - printf " a default list will be output.\n" - printf -- "-d Output the default cpio list. If no \n" - printf " is given then the default cpio list will be output.\n" - printf "\n" - printf "All options may be repeated and are interpreted sequentially\n" - printf "and immediately. -u and -g states are preserved across\n" - printf " options so an explicit \"-u 0 -g 0\" is required\n" - printf "to reset the root/group mapping.\n" -} - -build_list() { - printf "\n#####################\n# $cpio_source\n" - - if [ -f "$cpio_source" ]; then - print_mtime "$cpio_source" - cat "$cpio_source" - elif [ -d "$cpio_source" ]; then - srcdir=$(echo "$cpio_source" | sed -e 's://*:/:g;s:/$::') - dirlist=$(find "$srcdir" -printf "%p %m %U %G\n" 2>/dev/null) - - # If $dirlist is only one line, then the directory is empty - if [ "$(echo "$dirlist" | wc -l)" -gt 1 ]; then - print_mtime "$cpio_source" - - echo "$dirlist" | \ - while read x; do - parse $x - done - else - # Failsafe in case directory is empty - default_initramfs - fi - else - echo " $0: Cannot open '$cpio_source'" >&2 - exit 1 - fi -} - - -root_uid=0 -root_gid=0 - -while [ $# -gt 0 ]; do - arg="$1" - shift - case "$arg" in - "-u") - root_uid="$1" - shift - ;; - "-g") - root_gid="$1" - shift - ;; - "-d") - default_list="$arg" - default_initramfs - ;; - "-h") - usage - exit 0 - ;; - *) - case "$arg" in - "-"*) - printf "ERROR: unknown option \"$arg\"\n" >&2 - printf "If the filename validly begins with '-', then it must be prefixed\n" >&2 - printf "by './' so that it won't be interpreted as an option." >&2 - printf "\n" >&2 - usage >&2 - exit 1 - ;; - *) - cpio_source="$arg" - build_list - ;; - esac - ;; - esac -done - -# spit out the default cpio list if a source hasn't been specified -[ -z "$cpio_source" -a -z "$default_list" ] && default_initramfs - -exit 0 diff --git a/package/bridge-utils/bridge.mk b/package/bridge-utils/bridge.mk deleted file mode 100644 index f8736b1..0000000 --- a/package/bridge-utils/bridge.mk +++ /dev/null @@ -1,20 +0,0 @@ -############################################################# -# -# bridge-utils - User Space Program For Controlling Bridging -# -############################################################# -# -BRIDGE_VERSION:=1.4 -BRIDGE_SOURCE:=bridge-utils-$(BRIDGE_VERSION).tar.gz -BRIDGE_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/bridge/ -BRIDGE_AUTORECONF:=YES -BRIDGE_INSTALL_STAGING:=NO -BRIDGE_INSTALL_TARGET:=YES -BRIDGE_CONF_OPT:=--with-linux-headers=$(LINUX_HEADERS_DIR) - -define BRIDGE_UNINSTALL_TARGET_CMDS - rm -f $(addprefix $(TARGET_DIR)/usr/,lib/libbridge.a \ - include/libbridge.h man/man8/brctl.8 sbin/brctl) -endef - -$(eval $(call AUTOTARGETS,package,bridge)) diff --git a/package/bridge-utils/bridge.patch b/package/bridge-utils/bridge.patch deleted file mode 100644 index f447377..0000000 --- a/package/bridge-utils/bridge.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- bridge-utils-0.9.6/libbridge/Makefile.in.dist 2004-03-01 20:55:52.000000000 -0600 -+++ bridge-utils-0.9.6/libbridge/Makefile.in 2004-03-01 20:56:23.000000000 -0600 -@@ -5,7 +5,7 @@ - RANLIB=@RANLIB@ - - CC=@CC@ --CFLAGS = -Wall -g $(KERNEL_HEADERS) -+CFLAGS = -Wall -g @CFLAGS@ $(KERNEL_HEADERS) - - prefix=@prefix@ - exec_prefix=@exec_prefix@ diff --git a/package/buildroot-libtool-v1.5.patch b/package/buildroot-libtool-v1.5.patch deleted file mode 100644 index 57a7c58..0000000 --- a/package/buildroot-libtool-v1.5.patch +++ /dev/null @@ -1,69 +0,0 @@ ---- a/ltmain.sh 2006-03-11 13:49:04.000000000 -0500 -+++ b/ltmain.sh 2008-04-30 09:55:28.000000000 -0400 -@@ -273,8 +273,9 @@ func_infer_tag () - # line option must be used. - if test -z "$tagname"; then - $echo "$modename: unable to infer tagged configuration" -- $echo "$modename: specify a tag with \`--tag'" 1>&2 -- exit $EXIT_FAILURE -+ $echo "$modename: defaulting to \`CC'" -+ $echo "$modename: if this is not correct, specify a tag with \`--tag'" -+# exit $EXIT_FAILURE - # else - # $echo "$modename: using $tagname tagged configuration" - fi -@@ -2407,8 +2408,14 @@ EOF - absdir="$abs_ladir" - libdir="$abs_ladir" - else -- dir="$libdir" -- absdir="$libdir" -+ # Adding 'libdir' from the .la file to our library search paths -+ # breaks crosscompilation horribly. We cheat here and don't add -+ # it, instead adding the path where we found the .la. -CL -+ dir="$abs_ladir" -+ absdir="$abs_ladir" -+ libdir="$abs_ladir" -+ #dir="$libdir" -+ #absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else -@@ -2545,7 +2552,7 @@ EOF - { test "$use_static_libs" = no || test -z "$old_library"; }; then - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" -- need_relink=yes -+ need_relink=no - fi - # This is a shared library - -@@ -5606,6 +5623,10 @@ fi\ - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do -+ # Replacing uninstalled with installed can easily break crosscompilation, -+ # since the installed path is generally the wrong architecture. -CL -+ newdependency_libs="$newdependency_libs $deplib" -+ continue - case $deplib in - *.la) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` -@@ -5927,10 +5948,13 @@ relink_command=\"$relink_command\"" - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. -- if test "$inst_prefix_dir" = "$destdir"; then -- $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 -- exit $EXIT_FAILURE -- fi -+ # -+ # This breaks install into our staging area. -PB -+ # -+ # if test "$inst_prefix_dir" = "$destdir"; then -+ # $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 -+ # exit $EXIT_FAILURE -+ # fi - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. diff --git a/package/buildroot-libtool-v2.2.patch b/package/buildroot-libtool-v2.2.patch deleted file mode 100644 index 0df00ae..0000000 --- a/package/buildroot-libtool-v2.2.patch +++ /dev/null @@ -1,64 +0,0 @@ ---- a/ltmain.sh 2009-11-16 06:23:18.000000000 -0700 -+++ b/ltmain.sh 2010-09-18 20:25:06.000000000 -0700 -@@ -1048,8 +1048,8 @@ func_infer_tag () - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then -- func_echo "unable to infer tagged configuration" -- func_fatal_error "specify a tag with \`--tag'" -+ func_echo "defaulting to \`CC'" -+ func_echo "if this is not correct, specify a tag with \`--tag'" - # else - # func_verbose "using $tagname tagged configuration" - fi -@@ -2018,8 +2018,11 @@ func_mode_install () - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. -- test "$inst_prefix_dir" = "$destdir" && \ -- func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" -+ # -+ # This breaks install into our staging area. -PB -+ # -+ # test "$inst_prefix_dir" = "$destdir" && \ -+ # func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. -@@ -5412,8 +5415,14 @@ func_mode_link () - absdir="$abs_ladir" - libdir="$abs_ladir" - else -- dir="$libdir" -- absdir="$libdir" -+ # Adding 'libdir' from the .la file to our library search paths -+ # breaks crosscompilation horribly. We cheat here and don't add -+ # it, instead adding the path where we found the .la. -CL -+ dir="$abs_ladir" -+ absdir="$abs_ladir" -+ libdir="$abs_ladir" -+ #dir="$libdir" -+ #absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else -@@ -5564,7 +5573,7 @@ func_mode_link () - *) - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" -- need_relink=yes -+ need_relink=no - fi - ;; - esac -@@ -8052,6 +8061,10 @@ EOF - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do -+ # Replacing uninstalled with installed can easily break crosscompilation, -+ # since the installed path is generally the wrong architecture. -CL -+ newdependency_libs="$newdependency_libs $deplib" -+ continue - case $deplib in - *.la) - func_basename "$deplib" diff --git a/package/buildroot-libtool-v2.4.patch b/package/buildroot-libtool-v2.4.patch deleted file mode 100644 index d82d610..0000000 --- a/package/buildroot-libtool-v2.4.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- a/ltmain.sh -+++ b/ltmain.sh -@@ -1416,8 +1416,8 @@ - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then -- func_echo "unable to infer tagged configuration" -- func_fatal_error "specify a tag with \`--tag'" -+ func_echo "defaulting to \`CC'" -+ func_echo "if this is not correct, specify a tag with \`--tag'" - # else - # func_verbose "using $tagname tagged configuration" - fi -@@ -2962,8 +2962,11 @@ - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. -- test "$inst_prefix_dir" = "$destdir" && \ -- func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" -+ # -+ # This breaks install into our staging area. -PB -+ # -+ # test "$inst_prefix_dir" = "$destdir" && \ -+ # func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. -@@ -6683,7 +6686,7 @@ - *) - if test "$installed" = no; then - func_append notinst_deplibs " $lib" -- need_relink=yes -+ need_relink=no - fi - ;; - esac -@@ -9257,6 +9260,10 @@ - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do -+ # Replacing uninstalled with installed can easily break crosscompilation, -+ # since the installed path is generally the wrong architecture. -CL -+ newdependency_libs="$newdependency_libs $deplib" -+ continue - case $deplib in - *.la) - func_basename "$deplib" diff --git a/package/busybox/busybox-1.13.x.config b/package/busybox/busybox-1.13.x.config deleted file mode 100644 index 059a0b3..0000000 --- a/package/busybox/busybox-1.13.x.config +++ /dev/null @@ -1,870 +0,0 @@ -# -# Automatically generated make config: don't edit -# Busybox version: 1.13.0 -# Sat Nov 15 17:33:29 2008 -# -CONFIG_HAVE_DOT_CONFIG=y - -# -# Busybox Settings -# - -# -# General Configuration -# -CONFIG_DESKTOP=y -# CONFIG_EXTRA_COMPAT is not set -# CONFIG_FEATURE_ASSUME_UNICODE is not set -CONFIG_FEATURE_BUFFERS_USE_MALLOC=y -# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set -# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set -CONFIG_SHOW_USAGE=y -CONFIG_FEATURE_VERBOSE_USAGE=y -# CONFIG_FEATURE_COMPRESS_USAGE is not set -CONFIG_FEATURE_INSTALLER=y -# CONFIG_LOCALE_SUPPORT is not set -CONFIG_GETOPT_LONG=y -CONFIG_FEATURE_DEVPTS=y -CONFIG_FEATURE_CLEAN_UP=y -# CONFIG_FEATURE_PIDFILE is not set -CONFIG_FEATURE_SUID=y -# CONFIG_FEATURE_SUID_CONFIG is not set -# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set -# CONFIG_SELINUX is not set -# CONFIG_FEATURE_PREFER_APPLETS is not set -CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" -CONFIG_FEATURE_SYSLOG=y -# CONFIG_FEATURE_HAVE_RPC is not set - -# -# Build Options -# -# CONFIG_STATIC is not set -# CONFIG_PIE is not set -# CONFIG_NOMMU is not set -# CONFIG_BUILD_LIBBUSYBOX is not set -# CONFIG_FEATURE_INDIVIDUAL is not set -# CONFIG_FEATURE_SHARED_BUSYBOX is not set -# CONFIG_LFS is not set -CONFIG_CROSS_COMPILER_PREFIX="" -CONFIG_EXTRA_CFLAGS="" - -# -# Debugging Options -# -# CONFIG_DEBUG is not set -# CONFIG_DEBUG_PESSIMIZE is not set -# CONFIG_WERROR is not set -CONFIG_NO_DEBUG_LIB=y -# CONFIG_DMALLOC is not set -# CONFIG_EFENCE is not set -CONFIG_INCLUDE_SUSv2=y - -# -# Installation Options -# -# CONFIG_INSTALL_NO_USR is not set -CONFIG_INSTALL_APPLET_SYMLINKS=y -# CONFIG_INSTALL_APPLET_HARDLINKS is not set -# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set -# CONFIG_INSTALL_APPLET_DONT is not set -# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set -# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set -# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set -CONFIG_PREFIX="./_install" - -# -# Busybox Library Tuning -# -CONFIG_PASSWORD_MINLEN=6 -CONFIG_MD5_SIZE_VS_SPEED=2 -# CONFIG_FEATURE_FAST_TOP is not set -# CONFIG_FEATURE_ETC_NETWORKS is not set -CONFIG_FEATURE_EDITING=y -CONFIG_FEATURE_EDITING_MAX_LEN=1024 -CONFIG_FEATURE_EDITING_VI=y -CONFIG_FEATURE_EDITING_HISTORY=999 -CONFIG_FEATURE_EDITING_SAVEHISTORY=y -CONFIG_FEATURE_TAB_COMPLETION=y -# CONFIG_FEATURE_USERNAME_COMPLETION is not set -CONFIG_FEATURE_EDITING_FANCY_PROMPT=y -# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set -CONFIG_FEATURE_COPYBUF_KB=4 -CONFIG_MONOTONIC_SYSCALL=y -CONFIG_IOCTL_HEX2STR_ERROR=y -CONFIG_FEATURE_HWIB=y - -# -# Applets -# - -# -# Archival Utilities -# -# CONFIG_FEATURE_SEAMLESS_LZMA is not set -# CONFIG_FEATURE_SEAMLESS_BZ2 is not set -# CONFIG_FEATURE_SEAMLESS_GZ is not set -# CONFIG_FEATURE_SEAMLESS_Z is not set -CONFIG_AR=y -# CONFIG_FEATURE_AR_LONG_FILENAMES is not set -CONFIG_BUNZIP2=y -# CONFIG_BZIP2 is not set -CONFIG_CPIO=y -# CONFIG_FEATURE_CPIO_O is not set -# CONFIG_DPKG is not set -# CONFIG_DPKG_DEB is not set -# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set -CONFIG_GUNZIP=y -CONFIG_GZIP=y -# CONFIG_RPM2CPIO is not set -# CONFIG_RPM is not set -CONFIG_TAR=y -CONFIG_FEATURE_TAR_CREATE=y -# CONFIG_FEATURE_TAR_AUTODETECT is not set -CONFIG_FEATURE_TAR_FROM=y -# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set -# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set -CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y -CONFIG_FEATURE_TAR_LONG_OPTIONS=y -# CONFIG_FEATURE_TAR_UNAME_GNAME is not set -# CONFIG_UNCOMPRESS is not set -CONFIG_UNLZMA=y -# CONFIG_FEATURE_LZMA_FAST is not set -CONFIG_UNZIP=y - -# -# Coreutils -# -CONFIG_BASENAME=y -# CONFIG_CAL is not set -CONFIG_CAT=y -CONFIG_CATV=y -CONFIG_CHGRP=y -CONFIG_CHMOD=y -CONFIG_CHOWN=y -CONFIG_CHROOT=y -CONFIG_CKSUM=y -# CONFIG_COMM is not set -CONFIG_CP=y -CONFIG_CUT=y -CONFIG_DATE=y -CONFIG_FEATURE_DATE_ISOFMT=y -CONFIG_DD=y -CONFIG_FEATURE_DD_SIGNAL_HANDLING=y -CONFIG_FEATURE_DD_IBS_OBS=y -CONFIG_DF=y -# CONFIG_FEATURE_DF_FANCY is not set -CONFIG_DIRNAME=y -CONFIG_DOS2UNIX=y -CONFIG_UNIX2DOS=y -CONFIG_DU=y -CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y -CONFIG_ECHO=y -CONFIG_FEATURE_FANCY_ECHO=y -CONFIG_ENV=y -# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set -# CONFIG_EXPAND is not set -# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set -CONFIG_EXPR=y -CONFIG_EXPR_MATH_SUPPORT_64=y -CONFIG_FALSE=y -CONFIG_FOLD=y -CONFIG_HEAD=y -CONFIG_FEATURE_FANCY_HEAD=y -CONFIG_HOSTID=y -CONFIG_ID=y -CONFIG_INSTALL=y -CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y -CONFIG_LENGTH=y -CONFIG_LN=y -CONFIG_LOGNAME=y -CONFIG_LS=y -CONFIG_FEATURE_LS_FILETYPES=y -CONFIG_FEATURE_LS_FOLLOWLINKS=y -CONFIG_FEATURE_LS_RECURSIVE=y -CONFIG_FEATURE_LS_SORTFILES=y -CONFIG_FEATURE_LS_TIMESTAMPS=y -CONFIG_FEATURE_LS_USERNAME=y -CONFIG_FEATURE_LS_COLOR=y -CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y -CONFIG_MD5SUM=y -CONFIG_MKDIR=y -CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y -CONFIG_MKFIFO=y -CONFIG_MKNOD=y -CONFIG_MV=y -CONFIG_FEATURE_MV_LONG_OPTIONS=y -CONFIG_NICE=y -CONFIG_NOHUP=y -CONFIG_OD=y -CONFIG_PRINTENV=y -CONFIG_PRINTF=y -CONFIG_PWD=y -CONFIG_READLINK=y -CONFIG_FEATURE_READLINK_FOLLOW=y -CONFIG_REALPATH=y -CONFIG_RM=y -CONFIG_RMDIR=y -# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set -CONFIG_SEQ=y -CONFIG_SHA1SUM=y -CONFIG_SLEEP=y -# CONFIG_FEATURE_FANCY_SLEEP is not set -# CONFIG_FEATURE_FLOAT_SLEEP is not set -CONFIG_SORT=y -CONFIG_FEATURE_SORT_BIG=y -# CONFIG_SPLIT is not set -# CONFIG_FEATURE_SPLIT_FANCY is not set -# CONFIG_STAT is not set -# CONFIG_FEATURE_STAT_FORMAT is not set -CONFIG_STTY=y -# CONFIG_SUM is not set -CONFIG_SYNC=y -# CONFIG_TAC is not set -CONFIG_TAIL=y -CONFIG_FEATURE_FANCY_TAIL=y -CONFIG_TEE=y -CONFIG_FEATURE_TEE_USE_BLOCK_IO=y -CONFIG_TEST=y -CONFIG_FEATURE_TEST_64=y -CONFIG_TOUCH=y -CONFIG_TR=y -CONFIG_FEATURE_TR_CLASSES=y -CONFIG_FEATURE_TR_EQUIV=y -CONFIG_TRUE=y -CONFIG_TTY=y -CONFIG_UNAME=y -# CONFIG_UNEXPAND is not set -# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set -CONFIG_UNIQ=y -CONFIG_USLEEP=y -CONFIG_UUDECODE=y -CONFIG_UUENCODE=y -CONFIG_WC=y -# CONFIG_FEATURE_WC_LARGE is not set -CONFIG_WHO=y -CONFIG_WHOAMI=y -CONFIG_YES=y - -# -# Common options for cp and mv -# -CONFIG_FEATURE_PRESERVE_HARDLINKS=y - -# -# Common options for ls, more and telnet -# -CONFIG_FEATURE_AUTOWIDTH=y - -# -# Common options for df, du, ls -# -CONFIG_FEATURE_HUMAN_READABLE=y - -# -# Common options for md5sum, sha1sum -# -CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y - -# -# Console Utilities -# -CONFIG_CHVT=y -CONFIG_CLEAR=y -CONFIG_DEALLOCVT=y -CONFIG_DUMPKMAP=y -# CONFIG_KBD_MODE is not set -CONFIG_LOADFONT=y -CONFIG_LOADKMAP=y -CONFIG_OPENVT=y -CONFIG_RESET=y -CONFIG_RESIZE=y -CONFIG_FEATURE_RESIZE_PRINT=y -CONFIG_SETCONSOLE=y -# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set -# CONFIG_SETFONT is not set -# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set -CONFIG_DEFAULT_SETFONT_DIR="" -CONFIG_SETKEYCODES=y -CONFIG_SETLOGCONS=y -# CONFIG_SHOWKEY is not set - -# -# Debian Utilities -# -CONFIG_MKTEMP=y -CONFIG_PIPE_PROGRESS=y -CONFIG_RUN_PARTS=y -CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y -# CONFIG_FEATURE_RUN_PARTS_FANCY is not set -CONFIG_START_STOP_DAEMON=y -CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y -CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y -CONFIG_WHICH=y - -# -# Editors -# -CONFIG_AWK=y -# CONFIG_FEATURE_AWK_LIBM is not set -CONFIG_CMP=y -CONFIG_DIFF=y -CONFIG_FEATURE_DIFF_BINARY=y -CONFIG_FEATURE_DIFF_DIR=y -# CONFIG_FEATURE_DIFF_MINIMAL is not set -# CONFIG_ED is not set -CONFIG_PATCH=y -CONFIG_SED=y -CONFIG_VI=y -CONFIG_FEATURE_VI_MAX_LEN=4096 -CONFIG_FEATURE_VI_8BIT=y -CONFIG_FEATURE_VI_COLON=y -CONFIG_FEATURE_VI_YANKMARK=y -CONFIG_FEATURE_VI_SEARCH=y -CONFIG_FEATURE_VI_USE_SIGNALS=y -CONFIG_FEATURE_VI_DOT_CMD=y -CONFIG_FEATURE_VI_READONLY=y -CONFIG_FEATURE_VI_SETOPTS=y -CONFIG_FEATURE_VI_SET=y -CONFIG_FEATURE_VI_WIN_RESIZE=y -CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y -CONFIG_FEATURE_ALLOW_EXEC=y - -# -# Finding Utilities -# -CONFIG_FIND=y -CONFIG_FEATURE_FIND_PRINT0=y -CONFIG_FEATURE_FIND_MTIME=y -CONFIG_FEATURE_FIND_MMIN=y -CONFIG_FEATURE_FIND_PERM=y -CONFIG_FEATURE_FIND_TYPE=y -CONFIG_FEATURE_FIND_XDEV=y -CONFIG_FEATURE_FIND_MAXDEPTH=y -CONFIG_FEATURE_FIND_NEWER=y -# CONFIG_FEATURE_FIND_INUM is not set -CONFIG_FEATURE_FIND_EXEC=y -CONFIG_FEATURE_FIND_USER=y -CONFIG_FEATURE_FIND_GROUP=y -CONFIG_FEATURE_FIND_NOT=y -CONFIG_FEATURE_FIND_DEPTH=y -CONFIG_FEATURE_FIND_PAREN=y -CONFIG_FEATURE_FIND_SIZE=y -CONFIG_FEATURE_FIND_PRUNE=y -# CONFIG_FEATURE_FIND_DELETE is not set -CONFIG_FEATURE_FIND_PATH=y -CONFIG_FEATURE_FIND_REGEX=y -# CONFIG_FEATURE_FIND_CONTEXT is not set -CONFIG_GREP=y -CONFIG_FEATURE_GREP_EGREP_ALIAS=y -CONFIG_FEATURE_GREP_FGREP_ALIAS=y -CONFIG_FEATURE_GREP_CONTEXT=y -CONFIG_XARGS=y -# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set -CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y -CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y -CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y - -# -# Init Utilities -# -CONFIG_INIT=y -CONFIG_FEATURE_USE_INITTAB=y -CONFIG_FEATURE_KILL_REMOVED=y -CONFIG_FEATURE_KILL_DELAY=0 -CONFIG_FEATURE_INIT_SCTTY=y -CONFIG_FEATURE_INIT_SYSLOG=y -CONFIG_FEATURE_EXTRA_QUIET=y -# CONFIG_FEATURE_INIT_COREDUMPS is not set -CONFIG_FEATURE_INITRD=y -CONFIG_HALT=y -CONFIG_MESG=y - -# -# Login/Password Management Utilities -# -CONFIG_FEATURE_SHADOWPASSWDS=y -# CONFIG_USE_BB_PWD_GRP is not set -# CONFIG_USE_BB_SHADOW is not set -CONFIG_USE_BB_CRYPT=y -CONFIG_ADDGROUP=y -# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set -CONFIG_DELGROUP=y -# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set -# CONFIG_FEATURE_CHECK_NAMES is not set -CONFIG_ADDUSER=y -# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set -CONFIG_DELUSER=y -CONFIG_GETTY=y -CONFIG_FEATURE_UTMP=y -CONFIG_FEATURE_WTMP=y -CONFIG_LOGIN=y -# CONFIG_PAM is not set -# CONFIG_LOGIN_SCRIPTS is not set -CONFIG_FEATURE_NOLOGIN=y -CONFIG_FEATURE_SECURETTY=y -CONFIG_PASSWD=y -CONFIG_FEATURE_PASSWD_WEAK_CHECK=y -# CONFIG_CRYPTPW is not set -# CONFIG_CHPASSWD is not set -CONFIG_SU=y -CONFIG_FEATURE_SU_SYSLOG=y -CONFIG_FEATURE_SU_CHECKS_SHELLS=y -CONFIG_SULOGIN=y -CONFIG_VLOCK=y - -# -# Linux Ext2 FS Progs -# -CONFIG_CHATTR=y -CONFIG_FSCK=y -CONFIG_LSATTR=y - -# -# Linux Module Utilities -# -CONFIG_DEFAULT_MODULES_DIR="/lib/modules" -CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" -# CONFIG_MODPROBE_SMALL is not set -# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set -# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set -CONFIG_INSMOD=y -CONFIG_RMMOD=y -CONFIG_LSMOD=y -CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y -CONFIG_MODPROBE=y -# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set -# CONFIG_DEPMOD is not set - -# -# Options common to multiple modutils -# -# CONFIG_FEATURE_2_4_MODULES is not set -# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set -# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set -# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set -# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set -# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set -CONFIG_FEATURE_CHECK_TAINTED_MODULE=y -CONFIG_FEATURE_MODUTILS_ALIAS=y -CONFIG_FEATURE_MODUTILS_SYMBOLS=y - -# -# Linux System Utilities -# -# CONFIG_BLKID is not set -CONFIG_DMESG=y -CONFIG_FEATURE_DMESG_PRETTY=y -# CONFIG_FBSET is not set -# CONFIG_FEATURE_FBSET_FANCY is not set -# CONFIG_FEATURE_FBSET_READMODE is not set -CONFIG_FDFLUSH=y -CONFIG_FDFORMAT=y -# CONFIG_FDISK is not set -# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set -# CONFIG_FEATURE_FDISK_WRITABLE is not set -# CONFIG_FEATURE_AIX_LABEL is not set -# CONFIG_FEATURE_SGI_LABEL is not set -# CONFIG_FEATURE_SUN_LABEL is not set -# CONFIG_FEATURE_OSF_LABEL is not set -# CONFIG_FEATURE_FDISK_ADVANCED is not set -# CONFIG_FINDFS is not set -CONFIG_FREERAMDISK=y -# CONFIG_FSCK_MINIX is not set -# CONFIG_MKFS_MINIX is not set -# CONFIG_FEATURE_MINIX2 is not set -CONFIG_GETOPT=y -CONFIG_HEXDUMP=y -# CONFIG_FEATURE_HEXDUMP_REVERSE is not set -# CONFIG_HD is not set -CONFIG_HWCLOCK=y -CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y -CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y -CONFIG_IPCRM=y -CONFIG_IPCS=y -CONFIG_LOSETUP=y -CONFIG_MDEV=y -CONFIG_FEATURE_MDEV_CONF=y -# CONFIG_FEATURE_MDEV_RENAME is not set -# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set -CONFIG_FEATURE_MDEV_EXEC=y -# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set -CONFIG_MKSWAP=y -# CONFIG_FEATURE_MKSWAP_V0 is not set -CONFIG_MORE=y -CONFIG_FEATURE_USE_TERMIOS=y -# CONFIG_VOLUMEID is not set -# CONFIG_FEATURE_VOLUMEID_EXT is not set -# CONFIG_FEATURE_VOLUMEID_REISERFS is not set -# CONFIG_FEATURE_VOLUMEID_FAT is not set -# CONFIG_FEATURE_VOLUMEID_HFS is not set -# CONFIG_FEATURE_VOLUMEID_JFS is not set -# CONFIG_FEATURE_VOLUMEID_XFS is not set -# CONFIG_FEATURE_VOLUMEID_NTFS is not set -# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set -# CONFIG_FEATURE_VOLUMEID_UDF is not set -# CONFIG_FEATURE_VOLUMEID_LUKS is not set -# CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set -# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set -# CONFIG_FEATURE_VOLUMEID_ROMFS is not set -# CONFIG_FEATURE_VOLUMEID_SYSV is not set -# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set -# CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set -CONFIG_MOUNT=y -# CONFIG_FEATURE_MOUNT_FAKE is not set -# CONFIG_FEATURE_MOUNT_VERBOSE is not set -# CONFIG_FEATURE_MOUNT_HELPERS is not set -# CONFIG_FEATURE_MOUNT_LABEL is not set -# CONFIG_FEATURE_MOUNT_NFS is not set -CONFIG_FEATURE_MOUNT_CIFS=y -CONFIG_FEATURE_MOUNT_FLAGS=y -CONFIG_FEATURE_MOUNT_FSTAB=y -CONFIG_PIVOT_ROOT=y -CONFIG_RDATE=y -# CONFIG_RDEV is not set -CONFIG_READPROFILE=y -# CONFIG_RTCWAKE is not set -# CONFIG_SCRIPT is not set -CONFIG_SETARCH=y -CONFIG_SWAPONOFF=y -# CONFIG_FEATURE_SWAPON_PRI is not set -CONFIG_SWITCH_ROOT=y -CONFIG_UMOUNT=y -CONFIG_FEATURE_UMOUNT_ALL=y - -# -# Common options for mount/umount -# -CONFIG_FEATURE_MOUNT_LOOP=y -# CONFIG_FEATURE_MTAB_SUPPORT is not set - -# -# Miscellaneous Utilities -# -# CONFIG_ADJTIMEX is not set -# CONFIG_BBCONFIG is not set -# CONFIG_CHAT is not set -# CONFIG_FEATURE_CHAT_NOFAIL is not set -# CONFIG_FEATURE_CHAT_TTY_HIFI is not set -# CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set -# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set -# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set -# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set -# CONFIG_FEATURE_CHAT_CLR_ABORT is not set -CONFIG_CHRT=y -CONFIG_CROND=y -# CONFIG_FEATURE_CROND_D is not set -# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set -CONFIG_CRONTAB=y -CONFIG_DC=y -# CONFIG_FEATURE_DC_LIBM is not set -# CONFIG_DEVFSD is not set -# CONFIG_DEVFSD_MODLOAD is not set -# CONFIG_DEVFSD_FG_NP is not set -# CONFIG_DEVFSD_VERBOSE is not set -# CONFIG_FEATURE_DEVFS is not set -CONFIG_DEVMEM=y -CONFIG_EJECT=y -# CONFIG_FEATURE_EJECT_SCSI is not set -# CONFIG_FBSPLASH is not set -# CONFIG_INOTIFYD is not set -CONFIG_LAST=y -CONFIG_FEATURE_LAST_SMALL=y -# CONFIG_FEATURE_LAST_FANCY is not set -CONFIG_LESS=y -CONFIG_FEATURE_LESS_MAXLINES=9999999 -CONFIG_FEATURE_LESS_BRACKETS=y -CONFIG_FEATURE_LESS_FLAGS=y -# CONFIG_FEATURE_LESS_DASHCMD is not set -# CONFIG_FEATURE_LESS_MARKS is not set -CONFIG_FEATURE_LESS_REGEXP=y -# CONFIG_FEATURE_LESS_LINENUMS is not set -# CONFIG_FEATURE_LESS_WINCH is not set -CONFIG_HDPARM=y -CONFIG_FEATURE_HDPARM_GET_IDENTITY=y -# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set -# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set -# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set -# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set -# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set -CONFIG_MAKEDEVS=y -# CONFIG_FEATURE_MAKEDEVS_LEAF is not set -CONFIG_FEATURE_MAKEDEVS_TABLE=y -# CONFIG_MAN is not set -# CONFIG_MICROCOM is not set -CONFIG_MOUNTPOINT=y -CONFIG_MT=y -# CONFIG_RAIDAUTORUN is not set -# CONFIG_READAHEAD is not set -CONFIG_RUNLEVEL=y -# CONFIG_RX is not set -CONFIG_SETSID=y -CONFIG_STRINGS=y -# CONFIG_TASKSET is not set -# CONFIG_FEATURE_TASKSET_FANCY is not set -CONFIG_TIME=y -# CONFIG_TTYSIZE is not set -CONFIG_WATCHDOG=y - -# -# Networking Utilities -# -# CONFIG_FEATURE_IPV6 is not set -# CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set -# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set -# CONFIG_ARP is not set -CONFIG_ARPING=y -# CONFIG_BRCTL is not set -# CONFIG_FEATURE_BRCTL_FANCY is not set -# CONFIG_FEATURE_BRCTL_SHOW is not set -CONFIG_DNSD=y -CONFIG_ETHER_WAKE=y -# CONFIG_FAKEIDENTD is not set -# CONFIG_FTPGET is not set -# CONFIG_FTPPUT is not set -# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set -CONFIG_HOSTNAME=y -# CONFIG_HTTPD is not set -# CONFIG_FEATURE_HTTPD_RANGES is not set -# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set -# CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP is not set -# CONFIG_FEATURE_HTTPD_SETUID is not set -# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set -# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set -# CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES is not set -# CONFIG_FEATURE_HTTPD_CGI is not set -# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set -# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set -# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set -# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set -# CONFIG_FEATURE_HTTPD_PROXY is not set -CONFIG_IFCONFIG=y -CONFIG_FEATURE_IFCONFIG_STATUS=y -CONFIG_FEATURE_IFCONFIG_SLIP=y -CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y -CONFIG_FEATURE_IFCONFIG_HW=y -# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set -# CONFIG_IFENSLAVE is not set -CONFIG_IFUPDOWN=y -CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate" -CONFIG_FEATURE_IFUPDOWN_IP=y -# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set -# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set -CONFIG_FEATURE_IFUPDOWN_IPV4=y -# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set -CONFIG_FEATURE_IFUPDOWN_MAPPING=y -# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set -CONFIG_INETD=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y -CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y -# CONFIG_FEATURE_INETD_RPC is not set -CONFIG_IP=y -CONFIG_FEATURE_IP_ADDRESS=y -CONFIG_FEATURE_IP_LINK=y -CONFIG_FEATURE_IP_ROUTE=y -CONFIG_FEATURE_IP_TUNNEL=y -CONFIG_FEATURE_IP_RULE=y -CONFIG_FEATURE_IP_SHORT_FORMS=y -# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set -CONFIG_IPADDR=y -CONFIG_IPLINK=y -CONFIG_IPROUTE=y -CONFIG_IPTUNNEL=y -CONFIG_IPRULE=y -# CONFIG_IPCALC is not set -# CONFIG_FEATURE_IPCALC_FANCY is not set -# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set -CONFIG_NAMEIF=y -# CONFIG_FEATURE_NAMEIF_EXTENDED is not set -# CONFIG_NC is not set -# CONFIG_NC_SERVER is not set -# CONFIG_NC_EXTRA is not set -CONFIG_NETSTAT=y -# CONFIG_FEATURE_NETSTAT_WIDE is not set -# CONFIG_FEATURE_NETSTAT_PRG is not set -CONFIG_NSLOOKUP=y -CONFIG_PING=y -# CONFIG_PING6 is not set -CONFIG_FEATURE_FANCY_PING=y -# CONFIG_PSCAN is not set -CONFIG_ROUTE=y -# CONFIG_SLATTACH is not set -CONFIG_TELNET=y -CONFIG_FEATURE_TELNET_TTYPE=y -CONFIG_FEATURE_TELNET_AUTOLOGIN=y -# CONFIG_TELNETD is not set -# CONFIG_FEATURE_TELNETD_STANDALONE is not set -CONFIG_TFTP=y -# CONFIG_TFTPD is not set -CONFIG_FEATURE_TFTP_GET=y -CONFIG_FEATURE_TFTP_PUT=y -CONFIG_FEATURE_TFTP_BLOCKSIZE=y -# CONFIG_TFTP_DEBUG is not set -CONFIG_TRACEROUTE=y -# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set -# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set -# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set -CONFIG_APP_UDHCPD=y -CONFIG_APP_DHCPRELAY=y -CONFIG_APP_DUMPLEASES=y -# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set -CONFIG_DHCPD_LEASES_FILE="/var/lib/misc/udhcpd.leases" -CONFIG_APP_UDHCPC=y -CONFIG_FEATURE_UDHCPC_ARPING=y -# CONFIG_FEATURE_UDHCP_PORT is not set -# CONFIG_UDHCP_DEBUG is not set -# CONFIG_FEATURE_UDHCP_RFC3397 is not set -CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" -CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 -CONFIG_VCONFIG=y -CONFIG_WGET=y -CONFIG_FEATURE_WGET_STATUSBAR=y -CONFIG_FEATURE_WGET_AUTHENTICATION=y -CONFIG_FEATURE_WGET_LONG_OPTIONS=y -# CONFIG_ZCIP is not set -# CONFIG_TCPSVD is not set -# CONFIG_UDPSVD is not set - -# -# Print Utilities -# -# CONFIG_LPD is not set -# CONFIG_LPR is not set -# CONFIG_LPQ is not set - -# -# Mail Utilities -# -# CONFIG_MAKEMIME is not set -CONFIG_FEATURE_MIME_CHARSET="" -# CONFIG_POPMAILDIR is not set -# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set -# CONFIG_REFORMIME is not set -# CONFIG_FEATURE_REFORMIME_COMPAT is not set -# CONFIG_SENDMAIL is not set -# CONFIG_FEATURE_SENDMAIL_MAILX is not set -# CONFIG_FEATURE_SENDMAIL_MAILXX is not set - -# -# Process Utilities -# -CONFIG_FREE=y -CONFIG_FUSER=y -CONFIG_KILL=y -CONFIG_KILLALL=y -CONFIG_KILLALL5=y -# CONFIG_NMETER is not set -# CONFIG_PGREP is not set -CONFIG_PIDOF=y -CONFIG_FEATURE_PIDOF_SINGLE=y -CONFIG_FEATURE_PIDOF_OMIT=y -# CONFIG_PKILL is not set -CONFIG_PS=y -CONFIG_FEATURE_PS_WIDE=y -# CONFIG_FEATURE_PS_TIME is not set -# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set -CONFIG_RENICE=y -CONFIG_BB_SYSCTL=y -CONFIG_TOP=y -CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y -CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y -# CONFIG_FEATURE_TOP_SMP_CPU is not set -# CONFIG_FEATURE_TOP_DECIMALS is not set -# CONFIG_FEATURE_TOP_SMP_PROCESS is not set -# CONFIG_FEATURE_TOPMEM is not set -CONFIG_UPTIME=y -CONFIG_WATCH=y - -# -# Runit Utilities -# -# CONFIG_RUNSV is not set -# CONFIG_RUNSVDIR is not set -# CONFIG_FEATURE_RUNSVDIR_LOG is not set -# CONFIG_SV is not set -CONFIG_SV_DEFAULT_SERVICE_DIR="" -# CONFIG_SVLOGD is not set -# CONFIG_CHPST is not set -# CONFIG_SETUIDGID is not set -# CONFIG_ENVUIDGID is not set -# CONFIG_ENVDIR is not set -# CONFIG_SOFTLIMIT is not set -# CONFIG_CHCON is not set -# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set -# CONFIG_GETENFORCE is not set -# CONFIG_GETSEBOOL is not set -# CONFIG_LOAD_POLICY is not set -# CONFIG_MATCHPATHCON is not set -# CONFIG_RESTORECON is not set -# CONFIG_RUNCON is not set -# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set -# CONFIG_SELINUXENABLED is not set -# CONFIG_SETENFORCE is not set -# CONFIG_SETFILES is not set -# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set -# CONFIG_SETSEBOOL is not set -# CONFIG_SESTATUS is not set - -# -# Shells -# -CONFIG_FEATURE_SH_IS_ASH=y -# CONFIG_FEATURE_SH_IS_HUSH is not set -# CONFIG_FEATURE_SH_IS_MSH is not set -# CONFIG_FEATURE_SH_IS_NONE is not set -CONFIG_ASH=y - -# -# Ash Shell Options -# -CONFIG_ASH_BASH_COMPAT=y -CONFIG_ASH_JOB_CONTROL=y -CONFIG_ASH_READ_NCHARS=y -CONFIG_ASH_READ_TIMEOUT=y -CONFIG_ASH_ALIAS=y -CONFIG_ASH_MATH_SUPPORT=y -CONFIG_ASH_MATH_SUPPORT_64=y -# CONFIG_ASH_GETOPTS is not set -CONFIG_ASH_BUILTIN_ECHO=y -CONFIG_ASH_BUILTIN_PRINTF=y -CONFIG_ASH_BUILTIN_TEST=y -CONFIG_ASH_CMDCMD=y -# CONFIG_ASH_MAIL is not set -CONFIG_ASH_OPTIMIZE_FOR_SIZE=y -CONFIG_ASH_RANDOM_SUPPORT=y -CONFIG_ASH_EXPAND_PRMT=y -# CONFIG_HUSH is not set -# CONFIG_HUSH_HELP is not set -# CONFIG_HUSH_INTERACTIVE is not set -# CONFIG_HUSH_JOB is not set -# CONFIG_HUSH_TICK is not set -# CONFIG_HUSH_IF is not set -# CONFIG_HUSH_LOOPS is not set -# CONFIG_HUSH_CASE is not set -# CONFIG_LASH is not set -# CONFIG_MSH is not set - -# -# Bourne Shell Options -# -CONFIG_FEATURE_SH_EXTRA_QUIET=y -# CONFIG_FEATURE_SH_STANDALONE is not set -# CONFIG_FEATURE_SH_NOFORK is not set -# CONFIG_CTTYHACK is not set - -# -# System Logging Utilities -# -CONFIG_SYSLOGD=y -CONFIG_FEATURE_ROTATE_LOGFILE=y -CONFIG_FEATURE_REMOTE_LOG=y -# CONFIG_FEATURE_SYSLOGD_DUP is not set -# CONFIG_FEATURE_IPC_SYSLOG is not set -CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE= -# CONFIG_LOGREAD is not set -# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set -CONFIG_KLOGD=y -CONFIG_LOGGER=y diff --git a/package/busybox/busybox-1.18.4/busybox-1.18.4-hush.patch b/package/busybox/busybox-1.18.4/busybox-1.18.4-hush.patch deleted file mode 100644 index 4e995af..0000000 --- a/package/busybox/busybox-1.18.4/busybox-1.18.4-hush.patch +++ /dev/null @@ -1,160 +0,0 @@ ---- busybox-1.18.4/shell/hush.c -+++ busybox-1.18.4-hush/shell/hush.c -@@ -427,6 +427,15 @@ enum { - /* Used for initialization: o_string foo = NULL_O_STRING; */ - #define NULL_O_STRING { NULL } - -+#ifndef debug_printf_parse -+static const char *const assignment_flag[] = { -+ "MAYBE_ASSIGNMENT", -+ "DEFINITELY_ASSIGNMENT", -+ "NOT_ASSIGNMENT", -+ "WORD_IS_KEYWORD", -+}; -+#endif -+ - /* I can almost use ordinary FILE*. Is open_memstream() universally - * available? Where is it documented? */ - typedef struct in_str { -@@ -2885,24 +2894,24 @@ static const struct reserved_combo* matc - */ - static const struct reserved_combo reserved_list[] = { - # if ENABLE_HUSH_IF -- { "!", RES_NONE, NOT_ASSIGNMENT , 0 }, -- { "if", RES_IF, WORD_IS_KEYWORD, FLAG_THEN | FLAG_START }, -- { "then", RES_THEN, WORD_IS_KEYWORD, FLAG_ELIF | FLAG_ELSE | FLAG_FI }, -- { "elif", RES_ELIF, WORD_IS_KEYWORD, FLAG_THEN }, -- { "else", RES_ELSE, WORD_IS_KEYWORD, FLAG_FI }, -- { "fi", RES_FI, NOT_ASSIGNMENT , FLAG_END }, -+ { "!", RES_NONE, NOT_ASSIGNMENT , 0 }, -+ { "if", RES_IF, MAYBE_ASSIGNMENT, FLAG_THEN | FLAG_START }, -+ { "then", RES_THEN, MAYBE_ASSIGNMENT, FLAG_ELIF | FLAG_ELSE | FLAG_FI }, -+ { "elif", RES_ELIF, MAYBE_ASSIGNMENT, FLAG_THEN }, -+ { "else", RES_ELSE, MAYBE_ASSIGNMENT, FLAG_FI }, -+ { "fi", RES_FI, NOT_ASSIGNMENT , FLAG_END }, - # endif - # if ENABLE_HUSH_LOOPS -- { "for", RES_FOR, NOT_ASSIGNMENT , FLAG_IN | FLAG_DO | FLAG_START }, -- { "while", RES_WHILE, WORD_IS_KEYWORD, FLAG_DO | FLAG_START }, -- { "until", RES_UNTIL, WORD_IS_KEYWORD, FLAG_DO | FLAG_START }, -- { "in", RES_IN, NOT_ASSIGNMENT , FLAG_DO }, -- { "do", RES_DO, WORD_IS_KEYWORD, FLAG_DONE }, -- { "done", RES_DONE, NOT_ASSIGNMENT , FLAG_END }, -+ { "for", RES_FOR, NOT_ASSIGNMENT , FLAG_IN | FLAG_DO | FLAG_START }, -+ { "while", RES_WHILE, MAYBE_ASSIGNMENT, FLAG_DO | FLAG_START }, -+ { "until", RES_UNTIL, MAYBE_ASSIGNMENT, FLAG_DO | FLAG_START }, -+ { "in", RES_IN, NOT_ASSIGNMENT , FLAG_DO }, -+ { "do", RES_DO, MAYBE_ASSIGNMENT, FLAG_DONE }, -+ { "done", RES_DONE, NOT_ASSIGNMENT , FLAG_END }, - # endif - # if ENABLE_HUSH_CASE -- { "case", RES_CASE, NOT_ASSIGNMENT , FLAG_MATCH | FLAG_START }, -- { "esac", RES_ESAC, NOT_ASSIGNMENT , FLAG_END }, -+ { "case", RES_CASE, NOT_ASSIGNMENT , FLAG_MATCH | FLAG_START }, -+ { "esac", RES_ESAC, NOT_ASSIGNMENT , FLAG_END }, - # endif - }; - const struct reserved_combo *r; -@@ -2968,6 +2977,7 @@ static int reserved_word(o_string *word, - ctx->ctx_res_w = r->res; - ctx->old_flag = r->flag; - word->o_assignment = r->assignment_flag; -+ debug_printf_parse("word->o_assignment='%s'\n", assignment_flag[word->o_assignment]); - - if (ctx->old_flag & FLAG_END) { - struct parse_context *old; -@@ -3034,18 +3044,6 @@ static int done_word(o_string *word, str - debug_printf_parse("word stored in rd_filename: '%s'\n", word->data); - ctx->pending_redirect = NULL; - } else { -- /* If this word wasn't an assignment, next ones definitely -- * can't be assignments. Even if they look like ones. */ -- if (word->o_assignment != DEFINITELY_ASSIGNMENT -- && word->o_assignment != WORD_IS_KEYWORD -- ) { -- word->o_assignment = NOT_ASSIGNMENT; -- } else { -- if (word->o_assignment == DEFINITELY_ASSIGNMENT) -- command->assignment_cnt++; -- word->o_assignment = MAYBE_ASSIGNMENT; -- } -- - #if HAS_KEYWORDS - # if ENABLE_HUSH_CASE - if (ctx->ctx_dsemicolon -@@ -3065,8 +3063,9 @@ static int done_word(o_string *word, str - && ctx->ctx_res_w != RES_CASE - # endif - ) { -- debug_printf_parse("checking '%s' for reserved-ness\n", word->data); -- if (reserved_word(word, ctx)) { -+ int reserved = reserved_word(word, ctx); -+ debug_printf_parse("checking for reserved-ness: %d\n", reserved); -+ if (reserved) { - o_reset_to_empty_unquoted(word); - debug_printf_parse("done_word return %d\n", - (ctx->ctx_res_w == RES_SNTX)); -@@ -3087,6 +3086,23 @@ static int done_word(o_string *word, str - "groups and arglists don't mix\n"); - return 1; - } -+ -+ /* If this word wasn't an assignment, next ones definitely -+ * can't be assignments. Even if they look like ones. */ -+ if (word->o_assignment != DEFINITELY_ASSIGNMENT -+ && word->o_assignment != WORD_IS_KEYWORD -+ ) { -+ word->o_assignment = NOT_ASSIGNMENT; -+ } else { -+ if (word->o_assignment == DEFINITELY_ASSIGNMENT) { -+ command->assignment_cnt++; -+ debug_printf_parse("++assignment_cnt=%d\n", command->assignment_cnt); -+ } -+ debug_printf_parse("word->o_assignment was:'%s'\n", assignment_flag[word->o_assignment]); -+ word->o_assignment = MAYBE_ASSIGNMENT; -+ } -+ debug_printf_parse("word->o_assignment='%s'\n", assignment_flag[word->o_assignment]); -+ - if (word->has_quoted_part - /* optimization: and if it's ("" or '') or ($v... or `cmd`...): */ - && (word->data[0] == '\0' || word->data[0] == SPECIAL_VAR_SYMBOL) -@@ -4105,6 +4121,7 @@ static struct pipe *parse_stream(char ** - && is_well_formed_var_name(dest.data, '=') - ) { - dest.o_assignment = DEFINITELY_ASSIGNMENT; -+ debug_printf_parse("dest.o_assignment='%s'\n", assignment_flag[dest.o_assignment]); - } - continue; - } -@@ -4154,6 +4171,7 @@ static struct pipe *parse_stream(char ** - heredoc_cnt = 0; - } - dest.o_assignment = MAYBE_ASSIGNMENT; -+ debug_printf_parse("dest.o_assignment='%s'\n", assignment_flag[dest.o_assignment]); - ch = ';'; - /* note: if (is_blank) continue; - * will still trigger for us */ -@@ -4203,6 +4221,7 @@ static struct pipe *parse_stream(char ** - } - done_pipe(&ctx, PIPE_SEQ); - dest.o_assignment = MAYBE_ASSIGNMENT; -+ debug_printf_parse("dest.o_assignment='%s'\n", assignment_flag[dest.o_assignment]); - /* Do we sit outside of any if's, loops or case's? */ - if (!HAS_KEYWORDS - IF_HAS_KEYWORDS(|| (ctx.ctx_res_w == RES_NONE && ctx.old_flag == 0)) -@@ -4309,6 +4328,7 @@ static struct pipe *parse_stream(char ** - /* ch is a special char and thus this word - * cannot be an assignment */ - dest.o_assignment = NOT_ASSIGNMENT; -+ debug_printf_parse("dest.o_assignment='%s'\n", assignment_flag[dest.o_assignment]); - } - - /* Note: nommu_addchr(&ctx.as_string, ch) is already done */ -@@ -4406,6 +4426,7 @@ static struct pipe *parse_stream(char ** - /* We just finished a cmd. New one may start - * with an assignment */ - dest.o_assignment = MAYBE_ASSIGNMENT; -+ debug_printf_parse("dest.o_assignment='%s'\n", assignment_flag[dest.o_assignment]); - break; - case '&': - if (done_word(&dest, &ctx)) { diff --git a/package/cmake/cmake-2.8.3-qt4-fix.patch b/package/cmake/cmake-2.8.3-qt4-fix.patch deleted file mode 100644 index 4d50c92..0000000 --- a/package/cmake/cmake-2.8.3-qt4-fix.patch +++ /dev/null @@ -1,257 +0,0 @@ -The FindQt4 module of CMake insists on having uic, even if the QtGui -module isn't part of the requirements to build the program. This isn't -correct, as Qt doesn't build/install the uic program when QtGui is -disabled (uic is used to generate some UI code). - -This has been fixed upstream in -http://cmake.org/gitweb?p=cmake.git;a=commit;h=43cb9b8276a70d153d56a69d5c61daaf2bc51b78. This -commit will be part of the upcoming 2.8.4 CMake release, but in the -mean time, let's include it in Buildroot. - -From 43cb9b8276a70d153d56a69d5c61daaf2bc51b78 Mon Sep 17 00:00:00 2001 -From: Clinton Stimpson -Date: Fri, 14 Jan 2011 21:26:19 -0700 -Subject: [PATCH] Change to use fphsa to check required variables and version. - -Also, set the required variables based on components, if specified. -Also, don't make finding uic required if not using QtGui. ---- - Modules/FindQt4.cmake | 179 +++++++++++++------------------------------------ - 1 files changed, 46 insertions(+), 133 deletions(-) - -diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake -index d9d6ea7..70e69b0 100644 ---- a/Modules/FindQt4.cmake -+++ b/Modules/FindQt4.cmake -@@ -9,7 +9,7 @@ - # QT_LIBRARIES variable. - # - # Typical usage could be something like: --# find_package(Qt4 4.4.3 COMPONENTS QtCore QtGui QtXml REQUIRED ) -+# find_package(Qt4 4.4.3 REQUIRED QtCore QtGui QtXml) - # include(${QT_USE_FILE}) - # add_executable(myexe main.cpp) - # target_link_libraries(myexe ${QT_LIBRARIES}) -@@ -354,6 +354,7 @@ ENDIF(QT_QT_LIBRARY) - - INCLUDE(CheckSymbolExists) - INCLUDE(MacroAddFileDependencies) -+INCLUDE(FindPackageHandleStandardArgs) - - SET(QT_USE_FILE ${CMAKE_ROOT}/Modules/UseQt4.cmake) - -@@ -469,6 +470,7 @@ FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 qmake-mac PATHS - DOC "The qmake executable for the Qt installation to use" - ) - -+# double check that it was a Qt4 qmake, if not, re-find with different names - IF (QT_QMAKE_EXECUTABLE) - - IF(QT_QMAKE_EXECUTABLE_LAST) -@@ -477,8 +479,6 @@ IF (QT_QMAKE_EXECUTABLE) - - SET(QT_QMAKE_EXECUTABLE_LAST "${QT_QMAKE_EXECUTABLE}" CACHE INTERNAL "" FORCE) - -- SET(QT4_QMAKE_FOUND FALSE) -- - _qt4_query_qmake(QT_VERSION QTVERSION) - - # check for qt3 qmake and then try and find qmake4 or qmake-qt4 in the path -@@ -495,74 +495,9 @@ IF (QT_QMAKE_EXECUTABLE) - ENDIF(QT_QMAKE_EXECUTABLE) - ENDIF(NOT QTVERSION) - -- # check that we found the Qt4 qmake, Qt3 qmake output won't match here -- STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" qt_version_tmp "${QTVERSION}") -- IF (qt_version_tmp) -- -- # we need at least version 4.0.0 -- IF (NOT QT_MIN_VERSION) -- SET(QT_MIN_VERSION "4.0.0") -- ENDIF (NOT QT_MIN_VERSION) -- -- #now parse the parts of the user given version string into variables -- STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" req_qt_major_vers "${QT_MIN_VERSION}") -- IF (NOT req_qt_major_vers) -- MESSAGE( FATAL_ERROR "Invalid Qt version string given: \"${QT_MIN_VERSION}\", expected e.g. \"4.0.1\"") -- ENDIF (NOT req_qt_major_vers) -- -- # now parse the parts of the user given version string into variables -- STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" req_qt_major_vers "${QT_MIN_VERSION}") -- STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" req_qt_minor_vers "${QT_MIN_VERSION}") -- STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" req_qt_patch_vers "${QT_MIN_VERSION}") -- -- # Suppport finding at least a particular version, for instance FIND_PACKAGE( Qt4 4.4.3 ) -- # This implementation is a hack to avoid duplicating code and make sure we stay -- # source-compatible with CMake 2.6.x -- IF( Qt4_FIND_VERSION ) -- SET( QT_MIN_VERSION ${Qt4_FIND_VERSION} ) -- SET( req_qt_major_vers ${Qt4_FIND_VERSION_MAJOR} ) -- SET( req_qt_minor_vers ${Qt4_FIND_VERSION_MINOR} ) -- SET( req_qt_patch_vers ${Qt4_FIND_VERSION_PATCH} ) -- ENDIF( Qt4_FIND_VERSION ) -- -- IF (NOT req_qt_major_vers EQUAL 4) -- MESSAGE( FATAL_ERROR "Invalid Qt version string given: \"${QT_MIN_VERSION}\", major version 4 is required, e.g. \"4.0.1\"") -- ENDIF (NOT req_qt_major_vers EQUAL 4) -- -- # and now the version string given by qmake -- STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}") -- STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}") -- STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}") -- -- # compute an overall version number which can be compared at once -- MATH(EXPR req_vers "${req_qt_major_vers}*10000 + ${req_qt_minor_vers}*100 + ${req_qt_patch_vers}") -- MATH(EXPR found_vers "${QT_VERSION_MAJOR}*10000 + ${QT_VERSION_MINOR}*100 + ${QT_VERSION_PATCH}") -- -- # Support finding *exactly* a particular version, for instance FIND_PACKAGE( Qt4 4.4.3 EXACT ) -- IF( Qt4_FIND_VERSION_EXACT ) -- IF(found_vers EQUAL req_vers) -- SET( QT4_QMAKE_FOUND TRUE ) -- ELSE(found_vers EQUAL req_vers) -- SET( QT4_QMAKE_FOUND FALSE ) -- IF (found_vers LESS req_vers) -- SET(QT4_INSTALLED_VERSION_TOO_OLD TRUE) -- ELSE (found_vers LESS req_vers) -- SET(QT4_INSTALLED_VERSION_TOO_NEW TRUE) -- ENDIF (found_vers LESS req_vers) -- ENDIF(found_vers EQUAL req_vers) -- ELSE( Qt4_FIND_VERSION_EXACT ) -- IF (found_vers LESS req_vers) -- SET(QT4_QMAKE_FOUND FALSE) -- SET(QT4_INSTALLED_VERSION_TOO_OLD TRUE) -- ELSE (found_vers LESS req_vers) -- SET(QT4_QMAKE_FOUND TRUE) -- ENDIF (found_vers LESS req_vers) -- ENDIF( Qt4_FIND_VERSION_EXACT ) -- ENDIF (qt_version_tmp) -- - ENDIF (QT_QMAKE_EXECUTABLE) - --IF (QT4_QMAKE_FOUND) -+IF (QT_QMAKE_EXECUTABLE AND QTVERSION) - - # ask qmake for the mkspecs directory - # we do this first because QT_LIBINFIX might be set -@@ -1072,32 +1007,7 @@ IF (QT4_QMAKE_FOUND) - # get the directory of the current file, used later on in the file - GET_FILENAME_COMPONENT( _qt4_current_dir "${CMAKE_CURRENT_LIST_FILE}" PATH) - -- ###################################### -- # -- # decide if Qt got found -- # -- ###################################### -- -- # if the includes,libraries,moc,uic and rcc are found then we have it -- IF( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND -- QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY) -- SET( QT4_FOUND "YES" ) -- INCLUDE(FindPackageMessage) -- FIND_PACKAGE_MESSAGE(Qt4 "Found Qt-Version ${QTVERSION} (using ${QT_QMAKE_EXECUTABLE})" -- "[${QT_LIBRARY_DIR}][${QT_INCLUDE_DIR}][${QT_MOC_EXECUTABLE}][${QT_UIC_EXECUTABLE}][${QT_RCC_EXECUTABLE}]") -- ELSE( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND -- QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY) -- SET( QT4_FOUND "NO") -- SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE) -- IF( Qt4_FIND_REQUIRED) -- MESSAGE( FATAL_ERROR "Qt libraries, includes, moc, uic or/and rcc NOT found!") -- ENDIF( Qt4_FIND_REQUIRED) -- ENDIF( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND -- QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY) - -- SET(QT_FOUND ${QT4_FOUND}) -- -- - ############################################### - # - # configuration/system dependent settings -@@ -1189,44 +1099,47 @@ IF (QT4_QMAKE_FOUND) - - INCLUDE("${_qt4_current_dir}/Qt4Macros.cmake") - -+ENDIF(QT_QMAKE_EXECUTABLE AND QTVERSION) - -- ####################################### -- # -- # compatibility settings -- # -- ####################################### -- # Backwards compatibility for CMake1.4 and 1.2 -- SET (QT_MOC_EXE ${QT_MOC_EXECUTABLE} ) -- SET (QT_UIC_EXE ${QT_UIC_EXECUTABLE} ) -- -- SET( QT_QT_LIBRARY "") -- --ELSE(QT4_QMAKE_FOUND) -- -- SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE) -- -- # The code below is overly complex to make sure we do not break compatibility with CMake 2.6.x -- # For CMake 2.8, it should be simplified by getting rid of QT4_INSTALLED_VERSION_TOO_OLD and -- # QT4_INSTALLED_VERSION_TOO_NEW -- IF(Qt4_FIND_REQUIRED) -- IF(QT4_INSTALLED_VERSION_TOO_OLD) -- IF( Qt4_FIND_VERSION_EXACT ) -- MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too old, version ${QT_MIN_VERSION} is required") -- ELSE( Qt4_FIND_VERSION_EXACT ) -- MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too old, at least version ${QT_MIN_VERSION} is required") -- ENDIF( Qt4_FIND_VERSION_EXACT ) -- ELSE(QT4_INSTALLED_VERSION_TOO_OLD) -- IF( Qt4_FIND_VERSION_EXACT AND QT4_INSTALLED_VERSION_TOO_NEW ) -- MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too new, version ${QT_MIN_VERSION} is required") -- ELSE( Qt4_FIND_VERSION_EXACT AND QT4_INSTALLED_VERSION_TOO_NEW ) -- MESSAGE( FATAL_ERROR "Qt qmake not found!") -- ENDIF( Qt4_FIND_VERSION_EXACT AND QT4_INSTALLED_VERSION_TOO_NEW ) -- ENDIF(QT4_INSTALLED_VERSION_TOO_OLD) -- ELSE(Qt4_FIND_REQUIRED) -- IF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY) -- MESSAGE(STATUS "The installed Qt version ${QTVERSION} is too old, at least version ${QT_MIN_VERSION} is required") -- ENDIF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY) -- ENDIF(Qt4_FIND_REQUIRED) -- --ENDIF (QT4_QMAKE_FOUND) -+#support old QT_MIN_VERSION if set, but not if version is supplied by find_package() -+IF(NOT Qt4_FIND_VERSION AND QT_MIN_VERSION) -+ SET(Qt4_FIND_VERSION ${QT_MIN_VERSION}) -+ENDIF(NOT Qt4_FIND_VERSION AND QT_MIN_VERSION) -+ -+IF( Qt4_FIND_COMPONENTS ) -+ -+ # if components specified in find_package(), make sure each of those pieces were found -+ SET(_QT4_FOUND_REQUIRED_VARS QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR) -+ FOREACH( component ${Qt4_FIND_COMPONENTS} ) -+ STRING( TOUPPER ${component} _COMPONENT ) -+ SET(_QT4_FOUND_REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} QT_${_COMPONENT}_INCLUDE_DIR QT_${_COMPONENT}_LIBRARY) -+ ENDFOREACH( component ) -+ -+ if(Qt4_FIND_COMPONENTS MATCHES QtGui) -+ SET(_QT4_FOUND_REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} QT_UIC_EXECUTABLE) -+ endif(Qt4_FIND_COMPONENTS MATCHES QtGui) -+ -+ELSE( Qt4_FIND_COMPONENTS ) -+ -+ # if no components specified, we'll make a default set of required variables to say Qt is found -+ SET(_QT4_FOUND_REQUIRED_VARS QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_UIC_EXECUTABLE QT_INCLUDE_DIR -+ QT_LIBRARY_DIR QT_QTCORE_LIBRARY) -+ -+ENDIF( Qt4_FIND_COMPONENTS ) -+ -+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt4 -+ REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} -+ VERSION_VAR QTVERSION -+ ) -+ -+####################################### -+# -+# compatibility settings -+# -+####################################### -+# Backwards compatibility for CMake1.4 and 1.2 -+SET (QT_MOC_EXE ${QT_MOC_EXECUTABLE} ) -+SET (QT_UIC_EXE ${QT_UIC_EXECUTABLE} ) -+SET( QT_QT_LIBRARY "") -+SET(QT_FOUND ${QT4_FOUND}) - --- -1.7.0 diff --git a/package/config/.gitignore b/package/config/.gitignore deleted file mode 100644 index 2694c9a..0000000 --- a/package/config/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# -# Quilt is being used to handle the patch series -# -.pc diff --git a/package/config/Makefile b/package/config/Makefile deleted file mode 100644 index ece2a82..0000000 --- a/package/config/Makefile +++ /dev/null @@ -1,372 +0,0 @@ -# =========================================================================== -# Kernel configuration targets -# These targets are used from top-level makefile - -PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \ - localmodconfig localyesconfig - -ifdef KBUILD_KCONFIG -Kconfig := $(KBUILD_KCONFIG) -else -Kconfig := Kconfig -endif - -xconfig: $(obj)/qconf - $< $(Kconfig) - -gconfig: $(obj)/gconf - $< $(Kconfig) - -menuconfig: $(obj)/mconf - $< $(Kconfig) - -config: $(obj)/conf - $< --oldaskconfig $(Kconfig) - -nconfig: $(obj)/nconf - $< $(Kconfig) - -oldconfig: $(obj)/conf - $< --$@ $(Kconfig) - -silentoldconfig: $(obj)/conf - $(Q)mkdir -p include/generated - $< --$@ $(Kconfig) - -# if no path is given, then use src directory to find file -ifdef LSMOD -LSMOD_F := $(LSMOD) -ifeq ($(findstring /,$(LSMOD)),) - LSMOD_F := $(objtree)/$(LSMOD) -endif -endif - -localmodconfig: $(obj)/streamline_config.pl $(obj)/conf - $(Q)mkdir -p include/generated - $(Q)perl $< $(srctree) $(Kconfig) $(LSMOD_F) > .tmp.config - $(Q)if [ -f .config ]; then \ - cmp -s .tmp.config .config || \ - (mv -f .config .config.old.1; \ - mv -f .tmp.config .config; \ - $(obj)/conf --silentoldconfig $(Kconfig); \ - mv -f .config.old.1 .config.old) \ - else \ - mv -f .tmp.config .config; \ - $(obj)/conf --silentoldconfig $(Kconfig); \ - fi - $(Q)rm -f .tmp.config - -localyesconfig: $(obj)/streamline_config.pl $(obj)/conf - $(Q)mkdir -p include/generated - $(Q)perl $< $(srctree) $(Kconfig) $(LSMOD_F) > .tmp.config - $(Q)sed -i s/=m/=y/ .tmp.config - $(Q)if [ -f .config ]; then \ - cmp -s .tmp.config .config || \ - (mv -f .config .config.old.1; \ - mv -f .tmp.config .config; \ - $(obj)/conf --silentoldconfig $(Kconfig); \ - mv -f .config.old.1 .config.old) \ - else \ - mv -f .tmp.config .config; \ - $(obj)/conf --silentoldconfig $(Kconfig); \ - fi - $(Q)rm -f .tmp.config - -# Create new linux.pot file -# Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files -# The symlink is used to repair a deficiency in arch/um -update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h - $(Q)echo " GEN config" - $(Q)xgettext --default-domain=linux \ - --add-comments --keyword=_ --keyword=N_ \ - --from-code=UTF-8 \ - --files-from=scripts/kconfig/POTFILES.in \ - --output $(obj)/config.pot - $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot - $(Q)ln -fs Kconfig.i386 arch/um/Kconfig.arch - $(Q)(for i in `ls arch/*/Kconfig`; \ - do \ - echo " GEN $$i"; \ - $(obj)/kxgettext $$i \ - >> $(obj)/config.pot; \ - done ) - $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \ - --output $(obj)/linux.pot - $(Q)rm -f arch/um/Kconfig.arch - $(Q)rm -f $(obj)/config.pot - -PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig - -allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf - $< --$@ $(Kconfig) - -PHONY += listnewconfig oldnoconfig savedefconfig defconfig - -listnewconfig oldnoconfig: $(obj)/conf - $< --$@ $(Kconfig) - -savedefconfig: $(obj)/conf - $< --$@=defconfig $(Kconfig) - -defconfig: $(obj)/conf -ifeq ($(KBUILD_DEFCONFIG),) - $< --defconfig $(Kconfig) -else - @echo "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'" - $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) -endif - -%_defconfig: $(obj)/conf - $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig) - -# Help text used by make help -help: - @echo ' config - Update current config utilising a line-oriented program' - @echo ' nconfig - Update current config utilising a ncurses menu based program' - @echo ' menuconfig - Update current config utilising a menu based program' - @echo ' xconfig - Update current config utilising a QT based front-end' - @echo ' gconfig - Update current config utilising a GTK based front-end' - @echo ' oldconfig - Update current config utilising a provided .config as base' - @echo ' localmodconfig - Update current config disabling modules not loaded' - @echo ' localyesconfig - Update current config converting local mods to core' - @echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps' - @echo ' defconfig - New config with default from ARCH supplied defconfig' - @echo ' savedefconfig - Save current config as ./defconfig (minimal config)' - @echo ' allnoconfig - New config where all options are answered with no' - @echo ' allyesconfig - New config where all options are accepted with yes' - @echo ' allmodconfig - New config selecting modules when possible' - @echo ' alldefconfig - New config with all symbols set to default' - @echo ' randconfig - New config with random answer to all options' - @echo ' listnewconfig - List new options' - @echo ' oldnoconfig - Same as silentoldconfig but set new symbols to n (unset)' - -# lxdialog stuff -check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh - -# Use recursively expanded variables so we do not call gcc unless -# we really need to do so. (Do not call gcc as part of make mrproper) -HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \ - -DLOCALE - -# =========================================================================== -# Shared Makefile for the various kconfig executables: -# conf: Used for defconfig, oldconfig and related targets -# nconf: Used for the nconfig target. -# Utilizes ncurses -# mconf: Used for the menuconfig target -# Utilizes the lxdialog package -# qconf: Used for the xconfig target -# Based on QT which needs to be installed to compile it -# gconf: Used for the gconfig target -# Based on GTK which needs to be installed to compile it -# object files used by all kconfig flavours - -lxdialog := lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o -lxdialog += lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o - -conf-objs := conf.o zconf.tab.o -mconf-objs := mconf.o zconf.tab.o $(lxdialog) -nconf-objs := nconf.o zconf.tab.o nconf.gui.o -kxgettext-objs := kxgettext.o zconf.tab.o - -hostprogs-y := conf qconf gconf kxgettext - -ifeq ($(MAKECMDGOALS),nconfig) - hostprogs-y += nconf -endif -ifeq ($(findstring nconf,$(MAKECMDGOALS)),nconf) - hostprogs-y += nconf -endif - -ifeq ($(MAKECMDGOALS),menuconfig) - hostprogs-y += mconf -endif -ifeq ($(findstring mconf,$(MAKECMDGOALS)),mconf) - hostprogs-y += mconf -endif - -ifeq ($(MAKECMDGOALS),xconfig) - qconf-target := 1 -endif -ifeq ($(findstring qconf,$(MAKECMDGOALS)),qconf) - qconf-target := 1 -endif - -ifeq ($(MAKECMDGOALS),gconfig) - gconf-target := 1 -endif -ifeq ($(findstring gconf,$(MAKECMDGOALS)),gconf) - gconf-target := 1 -endif - -ifeq ($(qconf-target),1) -qconf-cxxobjs := qconf.o -qconf-objs := kconfig_load.o zconf.tab.o -endif - -ifeq ($(gconf-target),1) -gconf-objs := gconf.o kconfig_load.o zconf.tab.o -endif - -clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \ - .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h -clean-files += config.pot linux.pot -clean-files += conf $(conf-objs) -clean-files += mconf $(mconf-objs) -clean-files += nconf $(nconf-objs) -clean-files += qconf qconf.o -clean-files += gconf gconf.o -clean-files += kconfig_load.o zconf.tab.o -clean-files += $(kxgettext-objs) - -# Check that we have the required ncurses stuff installed for lxdialog (menuconfig) -PHONY += $(obj)/dochecklxdialog -$(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog -$(obj)/dochecklxdialog: - $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf) - -always := dochecklxdialog - -# Add environment specific flags -HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS)) - -# generated files seem to need this to find local include files -HOSTCFLAGS_lex.zconf.o := -I$(src) -HOSTCFLAGS_zconf.tab.o := -I$(src) - -HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -ldl -HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK - -HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` -ldl -HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \ - -D LKC_DIRECT_LINK - -HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) - -HOSTLOADLIBES_nconf = -lmenu -lpanel -lncurses -$(obj)/qconf.o: $(obj)/.tmp_qtcheck - -ifeq ($(qconf-target),1) -$(obj)/.tmp_qtcheck: $(src)/Makefile --include $(obj)/.tmp_qtcheck - -# QT needs some extra effort... -$(obj)/.tmp_qtcheck: - @set -e; echo " CHECK qt"; dir=""; pkg=""; \ - if ! pkg-config --exists QtCore 2> /dev/null; then \ - echo "* Unable to find the QT4 tool qmake. Trying to use QT3"; \ - pkg-config --exists qt 2> /dev/null && pkg=qt; \ - pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \ - if [ -n "$$pkg" ]; then \ - cflags="\$$(shell pkg-config $$pkg --cflags)"; \ - libs="\$$(shell pkg-config $$pkg --libs)"; \ - moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \ - dir="$$(pkg-config $$pkg --variable=prefix)"; \ - else \ - for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \ - if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \ - done; \ - if [ -z "$$dir" ]; then \ - echo "*"; \ - echo "* Unable to find any QT installation. Please make sure that"; \ - echo "* the QT4 or QT3 development package is correctly installed and"; \ - echo "* either qmake can be found or install pkg-config or set"; \ - echo "* the QTDIR environment variable to the correct location."; \ - echo "*"; \ - false; \ - fi; \ - libpath=$$dir/lib; lib=qt; osdir=""; \ - $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \ - osdir=x$$($(HOSTCXX) -print-multi-os-directory); \ - test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \ - test -f $$libpath/libqt-mt.so && lib=qt-mt; \ - cflags="-I$$dir/include"; \ - libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \ - moc="$$dir/bin/moc"; \ - fi; \ - if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \ - echo "*"; \ - echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \ - echo "*"; \ - moc="/usr/bin/moc"; \ - fi; \ - else \ - cflags="\$$(shell pkg-config QtCore QtGui Qt3Support --cflags)"; \ - libs="\$$(shell pkg-config QtCore QtGui Qt3Support --libs)"; \ - binpath="\$$(shell pkg-config QtCore --variable=prefix)"; \ - moc="$$binpath/bin/moc"; \ - fi; \ - echo "KC_QT_CFLAGS=$$cflags" > $@; \ - echo "KC_QT_LIBS=$$libs" >> $@; \ - echo "KC_QT_MOC=$$moc" >> $@ -endif - -$(obj)/gconf.o: $(obj)/.tmp_gtkcheck - -ifeq ($(gconf-target),1) --include $(obj)/.tmp_gtkcheck - -# GTK needs some extra effort, too... -$(obj)/.tmp_gtkcheck: - @if `pkg-config --exists gtk+-2.0 gmodule-2.0 libglade-2.0`; then \ - if `pkg-config --atleast-version=2.0.0 gtk+-2.0`; then \ - touch $@; \ - else \ - echo "*"; \ - echo "* GTK+ is present but version >= 2.0.0 is required."; \ - echo "*"; \ - false; \ - fi \ - else \ - echo "*"; \ - echo "* Unable to find the GTK+ installation. Please make sure that"; \ - echo "* the GTK+ 2.0 development package is correctly installed..."; \ - echo "* You need gtk+-2.0, glib-2.0 and libglade-2.0."; \ - echo "*"; \ - false; \ - fi -endif - -$(obj)/zconf.tab.o: $(obj)/lex.zconf.c $(obj)/zconf.hash.c - -$(obj)/kconfig_load.o: $(obj)/lkc_defs.h - -$(obj)/qconf.o: $(obj)/qconf.moc $(obj)/lkc_defs.h - -$(obj)/gconf.o: $(obj)/lkc_defs.h - -$(obj)/%.moc: $(src)/%.h - $(KC_QT_MOC) -i $< -o $@ - -$(obj)/lkc_defs.h: $(src)/lkc_proto.h - sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' - -# Extract gconf menu items for I18N support -$(obj)/gconf.glade.h: $(obj)/gconf.glade - intltool-extract --type=gettext/glade $(obj)/gconf.glade - -### -# The following requires flex/bison/gperf -# By default we use the _shipped versions, uncomment the following line if -# you are modifying the flex/bison src. -# LKC_GENPARSER := 1 - -ifdef LKC_GENPARSER - -$(obj)/zconf.tab.c: $(src)/zconf.y -$(obj)/lex.zconf.c: $(src)/zconf.l -$(obj)/zconf.hash.c: $(src)/zconf.gperf - -%.tab.c: %.y - bison -l -b $* -p $(notdir $*) $< - cp $@ $@_shipped - -lex.%.c: %.l - flex -L -P$(notdir $*) -o$@ $< - cp $@ $@_shipped - -%.hash.c: %.gperf - gperf < $< > $@ - cp $@ $@_shipped - -endif diff --git a/package/config/Makefile.br b/package/config/Makefile.br deleted file mode 100644 index c24b6b5..0000000 --- a/package/config/Makefile.br +++ /dev/null @@ -1,53 +0,0 @@ -src := . -top_srcdir=../../ -top_builddir=../../ -srctree := . -obj ?= . - -include Makefile -#HOSTCFLAGS+=-Dinline="" -include foo.h --include $(obj)/.depend -$(obj)/.depend: $(wildcard *.h *.c) - $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) -MM *.c > $@ 2>/dev/null || : - -__hostprogs := $(sort $(hostprogs-y) $(hostprogs-m)) -host-csingle := $(foreach m,$(__hostprogs),$(if $($(m)-objs),,$(m))) -host-cmulti := $(foreach m,$(__hostprogs),\ - $(if $($(m)-cxxobjs),,$(if $($(m)-objs),$(m)))) -host-cxxmulti := $(foreach m,$(__hostprogs),\ - $(if $($(m)-cxxobjs),$(m),$(if $($(m)-objs),))) -host-cobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-objs)))) -host-cxxobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-cxxobjs)))) - -HOST_EXTRACFLAGS += -I$(obj) - -$(host-csingle): %: %.c - $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< $(HOST_LOADLIBES) -o $(obj)/$@ - -$(host-cmulti): %: $(host-cobjs) $(host-cshlib) - $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs)) $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@ - -$(host-cxxmulti): %: $(host-cxxobjs) $(host-cobjs) $(host-cshlib) - $(HOSTCXX) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs) $($(@F)-cxxobjs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@ - -$(obj)/%.o: %.c - $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) -c $< -o $@ - -$(obj)/%.o: $(obj)/%.c - $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) -c $< -o $@ - -$(obj)/%.o: %.cc - $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$(@F)) -c $< -o $@ - -$(obj)/%:: $(src)/%_shipped - $(Q)cat $< > $@ - -clean: - $(Q)rm -f $(addprefix $(obj)/,$(clean-files)) -distclean: clean - $(Q)rm -f $(addprefix $(obj)/,$(lxdialog) $(conf-objs) $(mconf-objs) $(kxgettext-objs) \ - $(hostprogs-y) $(qconf-cxxobjs) $(qconf-objs) $(gconf-objs) \ - mconf .depend) - -FORCE: -.PHONY: FORCE clean distclean diff --git a/package/config/POTFILES.in b/package/config/POTFILES.in deleted file mode 100644 index 9674573..0000000 --- a/package/config/POTFILES.in +++ /dev/null @@ -1,12 +0,0 @@ -scripts/kconfig/lxdialog/checklist.c -scripts/kconfig/lxdialog/inputbox.c -scripts/kconfig/lxdialog/menubox.c -scripts/kconfig/lxdialog/textbox.c -scripts/kconfig/lxdialog/util.c -scripts/kconfig/lxdialog/yesno.c -scripts/kconfig/mconf.c -scripts/kconfig/conf.c -scripts/kconfig/confdata.c -scripts/kconfig/gconf.c -scripts/kconfig/gconf.glade.h -scripts/kconfig/qconf.cc diff --git a/package/config/README.buildroot2 b/package/config/README.buildroot2 deleted file mode 100644 index 8ff0d09..0000000 --- a/package/config/README.buildroot2 +++ /dev/null @@ -1,20 +0,0 @@ -This is a copy of the kconfig code in the kernel (currently 2.6.36-rc1) tweaked -to suit Buildroot. - -To update: - cp -r /usr/src/linux/scripts/kconfig package/config.new - cd package/config.new - cp -a ../config/patches ../config/README.buildroot2 . - quilt push -a - # Fix any conflict - cd .. - rm -rf config - mv config.new config - -Then verify the toplevel targets work: - config - defconfig - menuconfig - xconfig - gconfig - oldconfig diff --git a/package/config/check.sh b/package/config/check.sh deleted file mode 100755 index fa59cbf..0000000 --- a/package/config/check.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# Needed for systems without gettext -$* -xc -o /dev/null - > /dev/null 2>&1 << EOF -#include -int main() -{ - gettext(""); - return 0; -} -EOF -if [ ! "$?" -eq "0" ]; then - echo -DKBUILD_NO_NLS; -fi - diff --git a/package/config/conf.c b/package/config/conf.c deleted file mode 100644 index 652e079..0000000 --- a/package/config/conf.c +++ /dev/null @@ -1,653 +0,0 @@ -/* - * Copyright (C) 2002 Roman Zippel - * Released under the terms of the GNU GPL v2.0. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define LKC_DIRECT_LINK -#include "lkc.h" - -static void conf(struct menu *menu); -static void check_conf(struct menu *menu); - -enum input_mode { - oldaskconfig, - silentoldconfig, - oldconfig, - allnoconfig, - allyesconfig, - allmodconfig, - alldefconfig, - randconfig, - defconfig, - savedefconfig, - listnewconfig, - oldnoconfig, -} input_mode = oldaskconfig; - -char *defconfig_file; - -static int indent = 1; -static int valid_stdin = 1; -static int sync_kconfig; -static int conf_cnt; -static char line[128]; -static struct menu *rootEntry; - -static void print_help(struct menu *menu) -{ - struct gstr help = str_new(); - - menu_get_ext_help(menu, &help); - - printf("\n%s\n", str_get(&help)); - str_free(&help); -} - -static void strip(char *str) -{ - char *p = str; - int l; - - while ((isspace(*p))) - p++; - l = strlen(p); - if (p != str) - memmove(str, p, l + 1); - if (!l) - return; - p = str + l - 1; - while ((isspace(*p))) - *p-- = 0; -} - -static void check_stdin(void) -{ - if (!valid_stdin) { - printf(_("aborted!\n\n")); - printf(_("Console input/output is redirected. ")); - printf(_("Run 'make oldconfig' to update configuration.\n\n")); - exit(1); - } -} - -static int conf_askvalue(struct symbol *sym, const char *def) -{ - enum symbol_type type = sym_get_type(sym); - - if (!sym_has_value(sym)) - printf(_("(NEW) ")); - - line[0] = '\n'; - line[1] = 0; - - if (!sym_is_changable(sym)) { - printf("%s\n", def); - line[0] = '\n'; - line[1] = 0; - return 0; - } - - switch (input_mode) { - case oldconfig: - case silentoldconfig: - if (sym_has_value(sym)) { - printf("%s\n", def); - return 0; - } - check_stdin(); - case oldaskconfig: - fflush(stdout); - xfgets(line, 128, stdin); - return 1; - default: - break; - } - - switch (type) { - case S_INT: - case S_HEX: - case S_STRING: - printf("%s\n", def); - return 1; - default: - ; - } - printf("%s", line); - return 1; -} - -static int conf_string(struct menu *menu) -{ - struct symbol *sym = menu->sym; - const char *def; - - while (1) { - printf("%*s%s ", indent - 1, "", _(menu->prompt->text)); - printf("(%s) ", sym->name); - def = sym_get_string_value(sym); - if (sym_get_string_value(sym)) - printf("[%s] ", def); - if (!conf_askvalue(sym, def)) - return 0; - switch (line[0]) { - case '\n': - break; - case '?': - /* print help */ - if (line[1] == '\n') { - print_help(menu); - def = NULL; - break; - } - default: - line[strlen(line)-1] = 0; - def = line; - } - if (def && sym_set_string_value(sym, def)) - return 0; - } -} - -static int conf_sym(struct menu *menu) -{ - struct symbol *sym = menu->sym; - tristate oldval, newval; - - while (1) { - printf("%*s%s ", indent - 1, "", _(menu->prompt->text)); - if (sym->name) - printf("(%s) ", sym->name); - putchar('['); - oldval = sym_get_tristate_value(sym); - switch (oldval) { - case no: - putchar('N'); - break; - case mod: - putchar('M'); - break; - case yes: - putchar('Y'); - break; - } - if (oldval != no && sym_tristate_within_range(sym, no)) - printf("/n"); - if (oldval != mod && sym_tristate_within_range(sym, mod)) - printf("/m"); - if (oldval != yes && sym_tristate_within_range(sym, yes)) - printf("/y"); - if (menu_has_help(menu)) - printf("/?"); - printf("] "); - if (!conf_askvalue(sym, sym_get_string_value(sym))) - return 0; - strip(line); - - switch (line[0]) { - case 'n': - case 'N': - newval = no; - if (!line[1] || !strcmp(&line[1], "o")) - break; - continue; - case 'm': - case 'M': - newval = mod; - if (!line[1]) - break; - continue; - case 'y': - case 'Y': - newval = yes; - if (!line[1] || !strcmp(&line[1], "es")) - break; - continue; - case 0: - newval = oldval; - break; - case '?': - goto help; - default: - continue; - } - if (sym_set_tristate_value(sym, newval)) - return 0; -help: - print_help(menu); - } -} - -static int conf_choice(struct menu *menu) -{ - struct symbol *sym, *def_sym; - struct menu *child; - bool is_new; - - sym = menu->sym; - is_new = !sym_has_value(sym); - if (sym_is_changable(sym)) { - conf_sym(menu); - sym_calc_value(sym); - switch (sym_get_tristate_value(sym)) { - case no: - return 1; - case mod: - return 0; - case yes: - break; - } - } else { - switch (sym_get_tristate_value(sym)) { - case no: - return 1; - case mod: - printf("%*s%s\n", indent - 1, "", _(menu_get_prompt(menu))); - return 0; - case yes: - break; - } - } - - while (1) { - int cnt, def; - - printf("%*s%s\n", indent - 1, "", _(menu_get_prompt(menu))); - def_sym = sym_get_choice_value(sym); - cnt = def = 0; - line[0] = 0; - for (child = menu->list; child; child = child->next) { - if (!menu_is_visible(child)) - continue; - if (!child->sym) { - printf("%*c %s\n", indent, '*', _(menu_get_prompt(child))); - continue; - } - cnt++; - if (child->sym == def_sym) { - def = cnt; - printf("%*c", indent, '>'); - } else - printf("%*c", indent, ' '); - printf(" %d. %s", cnt, _(menu_get_prompt(child))); - if (child->sym->name) - printf(" (%s)", child->sym->name); - if (!sym_has_value(child->sym)) - printf(_(" (NEW)")); - printf("\n"); - } - printf(_("%*schoice"), indent - 1, ""); - if (cnt == 1) { - printf("[1]: 1\n"); - goto conf_childs; - } - printf("[1-%d", cnt); - if (menu_has_help(menu)) - printf("?"); - printf("]: "); - switch (input_mode) { - case oldconfig: - case silentoldconfig: - if (!is_new) { - cnt = def; - printf("%d\n", cnt); - break; - } - check_stdin(); - case oldaskconfig: - fflush(stdout); - xfgets(line, 128, stdin); - strip(line); - if (line[0] == '?') { - print_help(menu); - continue; - } - if (!line[0]) - cnt = def; - else if (isdigit(line[0])) - cnt = atoi(line); - else - continue; - break; - default: - break; - } - - conf_childs: - for (child = menu->list; child; child = child->next) { - if (!child->sym || !menu_is_visible(child)) - continue; - if (!--cnt) - break; - } - if (!child) - continue; - if (line[strlen(line) - 1] == '?') { - print_help(child); - continue; - } - sym_set_choice_value(sym, child->sym); - for (child = child->list; child; child = child->next) { - indent += 2; - conf(child); - indent -= 2; - } - return 1; - } -} - -static void conf(struct menu *menu) -{ - struct symbol *sym; - struct property *prop; - struct menu *child; - - if (!menu_is_visible(menu)) - return; - - sym = menu->sym; - prop = menu->prompt; - if (prop) { - const char *prompt; - - switch (prop->type) { - case P_MENU: - if ((input_mode == silentoldconfig || - input_mode == listnewconfig || - input_mode == oldnoconfig) && - rootEntry != menu) { - check_conf(menu); - return; - } - case P_COMMENT: - prompt = menu_get_prompt(menu); - if (prompt) - printf("%*c\n%*c %s\n%*c\n", - indent, '*', - indent, '*', _(prompt), - indent, '*'); - default: - ; - } - } - - if (!sym) - goto conf_childs; - - if (sym_is_choice(sym)) { - conf_choice(menu); - if (sym->curr.tri != mod) - return; - goto conf_childs; - } - - switch (sym->type) { - case S_INT: - case S_HEX: - case S_STRING: - conf_string(menu); - break; - default: - conf_sym(menu); - break; - } - -conf_childs: - if (sym) - indent += 2; - for (child = menu->list; child; child = child->next) - conf(child); - if (sym) - indent -= 2; -} - -static void check_conf(struct menu *menu) -{ - struct symbol *sym; - struct menu *child; - - if (!menu_is_visible(menu)) - return; - - sym = menu->sym; - if (sym && !sym_has_value(sym)) { - if (sym_is_changable(sym) || - (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) { - if (input_mode == listnewconfig) { - if (sym->name && !sym_is_choice_value(sym)) { - printf("%s%s\n", CONFIG_, sym->name); - } - } else if (input_mode != oldnoconfig) { - if (!conf_cnt++) - printf(_("*\n* Restart config...\n*\n")); - rootEntry = menu_get_parent_menu(menu); - conf(rootEntry); - } - } - } - - for (child = menu->list; child; child = child->next) - check_conf(child); -} - -static struct option long_opts[] = { - {"oldaskconfig", no_argument, NULL, oldaskconfig}, - {"oldconfig", no_argument, NULL, oldconfig}, - {"silentoldconfig", no_argument, NULL, silentoldconfig}, - {"defconfig", optional_argument, NULL, defconfig}, - {"savedefconfig", required_argument, NULL, savedefconfig}, - {"allnoconfig", no_argument, NULL, allnoconfig}, - {"allyesconfig", no_argument, NULL, allyesconfig}, - {"allmodconfig", no_argument, NULL, allmodconfig}, - {"alldefconfig", no_argument, NULL, alldefconfig}, - {"randconfig", no_argument, NULL, randconfig}, - {"listnewconfig", no_argument, NULL, listnewconfig}, - {"oldnoconfig", no_argument, NULL, oldnoconfig}, - {NULL, 0, NULL, 0} -}; - -int main(int ac, char **av) -{ - int opt; - const char *name; - struct stat tmpstat; - - setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); - - while ((opt = getopt_long(ac, av, "", long_opts, NULL)) != -1) { - input_mode = (enum input_mode)opt; - switch (opt) { - case silentoldconfig: - sync_kconfig = 1; - break; - case defconfig: - case savedefconfig: - defconfig_file = optarg; - break; - case randconfig: - { - struct timeval now; - unsigned int seed; - - /* - * Use microseconds derived seed, - * compensate for systems where it may be zero - */ - gettimeofday(&now, NULL); - - seed = (unsigned int)((now.tv_sec + 1) * (now.tv_usec + 1)); - srand(seed); - break; - } - case '?': - fprintf(stderr, _("See README for usage info\n")); - exit(1); - break; - } - } - if (ac == optind) { - printf(_("%s: Kconfig file missing\n"), av[0]); - exit(1); - } - name = av[optind]; - conf_parse(name); - if (sync_kconfig) { - name = conf_get_configname(); - if (stat(name, &tmpstat)) { - fprintf(stderr, _("***\n" - "*** Configuration file \"%s\" not found!\n" - "***\n" - "*** Please run some configurator (e.g. \"make oldconfig\" or\n" - "*** \"make menuconfig\" or \"make xconfig\").\n" - "***\n"), name); - exit(1); - } - } - - switch (input_mode) { - case defconfig: - if (!defconfig_file) - defconfig_file = conf_get_default_confname(); - if (conf_read(defconfig_file)) { - printf(_("***\n" - "*** Can't find default configuration \"%s\"!\n" - "***\n"), defconfig_file); - exit(1); - } - break; - case savedefconfig: - case silentoldconfig: - case oldaskconfig: - case oldconfig: - case listnewconfig: - case oldnoconfig: - conf_read(NULL); - break; - case allnoconfig: - case allyesconfig: - case allmodconfig: - case alldefconfig: - case randconfig: - name = getenv("KCONFIG_ALLCONFIG"); - if (name && !stat(name, &tmpstat)) { - conf_read_simple(name, S_DEF_USER); - break; - } - switch (input_mode) { - case allnoconfig: name = "allno.config"; break; - case allyesconfig: name = "allyes.config"; break; - case allmodconfig: name = "allmod.config"; break; - case alldefconfig: name = "alldef.config"; break; - case randconfig: name = "allrandom.config"; break; - default: break; - } - if (!stat(name, &tmpstat)) - conf_read_simple(name, S_DEF_USER); - else if (!stat("all.config", &tmpstat)) - conf_read_simple("all.config", S_DEF_USER); - break; - default: - break; - } - - if (sync_kconfig) { - if (conf_get_changed()) { - name = getenv("KCONFIG_NOSILENTUPDATE"); - if (name && *name) { - fprintf(stderr, - _("\n*** The configuration requires explicit update.\n\n")); - return 1; - } - } - valid_stdin = isatty(0) && isatty(1) && isatty(2); - } - - switch (input_mode) { - case allnoconfig: - conf_set_all_new_symbols(def_no); - break; - case allyesconfig: - conf_set_all_new_symbols(def_yes); - break; - case allmodconfig: - conf_set_all_new_symbols(def_mod); - break; - case alldefconfig: - conf_set_all_new_symbols(def_default); - break; - case randconfig: - conf_set_all_new_symbols(def_random); - break; - case defconfig: - conf_set_all_new_symbols(def_default); - break; - case savedefconfig: - break; - case oldaskconfig: - rootEntry = &rootmenu; - conf(&rootmenu); - input_mode = silentoldconfig; - /* fall through */ - case oldconfig: - case listnewconfig: - case oldnoconfig: - case silentoldconfig: - /* Update until a loop caused no more changes */ - do { - conf_cnt = 0; - check_conf(&rootmenu); - } while (conf_cnt && - (input_mode != listnewconfig && - input_mode != oldnoconfig)); - break; - } - - if (sync_kconfig) { - /* silentoldconfig is used during the build so we shall update autoconf. - * All other commands are only used to generate a config. - */ - if (conf_get_changed() && conf_write(NULL)) { - fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n")); - exit(1); - } - if (conf_write_autoconf()) { - fprintf(stderr, _("\n*** Error during update of the configuration.\n\n")); - return 1; - } - } else if (input_mode == savedefconfig) { - if (conf_write_defconfig(defconfig_file)) { - fprintf(stderr, _("n*** Error while saving defconfig to: %s\n\n"), - defconfig_file); - return 1; - } - } else if (input_mode != listnewconfig) { - if (conf_write(NULL)) { - fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n")); - exit(1); - } - } - return 0; -} -/* - * Helper function to facilitate fgets() by Jean Sacren. - */ -void xfgets(str, size, in) - char *str; - int size; - FILE *in; -{ - if (fgets(str, size, in) == NULL) - fprintf(stderr, "\nError in reading or end of file.\n"); -} diff --git a/package/config/confdata.c b/package/config/confdata.c deleted file mode 100644 index c9f13ee..0000000 --- a/package/config/confdata.c +++ /dev/null @@ -1,1102 +0,0 @@ -/* - * Copyright (C) 2002 Roman Zippel - * Released under the terms of the GNU GPL v2.0. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define LKC_DIRECT_LINK -#include "lkc.h" - -static void conf_warning(const char *fmt, ...) - __attribute__ ((format (printf, 1, 2))); - -static void conf_message(const char *fmt, ...) - __attribute__ ((format (printf, 1, 2))); - -static const char *conf_filename; -static int conf_lineno, conf_warnings, conf_unsaved; - -const char conf_defname[] = ".defconfig"; - -static void conf_warning(const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - fprintf(stderr, "%s:%d:warning: ", conf_filename, conf_lineno); - vfprintf(stderr, fmt, ap); - fprintf(stderr, "\n"); - va_end(ap); - conf_warnings++; -} - -static void conf_default_message_callback(const char *fmt, va_list ap) -{ - printf("#\n# "); - vprintf(fmt, ap); - printf("\n#\n"); -} - -static void (*conf_message_callback) (const char *fmt, va_list ap) = - conf_default_message_callback; -void conf_set_message_callback(void (*fn) (const char *fmt, va_list ap)) -{ - conf_message_callback = fn; -} - -static void conf_message(const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - if (conf_message_callback) - conf_message_callback(fmt, ap); -} - -const char *conf_get_configname(void) -{ - char *name = getenv("BUILDROOT_CONFIG"); - - return name ? name : ".config"; -} - -const char *conf_get_autoconfig_name(void) -{ - return getenv("KCONFIG_AUTOCONFIG"); -} - -static char *conf_expand_value(const char *in) -{ - struct symbol *sym; - const char *src; - static char res_value[SYMBOL_MAXLENGTH]; - char *dst, name[SYMBOL_MAXLENGTH]; - - res_value[0] = 0; - dst = name; - while ((src = strchr(in, '$'))) { - strncat(res_value, in, src - in); - src++; - dst = name; - while (isalnum(*src) || *src == '_') - *dst++ = *src++; - *dst = 0; - sym = sym_lookup(name, 0); - sym_calc_value(sym); - strcat(res_value, sym_get_string_value(sym)); - in = src; - } - strcat(res_value, in); - - return res_value; -} - -char *conf_get_default_confname(void) -{ - struct stat buf; - static char fullname[PATH_MAX+1]; - char *env, *name; - - name = conf_expand_value(conf_defname); - env = getenv(SRCTREE); - if (env) { - sprintf(fullname, "%s/%s", env, name); - if (!stat(fullname, &buf)) - return fullname; - } - return name; -} - -static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) -{ - char *p2; - - switch (sym->type) { - case S_TRISTATE: - if (p[0] == 'm') { - sym->def[def].tri = mod; - sym->flags |= def_flags; - break; - } - case S_BOOLEAN: - if (p[0] == 'y') { - sym->def[def].tri = yes; - sym->flags |= def_flags; - break; - } - if (p[0] == 'n') { - sym->def[def].tri = no; - sym->flags |= def_flags; - break; - } - conf_warning("symbol value '%s' invalid for %s", p, sym->name); - break; - case S_OTHER: - if (*p != '"') { - for (p2 = p; *p2 && !isspace(*p2); p2++) - ; - sym->type = S_STRING; - goto done; - } - case S_STRING: - if (*p++ != '"') - break; - for (p2 = p; (p2 = strpbrk(p2, "\"\\")); p2++) { - if (*p2 == '"') { - *p2 = 0; - break; - } - memmove(p2, p2 + 1, strlen(p2)); - } - if (!p2) { - conf_warning("invalid string found"); - return 1; - } - case S_INT: - case S_HEX: - done: - if (sym_string_valid(sym, p)) { - sym->def[def].val = strdup(p); - sym->flags |= def_flags; - } else { - conf_warning("symbol value '%s' invalid for %s", p, sym->name); - return 1; - } - break; - default: - ; - } - return 0; -} - -int conf_read_simple(const char *name, int def) -{ - FILE *in = NULL; - char line[1024]; - char *p, *p2; - struct symbol *sym; - int i, def_flags; - - if (name) { - in = zconf_fopen(name); - } else { - struct property *prop; - - name = conf_get_configname(); - in = zconf_fopen(name); - if (in) - goto load; - sym_add_change_count(1); - if (!sym_defconfig_list) { - if (modules_sym) - sym_calc_value(modules_sym); - return 1; - } - - for_all_defaults(sym_defconfig_list, prop) { - if (expr_calc_value(prop->visible.expr) == no || - prop->expr->type != E_SYMBOL) - continue; - name = conf_expand_value(prop->expr->left.sym->name); - in = zconf_fopen(name); - if (in) { - conf_message(_("using defaults found in %s"), - name); - goto load; - } - } - } - if (!in) - return 1; - -load: - conf_filename = name; - conf_lineno = 0; - conf_warnings = 0; - conf_unsaved = 0; - - def_flags = SYMBOL_DEF << def; - for_all_symbols(i, sym) { - sym->flags |= SYMBOL_CHANGED; - sym->flags &= ~(def_flags|SYMBOL_VALID); - if (sym_is_choice(sym)) - sym->flags |= def_flags; - switch (sym->type) { - case S_INT: - case S_HEX: - case S_STRING: - if (sym->def[def].val) - free(sym->def[def].val); - default: - sym->def[def].val = NULL; - sym->def[def].tri = no; - } - } - - while (fgets(line, sizeof(line), in)) { - conf_lineno++; - sym = NULL; - if (line[0] == '#') { - if (memcmp(line + 2, CONFIG_, strlen(CONFIG_))) - continue; - p = strchr(line + 2, ' '); - if (!p) - continue; - *p++ = 0; - if (strncmp(p, "is not set", 10)) - continue; - if (def == S_DEF_USER) { - sym = sym_find(line + 2); - if (!sym) { - sym_add_change_count(1); - goto setsym; - } - } else { - sym = sym_lookup(line + 2, 0); - if (sym->type == S_UNKNOWN) - sym->type = S_BOOLEAN; - } - if (sym->flags & def_flags) { - conf_warning("override: reassigning to symbol %s", sym->name); - } - switch (sym->type) { - case S_BOOLEAN: - case S_TRISTATE: - sym->def[def].tri = no; - sym->flags |= def_flags; - break; - default: - ; - } - } else if (isupper(line[0])) { - p = strchr(line, '='); - if (!p) - continue; - *p++ = 0; - p2 = strchr(p, '\n'); - if (p2) { - *p2-- = 0; - if (*p2 == '\r') - *p2 = 0; - } - if (def == S_DEF_USER) { - sym = sym_find(line); - if (!sym) { - sym_add_change_count(1); - goto setsym; - } - } else { - sym = sym_lookup(line, 0); - if (sym->type == S_UNKNOWN) - sym->type = S_OTHER; - } - if (sym->flags & def_flags) { - conf_warning("override: reassigning to symbol %s", sym->name); - } - if (conf_set_sym_val(sym, def, def_flags, p)) - continue; - } else { - if (line[0] != '\r' && line[0] != '\n') - conf_warning("unexpected data"); - continue; - } -setsym: - if (sym && sym_is_choice_value(sym)) { - struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym)); - switch (sym->def[def].tri) { - case no: - break; - case mod: - if (cs->def[def].tri == yes) { - conf_warning("%s creates inconsistent choice state", sym->name); - cs->flags &= ~def_flags; - } - break; - case yes: - if (cs->def[def].tri != no) - conf_warning("override: %s changes choice state", sym->name); - cs->def[def].val = sym; - break; - } - cs->def[def].tri = EXPR_OR(cs->def[def].tri, sym->def[def].tri); - } - } - fclose(in); - - if (modules_sym) - sym_calc_value(modules_sym); - return 0; -} - -int conf_read(const char *name) -{ - struct symbol *sym, *choice_sym; - struct property *prop; - struct expr *e; - int i, flags; - - sym_set_change_count(0); - - if (conf_read_simple(name, S_DEF_USER)) - return 1; - - for_all_symbols(i, sym) { - sym_calc_value(sym); - if (sym_is_choice(sym) || (sym->flags & SYMBOL_AUTO)) - goto sym_ok; - if (sym_has_value(sym) && (sym->flags & SYMBOL_WRITE)) { - /* check that calculated value agrees with saved value */ - switch (sym->type) { - case S_BOOLEAN: - case S_TRISTATE: - if (sym->def[S_DEF_USER].tri != sym_get_tristate_value(sym)) - break; - if (!sym_is_choice(sym)) - goto sym_ok; - default: - if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val)) - goto sym_ok; - break; - } - } else if (!sym_has_value(sym) && !(sym->flags & SYMBOL_WRITE)) - /* no previous value and not saved */ - goto sym_ok; - conf_unsaved++; - /* maybe print value in verbose mode... */ - sym_ok: - if (!sym_is_choice(sym)) - continue; - /* The choice symbol only has a set value (and thus is not new) - * if all its visible childs have values. - */ - prop = sym_get_choice_prop(sym); - flags = sym->flags; - expr_list_for_each_sym(prop->expr, e, choice_sym) - if (choice_sym->visible != no) - flags &= choice_sym->flags; - sym->flags &= flags | ~SYMBOL_DEF_USER; - } - - for_all_symbols(i, sym) { - if (sym_has_value(sym) && !sym_is_choice_value(sym)) { - /* Reset values of generates values, so they'll appear - * as new, if they should become visible, but that - * doesn't quite work if the Kconfig and the saved - * configuration disagree. - */ - if (sym->visible == no && !conf_unsaved) - sym->flags &= ~SYMBOL_DEF_USER; - switch (sym->type) { - case S_STRING: - case S_INT: - case S_HEX: - /* Reset a string value if it's out of range */ - if (sym_string_within_range(sym, sym->def[S_DEF_USER].val)) - break; - sym->flags &= ~(SYMBOL_VALID|SYMBOL_DEF_USER); - conf_unsaved++; - break; - default: - break; - } - } - } - - sym_add_change_count(conf_warnings || conf_unsaved); - - return 0; -} - -/* Write a S_STRING */ -static void conf_write_string(bool headerfile, const char *name, - const char *str, FILE *out) -{ - int l; - if (headerfile) - fprintf(out, "#define %s \"", name); - else - fprintf(out, "%s=\"", name); - - while (1) { - l = strcspn(str, "\"\\"); - if (l) { - xfwrite(str, l, 1, out); - str += l; - } - if (!*str) - break; - fprintf(out, "\\%c", *str++); - } - fputs("\"\n", out); -} - -static void conf_write_symbol(struct symbol *sym, FILE *out, bool write_no) -{ - const char *str; - - switch (sym->type) { - case S_BOOLEAN: - case S_TRISTATE: - switch (sym_get_tristate_value(sym)) { - case no: - if (write_no) - fprintf(out, "# %s is not set\n", - sym->name); - break; - case mod: - fprintf(out, "%s=m\n", sym->name); - break; - case yes: - fprintf(out, "%s=y\n", sym->name); - break; - } - break; - case S_STRING: - conf_write_string(false, sym->name, sym_get_string_value(sym), out); - break; - case S_HEX: - case S_INT: - str = sym_get_string_value(sym); - fprintf(out, "%s=%s\n", sym->name, str); - break; - case S_OTHER: - case S_UNKNOWN: - break; - } -} - -/* - * Write out a minimal config. - * All values that has default values are skipped as this is redundant. - */ -int conf_write_defconfig(const char *filename) -{ - struct symbol *sym; - struct menu *menu; - FILE *out; - - out = fopen(filename, "w"); - if (!out) - return 1; - - sym_clear_all_valid(); - - /* Traverse all menus to find all relevant symbols */ - menu = rootmenu.list; - - while (menu != NULL) - { - sym = menu->sym; - if (sym == NULL) { - if (!menu_is_visible(menu)) - goto next_menu; - } else if (!sym_is_choice(sym)) { - sym_calc_value(sym); - if (!(sym->flags & SYMBOL_WRITE)) - goto next_menu; - sym->flags &= ~SYMBOL_WRITE; - /* If we cannot change the symbol - skip */ - if (!sym_is_changable(sym)) - goto next_menu; - /* If symbol equals to default value - skip */ - if (strcmp(sym_get_string_value(sym), sym_get_string_default(sym)) == 0) - goto next_menu; - - /* - * If symbol is a choice value and equals to the - * default for a choice - skip. - * But only if value is bool and equal to "y" and - * choice is not "optional". - * (If choice is "optional" then all values can be "n") - */ - if (sym_is_choice_value(sym)) { - struct symbol *cs; - struct symbol *ds; - - cs = prop_get_symbol(sym_get_choice_prop(sym)); - ds = sym_choice_default(cs); - if (!sym_is_optional(cs) && sym == ds) { - if ((sym->type == S_BOOLEAN) && - sym_get_tristate_value(sym) == yes) - goto next_menu; - } - } - conf_write_symbol(sym, out, true); - } -next_menu: - if (menu->list != NULL) { - menu = menu->list; - } - else if (menu->next != NULL) { - menu = menu->next; - } else { - while ((menu = menu->parent)) { - if (menu->next != NULL) { - menu = menu->next; - break; - } - } - } - } - fclose(out); - return 0; -} - -int conf_write(const char *name) -{ - FILE *out; - struct symbol *sym; - struct menu *menu; - const char *basename; - const char *str; - char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1]; - time_t now; - int use_timestamp = 1; - char *env; - - if (!name) - name = conf_get_configname(); - - dirname[0] = 0; - if (name && name[0]) { - struct stat st; - char *slash; - - if (!stat(name, &st) && S_ISDIR(st.st_mode)) { - strcpy(dirname, name); - strcat(dirname, "/"); - basename = conf_get_configname(); - } else if ((slash = strrchr(name, '/'))) { - int size = slash - name + 1; - memcpy(dirname, name, size); - dirname[size] = 0; - if (slash[1]) - basename = slash + 1; - else - basename = conf_get_configname(); - } else - basename = name; - } else - basename = conf_get_configname(); - - sprintf(newname, "%s%s", dirname, basename); - env = getenv("KCONFIG_OVERWRITECONFIG"); - if (!env || !*env) { - sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid()); - out = fopen(tmpname, "w"); - } else { - *tmpname = 0; - out = fopen(newname, "w"); - } - if (!out) - return 1; - - time(&now); - env = getenv("KCONFIG_NOTIMESTAMP"); - if (env && *env) - use_timestamp = 0; - - fprintf(out, _("#\n" - "# Automatically generated make config: don't edit\n" - "# %s\n" - "%s%s" - "#\n"), - rootmenu.prompt->text, - use_timestamp ? "# " : "", - use_timestamp ? ctime(&now) : ""); - - if (!conf_get_changed()) - sym_clear_all_valid(); - - menu = rootmenu.list; - while (menu) { - sym = menu->sym; - if (!sym) { - if (!menu_is_visible(menu)) - goto next; - str = menu_get_prompt(menu); - fprintf(out, "\n" - "#\n" - "# %s\n" - "#\n", str); - } else if (!(sym->flags & SYMBOL_CHOICE)) { - sym_calc_value(sym); - if (!(sym->flags & SYMBOL_WRITE)) - goto next; - sym->flags &= ~SYMBOL_WRITE; - /* Write config symbol to file */ - conf_write_symbol(sym, out, true); - } - -next: - if (menu->list) { - menu = menu->list; - continue; - } - if (menu->next) - menu = menu->next; - else while ((menu = menu->parent)) { - if (menu->next) { - menu = menu->next; - break; - } - } - } - fclose(out); - - if (*tmpname) { - strcat(dirname, basename); - strcat(dirname, ".old"); - rename(newname, dirname); - if (rename(tmpname, newname)) - return 1; - } - - conf_message(_("configuration written to %s"), newname); - - sym_set_change_count(0); - - return 0; -} - -static int conf_split_config(void) -{ - const char *name; - char path[PATH_MAX+1]; - char *opwd, *dir, *_name; - char *s, *d, c; - struct symbol *sym; - struct stat sb; - int res, i, fd; - - name = conf_get_autoconfig_name(); - conf_read_simple(name, S_DEF_AUTO); - - opwd = malloc(256); - _name = strdup(name); - if (opwd == NULL || _name == NULL) - return 1; - opwd = getcwd(opwd, 256); - dir = dirname(_name); - if (dir == NULL) { - res = 1; - goto err; - } - if (chdir(dir)) { - res = 1; - goto err; - } - - res = 0; - for_all_symbols(i, sym) { - sym_calc_value(sym); - if ((sym->flags & SYMBOL_AUTO) || !sym->name) - continue; - if (sym->flags & SYMBOL_WRITE) { - if (sym->flags & SYMBOL_DEF_AUTO) { - /* - * symbol has old and new value, - * so compare them... - */ - switch (sym->type) { - case S_BOOLEAN: - case S_TRISTATE: - if (sym_get_tristate_value(sym) == - sym->def[S_DEF_AUTO].tri) - continue; - break; - case S_STRING: - case S_HEX: - case S_INT: - if (!strcmp(sym_get_string_value(sym), - sym->def[S_DEF_AUTO].val)) - continue; - break; - default: - break; - } - } else { - /* - * If there is no old value, only 'no' (unset) - * is allowed as new value. - */ - switch (sym->type) { - case S_BOOLEAN: - case S_TRISTATE: - if (sym_get_tristate_value(sym) == no) - continue; - break; - default: - break; - } - } - } else if (!(sym->flags & SYMBOL_DEF_AUTO)) - /* There is neither an old nor a new value. */ - continue; - /* else - * There is an old value, but no new value ('no' (unset) - * isn't saved in auto.conf, so the old value is always - * different from 'no'). - */ - - /* Replace all '_' and append ".h" */ - s = sym->name; - d = path; - while ((c = *s++)) { - c = tolower(c); - *d++ = (c == '_') ? '/' : c; - } - strcpy(d, ".h"); - - /* Assume directory path already exists. */ - fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644); - if (fd == -1) { - if (errno != ENOENT) { - res = 1; - break; - } - /* - * Create directory components, - * unless they exist already. - */ - d = path; - while ((d = strchr(d, '/'))) { - *d = 0; - if (stat(path, &sb) && mkdir(path, 0755)) { - res = 1; - goto out; - } - *d++ = '/'; - } - /* Try it again. */ - fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644); - if (fd == -1) { - res = 1; - break; - } - } - close(fd); - } -out: - if (chdir(opwd)) - res = 1; -err: - free(opwd); - free(_name); - return res; -} - -int conf_write_autoconf(void) -{ - struct symbol *sym; - const char *str; - const char *name; - FILE *out, *tristate, *out_h; - time_t now; - int i; - char dir[PATH_MAX+1], buf[PATH_MAX+1]; - char *s; - - strcpy(dir, conf_get_configname()); - s = strrchr(dir, '/'); - if (s) - s[1] = 0; - else - dir[0] = 0; - - sym_clear_all_valid(); - - sprintf(buf, "%s.config.cmd", dir); - file_write_dep(buf); - - if (conf_split_config()) - return 1; - - sprintf(buf, "%s.tmpconfig", dir); - out = fopen(buf, "w"); - if (!out) - return 1; - - sprintf(buf, "%s.tmpconfig_tristate", dir); - tristate = fopen(buf, "w"); - if (!tristate) { - fclose(out); - return 1; - } - - sprintf(buf, "%s.tmpconfig.h", dir); - out_h = fopen(buf, "w"); - if (!out_h) { - fclose(out); - fclose(tristate); - return 1; - } - - time(&now); - fprintf(out, "#\n" - "# Automatically generated make config: don't edit\n" - "# %s\n" - "# %s" - "#\n", - rootmenu.prompt->text, ctime(&now)); - fprintf(tristate, "#\n" - "# Automatically generated - do not edit\n" - "\n"); - fprintf(out_h, "/*\n" - " * Automatically generated C config: don't edit\n" - " * %s\n" - " * %s" - " */\n", - rootmenu.prompt->text, ctime(&now)); - - for_all_symbols(i, sym) { - sym_calc_value(sym); - if (!(sym->flags & SYMBOL_WRITE) || !sym->name) - continue; - - /* write symbol to config file */ - conf_write_symbol(sym, out, false); - - /* update autoconf and tristate files */ - switch (sym->type) { - case S_BOOLEAN: - case S_TRISTATE: - switch (sym_get_tristate_value(sym)) { - case no: - break; - case mod: - fprintf(tristate, "%s=M\n", - sym->name); - fprintf(out_h, "#define %s_MODULE 1\n", - sym->name); - break; - case yes: - if (sym->type == S_TRISTATE) - fprintf(tristate,"%s=Y\n", - sym->name); - fprintf(out_h, "#define %s 1\n", - sym->name); - break; - } - break; - case S_STRING: - conf_write_string(true, sym->name, sym_get_string_value(sym), out_h); - break; - case S_HEX: - str = sym_get_string_value(sym); - if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) { - fprintf(out_h, "#define %s 0x%s\n", - sym->name, str); - break; - } - case S_INT: - str = sym_get_string_value(sym); - fprintf(out_h, "#define %s %s\n", - sym->name, str); - break; - default: - break; - } - } - fclose(out); - fclose(tristate); - fclose(out_h); - - name = getenv("KCONFIG_AUTOHEADER"); - if (!name) - name = "include/generated/autoconf.h"; - sprintf(buf, "%s.tmpconfig.h", dir); - if (rename(buf, name)) - return 1; - name = getenv("KCONFIG_TRISTATE"); - if (!name) - name = "include/config/tristate.conf"; - sprintf(buf, "%s.tmpconfig_tristate", dir); - if (rename(buf, name)) - return 1; - name = conf_get_autoconfig_name(); - /* - * This must be the last step, kbuild has a dependency on auto.conf - * and this marks the successful completion of the previous steps. - */ - sprintf(buf, "%s.tmpconfig", dir); - if (rename(buf, name)) - return 1; - - return 0; -} - -static int sym_change_count; -static void (*conf_changed_callback)(void); - -void sym_set_change_count(int count) -{ - int _sym_change_count = sym_change_count; - sym_change_count = count; - if (conf_changed_callback && - (bool)_sym_change_count != (bool)count) - conf_changed_callback(); -} - -void sym_add_change_count(int count) -{ - sym_set_change_count(count + sym_change_count); -} - -bool conf_get_changed(void) -{ - return sym_change_count; -} - -void conf_set_changed_callback(void (*fn)(void)) -{ - conf_changed_callback = fn; -} - -static void randomize_choice_values(struct symbol *csym) -{ - struct property *prop; - struct symbol *sym; - struct expr *e; - int cnt, def; - - /* - * If choice is mod then we may have more items selected - * and if no then no-one. - * In both cases stop. - */ - if (csym->curr.tri != yes) - return; - - prop = sym_get_choice_prop(csym); - - /* count entries in choice block */ - cnt = 0; - expr_list_for_each_sym(prop->expr, e, sym) - cnt++; - - /* - * find a random value and set it to yes, - * set the rest to no so we have only one set - */ - def = (rand() % cnt); - - cnt = 0; - expr_list_for_each_sym(prop->expr, e, sym) { - if (def == cnt++) { - sym->def[S_DEF_USER].tri = yes; - csym->def[S_DEF_USER].val = sym; - } - else { - sym->def[S_DEF_USER].tri = no; - } - } - csym->flags |= SYMBOL_DEF_USER; - /* clear VALID to get value calculated */ - csym->flags &= ~(SYMBOL_VALID); -} - -static void set_all_choice_values(struct symbol *csym) -{ - struct property *prop; - struct symbol *sym; - struct expr *e; - - prop = sym_get_choice_prop(csym); - - /* - * Set all non-assinged choice values to no - */ - expr_list_for_each_sym(prop->expr, e, sym) { - if (!sym_has_value(sym)) - sym->def[S_DEF_USER].tri = no; - } - csym->flags |= SYMBOL_DEF_USER; - /* clear VALID to get value calculated */ - csym->flags &= ~(SYMBOL_VALID); -} - -void conf_set_all_new_symbols(enum conf_def_mode mode) -{ - struct symbol *sym, *csym; - int i, cnt, prob = 50; - - if (mode == def_random) { - char *endp, *env = getenv("KCONFIG_PROBABILITY"); - if (env && *env) { - int tmp = (int)strtol(env, &endp, 10); - if (*endp == '\0' && tmp >= 0 && tmp <= 100) - prob = tmp; - } - } - - for_all_symbols(i, sym) { - if (sym_has_value(sym)) - continue; - switch (sym_get_type(sym)) { - case S_BOOLEAN: - case S_TRISTATE: - switch (mode) { - case def_yes: - sym->def[S_DEF_USER].tri = yes; - break; - case def_mod: - sym->def[S_DEF_USER].tri = mod; - break; - case def_no: - sym->def[S_DEF_USER].tri = no; - break; - case def_random: - cnt = (rand() % 100) - (100 - prob); - if (cnt < 0) - sym->def[S_DEF_USER].tri = no; - else - if ((sym_get_type(sym) == S_TRISTATE) - && (cnt > prob/2)) - sym->def[S_DEF_USER].tri = mod; - else - sym->def[S_DEF_USER].tri = yes; - break; - default: - continue; - } - if (!(sym_is_choice(sym) && mode == def_random)) - sym->flags |= SYMBOL_DEF_USER; - break; - default: - break; - } - - } - - sym_clear_all_valid(); - - /* - * We have different type of choice blocks. - * If curr.tri equals to mod then we can select several - * choice symbols in one block. - * In this case we do nothing. - * If curr.tri equals yes then only one symbol can be - * selected in a choice block and we set it to yes, - * and the rest to no. - */ - for_all_symbols(i, csym) { - if (sym_has_value(csym) || !sym_is_choice(csym)) - continue; - - sym_calc_value(csym); - if (mode == def_random) - randomize_choice_values(csym); - else - set_all_choice_values(csym); - } -} diff --git a/package/config/expr.c b/package/config/expr.c deleted file mode 100644 index c5182f4..0000000 --- a/package/config/expr.c +++ /dev/null @@ -1,1173 +0,0 @@ -/* - * Copyright (C) 2002 Roman Zippel - * Released under the terms of the GNU GPL v2.0. - */ - -#include -#include -#include - -#define LKC_DIRECT_LINK -#include "lkc.h" - -#define DEBUG_EXPR 0 - -struct expr *expr_alloc_symbol(struct symbol *sym) -{ - struct expr *e = malloc(sizeof(*e)); - memset(e, 0, sizeof(*e)); - e->type = E_SYMBOL; - e->left.sym = sym; - return e; -} - -struct expr *expr_alloc_one(enum expr_type type, struct expr *ce) -{ - struct expr *e = malloc(sizeof(*e)); - memset(e, 0, sizeof(*e)); - e->type = type; - e->left.expr = ce; - return e; -} - -struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2) -{ - struct expr *e = malloc(sizeof(*e)); - memset(e, 0, sizeof(*e)); - e->type = type; - e->left.expr = e1; - e->right.expr = e2; - return e; -} - -struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2) -{ - struct expr *e = malloc(sizeof(*e)); - memset(e, 0, sizeof(*e)); - e->type = type; - e->left.sym = s1; - e->right.sym = s2; - return e; -} - -struct expr *expr_alloc_and(struct expr *e1, struct expr *e2) -{ - if (!e1) - return e2; - return e2 ? expr_alloc_two(E_AND, e1, e2) : e1; -} - -struct expr *expr_alloc_or(struct expr *e1, struct expr *e2) -{ - if (!e1) - return e2; - return e2 ? expr_alloc_two(E_OR, e1, e2) : e1; -} - -struct expr *expr_copy(const struct expr *org) -{ - struct expr *e; - - if (!org) - return NULL; - - e = malloc(sizeof(*org)); - memcpy(e, org, sizeof(*org)); - switch (org->type) { - case E_SYMBOL: - e->left = org->left; - break; - case E_NOT: - e->left.expr = expr_copy(org->left.expr); - break; - case E_EQUAL: - case E_UNEQUAL: - e->left.sym = org->left.sym; - e->right.sym = org->right.sym; - break; - case E_AND: - case E_OR: - case E_LIST: - e->left.expr = expr_copy(org->left.expr); - e->right.expr = expr_copy(org->right.expr); - break; - default: - printf("can't copy type %d\n", e->type); - free(e); - e = NULL; - break; - } - - return e; -} - -void expr_free(struct expr *e) -{ - if (!e) - return; - - switch (e->type) { - case E_SYMBOL: - break; - case E_NOT: - expr_free(e->left.expr); - return; - case E_EQUAL: - case E_UNEQUAL: - break; - case E_OR: - case E_AND: - expr_free(e->left.expr); - expr_free(e->right.expr); - break; - default: - printf("how to free type %d?\n", e->type); - break; - } - free(e); -} - -static int trans_count; - -#define e1 (*ep1) -#define e2 (*ep2) - -static void __expr_eliminate_eq(enum expr_type type, struct expr **ep1, struct expr **ep2) -{ - if (e1->type == type) { - __expr_eliminate_eq(type, &e1->left.expr, &e2); - __expr_eliminate_eq(type, &e1->right.expr, &e2); - return; - } - if (e2->type == type) { - __expr_eliminate_eq(type, &e1, &e2->left.expr); - __expr_eliminate_eq(type, &e1, &e2->right.expr); - return; - } - if (e1->type == E_SYMBOL && e2->type == E_SYMBOL && - e1->left.sym == e2->left.sym && - (e1->left.sym == &symbol_yes || e1->left.sym == &symbol_no)) - return; - if (!expr_eq(e1, e2)) - return; - trans_count++; - expr_free(e1); expr_free(e2); - switch (type) { - case E_OR: - e1 = expr_alloc_symbol(&symbol_no); - e2 = expr_alloc_symbol(&symbol_no); - break; - case E_AND: - e1 = expr_alloc_symbol(&symbol_yes); - e2 = expr_alloc_symbol(&symbol_yes); - break; - default: - ; - } -} - -void expr_eliminate_eq(struct expr **ep1, struct expr **ep2) -{ - if (!e1 || !e2) - return; - switch (e1->type) { - case E_OR: - case E_AND: - __expr_eliminate_eq(e1->type, ep1, ep2); - default: - ; - } - if (e1->type != e2->type) switch (e2->type) { - case E_OR: - case E_AND: - __expr_eliminate_eq(e2->type, ep1, ep2); - default: - ; - } - e1 = expr_eliminate_yn(e1); - e2 = expr_eliminate_yn(e2); -} - -#undef e1 -#undef e2 - -int expr_eq(struct expr *e1, struct expr *e2) -{ - int res, old_count; - - if (e1->type != e2->type) - return 0; - switch (e1->type) { - case E_EQUAL: - case E_UNEQUAL: - return e1->left.sym == e2->left.sym && e1->right.sym == e2->right.sym; - case E_SYMBOL: - return e1->left.sym == e2->left.sym; - case E_NOT: - return expr_eq(e1->left.expr, e2->left.expr); - case E_AND: - case E_OR: - e1 = expr_copy(e1); - e2 = expr_copy(e2); - old_count = trans_count; - expr_eliminate_eq(&e1, &e2); - res = (e1->type == E_SYMBOL && e2->type == E_SYMBOL && - e1->left.sym == e2->left.sym); - expr_free(e1); - expr_free(e2); - trans_count = old_count; - return res; - case E_LIST: - case E_RANGE: - case E_NONE: - /* panic */; - } - - if (DEBUG_EXPR) { - expr_fprint(e1, stdout); - printf(" = "); - expr_fprint(e2, stdout); - printf(" ?\n"); - } - - return 0; -} - -struct expr *expr_eliminate_yn(struct expr *e) -{ - struct expr *tmp; - - if (e) switch (e->type) { - case E_AND: - e->left.expr = expr_eliminate_yn(e->left.expr); - e->right.expr = expr_eliminate_yn(e->right.expr); - if (e->left.expr->type == E_SYMBOL) { - if (e->left.expr->left.sym == &symbol_no) { - expr_free(e->left.expr); - expr_free(e->right.expr); - e->type = E_SYMBOL; - e->left.sym = &symbol_no; - e->right.expr = NULL; - return e; - } else if (e->left.expr->left.sym == &symbol_yes) { - free(e->left.expr); - tmp = e->right.expr; - *e = *(e->right.expr); - free(tmp); - return e; - } - } - if (e->right.expr->type == E_SYMBOL) { - if (e->right.expr->left.sym == &symbol_no) { - expr_free(e->left.expr); - expr_free(e->right.expr); - e->type = E_SYMBOL; - e->left.sym = &symbol_no; - e->right.expr = NULL; - return e; - } else if (e->right.expr->left.sym == &symbol_yes) { - free(e->right.expr); - tmp = e->left.expr; - *e = *(e->left.expr); - free(tmp); - return e; - } - } - break; - case E_OR: - e->left.expr = expr_eliminate_yn(e->left.expr); - e->right.expr = expr_eliminate_yn(e->right.expr); - if (e->left.expr->type == E_SYMBOL) { - if (e->left.expr->left.sym == &symbol_no) { - free(e->left.expr); - tmp = e->right.expr; - *e = *(e->right.expr); - free(tmp); - return e; - } else if (e->left.expr->left.sym == &symbol_yes) { - expr_free(e->left.expr); - expr_free(e->right.expr); - e->type = E_SYMBOL; - e->left.sym = &symbol_yes; - e->right.expr = NULL; - return e; - } - } - if (e->right.expr->type == E_SYMBOL) { - if (e->right.expr->left.sym == &symbol_no) { - free(e->right.expr); - tmp = e->left.expr; - *e = *(e->left.expr); - free(tmp); - return e; - } else if (e->right.expr->left.sym == &symbol_yes) { - expr_free(e->left.expr); - expr_free(e->right.expr); - e->type = E_SYMBOL; - e->left.sym = &symbol_yes; - e->right.expr = NULL; - return e; - } - } - break; - default: - ; - } - return e; -} - -/* - * bool FOO!=n => FOO - */ -struct expr *expr_trans_bool(struct expr *e) -{ - if (!e) - return NULL; - switch (e->type) { - case E_AND: - case E_OR: - case E_NOT: - e->left.expr = expr_trans_bool(e->left.expr); - e->right.expr = expr_trans_bool(e->right.expr); - break; - case E_UNEQUAL: - /* FOO!=n -> FOO */ - if (e->left.sym->type == S_TRISTATE) { - if (e->right.sym == &symbol_no) { - e->type = E_SYMBOL; - e->right.sym = NULL; - } - } - break; - default: - ; - } - return e; -} - -/* - * e1 || e2 -> ? - */ -static struct expr *expr_join_or(struct expr *e1, struct expr *e2) -{ - struct expr *tmp; - struct symbol *sym1, *sym2; - - if (expr_eq(e1, e2)) - return expr_copy(e1); - if (e1->type != E_EQUAL && e1->type != E_UNEQUAL && e1->type != E_SYMBOL && e1->type != E_NOT) - return NULL; - if (e2->type != E_EQUAL && e2->type != E_UNEQUAL && e2->type != E_SYMBOL && e2->type != E_NOT) - return NULL; - if (e1->type == E_NOT) { - tmp = e1->left.expr; - if (tmp->type != E_EQUAL && tmp->type != E_UNEQUAL && tmp->type != E_SYMBOL) - return NULL; - sym1 = tmp->left.sym; - } else - sym1 = e1->left.sym; - if (e2->type == E_NOT) { - if (e2->left.expr->type != E_SYMBOL) - return NULL; - sym2 = e2->left.expr->left.sym; - } else - sym2 = e2->left.sym; - if (sym1 != sym2) - return NULL; - if (sym1->type != S_BOOLEAN && sym1->type != S_TRISTATE) - return NULL; - if (sym1->type == S_TRISTATE) { - if (e1->type == E_EQUAL && e2->type == E_EQUAL && - ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) || - (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes))) { - /* (a='y') || (a='m') -> (a!='n') */ - return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_no); - } - if (e1->type == E_EQUAL && e2->type == E_EQUAL && - ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) || - (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes))) { - /* (a='y') || (a='n') -> (a!='m') */ - return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_mod); - } - if (e1->type == E_EQUAL && e2->type == E_EQUAL && - ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) || - (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod))) { - /* (a='m') || (a='n') -> (a!='y') */ - return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_yes); - } - } - if (sym1->type == S_BOOLEAN && sym1 == sym2) { - if ((e1->type == E_NOT && e1->left.expr->type == E_SYMBOL && e2->type == E_SYMBOL) || - (e2->type == E_NOT && e2->left.expr->type == E_SYMBOL && e1->type == E_SYMBOL)) - return expr_alloc_symbol(&symbol_yes); - } - - if (DEBUG_EXPR) { - printf("optimize ("); - expr_fprint(e1, stdout); - printf(") || ("); - expr_fprint(e2, stdout); - printf(")?\n"); - } - return NULL; -} - -static struct expr *expr_join_and(struct expr *e1, struct expr *e2) -{ - struct expr *tmp; - struct symbol *sym1, *sym2; - - if (expr_eq(e1, e2)) - return expr_copy(e1); - if (e1->type != E_EQUAL && e1->type != E_UNEQUAL && e1->type != E_SYMBOL && e1->type != E_NOT) - return NULL; - if (e2->type != E_EQUAL && e2->type != E_UNEQUAL && e2->type != E_SYMBOL && e2->type != E_NOT) - return NULL; - if (e1->type == E_NOT) { - tmp = e1->left.expr; - if (tmp->type != E_EQUAL && tmp->type != E_UNEQUAL && tmp->type != E_SYMBOL) - return NULL; - sym1 = tmp->left.sym; - } else - sym1 = e1->left.sym; - if (e2->type == E_NOT) { - if (e2->left.expr->type != E_SYMBOL) - return NULL; - sym2 = e2->left.expr->left.sym; - } else - sym2 = e2->left.sym; - if (sym1 != sym2) - return NULL; - if (sym1->type != S_BOOLEAN && sym1->type != S_TRISTATE) - return NULL; - - if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_yes) || - (e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_yes)) - /* (a) && (a='y') -> (a='y') */ - return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes); - - if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_no) || - (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_no)) - /* (a) && (a!='n') -> (a) */ - return expr_alloc_symbol(sym1); - - if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_mod) || - (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_mod)) - /* (a) && (a!='m') -> (a='y') */ - return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes); - - if (sym1->type == S_TRISTATE) { - if (e1->type == E_EQUAL && e2->type == E_UNEQUAL) { - /* (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b' */ - sym2 = e1->right.sym; - if ((e2->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST)) - return sym2 != e2->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2) - : expr_alloc_symbol(&symbol_no); - } - if (e1->type == E_UNEQUAL && e2->type == E_EQUAL) { - /* (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b' */ - sym2 = e2->right.sym; - if ((e1->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST)) - return sym2 != e1->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2) - : expr_alloc_symbol(&symbol_no); - } - if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && - ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) || - (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes))) - /* (a!='y') && (a!='n') -> (a='m') */ - return expr_alloc_comp(E_EQUAL, sym1, &symbol_mod); - - if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && - ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) || - (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes))) - /* (a!='y') && (a!='m') -> (a='n') */ - return expr_alloc_comp(E_EQUAL, sym1, &symbol_no); - - if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && - ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) || - (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod))) - /* (a!='m') && (a!='n') -> (a='m') */ - return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes); - - if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_mod) || - (e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_mod) || - (e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_yes) || - (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_yes)) - return NULL; - } - - if (DEBUG_EXPR) { - printf("optimize ("); - expr_fprint(e1, stdout); - printf(") && ("); - expr_fprint(e2, stdout); - printf(")?\n"); - } - return NULL; -} - -static void expr_eliminate_dups1(enum expr_type type, struct expr **ep1, struct expr **ep2) -{ -#define e1 (*ep1) -#define e2 (*ep2) - struct expr *tmp; - - if (e1->type == type) { - expr_eliminate_dups1(type, &e1->left.expr, &e2); - expr_eliminate_dups1(type, &e1->right.expr, &e2); - return; - } - if (e2->type == type) { - expr_eliminate_dups1(type, &e1, &e2->left.expr); - expr_eliminate_dups1(type, &e1, &e2->right.expr); - return; - } - if (e1 == e2) - return; - - switch (e1->type) { - case E_OR: case E_AND: - expr_eliminate_dups1(e1->type, &e1, &e1); - default: - ; - } - - switch (type) { - case E_OR: - tmp = expr_join_or(e1, e2); - if (tmp) { - expr_free(e1); expr_free(e2); - e1 = expr_alloc_symbol(&symbol_no); - e2 = tmp; - trans_count++; - } - break; - case E_AND: - tmp = expr_join_and(e1, e2); - if (tmp) { - expr_free(e1); expr_free(e2); - e1 = expr_alloc_symbol(&symbol_yes); - e2 = tmp; - trans_count++; - } - break; - default: - ; - } -#undef e1 -#undef e2 -} - -static void expr_eliminate_dups2(enum expr_type type, struct expr **ep1, struct expr **ep2) -{ -#define e1 (*ep1) -#define e2 (*ep2) - struct expr *tmp, *tmp1, *tmp2; - - if (e1->type == type) { - expr_eliminate_dups2(type, &e1->left.expr, &e2); - expr_eliminate_dups2(type, &e1->right.expr, &e2); - return; - } - if (e2->type == type) { - expr_eliminate_dups2(type, &e1, &e2->left.expr); - expr_eliminate_dups2(type, &e1, &e2->right.expr); - } - if (e1 == e2) - return; - - switch (e1->type) { - case E_OR: - expr_eliminate_dups2(e1->type, &e1, &e1); - /* (FOO || BAR) && (!FOO && !BAR) -> n */ - tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1))); - tmp2 = expr_copy(e2); - tmp = expr_extract_eq_and(&tmp1, &tmp2); - if (expr_is_yes(tmp1)) { - expr_free(e1); - e1 = expr_alloc_symbol(&symbol_no); - trans_count++; - } - expr_free(tmp2); - expr_free(tmp1); - expr_free(tmp); - break; - case E_AND: - expr_eliminate_dups2(e1->type, &e1, &e1); - /* (FOO && BAR) || (!FOO || !BAR) -> y */ - tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1))); - tmp2 = expr_copy(e2); - tmp = expr_extract_eq_or(&tmp1, &tmp2); - if (expr_is_no(tmp1)) { - expr_free(e1); - e1 = expr_alloc_symbol(&symbol_yes); - trans_count++; - } - expr_free(tmp2); - expr_free(tmp1); - expr_free(tmp); - break; - default: - ; - } -#undef e1 -#undef e2 -} - -struct expr *expr_eliminate_dups(struct expr *e) -{ - int oldcount; - if (!e) - return e; - - oldcount = trans_count; - while (1) { - trans_count = 0; - switch (e->type) { - case E_OR: case E_AND: - expr_eliminate_dups1(e->type, &e, &e); - expr_eliminate_dups2(e->type, &e, &e); - default: - ; - } - if (!trans_count) - break; - e = expr_eliminate_yn(e); - } - trans_count = oldcount; - return e; -} - -struct expr *expr_transform(struct expr *e) -{ - struct expr *tmp; - - if (!e) - return NULL; - switch (e->type) { - case E_EQUAL: - case E_UNEQUAL: - case E_SYMBOL: - case E_LIST: - break; - default: - e->left.expr = expr_transform(e->left.expr); - e->right.expr = expr_transform(e->right.expr); - } - - switch (e->type) { - case E_EQUAL: - if (e->left.sym->type != S_BOOLEAN) - break; - if (e->right.sym == &symbol_no) { - e->type = E_NOT; - e->left.expr = expr_alloc_symbol(e->left.sym); - e->right.sym = NULL; - break; - } - if (e->right.sym == &symbol_mod) { - printf("boolean symbol %s tested for 'm'? test forced to 'n'\n", e->left.sym->name); - e->type = E_SYMBOL; - e->left.sym = &symbol_no; - e->right.sym = NULL; - break; - } - if (e->right.sym == &symbol_yes) { - e->type = E_SYMBOL; - e->right.sym = NULL; - break; - } - break; - case E_UNEQUAL: - if (e->left.sym->type != S_BOOLEAN) - break; - if (e->right.sym == &symbol_no) { - e->type = E_SYMBOL; - e->right.sym = NULL; - break; - } - if (e->right.sym == &symbol_mod) { - printf("boolean symbol %s tested for 'm'? test forced to 'y'\n", e->left.sym->name); - e->type = E_SYMBOL; - e->left.sym = &symbol_yes; - e->right.sym = NULL; - break; - } - if (e->right.sym == &symbol_yes) { - e->type = E_NOT; - e->left.expr = expr_alloc_symbol(e->left.sym); - e->right.sym = NULL; - break; - } - break; - case E_NOT: - switch (e->left.expr->type) { - case E_NOT: - /* !!a -> a */ - tmp = e->left.expr->left.expr; - free(e->left.expr); - free(e); - e = tmp; - e = expr_transform(e); - break; - case E_EQUAL: - case E_UNEQUAL: - /* !a='x' -> a!='x' */ - tmp = e->left.expr; - free(e); - e = tmp; - e->type = e->type == E_EQUAL ? E_UNEQUAL : E_EQUAL; - break; - case E_OR: - /* !(a || b) -> !a && !b */ - tmp = e->left.expr; - e->type = E_AND; - e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr); - tmp->type = E_NOT; - tmp->right.expr = NULL; - e = expr_transform(e); - break; - case E_AND: - /* !(a && b) -> !a || !b */ - tmp = e->left.expr; - e->type = E_OR; - e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr); - tmp->type = E_NOT; - tmp->right.expr = NULL; - e = expr_transform(e); - break; - case E_SYMBOL: - if (e->left.expr->left.sym == &symbol_yes) { - /* !'y' -> 'n' */ - tmp = e->left.expr; - free(e); - e = tmp; - e->type = E_SYMBOL; - e->left.sym = &symbol_no; - break; - } - if (e->left.expr->left.sym == &symbol_mod) { - /* !'m' -> 'm' */ - tmp = e->left.expr; - free(e); - e = tmp; - e->type = E_SYMBOL; - e->left.sym = &symbol_mod; - break; - } - if (e->left.expr->left.sym == &symbol_no) { - /* !'n' -> 'y' */ - tmp = e->left.expr; - free(e); - e = tmp; - e->type = E_SYMBOL; - e->left.sym = &symbol_yes; - break; - } - break; - default: - ; - } - break; - default: - ; - } - return e; -} - -int expr_contains_symbol(struct expr *dep, struct symbol *sym) -{ - if (!dep) - return 0; - - switch (dep->type) { - case E_AND: - case E_OR: - return expr_contains_symbol(dep->left.expr, sym) || - expr_contains_symbol(dep->right.expr, sym); - case E_SYMBOL: - return dep->left.sym == sym; - case E_EQUAL: - case E_UNEQUAL: - return dep->left.sym == sym || - dep->right.sym == sym; - case E_NOT: - return expr_contains_symbol(dep->left.expr, sym); - default: - ; - } - return 0; -} - -bool expr_depends_symbol(struct expr *dep, struct symbol *sym) -{ - if (!dep) - return false; - - switch (dep->type) { - case E_AND: - return expr_depends_symbol(dep->left.expr, sym) || - expr_depends_symbol(dep->right.expr, sym); - case E_SYMBOL: - return dep->left.sym == sym; - case E_EQUAL: - if (dep->left.sym == sym) { - if (dep->right.sym == &symbol_yes || dep->right.sym == &symbol_mod) - return true; - } - break; - case E_UNEQUAL: - if (dep->left.sym == sym) { - if (dep->right.sym == &symbol_no) - return true; - } - break; - default: - ; - } - return false; -} - -struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2) -{ - struct expr *tmp = NULL; - expr_extract_eq(E_AND, &tmp, ep1, ep2); - if (tmp) { - *ep1 = expr_eliminate_yn(*ep1); - *ep2 = expr_eliminate_yn(*ep2); - } - return tmp; -} - -struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2) -{ - struct expr *tmp = NULL; - expr_extract_eq(E_OR, &tmp, ep1, ep2); - if (tmp) { - *ep1 = expr_eliminate_yn(*ep1); - *ep2 = expr_eliminate_yn(*ep2); - } - return tmp; -} - -void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2) -{ -#define e1 (*ep1) -#define e2 (*ep2) - if (e1->type == type) { - expr_extract_eq(type, ep, &e1->left.expr, &e2); - expr_extract_eq(type, ep, &e1->right.expr, &e2); - return; - } - if (e2->type == type) { - expr_extract_eq(type, ep, ep1, &e2->left.expr); - expr_extract_eq(type, ep, ep1, &e2->right.expr); - return; - } - if (expr_eq(e1, e2)) { - *ep = *ep ? expr_alloc_two(type, *ep, e1) : e1; - expr_free(e2); - if (type == E_AND) { - e1 = expr_alloc_symbol(&symbol_yes); - e2 = expr_alloc_symbol(&symbol_yes); - } else if (type == E_OR) { - e1 = expr_alloc_symbol(&symbol_no); - e2 = expr_alloc_symbol(&symbol_no); - } - } -#undef e1 -#undef e2 -} - -struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym) -{ - struct expr *e1, *e2; - - if (!e) { - e = expr_alloc_symbol(sym); - if (type == E_UNEQUAL) - e = expr_alloc_one(E_NOT, e); - return e; - } - switch (e->type) { - case E_AND: - e1 = expr_trans_compare(e->left.expr, E_EQUAL, sym); - e2 = expr_trans_compare(e->right.expr, E_EQUAL, sym); - if (sym == &symbol_yes) - e = expr_alloc_two(E_AND, e1, e2); - if (sym == &symbol_no) - e = expr_alloc_two(E_OR, e1, e2); - if (type == E_UNEQUAL) - e = expr_alloc_one(E_NOT, e); - return e; - case E_OR: - e1 = expr_trans_compare(e->left.expr, E_EQUAL, sym); - e2 = expr_trans_compare(e->right.expr, E_EQUAL, sym); - if (sym == &symbol_yes) - e = expr_alloc_two(E_OR, e1, e2); - if (sym == &symbol_no) - e = expr_alloc_two(E_AND, e1, e2); - if (type == E_UNEQUAL) - e = expr_alloc_one(E_NOT, e); - return e; - case E_NOT: - return expr_trans_compare(e->left.expr, type == E_EQUAL ? E_UNEQUAL : E_EQUAL, sym); - case E_UNEQUAL: - case E_EQUAL: - if (type == E_EQUAL) { - if (sym == &symbol_yes) - return expr_copy(e); - if (sym == &symbol_mod) - return expr_alloc_symbol(&symbol_no); - if (sym == &symbol_no) - return expr_alloc_one(E_NOT, expr_copy(e)); - } else { - if (sym == &symbol_yes) - return expr_alloc_one(E_NOT, expr_copy(e)); - if (sym == &symbol_mod) - return expr_alloc_symbol(&symbol_yes); - if (sym == &symbol_no) - return expr_copy(e); - } - break; - case E_SYMBOL: - return expr_alloc_comp(type, e->left.sym, sym); - case E_LIST: - case E_RANGE: - case E_NONE: - /* panic */; - } - return NULL; -} - -tristate expr_calc_value(struct expr *e) -{ - tristate val1, val2; - const char *str1, *str2; - - if (!e) - return yes; - - switch (e->type) { - case E_SYMBOL: - sym_calc_value(e->left.sym); - return e->left.sym->curr.tri; - case E_AND: - val1 = expr_calc_value(e->left.expr); - val2 = expr_calc_value(e->right.expr); - return EXPR_AND(val1, val2); - case E_OR: - val1 = expr_calc_value(e->left.expr); - val2 = expr_calc_value(e->right.expr); - return EXPR_OR(val1, val2); - case E_NOT: - val1 = expr_calc_value(e->left.expr); - return EXPR_NOT(val1); - case E_EQUAL: - sym_calc_value(e->left.sym); - sym_calc_value(e->right.sym); - str1 = sym_get_string_value(e->left.sym); - str2 = sym_get_string_value(e->right.sym); - return !strcmp(str1, str2) ? yes : no; - case E_UNEQUAL: - sym_calc_value(e->left.sym); - sym_calc_value(e->right.sym); - str1 = sym_get_string_value(e->left.sym); - str2 = sym_get_string_value(e->right.sym); - return !strcmp(str1, str2) ? no : yes; - default: - printf("expr_calc_value: %d?\n", e->type); - return no; - } -} - -int expr_compare_type(enum expr_type t1, enum expr_type t2) -{ -#if 0 - return 1; -#else - if (t1 == t2) - return 0; - switch (t1) { - case E_EQUAL: - case E_UNEQUAL: - if (t2 == E_NOT) - return 1; - case E_NOT: - if (t2 == E_AND) - return 1; - case E_AND: - if (t2 == E_OR) - return 1; - case E_OR: - if (t2 == E_LIST) - return 1; - case E_LIST: - if (t2 == 0) - return 1; - default: - return -1; - } - printf("[%dgt%d?]", t1, t2); - return 0; -#endif -} - -static inline struct expr * -expr_get_leftmost_symbol(const struct expr *e) -{ - - if (e == NULL) - return NULL; - - while (e->type != E_SYMBOL) - e = e->left.expr; - - return expr_copy(e); -} - -/* - * Given expression `e1' and `e2', returns the leaf of the longest - * sub-expression of `e1' not containing 'e2. - */ -struct expr *expr_simplify_unmet_dep(struct expr *e1, struct expr *e2) -{ - struct expr *ret; - - switch (e1->type) { - case E_OR: - return expr_alloc_and( - expr_simplify_unmet_dep(e1->left.expr, e2), - expr_simplify_unmet_dep(e1->right.expr, e2)); - case E_AND: { - struct expr *e; - e = expr_alloc_and(expr_copy(e1), expr_copy(e2)); - e = expr_eliminate_dups(e); - ret = (!expr_eq(e, e1)) ? e1 : NULL; - expr_free(e); - break; - } - default: - ret = e1; - break; - } - - return expr_get_leftmost_symbol(ret); -} - -void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken) -{ - if (!e) { - fn(data, NULL, "y"); - return; - } - - if (expr_compare_type(prevtoken, e->type) > 0) - fn(data, NULL, "("); - switch (e->type) { - case E_SYMBOL: - if (e->left.sym->name) - fn(data, e->left.sym, e->left.sym->name); - else - fn(data, NULL, ""); - break; - case E_NOT: - fn(data, NULL, "!"); - expr_print(e->left.expr, fn, data, E_NOT); - break; - case E_EQUAL: - if (e->left.sym->name) - fn(data, e->left.sym, e->left.sym->name); - else - fn(data, NULL, ""); - fn(data, NULL, "="); - fn(data, e->right.sym, e->right.sym->name); - break; - case E_UNEQUAL: - if (e->left.sym->name) - fn(data, e->left.sym, e->left.sym->name); - else - fn(data, NULL, ""); - fn(data, NULL, "!="); - fn(data, e->right.sym, e->right.sym->name); - break; - case E_OR: - expr_print(e->left.expr, fn, data, E_OR); - fn(data, NULL, " || "); - expr_print(e->right.expr, fn, data, E_OR); - break; - case E_AND: - expr_print(e->left.expr, fn, data, E_AND); - fn(data, NULL, " && "); - expr_print(e->right.expr, fn, data, E_AND); - break; - case E_LIST: - fn(data, e->right.sym, e->right.sym->name); - if (e->left.expr) { - fn(data, NULL, " ^ "); - expr_print(e->left.expr, fn, data, E_LIST); - } - break; - case E_RANGE: - fn(data, NULL, "["); - fn(data, e->left.sym, e->left.sym->name); - fn(data, NULL, " "); - fn(data, e->right.sym, e->right.sym->name); - fn(data, NULL, "]"); - break; - default: - { - char buf[32]; - sprintf(buf, "", e->type); - fn(data, NULL, buf); - break; - } - } - if (expr_compare_type(prevtoken, e->type) > 0) - fn(data, NULL, ")"); -} - -static void expr_print_file_helper(void *data, struct symbol *sym, const char *str) -{ - xfwrite(str, strlen(str), 1, data); -} - -void expr_fprint(struct expr *e, FILE *out) -{ - expr_print(e, expr_print_file_helper, out, E_NONE); -} - -static void expr_print_gstr_helper(void *data, struct symbol *sym, const char *str) -{ - struct gstr *gs = (struct gstr*)data; - const char *sym_str = NULL; - - if (sym) - sym_str = sym_get_string_value(sym); - - if (gs->max_width) { - unsigned extra_length = strlen(str); - const char *last_cr = strrchr(gs->s, '\n'); - unsigned last_line_length; - - if (sym_str) - extra_length += 4 + strlen(sym_str); - - if (!last_cr) - last_cr = gs->s; - - last_line_length = strlen(gs->s) - (last_cr - gs->s); - - if ((last_line_length + extra_length) > gs->max_width) - str_append(gs, "\\\n"); - } - - str_append(gs, str); - if (sym && sym->type != S_UNKNOWN) - str_printf(gs, " [=%s]", sym_str); -} - -void expr_gstr_print(struct expr *e, struct gstr *gs) -{ - expr_print(e, expr_print_gstr_helper, gs, E_NONE); -} diff --git a/package/config/expr.h b/package/config/expr.h deleted file mode 100644 index 3d238db..0000000 --- a/package/config/expr.h +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Copyright (C) 2002 Roman Zippel - * Released under the terms of the GNU GPL v2.0. - */ - -#ifndef EXPR_H -#define EXPR_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#ifndef __cplusplus -#include -#endif - -struct file { - struct file *next; - struct file *parent; - const char *name; - int lineno; - int flags; -}; - -#define FILE_BUSY 0x0001 -#define FILE_SCANNED 0x0002 - -typedef enum tristate { - no, mod, yes -} tristate; - -enum expr_type { - E_NONE, E_OR, E_AND, E_NOT, E_EQUAL, E_UNEQUAL, E_LIST, E_SYMBOL, E_RANGE -}; - -union expr_data { - struct expr *expr; - struct symbol *sym; -}; - -struct expr { - enum expr_type type; - union expr_data left, right; -}; - -#define EXPR_OR(dep1, dep2) (((dep1)>(dep2))?(dep1):(dep2)) -#define EXPR_AND(dep1, dep2) (((dep1)<(dep2))?(dep1):(dep2)) -#define EXPR_NOT(dep) (2-(dep)) - -#define expr_list_for_each_sym(l, e, s) \ - for (e = (l); e && (s = e->right.sym); e = e->left.expr) - -struct expr_value { - struct expr *expr; - tristate tri; -}; - -struct symbol_value { - void *val; - tristate tri; -}; - -enum symbol_type { - S_UNKNOWN, S_BOOLEAN, S_TRISTATE, S_INT, S_HEX, S_STRING, S_OTHER -}; - -/* enum values are used as index to symbol.def[] */ -enum { - S_DEF_USER, /* main user value */ - S_DEF_AUTO, /* values read from auto.conf */ - S_DEF_DEF3, /* Reserved for UI usage */ - S_DEF_DEF4, /* Reserved for UI usage */ - S_DEF_COUNT -}; - -struct symbol { - struct symbol *next; - char *name; - enum symbol_type type; - struct symbol_value curr; - struct symbol_value def[S_DEF_COUNT]; - tristate visible; - int flags; - struct property *prop; - struct expr_value dir_dep; - struct expr_value rev_dep; -}; - -#define for_all_symbols(i, sym) for (i = 0; i < SYMBOL_HASHSIZE; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER) - -#define SYMBOL_CONST 0x0001 /* symbol is const */ -#define SYMBOL_CHECK 0x0008 /* used during dependency checking */ -#define SYMBOL_CHOICE 0x0010 /* start of a choice block (null name) */ -#define SYMBOL_CHOICEVAL 0x0020 /* used as a value in a choice block */ -#define SYMBOL_VALID 0x0080 /* set when symbol.curr is calculated */ -#define SYMBOL_OPTIONAL 0x0100 /* choice is optional - values can be 'n' */ -#define SYMBOL_WRITE 0x0200 /* ? */ -#define SYMBOL_CHANGED 0x0400 /* ? */ -#define SYMBOL_AUTO 0x1000 /* value from environment variable */ -#define SYMBOL_CHECKED 0x2000 /* used during dependency checking */ -#define SYMBOL_WARNED 0x8000 /* warning has been issued */ - -/* Set when symbol.def[] is used */ -#define SYMBOL_DEF 0x10000 /* First bit of SYMBOL_DEF */ -#define SYMBOL_DEF_USER 0x10000 /* symbol.def[S_DEF_USER] is valid */ -#define SYMBOL_DEF_AUTO 0x20000 /* symbol.def[S_DEF_AUTO] is valid */ -#define SYMBOL_DEF3 0x40000 /* symbol.def[S_DEF_3] is valid */ -#define SYMBOL_DEF4 0x80000 /* symbol.def[S_DEF_4] is valid */ - -#define SYMBOL_MAXLENGTH 256 -#define SYMBOL_HASHSIZE 9973 - -/* A property represent the config options that can be associated - * with a config "symbol". - * Sample: - * config FOO - * default y - * prompt "foo prompt" - * select BAR - * config BAZ - * int "BAZ Value" - * range 1..255 - */ -enum prop_type { - P_UNKNOWN, - P_PROMPT, /* prompt "foo prompt" or "BAZ Value" */ - P_COMMENT, /* text associated with a comment */ - P_MENU, /* prompt associated with a menuconfig option */ - P_DEFAULT, /* default y */ - P_CHOICE, /* choice value */ - P_SELECT, /* select BAR */ - P_RANGE, /* range 7..100 (for a symbol) */ - P_ENV, /* value from environment variable */ - P_SYMBOL, /* where a symbol is defined */ -}; - -struct property { - struct property *next; /* next property - null if last */ - struct symbol *sym; /* the symbol for which the property is associated */ - enum prop_type type; /* type of property */ - const char *text; /* the prompt value - P_PROMPT, P_MENU, P_COMMENT */ - struct expr_value visible; - struct expr *expr; /* the optional conditional part of the property */ - struct menu *menu; /* the menu the property are associated with - * valid for: P_SELECT, P_RANGE, P_CHOICE, - * P_PROMPT, P_DEFAULT, P_MENU, P_COMMENT */ - struct file *file; /* what file was this property defined */ - int lineno; /* what lineno was this property defined */ -}; - -#define for_all_properties(sym, st, tok) \ - for (st = sym->prop; st; st = st->next) \ - if (st->type == (tok)) -#define for_all_defaults(sym, st) for_all_properties(sym, st, P_DEFAULT) -#define for_all_choices(sym, st) for_all_properties(sym, st, P_CHOICE) -#define for_all_prompts(sym, st) \ - for (st = sym->prop; st; st = st->next) \ - if (st->text) - -struct menu { - struct menu *next; - struct menu *parent; - struct menu *list; - struct symbol *sym; - struct property *prompt; - struct expr *visibility; - struct expr *dep; - unsigned int flags; - char *help; - struct file *file; - int lineno; - void *data; -}; - -#define MENU_CHANGED 0x0001 -#define MENU_ROOT 0x0002 - -#ifndef SWIG - -extern struct file *file_list; -extern struct file *current_file; -struct file *lookup_file(const char *name); - -extern struct symbol symbol_yes, symbol_no, symbol_mod; -extern struct symbol *modules_sym; -extern struct symbol *sym_defconfig_list; -extern int cdebug; -struct expr *expr_alloc_symbol(struct symbol *sym); -struct expr *expr_alloc_one(enum expr_type type, struct expr *ce); -struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2); -struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2); -struct expr *expr_alloc_and(struct expr *e1, struct expr *e2); -struct expr *expr_alloc_or(struct expr *e1, struct expr *e2); -struct expr *expr_copy(const struct expr *org); -void expr_free(struct expr *e); -int expr_eq(struct expr *e1, struct expr *e2); -void expr_eliminate_eq(struct expr **ep1, struct expr **ep2); -tristate expr_calc_value(struct expr *e); -struct expr *expr_eliminate_yn(struct expr *e); -struct expr *expr_trans_bool(struct expr *e); -struct expr *expr_eliminate_dups(struct expr *e); -struct expr *expr_transform(struct expr *e); -int expr_contains_symbol(struct expr *dep, struct symbol *sym); -bool expr_depends_symbol(struct expr *dep, struct symbol *sym); -struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2); -struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2); -void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2); -struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym); -struct expr *expr_simplify_unmet_dep(struct expr *e1, struct expr *e2); - -void expr_fprint(struct expr *e, FILE *out); -struct gstr; /* forward */ -void expr_gstr_print(struct expr *e, struct gstr *gs); - -static inline int expr_is_yes(struct expr *e) -{ - return !e || (e->type == E_SYMBOL && e->left.sym == &symbol_yes); -} - -static inline int expr_is_no(struct expr *e) -{ - return e && (e->type == E_SYMBOL && e->left.sym == &symbol_no); -} -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* EXPR_H */ diff --git a/package/config/foo.h b/package/config/foo.h deleted file mode 100644 index b9cfdf8..0000000 --- a/package/config/foo.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __KCONFIG_FOO_H -#define __KCONFIG_FOO_H - -#ifndef __APPLE__ -#include -#endif -#include - -#ifndef PATH_MAX -#define PATH_MAX 1024 -#endif -#endif /* __KCONFIG_FOO_H */ diff --git a/package/config/gconf.c b/package/config/gconf.c deleted file mode 100644 index 21185a0..0000000 --- a/package/config/gconf.c +++ /dev/null @@ -1,1577 +0,0 @@ -/* Hey EMACS -*- linux-c -*- */ -/* - * - * Copyright (C) 2002-2003 Romain Lievin - * Released under the terms of the GNU GPL v2.0. - * - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "lkc.h" -#include "images.c" - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -//#define DEBUG - -enum { - SINGLE_VIEW, SPLIT_VIEW, FULL_VIEW -}; - -enum { - OPT_NORMAL, OPT_ALL, OPT_PROMPT -}; - -static gint view_mode = FULL_VIEW; -static gboolean show_name = TRUE; -static gboolean show_range = TRUE; -static gboolean show_value = TRUE; -static gboolean resizeable = FALSE; -static int opt_mode = OPT_NORMAL; - -GtkWidget *main_wnd = NULL; -GtkWidget *tree1_w = NULL; // left frame -GtkWidget *tree2_w = NULL; // right frame -GtkWidget *text_w = NULL; -GtkWidget *hpaned = NULL; -GtkWidget *vpaned = NULL; -GtkWidget *back_btn = NULL; -GtkWidget *save_btn = NULL; -GtkWidget *save_menu_item = NULL; - -GtkTextTag *tag1, *tag2; -GdkColor color; - -GtkTreeStore *tree1, *tree2, *tree; -GtkTreeModel *model1, *model2; -static GtkTreeIter *parents[256]; -static gint indent; - -static struct menu *current; // current node for SINGLE view -static struct menu *browsed; // browsed node for SPLIT view - -enum { - COL_OPTION, COL_NAME, COL_NO, COL_MOD, COL_YES, COL_VALUE, - COL_MENU, COL_COLOR, COL_EDIT, COL_PIXBUF, - COL_PIXVIS, COL_BTNVIS, COL_BTNACT, COL_BTNINC, COL_BTNRAD, - COL_NUMBER -}; - -static void display_list(void); -static void display_tree(struct menu *menu); -static void display_tree_part(void); -static void update_tree(struct menu *src, GtkTreeIter * dst); -static void set_node(GtkTreeIter * node, struct menu *menu, gchar ** row); -static gchar **fill_row(struct menu *menu); -static void conf_changed(void); - -/* Helping/Debugging Functions */ - -const char *dbg_sym_flags(int val) -{ - static char buf[256]; - - bzero(buf, 256); - - if (val & SYMBOL_CONST) - strcat(buf, "const/"); - if (val & SYMBOL_CHECK) - strcat(buf, "check/"); - if (val & SYMBOL_CHOICE) - strcat(buf, "choice/"); - if (val & SYMBOL_CHOICEVAL) - strcat(buf, "choiceval/"); - if (val & SYMBOL_VALID) - strcat(buf, "valid/"); - if (val & SYMBOL_OPTIONAL) - strcat(buf, "optional/"); - if (val & SYMBOL_WRITE) - strcat(buf, "write/"); - if (val & SYMBOL_CHANGED) - strcat(buf, "changed/"); - if (val & SYMBOL_AUTO) - strcat(buf, "auto/"); - - buf[strlen(buf) - 1] = '\0'; - - return buf; -} - -void replace_button_icon(GladeXML * xml, GdkDrawable * window, - GtkStyle * style, gchar * btn_name, gchar ** xpm) -{ - GdkPixmap *pixmap; - GdkBitmap *mask; - GtkToolButton *button; - GtkWidget *image; - - pixmap = gdk_pixmap_create_from_xpm_d(window, &mask, - &style->bg[GTK_STATE_NORMAL], - xpm); - - button = GTK_TOOL_BUTTON(glade_xml_get_widget(xml, btn_name)); - image = gtk_image_new_from_pixmap(pixmap, mask); - gtk_widget_show(image); - gtk_tool_button_set_icon_widget(button, image); -} - -/* Main Window Initialization */ -void init_main_window(const gchar * glade_file) -{ - GladeXML *xml; - GtkWidget *widget; - GtkTextBuffer *txtbuf; - GtkStyle *style; - - xml = glade_xml_new(glade_file, "window1", NULL); - if (!xml) - g_error(_("GUI loading failed !\n")); - glade_xml_signal_autoconnect(xml); - - main_wnd = glade_xml_get_widget(xml, "window1"); - hpaned = glade_xml_get_widget(xml, "hpaned1"); - vpaned = glade_xml_get_widget(xml, "vpaned1"); - tree1_w = glade_xml_get_widget(xml, "treeview1"); - tree2_w = glade_xml_get_widget(xml, "treeview2"); - text_w = glade_xml_get_widget(xml, "textview3"); - - back_btn = glade_xml_get_widget(xml, "button1"); - gtk_widget_set_sensitive(back_btn, FALSE); - - widget = glade_xml_get_widget(xml, "show_name1"); - gtk_check_menu_item_set_active((GtkCheckMenuItem *) widget, - show_name); - - widget = glade_xml_get_widget(xml, "show_range1"); - gtk_check_menu_item_set_active((GtkCheckMenuItem *) widget, - show_range); - - widget = glade_xml_get_widget(xml, "show_data1"); - gtk_check_menu_item_set_active((GtkCheckMenuItem *) widget, - show_value); - - save_btn = glade_xml_get_widget(xml, "button3"); - save_menu_item = glade_xml_get_widget(xml, "save1"); - conf_set_changed_callback(conf_changed); - - style = gtk_widget_get_style(main_wnd); - widget = glade_xml_get_widget(xml, "toolbar1"); - -#if 0 /* Use stock Gtk icons instead */ - replace_button_icon(xml, main_wnd->window, style, - "button1", (gchar **) xpm_back); - replace_button_icon(xml, main_wnd->window, style, - "button2", (gchar **) xpm_load); - replace_button_icon(xml, main_wnd->window, style, - "button3", (gchar **) xpm_save); -#endif - replace_button_icon(xml, main_wnd->window, style, - "button4", (gchar **) xpm_single_view); - replace_button_icon(xml, main_wnd->window, style, - "button5", (gchar **) xpm_split_view); - replace_button_icon(xml, main_wnd->window, style, - "button6", (gchar **) xpm_tree_view); - -#if 0 - switch (view_mode) { - case SINGLE_VIEW: - widget = glade_xml_get_widget(xml, "button4"); - g_signal_emit_by_name(widget, "clicked"); - break; - case SPLIT_VIEW: - widget = glade_xml_get_widget(xml, "button5"); - g_signal_emit_by_name(widget, "clicked"); - break; - case FULL_VIEW: - widget = glade_xml_get_widget(xml, "button6"); - g_signal_emit_by_name(widget, "clicked"); - break; - } -#endif - txtbuf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w)); - tag1 = gtk_text_buffer_create_tag(txtbuf, "mytag1", - "foreground", "red", - "weight", PANGO_WEIGHT_BOLD, - NULL); - tag2 = gtk_text_buffer_create_tag(txtbuf, "mytag2", - /*"style", PANGO_STYLE_OBLIQUE, */ - NULL); - - gtk_window_set_title(GTK_WINDOW(main_wnd), rootmenu.prompt->text); - - gtk_widget_show(main_wnd); -} - -void init_tree_model(void) -{ - gint i; - - tree = tree2 = gtk_tree_store_new(COL_NUMBER, - G_TYPE_STRING, G_TYPE_STRING, - G_TYPE_STRING, G_TYPE_STRING, - G_TYPE_STRING, G_TYPE_STRING, - G_TYPE_POINTER, GDK_TYPE_COLOR, - G_TYPE_BOOLEAN, GDK_TYPE_PIXBUF, - G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, - G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, - G_TYPE_BOOLEAN); - model2 = GTK_TREE_MODEL(tree2); - - for (parents[0] = NULL, i = 1; i < 256; i++) - parents[i] = (GtkTreeIter *) g_malloc(sizeof(GtkTreeIter)); - - tree1 = gtk_tree_store_new(COL_NUMBER, - G_TYPE_STRING, G_TYPE_STRING, - G_TYPE_STRING, G_TYPE_STRING, - G_TYPE_STRING, G_TYPE_STRING, - G_TYPE_POINTER, GDK_TYPE_COLOR, - G_TYPE_BOOLEAN, GDK_TYPE_PIXBUF, - G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, - G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, - G_TYPE_BOOLEAN); - model1 = GTK_TREE_MODEL(tree1); -} - -void init_left_tree(void) -{ - GtkTreeView *view = GTK_TREE_VIEW(tree1_w); - GtkCellRenderer *renderer; - GtkTreeSelection *sel; - GtkTreeViewColumn *column; - - gtk_tree_view_set_model(view, model1); - gtk_tree_view_set_headers_visible(view, TRUE); - gtk_tree_view_set_rules_hint(view, FALSE); - - column = gtk_tree_view_column_new(); - gtk_tree_view_append_column(view, column); - gtk_tree_view_column_set_title(column, _("Options")); - - renderer = gtk_cell_renderer_toggle_new(); - gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), - renderer, FALSE); - gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column), - renderer, - "active", COL_BTNACT, - "inconsistent", COL_BTNINC, - "visible", COL_BTNVIS, - "radio", COL_BTNRAD, NULL); - renderer = gtk_cell_renderer_text_new(); - gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), - renderer, FALSE); - gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column), - renderer, - "text", COL_OPTION, - "foreground-gdk", - COL_COLOR, NULL); - - sel = gtk_tree_view_get_selection(view); - gtk_tree_selection_set_mode(sel, GTK_SELECTION_SINGLE); - gtk_widget_realize(tree1_w); -} - -static void renderer_edited(GtkCellRendererText * cell, - const gchar * path_string, - const gchar * new_text, gpointer user_data); -static void renderer_toggled(GtkCellRendererToggle * cellrenderertoggle, - gchar * arg1, gpointer user_data); - -void init_right_tree(void) -{ - GtkTreeView *view = GTK_TREE_VIEW(tree2_w); - GtkCellRenderer *renderer; - GtkTreeSelection *sel; - GtkTreeViewColumn *column; - gint i; - - gtk_tree_view_set_model(view, model2); - gtk_tree_view_set_headers_visible(view, TRUE); - gtk_tree_view_set_rules_hint(view, FALSE); - - column = gtk_tree_view_column_new(); - gtk_tree_view_append_column(view, column); - gtk_tree_view_column_set_title(column, _("Options")); - - renderer = gtk_cell_renderer_pixbuf_new(); - gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), - renderer, FALSE); - gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column), - renderer, - "pixbuf", COL_PIXBUF, - "visible", COL_PIXVIS, NULL); - renderer = gtk_cell_renderer_toggle_new(); - gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), - renderer, FALSE); - gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column), - renderer, - "active", COL_BTNACT, - "inconsistent", COL_BTNINC, - "visible", COL_BTNVIS, - "radio", COL_BTNRAD, NULL); - /*g_signal_connect(G_OBJECT(renderer), "toggled", - G_CALLBACK(renderer_toggled), NULL); */ - renderer = gtk_cell_renderer_text_new(); - gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), - renderer, FALSE); - gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column), - renderer, - "text", COL_OPTION, - "foreground-gdk", - COL_COLOR, NULL); - - renderer = gtk_cell_renderer_text_new(); - gtk_tree_view_insert_column_with_attributes(view, -1, - _("Name"), renderer, - "text", COL_NAME, - "foreground-gdk", - COL_COLOR, NULL); - renderer = gtk_cell_renderer_text_new(); - gtk_tree_view_insert_column_with_attributes(view, -1, - "N", renderer, - "text", COL_NO, - "foreground-gdk", - COL_COLOR, NULL); - renderer = gtk_cell_renderer_text_new(); - gtk_tree_view_insert_column_with_attributes(view, -1, - "M", renderer, - "text", COL_MOD, - "foreground-gdk", - COL_COLOR, NULL); - renderer = gtk_cell_renderer_text_new(); - gtk_tree_view_insert_column_with_attributes(view, -1, - "Y", renderer, - "text", COL_YES, - "foreground-gdk", - COL_COLOR, NULL); - renderer = gtk_cell_renderer_text_new(); - gtk_tree_view_insert_column_with_attributes(view, -1, - _("Value"), renderer, - "text", COL_VALUE, - "editable", - COL_EDIT, - "foreground-gdk", - COL_COLOR, NULL); - g_signal_connect(G_OBJECT(renderer), "edited", - G_CALLBACK(renderer_edited), NULL); - - column = gtk_tree_view_get_column(view, COL_NAME); - gtk_tree_view_column_set_visible(column, show_name); - column = gtk_tree_view_get_column(view, COL_NO); - gtk_tree_view_column_set_visible(column, show_range); - column = gtk_tree_view_get_column(view, COL_MOD); - gtk_tree_view_column_set_visible(column, show_range); - column = gtk_tree_view_get_column(view, COL_YES); - gtk_tree_view_column_set_visible(column, show_range); - column = gtk_tree_view_get_column(view, COL_VALUE); - gtk_tree_view_column_set_visible(column, show_value); - - if (resizeable) { - for (i = 0; i < COL_VALUE; i++) { - column = gtk_tree_view_get_column(view, i); - gtk_tree_view_column_set_resizable(column, TRUE); - } - } - - sel = gtk_tree_view_get_selection(view); - gtk_tree_selection_set_mode(sel, GTK_SELECTION_SINGLE); -} - - -/* Utility Functions */ - - -static void text_insert_help(struct menu *menu) -{ - GtkTextBuffer *buffer; - GtkTextIter start, end; - const char *prompt = _(menu_get_prompt(menu)); - struct gstr help = str_new(); - - menu_get_ext_help(menu, &help); - - buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w)); - gtk_text_buffer_get_bounds(buffer, &start, &end); - gtk_text_buffer_delete(buffer, &start, &end); - gtk_text_view_set_left_margin(GTK_TEXT_VIEW(text_w), 15); - - gtk_text_buffer_get_end_iter(buffer, &end); - gtk_text_buffer_insert_with_tags(buffer, &end, prompt, -1, tag1, - NULL); - gtk_text_buffer_insert_at_cursor(buffer, "\n\n", 2); - gtk_text_buffer_get_end_iter(buffer, &end); - gtk_text_buffer_insert_with_tags(buffer, &end, str_get(&help), -1, tag2, - NULL); - str_free(&help); -} - - -static void text_insert_msg(const char *title, const char *message) -{ - GtkTextBuffer *buffer; - GtkTextIter start, end; - const char *msg = message; - - buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w)); - gtk_text_buffer_get_bounds(buffer, &start, &end); - gtk_text_buffer_delete(buffer, &start, &end); - gtk_text_view_set_left_margin(GTK_TEXT_VIEW(text_w), 15); - - gtk_text_buffer_get_end_iter(buffer, &end); - gtk_text_buffer_insert_with_tags(buffer, &end, title, -1, tag1, - NULL); - gtk_text_buffer_insert_at_cursor(buffer, "\n\n", 2); - gtk_text_buffer_get_end_iter(buffer, &end); - gtk_text_buffer_insert_with_tags(buffer, &end, msg, -1, tag2, - NULL); -} - - -/* Main Windows Callbacks */ - -void on_save_activate(GtkMenuItem * menuitem, gpointer user_data); -gboolean on_window1_delete_event(GtkWidget * widget, GdkEvent * event, - gpointer user_data) -{ - GtkWidget *dialog, *label; - gint result; - - if (!conf_get_changed()) - return FALSE; - - dialog = gtk_dialog_new_with_buttons(_("Warning !"), - GTK_WINDOW(main_wnd), - (GtkDialogFlags) - (GTK_DIALOG_MODAL | - GTK_DIALOG_DESTROY_WITH_PARENT), - GTK_STOCK_OK, - GTK_RESPONSE_YES, - GTK_STOCK_NO, - GTK_RESPONSE_NO, - GTK_STOCK_CANCEL, - GTK_RESPONSE_CANCEL, NULL); - gtk_dialog_set_default_response(GTK_DIALOG(dialog), - GTK_RESPONSE_CANCEL); - - label = gtk_label_new(_("\nSave configuration ?\n")); - gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), label); - gtk_widget_show(label); - - result = gtk_dialog_run(GTK_DIALOG(dialog)); - switch (result) { - case GTK_RESPONSE_YES: - on_save_activate(NULL, NULL); - return FALSE; - case GTK_RESPONSE_NO: - return FALSE; - case GTK_RESPONSE_CANCEL: - case GTK_RESPONSE_DELETE_EVENT: - default: - gtk_widget_destroy(dialog); - return TRUE; - } - - return FALSE; -} - - -void on_window1_destroy(GtkObject * object, gpointer user_data) -{ - gtk_main_quit(); -} - - -void -on_window1_size_request(GtkWidget * widget, - GtkRequisition * requisition, gpointer user_data) -{ - static gint old_h; - gint w, h; - - if (widget->window == NULL) - gtk_window_get_default_size(GTK_WINDOW(main_wnd), &w, &h); - else - gdk_window_get_size(widget->window, &w, &h); - - if (h == old_h) - return; - old_h = h; - - gtk_paned_set_position(GTK_PANED(vpaned), 2 * h / 3); -} - - -/* Menu & Toolbar Callbacks */ - - -static void -load_filename(GtkFileSelection * file_selector, gpointer user_data) -{ - const gchar *fn; - - fn = gtk_file_selection_get_filename(GTK_FILE_SELECTION - (user_data)); - - if (conf_read(fn)) - text_insert_msg(_("Error"), _("Unable to load configuration !")); - else - display_tree(&rootmenu); -} - -void on_load1_activate(GtkMenuItem * menuitem, gpointer user_data) -{ - GtkWidget *fs; - - fs = gtk_file_selection_new(_("Load file...")); - g_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button), - "clicked", - G_CALLBACK(load_filename), (gpointer) fs); - g_signal_connect_swapped(GTK_OBJECT - (GTK_FILE_SELECTION(fs)->ok_button), - "clicked", G_CALLBACK(gtk_widget_destroy), - (gpointer) fs); - g_signal_connect_swapped(GTK_OBJECT - (GTK_FILE_SELECTION(fs)->cancel_button), - "clicked", G_CALLBACK(gtk_widget_destroy), - (gpointer) fs); - gtk_widget_show(fs); -} - - -void on_save_activate(GtkMenuItem * menuitem, gpointer user_data) -{ - if (conf_write(NULL)) - text_insert_msg(_("Error"), _("Unable to save configuration !")); -} - - -static void -store_filename(GtkFileSelection * file_selector, gpointer user_data) -{ - const gchar *fn; - - fn = gtk_file_selection_get_filename(GTK_FILE_SELECTION - (user_data)); - - if (conf_write(fn)) - text_insert_msg(_("Error"), _("Unable to save configuration !")); - - gtk_widget_destroy(GTK_WIDGET(user_data)); -} - -void on_save_as1_activate(GtkMenuItem * menuitem, gpointer user_data) -{ - GtkWidget *fs; - - fs = gtk_file_selection_new(_("Save file as...")); - g_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button), - "clicked", - G_CALLBACK(store_filename), (gpointer) fs); - g_signal_connect_swapped(GTK_OBJECT - (GTK_FILE_SELECTION(fs)->ok_button), - "clicked", G_CALLBACK(gtk_widget_destroy), - (gpointer) fs); - g_signal_connect_swapped(GTK_OBJECT - (GTK_FILE_SELECTION(fs)->cancel_button), - "clicked", G_CALLBACK(gtk_widget_destroy), - (gpointer) fs); - gtk_widget_show(fs); -} - - -void on_quit1_activate(GtkMenuItem * menuitem, gpointer user_data) -{ - if (!on_window1_delete_event(NULL, NULL, NULL)) - gtk_widget_destroy(GTK_WIDGET(main_wnd)); -} - - -void on_show_name1_activate(GtkMenuItem * menuitem, gpointer user_data) -{ - GtkTreeViewColumn *col; - - show_name = GTK_CHECK_MENU_ITEM(menuitem)->active; - col = gtk_tree_view_get_column(GTK_TREE_VIEW(tree2_w), COL_NAME); - if (col) - gtk_tree_view_column_set_visible(col, show_name); -} - - -void on_show_range1_activate(GtkMenuItem * menuitem, gpointer user_data) -{ - GtkTreeViewColumn *col; - - show_range = GTK_CHECK_MENU_ITEM(menuitem)->active; - col = gtk_tree_view_get_column(GTK_TREE_VIEW(tree2_w), COL_NO); - if (col) - gtk_tree_view_column_set_visible(col, show_range); - col = gtk_tree_view_get_column(GTK_TREE_VIEW(tree2_w), COL_MOD); - if (col) - gtk_tree_view_column_set_visible(col, show_range); - col = gtk_tree_view_get_column(GTK_TREE_VIEW(tree2_w), COL_YES); - if (col) - gtk_tree_view_column_set_visible(col, show_range); - -} - - -void on_show_data1_activate(GtkMenuItem * menuitem, gpointer user_data) -{ - GtkTreeViewColumn *col; - - show_value = GTK_CHECK_MENU_ITEM(menuitem)->active; - col = gtk_tree_view_get_column(GTK_TREE_VIEW(tree2_w), COL_VALUE); - if (col) - gtk_tree_view_column_set_visible(col, show_value); -} - - -void -on_set_option_mode1_activate(GtkMenuItem *menuitem, gpointer user_data) -{ - opt_mode = OPT_NORMAL; - gtk_tree_store_clear(tree2); - display_tree(&rootmenu); /* instead of update_tree to speed-up */ -} - - -void -on_set_option_mode2_activate(GtkMenuItem *menuitem, gpointer user_data) -{ - opt_mode = OPT_ALL; - gtk_tree_store_clear(tree2); - display_tree(&rootmenu); /* instead of update_tree to speed-up */ -} - - -void -on_set_option_mode3_activate(GtkMenuItem *menuitem, gpointer user_data) -{ - opt_mode = OPT_PROMPT; - gtk_tree_store_clear(tree2); - display_tree(&rootmenu); /* instead of update_tree to speed-up */ -} - - -void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data) -{ - GtkWidget *dialog; - const gchar *intro_text = _( - "Welcome to gkc, the GTK+ graphical configuration tool\n" - "For each option, a blank box indicates the feature is disabled, a\n" - "check indicates it is enabled, and a dot indicates that it is to\n" - "be compiled as a module. Clicking on the box will cycle through the three states.\n" - "\n" - "If you do not see an option (e.g., a device driver) that you\n" - "believe should be present, try turning on Show All Options\n" - "under the Options menu.\n" - "Although there is no cross reference yet to help you figure out\n" - "what other options must be enabled to support the option you\n" - "are interested in, you can still view the help of a grayed-out\n" - "option.\n" - "\n" - "Toggling Show Debug Info under the Options menu will show \n" - "the dependencies, which you can then match by examining other options."); - - dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd), - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_INFO, - GTK_BUTTONS_CLOSE, intro_text); - g_signal_connect_swapped(GTK_OBJECT(dialog), "response", - G_CALLBACK(gtk_widget_destroy), - GTK_OBJECT(dialog)); - gtk_widget_show_all(dialog); -} - - -void on_about1_activate(GtkMenuItem * menuitem, gpointer user_data) -{ - GtkWidget *dialog; - const gchar *about_text = - _("gkc is copyright (c) 2002 Romain Lievin .\n" - "Based on the source code from Roman Zippel.\n"); - - dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd), - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_INFO, - GTK_BUTTONS_CLOSE, about_text); - g_signal_connect_swapped(GTK_OBJECT(dialog), "response", - G_CALLBACK(gtk_widget_destroy), - GTK_OBJECT(dialog)); - gtk_widget_show_all(dialog); -} - - -void on_license1_activate(GtkMenuItem * menuitem, gpointer user_data) -{ - GtkWidget *dialog; - const gchar *license_text = - _("gkc is released under the terms of the GNU GPL v2.\n" - "For more information, please see the source code or\n" - "visit http://www.fsf.org/licenses/licenses.html\n"); - - dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd), - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_INFO, - GTK_BUTTONS_CLOSE, license_text); - g_signal_connect_swapped(GTK_OBJECT(dialog), "response", - G_CALLBACK(gtk_widget_destroy), - GTK_OBJECT(dialog)); - gtk_widget_show_all(dialog); -} - - -void on_back_clicked(GtkButton * button, gpointer user_data) -{ - enum prop_type ptype; - - current = current->parent; - ptype = current->prompt ? current->prompt->type : P_UNKNOWN; - if (ptype != P_MENU) - current = current->parent; - display_tree_part(); - - if (current == &rootmenu) - gtk_widget_set_sensitive(back_btn, FALSE); -} - - -void on_load_clicked(GtkButton * button, gpointer user_data) -{ - on_load1_activate(NULL, user_data); -} - - -void on_single_clicked(GtkButton * button, gpointer user_data) -{ - view_mode = SINGLE_VIEW; - gtk_paned_set_position(GTK_PANED(hpaned), 0); - gtk_widget_hide(tree1_w); - current = &rootmenu; - display_tree_part(); -} - - -void on_split_clicked(GtkButton * button, gpointer user_data) -{ - gint w, h; - view_mode = SPLIT_VIEW; - gtk_widget_show(tree1_w); - gtk_window_get_default_size(GTK_WINDOW(main_wnd), &w, &h); - gtk_paned_set_position(GTK_PANED(hpaned), w / 2); - if (tree2) - gtk_tree_store_clear(tree2); - display_list(); - - /* Disable back btn, like in full mode. */ - gtk_widget_set_sensitive(back_btn, FALSE); -} - - -void on_full_clicked(GtkButton * button, gpointer user_data) -{ - view_mode = FULL_VIEW; - gtk_paned_set_position(GTK_PANED(hpaned), 0); - gtk_widget_hide(tree1_w); - if (tree2) - gtk_tree_store_clear(tree2); - display_tree(&rootmenu); - gtk_widget_set_sensitive(back_btn, FALSE); -} - - -void on_collapse_clicked(GtkButton * button, gpointer user_data) -{ - gtk_tree_view_collapse_all(GTK_TREE_VIEW(tree2_w)); -} - - -void on_expand_clicked(GtkButton * button, gpointer user_data) -{ - gtk_tree_view_expand_all(GTK_TREE_VIEW(tree2_w)); -} - - -/* CTree Callbacks */ - -/* Change hex/int/string value in the cell */ -static void renderer_edited(GtkCellRendererText * cell, - const gchar * path_string, - const gchar * new_text, gpointer user_data) -{ - GtkTreePath *path = gtk_tree_path_new_from_string(path_string); - GtkTreeIter iter; - const char *old_def, *new_def; - struct menu *menu; - struct symbol *sym; - - if (!gtk_tree_model_get_iter(model2, &iter, path)) - return; - - gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1); - sym = menu->sym; - - gtk_tree_model_get(model2, &iter, COL_VALUE, &old_def, -1); - new_def = new_text; - - sym_set_string_value(sym, new_def); - - update_tree(&rootmenu, NULL); - - gtk_tree_path_free(path); -} - -/* Change the value of a symbol and update the tree */ -static void change_sym_value(struct menu *menu, gint col) -{ - struct symbol *sym = menu->sym; - tristate oldval, newval; - - if (!sym) - return; - - if (col == COL_NO) - newval = no; - else if (col == COL_MOD) - newval = mod; - else if (col == COL_YES) - newval = yes; - else - return; - - switch (sym_get_type(sym)) { - case S_BOOLEAN: - case S_TRISTATE: - oldval = sym_get_tristate_value(sym); - if (!sym_tristate_within_range(sym, newval)) - newval = yes; - sym_set_tristate_value(sym, newval); - if (view_mode == FULL_VIEW) - update_tree(&rootmenu, NULL); - else if (view_mode == SPLIT_VIEW) { - update_tree(browsed, NULL); - display_list(); - } - else if (view_mode == SINGLE_VIEW) - display_tree_part(); //fixme: keep exp/coll - break; - case S_INT: - case S_HEX: - case S_STRING: - default: - break; - } -} - -static void toggle_sym_value(struct menu *menu) -{ - if (!menu->sym) - return; - - sym_toggle_tristate_value(menu->sym); - if (view_mode == FULL_VIEW) - update_tree(&rootmenu, NULL); - else if (view_mode == SPLIT_VIEW) { - update_tree(browsed, NULL); - display_list(); - } - else if (view_mode == SINGLE_VIEW) - display_tree_part(); //fixme: keep exp/coll -} - -static void renderer_toggled(GtkCellRendererToggle * cell, - gchar * path_string, gpointer user_data) -{ - GtkTreePath *path, *sel_path = NULL; - GtkTreeIter iter, sel_iter; - GtkTreeSelection *sel; - struct menu *menu; - - path = gtk_tree_path_new_from_string(path_string); - if (!gtk_tree_model_get_iter(model2, &iter, path)) - return; - - sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree2_w)); - if (gtk_tree_selection_get_selected(sel, NULL, &sel_iter)) - sel_path = gtk_tree_model_get_path(model2, &sel_iter); - if (!sel_path) - goto out1; - if (gtk_tree_path_compare(path, sel_path)) - goto out2; - - gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1); - toggle_sym_value(menu); - - out2: - gtk_tree_path_free(sel_path); - out1: - gtk_tree_path_free(path); -} - -static gint column2index(GtkTreeViewColumn * column) -{ - gint i; - - for (i = 0; i < COL_NUMBER; i++) { - GtkTreeViewColumn *col; - - col = gtk_tree_view_get_column(GTK_TREE_VIEW(tree2_w), i); - if (col == column) - return i; - } - - return -1; -} - - -/* User click: update choice (full) or goes down (single) */ -gboolean -on_treeview2_button_press_event(GtkWidget * widget, - GdkEventButton * event, gpointer user_data) -{ - GtkTreeView *view = GTK_TREE_VIEW(widget); - GtkTreePath *path; - GtkTreeViewColumn *column; - GtkTreeIter iter; - struct menu *menu; - gint col; - -#if GTK_CHECK_VERSION(2,1,4) // bug in ctree with earlier version of GTK - gint tx = (gint) event->x; - gint ty = (gint) event->y; - gint cx, cy; - - gtk_tree_view_get_path_at_pos(view, tx, ty, &path, &column, &cx, - &cy); -#else - gtk_tree_view_get_cursor(view, &path, &column); -#endif - if (path == NULL) - return FALSE; - - if (!gtk_tree_model_get_iter(model2, &iter, path)) - return FALSE; - gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1); - - col = column2index(column); - if (event->type == GDK_2BUTTON_PRESS) { - enum prop_type ptype; - ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; - - if (ptype == P_MENU && view_mode != FULL_VIEW && col == COL_OPTION) { - // goes down into menu - current = menu; - display_tree_part(); - gtk_widget_set_sensitive(back_btn, TRUE); - } else if ((col == COL_OPTION)) { - toggle_sym_value(menu); - gtk_tree_view_expand_row(view, path, TRUE); - } - } else { - if (col == COL_VALUE) { - toggle_sym_value(menu); - gtk_tree_view_expand_row(view, path, TRUE); - } else if (col == COL_NO || col == COL_MOD - || col == COL_YES) { - change_sym_value(menu, col); - gtk_tree_view_expand_row(view, path, TRUE); - } - } - - return FALSE; -} - -/* Key pressed: update choice */ -gboolean -on_treeview2_key_press_event(GtkWidget * widget, - GdkEventKey * event, gpointer user_data) -{ - GtkTreeView *view = GTK_TREE_VIEW(widget); - GtkTreePath *path; - GtkTreeViewColumn *column; - GtkTreeIter iter; - struct menu *menu; - gint col; - - gtk_tree_view_get_cursor(view, &path, &column); - if (path == NULL) - return FALSE; - - if (event->keyval == GDK_space) { - if (gtk_tree_view_row_expanded(view, path)) - gtk_tree_view_collapse_row(view, path); - else - gtk_tree_view_expand_row(view, path, FALSE); - return TRUE; - } - if (event->keyval == GDK_KP_Enter) { - } - if (widget == tree1_w) - return FALSE; - - gtk_tree_model_get_iter(model2, &iter, path); - gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1); - - if (!strcasecmp(event->string, "n")) - col = COL_NO; - else if (!strcasecmp(event->string, "m")) - col = COL_MOD; - else if (!strcasecmp(event->string, "y")) - col = COL_YES; - else - col = -1; - change_sym_value(menu, col); - - return FALSE; -} - - -/* Row selection changed: update help */ -void -on_treeview2_cursor_changed(GtkTreeView * treeview, gpointer user_data) -{ - GtkTreeSelection *selection; - GtkTreeIter iter; - struct menu *menu; - - selection = gtk_tree_view_get_selection(treeview); - if (gtk_tree_selection_get_selected(selection, &model2, &iter)) { - gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1); - text_insert_help(menu); - } -} - - -/* User click: display sub-tree in the right frame. */ -gboolean -on_treeview1_button_press_event(GtkWidget * widget, - GdkEventButton * event, gpointer user_data) -{ - GtkTreeView *view = GTK_TREE_VIEW(widget); - GtkTreePath *path; - GtkTreeViewColumn *column; - GtkTreeIter iter; - struct menu *menu; - - gint tx = (gint) event->x; - gint ty = (gint) event->y; - gint cx, cy; - - gtk_tree_view_get_path_at_pos(view, tx, ty, &path, &column, &cx, - &cy); - if (path == NULL) - return FALSE; - - gtk_tree_model_get_iter(model1, &iter, path); - gtk_tree_model_get(model1, &iter, COL_MENU, &menu, -1); - - if (event->type == GDK_2BUTTON_PRESS) { - toggle_sym_value(menu); - current = menu; - display_tree_part(); - } else { - browsed = menu; - display_tree_part(); - } - - gtk_widget_realize(tree2_w); - gtk_tree_view_set_cursor(view, path, NULL, FALSE); - gtk_widget_grab_focus(tree2_w); - - return FALSE; -} - - -/* Fill a row of strings */ -static gchar **fill_row(struct menu *menu) -{ - static gchar *row[COL_NUMBER]; - struct symbol *sym = menu->sym; - const char *def; - int stype; - tristate val; - enum prop_type ptype; - int i; - - for (i = COL_OPTION; i <= COL_COLOR; i++) - g_free(row[i]); - bzero(row, sizeof(row)); - - row[COL_OPTION] = - g_strdup_printf("%s %s", _(menu_get_prompt(menu)), - sym && !sym_has_value(sym) ? "(NEW)" : ""); - - if (opt_mode == OPT_ALL && !menu_is_visible(menu)) - row[COL_COLOR] = g_strdup("DarkGray"); - else if (opt_mode == OPT_PROMPT && - menu_has_prompt(menu) && !menu_is_visible(menu)) - row[COL_COLOR] = g_strdup("DarkGray"); - else - row[COL_COLOR] = g_strdup("Black"); - - ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; - switch (ptype) { - case P_MENU: - row[COL_PIXBUF] = (gchar *) xpm_menu; - if (view_mode == SINGLE_VIEW) - row[COL_PIXVIS] = GINT_TO_POINTER(TRUE); - row[COL_BTNVIS] = GINT_TO_POINTER(FALSE); - break; - case P_COMMENT: - row[COL_PIXBUF] = (gchar *) xpm_void; - row[COL_PIXVIS] = GINT_TO_POINTER(FALSE); - row[COL_BTNVIS] = GINT_TO_POINTER(FALSE); - break; - default: - row[COL_PIXBUF] = (gchar *) xpm_void; - row[COL_PIXVIS] = GINT_TO_POINTER(FALSE); - row[COL_BTNVIS] = GINT_TO_POINTER(TRUE); - break; - } - - if (!sym) - return row; - row[COL_NAME] = g_strdup(sym->name); - - sym_calc_value(sym); - sym->flags &= ~SYMBOL_CHANGED; - - if (sym_is_choice(sym)) { // parse childs for getting final value - struct menu *child; - struct symbol *def_sym = sym_get_choice_value(sym); - struct menu *def_menu = NULL; - - row[COL_BTNVIS] = GINT_TO_POINTER(FALSE); - - for (child = menu->list; child; child = child->next) { - if (menu_is_visible(child) - && child->sym == def_sym) - def_menu = child; - } - - if (def_menu) - row[COL_VALUE] = - g_strdup(_(menu_get_prompt(def_menu))); - } - if (sym->flags & SYMBOL_CHOICEVAL) - row[COL_BTNRAD] = GINT_TO_POINTER(TRUE); - - stype = sym_get_type(sym); - switch (stype) { - case S_BOOLEAN: - if (GPOINTER_TO_INT(row[COL_PIXVIS]) == FALSE) - row[COL_BTNVIS] = GINT_TO_POINTER(TRUE); - if (sym_is_choice(sym)) - break; - case S_TRISTATE: - val = sym_get_tristate_value(sym); - switch (val) { - case no: - row[COL_NO] = g_strdup("N"); - row[COL_VALUE] = g_strdup("N"); - row[COL_BTNACT] = GINT_TO_POINTER(FALSE); - row[COL_BTNINC] = GINT_TO_POINTER(FALSE); - break; - case mod: - row[COL_MOD] = g_strdup("M"); - row[COL_VALUE] = g_strdup("M"); - row[COL_BTNINC] = GINT_TO_POINTER(TRUE); - break; - case yes: - row[COL_YES] = g_strdup("Y"); - row[COL_VALUE] = g_strdup("Y"); - row[COL_BTNACT] = GINT_TO_POINTER(TRUE); - row[COL_BTNINC] = GINT_TO_POINTER(FALSE); - break; - } - - if (val != no && sym_tristate_within_range(sym, no)) - row[COL_NO] = g_strdup("_"); - if (val != mod && sym_tristate_within_range(sym, mod)) - row[COL_MOD] = g_strdup("_"); - if (val != yes && sym_tristate_within_range(sym, yes)) - row[COL_YES] = g_strdup("_"); - break; - case S_INT: - case S_HEX: - case S_STRING: - def = sym_get_string_value(sym); - row[COL_VALUE] = g_strdup(def); - row[COL_EDIT] = GINT_TO_POINTER(TRUE); - row[COL_BTNVIS] = GINT_TO_POINTER(FALSE); - break; - } - - return row; -} - - -/* Set the node content with a row of strings */ -static void set_node(GtkTreeIter * node, struct menu *menu, gchar ** row) -{ - GdkColor color; - gboolean success; - GdkPixbuf *pix; - - pix = gdk_pixbuf_new_from_xpm_data((const char **) - row[COL_PIXBUF]); - - gdk_color_parse(row[COL_COLOR], &color); - gdk_colormap_alloc_colors(gdk_colormap_get_system(), &color, 1, - FALSE, FALSE, &success); - - gtk_tree_store_set(tree, node, - COL_OPTION, row[COL_OPTION], - COL_NAME, row[COL_NAME], - COL_NO, row[COL_NO], - COL_MOD, row[COL_MOD], - COL_YES, row[COL_YES], - COL_VALUE, row[COL_VALUE], - COL_MENU, (gpointer) menu, - COL_COLOR, &color, - COL_EDIT, GPOINTER_TO_INT(row[COL_EDIT]), - COL_PIXBUF, pix, - COL_PIXVIS, GPOINTER_TO_INT(row[COL_PIXVIS]), - COL_BTNVIS, GPOINTER_TO_INT(row[COL_BTNVIS]), - COL_BTNACT, GPOINTER_TO_INT(row[COL_BTNACT]), - COL_BTNINC, GPOINTER_TO_INT(row[COL_BTNINC]), - COL_BTNRAD, GPOINTER_TO_INT(row[COL_BTNRAD]), - -1); - - g_object_unref(pix); -} - - -/* Add a node to the tree */ -static void place_node(struct menu *menu, char **row) -{ - GtkTreeIter *parent = parents[indent - 1]; - GtkTreeIter *node = parents[indent]; - - gtk_tree_store_append(tree, node, parent); - set_node(node, menu, row); -} - - -/* Find a node in the GTK+ tree */ -static GtkTreeIter found; - -/* - * Find a menu in the GtkTree starting at parent. - */ -GtkTreeIter *gtktree_iter_find_node(GtkTreeIter * parent, - struct menu *tofind) -{ - GtkTreeIter iter; - GtkTreeIter *child = &iter; - gboolean valid; - GtkTreeIter *ret; - - valid = gtk_tree_model_iter_children(model2, child, parent); - while (valid) { - struct menu *menu; - - gtk_tree_model_get(model2, child, 6, &menu, -1); - - if (menu == tofind) { - memcpy(&found, child, sizeof(GtkTreeIter)); - return &found; - } - - ret = gtktree_iter_find_node(child, tofind); - if (ret) - return ret; - - valid = gtk_tree_model_iter_next(model2, child); - } - - return NULL; -} - - -/* - * Update the tree by adding/removing entries - * Does not change other nodes - */ -static void update_tree(struct menu *src, GtkTreeIter * dst) -{ - struct menu *child1; - GtkTreeIter iter, tmp; - GtkTreeIter *child2 = &iter; - gboolean valid; - GtkTreeIter *sibling; - struct symbol *sym; - struct property *prop; - struct menu *menu1, *menu2; - - if (src == &rootmenu) - indent = 1; - - valid = gtk_tree_model_iter_children(model2, child2, dst); - for (child1 = src->list; child1; child1 = child1->next) { - - prop = child1->prompt; - sym = child1->sym; - - reparse: - menu1 = child1; - if (valid) - gtk_tree_model_get(model2, child2, COL_MENU, - &menu2, -1); - else - menu2 = NULL; // force adding of a first child - -#ifdef DEBUG - printf("%*c%s | %s\n", indent, ' ', - menu1 ? menu_get_prompt(menu1) : "nil", - menu2 ? menu_get_prompt(menu2) : "nil"); -#endif - - if ((opt_mode == OPT_NORMAL && !menu_is_visible(child1)) || - (opt_mode == OPT_PROMPT && !menu_has_prompt(child1)) || - (opt_mode == OPT_ALL && !menu_get_prompt(child1))) { - - /* remove node */ - if (gtktree_iter_find_node(dst, menu1) != NULL) { - memcpy(&tmp, child2, sizeof(GtkTreeIter)); - valid = gtk_tree_model_iter_next(model2, - child2); - gtk_tree_store_remove(tree2, &tmp); - if (!valid) - return; /* next parent */ - else - goto reparse; /* next child */ - } else - continue; - } - - if (menu1 != menu2) { - if (gtktree_iter_find_node(dst, menu1) == NULL) { // add node - if (!valid && !menu2) - sibling = NULL; - else - sibling = child2; - gtk_tree_store_insert_before(tree2, - child2, - dst, sibling); - set_node(child2, menu1, fill_row(menu1)); - if (menu2 == NULL) - valid = TRUE; - } else { // remove node - memcpy(&tmp, child2, sizeof(GtkTreeIter)); - valid = gtk_tree_model_iter_next(model2, - child2); - gtk_tree_store_remove(tree2, &tmp); - if (!valid) - return; // next parent - else - goto reparse; // next child - } - } else if (sym && (sym->flags & SYMBOL_CHANGED)) { - set_node(child2, menu1, fill_row(menu1)); - } - - indent++; - update_tree(child1, child2); - indent--; - - valid = gtk_tree_model_iter_next(model2, child2); - } -} - - -/* Display the whole tree (single/split/full view) */ -static void display_tree(struct menu *menu) -{ - struct symbol *sym; - struct property *prop; - struct menu *child; - enum prop_type ptype; - - if (menu == &rootmenu) { - indent = 1; - current = &rootmenu; - } - - for (child = menu->list; child; child = child->next) { - prop = child->prompt; - sym = child->sym; - ptype = prop ? prop->type : P_UNKNOWN; - - if (sym) - sym->flags &= ~SYMBOL_CHANGED; - - if ((view_mode == SPLIT_VIEW) - && !(child->flags & MENU_ROOT) && (tree == tree1)) - continue; - - if ((view_mode == SPLIT_VIEW) && (child->flags & MENU_ROOT) - && (tree == tree2)) - continue; - - if ((opt_mode == OPT_NORMAL && menu_is_visible(child)) || - (opt_mode == OPT_PROMPT && menu_has_prompt(child)) || - (opt_mode == OPT_ALL && menu_get_prompt(child))) - place_node(child, fill_row(child)); -#ifdef DEBUG - printf("%*c%s: ", indent, ' ', menu_get_prompt(child)); - printf("%s", child->flags & MENU_ROOT ? "rootmenu | " : ""); - printf("%s", prop_get_type_name(ptype)); - printf(" | "); - if (sym) { - printf("%s", sym_type_name(sym->type)); - printf(" | "); - printf("%s", dbg_sym_flags(sym->flags)); - printf("\n"); - } else - printf("\n"); -#endif - if ((view_mode != FULL_VIEW) && (ptype == P_MENU) - && (tree == tree2)) - continue; -/* - if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT)) - || (view_mode == FULL_VIEW) - || (view_mode == SPLIT_VIEW))*/ - if (((view_mode == SINGLE_VIEW) && (menu->flags & MENU_ROOT)) - || (view_mode == FULL_VIEW) - || (view_mode == SPLIT_VIEW)) { - indent++; - display_tree(child); - indent--; - } - } -} - -/* Display a part of the tree starting at current node (single/split view) */ -static void display_tree_part(void) -{ - if (tree2) - gtk_tree_store_clear(tree2); - if (view_mode == SINGLE_VIEW) - display_tree(current); - else if (view_mode == SPLIT_VIEW) - display_tree(browsed); - gtk_tree_view_expand_all(GTK_TREE_VIEW(tree2_w)); -} - -/* Display the list in the left frame (split view) */ -static void display_list(void) -{ - if (tree1) - gtk_tree_store_clear(tree1); - - tree = tree1; - display_tree(&rootmenu); - gtk_tree_view_expand_all(GTK_TREE_VIEW(tree1_w)); - tree = tree2; -} - -void fixup_rootmenu(struct menu *menu) -{ - struct menu *child; - static int menu_cnt = 0; - - menu->flags |= MENU_ROOT; - for (child = menu->list; child; child = child->next) { - if (child->prompt && child->prompt->type == P_MENU) { - menu_cnt++; - fixup_rootmenu(child); - menu_cnt--; - } else if (!menu_cnt) - fixup_rootmenu(child); - } -} - - -/* Main */ -int main(int ac, char *av[]) -{ - const char *name; - char *env; - gchar *glade_file; - -#ifndef LKC_DIRECT_LINK - kconfig_load(); -#endif - - bindtextdomain(PACKAGE, LOCALEDIR); - bind_textdomain_codeset(PACKAGE, "UTF-8"); - textdomain(PACKAGE); - - /* GTK stuffs */ - gtk_set_locale(); - gtk_init(&ac, &av); - glade_init(); - - //add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps"); - //add_pixmap_directory (PACKAGE_SOURCE_DIR "/pixmaps"); - - /* Determine GUI path */ - env = getenv(SRCTREE); - if (env) - glade_file = g_strconcat(env, "/package/config/gconf.glade", NULL); - else if (av[0][0] == '/') - glade_file = g_strconcat(av[0], ".glade", NULL); - else - glade_file = g_strconcat(g_get_current_dir(), "/", av[0], ".glade", NULL); - - /* Conf stuffs */ - if (ac > 1 && av[1][0] == '-') { - switch (av[1][1]) { - case 'a': - //showAll = 1; - break; - case 'h': - case '?': - printf("%s \n", av[0]); - exit(0); - } - name = av[2]; - } else - name = av[1]; - - conf_parse(name); - fixup_rootmenu(&rootmenu); - conf_read(NULL); - - /* Load the interface and connect signals */ - init_main_window(glade_file); - init_tree_model(); - init_left_tree(); - init_right_tree(); - - switch (view_mode) { - case SINGLE_VIEW: - display_tree_part(); - break; - case SPLIT_VIEW: - display_list(); - break; - case FULL_VIEW: - display_tree(&rootmenu); - break; - } - - gtk_main(); - - return 0; -} - -static void conf_changed(void) -{ - bool changed = conf_get_changed(); - gtk_widget_set_sensitive(save_btn, changed); - gtk_widget_set_sensitive(save_menu_item, changed); -} diff --git a/package/config/gconf.glade b/package/config/gconf.glade deleted file mode 100644 index 6cbc1bb..0000000 --- a/package/config/gconf.glade +++ /dev/null @@ -1,661 +0,0 @@ - - - - - - True - Gtk Buildroot Configurator - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - 640 - 480 - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - - - - - - - True - False - 0 - - - - True - - - - True - _File - True - - - - - - - True - Load a config file - _Load - True - - - - - - True - gtk-open - 1 - 0.5 - 0.5 - 0 - 0 - - - - - - - - True - Save the config in .config - _Save - True - - - - - - True - gtk-save - 1 - 0.5 - 0.5 - 0 - 0 - - - - - - - - True - Save the config in a file - Save _as - True - - - - - True - gtk-save-as - 1 - 0.5 - 0.5 - 0 - 0 - - - - - - - - True - - - - - - True - _Quit - True - - - - - - True - gtk-quit - 1 - 0.5 - 0.5 - 0 - 0 - - - - - - - - - - - - True - _Options - True - - - - - - - True - Show name - Show _name - True - False - - - - - - - True - Show range (Y/M/N) - Show _range - True - False - - - - - - - True - Show value of the option - Show _data - True - False - - - - - - - True - - - - - - True - Show normal options - Show normal options - True - True - - - - - - - True - Show all options - Show all _options - True - False - set_option_mode1 - - - - - - - True - Show all options with prompts - Show all prompt options - True - False - set_option_mode1 - - - - - - - - - - - - True - _Help - True - - - - - - - True - _Introduction - True - - - - - - True - gtk-dialog-question - 1 - 0.5 - 0.5 - 0 - 0 - - - - - - - - True - _About - True - - - - - - True - gtk-properties - 1 - 0.5 - 0.5 - 0 - 0 - - - - - - - - True - _License - True - - - - - True - gtk-justify-fill - 1 - 0.5 - 0.5 - 0 - 0 - - - - - - - - - - - 0 - False - False - - - - - - True - GTK_SHADOW_OUT - GTK_POS_LEFT - GTK_POS_TOP - - - - True - GTK_ORIENTATION_HORIZONTAL - GTK_TOOLBAR_BOTH - True - True - - - - True - Goes up of one level (single view) - Back - True - gtk-undo - True - True - False - - - - False - True - - - - - - True - True - True - False - - - - True - - - - - False - False - - - - - - True - Load a config file - Load - True - gtk-open - True - True - False - - - - False - True - - - - - - True - Save a config file - Save - True - gtk-save - True - True - False - - - - False - True - - - - - - True - True - True - False - - - - True - - - - - False - False - - - - - - True - Single view - Single - True - gtk-missing-image - True - True - False - - - - False - True - - - - - - True - Split view - Split - True - gtk-missing-image - True - True - False - - - - False - True - - - - - - True - Full view - Full - True - gtk-missing-image - True - True - False - - - - False - True - - - - - - True - True - True - False - - - - True - - - - - False - False - - - - - - True - Collapse the whole tree in the right frame - Collapse - True - gtk-remove - True - True - False - - - - False - True - - - - - - True - Expand the whole tree in the right frame - Expand - True - gtk-add - True - True - False - - - - False - True - - - - - - - 0 - False - False - - - - - - 1 - True - True - 0 - - - - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - True - False - False - False - - - - - - - - True - False - - - - - - True - True - 0 - - - - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - True - True - False - False - False - - - - - - - - True - False - - - - - - True - GTK_POLICY_NEVER - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - False - False - True - GTK_JUSTIFY_LEFT - GTK_WRAP_WORD - True - 0 - 0 - 0 - 0 - 0 - 0 - Sorry, no help available for this option yet. - - - - - True - True - - - - - True - True - - - - - 0 - True - True - - - - - - - diff --git a/package/config/images.c b/package/config/images.c deleted file mode 100644 index d4f84bd..0000000 --- a/package/config/images.c +++ /dev/null @@ -1,326 +0,0 @@ -/* - * Copyright (C) 2002 Roman Zippel - * Released under the terms of the GNU GPL v2.0. - */ - -static const char *xpm_load[] = { -"22 22 5 1", -". c None", -"# c #000000", -"c c #838100", -"a c #ffff00", -"b c #ffffff", -"......................", -"......................", -"......................", -"............####....#.", -"...........#....##.##.", -"..................###.", -".................####.", -".####...........#####.", -"#abab##########.......", -"#babababababab#.......", -"#ababababababa#.......", -"#babababababab#.......", -"#ababab###############", -"#babab##cccccccccccc##", -"#abab##cccccccccccc##.", -"#bab##cccccccccccc##..", -"#ab##cccccccccccc##...", -"#b##cccccccccccc##....", -"###cccccccccccc##.....", -"##cccccccccccc##......", -"###############.......", -"......................"}; - -static const char *xpm_save[] = { -"22 22 5 1", -". c None", -"# c #000000", -"a c #838100", -"b c #c5c2c5", -"c c #cdb6d5", -"......................", -".####################.", -".#aa#bbbbbbbbbbbb#bb#.", -".#aa#bbbbbbbbbbbb#bb#.", -".#aa#bbbbbbbbbcbb####.", -".#aa#bbbccbbbbbbb#aa#.", -".#aa#bbbccbbbbbbb#aa#.", -".#aa#bbbbbbbbbbbb#aa#.", -".#aa#bbbbbbbbbbbb#aa#.", -".#aa#bbbbbbbbbbbb#aa#.", -".#aa#bbbbbbbbbbbb#aa#.", -".#aaa############aaa#.", -".#aaaaaaaaaaaaaaaaaa#.", -".#aaaaaaaaaaaaaaaaaa#.", -".#aaa#############aa#.", -".#aaa#########bbb#aa#.", -".#aaa#########bbb#aa#.", -".#aaa#########bbb#aa#.", -".#aaa#########bbb#aa#.", -".#aaa#########bbb#aa#.", -"..##################..", -"......................"}; - -static const char *xpm_back[] = { -"22 22 3 1", -". c None", -"# c #000083", -"a c #838183", -"......................", -"......................", -"......................", -"......................", -"......................", -"...........######a....", -"..#......##########...", -"..##...####......##a..", -"..###.###.........##..", -"..######..........##..", -"..#####...........##..", -"..######..........##..", -"..#######.........##..", -"..########.......##a..", -"...............a###...", -"...............###....", -"......................", -"......................", -"......................", -"......................", -"......................", -"......................"}; - -static const char *xpm_tree_view[] = { -"22 22 2 1", -". c None", -"# c #000000", -"......................", -"......................", -"......#...............", -"......#...............", -"......#...............", -"......#...............", -"......#...............", -"......########........", -"......#...............", -"......#...............", -"......#...............", -"......#...............", -"......#...............", -"......########........", -"......#...............", -"......#...............", -"......#...............", -"......#...............", -"......#...............", -"......########........", -"......................", -"......................"}; - -static const char *xpm_single_view[] = { -"22 22 2 1", -". c None", -"# c #000000", -"......................", -"......................", -"..........#...........", -"..........#...........", -"..........#...........", -"..........#...........", -"..........#...........", -"..........#...........", -"..........#...........", -"..........#...........", -"..........#...........", -"..........#...........", -"..........#...........", -"..........#...........", -"..........#...........", -"..........#...........", -"..........#...........", -"..........#...........", -"..........#...........", -"..........#...........", -"......................", -"......................"}; - -static const char *xpm_split_view[] = { -"22 22 2 1", -". c None", -"# c #000000", -"......................", -"......................", -"......#......#........", -"......#......#........", -"......#......#........", -"......#......#........", -"......#......#........", -"......#......#........", -"......#......#........", -"......#......#........", -"......#......#........", -"......#......#........", -"......#......#........", -"......#......#........", -"......#......#........", -"......#......#........", -"......#......#........", -"......#......#........", -"......#......#........", -"......#......#........", -"......................", -"......................"}; - -static const char *xpm_symbol_no[] = { -"12 12 2 1", -" c white", -". c black", -" ", -" .......... ", -" . . ", -" . . ", -" . . ", -" . . ", -" . . ", -" . . ", -" . . ", -" . . ", -" .......... ", -" "}; - -static const char *xpm_symbol_mod[] = { -"12 12 2 1", -" c white", -". c black", -" ", -" .......... ", -" . . ", -" . . ", -" . .. . ", -" . .... . ", -" . .... . ", -" . .. . ", -" . . ", -" . . ", -" .......... ", -" "}; - -static const char *xpm_symbol_yes[] = { -"12 12 2 1", -" c white", -". c black", -" ", -" .......... ", -" . . ", -" . . ", -" . . . ", -" . .. . ", -" . . .. . ", -" . .... . ", -" . .. . ", -" . . ", -" .......... ", -" "}; - -static const char *xpm_choice_no[] = { -"12 12 2 1", -" c white", -". c black", -" ", -" .... ", -" .. .. ", -" . . ", -" . . ", -" . . ", -" . . ", -" . . ", -" . . ", -" .. .. ", -" .... ", -" "}; - -static const char *xpm_choice_yes[] = { -"12 12 2 1", -" c white", -". c black", -" ", -" .... ", -" .. .. ", -" . . ", -" . .. . ", -" . .... . ", -" . .... . ", -" . .. . ", -" . . ", -" .. .. ", -" .... ", -" "}; - -static const char *xpm_menu[] = { -"12 12 2 1", -" c white", -". c black", -" ", -" .......... ", -" . . ", -" . .. . ", -" . .... . ", -" . ...... . ", -" . ...... . ", -" . .... . ", -" . .. . ", -" . . ", -" .......... ", -" "}; - -static const char *xpm_menu_inv[] = { -"12 12 2 1", -" c white", -". c black", -" ", -" .......... ", -" .......... ", -" .. ...... ", -" .. .... ", -" .. .. ", -" .. .. ", -" .. .... ", -" .. ...... ", -" .......... ", -" .......... ", -" "}; - -static const char *xpm_menuback[] = { -"12 12 2 1", -" c white", -". c black", -" ", -" .......... ", -" . . ", -" . .. . ", -" . .... . ", -" . ...... . ", -" . ...... . ", -" . .... . ", -" . .. . ", -" . . ", -" .......... ", -" "}; - -static const char *xpm_void[] = { -"12 12 2 1", -" c white", -". c black", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" "}; diff --git a/package/config/kconfig_load.c b/package/config/kconfig_load.c deleted file mode 100644 index dbdcaad..0000000 --- a/package/config/kconfig_load.c +++ /dev/null @@ -1,35 +0,0 @@ -#include -#include -#include - -#include "lkc.h" - -#define P(name,type,arg) type (*name ## _p) arg -#include "lkc_proto.h" -#undef P - -void kconfig_load(void) -{ - void *handle; - char *error; - - handle = dlopen("./libkconfig.so", RTLD_LAZY); - if (!handle) { - handle = dlopen("./scripts/kconfig/libkconfig.so", RTLD_LAZY); - if (!handle) { - fprintf(stderr, "%s\n", dlerror()); - exit(1); - } - } - -#define P(name,type,arg) \ -{ \ - name ## _p = dlsym(handle, #name); \ - if ((error = dlerror())) { \ - fprintf(stderr, "%s\n", error); \ - exit(1); \ - } \ -} -#include "lkc_proto.h" -#undef P -} diff --git a/package/config/kxgettext.c b/package/config/kxgettext.c deleted file mode 100644 index e9d8e79..0000000 --- a/package/config/kxgettext.c +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Arnaldo Carvalho de Melo , 2005 - * - * Released under the terms of the GNU GPL v2.0 - */ - -#include -#include - -#define LKC_DIRECT_LINK -#include "lkc.h" - -static char *escape(const char* text, char *bf, int len) -{ - char *bfp = bf; - int multiline = strchr(text, '\n') != NULL; - int eol = 0; - int textlen = strlen(text); - - if ((textlen > 0) && (text[textlen-1] == '\n')) - eol = 1; - - *bfp++ = '"'; - --len; - - if (multiline) { - *bfp++ = '"'; - *bfp++ = '\n'; - *bfp++ = '"'; - len -= 3; - } - - while (*text != '\0' && len > 1) { - if (*text == '"') - *bfp++ = '\\'; - else if (*text == '\n') { - *bfp++ = '\\'; - *bfp++ = 'n'; - *bfp++ = '"'; - *bfp++ = '\n'; - *bfp++ = '"'; - len -= 5; - ++text; - goto next; - } - else if (*text == '\\') { - *bfp++ = '\\'; - len--; - } - *bfp++ = *text++; -next: - --len; - } - - if (multiline && eol) - bfp -= 3; - - *bfp++ = '"'; - *bfp = '\0'; - - return bf; -} - -struct file_line { - struct file_line *next; - const char *file; - int lineno; -}; - -static struct file_line *file_line__new(const char *file, int lineno) -{ - struct file_line *self = malloc(sizeof(*self)); - - if (self == NULL) - goto out; - - self->file = file; - self->lineno = lineno; - self->next = NULL; -out: - return self; -} - -struct message { - const char *msg; - const char *option; - struct message *next; - struct file_line *files; -}; - -static struct message *message__list; - -static struct message *message__new(const char *msg, char *option, - const char *file, int lineno) -{ - struct message *self = malloc(sizeof(*self)); - - if (self == NULL) - goto out; - - self->files = file_line__new(file, lineno); - if (self->files == NULL) - goto out_fail; - - self->msg = strdup(msg); - if (self->msg == NULL) - goto out_fail_msg; - - self->option = option; - self->next = NULL; -out: - return self; -out_fail_msg: - free(self->files); -out_fail: - free(self); - self = NULL; - goto out; -} - -static struct message *mesage__find(const char *msg) -{ - struct message *m = message__list; - - while (m != NULL) { - if (strcmp(m->msg, msg) == 0) - break; - m = m->next; - } - - return m; -} - -static int message__add_file_line(struct message *self, const char *file, - int lineno) -{ - int rc = -1; - struct file_line *fl = file_line__new(file, lineno); - - if (fl == NULL) - goto out; - - fl->next = self->files; - self->files = fl; - rc = 0; -out: - return rc; -} - -static int message__add(const char *msg, char *option, const char *file, - int lineno) -{ - int rc = 0; - char bf[16384]; - char *escaped = escape(msg, bf, sizeof(bf)); - struct message *m = mesage__find(escaped); - - if (m != NULL) - rc = message__add_file_line(m, file, lineno); - else { - m = message__new(escaped, option, file, lineno); - - if (m != NULL) { - m->next = message__list; - message__list = m; - } else - rc = -1; - } - return rc; -} - -static void menu_build_message_list(struct menu *menu) -{ - struct menu *child; - - message__add(menu_get_prompt(menu), NULL, - menu->file == NULL ? "Root Menu" : menu->file->name, - menu->lineno); - - if (menu->sym != NULL && menu_has_help(menu)) - message__add(menu_get_help(menu), menu->sym->name, - menu->file == NULL ? "Root Menu" : menu->file->name, - menu->lineno); - - for (child = menu->list; child != NULL; child = child->next) - if (child->prompt != NULL) - menu_build_message_list(child); -} - -static void message__print_file_lineno(struct message *self) -{ - struct file_line *fl = self->files; - - putchar('\n'); - if (self->option != NULL) - printf("# %s:00000\n", self->option); - - printf("#: %s:%d", fl->file, fl->lineno); - fl = fl->next; - - while (fl != NULL) { - printf(", %s:%d", fl->file, fl->lineno); - fl = fl->next; - } - - putchar('\n'); -} - -static void message__print_gettext_msgid_msgstr(struct message *self) -{ - message__print_file_lineno(self); - - printf("msgid %s\n" - "msgstr \"\"\n", self->msg); -} - -static void menu__xgettext(void) -{ - struct message *m = message__list; - - while (m != NULL) { - /* skip empty lines ("") */ - if (strlen(m->msg) > sizeof("\"\"")) - message__print_gettext_msgid_msgstr(m); - m = m->next; - } -} - -int main(int ac, char **av) -{ - conf_parse(av[1]); - - menu_build_message_list(menu_get_root_menu(NULL)); - menu__xgettext(); - return 0; -} diff --git a/package/config/lex.zconf.c_shipped b/package/config/lex.zconf.c_shipped deleted file mode 100644 index 6eb0397..0000000 --- a/package/config/lex.zconf.c_shipped +++ /dev/null @@ -1,2430 +0,0 @@ - -#line 3 "scripts/kconfig/lex.zconf.c" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define yy_create_buffer zconf_create_buffer -#define yy_delete_buffer zconf_delete_buffer -#define yy_flex_debug zconf_flex_debug -#define yy_init_buffer zconf_init_buffer -#define yy_flush_buffer zconf_flush_buffer -#define yy_load_buffer_state zconf_load_buffer_state -#define yy_switch_to_buffer zconf_switch_to_buffer -#define yyin zconfin -#define yyleng zconfleng -#define yylex zconflex -#define yylineno zconflineno -#define yyout zconfout -#define yyrestart zconfrestart -#define yytext zconftext -#define yywrap zconfwrap -#define yyalloc zconfalloc -#define yyrealloc zconfrealloc -#define yyfree zconffree - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! C99 */ - -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN (yy_start) = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START (((yy_start) - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE zconfrestart(zconfin ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else -#define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -extern int zconfleng; - -extern FILE *zconfin, *zconfout; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up zconftext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = (yy_hold_char); \ - YY_RESTORE_YY_MORE_OFFSET \ - (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up zconftext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, (yytext_ptr) ) - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via zconfrestart()), so that the user can continue scanning by - * just pointing zconfin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* Stack of input buffers. */ -static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ -static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ - ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] - -/* yy_hold_char holds the character lost when zconftext is formed. */ -static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ -int zconfleng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; -static int yy_init = 0; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow zconfwrap()'s to do buffer switches - * instead of setting up a fresh zconfin. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void zconfrestart (FILE *input_file ); -void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer ); -YY_BUFFER_STATE zconf_create_buffer (FILE *file,int size ); -void zconf_delete_buffer (YY_BUFFER_STATE b ); -void zconf_flush_buffer (YY_BUFFER_STATE b ); -void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer ); -void zconfpop_buffer_state (void ); - -static void zconfensure_buffer_stack (void ); -static void zconf_load_buffer_state (void ); -static void zconf_init_buffer (YY_BUFFER_STATE b,FILE *file ); - -#define YY_FLUSH_BUFFER zconf_flush_buffer(YY_CURRENT_BUFFER ) - -YY_BUFFER_STATE zconf_scan_buffer (char *base,yy_size_t size ); -YY_BUFFER_STATE zconf_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE zconf_scan_bytes (yyconst char *bytes,int len ); - -void *zconfalloc (yy_size_t ); -void *zconfrealloc (void *,yy_size_t ); -void zconffree (void * ); - -#define yy_new_buffer zconf_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - zconfensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - zconf_create_buffer(zconfin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - zconfensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - zconf_create_buffer(zconfin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -#define zconfwrap(n) 1 -#define YY_SKIP_YYWRAP - -typedef unsigned char YY_CHAR; - -FILE *zconfin = (FILE *) 0, *zconfout = (FILE *) 0; - -typedef int yy_state_type; - -extern int zconflineno; - -int zconflineno = 1; - -extern char *zconftext; -#define yytext_ptr zconftext -static yyconst flex_int16_t yy_nxt[][17] = - { - { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0 - }, - - { - 11, 12, 13, 14, 12, 12, 15, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12 - }, - - { - 11, 12, 13, 14, 12, 12, 15, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12 - }, - - { - 11, 16, 16, 17, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 18, 16, 16, 16 - }, - - { - 11, 16, 16, 17, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 18, 16, 16, 16 - - }, - - { - 11, 19, 20, 21, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19 - }, - - { - 11, 19, 20, 21, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19, 19 - }, - - { - 11, 22, 22, 23, 22, 24, 22, 22, 24, 22, - 22, 22, 22, 22, 22, 25, 22 - }, - - { - 11, 22, 22, 23, 22, 24, 22, 22, 24, 22, - 22, 22, 22, 22, 22, 25, 22 - }, - - { - 11, 26, 26, 27, 28, 29, 30, 31, 29, 32, - 33, 34, 35, 35, 36, 37, 38 - - }, - - { - 11, 26, 26, 27, 28, 29, 30, 31, 29, 32, - 33, 34, 35, 35, 36, 37, 38 - }, - - { - -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, - -11, -11, -11, -11, -11, -11, -11 - }, - - { - 11, -12, -12, -12, -12, -12, -12, -12, -12, -12, - -12, -12, -12, -12, -12, -12, -12 - }, - - { - 11, -13, 39, 40, -13, -13, 41, -13, -13, -13, - -13, -13, -13, -13, -13, -13, -13 - }, - - { - 11, -14, -14, -14, -14, -14, -14, -14, -14, -14, - -14, -14, -14, -14, -14, -14, -14 - - }, - - { - 11, 42, 42, 43, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42 - }, - - { - 11, -16, -16, -16, -16, -16, -16, -16, -16, -16, - -16, -16, -16, -16, -16, -16, -16 - }, - - { - 11, -17, -17, -17, -17, -17, -17, -17, -17, -17, - -17, -17, -17, -17, -17, -17, -17 - }, - - { - 11, -18, -18, -18, -18, -18, -18, -18, -18, -18, - -18, -18, -18, 44, -18, -18, -18 - }, - - { - 11, 45, 45, -19, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45 - - }, - - { - 11, -20, 46, 47, -20, -20, -20, -20, -20, -20, - -20, -20, -20, -20, -20, -20, -20 - }, - - { - 11, 48, -21, -21, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48 - }, - - { - 11, 49, 49, 50, 49, -22, 49, 49, -22, 49, - 49, 49, 49, 49, 49, -22, 49 - }, - - { - 11, -23, -23, -23, -23, -23, -23, -23, -23, -23, - -23, -23, -23, -23, -23, -23, -23 - }, - - { - 11, -24, -24, -24, -24, -24, -24, -24, -24, -24, - -24, -24, -24, -24, -24, -24, -24 - - }, - - { - 11, 51, 51, 52, 51, 51, 51, 51, 51, 51, - 51, 51, 51, 51, 51, 51, 51 - }, - - { - 11, -26, -26, -26, -26, -26, -26, -26, -26, -26, - -26, -26, -26, -26, -26, -26, -26 - }, - - { - 11, -27, -27, -27, -27, -27, -27, -27, -27, -27, - -27, -27, -27, -27, -27, -27, -27 - }, - - { - 11, -28, -28, -28, -28, -28, -28, -28, -28, -28, - -28, -28, -28, -28, 53, -28, -28 - }, - - { - 11, -29, -29, -29, -29, -29, -29, -29, -29, -29, - -29, -29, -29, -29, -29, -29, -29 - - }, - - { - 11, 54, 54, -30, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54 - }, - - { - 11, -31, -31, -31, -31, -31, -31, 55, -31, -31, - -31, -31, -31, -31, -31, -31, -31 - }, - - { - 11, -32, -32, -32, -32, -32, -32, -32, -32, -32, - -32, -32, -32, -32, -32, -32, -32 - }, - - { - 11, -33, -33, -33, -33, -33, -33, -33, -33, -33, - -33, -33, -33, -33, -33, -33, -33 - }, - - { - 11, -34, -34, -34, -34, -34, -34, -34, -34, -34, - -34, 56, 57, 57, -34, -34, -34 - - }, - - { - 11, -35, -35, -35, -35, -35, -35, -35, -35, -35, - -35, 57, 57, 57, -35, -35, -35 - }, - - { - 11, -36, -36, -36, -36, -36, -36, -36, -36, -36, - -36, -36, -36, -36, -36, -36, -36 - }, - - { - 11, -37, -37, 58, -37, -37, -37, -37, -37, -37, - -37, -37, -37, -37, -37, -37, -37 - }, - - { - 11, -38, -38, -38, -38, -38, -38, -38, -38, -38, - -38, -38, -38, -38, -38, -38, 59 - }, - - { - 11, -39, 39, 40, -39, -39, 41, -39, -39, -39, - -39, -39, -39, -39, -39, -39, -39 - - }, - - { - 11, -40, -40, -40, -40, -40, -40, -40, -40, -40, - -40, -40, -40, -40, -40, -40, -40 - }, - - { - 11, 42, 42, 43, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42 - }, - - { - 11, 42, 42, 43, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42 - }, - - { - 11, -43, -43, -43, -43, -43, -43, -43, -43, -43, - -43, -43, -43, -43, -43, -43, -43 - }, - - { - 11, -44, -44, -44, -44, -44, -44, -44, -44, -44, - -44, -44, -44, 44, -44, -44, -44 - - }, - - { - 11, 45, 45, -45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45 - }, - - { - 11, -46, 46, 47, -46, -46, -46, -46, -46, -46, - -46, -46, -46, -46, -46, -46, -46 - }, - - { - 11, 48, -47, -47, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48 - }, - - { - 11, -48, -48, -48, -48, -48, -48, -48, -48, -48, - -48, -48, -48, -48, -48, -48, -48 - }, - - { - 11, 49, 49, 50, 49, -49, 49, 49, -49, 49, - 49, 49, 49, 49, 49, -49, 49 - - }, - - { - 11, -50, -50, -50, -50, -50, -50, -50, -50, -50, - -50, -50, -50, -50, -50, -50, -50 - }, - - { - 11, -51, -51, 52, -51, -51, -51, -51, -51, -51, - -51, -51, -51, -51, -51, -51, -51 - }, - - { - 11, -52, -52, -52, -52, -52, -52, -52, -52, -52, - -52, -52, -52, -52, -52, -52, -52 - }, - - { - 11, -53, -53, -53, -53, -53, -53, -53, -53, -53, - -53, -53, -53, -53, -53, -53, -53 - }, - - { - 11, 54, 54, -54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 54, 54 - - }, - - { - 11, -55, -55, -55, -55, -55, -55, -55, -55, -55, - -55, -55, -55, -55, -55, -55, -55 - }, - - { - 11, -56, -56, -56, -56, -56, -56, -56, -56, -56, - -56, 60, 57, 57, -56, -56, -56 - }, - - { - 11, -57, -57, -57, -57, -57, -57, -57, -57, -57, - -57, 57, 57, 57, -57, -57, -57 - }, - - { - 11, -58, -58, -58, -58, -58, -58, -58, -58, -58, - -58, -58, -58, -58, -58, -58, -58 - }, - - { - 11, -59, -59, -59, -59, -59, -59, -59, -59, -59, - -59, -59, -59, -59, -59, -59, -59 - - }, - - { - 11, -60, -60, -60, -60, -60, -60, -60, -60, -60, - -60, 57, 57, 57, -60, -60, -60 - }, - - } ; - -static yy_state_type yy_get_previous_state (void ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); -static int yy_get_next_buffer (void ); -static void yy_fatal_error (yyconst char msg[] ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up zconftext. - */ -#define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - zconfleng = (size_t) (yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; - -#define YY_NUM_RULES 33 -#define YY_END_OF_BUFFER 34 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[61] = - { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 34, 5, 4, 2, 3, 7, 8, 6, 32, 29, - 31, 24, 28, 27, 26, 22, 17, 13, 16, 20, - 22, 11, 12, 19, 19, 14, 22, 22, 4, 2, - 3, 3, 1, 6, 32, 29, 31, 30, 24, 23, - 26, 25, 15, 20, 9, 19, 19, 21, 10, 18 - } ; - -static yyconst flex_int32_t yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 5, 6, 1, 1, 7, 8, 9, - 10, 1, 1, 1, 11, 12, 12, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 1, 1, 1, - 14, 1, 1, 1, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 1, 15, 1, 1, 13, 1, 13, 13, 13, 13, - - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 1, 16, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -extern int zconf_flex_debug; -int zconf_flex_debug = 0; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -char *zconftext; -#define YY_NO_INPUT 1 - -/* - * Copyright (C) 2002 Roman Zippel - * Released under the terms of the GNU GPL v2.0. - */ - -#include -#include -#include -#include -#include - -#define LKC_DIRECT_LINK -#include "lkc.h" - -#define START_STRSIZE 16 - -static struct { - struct file *file; - int lineno; -} current_pos; - -static char *text; -static int text_size, text_asize; - -struct buffer { - struct buffer *parent; - YY_BUFFER_STATE state; -}; - -struct buffer *current_buf; - -static int last_ts, first_ts; - -static void zconf_endhelp(void); -static void zconf_endfile(void); - -static void new_string(void) -{ - text = malloc(START_STRSIZE); - text_asize = START_STRSIZE; - text_size = 0; - *text = 0; -} - -static void append_string(const char *str, int size) -{ - int new_size = text_size + size + 1; - if (new_size > text_asize) { - new_size += START_STRSIZE - 1; - new_size &= -START_STRSIZE; - text = realloc(text, new_size); - text_asize = new_size; - } - memcpy(text + text_size, str, size); - text_size += size; - text[text_size] = 0; -} - -static void alloc_string(const char *str, int size) -{ - text = malloc(size + 1); - memcpy(text, str, size); - text[size] = 0; -} - -#define INITIAL 0 -#define COMMAND 1 -#define HELP 2 -#define STRING 3 -#define PARAM 4 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -static int yy_init_globals (void ); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int zconflex_destroy (void ); - -int zconfget_debug (void ); - -void zconfset_debug (int debug_flag ); - -YY_EXTRA_TYPE zconfget_extra (void ); - -void zconfset_extra (YY_EXTRA_TYPE user_defined ); - -FILE *zconfget_in (void ); - -void zconfset_in (FILE * in_str ); - -FILE *zconfget_out (void ); - -void zconfset_out (FILE * out_str ); - -int zconfget_leng (void ); - -char *zconfget_text (void ); - -int zconfget_lineno (void ); - -void zconfset_lineno (int line_number ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int zconfwrap (void ); -#else -extern int zconfwrap (void ); -#endif -#endif - - static void yyunput (int c,char *buf_ptr ); - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (void ); -#else -static int input (void ); -#endif - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else -#define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO do { if (fwrite( zconftext, zconfleng, 1, zconfout )) {} } while (0) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - errno=0; \ - while ( (result = read( fileno(zconfin), (char *) buf, max_size )) < 0 ) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(zconfin); \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int zconflex (void); - -#define YY_DECL int zconflex (void) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after zconftext and zconfleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - - int str = 0; - int ts, i; - - if ( !(yy_init) ) - { - (yy_init) = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! (yy_start) ) - (yy_start) = 1; /* first start state */ - - if ( ! zconfin ) - zconfin = stdin; - - if ( ! zconfout ) - zconfout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - zconfensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - zconf_create_buffer(zconfin,YY_BUF_SIZE ); - } - - zconf_load_buffer_state( ); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = (yy_c_buf_p); - - /* Support of zconftext. */ - *yy_cp = (yy_hold_char); - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = (yy_start); -yy_match: - while ( (yy_current_state = yy_nxt[yy_current_state][ yy_ec[YY_SC_TO_UI(*yy_cp)] ]) > 0 ) - ++yy_cp; - - yy_current_state = -yy_current_state; - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ -case 1: -/* rule 1 can match eol */ -case 2: -/* rule 2 can match eol */ -YY_RULE_SETUP -{ - current_file->lineno++; - return T_EOL; -} - YY_BREAK -case 3: -YY_RULE_SETUP - - YY_BREAK -case 4: -YY_RULE_SETUP -{ - BEGIN(COMMAND); -} - YY_BREAK -case 5: -YY_RULE_SETUP -{ - unput(zconftext[0]); - BEGIN(COMMAND); -} - YY_BREAK - -case 6: -YY_RULE_SETUP -{ - struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng); - BEGIN(PARAM); - current_pos.file = current_file; - current_pos.lineno = current_file->lineno; - if (id && id->flags & TF_COMMAND) { - zconflval.id = id; - return id->token; - } - alloc_string(zconftext, zconfleng); - zconflval.string = text; - return T_WORD; - } - YY_BREAK -case 7: -YY_RULE_SETUP - - YY_BREAK -case 8: -/* rule 8 can match eol */ -YY_RULE_SETUP -{ - BEGIN(INITIAL); - current_file->lineno++; - return T_EOL; - } - YY_BREAK - -case 9: -YY_RULE_SETUP -return T_AND; - YY_BREAK -case 10: -YY_RULE_SETUP -return T_OR; - YY_BREAK -case 11: -YY_RULE_SETUP -return T_OPEN_PAREN; - YY_BREAK -case 12: -YY_RULE_SETUP -return T_CLOSE_PAREN; - YY_BREAK -case 13: -YY_RULE_SETUP -return T_NOT; - YY_BREAK -case 14: -YY_RULE_SETUP -return T_EQUAL; - YY_BREAK -case 15: -YY_RULE_SETUP -return T_UNEQUAL; - YY_BREAK -case 16: -YY_RULE_SETUP -{ - str = zconftext[0]; - new_string(); - BEGIN(STRING); - } - YY_BREAK -case 17: -/* rule 17 can match eol */ -YY_RULE_SETUP -BEGIN(INITIAL); current_file->lineno++; return T_EOL; - YY_BREAK -case 18: -YY_RULE_SETUP -/* ignore */ - YY_BREAK -case 19: -YY_RULE_SETUP -{ - struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng); - if (id && id->flags & TF_PARAM) { - zconflval.id = id; - return id->token; - } - alloc_string(zconftext, zconfleng); - zconflval.string = text; - return T_WORD; - } - YY_BREAK -case 20: -YY_RULE_SETUP -/* comment */ - YY_BREAK -case 21: -/* rule 21 can match eol */ -YY_RULE_SETUP -current_file->lineno++; - YY_BREAK -case 22: -YY_RULE_SETUP - - YY_BREAK -case YY_STATE_EOF(PARAM): -{ - BEGIN(INITIAL); - } - YY_BREAK - -case 23: -/* rule 23 can match eol */ -*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ -(yy_c_buf_p) = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up zconftext again */ -YY_RULE_SETUP -{ - append_string(zconftext, zconfleng); - zconflval.string = text; - return T_WORD_QUOTE; - } - YY_BREAK -case 24: -YY_RULE_SETUP -{ - append_string(zconftext, zconfleng); - } - YY_BREAK -case 25: -/* rule 25 can match eol */ -*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ -(yy_c_buf_p) = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up zconftext again */ -YY_RULE_SETUP -{ - append_string(zconftext + 1, zconfleng - 1); - zconflval.string = text; - return T_WORD_QUOTE; - } - YY_BREAK -case 26: -YY_RULE_SETUP -{ - append_string(zconftext + 1, zconfleng - 1); - } - YY_BREAK -case 27: -YY_RULE_SETUP -{ - if (str == zconftext[0]) { - BEGIN(PARAM); - zconflval.string = text; - return T_WORD_QUOTE; - } else - append_string(zconftext, 1); - } - YY_BREAK -case 28: -/* rule 28 can match eol */ -YY_RULE_SETUP -{ - printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno()); - current_file->lineno++; - BEGIN(INITIAL); - return T_EOL; - } - YY_BREAK -case YY_STATE_EOF(STRING): -{ - BEGIN(INITIAL); - } - YY_BREAK - -case 29: -YY_RULE_SETUP -{ - ts = 0; - for (i = 0; i < zconfleng; i++) { - if (zconftext[i] == '\t') - ts = (ts & ~7) + 8; - else - ts++; - } - last_ts = ts; - if (first_ts) { - if (ts < first_ts) { - zconf_endhelp(); - return T_HELPTEXT; - } - ts -= first_ts; - while (ts > 8) { - append_string(" ", 8); - ts -= 8; - } - append_string(" ", ts); - } - } - YY_BREAK -case 30: -/* rule 30 can match eol */ -*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ -(yy_c_buf_p) = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up zconftext again */ -YY_RULE_SETUP -{ - current_file->lineno++; - zconf_endhelp(); - return T_HELPTEXT; - } - YY_BREAK -case 31: -/* rule 31 can match eol */ -YY_RULE_SETUP -{ - current_file->lineno++; - append_string("\n", 1); - } - YY_BREAK -case 32: -YY_RULE_SETUP -{ - while (zconfleng) { - if ((zconftext[zconfleng-1] != ' ') && (zconftext[zconfleng-1] != '\t')) - break; - zconfleng--; - } - append_string(zconftext, zconfleng); - if (!first_ts) - first_ts = last_ts; - } - YY_BREAK -case YY_STATE_EOF(HELP): -{ - zconf_endhelp(); - return T_HELPTEXT; - } - YY_BREAK - -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(COMMAND): -{ - if (current_file) { - zconf_endfile(); - return T_EOL; - } - fclose(zconfin); - yyterminate(); -} - YY_BREAK -case 33: -YY_RULE_SETUP -YY_FATAL_ERROR( "flex scanner jammed" ); - YY_BREAK - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = (yy_hold_char); - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed zconfin at a new source and called - * zconflex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = zconfin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++(yy_c_buf_p); - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = (yy_c_buf_p); - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_END_OF_FILE: - { - (yy_did_buffer_switch_on_eof) = 0; - - if ( zconfwrap( ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * zconftext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = - (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - (yy_c_buf_p) = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ -} /* end of zconflex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (void) -{ - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = (yytext_ptr); - register int number_to_move, i; - int ret_val; - - if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; - - int yy_c_buf_p_offset = - (int) ((yy_c_buf_p) - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - zconfrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), (size_t) num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - if ( (yy_n_chars) == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - zconfrestart(zconfin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) zconfrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - (yy_n_chars) += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (void) -{ - register yy_state_type yy_current_state; - register char *yy_cp; - - yy_current_state = (yy_start); - - for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) - { - yy_current_state = yy_nxt[yy_current_state][(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1)]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) -{ - register int yy_is_jam; - - yy_current_state = yy_nxt[yy_current_state][1]; - yy_is_jam = (yy_current_state <= 0); - - return yy_is_jam ? 0 : yy_current_state; -} - - static void yyunput (int c, register char * yy_bp ) -{ - register char *yy_cp; - - yy_cp = (yy_c_buf_p); - - /* undo effects of setting up zconftext */ - *yy_cp = (yy_hold_char); - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - register int number_to_move = (yy_n_chars) + 2; - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - register char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - (yytext_ptr) = yy_bp; - (yy_hold_char) = *yy_cp; - (yy_c_buf_p) = yy_cp; -} - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (void) -#else - static int input (void) -#endif - -{ - int c; - - *(yy_c_buf_p) = (yy_hold_char); - - if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - /* This was really a NUL. */ - *(yy_c_buf_p) = '\0'; - - else - { /* need more input */ - int offset = (yy_c_buf_p) - (yytext_ptr); - ++(yy_c_buf_p); - - switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - zconfrestart(zconfin ); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( zconfwrap( ) ) - return EOF; - - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(); -#else - return input(); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + offset; - break; - } - } - } - - c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve zconftext */ - (yy_hold_char) = *++(yy_c_buf_p); - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * - * @note This function does not reset the start condition to @c INITIAL . - */ - void zconfrestart (FILE * input_file ) -{ - - if ( ! YY_CURRENT_BUFFER ){ - zconfensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - zconf_create_buffer(zconfin,YY_BUF_SIZE ); - } - - zconf_init_buffer(YY_CURRENT_BUFFER,input_file ); - zconf_load_buffer_state( ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * - */ - void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer ) -{ - - /* TODO. We should be able to replace this entire function body - * with - * zconfpop_buffer_state(); - * zconfpush_buffer_state(new_buffer); - */ - zconfensure_buffer_stack (); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - zconf_load_buffer_state( ); - - /* We don't actually know whether we did this switch during - * EOF (zconfwrap()) processing, but the only time this flag - * is looked at is after zconfwrap() is called, so it's safe - * to go ahead and always set it. - */ - (yy_did_buffer_switch_on_eof) = 1; -} - -static void zconf_load_buffer_state (void) -{ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - zconfin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - (yy_hold_char) = *(yy_c_buf_p); -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * - * @return the allocated buffer state. - */ - YY_BUFFER_STATE zconf_create_buffer (FILE * file, int size ) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) zconfalloc(b->yy_buf_size + 2 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - zconf_init_buffer(b,file ); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with zconf_create_buffer() - * - */ - void zconf_delete_buffer (YY_BUFFER_STATE b ) -{ - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - zconffree((void *) b->yy_ch_buf ); - - zconffree((void *) b ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a zconfrestart() or at EOF. - */ - static void zconf_init_buffer (YY_BUFFER_STATE b, FILE * file ) - -{ - int oerrno = errno; - - zconf_flush_buffer(b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then zconf_init_buffer was _probably_ - * called from zconfrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * - */ - void zconf_flush_buffer (YY_BUFFER_STATE b ) -{ - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - zconf_load_buffer_state( ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * - */ -void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer ) -{ - if (new_buffer == NULL) - return; - - zconfensure_buffer_stack(); - - /* This block is copied from zconf_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - (yy_buffer_stack_top)++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from zconf_switch_to_buffer. */ - zconf_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * - */ -void zconfpop_buffer_state (void) -{ - if (!YY_CURRENT_BUFFER) - return; - - zconf_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - zconf_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void zconfensure_buffer_stack (void) -{ - int num_to_alloc; - - if (!(yy_buffer_stack)) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; - (yy_buffer_stack) = (struct yy_buffer_state**)zconfalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in zconfensure_buffer_stack()" ); - - memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - (yy_buffer_stack_max) = num_to_alloc; - (yy_buffer_stack_top) = 0; - return; - } - - if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**)zconfrealloc - ((yy_buffer_stack), - num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in zconfensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); - (yy_buffer_stack_max) = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size ) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - zconf_switch_to_buffer(b ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to zconflex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * zconf_scan_bytes() instead. - */ -YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr ) -{ - - return zconf_scan_bytes(yystr,strlen(yystr) ); -} - -/** Setup the input buffer state to scan the given bytes. The next call to zconflex() will - * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE zconf_scan_bytes (yyconst char * yybytes, int _yybytes_len ) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) zconfalloc(n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = zconf_scan_buffer(buf,n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in zconf_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yy_fatal_error (yyconst char* msg ) -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up zconftext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - zconftext[zconfleng] = (yy_hold_char); \ - (yy_c_buf_p) = zconftext + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - zconfleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the current line number. - * - */ -int zconfget_lineno (void) -{ - - return zconflineno; -} - -/** Get the input stream. - * - */ -FILE *zconfget_in (void) -{ - return zconfin; -} - -/** Get the output stream. - * - */ -FILE *zconfget_out (void) -{ - return zconfout; -} - -/** Get the length of the current token. - * - */ -int zconfget_leng (void) -{ - return zconfleng; -} - -/** Get the current token. - * - */ - -char *zconfget_text (void) -{ - return zconftext; -} - -/** Set the current line number. - * @param line_number - * - */ -void zconfset_lineno (int line_number ) -{ - - zconflineno = line_number; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param in_str A readable stream. - * - * @see zconf_switch_to_buffer - */ -void zconfset_in (FILE * in_str ) -{ - zconfin = in_str ; -} - -void zconfset_out (FILE * out_str ) -{ - zconfout = out_str ; -} - -int zconfget_debug (void) -{ - return zconf_flex_debug; -} - -void zconfset_debug (int bdebug ) -{ - zconf_flex_debug = bdebug ; -} - -static int yy_init_globals (void) -{ - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from zconflex_destroy(), so don't allocate here. - */ - - (yy_buffer_stack) = 0; - (yy_buffer_stack_top) = 0; - (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; - (yy_init) = 0; - (yy_start) = 0; - -/* Defined in main.c */ -#ifdef YY_STDINIT - zconfin = stdin; - zconfout = stdout; -#else - zconfin = (FILE *) 0; - zconfout = (FILE *) 0; -#endif - - /* For future reference: Set errno on error, since we are called by - * zconflex_init() - */ - return 0; -} - -/* zconflex_destroy is for both reentrant and non-reentrant scanners. */ -int zconflex_destroy (void) -{ - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - zconf_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - zconfpop_buffer_state(); - } - - /* Destroy the stack itself. */ - zconffree((yy_buffer_stack) ); - (yy_buffer_stack) = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * zconflex() is called, initialization will occur. */ - yy_init_globals( ); - - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) -{ - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s ) -{ - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *zconfalloc (yy_size_t size ) -{ - return (void *) malloc( size ); -} - -void *zconfrealloc (void * ptr, yy_size_t size ) -{ - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); -} - -void zconffree (void * ptr ) -{ - free( (char *) ptr ); /* see zconfrealloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -void zconf_starthelp(void) -{ - new_string(); - last_ts = first_ts = 0; - BEGIN(HELP); -} - -static void zconf_endhelp(void) -{ - zconflval.string = text; - BEGIN(INITIAL); -} - -/* - * Try to open specified file with following names: - * ./name - * $(srctree)/name - * The latter is used when srctree is separate from objtree - * when compiling the kernel. - * Return NULL if file is not found. - */ -FILE *zconf_fopen(const char *name) -{ - char *env, fullname[PATH_MAX+1]; - FILE *f; - - f = fopen(name, "r"); - if (!f && name != NULL && name[0] != '/') { - env = getenv(SRCTREE); - if (env) { - sprintf(fullname, "%s/%s", env, name); - f = fopen(fullname, "r"); - } - } - return f; -} - -void zconf_initscan(const char *name) -{ - zconfin = zconf_fopen(name); - if (!zconfin) { - printf("can't find file %s\n", name); - exit(1); - } - - current_buf = malloc(sizeof(*current_buf)); - memset(current_buf, 0, sizeof(*current_buf)); - - current_file = file_lookup(name); - current_file->lineno = 1; - current_file->flags = FILE_BUSY; -} - -void zconf_nextfile(const char *name) -{ - struct file *file = file_lookup(name); - struct buffer *buf = malloc(sizeof(*buf)); - memset(buf, 0, sizeof(*buf)); - - current_buf->state = YY_CURRENT_BUFFER; - zconfin = zconf_fopen(file->name); - if (!zconfin) { - printf("%s:%d: can't open file \"%s\"\n", - zconf_curname(), zconf_lineno(), file->name); - exit(1); - } - zconf_switch_to_buffer(zconf_create_buffer(zconfin,YY_BUF_SIZE)); - buf->parent = current_buf; - current_buf = buf; - - if (file->flags & FILE_BUSY) { - printf("%s:%d: do not source '%s' from itself\n", - zconf_curname(), zconf_lineno(), name); - exit(1); - } - if (file->flags & FILE_SCANNED) { - printf("%s:%d: file '%s' is already sourced from '%s'\n", - zconf_curname(), zconf_lineno(), name, - file->parent->name); - exit(1); - } - file->flags |= FILE_BUSY; - file->lineno = 1; - file->parent = current_file; - current_file = file; -} - -static void zconf_endfile(void) -{ - struct buffer *parent; - - current_file->flags |= FILE_SCANNED; - current_file->flags &= ~FILE_BUSY; - current_file = current_file->parent; - - parent = current_buf->parent; - if (parent) { - fclose(zconfin); - zconf_delete_buffer(YY_CURRENT_BUFFER); - zconf_switch_to_buffer(parent->state); - } - free(current_buf); - current_buf = parent; -} - -int zconf_lineno(void) -{ - return current_pos.lineno; -} - -const char *zconf_curname(void) -{ - return current_pos.file ? current_pos.file->name : ""; -} - diff --git a/package/config/lkc.h b/package/config/lkc.h deleted file mode 100644 index e899066..0000000 --- a/package/config/lkc.h +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright (C) 2002 Roman Zippel - * Released under the terms of the GNU GPL v2.0. - */ - -#ifndef LKC_H -#define LKC_H - -#include "expr.h" - -#ifndef KBUILD_NO_NLS -# include -#else -static inline const char *gettext(const char *txt) { return txt; } -static inline void textdomain(const char *domainname) {} -static inline void bindtextdomain(const char *name, const char *dir) {} -static inline char *bind_textdomain_codeset(const char *dn, char *c) { return c; } -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef LKC_DIRECT_LINK -#define P(name,type,arg) extern type name arg -#else -#include "lkc_defs.h" -#define P(name,type,arg) extern type (*name ## _p) arg -#endif -#include "lkc_proto.h" -#undef P - -#define SRCTREE "srctree" - -#ifndef PACKAGE -#define PACKAGE "linux" -#endif - -#define LOCALEDIR "/usr/share/locale" - -#define _(text) gettext(text) -#define N_(text) (text) - -#ifndef CONFIG_ -#define CONFIG_ "BR2_" -#endif - -#define TF_COMMAND 0x0001 -#define TF_PARAM 0x0002 -#define TF_OPTION 0x0004 - -enum conf_def_mode { - def_default, - def_yes, - def_mod, - def_no, - def_random -}; - -#define T_OPT_MODULES 1 -#define T_OPT_DEFCONFIG_LIST 2 -#define T_OPT_ENV 3 - -struct kconf_id { - int name; - int token; - unsigned int flags; - enum symbol_type stype; -}; - -#ifdef YYDEBUG -extern int zconfdebug; -#endif - -int zconfparse(void); -void zconfdump(FILE *out); -void zconf_starthelp(void); -FILE *zconf_fopen(const char *name); -void zconf_initscan(const char *name); -void zconf_nextfile(const char *name); -int zconf_lineno(void); -const char *zconf_curname(void); - -/* conf.c */ -void xfgets(char *str, int size, FILE *in); - -/* confdata.c */ -const char *conf_get_configname(void); -const char *conf_get_autoconfig_name(void); -char *conf_get_default_confname(void); -void sym_set_change_count(int count); -void sym_add_change_count(int count); -void conf_set_all_new_symbols(enum conf_def_mode mode); - -/* confdata.c and expr.c */ -static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out) -{ - if (fwrite(str, len, count, out) < count) - fprintf(stderr, "\nError in writing or end of file.\n"); -} - -/* kconfig_load.c */ -void kconfig_load(void); - -/* menu.c */ -void _menu_init(void); -void menu_warn(struct menu *menu, const char *fmt, ...); -struct menu *menu_add_menu(void); -void menu_end_menu(void); -void menu_add_entry(struct symbol *sym); -void menu_end_entry(void); -void menu_add_dep(struct expr *dep); -void menu_add_visibility(struct expr *dep); -struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, 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_add_option(int token, char *arg); -void menu_finalize(struct menu *parent); -void menu_set_type(int type); - -/* util.c */ -struct file *file_lookup(const char *name); -int file_write_dep(const char *name); - -struct gstr { - size_t len; - char *s; - /* - * when max_width is not zero long lines in string s (if any) get - * wrapped not to exceed the max_width value - */ - int max_width; -}; -struct gstr str_new(void); -struct gstr str_assign(const char *s); -void str_free(struct gstr *gs); -void str_append(struct gstr *gs, const char *s); -void str_printf(struct gstr *gs, const char *fmt, ...); -const char *str_get(struct gstr *gs); - -/* symbol.c */ -extern struct expr *sym_env_list; - -void sym_init(void); -void sym_clear_all_valid(void); -void sym_set_all_changed(void); -void sym_set_changed(struct symbol *sym); -struct symbol *sym_choice_default(struct symbol *sym); -const char *sym_get_string_default(struct symbol *sym); -struct symbol *sym_check_deps(struct symbol *sym); -struct property *prop_alloc(enum prop_type type, struct symbol *sym); -struct symbol *prop_get_symbol(struct property *prop); -struct property *sym_get_env_prop(struct symbol *sym); - -static inline tristate sym_get_tristate_value(struct symbol *sym) -{ - return sym->curr.tri; -} - - -static inline struct symbol *sym_get_choice_value(struct symbol *sym) -{ - return (struct symbol *)sym->curr.val; -} - -static inline bool sym_set_choice_value(struct symbol *ch, struct symbol *chval) -{ - return sym_set_tristate_value(chval, yes); -} - -static inline bool sym_is_choice(struct symbol *sym) -{ - return sym->flags & SYMBOL_CHOICE ? true : false; -} - -static inline bool sym_is_choice_value(struct symbol *sym) -{ - return sym->flags & SYMBOL_CHOICEVAL ? true : false; -} - -static inline bool sym_is_optional(struct symbol *sym) -{ - return sym->flags & SYMBOL_OPTIONAL ? true : false; -} - -static inline bool sym_has_value(struct symbol *sym) -{ - return sym->flags & SYMBOL_DEF_USER ? true : false; -} - -#ifdef __cplusplus -} -#endif - -#endif /* LKC_H */ diff --git a/package/config/lkc_proto.h b/package/config/lkc_proto.h deleted file mode 100644 index 17342fe..0000000 --- a/package/config/lkc_proto.h +++ /dev/null @@ -1,53 +0,0 @@ -#include - -/* confdata.c */ -P(conf_parse,void,(const char *name)); -P(conf_read,int,(const char *name)); -P(conf_read_simple,int,(const char *name, int)); -P(conf_write_defconfig,int,(const char *name)); -P(conf_write,int,(const char *name)); -P(conf_write_autoconf,int,(void)); -P(conf_get_changed,bool,(void)); -P(conf_set_changed_callback, void,(void (*fn)(void))); -P(conf_set_message_callback, void,(void (*fn)(const char *fmt, va_list ap))); - -/* menu.c */ -P(rootmenu,struct menu,); - -P(menu_is_visible, bool, (struct menu *menu)); -P(menu_has_prompt, bool, (struct menu *menu)); -P(menu_get_prompt,const char *,(struct menu *menu)); -P(menu_get_root_menu,struct menu *,(struct menu *menu)); -P(menu_get_parent_menu,struct menu *,(struct menu *menu)); -P(menu_has_help,bool,(struct menu *menu)); -P(menu_get_help,const char *,(struct menu *menu)); -P(get_symbol_str, void, (struct gstr *r, struct symbol *sym)); -P(get_relations_str, struct gstr, (struct symbol **sym_arr)); -P(menu_get_ext_help,void,(struct menu *menu, struct gstr *help)); - -/* symbol.c */ -P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]); - -P(sym_lookup,struct symbol *,(const char *name, int flags)); -P(sym_find,struct symbol *,(const char *name)); -P(sym_expand_string_value,const char *,(const char *in)); -P(sym_re_search,struct symbol **,(const char *pattern)); -P(sym_type_name,const char *,(enum symbol_type type)); -P(sym_calc_value,void,(struct symbol *sym)); -P(sym_get_type,enum symbol_type,(struct symbol *sym)); -P(sym_tristate_within_range,bool,(struct symbol *sym,tristate tri)); -P(sym_set_tristate_value,bool,(struct symbol *sym,tristate tri)); -P(sym_toggle_tristate_value,tristate,(struct symbol *sym)); -P(sym_string_valid,bool,(struct symbol *sym, const char *newval)); -P(sym_string_within_range,bool,(struct symbol *sym, const char *str)); -P(sym_set_string_value,bool,(struct symbol *sym, const char *newval)); -P(sym_is_changable,bool,(struct symbol *sym)); -P(sym_get_choice_prop,struct property *,(struct symbol *sym)); -P(sym_get_default_prop,struct property *,(struct symbol *sym)); -P(sym_get_string_value,const char *,(struct symbol *sym)); - -P(prop_get_type_name,const char *,(enum prop_type type)); - -/* expr.c */ -P(expr_compare_type,int,(enum expr_type t1, enum expr_type t2)); -P(expr_print,void,(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken)); diff --git a/package/config/lxdialog/.gitignore b/package/config/lxdialog/.gitignore deleted file mode 100644 index 90b08ff..0000000 --- a/package/config/lxdialog/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# -# Generated files -# -lxdialog diff --git a/package/config/lxdialog/BIG.FAT.WARNING b/package/config/lxdialog/BIG.FAT.WARNING deleted file mode 100644 index a8999d8..0000000 --- a/package/config/lxdialog/BIG.FAT.WARNING +++ /dev/null @@ -1,4 +0,0 @@ -This is NOT the official version of dialog. This version has been -significantly modified from the original. It is for use by the Linux -kernel configuration script. Please do not bother Savio Lam with -questions about this program. diff --git a/package/config/lxdialog/check-lxdialog.sh b/package/config/lxdialog/check-lxdialog.sh deleted file mode 100644 index 969cd4c..0000000 --- a/package/config/lxdialog/check-lxdialog.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/sh -# Check ncurses compatibility - -# What library to link -ldflags() -{ - for ext in so a dylib ; do - for lib in ncursesw ncurses curses ; do - $cc -print-file-name=lib${lib}.${ext} | grep -q / - if [ $? -eq 0 ]; then - echo "-l${lib}" - exit - fi - done - done - exit 1 -} - -# Where is ncurses.h? -ccflags() -{ - if [ -f /usr/include/ncurses/ncurses.h ]; then - echo '-I/usr/include/ncurses -DCURSES_LOC=""' - elif [ -f /usr/include/ncurses/curses.h ]; then - echo '-I/usr/include/ncurses -DCURSES_LOC=""' - elif [ -f /usr/include/ncursesw/curses.h ]; then - echo '-I/usr/include/ncursesw -DCURSES_LOC=""' - elif [ -f /usr/include/ncurses.h ]; then - echo '-DCURSES_LOC=""' - else - echo '-DCURSES_LOC=""' - fi -} - -# Temp file, try to clean up after us -tmp=$(mktemp) -trap "rm -f $tmp" 0 1 2 3 15 - -# Check if we can link to ncurses -check() { - $cc -xc - -o $tmp 2>/dev/null <<'EOF' -#include CURSES_LOC -main() {} -EOF - if [ $? != 0 ]; then - echo " *** Unable to find the ncurses libraries or the" 1>&2 - echo " *** required header files." 1>&2 - echo " *** 'make menuconfig' requires the ncurses libraries." 1>&2 - echo " *** " 1>&2 - echo " *** Install ncurses (ncurses-devel) and try again." 1>&2 - echo " *** " 1>&2 - exit 1 - fi -} - -usage() { - printf "Usage: $0 [-check compiler options|-ccflags|-ldflags compiler options]\n" -} - -if [ $# -eq 0 ]; then - usage - exit 1 -fi - -cc="" -case "$1" in - "-check") - shift - cc="$@" - check - ;; - "-ccflags") - ccflags - ;; - "-ldflags") - shift - cc="$@" - ldflags - ;; - "*") - usage - exit 1 - ;; -esac diff --git a/package/config/lxdialog/checklist.c b/package/config/lxdialog/checklist.c deleted file mode 100644 index a2eb80f..0000000 --- a/package/config/lxdialog/checklist.c +++ /dev/null @@ -1,332 +0,0 @@ -/* - * checklist.c -- implements the checklist box - * - * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) - * Stuart Herbert - S.Herbert@sheffield.ac.uk: radiolist extension - * Alessandro Rubini - rubini@ipvvis.unipv.it: merged the two - * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "dialog.h" - -static int list_width, check_x, item_x; - -/* - * Print list item - */ -static void print_item(WINDOW * win, int choice, int selected) -{ - int i; - char *list_item = malloc(list_width + 1); - - strncpy(list_item, item_str(), list_width - item_x); - list_item[list_width - item_x] = '\0'; - - /* Clear 'residue' of last item */ - wattrset(win, dlg.menubox.atr); - wmove(win, choice, 0); - for (i = 0; i < list_width; i++) - waddch(win, ' '); - - wmove(win, choice, check_x); - wattrset(win, selected ? dlg.check_selected.atr - : dlg.check.atr); - if (!item_is_tag(':')) - wprintw(win, "(%c)", item_is_tag('X') ? 'X' : ' '); - - wattrset(win, selected ? dlg.tag_selected.atr : dlg.tag.atr); - mvwaddch(win, choice, item_x, list_item[0]); - wattrset(win, selected ? dlg.item_selected.atr : dlg.item.atr); - waddstr(win, list_item + 1); - if (selected) { - wmove(win, choice, check_x + 1); - wrefresh(win); - } - free(list_item); -} - -/* - * Print the scroll indicators. - */ -static void print_arrows(WINDOW * win, int choice, int item_no, int scroll, - int y, int x, int height) -{ - wmove(win, y, x); - - if (scroll > 0) { - wattrset(win, dlg.uarrow.atr); - waddch(win, ACS_UARROW); - waddstr(win, "(-)"); - } else { - wattrset(win, dlg.menubox.atr); - waddch(win, ACS_HLINE); - waddch(win, ACS_HLINE); - waddch(win, ACS_HLINE); - waddch(win, ACS_HLINE); - } - - y = y + height + 1; - wmove(win, y, x); - - if ((height < item_no) && (scroll + choice < item_no - 1)) { - wattrset(win, dlg.darrow.atr); - waddch(win, ACS_DARROW); - waddstr(win, "(+)"); - } else { - wattrset(win, dlg.menubox_border.atr); - waddch(win, ACS_HLINE); - waddch(win, ACS_HLINE); - waddch(win, ACS_HLINE); - waddch(win, ACS_HLINE); - } -} - -/* - * Display the termination buttons - */ -static void print_buttons(WINDOW * dialog, int height, int width, int selected) -{ - int x = width / 2 - 11; - int y = height - 2; - - print_button(dialog, gettext("Select"), y, x, selected == 0); - print_button(dialog, gettext(" Help "), y, x + 14, selected == 1); - - wmove(dialog, y, x + 1 + 14 * selected); - wrefresh(dialog); -} - -/* - * Display a dialog box with a list of options that can be turned on or off - * in the style of radiolist (only one option turned on at a time). - */ -int dialog_checklist(const char *title, const char *prompt, int height, - int width, int list_height) -{ - int i, x, y, box_x, box_y; - int key = 0, button = 0, choice = 0, scroll = 0, max_choice; - WINDOW *dialog, *list; - - /* which item to highlight */ - item_foreach() { - if (item_is_tag('X')) - choice = item_n(); - if (item_is_selected()) { - choice = item_n(); - break; - } - } - -do_resize: - if (getmaxy(stdscr) < (height + 6)) - return -ERRDISPLAYTOOSMALL; - if (getmaxx(stdscr) < (width + 6)) - return -ERRDISPLAYTOOSMALL; - - max_choice = MIN(list_height, item_count()); - - /* center dialog box on screen */ - x = (COLS - width) / 2; - y = (LINES - height) / 2; - - draw_shadow(stdscr, y, x, height, width); - - dialog = newwin(height, width, y, x); - keypad(dialog, TRUE); - - draw_box(dialog, 0, 0, height, width, - dlg.dialog.atr, dlg.border.atr); - wattrset(dialog, dlg.border.atr); - mvwaddch(dialog, height - 3, 0, ACS_LTEE); - for (i = 0; i < width - 2; i++) - waddch(dialog, ACS_HLINE); - wattrset(dialog, dlg.dialog.atr); - waddch(dialog, ACS_RTEE); - - print_title(dialog, title, width); - - wattrset(dialog, dlg.dialog.atr); - print_autowrap(dialog, prompt, width - 2, 1, 3); - - list_width = width - 6; - box_y = height - list_height - 5; - box_x = (width - list_width) / 2 - 1; - - /* create new window for the list */ - list = subwin(dialog, list_height, list_width, y + box_y + 1, - x + box_x + 1); - - keypad(list, TRUE); - - /* draw a box around the list items */ - draw_box(dialog, box_y, box_x, list_height + 2, list_width + 2, - dlg.menubox_border.atr, dlg.menubox.atr); - - /* Find length of longest item in order to center checklist */ - check_x = 0; - item_foreach() - check_x = MAX(check_x, strlen(item_str()) + 4); - check_x = MIN(check_x, list_width); - - check_x = (list_width - check_x) / 2; - item_x = check_x + 4; - - if (choice >= list_height) { - scroll = choice - list_height + 1; - choice -= scroll; - } - - /* Print the list */ - for (i = 0; i < max_choice; i++) { - item_set(scroll + i); - print_item(list, i, i == choice); - } - - print_arrows(dialog, choice, item_count(), scroll, - box_y, box_x + check_x + 5, list_height); - - print_buttons(dialog, height, width, 0); - - wnoutrefresh(dialog); - wnoutrefresh(list); - doupdate(); - - while (key != KEY_ESC) { - key = wgetch(dialog); - - for (i = 0; i < max_choice; i++) { - item_set(i + scroll); - if (toupper(key) == toupper(item_str()[0])) - break; - } - - if (i < max_choice || key == KEY_UP || key == KEY_DOWN || - key == '+' || key == '-') { - if (key == KEY_UP || key == '-') { - if (!choice) { - if (!scroll) - continue; - /* Scroll list down */ - if (list_height > 1) { - /* De-highlight current first item */ - item_set(scroll); - print_item(list, 0, FALSE); - scrollok(list, TRUE); - wscrl(list, -1); - scrollok(list, FALSE); - } - scroll--; - item_set(scroll); - print_item(list, 0, TRUE); - print_arrows(dialog, choice, item_count(), - scroll, box_y, box_x + check_x + 5, list_height); - - wnoutrefresh(dialog); - wrefresh(list); - - continue; /* wait for another key press */ - } else - i = choice - 1; - } else if (key == KEY_DOWN || key == '+') { - if (choice == max_choice - 1) { - if (scroll + choice >= item_count() - 1) - continue; - /* Scroll list up */ - if (list_height > 1) { - /* De-highlight current last item before scrolling up */ - item_set(scroll + max_choice - 1); - print_item(list, - max_choice - 1, - FALSE); - scrollok(list, TRUE); - wscrl(list, 1); - scrollok(list, FALSE); - } - scroll++; - item_set(scroll + max_choice - 1); - print_item(list, max_choice - 1, TRUE); - - print_arrows(dialog, choice, item_count(), - scroll, box_y, box_x + check_x + 5, list_height); - - wnoutrefresh(dialog); - wrefresh(list); - - continue; /* wait for another key press */ - } else - i = choice + 1; - } - if (i != choice) { - /* De-highlight current item */ - item_set(scroll + choice); - print_item(list, choice, FALSE); - /* Highlight new item */ - choice = i; - item_set(scroll + choice); - print_item(list, choice, TRUE); - wnoutrefresh(dialog); - wrefresh(list); - } - continue; /* wait for another key press */ - } - switch (key) { - case 'H': - case 'h': - case '?': - button = 1; - /* fall-through */ - case 'S': - case 's': - case ' ': - case '\n': - item_foreach() - item_set_selected(0); - item_set(scroll + choice); - item_set_selected(1); - delwin(list); - delwin(dialog); - return button; - case TAB: - case KEY_LEFT: - case KEY_RIGHT: - button = ((key == KEY_LEFT ? --button : ++button) < 0) - ? 1 : (button > 1 ? 0 : button); - - print_buttons(dialog, height, width, button); - wrefresh(dialog); - break; - case 'X': - case 'x': - key = KEY_ESC; - break; - case KEY_ESC: - key = on_key_esc(dialog); - break; - case KEY_RESIZE: - delwin(list); - delwin(dialog); - on_key_resize(); - goto do_resize; - } - - /* Now, update everything... */ - doupdate(); - } - delwin(list); - delwin(dialog); - return key; /* ESC pressed */ -} diff --git a/package/config/lxdialog/dialog.h b/package/config/lxdialog/dialog.h deleted file mode 100644 index b5211fc..0000000 --- a/package/config/lxdialog/dialog.h +++ /dev/null @@ -1,230 +0,0 @@ -/* - * dialog.h -- common declarations for all dialog modules - * - * AUTHOR: Savio Lam (lam836@cs.cuhk.hk) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include -#include -#include -#include - -#ifndef KBUILD_NO_NLS -# include -#else -# define gettext(Msgid) ((const char *) (Msgid)) -#endif - -#ifdef __sun__ -#define CURS_MACROS -#endif -#include CURSES_LOC - -/* - * Colors in ncurses 1.9.9e do not work properly since foreground and - * background colors are OR'd rather than separately masked. This version - * of dialog was hacked to work with ncurses 1.9.9e, making it incompatible - * with standard curses. The simplest fix (to make this work with standard - * curses) uses the wbkgdset() function, not used in the original hack. - * Turn it off if we're building with 1.9.9e, since it just confuses things. - */ -#if defined(NCURSES_VERSION) && defined(_NEED_WRAP) && !defined(GCC_PRINTFLIKE) -#define OLD_NCURSES 1 -#undef wbkgdset -#define wbkgdset(w,p) /*nothing */ -#else -#define OLD_NCURSES 0 -#endif - -#define TR(params) _tracef params - -#define KEY_ESC 27 -#define TAB 9 -#define MAX_LEN 2048 -#define BUF_SIZE (10*1024) -#define MIN(x,y) (x < y ? x : y) -#define MAX(x,y) (x > y ? x : y) - -#ifndef ACS_ULCORNER -#define ACS_ULCORNER '+' -#endif -#ifndef ACS_LLCORNER -#define ACS_LLCORNER '+' -#endif -#ifndef ACS_URCORNER -#define ACS_URCORNER '+' -#endif -#ifndef ACS_LRCORNER -#define ACS_LRCORNER '+' -#endif -#ifndef ACS_HLINE -#define ACS_HLINE '-' -#endif -#ifndef ACS_VLINE -#define ACS_VLINE '|' -#endif -#ifndef ACS_LTEE -#define ACS_LTEE '+' -#endif -#ifndef ACS_RTEE -#define ACS_RTEE '+' -#endif -#ifndef ACS_UARROW -#define ACS_UARROW '^' -#endif -#ifndef ACS_DARROW -#define ACS_DARROW 'v' -#endif - -/* error return codes */ -#define ERRDISPLAYTOOSMALL (KEY_MAX + 1) - -/* - * Color definitions - */ -struct dialog_color { - chtype atr; /* Color attribute */ - int fg; /* foreground */ - int bg; /* background */ - int hl; /* highlight this item */ -}; - -struct dialog_info { - const char *backtitle; - struct dialog_color screen; - struct dialog_color shadow; - struct dialog_color dialog; - struct dialog_color title; - struct dialog_color border; - struct dialog_color button_active; - struct dialog_color button_inactive; - struct dialog_color button_key_active; - struct dialog_color button_key_inactive; - struct dialog_color button_label_active; - struct dialog_color button_label_inactive; - struct dialog_color inputbox; - struct dialog_color inputbox_border; - struct dialog_color searchbox; - struct dialog_color searchbox_title; - struct dialog_color searchbox_border; - struct dialog_color position_indicator; - struct dialog_color menubox; - struct dialog_color menubox_border; - struct dialog_color item; - struct dialog_color item_selected; - struct dialog_color tag; - struct dialog_color tag_selected; - struct dialog_color tag_key; - struct dialog_color tag_key_selected; - struct dialog_color check; - struct dialog_color check_selected; - struct dialog_color uarrow; - struct dialog_color darrow; -}; - -/* - * Global variables - */ -extern struct dialog_info dlg; -extern char dialog_input_result[]; - -/* - * Function prototypes - */ - -/* item list as used by checklist and menubox */ -void item_reset(void); -void item_make(const char *fmt, ...); -void item_add_str(const char *fmt, ...); -void item_set_tag(char tag); -void item_set_data(void *p); -void item_set_selected(int val); -int item_activate_selected(void); -void *item_data(void); -char item_tag(void); - -/* item list manipulation for lxdialog use */ -#define MAXITEMSTR 200 -struct dialog_item { - char str[MAXITEMSTR]; /* promtp displayed */ - char tag; - void *data; /* pointer to menu item - used by menubox+checklist */ - int selected; /* Set to 1 by dialog_*() function if selected. */ -}; - -/* list of lialog_items */ -struct dialog_list { - struct dialog_item node; - struct dialog_list *next; -}; - -extern struct dialog_list *item_cur; -extern struct dialog_list item_nil; -extern struct dialog_list *item_head; - -int item_count(void); -void item_set(int n); -int item_n(void); -const char *item_str(void); -int item_is_selected(void); -int item_is_tag(char tag); -#define item_foreach() \ - for (item_cur = item_head ? item_head: item_cur; \ - item_cur && (item_cur != &item_nil); item_cur = item_cur->next) - -/* generic key handlers */ -int on_key_esc(WINDOW *win); -int on_key_resize(void); - -int init_dialog(const char *backtitle); -void set_dialog_backtitle(const char *backtitle); -void end_dialog(int x, int y); -void attr_clear(WINDOW * win, int height, int width, chtype attr); -void dialog_clear(void); -void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x); -void print_button(WINDOW * win, const char *label, int y, int x, int selected); -void print_title(WINDOW *dialog, const char *title, int width); -void draw_box(WINDOW * win, int y, int x, int height, int width, chtype box, - chtype border); -void draw_shadow(WINDOW * win, int y, int x, int height, int width); - -int first_alpha(const char *string, const char *exempt); -int dialog_yesno(const char *title, const char *prompt, int height, int width); -int dialog_msgbox(const char *title, const char *prompt, int height, - int width, int pause); -int dialog_textbox(const char *title, const char *file, int height, int width); -int dialog_menu(const char *title, const char *prompt, - const void *selected, int *s_scroll); -int dialog_checklist(const char *title, const char *prompt, int height, - int width, int list_height); -extern char dialog_input_result[]; -int dialog_inputbox(const char *title, const char *prompt, int height, - int width, const char *init); - -/* - * This is the base for fictitious keys, which activate - * the buttons. - * - * Mouse-generated keys are the following: - * -- the first 32 are used as numbers, in addition to '0'-'9' - * -- the lowercase are used to signal mouse-enter events (M_EVENT + 'o') - * -- uppercase chars are used to invoke the button (M_EVENT + 'O') - */ -#define M_EVENT (KEY_MAX+1) diff --git a/package/config/lxdialog/inputbox.c b/package/config/lxdialog/inputbox.c deleted file mode 100644 index dd8e587..0000000 --- a/package/config/lxdialog/inputbox.c +++ /dev/null @@ -1,238 +0,0 @@ -/* - * inputbox.c -- implements the input box - * - * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) - * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "dialog.h" - -char dialog_input_result[MAX_LEN + 1]; - -/* - * Print the termination buttons - */ -static void print_buttons(WINDOW * dialog, int height, int width, int selected) -{ - int x = width / 2 - 11; - int y = height - 2; - - print_button(dialog, gettext(" Ok "), y, x, selected == 0); - print_button(dialog, gettext(" Help "), y, x + 14, selected == 1); - - wmove(dialog, y, x + 1 + 14 * selected); - wrefresh(dialog); -} - -/* - * Display a dialog box for inputing a string - */ -int dialog_inputbox(const char *title, const char *prompt, int height, int width, - const char *init) -{ - int i, x, y, box_y, box_x, box_width; - int input_x = 0, scroll = 0, key = 0, button = -1; - char *instr = dialog_input_result; - WINDOW *dialog; - - if (!init) - instr[0] = '\0'; - else - strcpy(instr, init); - -do_resize: - if (getmaxy(stdscr) <= (height - 2)) - return -ERRDISPLAYTOOSMALL; - if (getmaxx(stdscr) <= (width - 2)) - return -ERRDISPLAYTOOSMALL; - - /* center dialog box on screen */ - x = (COLS - width) / 2; - y = (LINES - height) / 2; - - draw_shadow(stdscr, y, x, height, width); - - dialog = newwin(height, width, y, x); - keypad(dialog, TRUE); - - draw_box(dialog, 0, 0, height, width, - dlg.dialog.atr, dlg.border.atr); - wattrset(dialog, dlg.border.atr); - mvwaddch(dialog, height - 3, 0, ACS_LTEE); - for (i = 0; i < width - 2; i++) - waddch(dialog, ACS_HLINE); - wattrset(dialog, dlg.dialog.atr); - waddch(dialog, ACS_RTEE); - - print_title(dialog, title, width); - - wattrset(dialog, dlg.dialog.atr); - print_autowrap(dialog, prompt, width - 2, 1, 3); - - /* Draw the input field box */ - box_width = width - 6; - getyx(dialog, y, x); - box_y = y + 2; - box_x = (width - box_width) / 2; - draw_box(dialog, y + 1, box_x - 1, 3, box_width + 2, - dlg.dialog.atr, dlg.border.atr); - - print_buttons(dialog, height, width, 0); - - /* Set up the initial value */ - wmove(dialog, box_y, box_x); - wattrset(dialog, dlg.inputbox.atr); - - input_x = strlen(instr); - - if (input_x >= box_width) { - scroll = input_x - box_width + 1; - input_x = box_width - 1; - for (i = 0; i < box_width - 1; i++) - waddch(dialog, instr[scroll + i]); - } else { - waddstr(dialog, instr); - } - - wmove(dialog, box_y, box_x + input_x); - - wrefresh(dialog); - - while (key != KEY_ESC) { - key = wgetch(dialog); - - if (button == -1) { /* Input box selected */ - switch (key) { - case TAB: - case KEY_UP: - case KEY_DOWN: - break; - case KEY_LEFT: - continue; - case KEY_RIGHT: - continue; - case KEY_BACKSPACE: - case 127: - if (input_x || scroll) { - wattrset(dialog, dlg.inputbox.atr); - if (!input_x) { - scroll = scroll < box_width - 1 ? 0 : scroll - (box_width - 1); - wmove(dialog, box_y, box_x); - for (i = 0; i < box_width; i++) - waddch(dialog, - instr[scroll + input_x + i] ? - instr[scroll + input_x + i] : ' '); - input_x = strlen(instr) - scroll; - } else - input_x--; - instr[scroll + input_x] = '\0'; - mvwaddch(dialog, box_y, input_x + box_x, ' '); - wmove(dialog, box_y, input_x + box_x); - wrefresh(dialog); - } - continue; - default: - if (key < 0x100 && isprint(key)) { - if (scroll + input_x < MAX_LEN) { - wattrset(dialog, dlg.inputbox.atr); - instr[scroll + input_x] = key; - instr[scroll + input_x + 1] = '\0'; - if (input_x == box_width - 1) { - scroll++; - wmove(dialog, box_y, box_x); - for (i = 0; i < box_width - 1; i++) - waddch(dialog, instr [scroll + i]); - } else { - wmove(dialog, box_y, input_x++ + box_x); - waddch(dialog, key); - } - wrefresh(dialog); - } else - flash(); /* Alarm user about overflow */ - continue; - } - } - } - switch (key) { - case 'O': - case 'o': - delwin(dialog); - return 0; - case 'H': - case 'h': - delwin(dialog); - return 1; - case KEY_UP: - case KEY_LEFT: - switch (button) { - case -1: - button = 1; /* Indicates "Help" button is selected */ - print_buttons(dialog, height, width, 1); - break; - case 0: - button = -1; /* Indicates input box is selected */ - print_buttons(dialog, height, width, 0); - wmove(dialog, box_y, box_x + input_x); - wrefresh(dialog); - break; - case 1: - button = 0; /* Indicates "OK" button is selected */ - print_buttons(dialog, height, width, 0); - break; - } - break; - case TAB: - case KEY_DOWN: - case KEY_RIGHT: - switch (button) { - case -1: - button = 0; /* Indicates "OK" button is selected */ - print_buttons(dialog, height, width, 0); - break; - case 0: - button = 1; /* Indicates "Help" button is selected */ - print_buttons(dialog, height, width, 1); - break; - case 1: - button = -1; /* Indicates input box is selected */ - print_buttons(dialog, height, width, 0); - wmove(dialog, box_y, box_x + input_x); - wrefresh(dialog); - break; - } - break; - case ' ': - case '\n': - delwin(dialog); - return (button == -1 ? 0 : button); - case 'X': - case 'x': - key = KEY_ESC; - break; - case KEY_ESC: - key = on_key_esc(dialog); - break; - case KEY_RESIZE: - delwin(dialog); - on_key_resize(); - goto do_resize; - } - } - - delwin(dialog); - return KEY_ESC; /* ESC pressed */ -} diff --git a/package/config/lxdialog/menubox.c b/package/config/lxdialog/menubox.c deleted file mode 100644 index 1d60473..0000000 --- a/package/config/lxdialog/menubox.c +++ /dev/null @@ -1,434 +0,0 @@ -/* - * menubox.c -- implements the menu box - * - * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) - * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcapw@cfw.com) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -/* - * Changes by Clifford Wolf (god@clifford.at) - * - * [ 1998-06-13 ] - * - * *) A bugfix for the Page-Down problem - * - * *) Formerly when I used Page Down and Page Up, the cursor would be set - * to the first position in the menu box. Now lxdialog is a bit - * smarter and works more like other menu systems (just have a look at - * it). - * - * *) Formerly if I selected something my scrolling would be broken because - * lxdialog is re-invoked by the Menuconfig shell script, can't - * remember the last scrolling position, and just sets it so that the - * cursor is at the bottom of the box. Now it writes the temporary file - * lxdialog.scrltmp which contains this information. The file is - * deleted by lxdialog if the user leaves a submenu or enters a new - * one, but it would be nice if Menuconfig could make another "rm -f" - * just to be sure. Just try it out - you will recognise a difference! - * - * [ 1998-06-14 ] - * - * *) Now lxdialog is crash-safe against broken "lxdialog.scrltmp" files - * and menus change their size on the fly. - * - * *) If for some reason the last scrolling position is not saved by - * lxdialog, it sets the scrolling so that the selected item is in the - * middle of the menu box, not at the bottom. - * - * 02 January 1999, Michael Elizabeth Chastain (mec@shout.net) - * Reset 'scroll' to 0 if the value from lxdialog.scrltmp is bogus. - * This fixes a bug in Menuconfig where using ' ' to descend into menus - * would leave mis-synchronized lxdialog.scrltmp files lying around, - * fscanf would read in 'scroll', and eventually that value would get used. - */ - -#include "dialog.h" - -static int menu_width, item_x; - -/* - * Print menu item - */ -static void do_print_item(WINDOW * win, const char *item, int line_y, - int selected, int hotkey) -{ - int j; - char *menu_item = malloc(menu_width + 1); - - strncpy(menu_item, item, menu_width - item_x); - menu_item[menu_width - item_x] = '\0'; - j = first_alpha(menu_item, "YyNnMmHh"); - - /* Clear 'residue' of last item */ - wattrset(win, dlg.menubox.atr); - wmove(win, line_y, 0); -#if OLD_NCURSES - { - int i; - for (i = 0; i < menu_width; i++) - waddch(win, ' '); - } -#else - wclrtoeol(win); -#endif - wattrset(win, selected ? dlg.item_selected.atr : dlg.item.atr); - mvwaddstr(win, line_y, item_x, menu_item); - if (hotkey) { - wattrset(win, selected ? dlg.tag_key_selected.atr - : dlg.tag_key.atr); - mvwaddch(win, line_y, item_x + j, menu_item[j]); - } - if (selected) { - wmove(win, line_y, item_x + 1); - } - free(menu_item); - wrefresh(win); -} - -#define print_item(index, choice, selected) \ -do { \ - item_set(index); \ - do_print_item(menu, item_str(), choice, selected, !item_is_tag(':')); \ -} while (0) - -/* - * Print the scroll indicators. - */ -static void print_arrows(WINDOW * win, int item_no, int scroll, int y, int x, - int height) -{ - int cur_y, cur_x; - - getyx(win, cur_y, cur_x); - - wmove(win, y, x); - - if (scroll > 0) { - wattrset(win, dlg.uarrow.atr); - waddch(win, ACS_UARROW); - waddstr(win, "(-)"); - } else { - wattrset(win, dlg.menubox.atr); - waddch(win, ACS_HLINE); - waddch(win, ACS_HLINE); - waddch(win, ACS_HLINE); - waddch(win, ACS_HLINE); - } - - y = y + height + 1; - wmove(win, y, x); - wrefresh(win); - - if ((height < item_no) && (scroll + height < item_no)) { - wattrset(win, dlg.darrow.atr); - waddch(win, ACS_DARROW); - waddstr(win, "(+)"); - } else { - wattrset(win, dlg.menubox_border.atr); - waddch(win, ACS_HLINE); - waddch(win, ACS_HLINE); - waddch(win, ACS_HLINE); - waddch(win, ACS_HLINE); - } - - wmove(win, cur_y, cur_x); - wrefresh(win); -} - -/* - * Display the termination buttons. - */ -static void print_buttons(WINDOW * win, int height, int width, int selected) -{ - int x = width / 2 - 16; - int y = height - 2; - - print_button(win, gettext("Select"), y, x, selected == 0); - print_button(win, gettext(" Exit "), y, x + 12, selected == 1); - print_button(win, gettext(" Help "), y, x + 24, selected == 2); - - wmove(win, y, x + 1 + 12 * selected); - wrefresh(win); -} - -/* scroll up n lines (n may be negative) */ -static void do_scroll(WINDOW *win, int *scroll, int n) -{ - /* Scroll menu up */ - scrollok(win, TRUE); - wscrl(win, n); - scrollok(win, FALSE); - *scroll = *scroll + n; - wrefresh(win); -} - -/* - * Display a menu for choosing among a number of options - */ -int dialog_menu(const char *title, const char *prompt, - const void *selected, int *s_scroll) -{ - int i, j, x, y, box_x, box_y; - int height, width, menu_height; - int key = 0, button = 0, scroll = 0, choice = 0; - int first_item = 0, max_choice; - WINDOW *dialog, *menu; - -do_resize: - height = getmaxy(stdscr); - width = getmaxx(stdscr); - if (height < 15 || width < 65) - return -ERRDISPLAYTOOSMALL; - - height -= 4; - width -= 5; - menu_height = height - 10; - - max_choice = MIN(menu_height, item_count()); - - /* center dialog box on screen */ - x = (COLS - width) / 2; - y = (LINES - height) / 2; - - draw_shadow(stdscr, y, x, height, width); - - dialog = newwin(height, width, y, x); - keypad(dialog, TRUE); - - draw_box(dialog, 0, 0, height, width, - dlg.dialog.atr, dlg.border.atr); - wattrset(dialog, dlg.border.atr); - mvwaddch(dialog, height - 3, 0, ACS_LTEE); - for (i = 0; i < width - 2; i++) - waddch(dialog, ACS_HLINE); - wattrset(dialog, dlg.dialog.atr); - wbkgdset(dialog, dlg.dialog.atr & A_COLOR); - waddch(dialog, ACS_RTEE); - - print_title(dialog, title, width); - - wattrset(dialog, dlg.dialog.atr); - print_autowrap(dialog, prompt, width - 2, 1, 3); - - menu_width = width - 6; - box_y = height - menu_height - 5; - box_x = (width - menu_width) / 2 - 1; - - /* create new window for the menu */ - menu = subwin(dialog, menu_height, menu_width, - y + box_y + 1, x + box_x + 1); - keypad(menu, TRUE); - - /* draw a box around the menu items */ - draw_box(dialog, box_y, box_x, menu_height + 2, menu_width + 2, - dlg.menubox_border.atr, dlg.menubox.atr); - - if (menu_width >= 80) - item_x = (menu_width - 70) / 2; - else - item_x = 4; - - /* Set choice to default item */ - item_foreach() - if (selected && (selected == item_data())) - choice = item_n(); - /* get the saved scroll info */ - scroll = *s_scroll; - if ((scroll <= choice) && (scroll + max_choice > choice) && - (scroll >= 0) && (scroll + max_choice <= item_count())) { - first_item = scroll; - choice = choice - scroll; - } else { - scroll = 0; - } - if ((choice >= max_choice)) { - if (choice >= item_count() - max_choice / 2) - scroll = first_item = item_count() - max_choice; - else - scroll = first_item = choice - max_choice / 2; - choice = choice - scroll; - } - - /* Print the menu */ - for (i = 0; i < max_choice; i++) { - print_item(first_item + i, i, i == choice); - } - - wnoutrefresh(menu); - - print_arrows(dialog, item_count(), scroll, - box_y, box_x + item_x + 1, menu_height); - - print_buttons(dialog, height, width, 0); - wmove(menu, choice, item_x + 1); - wrefresh(menu); - - while (key != KEY_ESC) { - key = wgetch(menu); - - if (key < 256 && isalpha(key)) - key = tolower(key); - - if (strchr("ynmh", key)) - i = max_choice; - else { - for (i = choice + 1; i < max_choice; i++) { - item_set(scroll + i); - j = first_alpha(item_str(), "YyNnMmHh"); - if (key == tolower(item_str()[j])) - break; - } - if (i == max_choice) - for (i = 0; i < max_choice; i++) { - item_set(scroll + i); - j = first_alpha(item_str(), "YyNnMmHh"); - if (key == tolower(item_str()[j])) - break; - } - } - - if (i < max_choice || - key == KEY_UP || key == KEY_DOWN || - key == '-' || key == '+' || - key == KEY_PPAGE || key == KEY_NPAGE) { - /* Remove highligt of current item */ - print_item(scroll + choice, choice, FALSE); - - if (key == KEY_UP || key == '-') { - if (choice < 2 && scroll) { - /* Scroll menu down */ - do_scroll(menu, &scroll, -1); - - print_item(scroll, 0, FALSE); - } else - choice = MAX(choice - 1, 0); - - } else if (key == KEY_DOWN || key == '+') { - print_item(scroll+choice, choice, FALSE); - - if ((choice > max_choice - 3) && - (scroll + max_choice < item_count())) { - /* Scroll menu up */ - do_scroll(menu, &scroll, 1); - - print_item(scroll+max_choice - 1, - max_choice - 1, FALSE); - } else - choice = MIN(choice + 1, max_choice - 1); - - } else if (key == KEY_PPAGE) { - scrollok(menu, TRUE); - for (i = 0; (i < max_choice); i++) { - if (scroll > 0) { - do_scroll(menu, &scroll, -1); - print_item(scroll, 0, FALSE); - } else { - if (choice > 0) - choice--; - } - } - - } else if (key == KEY_NPAGE) { - for (i = 0; (i < max_choice); i++) { - if (scroll + max_choice < item_count()) { - do_scroll(menu, &scroll, 1); - print_item(scroll+max_choice-1, - max_choice - 1, FALSE); - } else { - if (choice + 1 < max_choice) - choice++; - } - } - } else - choice = i; - - print_item(scroll + choice, choice, TRUE); - - print_arrows(dialog, item_count(), scroll, - box_y, box_x + item_x + 1, menu_height); - - wnoutrefresh(dialog); - wrefresh(menu); - - continue; /* wait for another key press */ - } - - switch (key) { - case KEY_LEFT: - case TAB: - case KEY_RIGHT: - button = ((key == KEY_LEFT ? --button : ++button) < 0) - ? 2 : (button > 2 ? 0 : button); - - print_buttons(dialog, height, width, button); - wrefresh(menu); - break; - case ' ': - case 's': - case 'y': - case 'n': - case 'm': - case '/': - case 'h': - case '?': - case 'z': - case '\n': - /* save scroll info */ - *s_scroll = scroll; - delwin(menu); - delwin(dialog); - item_set(scroll + choice); - item_set_selected(1); - switch (key) { - case 'h': - case '?': - return 2; - case 's': - case 'y': - return 3; - case 'n': - return 4; - case 'm': - return 5; - case ' ': - return 6; - case '/': - return 7; - case 'z': - return 8; - case '\n': - return button; - } - return 0; - case 'e': - case 'x': - key = KEY_ESC; - break; - case KEY_ESC: - key = on_key_esc(menu); - break; - case KEY_RESIZE: - on_key_resize(); - delwin(menu); - delwin(dialog); - goto do_resize; - } - } - delwin(menu); - delwin(dialog); - return key; /* ESC pressed */ -} diff --git a/package/config/lxdialog/textbox.c b/package/config/lxdialog/textbox.c deleted file mode 100644 index c704712..0000000 --- a/package/config/lxdialog/textbox.c +++ /dev/null @@ -1,391 +0,0 @@ -/* - * textbox.c -- implements the text box - * - * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) - * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "dialog.h" - -static void back_lines(int n); -static void print_page(WINDOW * win, int height, int width); -static void print_line(WINDOW * win, int row, int width); -static char *get_line(void); -static void print_position(WINDOW * win); - -static int hscroll; -static int begin_reached, end_reached, page_length; -static const char *buf; -static const char *page; - -/* - * refresh window content - */ -static void refresh_text_box(WINDOW *dialog, WINDOW *box, int boxh, int boxw, - int cur_y, int cur_x) -{ - print_page(box, boxh, boxw); - print_position(dialog); - wmove(dialog, cur_y, cur_x); /* Restore cursor position */ - wrefresh(dialog); -} - - -/* - * Display text from a file in a dialog box. - */ -int dialog_textbox(const char *title, const char *tbuf, - int initial_height, int initial_width) -{ - int i, x, y, cur_x, cur_y, key = 0; - int height, width, boxh, boxw; - int passed_end; - WINDOW *dialog, *box; - - begin_reached = 1; - end_reached = 0; - page_length = 0; - hscroll = 0; - buf = tbuf; - page = buf; /* page is pointer to start of page to be displayed */ - -do_resize: - getmaxyx(stdscr, height, width); - if (height < 8 || width < 8) - return -ERRDISPLAYTOOSMALL; - if (initial_height != 0) - height = initial_height; - else - if (height > 4) - height -= 4; - else - height = 0; - if (initial_width != 0) - width = initial_width; - else - if (width > 5) - width -= 5; - else - width = 0; - - /* center dialog box on screen */ - x = (COLS - width) / 2; - y = (LINES - height) / 2; - - draw_shadow(stdscr, y, x, height, width); - - dialog = newwin(height, width, y, x); - keypad(dialog, TRUE); - - /* Create window for box region, used for scrolling text */ - boxh = height - 4; - boxw = width - 2; - box = subwin(dialog, boxh, boxw, y + 1, x + 1); - wattrset(box, dlg.dialog.atr); - wbkgdset(box, dlg.dialog.atr & A_COLOR); - - keypad(box, TRUE); - - /* register the new window, along with its borders */ - draw_box(dialog, 0, 0, height, width, - dlg.dialog.atr, dlg.border.atr); - - wattrset(dialog, dlg.border.atr); - mvwaddch(dialog, height - 3, 0, ACS_LTEE); - for (i = 0; i < width - 2; i++) - waddch(dialog, ACS_HLINE); - wattrset(dialog, dlg.dialog.atr); - wbkgdset(dialog, dlg.dialog.atr & A_COLOR); - waddch(dialog, ACS_RTEE); - - print_title(dialog, title, width); - - print_button(dialog, gettext(" Exit "), height - 2, width / 2 - 4, TRUE); - wnoutrefresh(dialog); - getyx(dialog, cur_y, cur_x); /* Save cursor position */ - - /* Print first page of text */ - attr_clear(box, boxh, boxw, dlg.dialog.atr); - refresh_text_box(dialog, box, boxh, boxw, cur_y, cur_x); - - while ((key != KEY_ESC) && (key != '\n')) { - key = wgetch(dialog); - switch (key) { - case 'E': /* Exit */ - case 'e': - case 'X': - case 'x': - delwin(box); - delwin(dialog); - return 0; - case 'g': /* First page */ - case KEY_HOME: - if (!begin_reached) { - begin_reached = 1; - page = buf; - refresh_text_box(dialog, box, boxh, boxw, - cur_y, cur_x); - } - break; - case 'G': /* Last page */ - case KEY_END: - - end_reached = 1; - /* point to last char in buf */ - page = buf + strlen(buf); - back_lines(boxh); - refresh_text_box(dialog, box, boxh, boxw, - cur_y, cur_x); - break; - case 'K': /* Previous line */ - case 'k': - case KEY_UP: - if (!begin_reached) { - back_lines(page_length + 1); - - /* We don't call print_page() here but use - * scrolling to ensure faster screen update. - * However, 'end_reached' and 'page_length' - * should still be updated, and 'page' should - * point to start of next page. This is done - * by calling get_line() in the following - * 'for' loop. */ - scrollok(box, TRUE); - wscrl(box, -1); /* Scroll box region down one line */ - scrollok(box, FALSE); - page_length = 0; - passed_end = 0; - for (i = 0; i < boxh; i++) { - if (!i) { - /* print first line of page */ - print_line(box, 0, boxw); - wnoutrefresh(box); - } else - /* Called to update 'end_reached' and 'page' */ - get_line(); - if (!passed_end) - page_length++; - if (end_reached && !passed_end) - passed_end = 1; - } - - print_position(dialog); - wmove(dialog, cur_y, cur_x); /* Restore cursor position */ - wrefresh(dialog); - } - break; - case 'B': /* Previous page */ - case 'b': - case KEY_PPAGE: - if (begin_reached) - break; - back_lines(page_length + boxh); - refresh_text_box(dialog, box, boxh, boxw, - cur_y, cur_x); - break; - case 'J': /* Next line */ - case 'j': - case KEY_DOWN: - if (!end_reached) { - begin_reached = 0; - scrollok(box, TRUE); - scroll(box); /* Scroll box region up one line */ - scrollok(box, FALSE); - print_line(box, boxh - 1, boxw); - wnoutrefresh(box); - print_position(dialog); - wmove(dialog, cur_y, cur_x); /* Restore cursor position */ - wrefresh(dialog); - } - break; - case KEY_NPAGE: /* Next page */ - case ' ': - if (end_reached) - break; - - begin_reached = 0; - refresh_text_box(dialog, box, boxh, boxw, - cur_y, cur_x); - break; - case '0': /* Beginning of line */ - case 'H': /* Scroll left */ - case 'h': - case KEY_LEFT: - if (hscroll <= 0) - break; - - if (key == '0') - hscroll = 0; - else - hscroll--; - /* Reprint current page to scroll horizontally */ - back_lines(page_length); - refresh_text_box(dialog, box, boxh, boxw, - cur_y, cur_x); - break; - case 'L': /* Scroll right */ - case 'l': - case KEY_RIGHT: - if (hscroll >= MAX_LEN) - break; - hscroll++; - /* Reprint current page to scroll horizontally */ - back_lines(page_length); - refresh_text_box(dialog, box, boxh, boxw, - cur_y, cur_x); - break; - case KEY_ESC: - key = on_key_esc(dialog); - break; - case KEY_RESIZE: - back_lines(height); - delwin(box); - delwin(dialog); - on_key_resize(); - goto do_resize; - } - } - delwin(box); - delwin(dialog); - return key; /* ESC pressed */ -} - -/* - * Go back 'n' lines in text. Called by dialog_textbox(). - * 'page' will be updated to point to the desired line in 'buf'. - */ -static void back_lines(int n) -{ - int i; - - begin_reached = 0; - /* Go back 'n' lines */ - for (i = 0; i < n; i++) { - if (*page == '\0') { - if (end_reached) { - end_reached = 0; - continue; - } - } - if (page == buf) { - begin_reached = 1; - return; - } - page--; - do { - if (page == buf) { - begin_reached = 1; - return; - } - page--; - } while (*page != '\n'); - page++; - } -} - -/* - * Print a new page of text. Called by dialog_textbox(). - */ -static void print_page(WINDOW * win, int height, int width) -{ - int i, passed_end = 0; - - page_length = 0; - for (i = 0; i < height; i++) { - print_line(win, i, width); - if (!passed_end) - page_length++; - if (end_reached && !passed_end) - passed_end = 1; - } - wnoutrefresh(win); -} - -/* - * Print a new line of text. Called by dialog_textbox() and print_page(). - */ -static void print_line(WINDOW * win, int row, int width) -{ - int y, x; - char *line; - - line = get_line(); - line += MIN(strlen(line), hscroll); /* Scroll horizontally */ - wmove(win, row, 0); /* move cursor to correct line */ - waddch(win, ' '); - waddnstr(win, line, MIN(strlen(line), width - 2)); - - getyx(win, y, x); - /* Clear 'residue' of previous line */ -#if OLD_NCURSES - { - int i; - for (i = 0; i < width - x; i++) - waddch(win, ' '); - } -#else - wclrtoeol(win); -#endif -} - -/* - * Return current line of text. Called by dialog_textbox() and print_line(). - * 'page' should point to start of current line before calling, and will be - * updated to point to start of next line. - */ -static char *get_line(void) -{ - int i = 0; - static char line[MAX_LEN + 1]; - - end_reached = 0; - while (*page != '\n') { - if (*page == '\0') { - if (!end_reached) { - end_reached = 1; - break; - } - } else if (i < MAX_LEN) - line[i++] = *(page++); - else { - /* Truncate lines longer than MAX_LEN characters */ - if (i == MAX_LEN) - line[i++] = '\0'; - page++; - } - } - if (i <= MAX_LEN) - line[i] = '\0'; - if (!end_reached) - page++; /* move pass '\n' */ - - return line; -} - -/* - * Print current position - */ -static void print_position(WINDOW * win) -{ - int percent; - - wattrset(win, dlg.position_indicator.atr); - wbkgdset(win, dlg.position_indicator.atr & A_COLOR); - percent = (page - buf) * 100 / strlen(buf); - wmove(win, getmaxy(win) - 3, getmaxx(win) - 9); - wprintw(win, "(%3d%%)", percent); -} diff --git a/package/config/lxdialog/util.c b/package/config/lxdialog/util.c deleted file mode 100644 index f2375ad..0000000 --- a/package/config/lxdialog/util.c +++ /dev/null @@ -1,657 +0,0 @@ -/* - * util.c - * - * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) - * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - -#include "dialog.h" - -struct dialog_info dlg; - -static void set_mono_theme(void) -{ - dlg.screen.atr = A_NORMAL; - dlg.shadow.atr = A_NORMAL; - dlg.dialog.atr = A_NORMAL; - dlg.title.atr = A_BOLD; - dlg.border.atr = A_NORMAL; - dlg.button_active.atr = A_REVERSE; - dlg.button_inactive.atr = A_DIM; - dlg.button_key_active.atr = A_REVERSE; - dlg.button_key_inactive.atr = A_BOLD; - dlg.button_label_active.atr = A_REVERSE; - dlg.button_label_inactive.atr = A_NORMAL; - dlg.inputbox.atr = A_NORMAL; - dlg.inputbox_border.atr = A_NORMAL; - dlg.searchbox.atr = A_NORMAL; - dlg.searchbox_title.atr = A_BOLD; - dlg.searchbox_border.atr = A_NORMAL; - dlg.position_indicator.atr = A_BOLD; - dlg.menubox.atr = A_NORMAL; - dlg.menubox_border.atr = A_NORMAL; - dlg.item.atr = A_NORMAL; - dlg.item_selected.atr = A_REVERSE; - dlg.tag.atr = A_BOLD; - dlg.tag_selected.atr = A_REVERSE; - dlg.tag_key.atr = A_BOLD; - dlg.tag_key_selected.atr = A_REVERSE; - dlg.check.atr = A_BOLD; - dlg.check_selected.atr = A_REVERSE; - dlg.uarrow.atr = A_BOLD; - dlg.darrow.atr = A_BOLD; -} - -#define DLG_COLOR(dialog, f, b, h) \ -do { \ - dlg.dialog.fg = (f); \ - dlg.dialog.bg = (b); \ - dlg.dialog.hl = (h); \ -} while (0) - -static void set_classic_theme(void) -{ - DLG_COLOR(screen, COLOR_CYAN, COLOR_BLUE, true); - DLG_COLOR(shadow, COLOR_BLACK, COLOR_BLACK, true); - DLG_COLOR(dialog, COLOR_BLACK, COLOR_WHITE, false); - DLG_COLOR(title, COLOR_YELLOW, COLOR_WHITE, true); - DLG_COLOR(border, COLOR_WHITE, COLOR_WHITE, true); - DLG_COLOR(button_active, COLOR_WHITE, COLOR_BLUE, true); - DLG_COLOR(button_inactive, COLOR_BLACK, COLOR_WHITE, false); - DLG_COLOR(button_key_active, COLOR_WHITE, COLOR_BLUE, true); - DLG_COLOR(button_key_inactive, COLOR_RED, COLOR_WHITE, false); - DLG_COLOR(button_label_active, COLOR_YELLOW, COLOR_BLUE, true); - DLG_COLOR(button_label_inactive, COLOR_BLACK, COLOR_WHITE, true); - DLG_COLOR(inputbox, COLOR_BLACK, COLOR_WHITE, false); - DLG_COLOR(inputbox_border, COLOR_BLACK, COLOR_WHITE, false); - DLG_COLOR(searchbox, COLOR_BLACK, COLOR_WHITE, false); - DLG_COLOR(searchbox_title, COLOR_YELLOW, COLOR_WHITE, true); - DLG_COLOR(searchbox_border, COLOR_WHITE, COLOR_WHITE, true); - DLG_COLOR(position_indicator, COLOR_YELLOW, COLOR_WHITE, true); - DLG_COLOR(menubox, COLOR_BLACK, COLOR_WHITE, false); - DLG_COLOR(menubox_border, COLOR_WHITE, COLOR_WHITE, true); - DLG_COLOR(item, COLOR_BLACK, COLOR_WHITE, false); - DLG_COLOR(item_selected, COLOR_WHITE, COLOR_BLUE, true); - DLG_COLOR(tag, COLOR_YELLOW, COLOR_WHITE, true); - DLG_COLOR(tag_selected, COLOR_YELLOW, COLOR_BLUE, true); - DLG_COLOR(tag_key, COLOR_YELLOW, COLOR_WHITE, true); - DLG_COLOR(tag_key_selected, COLOR_YELLOW, COLOR_BLUE, true); - DLG_COLOR(check, COLOR_BLACK, COLOR_WHITE, false); - DLG_COLOR(check_selected, COLOR_WHITE, COLOR_BLUE, true); - DLG_COLOR(uarrow, COLOR_GREEN, COLOR_WHITE, true); - DLG_COLOR(darrow, COLOR_GREEN, COLOR_WHITE, true); -} - -static void set_blackbg_theme(void) -{ - DLG_COLOR(screen, COLOR_RED, COLOR_BLACK, true); - DLG_COLOR(shadow, COLOR_BLACK, COLOR_BLACK, false); - DLG_COLOR(dialog, COLOR_WHITE, COLOR_BLACK, false); - DLG_COLOR(title, COLOR_RED, COLOR_BLACK, false); - DLG_COLOR(border, COLOR_BLACK, COLOR_BLACK, true); - - DLG_COLOR(button_active, COLOR_YELLOW, COLOR_RED, false); - DLG_COLOR(button_inactive, COLOR_YELLOW, COLOR_BLACK, false); - DLG_COLOR(button_key_active, COLOR_YELLOW, COLOR_RED, true); - DLG_COLOR(button_key_inactive, COLOR_RED, COLOR_BLACK, false); - DLG_COLOR(button_label_active, COLOR_WHITE, COLOR_RED, false); - DLG_COLOR(button_label_inactive, COLOR_BLACK, COLOR_BLACK, true); - - DLG_COLOR(inputbox, COLOR_YELLOW, COLOR_BLACK, false); - DLG_COLOR(inputbox_border, COLOR_YELLOW, COLOR_BLACK, false); - - DLG_COLOR(searchbox, COLOR_YELLOW, COLOR_BLACK, false); - DLG_COLOR(searchbox_title, COLOR_YELLOW, COLOR_BLACK, true); - DLG_COLOR(searchbox_border, COLOR_BLACK, COLOR_BLACK, true); - - DLG_COLOR(position_indicator, COLOR_RED, COLOR_BLACK, false); - - DLG_COLOR(menubox, COLOR_YELLOW, COLOR_BLACK, false); - DLG_COLOR(menubox_border, COLOR_BLACK, COLOR_BLACK, true); - - DLG_COLOR(item, COLOR_WHITE, COLOR_BLACK, false); - DLG_COLOR(item_selected, COLOR_WHITE, COLOR_RED, false); - - DLG_COLOR(tag, COLOR_RED, COLOR_BLACK, false); - DLG_COLOR(tag_selected, COLOR_YELLOW, COLOR_RED, true); - DLG_COLOR(tag_key, COLOR_RED, COLOR_BLACK, false); - DLG_COLOR(tag_key_selected, COLOR_YELLOW, COLOR_RED, true); - - DLG_COLOR(check, COLOR_YELLOW, COLOR_BLACK, false); - DLG_COLOR(check_selected, COLOR_YELLOW, COLOR_RED, true); - - DLG_COLOR(uarrow, COLOR_RED, COLOR_BLACK, false); - DLG_COLOR(darrow, COLOR_RED, COLOR_BLACK, false); -} - -static void set_bluetitle_theme(void) -{ - set_classic_theme(); - DLG_COLOR(title, COLOR_BLUE, COLOR_WHITE, true); - DLG_COLOR(button_key_active, COLOR_YELLOW, COLOR_BLUE, true); - DLG_COLOR(button_label_active, COLOR_WHITE, COLOR_BLUE, true); - DLG_COLOR(searchbox_title, COLOR_BLUE, COLOR_WHITE, true); - DLG_COLOR(position_indicator, COLOR_BLUE, COLOR_WHITE, true); - DLG_COLOR(tag, COLOR_BLUE, COLOR_WHITE, true); - DLG_COLOR(tag_key, COLOR_BLUE, COLOR_WHITE, true); - -} - -/* - * Select color theme - */ -static int set_theme(const char *theme) -{ - int use_color = 1; - if (!theme) - set_bluetitle_theme(); - else if (strcmp(theme, "classic") == 0) - set_classic_theme(); - else if (strcmp(theme, "bluetitle") == 0) - set_bluetitle_theme(); - else if (strcmp(theme, "blackbg") == 0) - set_blackbg_theme(); - else if (strcmp(theme, "mono") == 0) - use_color = 0; - - return use_color; -} - -static void init_one_color(struct dialog_color *color) -{ - static int pair = 0; - - pair++; - init_pair(pair, color->fg, color->bg); - if (color->hl) - color->atr = A_BOLD | COLOR_PAIR(pair); - else - color->atr = COLOR_PAIR(pair); -} - -static void init_dialog_colors(void) -{ - init_one_color(&dlg.screen); - init_one_color(&dlg.shadow); - init_one_color(&dlg.dialog); - init_one_color(&dlg.title); - init_one_color(&dlg.border); - init_one_color(&dlg.button_active); - init_one_color(&dlg.button_inactive); - init_one_color(&dlg.button_key_active); - init_one_color(&dlg.button_key_inactive); - init_one_color(&dlg.button_label_active); - init_one_color(&dlg.button_label_inactive); - init_one_color(&dlg.inputbox); - init_one_color(&dlg.inputbox_border); - init_one_color(&dlg.searchbox); - init_one_color(&dlg.searchbox_title); - init_one_color(&dlg.searchbox_border); - init_one_color(&dlg.position_indicator); - init_one_color(&dlg.menubox); - init_one_color(&dlg.menubox_border); - init_one_color(&dlg.item); - init_one_color(&dlg.item_selected); - init_one_color(&dlg.tag); - init_one_color(&dlg.tag_selected); - init_one_color(&dlg.tag_key); - init_one_color(&dlg.tag_key_selected); - init_one_color(&dlg.check); - init_one_color(&dlg.check_selected); - init_one_color(&dlg.uarrow); - init_one_color(&dlg.darrow); -} - -/* - * Setup for color display - */ -static void color_setup(const char *theme) -{ - int use_color; - - use_color = set_theme(theme); - if (use_color && has_colors()) { - start_color(); - init_dialog_colors(); - } else - set_mono_theme(); -} - -/* - * Set window to attribute 'attr' - */ -void attr_clear(WINDOW * win, int height, int width, chtype attr) -{ - int i, j; - - wattrset(win, attr); - for (i = 0; i < height; i++) { - wmove(win, i, 0); - for (j = 0; j < width; j++) - waddch(win, ' '); - } - touchwin(win); -} - -void dialog_clear(void) -{ - attr_clear(stdscr, LINES, COLS, dlg.screen.atr); - /* Display background title if it exists ... - SLH */ - if (dlg.backtitle != NULL) { - int i; - - wattrset(stdscr, dlg.screen.atr); - mvwaddstr(stdscr, 0, 1, (char *)dlg.backtitle); - wmove(stdscr, 1, 1); - for (i = 1; i < COLS - 1; i++) - waddch(stdscr, ACS_HLINE); - } - wnoutrefresh(stdscr); -} - -/* - * Do some initialization for dialog - */ -int init_dialog(const char *backtitle) -{ - int height, width; - - initscr(); /* Init curses */ - getmaxyx(stdscr, height, width); - if (height < 19 || width < 80) { - endwin(); - return -ERRDISPLAYTOOSMALL; - } - - dlg.backtitle = backtitle; - color_setup(getenv("MENUCONFIG_COLOR")); - - keypad(stdscr, TRUE); - cbreak(); - noecho(); - dialog_clear(); - - return 0; -} - -void set_dialog_backtitle(const char *backtitle) -{ - dlg.backtitle = backtitle; -} - -/* - * End using dialog functions. - */ -void end_dialog(int x, int y) -{ - /* move cursor back to original position */ - move(y, x); - refresh(); - endwin(); -} - -/* Print the title of the dialog. Center the title and truncate - * tile if wider than dialog (- 2 chars). - **/ -void print_title(WINDOW *dialog, const char *title, int width) -{ - if (title) { - int tlen = MIN(width - 2, strlen(title)); - wattrset(dialog, dlg.title.atr); - mvwaddch(dialog, 0, (width - tlen) / 2 - 1, ' '); - mvwaddnstr(dialog, 0, (width - tlen)/2, title, tlen); - waddch(dialog, ' '); - } -} - -/* - * Print a string of text in a window, automatically wrap around to the - * next line if the string is too long to fit on one line. Newline - * characters '\n' are replaced by spaces. We start on a new line - * if there is no room for at least 4 nonblanks following a double-space. - */ -void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x) -{ - int newl, cur_x, cur_y; - int i, prompt_len, room, wlen; - char tempstr[MAX_LEN + 1], *word, *sp, *sp2; - - strcpy(tempstr, prompt); - - prompt_len = strlen(tempstr); - - /* - * Remove newlines - */ - for (i = 0; i < prompt_len; i++) { - if (tempstr[i] == '\n') - tempstr[i] = ' '; - } - - if (prompt_len <= width - x * 2) { /* If prompt is short */ - wmove(win, y, (width - prompt_len) / 2); - waddstr(win, tempstr); - } else { - cur_x = x; - cur_y = y; - newl = 1; - word = tempstr; - while (word && *word) { - sp = strchr(word, ' '); - if (sp) - *sp++ = 0; - - /* Wrap to next line if either the word does not fit, - or it is the first word of a new sentence, and it is - short, and the next word does not fit. */ - room = width - cur_x; - wlen = strlen(word); - if (wlen > room || - (newl && wlen < 4 && sp - && wlen + 1 + strlen(sp) > room - && (!(sp2 = strchr(sp, ' ')) - || wlen + 1 + (sp2 - sp) > room))) { - cur_y++; - cur_x = x; - } - wmove(win, cur_y, cur_x); - waddstr(win, word); - getyx(win, cur_y, cur_x); - cur_x++; - if (sp && *sp == ' ') { - cur_x++; /* double space */ - while (*++sp == ' ') ; - newl = 1; - } else - newl = 0; - word = sp; - } - } -} - -/* - * Print a button - */ -void print_button(WINDOW * win, const char *label, int y, int x, int selected) -{ - int i, temp; - - wmove(win, y, x); - wattrset(win, selected ? dlg.button_active.atr - : dlg.button_inactive.atr); - waddstr(win, "<"); - temp = strspn(label, " "); - label += temp; - wattrset(win, selected ? dlg.button_label_active.atr - : dlg.button_label_inactive.atr); - for (i = 0; i < temp; i++) - waddch(win, ' '); - wattrset(win, selected ? dlg.button_key_active.atr - : dlg.button_key_inactive.atr); - waddch(win, label[0]); - wattrset(win, selected ? dlg.button_label_active.atr - : dlg.button_label_inactive.atr); - waddstr(win, (char *)label + 1); - wattrset(win, selected ? dlg.button_active.atr - : dlg.button_inactive.atr); - waddstr(win, ">"); - wmove(win, y, x + temp + 1); -} - -/* - * Draw a rectangular box with line drawing characters - */ -void -draw_box(WINDOW * win, int y, int x, int height, int width, - chtype box, chtype border) -{ - int i, j; - - wattrset(win, 0); - for (i = 0; i < height; i++) { - wmove(win, y + i, x); - for (j = 0; j < width; j++) - if (!i && !j) - waddch(win, border | ACS_ULCORNER); - else if (i == height - 1 && !j) - waddch(win, border | ACS_LLCORNER); - else if (!i && j == width - 1) - waddch(win, box | ACS_URCORNER); - else if (i == height - 1 && j == width - 1) - waddch(win, box | ACS_LRCORNER); - else if (!i) - waddch(win, border | ACS_HLINE); - else if (i == height - 1) - waddch(win, box | ACS_HLINE); - else if (!j) - waddch(win, border | ACS_VLINE); - else if (j == width - 1) - waddch(win, box | ACS_VLINE); - else - waddch(win, box | ' '); - } -} - -/* - * Draw shadows along the right and bottom edge to give a more 3D look - * to the boxes - */ -void draw_shadow(WINDOW * win, int y, int x, int height, int width) -{ - int i; - - if (has_colors()) { /* Whether terminal supports color? */ - wattrset(win, dlg.shadow.atr); - wmove(win, y + height, x + 2); - for (i = 0; i < width; i++) - waddch(win, winch(win) & A_CHARTEXT); - for (i = y + 1; i < y + height + 1; i++) { - wmove(win, i, x + width); - waddch(win, winch(win) & A_CHARTEXT); - waddch(win, winch(win) & A_CHARTEXT); - } - wnoutrefresh(win); - } -} - -/* - * Return the position of the first alphabetic character in a string. - */ -int first_alpha(const char *string, const char *exempt) -{ - int i, in_paren = 0, c; - - for (i = 0; i < strlen(string); i++) { - c = tolower(string[i]); - - if (strchr("<[(", c)) - ++in_paren; - if (strchr(">])", c) && in_paren > 0) - --in_paren; - - if ((!in_paren) && isalpha(c) && strchr(exempt, c) == 0) - return i; - } - - return 0; -} - -/* - * ncurses uses ESC to detect escaped char sequences. This resutl in - * a small timeout before ESC is actually delivered to the application. - * lxdialog suggest which is correctly translated to two - * times esc. But then we need to ignore the second esc to avoid stepping - * out one menu too much. Filter away all escaped key sequences since - * keypad(FALSE) turn off ncurses support for escape sequences - and thats - * needed to make notimeout() do as expected. - */ -int on_key_esc(WINDOW *win) -{ - int key; - int key2; - int key3; - - nodelay(win, TRUE); - keypad(win, FALSE); - key = wgetch(win); - key2 = wgetch(win); - do { - key3 = wgetch(win); - } while (key3 != ERR); - nodelay(win, FALSE); - keypad(win, TRUE); - if (key == KEY_ESC && key2 == ERR) - return KEY_ESC; - else if (key != ERR && key != KEY_ESC && key2 == ERR) - ungetch(key); - - return -1; -} - -/* redraw screen in new size */ -int on_key_resize(void) -{ - dialog_clear(); - return KEY_RESIZE; -} - -struct dialog_list *item_cur; -struct dialog_list item_nil; -struct dialog_list *item_head; - -void item_reset(void) -{ - struct dialog_list *p, *next; - - for (p = item_head; p; p = next) { - next = p->next; - free(p); - } - item_head = NULL; - item_cur = &item_nil; -} - -void item_make(const char *fmt, ...) -{ - va_list ap; - struct dialog_list *p = malloc(sizeof(*p)); - - if (item_head) - item_cur->next = p; - else - item_head = p; - item_cur = p; - memset(p, 0, sizeof(*p)); - - va_start(ap, fmt); - vsnprintf(item_cur->node.str, sizeof(item_cur->node.str), fmt, ap); - va_end(ap); -} - -void item_add_str(const char *fmt, ...) -{ - va_list ap; - size_t avail; - - avail = sizeof(item_cur->node.str) - strlen(item_cur->node.str); - - va_start(ap, fmt); - vsnprintf(item_cur->node.str + strlen(item_cur->node.str), - avail, fmt, ap); - item_cur->node.str[sizeof(item_cur->node.str) - 1] = '\0'; - va_end(ap); -} - -void item_set_tag(char tag) -{ - item_cur->node.tag = tag; -} -void item_set_data(void *ptr) -{ - item_cur->node.data = ptr; -} - -void item_set_selected(int val) -{ - item_cur->node.selected = val; -} - -int item_activate_selected(void) -{ - item_foreach() - if (item_is_selected()) - return 1; - return 0; -} - -void *item_data(void) -{ - return item_cur->node.data; -} - -char item_tag(void) -{ - return item_cur->node.tag; -} - -int item_count(void) -{ - int n = 0; - struct dialog_list *p; - - for (p = item_head; p; p = p->next) - n++; - return n; -} - -void item_set(int n) -{ - int i = 0; - item_foreach() - if (i++ == n) - return; -} - -int item_n(void) -{ - int n = 0; - struct dialog_list *p; - - for (p = item_head; p; p = p->next) { - if (p == item_cur) - return n; - n++; - } - return 0; -} - -const char *item_str(void) -{ - return item_cur->node.str; -} - -int item_is_selected(void) -{ - return (item_cur->node.selected != 0); -} - -int item_is_tag(char tag) -{ - return (item_cur->node.tag == tag); -} diff --git a/package/config/lxdialog/yesno.c b/package/config/lxdialog/yesno.c deleted file mode 100644 index 4e6e809..0000000 --- a/package/config/lxdialog/yesno.c +++ /dev/null @@ -1,114 +0,0 @@ -/* - * yesno.c -- implements the yes/no box - * - * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) - * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "dialog.h" - -/* - * Display termination buttons - */ -static void print_buttons(WINDOW * dialog, int height, int width, int selected) -{ - int x = width / 2 - 10; - int y = height - 2; - - print_button(dialog, gettext(" Yes "), y, x, selected == 0); - print_button(dialog, gettext(" No "), y, x + 13, selected == 1); - - wmove(dialog, y, x + 1 + 13 * selected); - wrefresh(dialog); -} - -/* - * Display a dialog box with two buttons - Yes and No - */ -int dialog_yesno(const char *title, const char *prompt, int height, int width) -{ - int i, x, y, key = 0, button = 0; - WINDOW *dialog; - -do_resize: - if (getmaxy(stdscr) < (height + 4)) - return -ERRDISPLAYTOOSMALL; - if (getmaxx(stdscr) < (width + 4)) - return -ERRDISPLAYTOOSMALL; - - /* center dialog box on screen */ - x = (COLS - width) / 2; - y = (LINES - height) / 2; - - draw_shadow(stdscr, y, x, height, width); - - dialog = newwin(height, width, y, x); - keypad(dialog, TRUE); - - draw_box(dialog, 0, 0, height, width, - dlg.dialog.atr, dlg.border.atr); - wattrset(dialog, dlg.border.atr); - mvwaddch(dialog, height - 3, 0, ACS_LTEE); - for (i = 0; i < width - 2; i++) - waddch(dialog, ACS_HLINE); - wattrset(dialog, dlg.dialog.atr); - waddch(dialog, ACS_RTEE); - - print_title(dialog, title, width); - - wattrset(dialog, dlg.dialog.atr); - print_autowrap(dialog, prompt, width - 2, 1, 3); - - print_buttons(dialog, height, width, 0); - - while (key != KEY_ESC) { - key = wgetch(dialog); - switch (key) { - case 'Y': - case 'y': - delwin(dialog); - return 0; - case 'N': - case 'n': - delwin(dialog); - return 1; - - case TAB: - case KEY_LEFT: - case KEY_RIGHT: - button = ((key == KEY_LEFT ? --button : ++button) < 0) ? 1 : (button > 1 ? 0 : button); - - print_buttons(dialog, height, width, button); - wrefresh(dialog); - break; - case ' ': - case '\n': - delwin(dialog); - return button; - case KEY_ESC: - key = on_key_esc(dialog); - break; - case KEY_RESIZE: - delwin(dialog); - on_key_resize(); - goto do_resize; - } - } - - delwin(dialog); - return key; /* ESC pressed */ -} diff --git a/package/config/mconf.c b/package/config/mconf.c deleted file mode 100644 index 3ed8a25..0000000 --- a/package/config/mconf.c +++ /dev/null @@ -1,862 +0,0 @@ -/* - * Copyright (C) 2002 Roman Zippel - * Released under the terms of the GNU GPL v2.0. - * - * Introduced single menu mode (show all sub-menus in one large tree). - * 2002-11-06 Petr Baudis - * - * i18n, 2005, Arnaldo Carvalho de Melo - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define LKC_DIRECT_LINK -#include "lkc.h" -#include "lxdialog/dialog.h" - -static const char mconf_readme[] = N_( -"Overview\n" -"--------\n" -"This interface let you select features and parameters for the build.\n" -"Features can either be built-in, modularized, or ignored. Parameters\n" -"must be entered in as decimal or hexadecimal numbers or text.\n" -"\n" -"Menu items beginning with following braces represent features that\n" -" [ ] can be built in or removed\n" -" < > can be built in, modularized or removed\n" -" { } can be built in or modularized (selected by other feature)\n" -" - - are selected by other feature,\n" -"while *, M or whitespace inside braces means to build in, build as\n" -"a module or to exclude the feature respectively.\n" -"\n" -"To change any of these features, highlight it with the cursor\n" -"keys and press to build it in, to make it a module or\n" -" to removed it. You may also press the to cycle\n" -"through the available options (ie. Y->N->M->Y).\n" -"\n" -"Some additional keyboard hints:\n" -"\n" -"Menus\n" -"----------\n" -"o Use the Up/Down arrow keys (cursor keys) to highlight the item\n" -" you wish to change or submenu wish to select and press .\n" -" Submenus are designated by \"--->\".\n" -"\n" -" Shortcut: Press the option's highlighted letter (hotkey).\n" -" Pressing a hotkey more than once will sequence\n" -" through all visible items which use that hotkey.\n" -"\n" -" You may also use the and keys to scroll\n" -" unseen options into view.\n" -"\n" -"o To exit a menu use the cursor keys to highlight the button\n" -" and press .\n" -"\n" -" Shortcut: Press or or if there is no hotkey\n" -" using those letters. You may press a single , but\n" -" there is a delayed response which you may find annoying.\n" -"\n" -" Also, the and cursor keys will cycle between and\n" -" \n" -"\n" -"\n" -"Data Entry\n" -"-----------\n" -"o Enter the requested information and press \n" -" If you are entering hexadecimal values, it is not necessary to\n" -" add the '0x' prefix to the entry.\n" -"\n" -"o For help, use the or cursor keys to highlight the help option\n" -" and press . You can try as well.\n" -"\n" -"\n" -"Text Box (Help Window)\n" -"--------\n" -"o Use the cursor keys to scroll up/down/left/right. The VI editor\n" -" keys h,j,k,l function here as do and for those\n" -" who are familiar with less and lynx.\n" -"\n" -"o Press , , or to exit.\n" -"\n" -"\n" -"Alternate Configuration Files\n" -"-----------------------------\n" -"Menuconfig supports the use of alternate configuration files for\n" -"those who, for various reasons, find it necessary to switch\n" -"between different configurations.\n" -"\n" -"At the end of the main menu you will find two options. One is\n" -"for saving the current configuration to a file of your choosing.\n" -"The other option is for loading a previously saved alternate\n" -"configuration.\n" -"\n" -"Even if you don't use alternate configuration files, but you\n" -"find during a Menuconfig session that you have completely messed\n" -"up your settings, you may use the \"Load Alternate...\" option to\n" -"restore your previously saved settings from \".config\" without\n" -"restarting Menuconfig.\n" -"\n" -"Other information\n" -"-----------------\n" -"If you use Menuconfig in an XTERM window make sure you have your\n" -"$TERM variable set to point to a xterm definition which supports color.\n" -"Otherwise, Menuconfig will look rather bad. Menuconfig will not\n" -"display correctly in a RXVT window because rxvt displays only one\n" -"intensity of color, bright.\n" -"\n" -"Menuconfig will display larger menus on screens or xterms which are\n" -"set to display more than the standard 25 row by 80 column geometry.\n" -"In order for this to work, the \"stty size\" command must be able to\n" -"display the screen's current row and column geometry. I STRONGLY\n" -"RECOMMEND that you make sure you do NOT have the shell variables\n" -"LINES and COLUMNS exported into your environment. Some distributions\n" -"export those variables via /etc/profile. Some ncurses programs can\n" -"become confused when those variables (LINES & COLUMNS) don't reflect\n" -"the true screen size.\n" -"\n" -"Optional personality available\n" -"------------------------------\n" -"If you prefer to have all of the options listed in a single menu, rather\n" -"than the default multimenu hierarchy, run the menuconfig with\n" -"MENUCONFIG_MODE environment variable set to single_menu. Example:\n" -"\n" -"make MENUCONFIG_MODE=single_menu menuconfig\n" -"\n" -" will then unroll the appropriate category, or enfold it if it\n" -"is already unrolled.\n" -"\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" -"\n" -"Different color themes available\n" -"--------------------------------\n" -"It is possible to select different color themes using the variable\n" -"MENUCONFIG_COLOR. To select a theme use:\n" -"\n" -"make MENUCONFIG_COLOR= menuconfig\n" -"\n" -"Available themes are\n" -" mono => selects colors suitable for monochrome displays\n" -" blackbg => selects a color scheme with black background\n" -" classic => theme with blue background. The classic look\n" -" bluetitle => a LCD friendly version of classic. (default)\n" -"\n"), -menu_instructions[] = N_( - "Arrow keys navigate the menu. " - " selects submenus --->. " - "Highlighted letters are hotkeys. " - "Pressing selectes a feature, while will exclude a feature. " - "Press to exit, for Help, for Search. " - "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 . " - "Press for additional information about this option."), -inputbox_instructions_int[] = N_( - "Please enter a decimal value. " - "Fractions will not be accepted. " - "Use the key to move from the input field to the buttons below it."), -inputbox_instructions_hex[] = N_( - "Please enter a hexadecimal value. " - "Use the key to move from the input field to the buttons below it."), -inputbox_instructions_string[] = N_( - "Please enter a string value. " - "Use the 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."), -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[] = N_( - "\n" - "For various reasons, one may wish to keep several different\n" - "configurations available on a single machine.\n" - "\n" - "If you have saved a previous configuration in a file other than the\n" - "default one, entering its name here will allow you to modify that\n" - "configuration.\n" - "\n" - "If you are uncertain, then you have probably never used alternate\n" - "configuration files. You should therefore 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[] = N_( - "\n" - "For various reasons, one may wish to keep different configurations\n" - "available on a single machine.\n" - "\n" - "Entering a file name here will allow you to later retrieve, modify\n" - "and use the current configuration as an alternate to whatever\n" - "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[] = N_( - "\n" - "Search for symbols and display their relations.\n" - "Regular expressions are allowed.\n" - "Example: search for \"^FOO\"\n" - "Result:\n" - "-----------------------------------------------------------------\n" - "Symbol: FOO [=m]\n" - "Prompt: Foo bus is used to drive the bar HW\n" - "Defined at drivers/pci/Kconfig:47\n" - "Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n" - "Location:\n" - " -> Bus options (PCI, PCMCIA, EISA, MCA, ISA)\n" - " -> PCI support (PCI [=y])\n" - " -> PCI access mode ( [=y])\n" - "Selects: LIBCRC32\n" - "Selected by: BAR\n" - "-----------------------------------------------------------------\n" - "o The line 'Prompt:' shows the text used in the menu structure for\n" - " this symbol\n" - "o The 'Defined at' line tell at what file / line number the symbol\n" - " is defined\n" - "o The 'Depends on:' line tell what symbols needs to be defined for\n" - " this symbol to be visible in the menu (selectable)\n" - "o The 'Location:' lines tell where in the menu structure this symbol\n" - " is located\n" - " A location followed by a [=y] indicate that this is a selectable\n" - " menu item - and current value is displayed inside brackets.\n" - "o The 'Selects:' line tell what symbol will be automatically\n" - " selected if this symbol is selected (y or m)\n" - "o The 'Selected by' line tell what symbol has selected this symbol\n" - "\n" - "Only relevant lines are shown.\n" - "\n\n" - "Search examples:\n" - "Examples: USB => find all symbols containing USB\n" - " ^USB => find all symbols starting with USB\n" - " USB$ => find all symbols ending with USB\n" - "\n"); - -static int indent; -static struct menu *current_menu; -static int child_count; -static int single_menu_mode; -static int show_all_options; - -static void conf(struct menu *menu); -static void conf_choice(struct menu *menu); -static void conf_string(struct menu *menu); -static void conf_load(void); -static void conf_save(void); -static void show_textbox(const char *title, const char *text, int r, int c); -static void show_helptext(const char *title, const char *text); -static void show_help(struct menu *menu); - -static char filename[PATH_MAX+1]; -static void set_config_filename(const char *config_filename) -{ - static char menu_backtitle[PATH_MAX+128]; - int size; - - size = snprintf(menu_backtitle, sizeof(menu_backtitle), - "%s - %s", config_filename, rootmenu.prompt->text); - if (size >= sizeof(menu_backtitle)) - menu_backtitle[sizeof(menu_backtitle)-1] = '\0'; - set_dialog_backtitle(menu_backtitle); - - size = snprintf(filename, sizeof(filename), "%s", config_filename); - if (size >= sizeof(filename)) - filename[sizeof(filename)-1] = '\0'; -} - - -static void search_conf(void) -{ - struct symbol **sym_arr; - struct gstr res; - char *dialog_input; - int dres; -again: - dialog_clear(); - dres = dialog_inputbox(_("Search Configuration Parameter"), - _("Enter " CONFIG_ " (sub)string to search for " - "(with or without \"" CONFIG_ "\")"), - 10, 75, ""); - switch (dres) { - case 0: - break; - case 1: - show_helptext(_("Search Configuration"), search_help); - goto again; - default: - return; - } - - /* strip the prefix if necessary */ - dialog_input = dialog_input_result; - if (strncasecmp(dialog_input_result, CONFIG_, strlen(CONFIG_)) == 0) - dialog_input += strlen(CONFIG_); - - sym_arr = sym_re_search(dialog_input); - res = get_relations_str(sym_arr); - free(sym_arr); - show_textbox(_("Search Results"), str_get(&res), 0, 0); - str_free(&res); -} - -static void build_conf(struct menu *menu) -{ - struct symbol *sym; - struct property *prop; - struct menu *child; - int type, tmp, doint = 2; - tristate val; - char ch; - bool visible; - - /* - * note: menu_is_visible() has side effect that it will - * recalc the value of the symbol. - */ - visible = menu_is_visible(menu); - if (show_all_options && !menu_has_prompt(menu)) - return; - else if (!show_all_options && !visible) - return; - - sym = menu->sym; - prop = menu->prompt; - if (!sym) { - if (prop && menu != current_menu) { - const char *prompt = menu_get_prompt(menu); - switch (prop->type) { - case P_MENU: - child_count++; - prompt = _(prompt); - if (single_menu_mode) { - item_make("%s%*c%s", - menu->data ? "-->" : "++>", - indent + 1, ' ', prompt); - } else - item_make(" %*c%s --->", indent + 1, ' ', prompt); - - item_set_tag('m'); - item_set_data(menu); - if (single_menu_mode && menu->data) - goto conf_childs; - return; - case P_COMMENT: - if (prompt) { - child_count++; - item_make(" %*c*** %s ***", indent + 1, ' ', _(prompt)); - item_set_tag(':'); - item_set_data(menu); - } - break; - default: - if (prompt) { - child_count++; - item_make("---%*c%s", indent + 1, ' ', _(prompt)); - item_set_tag(':'); - item_set_data(menu); - } - } - } else - doint = 0; - goto conf_childs; - } - - type = sym_get_type(sym); - if (sym_is_choice(sym)) { - struct symbol *def_sym = sym_get_choice_value(sym); - struct menu *def_menu = NULL; - - child_count++; - for (child = menu->list; child; child = child->next) { - if (menu_is_visible(child) && child->sym == def_sym) - def_menu = child; - } - - val = sym_get_tristate_value(sym); - if (sym_is_changable(sym)) { - switch (type) { - case S_BOOLEAN: - item_make("[%c]", val == no ? ' ' : '*'); - break; - case S_TRISTATE: - switch (val) { - case yes: ch = '*'; break; - case mod: ch = 'M'; break; - default: ch = ' '; break; - } - item_make("<%c>", ch); - break; - } - item_set_tag('t'); - item_set_data(menu); - } else { - item_make(" "); - item_set_tag(def_menu ? 't' : ':'); - item_set_data(menu); - } - - item_add_str("%*c%s", indent + 1, ' ', _(menu_get_prompt(menu))); - if (val == yes) { - if (def_menu) { - item_add_str(" (%s)", _(menu_get_prompt(def_menu))); - item_add_str(" --->"); - if (def_menu->list) { - indent += 2; - build_conf(def_menu); - indent -= 2; - } - } - return; - } - } else { - if (menu == current_menu) { - item_make("---%*c%s", indent + 1, ' ', _(menu_get_prompt(menu))); - item_set_tag(':'); - item_set_data(menu); - goto conf_childs; - } - child_count++; - val = sym_get_tristate_value(sym); - if (sym_is_choice_value(sym) && val == yes) { - item_make(" "); - item_set_tag(':'); - item_set_data(menu); - } else { - switch (type) { - case S_BOOLEAN: - if (sym_is_changable(sym)) - item_make("[%c]", val == no ? ' ' : '*'); - else - item_make("-%c-", val == no ? ' ' : '*'); - item_set_tag('t'); - item_set_data(menu); - break; - case S_TRISTATE: - switch (val) { - case yes: ch = '*'; break; - case mod: ch = 'M'; break; - default: ch = ' '; break; - } - if (sym_is_changable(sym)) { - if (sym->rev_dep.tri == mod) - item_make("{%c}", ch); - else - item_make("<%c>", ch); - } else - item_make("-%c-", ch); - item_set_tag('t'); - item_set_data(menu); - break; - default: - tmp = 2 + strlen(sym_get_string_value(sym)); /* () = 2 */ - item_make("(%s)", sym_get_string_value(sym)); - tmp = indent - tmp + 4; - if (tmp < 0) - tmp = 0; - item_add_str("%*c%s%s", tmp, ' ', _(menu_get_prompt(menu)), - (sym_has_value(sym) || !sym_is_changable(sym)) ? - "" : _(" (NEW)")); - item_set_tag('s'); - item_set_data(menu); - goto conf_childs; - } - } - item_add_str("%*c%s%s", indent + 1, ' ', _(menu_get_prompt(menu)), - (sym_has_value(sym) || !sym_is_changable(sym)) ? - "" : _(" (NEW)")); - if (menu->prompt->type == P_MENU) { - item_add_str(" --->"); - return; - } - } - -conf_childs: - indent += doint; - for (child = menu->list; child; child = child->next) - build_conf(child); - indent -= doint; -} - -static void conf(struct menu *menu) -{ - struct menu *submenu; - const char *prompt = menu_get_prompt(menu); - struct symbol *sym; - struct menu *active_menu = NULL; - int res; - int s_scroll = 0; - - while (1) { - item_reset(); - current_menu = menu; - build_conf(menu); - if (!child_count) - break; - if (menu == &rootmenu) { - item_make("--- "); - item_set_tag(':'); - item_make(_(" Load an Alternate Configuration File")); - item_set_tag('L'); - item_make(_(" Save an Alternate Configuration File")); - item_set_tag('S'); - } - dialog_clear(); - res = dialog_menu(prompt ? _(prompt) : _("Main Menu"), - _(menu_instructions), - active_menu, &s_scroll); - if (res == 1 || res == KEY_ESC || res == -ERRDISPLAYTOOSMALL) - break; - if (!item_activate_selected()) - continue; - if (!item_tag()) - continue; - - submenu = item_data(); - active_menu = item_data(); - if (submenu) - sym = submenu->sym; - else - sym = NULL; - - switch (res) { - case 0: - switch (item_tag()) { - case 'm': - if (single_menu_mode) - submenu->data = (void *) (long) !submenu->data; - else - conf(submenu); - break; - case 't': - if (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes) - conf_choice(submenu); - else if (submenu->prompt->type == P_MENU) - conf(submenu); - break; - case 's': - conf_string(submenu); - break; - case 'L': - conf_load(); - break; - case 'S': - conf_save(); - break; - } - break; - case 2: - if (sym) - show_help(submenu); - else - show_helptext(_("README"), _(mconf_readme)); - break; - case 3: - if (item_is_tag('t')) { - if (sym_set_tristate_value(sym, yes)) - break; - if (sym_set_tristate_value(sym, mod)) - show_textbox(NULL, setmod_text, 6, 74); - } - break; - case 4: - if (item_is_tag('t')) - sym_set_tristate_value(sym, no); - break; - case 5: - if (item_is_tag('t')) - sym_set_tristate_value(sym, mod); - break; - case 6: - if (item_is_tag('t')) - sym_toggle_tristate_value(sym); - else if (item_is_tag('m')) - conf(submenu); - break; - case 7: - search_conf(); - break; - case 8: - show_all_options = !show_all_options; - break; - } - } -} - -static void show_textbox(const char *title, const char *text, int r, int c) -{ - dialog_clear(); - dialog_textbox(title, text, r, c); -} - -static void show_helptext(const char *title, const char *text) -{ - show_textbox(title, text, 0, 0); -} - -static void show_help(struct menu *menu) -{ - struct gstr help = str_new(); - - help.max_width = getmaxx(stdscr) - 10; - menu_get_ext_help(menu, &help); - - show_helptext(_(menu_get_prompt(menu)), str_get(&help)); - str_free(&help); -} - -static void conf_choice(struct menu *menu) -{ - const char *prompt = _(menu_get_prompt(menu)); - struct menu *child; - struct symbol *active; - - active = sym_get_choice_value(menu->sym); - while (1) { - int res; - int selected; - item_reset(); - - current_menu = menu; - for (child = menu->list; child; child = child->next) { - if (!menu_is_visible(child)) - continue; - if (child->sym) - item_make("%s", _(menu_get_prompt(child))); - else { - item_make("*** %s ***", _(menu_get_prompt(child))); - item_set_tag(':'); - } - item_set_data(child); - if (child->sym == active) - item_set_selected(1); - if (child->sym == sym_get_choice_value(menu->sym)) - item_set_tag('X'); - } - dialog_clear(); - res = dialog_checklist(prompt ? _(prompt) : _("Main Menu"), - _(radiolist_instructions), - 15, 70, 6); - selected = item_activate_selected(); - switch (res) { - case 0: - if (selected) { - child = item_data(); - if (!child->sym) - break; - - sym_set_tristate_value(child->sym, yes); - } - return; - case 1: - if (selected) { - child = item_data(); - show_help(child); - active = child->sym; - } else - show_help(menu); - break; - case KEY_ESC: - return; - case -ERRDISPLAYTOOSMALL: - return; - } - } -} - -static void conf_string(struct menu *menu) -{ - const char *prompt = menu_get_prompt(menu); - - while (1) { - int res; - const char *heading; - - switch (sym_get_type(menu->sym)) { - case S_INT: - heading = _(inputbox_instructions_int); - break; - case S_HEX: - heading = _(inputbox_instructions_hex); - break; - case S_STRING: - heading = _(inputbox_instructions_string); - break; - default: - heading = _("Internal mconf error!"); - } - dialog_clear(); - res = dialog_inputbox(prompt ? _(prompt) : _("Main Menu"), - heading, 10, 75, - sym_get_string_value(menu->sym)); - switch (res) { - case 0: - if (sym_set_string_value(menu->sym, dialog_input_result)) - return; - show_textbox(NULL, _("You have made an invalid entry."), 5, 43); - break; - case 1: - show_help(menu); - break; - case KEY_ESC: - return; - } - } -} - -static void conf_load(void) -{ - - while (1) { - int res; - dialog_clear(); - res = dialog_inputbox(NULL, load_config_text, - 11, 55, filename); - switch(res) { - case 0: - if (!dialog_input_result[0]) - return; - if (!conf_read(dialog_input_result)) { - set_config_filename(dialog_input_result); - sym_set_change_count(1); - return; - } - show_textbox(NULL, _("File does not exist!"), 5, 38); - break; - case 1: - show_helptext(_("Load Alternate Configuration"), load_config_help); - break; - case KEY_ESC: - return; - } - } -} - -static void conf_save(void) -{ - while (1) { - int res; - dialog_clear(); - res = dialog_inputbox(NULL, save_config_text, - 11, 55, filename); - switch(res) { - case 0: - if (!dialog_input_result[0]) - return; - if (!conf_write(dialog_input_result)) { - set_config_filename(dialog_input_result); - return; - } - show_textbox(NULL, _("Can't create file! Probably a nonexistent directory."), 5, 60); - break; - case 1: - show_helptext(_("Save Alternate Configuration"), save_config_help); - break; - case KEY_ESC: - return; - } - } -} - -int main(int ac, char **av) -{ - int saved_x, saved_y; - char *mode; - int res; - - setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); - - conf_parse(av[1]); - conf_read(NULL); - - mode = getenv("MENUCONFIG_MODE"); - if (mode) { - if (!strcasecmp(mode, "single_menu")) - single_menu_mode = 1; - } - - initscr(); - - getyx(stdscr, saved_y, saved_x); - if (init_dialog(NULL)) { - 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")); - return 1; - } - - set_config_filename(conf_get_configname()); - do { - conf(&rootmenu); - dialog_clear(); - if (conf_get_changed()) - res = dialog_yesno(NULL, - _("Do you wish to save your " - "new configuration?\n" - " to continue."), - 6, 60); - else - res = -1; - } while (res == KEY_ESC); - end_dialog(saved_x, saved_y); - - switch (res) { - case 0: - if (conf_write(filename)) { - fprintf(stderr, _("\n\n" - "Error while writing of the configuration.\n" - "Your configuration changes were NOT saved." - "\n\n")); - return 1; - } - case -1: - printf(_("\n\n" - "*** End of the configuration.\n" - "*** Execute 'make' to start the build or try 'make help'." - "\n\n")); - break; - default: - fprintf(stderr, _("\n\n" - "Your configuration changes were NOT saved." - "\n\n")); - } - - return 0; -} - diff --git a/package/config/menu.c b/package/config/menu.c deleted file mode 100644 index d49f8b8..0000000 --- a/package/config/menu.c +++ /dev/null @@ -1,609 +0,0 @@ -/* - * Copyright (C) 2002 Roman Zippel - * Released under the terms of the GNU GPL v2.0. - */ - -#include -#include - -#define LKC_DIRECT_LINK -#include "lkc.h" - -static const char nohelp_text[] = N_( - "There is no help available for this option.\n"); - -struct menu rootmenu; -static struct menu **last_entry_ptr; - -struct file *file_list; -struct file *current_file; - -void menu_warn(struct menu *menu, const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - fprintf(stderr, "%s:%d:warning: ", menu->file->name, menu->lineno); - vfprintf(stderr, fmt, ap); - fprintf(stderr, "\n"); - va_end(ap); -} - -static void prop_warn(struct property *prop, const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - fprintf(stderr, "%s:%d:warning: ", prop->file->name, prop->lineno); - vfprintf(stderr, fmt, ap); - fprintf(stderr, "\n"); - va_end(ap); -} - -void _menu_init(void) -{ - current_entry = current_menu = &rootmenu; - last_entry_ptr = &rootmenu.list; -} - -void menu_add_entry(struct symbol *sym) -{ - struct menu *menu; - - menu = malloc(sizeof(*menu)); - memset(menu, 0, sizeof(*menu)); - menu->sym = sym; - menu->parent = current_menu; - menu->file = current_file; - menu->lineno = zconf_lineno(); - - *last_entry_ptr = menu; - last_entry_ptr = &menu->next; - current_entry = menu; - if (sym) - menu_add_symbol(P_SYMBOL, sym, NULL); -} - -void menu_end_entry(void) -{ -} - -struct menu *menu_add_menu(void) -{ - menu_end_entry(); - last_entry_ptr = ¤t_entry->list; - return current_menu = current_entry; -} - -void menu_end_menu(void) -{ - last_entry_ptr = ¤t_menu->next; - current_menu = current_menu->parent; -} - -static struct expr *menu_check_dep(struct expr *e) -{ - if (!e) - return e; - - switch (e->type) { - case E_NOT: - e->left.expr = menu_check_dep(e->left.expr); - break; - case E_OR: - case E_AND: - e->left.expr = menu_check_dep(e->left.expr); - e->right.expr = menu_check_dep(e->right.expr); - break; - case E_SYMBOL: - /* change 'm' into 'm' && MODULES */ - if (e->left.sym == &symbol_mod) - return expr_alloc_and(e, expr_alloc_symbol(modules_sym)); - break; - default: - break; - } - return e; -} - -void menu_add_dep(struct expr *dep) -{ - current_entry->dep = expr_alloc_and(current_entry->dep, menu_check_dep(dep)); -} - -void menu_set_type(int type) -{ - struct symbol *sym = current_entry->sym; - - if (sym->type == type) - return; - if (sym->type == S_UNKNOWN) { - sym->type = type; - return; - } - menu_warn(current_entry, "type of '%s' redefined from '%s' to '%s'", - sym->name ? sym->name : "", - sym_type_name(sym->type), sym_type_name(type)); -} - -struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep) -{ - struct property *prop = prop_alloc(type, current_entry->sym); - - prop->menu = current_entry; - prop->expr = expr; - prop->visible.expr = menu_check_dep(dep); - - if (prompt) { - if (isspace(*prompt)) { - prop_warn(prop, "leading whitespace ignored"); - while (isspace(*prompt)) - prompt++; - } - if (current_entry->prompt && current_entry != &rootmenu) - prop_warn(prop, "prompt redefined"); - - /* Apply all upper menus' visibilities to actual prompts. */ - if(type == P_PROMPT) { - struct menu *menu = current_entry; - - while ((menu = menu->parent) != NULL) { - if (!menu->visibility) - continue; - prop->visible.expr - = expr_alloc_and(prop->visible.expr, - menu->visibility); - } - } - - current_entry->prompt = prop; - } - prop->text = prompt; - - return prop; -} - -struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep) -{ - return menu_add_prop(type, prompt, NULL, dep); -} - -void menu_add_visibility(struct expr *expr) -{ - current_entry->visibility = expr_alloc_and(current_entry->visibility, - expr); -} - -void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep) -{ - menu_add_prop(type, NULL, expr, dep); -} - -void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep) -{ - menu_add_prop(type, NULL, expr_alloc_symbol(sym), dep); -} - -void menu_add_option(int token, char *arg) -{ - struct property *prop; - - switch (token) { - case T_OPT_MODULES: - prop = prop_alloc(P_DEFAULT, modules_sym); - prop->expr = expr_alloc_symbol(current_entry->sym); - break; - case T_OPT_DEFCONFIG_LIST: - if (!sym_defconfig_list) - sym_defconfig_list = current_entry->sym; - else if (sym_defconfig_list != current_entry->sym) - zconf_error("trying to redefine defconfig symbol"); - break; - case T_OPT_ENV: - prop_add_env(arg); - break; - } -} - -static int menu_validate_number(struct symbol *sym, struct symbol *sym2) -{ - return sym2->type == S_INT || sym2->type == S_HEX || - (sym2->type == S_UNKNOWN && sym_string_valid(sym, sym2->name)); -} - -static void sym_check_prop(struct symbol *sym) -{ - struct property *prop; - struct symbol *sym2; - for (prop = sym->prop; prop; prop = prop->next) { - switch (prop->type) { - case P_DEFAULT: - if ((sym->type == S_STRING || sym->type == S_INT || sym->type == S_HEX) && - prop->expr->type != E_SYMBOL) - prop_warn(prop, - "default for config symbol '%s'" - " must be a single symbol", sym->name); - if (prop->expr->type != E_SYMBOL) - break; - sym2 = prop_get_symbol(prop); - if (sym->type == S_HEX || sym->type == S_INT) { - if (!menu_validate_number(sym, sym2)) - prop_warn(prop, - "'%s': number is invalid", - sym->name); - } - break; - case P_SELECT: - sym2 = prop_get_symbol(prop); - if (sym->type != S_BOOLEAN && sym->type != S_TRISTATE) - prop_warn(prop, - "config symbol '%s' uses select, but is " - "not boolean or tristate", sym->name); - else if (sym2->type != S_UNKNOWN && - sym2->type != S_BOOLEAN && - sym2->type != S_TRISTATE) - prop_warn(prop, - "'%s' has wrong type. 'select' only " - "accept arguments of boolean and " - "tristate type", sym2->name); - break; - case P_RANGE: - if (sym->type != S_INT && sym->type != S_HEX) - prop_warn(prop, "range is only allowed " - "for int or hex symbols"); - if (!menu_validate_number(sym, prop->expr->left.sym) || - !menu_validate_number(sym, prop->expr->right.sym)) - prop_warn(prop, "range is invalid"); - break; - default: - ; - } - } -} - -void menu_finalize(struct menu *parent) -{ - struct menu *menu, *last_menu; - struct symbol *sym; - struct property *prop; - struct expr *parentdep, *basedep, *dep, *dep2, **ep; - - sym = parent->sym; - if (parent->list) { - if (sym && sym_is_choice(sym)) { - if (sym->type == S_UNKNOWN) { - /* find the first choice value to find out choice type */ - current_entry = parent; - for (menu = parent->list; menu; menu = menu->next) { - if (menu->sym && menu->sym->type != S_UNKNOWN) { - menu_set_type(menu->sym->type); - break; - } - } - } - /* set the type of the remaining choice values */ - for (menu = parent->list; menu; menu = menu->next) { - current_entry = menu; - if (menu->sym && menu->sym->type == S_UNKNOWN) - menu_set_type(sym->type); - } - parentdep = expr_alloc_symbol(sym); - } else if (parent->prompt) - parentdep = parent->prompt->visible.expr; - else - parentdep = parent->dep; - - for (menu = parent->list; menu; menu = menu->next) { - basedep = expr_transform(menu->dep); - basedep = expr_alloc_and(expr_copy(parentdep), basedep); - basedep = expr_eliminate_dups(basedep); - menu->dep = basedep; - if (menu->sym) - prop = menu->sym->prop; - else - prop = menu->prompt; - for (; prop; prop = prop->next) { - if (prop->menu != menu) - continue; - dep = expr_transform(prop->visible.expr); - dep = expr_alloc_and(expr_copy(basedep), dep); - dep = expr_eliminate_dups(dep); - if (menu->sym && menu->sym->type != S_TRISTATE) - dep = expr_trans_bool(dep); - prop->visible.expr = dep; - if (prop->type == P_SELECT) { - struct symbol *es = prop_get_symbol(prop); - es->rev_dep.expr = expr_alloc_or(es->rev_dep.expr, - expr_alloc_and(expr_alloc_symbol(menu->sym), expr_copy(dep))); - } - } - } - for (menu = parent->list; menu; menu = menu->next) - menu_finalize(menu); - } else if (sym) { - basedep = parent->prompt ? parent->prompt->visible.expr : NULL; - basedep = expr_trans_compare(basedep, E_UNEQUAL, &symbol_no); - basedep = expr_eliminate_dups(expr_transform(basedep)); - last_menu = NULL; - for (menu = parent->next; menu; menu = menu->next) { - dep = menu->prompt ? menu->prompt->visible.expr : menu->dep; - if (!expr_contains_symbol(dep, sym)) - break; - if (expr_depends_symbol(dep, sym)) - goto next; - dep = expr_trans_compare(dep, E_UNEQUAL, &symbol_no); - dep = expr_eliminate_dups(expr_transform(dep)); - dep2 = expr_copy(basedep); - expr_eliminate_eq(&dep, &dep2); - expr_free(dep); - if (!expr_is_yes(dep2)) { - expr_free(dep2); - break; - } - expr_free(dep2); - next: - menu_finalize(menu); - menu->parent = parent; - last_menu = menu; - } - if (last_menu) { - parent->list = parent->next; - parent->next = last_menu->next; - last_menu->next = NULL; - } - - sym->dir_dep.expr = parent->dep; - } - for (menu = parent->list; menu; menu = menu->next) { - if (sym && sym_is_choice(sym) && - menu->sym && !sym_is_choice_value(menu->sym)) { - current_entry = menu; - menu->sym->flags |= SYMBOL_CHOICEVAL; - if (!menu->prompt) - menu_warn(menu, "choice value must have a prompt"); - for (prop = menu->sym->prop; prop; prop = prop->next) { - if (prop->type == P_DEFAULT) - prop_warn(prop, "defaults for choice " - "values not supported"); - if (prop->menu == menu) - continue; - if (prop->type == P_PROMPT && - prop->menu->parent->sym != sym) - prop_warn(prop, "choice value used outside its choice group"); - } - /* Non-tristate choice values of tristate choices must - * depend on the choice being set to Y. The choice - * values' dependencies were propagated to their - * properties above, so the change here must be re- - * propagated. - */ - if (sym->type == S_TRISTATE && menu->sym->type != S_TRISTATE) { - basedep = expr_alloc_comp(E_EQUAL, sym, &symbol_yes); - menu->dep = expr_alloc_and(basedep, menu->dep); - for (prop = menu->sym->prop; prop; prop = prop->next) { - if (prop->menu != menu) - continue; - prop->visible.expr = expr_alloc_and(expr_copy(basedep), - prop->visible.expr); - } - } - menu_add_symbol(P_CHOICE, sym, NULL); - prop = sym_get_choice_prop(sym); - for (ep = &prop->expr; *ep; ep = &(*ep)->left.expr) - ; - *ep = expr_alloc_one(E_LIST, NULL); - (*ep)->right.sym = menu->sym; - } - if (menu->list && (!menu->prompt || !menu->prompt->text)) { - for (last_menu = menu->list; ; last_menu = last_menu->next) { - last_menu->parent = parent; - if (!last_menu->next) - break; - } - last_menu->next = menu->next; - menu->next = menu->list; - menu->list = NULL; - } - } - - if (sym && !(sym->flags & SYMBOL_WARNED)) { - if (sym->type == S_UNKNOWN) - menu_warn(parent, "config symbol defined without type"); - - if (sym_is_choice(sym) && !parent->prompt) - menu_warn(parent, "choice must have a prompt"); - - /* Check properties connected to this symbol */ - sym_check_prop(sym); - sym->flags |= SYMBOL_WARNED; - } - - if (sym && !sym_is_optional(sym) && parent->prompt) { - sym->rev_dep.expr = expr_alloc_or(sym->rev_dep.expr, - expr_alloc_and(parent->prompt->visible.expr, - expr_alloc_symbol(&symbol_mod))); - } -} - -bool menu_has_prompt(struct menu *menu) -{ - if (!menu->prompt) - return false; - return true; -} - -bool menu_is_visible(struct menu *menu) -{ - struct menu *child; - struct symbol *sym; - tristate visible; - - if (!menu->prompt) - return false; - - if (menu->visibility) { - if (expr_calc_value(menu->visibility) == no) - return no; - } - - sym = menu->sym; - if (sym) { - sym_calc_value(sym); - visible = menu->prompt->visible.tri; - } else - visible = menu->prompt->visible.tri = expr_calc_value(menu->prompt->visible.expr); - - if (visible != no) - return true; - - if (!sym || sym_get_tristate_value(menu->sym) == no) - return false; - - for (child = menu->list; child; child = child->next) { - if (menu_is_visible(child)) { - if (sym) - sym->flags |= SYMBOL_DEF_USER; - return true; - } - } - - return false; -} - -const char *menu_get_prompt(struct menu *menu) -{ - if (menu->prompt) - return menu->prompt->text; - else if (menu->sym) - return menu->sym->name; - return NULL; -} - -struct menu *menu_get_root_menu(struct menu *menu) -{ - return &rootmenu; -} - -struct menu *menu_get_parent_menu(struct menu *menu) -{ - enum prop_type type; - - for (; menu != &rootmenu; menu = menu->parent) { - type = menu->prompt ? menu->prompt->type : 0; - if (type == P_MENU) - break; - } - return menu; -} - -bool menu_has_help(struct menu *menu) -{ - return menu->help != NULL; -} - -const char *menu_get_help(struct menu *menu) -{ - if (menu->help) - return menu->help; - else - return ""; -} - -static void get_prompt_str(struct gstr *r, struct property *prop) -{ - int i, j; - struct menu *submenu[8], *menu; - - str_printf(r, _("Prompt: %s\n"), _(prop->text)); - str_printf(r, _(" Defined at %s:%d\n"), prop->menu->file->name, - prop->menu->lineno); - if (!expr_is_yes(prop->visible.expr)) { - str_append(r, _(" Depends on: ")); - expr_gstr_print(prop->visible.expr, r); - str_append(r, "\n"); - } - menu = prop->menu->parent; - for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent) - submenu[i++] = menu; - if (i > 0) { - str_printf(r, _(" Location:\n")); - for (j = 4; --i >= 0; j += 2) { - menu = submenu[i]; - str_printf(r, "%*c-> %s", j, ' ', _(menu_get_prompt(menu))); - if (menu->sym) { - str_printf(r, " (%s [=%s])", menu->sym->name ? - menu->sym->name : _(""), - sym_get_string_value(menu->sym)); - } - str_append(r, "\n"); - } - } -} - -void get_symbol_str(struct gstr *r, struct symbol *sym) -{ - bool hit; - struct property *prop; - - if (sym && sym->name) { - str_printf(r, "Symbol: %s [=%s]\n", sym->name, - sym_get_string_value(sym)); - str_printf(r, "Type : %s\n", sym_type_name(sym->type)); - if (sym->type == S_INT || sym->type == S_HEX) { - prop = sym_get_range_prop(sym); - if (prop) { - str_printf(r, "Range : "); - expr_gstr_print(prop->expr, r); - str_append(r, "\n"); - } - } - } - for_all_prompts(sym, prop) - get_prompt_str(r, prop); - hit = false; - for_all_properties(sym, prop, P_SELECT) { - if (!hit) { - str_append(r, " Selects: "); - hit = true; - } else - str_printf(r, " && "); - expr_gstr_print(prop->expr, r); - } - if (hit) - str_append(r, "\n"); - if (sym->rev_dep.expr) { - str_append(r, _(" Selected by: ")); - expr_gstr_print(sym->rev_dep.expr, r); - str_append(r, "\n"); - } - str_append(r, "\n\n"); -} - -struct gstr get_relations_str(struct symbol **sym_arr) -{ - struct symbol *sym; - struct gstr res = str_new(); - int i; - - for (i = 0; sym_arr && (sym = sym_arr[i]); i++) - get_symbol_str(&res, sym); - if (!i) - str_append(&res, _("No matches found.\n")); - return res; -} - - -void menu_get_ext_help(struct menu *menu, struct gstr *help) -{ - struct symbol *sym = menu->sym; - - if (menu_has_help(menu)) { - if (sym->name) { - str_printf(help, "%s:\n\n", sym->name); - str_append(help, _(menu_get_help(menu))); - str_append(help, "\n"); - } - } else { - str_append(help, nohelp_text); - } - if (sym) - get_symbol_str(help, sym); -} diff --git a/package/config/nconf.c b/package/config/nconf.c deleted file mode 100644 index db56377..0000000 --- a/package/config/nconf.c +++ /dev/null @@ -1,1561 +0,0 @@ -/* - * Copyright (C) 2008 Nir Tzachar -#define LKC_DIRECT_LINK -#include "lkc.h" -#include "nconf.h" -#include - -static const char nconf_readme[] = N_( -"Overview\n" -"--------\n" -"This interface let you select features and parameters for the build.\n" -"Features can either be built-in, modularized, or ignored. Parameters\n" -"must be entered in as decimal or hexadecimal numbers or text.\n" -"\n" -"Menu items beginning with following braces represent features that\n" -" [ ] can be built in or removed\n" -" < > can be built in, modularized or removed\n" -" { } can be built in or modularized (selected by other feature)\n" -" - - are selected by other feature,\n" -" XXX cannot be selected. Use Symbol Info to find out why,\n" -"while *, M or whitespace inside braces means to build in, build as\n" -"a module or to exclude the feature respectively.\n" -"\n" -"To change any of these features, highlight it with the cursor\n" -"keys and press to build it in, to make it a module or\n" -" to removed it. You may also press the to cycle\n" -"through the available options (ie. Y->N->M->Y).\n" -"\n" -"Some additional keyboard hints:\n" -"\n" -"Menus\n" -"----------\n" -"o Use the Up/Down arrow keys (cursor keys) to highlight the item\n" -" you wish to change use or . Goto submenu by \n" -" pressing of . Use or to go back.\n" -" Submenus are designated by \"--->\".\n" -"\n" -" Searching: pressing '/' triggers interactive search mode.\n" -" nconfig performs a case insensitive search for the string\n" -" in the menu prompts (no regex support).\n" -" Pressing the up/down keys highlights the previous/next\n" -" matching item. Backspace removes one character from the\n" -" match string. Pressing either '/' again or ESC exits\n" -" search mode. All other keys behave normally.\n" -"\n" -" You may also use the and keys to scroll\n" -" unseen options into view.\n" -"\n" -"o To exit a menu use the just press or .\n" -"\n" -"o To get help with an item, press \n" -" Shortcut: Press or .\n" -"\n" -"\n" -"Radiolists (Choice lists)\n" -"-----------\n" -"o Use the cursor keys to select the option you wish to set and press\n" -" or the .\n" -"\n" -" Shortcut: Press the first letter of the option you wish to set then\n" -" press or .\n" -"\n" -"o To see available help for the item, press \n" -" Shortcut: Press or .\n" -"\n" -"\n" -"Data Entry\n" -"-----------\n" -"o Enter the requested information and press \n" -" If you are entering hexadecimal values, it is not necessary to\n" -" add the '0x' prefix to the entry.\n" -"\n" -"o For help, press .\n" -"\n" -"\n" -"Text Box (Help Window)\n" -"--------\n" -"o Use the cursor keys to scroll up/down/left/right. The VI editor\n" -" keys h,j,k,l function here as do for those\n" -" who are familiar with less and lynx.\n" -"\n" -"o Press , , , or to exit.\n" -"\n" -"\n" -"Alternate Configuration Files\n" -"-----------------------------\n" -"nconfig supports the use of alternate configuration files for\n" -"those who, for various reasons, find it necessary to switch\n" -"between different configurations.\n" -"\n" -"At the end of the main menu you will find two options. One is\n" -"for saving the current configuration to a file of your choosing.\n" -"The other option is for loading a previously saved alternate\n" -"configuration.\n" -"\n" -"Even if you don't use alternate configuration files, but you\n" -"find during a nconfig session that you have completely messed\n" -"up your settings, you may use the \"Load Alternate...\" option to\n" -"restore your previously saved settings from \".config\" without\n" -"restarting nconfig.\n" -"\n" -"Other information\n" -"-----------------\n" -"If you use nconfig in an XTERM window make sure you have your\n" -"$TERM variable set to point to a xterm definition which supports color.\n" -"Otherwise, nconfig will look rather bad. nconfig will not\n" -"display correctly in a RXVT window because rxvt displays only one\n" -"intensity of color, bright.\n" -"\n" -"nconfig will display larger menus on screens or xterms which are\n" -"set to display more than the standard 25 row by 80 column geometry.\n" -"In order for this to work, the \"stty size\" command must be able to\n" -"display the screen's current row and column geometry. I STRONGLY\n" -"RECOMMEND that you make sure you do NOT have the shell variables\n" -"LINES and COLUMNS exported into your environment. Some distributions\n" -"export those variables via /etc/profile. Some ncurses programs can\n" -"become confused when those variables (LINES & COLUMNS) don't reflect\n" -"the true screen size.\n" -"\n" -"Optional personality available\n" -"------------------------------\n" -"If you prefer to have all of the options listed in a single menu, rather\n" -"than the default multimenu hierarchy, run the nconfig with NCONFIG_MODE\n" -"environment variable set to single_menu. Example:\n" -"\n" -"make NCONFIG_MODE=single_menu nconfig\n" -"\n" -" will then unroll the appropriate category, or enfold it if it\n" -"is already unrolled.\n" -"\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" -"\n"), -menu_no_f_instructions[] = N_( -" You do not have function keys support. Please follow the\n" -" following instructions:\n" -" Arrow keys navigate the menu.\n" -" or selects submenus --->.\n" -" Capital Letters are hotkeys.\n" -" Pressing includes, excludes, modularizes features.\n" -" Pressing SpaceBar toggles between the above options.\n" -" Press or to go back one menu,\n" -" or for Help, for Search.\n" -" <1> is interchangeable with , <2> with , etc.\n" -" Legend: [*] built-in [ ] excluded module < > module capable.\n" -" always leaves the current window.\n"), -menu_instructions[] = N_( -" Arrow keys navigate the menu.\n" -" or selects submenus --->.\n" -" Capital Letters are hotkeys.\n" -" Pressing includes, excludes, modularizes features.\n" -" Pressing SpaceBar toggles between the above options\n" -" Press , or to go back one menu,\n" -" , or for Help, for Search.\n" -" <1> is interchangeable with , <2> with , etc.\n" -" Legend: [*] built-in [ ] excluded module < > module capable.\n" -" always leaves the current window\n"), -radiolist_instructions[] = N_( -" Use the arrow keys to navigate this window or\n" -" press the hotkey of the item you wish to select\n" -" followed by the .\n" -" Press , or for additional information about this option.\n"), -inputbox_instructions_int[] = N_( -"Please enter a decimal value.\n" -"Fractions will not be accepted.\n" -"Press to accept, to cancel."), -inputbox_instructions_hex[] = N_( -"Please enter a hexadecimal value.\n" -"Press to accept, to cancel."), -inputbox_instructions_string[] = N_( -"Please enter a string value.\n" -"Press to accept, to cancel."), -setmod_text[] = N_( -"This feature depends on another which\n" -"has been configured as a module.\n" -"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.\n" -"Accept the name shown to restore the configuration you\n" -"last retrieved. Leave blank to abort."), -load_config_help[] = N_( -"\n" -"For various reasons, one may wish to keep several different\n" -"configurations available on a single machine.\n" -"\n" -"If you have saved a previous configuration in a file other than the\n" -"default one, entering its name here will allow you to modify that\n" -"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[] = N_( -"Enter a filename to which this configuration should be saved\n" -"as an alternate. Leave blank to abort."), -save_config_help[] = N_( -"\n" -"For various reasons, one may wish to keep different configurations\n" -"available on a single machine.\n" -"\n" -"Entering a file name here will allow you to later retrieve, modify\n" -"and use the current configuration as an alternate to whatever\n" -"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[] = N_( -"\n" -"Search for symbols and display their relations. Regular expressions\n" -"are allowed.\n" -"Example: search for \"^FOO\"\n" -"Result:\n" -"-----------------------------------------------------------------\n" -"Symbol: FOO [ = m]\n" -"Prompt: Foo bus is used to drive the bar HW\n" -"Defined at drivers/pci/Kconfig:47\n" -"Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n" -"Location:\n" -" -> Bus options (PCI, PCMCIA, EISA, MCA, ISA)\n" -" -> PCI support (PCI [ = y])\n" -" -> PCI access mode ( [ = y])\n" -"Selects: LIBCRC32\n" -"Selected by: BAR\n" -"-----------------------------------------------------------------\n" -"o The line 'Prompt:' shows the text used in the menu structure for\n" -" this symbol\n" -"o The 'Defined at' line tell at what file / line number the symbol\n" -" is defined\n" -"o The 'Depends on:' line tell what symbols needs to be defined for\n" -" this symbol to be visible in the menu (selectable)\n" -"o The 'Location:' lines tell where in the menu structure this symbol\n" -" is located\n" -" A location followed by a [ = y] indicate that this is a selectable\n" -" menu item - and current value is displayed inside brackets.\n" -"o The 'Selects:' line tell what symbol will be automatically\n" -" selected if this symbol is selected (y or m)\n" -"o The 'Selected by' line tell what symbol has selected this symbol\n" -"\n" -"Only relevant lines are shown.\n" -"\n\n" -"Search examples:\n" -"Examples: USB => find all symbols containing USB\n" -" ^USB => find all symbols starting with USB\n" -" USB$ => find all symbols ending with USB\n" -"\n"); - -struct mitem { - char str[256]; - char tag; - void *usrptr; - int is_visible; -}; - -#define MAX_MENU_ITEMS 4096 -static int show_all_items; -static int indent; -static struct menu *current_menu; -static int child_count; -static int single_menu_mode; -/* the window in which all information appears */ -static WINDOW *main_window; -/* the largest size of the menu window */ -static int mwin_max_lines; -static int mwin_max_cols; -/* the window in which we show option buttons */ -static MENU *curses_menu; -static ITEM *curses_menu_items[MAX_MENU_ITEMS]; -static struct mitem k_menu_items[MAX_MENU_ITEMS]; -static int items_num; -static int global_exit; -/* the currently selected button */ -const char *current_instructions = menu_instructions; - -static void conf(struct menu *menu); -static void conf_choice(struct menu *menu); -static void conf_string(struct menu *menu); -static void conf_load(void); -static void conf_save(void); -static void show_help(struct menu *menu); -static int do_exit(void); -static void setup_windows(void); -static void search_conf(void); - -typedef void (*function_key_handler_t)(int *key, struct menu *menu); -static void handle_f1(int *key, struct menu *current_item); -static void handle_f2(int *key, struct menu *current_item); -static void handle_f3(int *key, struct menu *current_item); -static void handle_f4(int *key, struct menu *current_item); -static void handle_f5(int *key, struct menu *current_item); -static void handle_f6(int *key, struct menu *current_item); -static void handle_f7(int *key, struct menu *current_item); -static void handle_f8(int *key, struct menu *current_item); -static void handle_f9(int *key, struct menu *current_item); - -struct function_keys { - const char *key_str; - const char *func; - function_key key; - function_key_handler_t handler; -}; - -static const int function_keys_num = 9; -struct function_keys function_keys[] = { - { - .key_str = "F1", - .func = "Help", - .key = F_HELP, - .handler = handle_f1, - }, - { - .key_str = "F2", - .func = "Sym Info", - .key = F_SYMBOL, - .handler = handle_f2, - }, - { - .key_str = "F3", - .func = "Insts", - .key = F_INSTS, - .handler = handle_f3, - }, - { - .key_str = "F4", - .func = "Config", - .key = F_CONF, - .handler = handle_f4, - }, - { - .key_str = "F5", - .func = "Back", - .key = F_BACK, - .handler = handle_f5, - }, - { - .key_str = "F6", - .func = "Save", - .key = F_SAVE, - .handler = handle_f6, - }, - { - .key_str = "F7", - .func = "Load", - .key = F_LOAD, - .handler = handle_f7, - }, - { - .key_str = "F8", - .func = "Sym Search", - .key = F_SEARCH, - .handler = handle_f8, - }, - { - .key_str = "F9", - .func = "Exit", - .key = F_EXIT, - .handler = handle_f9, - }, -}; - -static void print_function_line(void) -{ - int i; - int offset = 1; - const int skip = 1; - - for (i = 0; i < function_keys_num; i++) { - wattrset(main_window, attributes[FUNCTION_HIGHLIGHT]); - mvwprintw(main_window, LINES-3, offset, - "%s", - function_keys[i].key_str); - wattrset(main_window, attributes[FUNCTION_TEXT]); - offset += strlen(function_keys[i].key_str); - mvwprintw(main_window, LINES-3, - offset, "%s", - function_keys[i].func); - offset += strlen(function_keys[i].func) + skip; - } - wattrset(main_window, attributes[NORMAL]); -} - -/* help */ -static void handle_f1(int *key, struct menu *current_item) -{ - show_scroll_win(main_window, - _("README"), _(nconf_readme)); - return; -} - -/* symbole help */ -static void handle_f2(int *key, struct menu *current_item) -{ - show_help(current_item); - return; -} - -/* instructions */ -static void handle_f3(int *key, struct menu *current_item) -{ - show_scroll_win(main_window, - _("Instructions"), - _(current_instructions)); - return; -} - -/* config */ -static void handle_f4(int *key, struct menu *current_item) -{ - int res = btn_dialog(main_window, - _("Show all symbols?"), - 2, - " ", - ""); - if (res == 0) - show_all_items = 1; - else if (res == 1) - show_all_items = 0; - - return; -} - -/* back */ -static void handle_f5(int *key, struct menu *current_item) -{ - *key = KEY_LEFT; - return; -} - -/* save */ -static void handle_f6(int *key, struct menu *current_item) -{ - conf_save(); - return; -} - -/* load */ -static void handle_f7(int *key, struct menu *current_item) -{ - conf_load(); - return; -} - -/* search */ -static void handle_f8(int *key, struct menu *current_item) -{ - search_conf(); - return; -} - -/* exit */ -static void handle_f9(int *key, struct menu *current_item) -{ - do_exit(); - return; -} - -/* return != 0 to indicate the key was handles */ -static int process_special_keys(int *key, struct menu *menu) -{ - int i; - - if (*key == KEY_RESIZE) { - setup_windows(); - return 1; - } - - for (i = 0; i < function_keys_num; i++) { - if (*key == KEY_F(function_keys[i].key) || - *key == '0' + function_keys[i].key){ - function_keys[i].handler(key, menu); - return 1; - } - } - - return 0; -} - -static void clean_items(void) -{ - int i; - for (i = 0; curses_menu_items[i]; i++) - free_item(curses_menu_items[i]); - bzero(curses_menu_items, sizeof(curses_menu_items)); - bzero(k_menu_items, sizeof(k_menu_items)); - items_num = 0; -} - -typedef enum {MATCH_TINKER_PATTERN_UP, MATCH_TINKER_PATTERN_DOWN, - FIND_NEXT_MATCH_DOWN, FIND_NEXT_MATCH_UP} match_f; - -/* return the index of the matched item, or -1 if no such item exists */ -static int get_mext_match(const char *match_str, match_f flag) -{ - int match_start = item_index(current_item(curses_menu)); - int index; - - if (flag == FIND_NEXT_MATCH_DOWN) - ++match_start; - else if (flag == FIND_NEXT_MATCH_UP) - --match_start; - - index = match_start; - index = (index + items_num) % items_num; - while (true) { - char *str = k_menu_items[index].str; - if (strcasestr(str, match_str) != 0) - return index; - if (flag == FIND_NEXT_MATCH_UP || - flag == MATCH_TINKER_PATTERN_UP) - --index; - else - ++index; - index = (index + items_num) % items_num; - if (index == match_start) - return -1; - } -} - -/* Make a new item. */ -static void item_make(struct menu *menu, char tag, const char *fmt, ...) -{ - va_list ap; - - if (items_num > MAX_MENU_ITEMS-1) - return; - - bzero(&k_menu_items[items_num], sizeof(k_menu_items[0])); - k_menu_items[items_num].tag = tag; - k_menu_items[items_num].usrptr = menu; - if (menu != NULL) - k_menu_items[items_num].is_visible = - menu_is_visible(menu); - else - k_menu_items[items_num].is_visible = 1; - - va_start(ap, fmt); - vsnprintf(k_menu_items[items_num].str, - sizeof(k_menu_items[items_num].str), - fmt, ap); - va_end(ap); - - if (!k_menu_items[items_num].is_visible) - memcpy(k_menu_items[items_num].str, "XXX", 3); - - curses_menu_items[items_num] = new_item( - k_menu_items[items_num].str, - k_menu_items[items_num].str); - set_item_userptr(curses_menu_items[items_num], - &k_menu_items[items_num]); - /* - if (!k_menu_items[items_num].is_visible) - item_opts_off(curses_menu_items[items_num], O_SELECTABLE); - */ - - items_num++; - curses_menu_items[items_num] = NULL; -} - -/* very hackish. adds a string to the last item added */ -static void item_add_str(const char *fmt, ...) -{ - va_list ap; - int index = items_num-1; - char new_str[256]; - char tmp_str[256]; - - if (index < 0) - return; - - va_start(ap, fmt); - vsnprintf(new_str, sizeof(new_str), fmt, ap); - va_end(ap); - snprintf(tmp_str, sizeof(tmp_str), "%s%s", - k_menu_items[index].str, new_str); - strncpy(k_menu_items[index].str, - tmp_str, - sizeof(k_menu_items[index].str)); - - free_item(curses_menu_items[index]); - curses_menu_items[index] = new_item( - k_menu_items[index].str, - k_menu_items[index].str); - set_item_userptr(curses_menu_items[index], - &k_menu_items[index]); -} - -/* get the tag of the currently selected item */ -static char item_tag(void) -{ - ITEM *cur; - struct mitem *mcur; - - cur = current_item(curses_menu); - if (cur == NULL) - return 0; - mcur = (struct mitem *) item_userptr(cur); - return mcur->tag; -} - -static int curses_item_index(void) -{ - return item_index(current_item(curses_menu)); -} - -static void *item_data(void) -{ - ITEM *cur; - struct mitem *mcur; - - cur = current_item(curses_menu); - if (!cur) - return NULL; - mcur = (struct mitem *) item_userptr(cur); - return mcur->usrptr; - -} - -static int item_is_tag(char tag) -{ - return item_tag() == tag; -} - -static char filename[PATH_MAX+1]; -static char menu_backtitle[PATH_MAX+128]; -static const char *set_config_filename(const char *config_filename) -{ - int size; - - size = snprintf(menu_backtitle, sizeof(menu_backtitle), - "%s - %s", config_filename, rootmenu.prompt->text); - if (size >= sizeof(menu_backtitle)) - menu_backtitle[sizeof(menu_backtitle)-1] = '\0'; - - size = snprintf(filename, sizeof(filename), "%s", config_filename); - if (size >= sizeof(filename)) - filename[sizeof(filename)-1] = '\0'; - return menu_backtitle; -} - -/* return = 0 means we are successful. - * -1 means go on doing what you were doing - */ -static int do_exit(void) -{ - int res; - if (!conf_get_changed()) { - global_exit = 1; - return 0; - } - res = btn_dialog(main_window, - _("Do you wish to save your new configuration?\n" - " to cancel and resume nconfig."), - 2, - " ", - ""); - if (res == KEY_EXIT) { - global_exit = 0; - return -1; - } - - /* if we got here, the user really wants to exit */ - switch (res) { - case 0: - res = conf_write(filename); - if (res) - btn_dialog( - main_window, - _("Error during writing of configuration.\n" - "Your configuration changes were NOT saved."), - 1, - ""); - break; - default: - btn_dialog( - main_window, - _("Your configuration changes were NOT saved."), - 1, - ""); - break; - } - global_exit = 1; - return 0; -} - - -static void search_conf(void) -{ - struct symbol **sym_arr; - struct gstr res; - char dialog_input_result[100]; - char *dialog_input; - int dres; -again: - dres = dialog_inputbox(main_window, - _("Search Configuration Parameter"), - _("Enter " CONFIG_ " (sub)string to search for " - "(with or without \"" CONFIG_ "\")"), - "", dialog_input_result, 99); - switch (dres) { - case 0: - break; - case 1: - show_scroll_win(main_window, - _("Search Configuration"), search_help); - goto again; - default: - return; - } - - /* strip the prefix if necessary */ - dialog_input = dialog_input_result; - if (strncasecmp(dialog_input_result, CONFIG_, strlen(CONFIG_)) == 0) - dialog_input += strlen(CONFIG_); - - sym_arr = sym_re_search(dialog_input); - res = get_relations_str(sym_arr); - free(sym_arr); - show_scroll_win(main_window, - _("Search Results"), str_get(&res)); - str_free(&res); -} - - -static void build_conf(struct menu *menu) -{ - struct symbol *sym; - struct property *prop; - struct menu *child; - int type, tmp, doint = 2; - tristate val; - char ch; - - if (!menu || (!show_all_items && !menu_is_visible(menu))) - return; - - sym = menu->sym; - prop = menu->prompt; - if (!sym) { - if (prop && menu != current_menu) { - const char *prompt = menu_get_prompt(menu); - enum prop_type ptype; - ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; - switch (ptype) { - case P_MENU: - child_count++; - prompt = _(prompt); - if (single_menu_mode) { - item_make(menu, 'm', - "%s%*c%s", - menu->data ? "-->" : "++>", - indent + 1, ' ', prompt); - } else - item_make(menu, 'm', - " %*c%s --->", - indent + 1, - ' ', prompt); - - if (single_menu_mode && menu->data) - goto conf_childs; - return; - case P_COMMENT: - if (prompt) { - child_count++; - item_make(menu, ':', - " %*c*** %s ***", - indent + 1, ' ', - _(prompt)); - } - break; - default: - if (prompt) { - child_count++; - item_make(menu, ':', "---%*c%s", - indent + 1, ' ', - _(prompt)); - } - } - } else - doint = 0; - goto conf_childs; - } - - type = sym_get_type(sym); - if (sym_is_choice(sym)) { - struct symbol *def_sym = sym_get_choice_value(sym); - struct menu *def_menu = NULL; - - child_count++; - for (child = menu->list; child; child = child->next) { - if (menu_is_visible(child) && child->sym == def_sym) - def_menu = child; - } - - val = sym_get_tristate_value(sym); - if (sym_is_changable(sym)) { - switch (type) { - case S_BOOLEAN: - item_make(menu, 't', "[%c]", - val == no ? ' ' : '*'); - break; - case S_TRISTATE: - switch (val) { - case yes: - ch = '*'; - break; - case mod: - ch = 'M'; - break; - default: - ch = ' '; - break; - } - item_make(menu, 't', "<%c>", ch); - break; - } - } else { - item_make(menu, def_menu ? 't' : ':', " "); - } - - item_add_str("%*c%s", indent + 1, - ' ', _(menu_get_prompt(menu))); - if (val == yes) { - if (def_menu) { - item_add_str(" (%s)", - _(menu_get_prompt(def_menu))); - item_add_str(" --->"); - if (def_menu->list) { - indent += 2; - build_conf(def_menu); - indent -= 2; - } - } - return; - } - } else { - if (menu == current_menu) { - item_make(menu, ':', - "---%*c%s", indent + 1, - ' ', _(menu_get_prompt(menu))); - goto conf_childs; - } - child_count++; - val = sym_get_tristate_value(sym); - if (sym_is_choice_value(sym) && val == yes) { - item_make(menu, ':', " "); - } else { - switch (type) { - case S_BOOLEAN: - if (sym_is_changable(sym)) - item_make(menu, 't', "[%c]", - val == no ? ' ' : '*'); - else - item_make(menu, 't', "-%c-", - val == no ? ' ' : '*'); - break; - case S_TRISTATE: - switch (val) { - case yes: - ch = '*'; - break; - case mod: - ch = 'M'; - break; - default: - ch = ' '; - break; - } - if (sym_is_changable(sym)) { - if (sym->rev_dep.tri == mod) - item_make(menu, - 't', "{%c}", ch); - else - item_make(menu, - 't', "<%c>", ch); - } else - item_make(menu, 't', "-%c-", ch); - break; - default: - tmp = 2 + strlen(sym_get_string_value(sym)); - item_make(menu, 's', " (%s)", - sym_get_string_value(sym)); - tmp = indent - tmp + 4; - if (tmp < 0) - tmp = 0; - item_add_str("%*c%s%s", tmp, ' ', - _(menu_get_prompt(menu)), - (sym_has_value(sym) || - !sym_is_changable(sym)) ? "" : - _(" (NEW)")); - goto conf_childs; - } - } - item_add_str("%*c%s%s", indent + 1, ' ', - _(menu_get_prompt(menu)), - (sym_has_value(sym) || !sym_is_changable(sym)) ? - "" : _(" (NEW)")); - if (menu->prompt && menu->prompt->type == P_MENU) { - item_add_str(" --->"); - return; - } - } - -conf_childs: - indent += doint; - for (child = menu->list; child; child = child->next) - build_conf(child); - indent -= doint; -} - -static void reset_menu(void) -{ - unpost_menu(curses_menu); - clean_items(); -} - -/* adjust the menu to show this item. - * prefer not to scroll the menu if possible*/ -static void center_item(int selected_index, int *last_top_row) -{ - int toprow; - - set_top_row(curses_menu, *last_top_row); - toprow = top_row(curses_menu); - if (selected_index < toprow || - selected_index >= toprow+mwin_max_lines) { - toprow = max(selected_index-mwin_max_lines/2, 0); - if (toprow >= item_count(curses_menu)-mwin_max_lines) - toprow = item_count(curses_menu)-mwin_max_lines; - set_top_row(curses_menu, toprow); - } - set_current_item(curses_menu, - curses_menu_items[selected_index]); - *last_top_row = toprow; - post_menu(curses_menu); - refresh_all_windows(main_window); -} - -/* this function assumes reset_menu has been called before */ -static void show_menu(const char *prompt, const char *instructions, - int selected_index, int *last_top_row) -{ - int maxx, maxy; - WINDOW *menu_window; - - current_instructions = instructions; - - clear(); - wattrset(main_window, attributes[NORMAL]); - print_in_middle(stdscr, 1, 0, COLS, - menu_backtitle, - attributes[MAIN_HEADING]); - - wattrset(main_window, attributes[MAIN_MENU_BOX]); - box(main_window, 0, 0); - wattrset(main_window, attributes[MAIN_MENU_HEADING]); - mvwprintw(main_window, 0, 3, " %s ", prompt); - wattrset(main_window, attributes[NORMAL]); - - set_menu_items(curses_menu, curses_menu_items); - - /* position the menu at the middle of the screen */ - scale_menu(curses_menu, &maxy, &maxx); - maxx = min(maxx, mwin_max_cols-2); - maxy = mwin_max_lines; - menu_window = derwin(main_window, - maxy, - maxx, - 2, - (mwin_max_cols-maxx)/2); - keypad(menu_window, TRUE); - set_menu_win(curses_menu, menu_window); - set_menu_sub(curses_menu, menu_window); - - /* must reassert this after changing items, otherwise returns to a - * default of 16 - */ - set_menu_format(curses_menu, maxy, 1); - center_item(selected_index, last_top_row); - set_menu_format(curses_menu, maxy, 1); - - print_function_line(); - - /* Post the menu */ - post_menu(curses_menu); - refresh_all_windows(main_window); -} - -static void adj_match_dir(match_f *match_direction) -{ - if (*match_direction == FIND_NEXT_MATCH_DOWN) - *match_direction = - MATCH_TINKER_PATTERN_DOWN; - else if (*match_direction == FIND_NEXT_MATCH_UP) - *match_direction = - MATCH_TINKER_PATTERN_UP; - /* else, do no change.. */ -} - -struct match_state -{ - int in_search; - match_f match_direction; - char pattern[256]; -}; - -/* Return 0 means I have handled the key. In such a case, ans should hold the - * item to center, or -1 otherwise. - * Else return -1 . - */ -static int do_match(int key, struct match_state *state, int *ans) -{ - char c = (char) key; - int terminate_search = 0; - *ans = -1; - if (key == '/' || (state->in_search && key == 27)) { - move(0, 0); - refresh(); - clrtoeol(); - state->in_search = 1-state->in_search; - bzero(state->pattern, sizeof(state->pattern)); - state->match_direction = MATCH_TINKER_PATTERN_DOWN; - return 0; - } else if (!state->in_search) - return 1; - - if (isalnum(c) || isgraph(c) || c == ' ') { - state->pattern[strlen(state->pattern)] = c; - state->pattern[strlen(state->pattern)] = '\0'; - adj_match_dir(&state->match_direction); - *ans = get_mext_match(state->pattern, - state->match_direction); - } else if (key == KEY_DOWN) { - state->match_direction = FIND_NEXT_MATCH_DOWN; - *ans = get_mext_match(state->pattern, - state->match_direction); - } else if (key == KEY_UP) { - state->match_direction = FIND_NEXT_MATCH_UP; - *ans = get_mext_match(state->pattern, - state->match_direction); - } else if (key == KEY_BACKSPACE || key == 127) { - state->pattern[strlen(state->pattern)-1] = '\0'; - adj_match_dir(&state->match_direction); - } else - terminate_search = 1; - - if (terminate_search) { - state->in_search = 0; - bzero(state->pattern, sizeof(state->pattern)); - move(0, 0); - refresh(); - clrtoeol(); - return -1; - } - return 0; -} - -static void conf(struct menu *menu) -{ - struct menu *submenu = 0; - const char *prompt = menu_get_prompt(menu); - struct symbol *sym; - struct menu *active_menu = NULL; - int res; - int current_index = 0; - int last_top_row = 0; - struct match_state match_state = { - .in_search = 0, - .match_direction = MATCH_TINKER_PATTERN_DOWN, - .pattern = "", - }; - - while (!global_exit) { - reset_menu(); - current_menu = menu; - build_conf(menu); - if (!child_count) - break; - - show_menu(prompt ? _(prompt) : _("Main Menu"), - _(menu_instructions), - current_index, &last_top_row); - keypad((menu_win(curses_menu)), TRUE); - while (!global_exit) { - if (match_state.in_search) { - mvprintw(0, 0, - "searching: %s", match_state.pattern); - clrtoeol(); - } - refresh_all_windows(main_window); - res = wgetch(menu_win(curses_menu)); - if (!res) - break; - if (do_match(res, &match_state, ¤t_index) == 0) { - if (current_index != -1) - center_item(current_index, - &last_top_row); - continue; - } - if (process_special_keys(&res, - (struct menu *) item_data())) - break; - switch (res) { - case KEY_DOWN: - menu_driver(curses_menu, REQ_DOWN_ITEM); - break; - case KEY_UP: - menu_driver(curses_menu, REQ_UP_ITEM); - break; - case KEY_NPAGE: - menu_driver(curses_menu, REQ_SCR_DPAGE); - break; - case KEY_PPAGE: - menu_driver(curses_menu, REQ_SCR_UPAGE); - break; - case KEY_HOME: - menu_driver(curses_menu, REQ_FIRST_ITEM); - break; - case KEY_END: - menu_driver(curses_menu, REQ_LAST_ITEM); - break; - case 'h': - case '?': - show_help((struct menu *) item_data()); - break; - } - if (res == 10 || res == 27 || - res == 32 || res == 'n' || res == 'y' || - res == KEY_LEFT || res == KEY_RIGHT || - res == 'm') - break; - refresh_all_windows(main_window); - } - - refresh_all_windows(main_window); - /* if ESC or left*/ - if (res == 27 || (menu != &rootmenu && res == KEY_LEFT)) - break; - - /* remember location in the menu */ - last_top_row = top_row(curses_menu); - current_index = curses_item_index(); - - if (!item_tag()) - continue; - - submenu = (struct menu *) item_data(); - active_menu = (struct menu *)item_data(); - if (!submenu || !menu_is_visible(submenu)) - continue; - if (submenu) - sym = submenu->sym; - else - sym = NULL; - - switch (res) { - case ' ': - if (item_is_tag('t')) - sym_toggle_tristate_value(sym); - else if (item_is_tag('m')) - conf(submenu); - break; - case KEY_RIGHT: - case 10: /* ENTER WAS PRESSED */ - switch (item_tag()) { - case 'm': - if (single_menu_mode) - submenu->data = - (void *) (long) !submenu->data; - else - conf(submenu); - break; - case 't': - if (sym_is_choice(sym) && - sym_get_tristate_value(sym) == yes) - conf_choice(submenu); - else if (submenu->prompt && - submenu->prompt->type == P_MENU) - conf(submenu); - else if (res == 10) - sym_toggle_tristate_value(sym); - break; - case 's': - conf_string(submenu); - break; - } - break; - case 'y': - if (item_is_tag('t')) { - if (sym_set_tristate_value(sym, yes)) - break; - if (sym_set_tristate_value(sym, mod)) - btn_dialog(main_window, setmod_text, 0); - } - break; - case 'n': - if (item_is_tag('t')) - sym_set_tristate_value(sym, no); - break; - case 'm': - if (item_is_tag('t')) - sym_set_tristate_value(sym, mod); - break; - } - } -} - -static void conf_message_callback(const char *fmt, va_list ap) -{ - char buf[1024]; - - vsnprintf(buf, sizeof(buf), fmt, ap); - btn_dialog(main_window, buf, 1, ""); -} - -static void show_help(struct menu *menu) -{ - struct gstr help = str_new(); - - if (menu && menu->sym && menu_has_help(menu)) { - if (menu->sym->name) { - str_printf(&help, "%s%s:\n\n", CONFIG_, menu->sym->name); - str_append(&help, _(menu_get_help(menu))); - str_append(&help, "\n"); - get_symbol_str(&help, menu->sym); - } else { - str_append(&help, _(menu_get_help(menu))); - } - } else { - str_append(&help, nohelp_text); - } - show_scroll_win(main_window, _(menu_get_prompt(menu)), str_get(&help)); - str_free(&help); -} - -static void conf_choice(struct menu *menu) -{ - const char *prompt = _(menu_get_prompt(menu)); - struct menu *child = 0; - struct symbol *active; - int selected_index = 0; - int last_top_row = 0; - int res, i = 0; - struct match_state match_state = { - .in_search = 0, - .match_direction = MATCH_TINKER_PATTERN_DOWN, - .pattern = "", - }; - - active = sym_get_choice_value(menu->sym); - /* this is mostly duplicated from the conf() function. */ - while (!global_exit) { - reset_menu(); - - for (i = 0, child = menu->list; child; child = child->next) { - if (!show_all_items && !menu_is_visible(child)) - continue; - - if (child->sym == sym_get_choice_value(menu->sym)) - item_make(child, ':', " %s", - _(menu_get_prompt(child))); - else if (child->sym) - item_make(child, ':', " %s", - _(menu_get_prompt(child))); - else - item_make(child, ':', "*** %s ***", - _(menu_get_prompt(child))); - - if (child->sym == active){ - last_top_row = top_row(curses_menu); - selected_index = i; - } - i++; - } - show_menu(prompt ? _(prompt) : _("Choice Menu"), - _(radiolist_instructions), - selected_index, - &last_top_row); - while (!global_exit) { - if (match_state.in_search) { - mvprintw(0, 0, "searching: %s", - match_state.pattern); - clrtoeol(); - } - refresh_all_windows(main_window); - res = wgetch(menu_win(curses_menu)); - if (!res) - break; - if (do_match(res, &match_state, &selected_index) == 0) { - if (selected_index != -1) - center_item(selected_index, - &last_top_row); - continue; - } - if (process_special_keys( - &res, - (struct menu *) item_data())) - break; - switch (res) { - case KEY_DOWN: - menu_driver(curses_menu, REQ_DOWN_ITEM); - break; - case KEY_UP: - menu_driver(curses_menu, REQ_UP_ITEM); - break; - case KEY_NPAGE: - menu_driver(curses_menu, REQ_SCR_DPAGE); - break; - case KEY_PPAGE: - menu_driver(curses_menu, REQ_SCR_UPAGE); - break; - case KEY_HOME: - menu_driver(curses_menu, REQ_FIRST_ITEM); - break; - case KEY_END: - menu_driver(curses_menu, REQ_LAST_ITEM); - break; - case 'h': - case '?': - show_help((struct menu *) item_data()); - break; - } - if (res == 10 || res == 27 || res == ' ' || - res == KEY_LEFT){ - break; - } - refresh_all_windows(main_window); - } - /* if ESC or left */ - if (res == 27 || res == KEY_LEFT) - break; - - child = item_data(); - if (!child || !menu_is_visible(child) || !child->sym) - continue; - switch (res) { - case ' ': - case 10: - case KEY_RIGHT: - sym_set_tristate_value(child->sym, yes); - return; - case 'h': - case '?': - show_help(child); - active = child->sym; - break; - case KEY_EXIT: - return; - } - } -} - -static void conf_string(struct menu *menu) -{ - const char *prompt = menu_get_prompt(menu); - char dialog_input_result[256]; - - while (1) { - int res; - const char *heading; - - switch (sym_get_type(menu->sym)) { - case S_INT: - heading = _(inputbox_instructions_int); - break; - case S_HEX: - heading = _(inputbox_instructions_hex); - break; - case S_STRING: - heading = _(inputbox_instructions_string); - break; - default: - heading = _("Internal nconf error!"); - } - res = dialog_inputbox(main_window, - prompt ? _(prompt) : _("Main Menu"), - heading, - sym_get_string_value(menu->sym), - dialog_input_result, - sizeof(dialog_input_result)); - switch (res) { - case 0: - if (sym_set_string_value(menu->sym, - dialog_input_result)) - return; - btn_dialog(main_window, - _("You have made an invalid entry."), 0); - break; - case 1: - show_help(menu); - break; - case KEY_EXIT: - return; - } - } -} - -static void conf_load(void) -{ - char dialog_input_result[256]; - while (1) { - int res; - res = dialog_inputbox(main_window, - NULL, load_config_text, - filename, - dialog_input_result, - sizeof(dialog_input_result)); - switch (res) { - case 0: - if (!dialog_input_result[0]) - return; - if (!conf_read(dialog_input_result)) { - set_config_filename(dialog_input_result); - sym_set_change_count(1); - return; - } - btn_dialog(main_window, _("File does not exist!"), 0); - break; - case 1: - show_scroll_win(main_window, - _("Load Alternate Configuration"), - load_config_help); - break; - case KEY_EXIT: - return; - } - } -} - -static void conf_save(void) -{ - char dialog_input_result[256]; - while (1) { - int res; - res = dialog_inputbox(main_window, - NULL, save_config_text, - filename, - dialog_input_result, - sizeof(dialog_input_result)); - switch (res) { - case 0: - if (!dialog_input_result[0]) - return; - res = conf_write(dialog_input_result); - if (!res) { - set_config_filename(dialog_input_result); - return; - } - btn_dialog(main_window, _("Can't create file! " - "Probably a nonexistent directory."), - 1, ""); - break; - case 1: - show_scroll_win(main_window, - _("Save Alternate Configuration"), - save_config_help); - break; - case KEY_EXIT: - return; - } - } -} - -void setup_windows(void) -{ - if (main_window != NULL) - delwin(main_window); - - /* set up the menu and menu window */ - main_window = newwin(LINES-2, COLS-2, 2, 1); - keypad(main_window, TRUE); - mwin_max_lines = LINES-7; - mwin_max_cols = COLS-6; - - /* panels order is from bottom to top */ - new_panel(main_window); -} - -int main(int ac, char **av) -{ - char *mode; - - setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); - - conf_parse(av[1]); - conf_read(NULL); - - mode = getenv("NCONFIG_MODE"); - if (mode) { - if (!strcasecmp(mode, "single_menu")) - single_menu_mode = 1; - } - - /* Initialize curses */ - initscr(); - /* set color theme */ - set_colors(); - - cbreak(); - noecho(); - keypad(stdscr, TRUE); - curs_set(0); - - if (COLS < 75 || LINES < 20) { - endwin(); - printf("Your terminal should have at " - "least 20 lines and 75 columns\n"); - return 1; - } - - notimeout(stdscr, FALSE); - ESCDELAY = 1; - - /* set btns menu */ - curses_menu = new_menu(curses_menu_items); - menu_opts_off(curses_menu, O_SHOWDESC); - menu_opts_on(curses_menu, O_SHOWMATCH); - menu_opts_on(curses_menu, O_ONEVALUE); - menu_opts_on(curses_menu, O_NONCYCLIC); - menu_opts_on(curses_menu, O_IGNORECASE); - set_menu_mark(curses_menu, " "); - set_menu_fore(curses_menu, attributes[MAIN_MENU_FORE]); - set_menu_back(curses_menu, attributes[MAIN_MENU_BACK]); - set_menu_grey(curses_menu, attributes[MAIN_MENU_GREY]); - - set_config_filename(conf_get_configname()); - setup_windows(); - - /* check for KEY_FUNC(1) */ - if (has_key(KEY_F(1)) == FALSE) { - show_scroll_win(main_window, - _("Instructions"), - _(menu_no_f_instructions)); - } - - conf_set_message_callback(conf_message_callback); - /* do the work */ - while (!global_exit) { - conf(&rootmenu); - if (!global_exit && do_exit() == 0) - break; - } - /* ok, we are done */ - unpost_menu(curses_menu); - free_menu(curses_menu); - delwin(main_window); - clear(); - refresh(); - endwin(); - return 0; -} - diff --git a/package/config/nconf.gui.c b/package/config/nconf.gui.c deleted file mode 100644 index f8137b3..0000000 --- a/package/config/nconf.gui.c +++ /dev/null @@ -1,617 +0,0 @@ -/* - * Copyright (C) 2008 Nir Tzachar 0) - win_rows = msg_lines+4; - else - win_rows = msg_lines+2; - - win = newwin(win_rows, total_width+4, y, x); - keypad(win, TRUE); - menu_win = derwin(win, 1, btns_width, win_rows-2, - 1+(total_width+2-btns_width)/2); - menu = new_menu(btns); - msg_win = derwin(win, win_rows-2, msg_width, 1, - 1+(total_width+2-msg_width)/2); - - set_menu_fore(menu, attributes[DIALOG_MENU_FORE]); - set_menu_back(menu, attributes[DIALOG_MENU_BACK]); - - (void) wattrset(win, attributes[DIALOG_BOX]); - box(win, 0, 0); - - /* print message */ - (void) wattrset(msg_win, attributes[DIALOG_TEXT]); - fill_window(msg_win, msg); - - set_menu_win(menu, win); - set_menu_sub(menu, menu_win); - set_menu_format(menu, 1, btn_num); - menu_opts_off(menu, O_SHOWDESC); - menu_opts_off(menu, O_SHOWMATCH); - menu_opts_on(menu, O_ONEVALUE); - menu_opts_on(menu, O_NONCYCLIC); - set_menu_mark(menu, ""); - post_menu(menu); - - - touchwin(win); - refresh_all_windows(main_window); - while ((res = wgetch(win))) { - switch (res) { - case KEY_LEFT: - menu_driver(menu, REQ_LEFT_ITEM); - break; - case KEY_RIGHT: - menu_driver(menu, REQ_RIGHT_ITEM); - break; - case 10: /* ENTER */ - case 27: /* ESCAPE */ - case ' ': - case KEY_F(F_BACK): - case KEY_F(F_EXIT): - break; - } - touchwin(win); - refresh_all_windows(main_window); - - if (res == 10 || res == ' ') { - res = item_index(current_item(menu)); - break; - } else if (res == 27 || res == KEY_F(F_BACK) || - res == KEY_F(F_EXIT)) { - res = KEY_EXIT; - break; - } - } - - unpost_menu(menu); - free_menu(menu); - for (i = 0; i < btn_num; i++) - free_item(btns[i]); - - delwin(win); - return res; -} - -int dialog_inputbox(WINDOW *main_window, - const char *title, const char *prompt, - const char *init, char *result, int result_len) -{ - int prompt_lines = 0; - int prompt_width = 0; - WINDOW *win; - WINDOW *prompt_win; - WINDOW *form_win; - PANEL *panel; - int i, x, y; - int res = -1; - int cursor_position = strlen(init); - - - /* find the widest line of msg: */ - prompt_lines = get_line_no(prompt); - for (i = 0; i < prompt_lines; i++) { - const char *line = get_line(prompt, i); - int len = get_line_length(line); - prompt_width = max(prompt_width, len); - } - - if (title) - prompt_width = max(prompt_width, strlen(title)); - - /* place dialog in middle of screen */ - y = (LINES-(prompt_lines+4))/2; - x = (COLS-(prompt_width+4))/2; - - strncpy(result, init, result_len); - - /* create the windows */ - win = newwin(prompt_lines+6, prompt_width+7, y, x); - prompt_win = derwin(win, prompt_lines+1, prompt_width, 2, 2); - form_win = derwin(win, 1, prompt_width, prompt_lines+3, 2); - keypad(form_win, TRUE); - - (void) wattrset(form_win, attributes[INPUT_FIELD]); - - (void) wattrset(win, attributes[INPUT_BOX]); - box(win, 0, 0); - (void) wattrset(win, attributes[INPUT_HEADING]); - if (title) - mvwprintw(win, 0, 3, "%s", title); - - /* print message */ - (void) wattrset(prompt_win, attributes[INPUT_TEXT]); - fill_window(prompt_win, prompt); - - mvwprintw(form_win, 0, 0, "%*s", prompt_width, " "); - mvwprintw(form_win, 0, 0, "%s", result); - - /* create panels */ - panel = new_panel(win); - - /* show the cursor */ - curs_set(1); - - touchwin(win); - refresh_all_windows(main_window); - while ((res = wgetch(form_win))) { - int len = strlen(result); - switch (res) { - case 10: /* ENTER */ - case 27: /* ESCAPE */ - case KEY_F(F_HELP): - case KEY_F(F_EXIT): - case KEY_F(F_BACK): - break; - case 127: - case KEY_BACKSPACE: - if (cursor_position > 0) { - memmove(&result[cursor_position-1], - &result[cursor_position], - len-cursor_position+1); - cursor_position--; - } - break; - case KEY_DC: - if (cursor_position >= 0 && cursor_position < len) { - memmove(&result[cursor_position], - &result[cursor_position+1], - len-cursor_position+1); - } - break; - case KEY_UP: - case KEY_RIGHT: - if (cursor_position < len && - cursor_position < min(result_len, prompt_width)) - cursor_position++; - break; - case KEY_DOWN: - case KEY_LEFT: - if (cursor_position > 0) - cursor_position--; - break; - default: - if ((isgraph(res) || isspace(res)) && - len-2 < result_len) { - /* insert the char at the proper position */ - memmove(&result[cursor_position+1], - &result[cursor_position], - len+1); - result[cursor_position] = res; - cursor_position++; - } else { - mvprintw(0, 0, "unknow key: %d\n", res); - } - break; - } - wmove(form_win, 0, 0); - wclrtoeol(form_win); - mvwprintw(form_win, 0, 0, "%*s", prompt_width, " "); - mvwprintw(form_win, 0, 0, "%s", result); - wmove(form_win, 0, cursor_position); - touchwin(win); - refresh_all_windows(main_window); - - if (res == 10) { - res = 0; - break; - } else if (res == 27 || res == KEY_F(F_BACK) || - res == KEY_F(F_EXIT)) { - res = KEY_EXIT; - break; - } else if (res == KEY_F(F_HELP)) { - res = 1; - break; - } - } - - /* hide the cursor */ - curs_set(0); - del_panel(panel); - delwin(prompt_win); - delwin(form_win); - delwin(win); - return res; -} - -/* refresh all windows in the correct order */ -void refresh_all_windows(WINDOW *main_window) -{ - update_panels(); - touchwin(main_window); - refresh(); -} - -/* layman's scrollable window... */ -void show_scroll_win(WINDOW *main_window, - const char *title, - const char *text) -{ - int res; - int total_lines = get_line_no(text); - int x, y; - int start_x = 0, start_y = 0; - int text_lines = 0, text_cols = 0; - int total_cols = 0; - int win_cols = 0; - int win_lines = 0; - int i = 0; - WINDOW *win; - WINDOW *pad; - PANEL *panel; - - /* find the widest line of msg: */ - total_lines = get_line_no(text); - for (i = 0; i < total_lines; i++) { - const char *line = get_line(text, i); - int len = get_line_length(line); - total_cols = max(total_cols, len+2); - } - - /* create the pad */ - pad = newpad(total_lines+10, total_cols+10); - (void) wattrset(pad, attributes[SCROLLWIN_TEXT]); - fill_window(pad, text); - - win_lines = min(total_lines+4, LINES-2); - win_cols = min(total_cols+2, COLS-2); - text_lines = max(win_lines-4, 0); - text_cols = max(win_cols-2, 0); - - /* place window in middle of screen */ - y = (LINES-win_lines)/2; - x = (COLS-win_cols)/2; - - win = newwin(win_lines, win_cols, y, x); - keypad(win, TRUE); - /* show the help in the help window, and show the help panel */ - (void) wattrset(win, attributes[SCROLLWIN_BOX]); - box(win, 0, 0); - (void) wattrset(win, attributes[SCROLLWIN_HEADING]); - mvwprintw(win, 0, 3, " %s ", title); - panel = new_panel(win); - - /* handle scrolling */ - do { - - copywin(pad, win, start_y, start_x, 2, 2, text_lines, - text_cols, 0); - print_in_middle(win, - text_lines+2, - 0, - text_cols, - "", - attributes[DIALOG_MENU_FORE]); - wrefresh(win); - - res = wgetch(win); - switch (res) { - case KEY_NPAGE: - case ' ': - start_y += text_lines-2; - break; - case KEY_PPAGE: - start_y -= text_lines+2; - break; - case KEY_HOME: - start_y = 0; - break; - case KEY_END: - start_y = total_lines-text_lines; - break; - case KEY_DOWN: - case 'j': - start_y++; - break; - case KEY_UP: - case 'k': - start_y--; - break; - case KEY_LEFT: - case 'h': - start_x--; - break; - case KEY_RIGHT: - case 'l': - start_x++; - break; - } - if (res == 10 || res == 27 || res == 'q' - || res == KEY_F(F_BACK) || res == KEY_F(F_EXIT)) { - break; - } - if (start_y < 0) - start_y = 0; - if (start_y >= total_lines-text_lines) - start_y = total_lines-text_lines; - if (start_x < 0) - start_x = 0; - if (start_x >= total_cols-text_cols) - start_x = total_cols-text_cols; - } while (res); - - del_panel(panel); - delwin(win); - refresh_all_windows(main_window); -} diff --git a/package/config/nconf.h b/package/config/nconf.h deleted file mode 100644 index 58fbda8..0000000 --- a/package/config/nconf.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (C) 2008 Nir Tzachar -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "ncurses.h" - -#define max(a, b) ({\ - typeof(a) _a = a;\ - typeof(b) _b = b;\ - _a > _b ? _a : _b; }) - -#define min(a, b) ({\ - typeof(a) _a = a;\ - typeof(b) _b = b;\ - _a < _b ? _a : _b; }) - -typedef enum { - NORMAL = 1, - MAIN_HEADING, - MAIN_MENU_BOX, - MAIN_MENU_FORE, - MAIN_MENU_BACK, - MAIN_MENU_GREY, - MAIN_MENU_HEADING, - SCROLLWIN_TEXT, - SCROLLWIN_HEADING, - SCROLLWIN_BOX, - DIALOG_TEXT, - DIALOG_MENU_FORE, - DIALOG_MENU_BACK, - DIALOG_BOX, - INPUT_BOX, - INPUT_HEADING, - INPUT_TEXT, - INPUT_FIELD, - FUNCTION_TEXT, - FUNCTION_HIGHLIGHT, - ATTR_MAX -} attributes_t; -extern attributes_t attributes[]; - -typedef enum { - F_HELP = 1, - F_SYMBOL = 2, - F_INSTS = 3, - F_CONF = 4, - F_BACK = 5, - F_SAVE = 6, - F_LOAD = 7, - F_SEARCH = 8, - F_EXIT = 9, -} function_key; - -void set_colors(void); - -/* this changes the windows attributes !!! */ -void print_in_middle(WINDOW *win, - int starty, - int startx, - int width, - const char *string, - chtype color); -int get_line_length(const char *line); -int get_line_no(const char *text); -const char *get_line(const char *text, int line_no); -void fill_window(WINDOW *win, const char *text); -int btn_dialog(WINDOW *main_window, const char *msg, int btn_num, ...); -int dialog_inputbox(WINDOW *main_window, - const char *title, const char *prompt, - const char *init, char *result, int result_len); -void refresh_all_windows(WINDOW *main_window); -void show_scroll_win(WINDOW *main_window, - const char *title, - const char *text); diff --git a/package/config/patches/01-kconfig-kernel-to-buildroot.patch b/package/config/patches/01-kconfig-kernel-to-buildroot.patch deleted file mode 100644 index ef3a05e..0000000 --- a/package/config/patches/01-kconfig-kernel-to-buildroot.patch +++ /dev/null @@ -1,62 +0,0 @@ ---- - gconf.glade | 2 +- - mconf.c | 4 ++-- - zconf.tab.c_shipped | 2 +- - zconf.y | 2 +- - 4 files changed, 5 insertions(+), 5 deletions(-) - -Index: config/gconf.glade -=================================================================== ---- config.orig/gconf.glade -+++ config/gconf.glade -@@ -4,7 +4,7 @@ - - - True -- Gtk Kernel Configurator -+ Gtk Buildroot Configurator - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False -Index: config/mconf.c -=================================================================== ---- config.orig/mconf.c -+++ config/mconf.c -@@ -178,9 +178,9 @@ - "Arrow keys navigate the menu. " - " selects submenus --->. " - "Highlighted letters are hotkeys. " -- "Pressing includes, excludes, modularizes features. " -+ "Pressing selectes a feature, while will exclude a feature. " - "Press to exit, for Help, for Search. " -- "Legend: [*] built-in [ ] excluded module < > module capable"), -+ "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 " -Index: config/zconf.tab.c_shipped -=================================================================== ---- config.orig/zconf.tab.c_shipped -+++ config/zconf.tab.c_shipped -@@ -2256,7 +2256,7 @@ - modules_sym = sym_lookup(NULL, 0); - modules_sym->type = S_BOOLEAN; - modules_sym->flags |= SYMBOL_AUTO; -- rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); -+ rootmenu.prompt = menu_add_prompt(P_MENU, "Buildroot Configuration", NULL); - - #if YYDEBUG - if (getenv("ZCONF_DEBUG")) -Index: config/zconf.y -=================================================================== ---- config.orig/zconf.y -+++ config/zconf.y -@@ -501,7 +501,7 @@ - modules_sym = sym_lookup(NULL, 0); - modules_sym->type = S_BOOLEAN; - modules_sym->flags |= SYMBOL_AUTO; -- rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); -+ rootmenu.prompt = menu_add_prompt(P_MENU, "Buildroot Configuration", NULL); - - #if YYDEBUG - if (getenv("ZCONF_DEBUG")) diff --git a/package/config/patches/02-cpp-comments-to-c-comments.patch b/package/config/patches/02-cpp-comments-to-c-comments.patch deleted file mode 100644 index cb27056..0000000 --- a/package/config/patches/02-cpp-comments-to-c-comments.patch +++ /dev/null @@ -1,178 +0,0 @@ ---- - expr.c | 42 +++++++++++++++++++++--------------------- - 1 file changed, 21 insertions(+), 21 deletions(-) - -Index: config/expr.c -=================================================================== ---- config.orig/expr.c -+++ config/expr.c -@@ -331,7 +331,7 @@ - e->right.expr = expr_trans_bool(e->right.expr); - break; - case E_UNEQUAL: -- // FOO!=n -> FOO -+ /* FOO!=n -> FOO */ - if (e->left.sym->type == S_TRISTATE) { - if (e->right.sym == &symbol_no) { - e->type = E_SYMBOL; -@@ -380,19 +380,19 @@ - if (e1->type == E_EQUAL && e2->type == E_EQUAL && - ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) || - (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes))) { -- // (a='y') || (a='m') -> (a!='n') -+ /* (a='y') || (a='m') -> (a!='n') */ - return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_no); - } - if (e1->type == E_EQUAL && e2->type == E_EQUAL && - ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) || - (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes))) { -- // (a='y') || (a='n') -> (a!='m') -+ /* (a='y') || (a='n') -> (a!='m') */ - return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_mod); - } - if (e1->type == E_EQUAL && e2->type == E_EQUAL && - ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) || - (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod))) { -- // (a='m') || (a='n') -> (a!='y') -+ /* (a='m') || (a='n') -> (a!='y') */ - return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_yes); - } - } -@@ -443,29 +443,29 @@ - - if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_yes) || - (e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_yes)) -- // (a) && (a='y') -> (a='y') -+ /* (a) && (a='y') -> (a='y') */ - return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes); - - if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_no) || - (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_no)) -- // (a) && (a!='n') -> (a) -+ /* (a) && (a!='n') -> (a) */ - return expr_alloc_symbol(sym1); - - if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_mod) || - (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_mod)) -- // (a) && (a!='m') -> (a='y') -+ /* (a) && (a!='m') -> (a='y') */ - return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes); - - if (sym1->type == S_TRISTATE) { - if (e1->type == E_EQUAL && e2->type == E_UNEQUAL) { -- // (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b' -+ /* (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b' */ - sym2 = e1->right.sym; - if ((e2->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST)) - return sym2 != e2->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2) - : expr_alloc_symbol(&symbol_no); - } - if (e1->type == E_UNEQUAL && e2->type == E_EQUAL) { -- // (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b' -+ /* (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b' */ - sym2 = e2->right.sym; - if ((e1->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST)) - return sym2 != e1->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2) -@@ -474,19 +474,19 @@ - if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && - ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) || - (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes))) -- // (a!='y') && (a!='n') -> (a='m') -+ /* (a!='y') && (a!='n') -> (a='m') */ - return expr_alloc_comp(E_EQUAL, sym1, &symbol_mod); - - if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && - ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) || - (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes))) -- // (a!='y') && (a!='m') -> (a='n') -+ /* (a!='y') && (a!='m') -> (a='n') */ - return expr_alloc_comp(E_EQUAL, sym1, &symbol_no); - - if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && - ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) || - (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod))) -- // (a!='m') && (a!='n') -> (a='m') -+ /* (a!='m') && (a!='n') -> (a='m') */ - return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes); - - if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_mod) || -@@ -579,7 +579,7 @@ - switch (e1->type) { - case E_OR: - expr_eliminate_dups2(e1->type, &e1, &e1); -- // (FOO || BAR) && (!FOO && !BAR) -> n -+ /* (FOO || BAR) && (!FOO && !BAR) -> n */ - tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1))); - tmp2 = expr_copy(e2); - tmp = expr_extract_eq_and(&tmp1, &tmp2); -@@ -594,7 +594,7 @@ - break; - case E_AND: - expr_eliminate_dups2(e1->type, &e1, &e1); -- // (FOO && BAR) || (!FOO || !BAR) -> y -+ /* (FOO && BAR) || (!FOO || !BAR) -> y */ - tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1))); - tmp2 = expr_copy(e2); - tmp = expr_extract_eq_or(&tmp1, &tmp2); -@@ -703,7 +703,7 @@ - case E_NOT: - switch (e->left.expr->type) { - case E_NOT: -- // !!a -> a -+ /* !!a -> a */ - tmp = e->left.expr->left.expr; - free(e->left.expr); - free(e); -@@ -712,14 +712,14 @@ - break; - case E_EQUAL: - case E_UNEQUAL: -- // !a='x' -> a!='x' -+ /* !a='x' -> a!='x' */ - tmp = e->left.expr; - free(e); - e = tmp; - e->type = e->type == E_EQUAL ? E_UNEQUAL : E_EQUAL; - break; - case E_OR: -- // !(a || b) -> !a && !b -+ /* !(a || b) -> !a && !b */ - tmp = e->left.expr; - e->type = E_AND; - e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr); -@@ -728,7 +728,7 @@ - e = expr_transform(e); - break; - case E_AND: -- // !(a && b) -> !a || !b -+ /* !(a && b) -> !a || !b */ - tmp = e->left.expr; - e->type = E_OR; - e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr); -@@ -738,7 +738,7 @@ - break; - case E_SYMBOL: - if (e->left.expr->left.sym == &symbol_yes) { -- // !'y' -> 'n' -+ /* !'y' -> 'n' */ - tmp = e->left.expr; - free(e); - e = tmp; -@@ -747,7 +747,7 @@ - break; - } - if (e->left.expr->left.sym == &symbol_mod) { -- // !'m' -> 'm' -+ /* !'m' -> 'm' */ - tmp = e->left.expr; - free(e); - e = tmp; -@@ -756,7 +756,7 @@ - break; - } - if (e->left.expr->left.sym == &symbol_no) { -- // !'n' -> 'y' -+ /* !'n' -> 'y' */ - tmp = e->left.expr; - free(e); - e = tmp; diff --git a/package/config/patches/03-change-config-option-prefix.patch b/package/config/patches/03-change-config-option-prefix.patch deleted file mode 100644 index d387236..0000000 --- a/package/config/patches/03-change-config-option-prefix.patch +++ /dev/null @@ -1,198 +0,0 @@ ---- - confdata.c | 57 +++++++++++++++++++++++++++++---------------------------- - lkc.h | 2 +- - menu.c | 2 +- - 3 files changed, 31 insertions(+), 30 deletions(-) - -Index: config/confdata.c -=================================================================== ---- config.orig/confdata.c -+++ config/confdata.c -@@ -12,6 +12,7 @@ - #include - #include - #include -+#include - - #define LKC_DIRECT_LINK - #include "lkc.h" -@@ -25,7 +26,7 @@ - static const char *conf_filename; - static int conf_lineno, conf_warnings, conf_unsaved; - --const char conf_defname[] = "arch/$ARCH/defconfig"; -+const char conf_defname[] = ".defconfig"; - - static void conf_warning(const char *fmt, ...) - { -@@ -63,7 +64,7 @@ - - const char *conf_get_configname(void) - { -- char *name = getenv("KCONFIG_CONFIG"); -+ char *name = getenv("BUILDROOT_CONFIG"); - - return name ? name : ".config"; - } -@@ -249,20 +250,20 @@ - if (line[0] == '#') { - if (memcmp(line + 2, CONFIG_, strlen(CONFIG_))) - continue; -- p = strchr(line + 2 + strlen(CONFIG_), ' '); -+ p = strchr(line + 2, ' '); - if (!p) - continue; - *p++ = 0; - if (strncmp(p, "is not set", 10)) - continue; - if (def == S_DEF_USER) { -- sym = sym_find(line + 2 + strlen(CONFIG_)); -+ sym = sym_find(line + 2); - if (!sym) { - sym_add_change_count(1); - goto setsym; - } - } else { -- sym = sym_lookup(line + 2 + strlen(CONFIG_), 0); -+ sym = sym_lookup(line + 2, 0); - if (sym->type == S_UNKNOWN) - sym->type = S_BOOLEAN; - } -@@ -278,8 +279,8 @@ - default: - ; - } -- } else if (memcmp(line, CONFIG_, strlen(CONFIG_)) == 0) { -- p = strchr(line + strlen(CONFIG_), '='); -+ } else if (isupper(line[0])) { -+ p = strchr(line, '='); - if (!p) - continue; - *p++ = 0; -@@ -290,13 +291,13 @@ - *p2 = 0; - } - if (def == S_DEF_USER) { -- sym = sym_find(line + strlen(CONFIG_)); -+ sym = sym_find(line); - if (!sym) { - sym_add_change_count(1); - goto setsym; - } - } else { -- sym = sym_lookup(line + strlen(CONFIG_), 0); -+ sym = sym_lookup(line, 0); - if (sym->type == S_UNKNOWN) - sym->type = S_OTHER; - } -@@ -423,9 +424,9 @@ - { - int l; - if (headerfile) -- fprintf(out, "#define %s%s \"", CONFIG_, name); -+ fprintf(out, "#define %s \"", name); - else -- fprintf(out, "%s%s=\"", CONFIG_, name); -+ fprintf(out, "%s=\"", name); - - while (1) { - l = strcspn(str, "\"\\"); -@@ -450,14 +451,14 @@ - switch (sym_get_tristate_value(sym)) { - case no: - if (write_no) -- fprintf(out, "# %s%s is not set\n", -- CONFIG_, sym->name); -+ fprintf(out, "# %s is not set\n", -+ sym->name); - break; - case mod: -- fprintf(out, "%s%s=m\n", CONFIG_, sym->name); -+ fprintf(out, "%s=m\n", sym->name); - break; - case yes: -- fprintf(out, "%s%s=y\n", CONFIG_, sym->name); -+ fprintf(out, "%s=y\n", sym->name); - break; - } - break; -@@ -467,7 +468,7 @@ - case S_HEX: - case S_INT: - str = sym_get_string_value(sym); -- fprintf(out, "%s%s=%s\n", CONFIG_, sym->name, str); -+ fprintf(out, "%s=%s\n", sym->name, str); - break; - case S_OTHER: - case S_UNKNOWN: -@@ -844,17 +845,17 @@ - case no: - break; - case mod: -- fprintf(tristate, "%s%s=M\n", -- CONFIG_, sym->name); -- fprintf(out_h, "#define %s%s_MODULE 1\n", -- CONFIG_, sym->name); -+ fprintf(tristate, "%s=M\n", -+ sym->name); -+ fprintf(out_h, "#define %s_MODULE 1\n", -+ sym->name); - break; - case yes: - if (sym->type == S_TRISTATE) -- fprintf(tristate,"%s%s=Y\n", -- CONFIG_, sym->name); -- fprintf(out_h, "#define %s%s 1\n", -- CONFIG_, sym->name); -+ fprintf(tristate,"%s=Y\n", -+ sym->name); -+ fprintf(out_h, "#define %s 1\n", -+ sym->name); - break; - } - break; -@@ -864,14 +865,14 @@ - case S_HEX: - str = sym_get_string_value(sym); - if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) { -- fprintf(out_h, "#define %s%s 0x%s\n", -- CONFIG_, sym->name, str); -+ fprintf(out_h, "#define %s 0x%s\n", -+ sym->name, str); - break; - } - case S_INT: - str = sym_get_string_value(sym); -- fprintf(out_h, "#define %s%s %s\n", -- CONFIG_, sym->name, str); -+ fprintf(out_h, "#define %s %s\n", -+ sym->name, str); - break; - default: - break; -Index: config/lkc.h -=================================================================== ---- config.orig/lkc.h -+++ config/lkc.h -@@ -42,7 +42,7 @@ - #define N_(text) (text) - - #ifndef CONFIG_ --#define CONFIG_ "CONFIG_" -+#define CONFIG_ "BR2_" - #endif - - #define TF_COMMAND 0x0001 -Index: config/menu.c -=================================================================== ---- config.orig/menu.c -+++ config/menu.c -@@ -597,7 +597,7 @@ - - if (menu_has_help(menu)) { - if (sym->name) { -- str_printf(help, "%s%s:\n\n", CONFIG_, sym->name); -+ str_printf(help, "%s:\n\n", sym->name); - str_append(help, _(menu_get_help(menu))); - str_append(help, "\n"); - } diff --git a/package/config/patches/05-really-clean-everything.patch b/package/config/patches/05-really-clean-everything.patch deleted file mode 100644 index a151754..0000000 --- a/package/config/patches/05-really-clean-everything.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- - Makefile | 14 ++++++++++---- - 1 file changed, 10 insertions(+), 4 deletions(-) - -Index: config/Makefile -=================================================================== ---- config.orig/Makefile -+++ config/Makefile -@@ -196,10 +196,16 @@ - gconf-objs := gconf.o kconfig_load.o zconf.tab.o - endif - --clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \ -- .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h --clean-files += mconf qconf gconf nconf --clean-files += config.pot linux.pot -+clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \ -+ .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h -+clean-files += config.pot linux.pot -+clean-files += conf $(conf-objs) -+clean-files += mconf $(mconf-objs) -+clean-files += nconf $(nconf-objs) -+clean-files += qconf qconf.o -+clean-files += gconf gconf.o -+clean-files += kconfig_load.o zconf.tab.o -+clean-files += $(kxgettext-objs) - - # Check that we have the required ncurses stuff installed for lxdialog (menuconfig) - PHONY += $(obj)/dochecklxdialog diff --git a/package/config/patches/06-br-build-system-integration.patch b/package/config/patches/06-br-build-system-integration.patch deleted file mode 100644 index 8a27e25..0000000 --- a/package/config/patches/06-br-build-system-integration.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- - Makefile | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) - -Index: config/Makefile -=================================================================== ---- config.orig/Makefile -+++ config/Makefile -@@ -174,18 +174,30 @@ - ifeq ($(MAKECMDGOALS),nconfig) - hostprogs-y += nconf - endif -+ifeq ($(findstring nconf,$(MAKECMDGOALS)),nconf) -+ hostprogs-y += nconf -+endif - - ifeq ($(MAKECMDGOALS),menuconfig) - hostprogs-y += mconf - endif -+ifeq ($(findstring mconf,$(MAKECMDGOALS)),mconf) -+ hostprogs-y += mconf -+endif - - ifeq ($(MAKECMDGOALS),xconfig) - qconf-target := 1 - endif -+ifeq ($(findstring qconf,$(MAKECMDGOALS)),qconf) -+ qconf-target := 1 -+endif -+ - ifeq ($(MAKECMDGOALS),gconfig) - gconf-target := 1 - endif -- -+ifeq ($(findstring gconf,$(MAKECMDGOALS)),gconf) -+ gconf-target := 1 -+endif - - ifeq ($(qconf-target),1) - qconf-cxxobjs := qconf.o diff --git a/package/config/patches/08-make-write-deps.patch b/package/config/patches/08-make-write-deps.patch deleted file mode 100644 index b69daad..0000000 --- a/package/config/patches/08-make-write-deps.patch +++ /dev/null @@ -1,139 +0,0 @@ ---- - util.c | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 116 insertions(+), 1 deletion(-) - -Index: config/util.c -=================================================================== ---- config.orig/util.c -+++ config/util.c -@@ -29,6 +29,121 @@ - return file; - } - -+static char* br2_symbol_printer(const char * const in) -+{ -+ ssize_t i, j, len = strlen(in); -+ char *ret; -+ if (len < 1) -+ return NULL; -+ ret = malloc(len+1); -+ if (!ret) { -+ printf("Out of memory!"); -+ exit(1); -+ } -+ memset(ret, 0, len+1); -+ i = j = 0; -+ if (strncmp("BR2_", in, 4) == 0) -+ i += 4; -+ if (strncmp("PACKAGE_", in + i, 8) == 0) -+ i += 8; -+ else if (strncmp("TARGET_", in + i, 7) == 0) -+ i += 7; -+ while (i <= len) -+ ret[j++] = tolower(in[i++]); -+ return ret; -+} -+ -+/* write dependencies of the individual config-symbols */ -+static int write_make_deps(const char *name) -+{ -+ char *str; -+ char dir[PATH_MAX+1], buf[PATH_MAX+1], buf2[PATH_MAX+1]; -+ struct menu *menu; -+ struct symbol *sym; -+ struct property *prop, *p; -+ unsigned done; -+ const char * const name_tmp = "..make.deps.tmp"; -+ FILE *out; -+ if (!name) -+ name = ".auto.deps"; -+ -+ strcpy(dir, conf_get_configname()); -+ str = strrchr(dir, '/'); -+ if (str) -+ str[1] = 0; -+ else -+ dir[0] = 0; -+ -+ sprintf(buf, "%s%s", dir, name_tmp); -+ out = fopen(buf, "w"); -+ if (!out) -+ return 1; -+ fprintf(out, "# ATTENTION! This does not handle 'depends', just 'select'! \n" -+ "# See package/config/util.c write_make_deps()\n#\n"); -+ menu = &rootmenu;//rootmenu.list; -+ while (menu) { -+ sym = menu->sym; -+ if (!sym) { -+ if (!menu_is_visible(menu)) -+ goto next; -+ } else if (!(sym->flags & SYMBOL_CHOICE)) { -+ sym_calc_value(sym); -+ if (sym->type == S_BOOLEAN -+ && sym_get_tristate_value(sym) != no) { -+ done = 0; -+ for_all_prompts(sym, prop) { -+ struct expr *e; -+//printf("\nname=%s\n", sym->name); -+ for_all_properties(sym, p, P_SELECT) { -+ e = p->expr; -+ if (e && e->left.sym->name) { -+ if (!done) { -+ fprintf(out, "%s: $(BASE_TARGETS)", br2_symbol_printer(sym->name)); -+ done = 1; -+ } -+//printf("SELECTS %s\n",e->left.sym->name); -+ fprintf(out, " %s",br2_symbol_printer(e->left.sym->name)); -+ } -+ } -+ if (done) -+ fprintf(out, "\n"); -+#if 0 -+ e = sym->rev_dep.expr; -+ if (e && e->type == E_SYMBOL -+ && e->left.sym->name) { -+ fprintf(out, "%s: %s", br2_symbol_printer(e->left.sym->name), -+ br2_symbol_printer(sym->name)); -+printf("%s is Selected BY: %s", sym->name, e->left.sym->name); -+ } -+#endif -+ } -+ } -+ } -+next: -+ if (menu->list) { -+ menu = menu->list; -+ continue; -+ } -+ if (menu->next) -+ menu = menu->next; -+ else while ((menu = menu->parent)) { -+ if (menu->next) { -+ menu = menu->next; -+ break; -+ } -+ } -+ } -+ fclose(out); -+ sprintf(buf2, "%s%s", dir, name); -+ rename(buf, buf2); -+ printf(_("#\n" -+ "# make dependencies written to %s\n" -+ "# ATTENTION buildroot devels!\n" -+ "# See top of this file before playing with this auto-preprequisites!\n" -+ "#\n"), name); -+ return 0; -+} -+ - /* write a dependency file as used by kbuild to track dependencies */ - int file_write_dep(const char *name) - { -@@ -71,7 +186,7 @@ - fprintf(out, "\n$(deps_config): ;\n"); - fclose(out); - rename("..config.tmp", name); -- return 0; -+ return write_make_deps(NULL); - } - - diff --git a/package/config/patches/09-implement-kconfig-probability.patch b/package/config/patches/09-implement-kconfig-probability.patch deleted file mode 100644 index 3f09673..0000000 --- a/package/config/patches/09-implement-kconfig-probability.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- - confdata.c | 22 +++++++++++++++++++--- - 1 file changed, 19 insertions(+), 3 deletions(-) - -Index: config/confdata.c -=================================================================== ---- config.orig/confdata.c -+++ config/confdata.c -@@ -996,7 +996,16 @@ - void conf_set_all_new_symbols(enum conf_def_mode mode) - { - struct symbol *sym, *csym; -- int i, cnt; -+ int i, cnt, prob = 50; -+ -+ if (mode == def_random) { -+ char *endp, *env = getenv("KCONFIG_PROBABILITY"); -+ if (env && *env) { -+ int tmp = (int)strtol(env, &endp, 10); -+ if (*endp == '\0' && tmp >= 0 && tmp <= 100) -+ prob = tmp; -+ } -+ } - - for_all_symbols(i, sym) { - if (sym_has_value(sym)) -@@ -1015,8 +1024,15 @@ - sym->def[S_DEF_USER].tri = no; - break; - case def_random: -- cnt = sym_get_type(sym) == S_TRISTATE ? 3 : 2; -- sym->def[S_DEF_USER].tri = (tristate)(rand() % cnt); -+ cnt = (rand() % 100) - (100 - prob); -+ if (cnt < 0) -+ sym->def[S_DEF_USER].tri = no; -+ else -+ if ((sym_get_type(sym) == S_TRISTATE) -+ && (cnt > prob/2)) -+ sym->def[S_DEF_USER].tri = mod; -+ else -+ sym->def[S_DEF_USER].tri = yes; - break; - default: - continue; diff --git a/package/config/patches/10-br-build-system.patch b/package/config/patches/10-br-build-system.patch deleted file mode 100644 index 85125e5..0000000 --- a/package/config/patches/10-br-build-system.patch +++ /dev/null @@ -1,80 +0,0 @@ ---- - Makefile.br | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - foo.h | 12 ++++++++++++ - 2 files changed, 65 insertions(+) - -Index: config/Makefile.br -=================================================================== ---- /dev/null -+++ config/Makefile.br -@@ -0,0 +1,53 @@ -+src := . -+top_srcdir=../../ -+top_builddir=../../ -+srctree := . -+obj ?= . -+ -+include Makefile -+#HOSTCFLAGS+=-Dinline="" -include foo.h -+-include $(obj)/.depend -+$(obj)/.depend: $(wildcard *.h *.c) -+ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) -MM *.c > $@ 2>/dev/null || : -+ -+__hostprogs := $(sort $(hostprogs-y) $(hostprogs-m)) -+host-csingle := $(foreach m,$(__hostprogs),$(if $($(m)-objs),,$(m))) -+host-cmulti := $(foreach m,$(__hostprogs),\ -+ $(if $($(m)-cxxobjs),,$(if $($(m)-objs),$(m)))) -+host-cxxmulti := $(foreach m,$(__hostprogs),\ -+ $(if $($(m)-cxxobjs),$(m),$(if $($(m)-objs),))) -+host-cobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-objs)))) -+host-cxxobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-cxxobjs)))) -+ -+HOST_EXTRACFLAGS += -I$(obj) -+ -+$(host-csingle): %: %.c -+ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< $(HOST_LOADLIBES) -o $(obj)/$@ -+ -+$(host-cmulti): %: $(host-cobjs) $(host-cshlib) -+ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs)) $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@ -+ -+$(host-cxxmulti): %: $(host-cxxobjs) $(host-cobjs) $(host-cshlib) -+ $(HOSTCXX) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs) $($(@F)-cxxobjs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@ -+ -+$(obj)/%.o: %.c -+ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) -c $< -o $@ -+ -+$(obj)/%.o: $(obj)/%.c -+ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) -c $< -o $@ -+ -+$(obj)/%.o: %.cc -+ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$(@F)) -c $< -o $@ -+ -+$(obj)/%:: $(src)/%_shipped -+ $(Q)cat $< > $@ -+ -+clean: -+ $(Q)rm -f $(addprefix $(obj)/,$(clean-files)) -+distclean: clean -+ $(Q)rm -f $(addprefix $(obj)/,$(lxdialog) $(conf-objs) $(mconf-objs) $(kxgettext-objs) \ -+ $(hostprogs-y) $(qconf-cxxobjs) $(qconf-objs) $(gconf-objs) \ -+ mconf .depend) -+ -+FORCE: -+.PHONY: FORCE clean distclean -Index: config/foo.h -=================================================================== ---- /dev/null -+++ config/foo.h -@@ -0,0 +1,12 @@ -+#ifndef __KCONFIG_FOO_H -+#define __KCONFIG_FOO_H -+ -+#ifndef __APPLE__ -+#include -+#endif -+#include -+ -+#ifndef PATH_MAX -+#define PATH_MAX 1024 -+#endif -+#endif /* __KCONFIG_FOO_H */ diff --git a/package/config/patches/11-use-mktemp-for-lxdialog.patch b/package/config/patches/11-use-mktemp-for-lxdialog.patch deleted file mode 100644 index 21ca228..0000000 --- a/package/config/patches/11-use-mktemp-for-lxdialog.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - lxdialog/check-lxdialog.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: config/lxdialog/check-lxdialog.sh -=================================================================== ---- config.orig/lxdialog/check-lxdialog.sh -+++ config/lxdialog/check-lxdialog.sh -@@ -33,7 +33,7 @@ - } - - # Temp file, try to clean up after us --tmp=.lxdialog.tmp -+tmp=$(mktemp) - trap "rm -f $tmp" 0 1 2 3 15 - - # Check if we can link to ncurses diff --git a/package/config/patches/12-fix-glade-file-path.patch b/package/config/patches/12-fix-glade-file-path.patch deleted file mode 100644 index 5b080c9..0000000 --- a/package/config/patches/12-fix-glade-file-path.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - gconf.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: config/gconf.c -=================================================================== ---- config.orig/gconf.c -+++ config/gconf.c -@@ -1521,7 +1521,7 @@ - /* Determine GUI path */ - env = getenv(SRCTREE); - if (env) -- glade_file = g_strconcat(env, "/scripts/kconfig/gconf.glade", NULL); -+ glade_file = g_strconcat(env, "/package/config/gconf.glade", NULL); - else if (av[0][0] == '/') - glade_file = g_strconcat(av[0], ".glade", NULL); - else diff --git a/package/config/patches/14-support-out-of-tree-config.patch b/package/config/patches/14-support-out-of-tree-config.patch deleted file mode 100644 index 9fa6384..0000000 --- a/package/config/patches/14-support-out-of-tree-config.patch +++ /dev/null @@ -1,199 +0,0 @@ ---- - conf.c | 1 - confdata.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++--------------- - util.c | 16 +++++++++++++-- - 3 files changed, 61 insertions(+), 18 deletions(-) - -Index: config/conf.c -=================================================================== ---- config.orig/conf.c -+++ config/conf.c -@@ -503,7 +503,6 @@ - } - name = av[optind]; - conf_parse(name); -- //zconfdump(stdout); - if (sync_kconfig) { - name = conf_get_configname(); - if (stat(name, &tmpstat)) { -Index: config/confdata.c -=================================================================== ---- config.orig/confdata.c -+++ config/confdata.c -@@ -71,9 +71,7 @@ - - const char *conf_get_autoconfig_name(void) - { -- char *name = getenv("KCONFIG_AUTOCONFIG"); -- -- return name ? name : "include/config/auto.conf"; -+ return getenv("KCONFIG_AUTOCONFIG"); - } - - static char *conf_expand_value(const char *in) -@@ -565,6 +563,9 @@ - int use_timestamp = 1; - char *env; - -+ if (!name) -+ name = conf_get_configname(); -+ - dirname[0] = 0; - if (name && name[0]) { - struct stat st; -@@ -671,6 +672,7 @@ - { - const char *name; - char path[PATH_MAX+1]; -+ char *opwd, *dir, *_name; - char *s, *d, c; - struct symbol *sym; - struct stat sb; -@@ -679,8 +681,20 @@ - name = conf_get_autoconfig_name(); - conf_read_simple(name, S_DEF_AUTO); - -- if (chdir("include/config")) -- return 1; -+ opwd = malloc(256); -+ _name = strdup(name); -+ if (opwd == NULL || _name == NULL) -+ return 1; -+ opwd = getcwd(opwd, 256); -+ dir = dirname(_name); -+ if (dir == NULL) { -+ res = 1; -+ goto err; -+ } -+ if (chdir(dir)) { -+ res = 1; -+ goto err; -+ } - - res = 0; - for_all_symbols(i, sym) { -@@ -773,9 +787,11 @@ - close(fd); - } - out: -- if (chdir("../..")) -- return 1; -- -+ if (chdir(opwd)) -+ res = 1; -+err: -+ free(opwd); -+ free(_name); - return res; - } - -@@ -787,25 +803,38 @@ - FILE *out, *tristate, *out_h; - time_t now; - int i; -+ char dir[PATH_MAX+1], buf[PATH_MAX+1]; -+ char *s; -+ -+ strcpy(dir, conf_get_configname()); -+ s = strrchr(dir, '/'); -+ if (s) -+ s[1] = 0; -+ else -+ dir[0] = 0; - - sym_clear_all_valid(); - -- file_write_dep("include/config/auto.conf.cmd"); -+ sprintf(buf, "%s.config.cmd", dir); -+ file_write_dep(buf); - - if (conf_split_config()) - return 1; - -- out = fopen(".tmpconfig", "w"); -+ sprintf(buf, "%s.tmpconfig", dir); -+ out = fopen(buf, "w"); - if (!out) - return 1; - -- tristate = fopen(".tmpconfig_tristate", "w"); -+ sprintf(buf, "%s.tmpconfig_tristate", dir); -+ tristate = fopen(buf, "w"); - if (!tristate) { - fclose(out); - return 1; - } - -- out_h = fopen(".tmpconfig.h", "w"); -+ sprintf(buf, "%s.tmpconfig.h", dir); -+ out_h = fopen(buf, "w"); - if (!out_h) { - fclose(out); - fclose(tristate); -@@ -885,19 +914,22 @@ - name = getenv("KCONFIG_AUTOHEADER"); - if (!name) - name = "include/generated/autoconf.h"; -- if (rename(".tmpconfig.h", name)) -+ sprintf(buf, "%s.tmpconfig.h", dir); -+ if (rename(buf, name)) - return 1; - name = getenv("KCONFIG_TRISTATE"); - if (!name) - name = "include/config/tristate.conf"; -- if (rename(".tmpconfig_tristate", name)) -+ sprintf(buf, "%s.tmpconfig_tristate", dir); -+ if (rename(buf, name)) - return 1; - name = conf_get_autoconfig_name(); - /* - * This must be the last step, kbuild has a dependency on auto.conf - * and this marks the successful completion of the previous steps. - */ -- if (rename(".tmpconfig", name)) -+ sprintf(buf, "%s.tmpconfig", dir); -+ if (rename(buf, name)) - return 1; - - return 0; -Index: config/util.c -=================================================================== ---- config.orig/util.c -+++ config/util.c -@@ -147,6 +147,8 @@ - /* write a dependency file as used by kbuild to track dependencies */ - int file_write_dep(const char *name) - { -+ char *str; -+ char buf[PATH_MAX+1], buf2[PATH_MAX+1], dir[PATH_MAX+1]; - struct symbol *sym, *env_sym; - struct expr *e; - struct file *file; -@@ -154,7 +156,16 @@ - - if (!name) - name = ".kconfig.d"; -- out = fopen("..config.tmp", "w"); -+ -+ strcpy(dir, conf_get_configname()); -+ str = strrchr(dir, '/'); -+ if (str) -+ str[1] = 0; -+ else -+ dir[0] = 0; -+ -+ sprintf(buf, "%s..config.tmp", dir); -+ out = fopen(buf, "w"); - if (!out) - return 1; - fprintf(out, "deps_config := \\\n"); -@@ -185,7 +196,8 @@ - - fprintf(out, "\n$(deps_config): ;\n"); - fclose(out); -- rename("..config.tmp", name); -+ sprintf(buf2, "%s%s", dir, name); -+ rename(buf, buf2); - return write_make_deps(NULL); - } - diff --git a/package/config/patches/series b/package/config/patches/series deleted file mode 100644 index defdf58..0000000 --- a/package/config/patches/series +++ /dev/null @@ -1,11 +0,0 @@ -01-kconfig-kernel-to-buildroot.patch -02-cpp-comments-to-c-comments.patch -03-change-config-option-prefix.patch -05-really-clean-everything.patch -06-br-build-system-integration.patch -08-make-write-deps.patch -09-implement-kconfig-probability.patch -10-br-build-system.patch -11-use-mktemp-for-lxdialog.patch -12-fix-glade-file-path.patch -14-support-out-of-tree-config.patch diff --git a/package/config/qconf.cc b/package/config/qconf.cc deleted file mode 100644 index 06dd2e3..0000000 --- a/package/config/qconf.cc +++ /dev/null @@ -1,1787 +0,0 @@ -/* - * Copyright (C) 2002 Roman Zippel - * Released under the terms of the GNU GPL v2.0. - */ - -#include - -#if QT_VERSION < 0x040000 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#else -#include -#include -#include -#include -#include -#include -#include -#include -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "lkc.h" -#include "qconf.h" - -#include "qconf.moc" -#include "images.c" - -#ifdef _ -# undef _ -# define _ qgettext -#endif - -static QApplication *configApp; -static ConfigSettings *configSettings; - -Q3Action *ConfigMainWindow::saveAction; - -static inline QString qgettext(const char* str) -{ - return QString::fromLocal8Bit(gettext(str)); -} - -static inline QString qgettext(const QString& str) -{ - return QString::fromLocal8Bit(gettext(str.latin1())); -} - -/** - * Reads a list of integer values from the application settings. - */ -Q3ValueList ConfigSettings::readSizes(const QString& key, bool *ok) -{ - Q3ValueList result; - QStringList entryList = readListEntry(key, ok); - QStringList::Iterator it; - - for (it = entryList.begin(); it != entryList.end(); ++it) - result.push_back((*it).toInt()); - - return result; -} - -/** - * Writes a list of integer values to the application settings. - */ -bool ConfigSettings::writeSizes(const QString& key, const Q3ValueList& value) -{ - QStringList stringList; - Q3ValueList::ConstIterator it; - - for (it = value.begin(); it != value.end(); ++it) - stringList.push_back(QString::number(*it)); - return writeEntry(key, stringList); -} - - -/* - * set the new data - * TODO check the value - */ -void ConfigItem::okRename(int col) -{ - Parent::okRename(col); - sym_set_string_value(menu->sym, text(dataColIdx).latin1()); - listView()->updateList(this); -} - -/* - * update the displayed of a menu entry - */ -void ConfigItem::updateMenu(void) -{ - ConfigList* list; - struct symbol* sym; - struct property *prop; - QString prompt; - int type; - tristate expr; - - list = listView(); - if (goParent) { - setPixmap(promptColIdx, list->menuBackPix); - prompt = ".."; - goto set_prompt; - } - - sym = menu->sym; - prop = menu->prompt; - prompt = _(menu_get_prompt(menu)); - - if (prop) switch (prop->type) { - case P_MENU: - if (list->mode == singleMode || list->mode == symbolMode) { - /* a menuconfig entry is displayed differently - * depending whether it's at the view root or a child. - */ - if (sym && list->rootEntry == menu) - break; - setPixmap(promptColIdx, list->menuPix); - } else { - if (sym) - break; - setPixmap(promptColIdx, 0); - } - goto set_prompt; - case P_COMMENT: - setPixmap(promptColIdx, 0); - goto set_prompt; - default: - ; - } - if (!sym) - goto set_prompt; - - setText(nameColIdx, QString::fromLocal8Bit(sym->name)); - - type = sym_get_type(sym); - switch (type) { - case S_BOOLEAN: - case S_TRISTATE: - char ch; - - if (!sym_is_changable(sym) && list->optMode == normalOpt) { - setPixmap(promptColIdx, 0); - setText(noColIdx, QString::null); - setText(modColIdx, QString::null); - setText(yesColIdx, QString::null); - break; - } - expr = sym_get_tristate_value(sym); - switch (expr) { - case yes: - if (sym_is_choice_value(sym) && type == S_BOOLEAN) - setPixmap(promptColIdx, list->choiceYesPix); - else - setPixmap(promptColIdx, list->symbolYesPix); - setText(yesColIdx, "Y"); - ch = 'Y'; - break; - case mod: - setPixmap(promptColIdx, list->symbolModPix); - setText(modColIdx, "M"); - ch = 'M'; - break; - default: - if (sym_is_choice_value(sym) && type == S_BOOLEAN) - setPixmap(promptColIdx, list->choiceNoPix); - else - setPixmap(promptColIdx, list->symbolNoPix); - setText(noColIdx, "N"); - ch = 'N'; - break; - } - if (expr != no) - setText(noColIdx, sym_tristate_within_range(sym, no) ? "_" : 0); - if (expr != mod) - setText(modColIdx, sym_tristate_within_range(sym, mod) ? "_" : 0); - if (expr != yes) - setText(yesColIdx, sym_tristate_within_range(sym, yes) ? "_" : 0); - - setText(dataColIdx, QChar(ch)); - break; - case S_INT: - case S_HEX: - case S_STRING: - const char* data; - - data = sym_get_string_value(sym); - - int i = list->mapIdx(dataColIdx); - if (i >= 0) - setRenameEnabled(i, TRUE); - setText(dataColIdx, data); - if (type == S_STRING) - prompt = QString("%1: %2").arg(prompt).arg(data); - else - prompt = QString("(%2) %1").arg(prompt).arg(data); - break; - } - if (!sym_has_value(sym) && visible) - prompt += _(" (NEW)"); -set_prompt: - setText(promptColIdx, prompt); -} - -void ConfigItem::testUpdateMenu(bool v) -{ - ConfigItem* i; - - visible = v; - if (!menu) - return; - - sym_calc_value(menu->sym); - if (menu->flags & MENU_CHANGED) { - /* the menu entry changed, so update all list items */ - menu->flags &= ~MENU_CHANGED; - for (i = (ConfigItem*)menu->data; i; i = i->nextItem) - i->updateMenu(); - } else if (listView()->updateAll) - updateMenu(); -} - -void ConfigItem::paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align) -{ - ConfigList* list = listView(); - - if (visible) { - if (isSelected() && !list->hasFocus() && list->mode == menuMode) - Parent::paintCell(p, list->inactivedColorGroup, column, width, align); - else - Parent::paintCell(p, cg, column, width, align); - } else - Parent::paintCell(p, list->disabledColorGroup, column, width, align); -} - -/* - * construct a menu entry - */ -void ConfigItem::init(void) -{ - if (menu) { - ConfigList* list = listView(); - nextItem = (ConfigItem*)menu->data; - menu->data = this; - - if (list->mode != fullMode) - setOpen(TRUE); - sym_calc_value(menu->sym); - } - updateMenu(); -} - -/* - * destruct a menu entry - */ -ConfigItem::~ConfigItem(void) -{ - if (menu) { - ConfigItem** ip = (ConfigItem**)&menu->data; - for (; *ip; ip = &(*ip)->nextItem) { - if (*ip == this) { - *ip = nextItem; - break; - } - } - } -} - -ConfigLineEdit::ConfigLineEdit(ConfigView* parent) - : Parent(parent) -{ - connect(this, SIGNAL(lostFocus()), SLOT(hide())); -} - -void ConfigLineEdit::show(ConfigItem* i) -{ - item = i; - if (sym_get_string_value(item->menu->sym)) - setText(QString::fromLocal8Bit(sym_get_string_value(item->menu->sym))); - else - setText(QString::null); - Parent::show(); - setFocus(); -} - -void ConfigLineEdit::keyPressEvent(QKeyEvent* e) -{ - switch (e->key()) { - case Qt::Key_Escape: - break; - case Qt::Key_Return: - case Qt::Key_Enter: - sym_set_string_value(item->menu->sym, text().latin1()); - parent()->updateList(item); - break; - default: - Parent::keyPressEvent(e); - return; - } - e->accept(); - parent()->list->setFocus(); - hide(); -} - -ConfigList::ConfigList(ConfigView* p, const char *name) - : Parent(p, name), - updateAll(false), - symbolYesPix(xpm_symbol_yes), symbolModPix(xpm_symbol_mod), symbolNoPix(xpm_symbol_no), - choiceYesPix(xpm_choice_yes), choiceNoPix(xpm_choice_no), - menuPix(xpm_menu), menuInvPix(xpm_menu_inv), menuBackPix(xpm_menuback), voidPix(xpm_void), - showName(false), showRange(false), showData(false), optMode(normalOpt), - rootEntry(0), headerPopup(0) -{ - int i; - - setSorting(-1); - setRootIsDecorated(TRUE); - disabledColorGroup = palette().active(); - disabledColorGroup.setColor(QColorGroup::Text, palette().disabled().text()); - inactivedColorGroup = palette().active(); - inactivedColorGroup.setColor(QColorGroup::Highlight, palette().disabled().highlight()); - - connect(this, SIGNAL(selectionChanged(void)), - SLOT(updateSelection(void))); - - if (name) { - configSettings->beginGroup(name); - showName = configSettings->readBoolEntry("/showName", false); - showRange = configSettings->readBoolEntry("/showRange", false); - showData = configSettings->readBoolEntry("/showData", false); - optMode = (enum optionMode)configSettings->readNumEntry("/optionMode", false); - configSettings->endGroup(); - connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); - } - - for (i = 0; i < colNr; i++) - colMap[i] = colRevMap[i] = -1; - addColumn(promptColIdx, _("Option")); - - reinit(); -} - -bool ConfigList::menuSkip(struct menu *menu) -{ - if (optMode == normalOpt && menu_is_visible(menu)) - return false; - if (optMode == promptOpt && menu_has_prompt(menu)) - return false; - if (optMode == allOpt) - return false; - return true; -} - -void ConfigList::reinit(void) -{ - removeColumn(dataColIdx); - removeColumn(yesColIdx); - removeColumn(modColIdx); - removeColumn(noColIdx); - removeColumn(nameColIdx); - - if (showName) - addColumn(nameColIdx, _("Name")); - if (showRange) { - addColumn(noColIdx, "N"); - addColumn(modColIdx, "M"); - addColumn(yesColIdx, "Y"); - } - if (showData) - addColumn(dataColIdx, _("Value")); - - updateListAll(); -} - -void ConfigList::saveSettings(void) -{ - if (name()) { - configSettings->beginGroup(name()); - configSettings->writeEntry("/showName", showName); - configSettings->writeEntry("/showRange", showRange); - configSettings->writeEntry("/showData", showData); - configSettings->writeEntry("/optionMode", (int)optMode); - configSettings->endGroup(); - } -} - -ConfigItem* ConfigList::findConfigItem(struct menu *menu) -{ - ConfigItem* item = (ConfigItem*)menu->data; - - for (; item; item = item->nextItem) { - if (this == item->listView()) - break; - } - - return item; -} - -void ConfigList::updateSelection(void) -{ - struct menu *menu; - enum prop_type type; - - ConfigItem* item = (ConfigItem*)selectedItem(); - if (!item) - return; - - menu = item->menu; - emit menuChanged(menu); - if (!menu) - return; - type = menu->prompt ? menu->prompt->type : P_UNKNOWN; - if (mode == menuMode && type == P_MENU) - emit menuSelected(menu); -} - -void ConfigList::updateList(ConfigItem* item) -{ - ConfigItem* last = 0; - - if (!rootEntry) { - if (mode != listMode) - goto update; - Q3ListViewItemIterator it(this); - ConfigItem* item; - - for (; it.current(); ++it) { - item = (ConfigItem*)it.current(); - if (!item->menu) - continue; - item->testUpdateMenu(menu_is_visible(item->menu)); - } - return; - } - - if (rootEntry != &rootmenu && (mode == singleMode || - (mode == symbolMode && rootEntry->parent != &rootmenu))) { - item = firstChild(); - if (!item) - item = new ConfigItem(this, 0, true); - last = item; - } - if ((mode == singleMode || (mode == symbolMode && !(rootEntry->flags & MENU_ROOT))) && - rootEntry->sym && rootEntry->prompt) { - item = last ? last->nextSibling() : firstChild(); - if (!item) - item = new ConfigItem(this, last, rootEntry, true); - else - item->testUpdateMenu(true); - - updateMenuList(item, rootEntry); - triggerUpdate(); - return; - } -update: - updateMenuList(this, rootEntry); - triggerUpdate(); -} - -void ConfigList::setValue(ConfigItem* item, tristate val) -{ - struct symbol* sym; - int type; - tristate oldval; - - sym = item->menu ? item->menu->sym : 0; - if (!sym) - return; - - type = sym_get_type(sym); - switch (type) { - case S_BOOLEAN: - case S_TRISTATE: - oldval = sym_get_tristate_value(sym); - - if (!sym_set_tristate_value(sym, val)) - return; - if (oldval == no && item->menu->list) - item->setOpen(TRUE); - parent()->updateList(item); - break; - } -} - -void ConfigList::changeValue(ConfigItem* item) -{ - struct symbol* sym; - struct menu* menu; - int type, oldexpr, newexpr; - - menu = item->menu; - if (!menu) - return; - sym = menu->sym; - if (!sym) { - if (item->menu->list) - item->setOpen(!item->isOpen()); - return; - } - - type = sym_get_type(sym); - switch (type) { - case S_BOOLEAN: - case S_TRISTATE: - oldexpr = sym_get_tristate_value(sym); - newexpr = sym_toggle_tristate_value(sym); - if (item->menu->list) { - if (oldexpr == newexpr) - item->setOpen(!item->isOpen()); - else if (oldexpr == no) - item->setOpen(TRUE); - } - if (oldexpr != newexpr) - parent()->updateList(item); - break; - case S_INT: - case S_HEX: - case S_STRING: - if (colMap[dataColIdx] >= 0) - item->startRename(colMap[dataColIdx]); - else - parent()->lineEdit->show(item); - break; - } -} - -void ConfigList::setRootMenu(struct menu *menu) -{ - enum prop_type type; - - if (rootEntry == menu) - return; - type = menu && menu->prompt ? menu->prompt->type : P_UNKNOWN; - if (type != P_MENU) - return; - updateMenuList(this, 0); - rootEntry = menu; - updateListAll(); - setSelected(currentItem(), hasFocus()); - ensureItemVisible(currentItem()); -} - -void ConfigList::setParentMenu(void) -{ - ConfigItem* item; - struct menu *oldroot; - - oldroot = rootEntry; - if (rootEntry == &rootmenu) - return; - setRootMenu(menu_get_parent_menu(rootEntry->parent)); - - Q3ListViewItemIterator it(this); - for (; (item = (ConfigItem*)it.current()); it++) { - if (item->menu == oldroot) { - setCurrentItem(item); - ensureItemVisible(item); - break; - } - } -} - -/* - * update all the children of a menu entry - * removes/adds the entries from the parent widget as necessary - * - * parent: either the menu list widget or a menu entry widget - * menu: entry to be updated - */ -template -void ConfigList::updateMenuList(P* parent, struct menu* menu) -{ - struct menu* child; - ConfigItem* item; - ConfigItem* last; - bool visible; - enum prop_type type; - - if (!menu) { - while ((item = parent->firstChild())) - delete item; - return; - } - - last = parent->firstChild(); - if (last && !last->goParent) - last = 0; - for (child = menu->list; child; child = child->next) { - item = last ? last->nextSibling() : parent->firstChild(); - type = child->prompt ? child->prompt->type : P_UNKNOWN; - - switch (mode) { - case menuMode: - if (!(child->flags & MENU_ROOT)) - goto hide; - break; - case symbolMode: - if (child->flags & MENU_ROOT) - goto hide; - break; - default: - break; - } - - visible = menu_is_visible(child); - if (!menuSkip(child)) { - if (!child->sym && !child->list && !child->prompt) - continue; - if (!item || item->menu != child) - item = new ConfigItem(parent, last, child, visible); - else - item->testUpdateMenu(visible); - - if (mode == fullMode || mode == menuMode || type != P_MENU) - updateMenuList(item, child); - else - updateMenuList(item, 0); - last = item; - continue; - } - hide: - if (item && item->menu == child) { - last = parent->firstChild(); - if (last == item) - last = 0; - else while (last->nextSibling() != item) - last = last->nextSibling(); - delete item; - } - } -} - -void ConfigList::keyPressEvent(QKeyEvent* ev) -{ - Q3ListViewItem* i = currentItem(); - ConfigItem* item; - struct menu *menu; - enum prop_type type; - - if (ev->key() == Qt::Key_Escape && mode != fullMode && mode != listMode) { - emit parentSelected(); - ev->accept(); - return; - } - - if (!i) { - Parent::keyPressEvent(ev); - return; - } - item = (ConfigItem*)i; - - switch (ev->key()) { - case Qt::Key_Return: - case Qt::Key_Enter: - if (item->goParent) { - emit parentSelected(); - break; - } - menu = item->menu; - if (!menu) - break; - type = menu->prompt ? menu->prompt->type : P_UNKNOWN; - if (type == P_MENU && rootEntry != menu && - mode != fullMode && mode != menuMode) { - emit menuSelected(menu); - break; - } - case Qt::Key_Space: - changeValue(item); - break; - case Qt::Key_N: - setValue(item, no); - break; - case Qt::Key_M: - setValue(item, mod); - break; - case Qt::Key_Y: - setValue(item, yes); - break; - default: - Parent::keyPressEvent(ev); - return; - } - ev->accept(); -} - -void ConfigList::contentsMousePressEvent(QMouseEvent* e) -{ - //QPoint p(contentsToViewport(e->pos())); - //printf("contentsMousePressEvent: %d,%d\n", p.x(), p.y()); - Parent::contentsMousePressEvent(e); -} - -void ConfigList::contentsMouseReleaseEvent(QMouseEvent* e) -{ - QPoint p(contentsToViewport(e->pos())); - ConfigItem* item = (ConfigItem*)itemAt(p); - struct menu *menu; - enum prop_type ptype; - const QPixmap* pm; - int idx, x; - - if (!item) - goto skip; - - menu = item->menu; - x = header()->offset() + p.x(); - idx = colRevMap[header()->sectionAt(x)]; - switch (idx) { - case promptColIdx: - pm = item->pixmap(promptColIdx); - if (pm) { - int off = header()->sectionPos(0) + itemMargin() + - treeStepSize() * (item->depth() + (rootIsDecorated() ? 1 : 0)); - if (x >= off && x < off + pm->width()) { - if (item->goParent) { - emit parentSelected(); - break; - } else if (!menu) - break; - ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; - if (ptype == P_MENU && rootEntry != menu && - mode != fullMode && mode != menuMode) - emit menuSelected(menu); - else - changeValue(item); - } - } - break; - case noColIdx: - setValue(item, no); - break; - case modColIdx: - setValue(item, mod); - break; - case yesColIdx: - setValue(item, yes); - break; - case dataColIdx: - changeValue(item); - break; - } - -skip: - //printf("contentsMouseReleaseEvent: %d,%d\n", p.x(), p.y()); - Parent::contentsMouseReleaseEvent(e); -} - -void ConfigList::contentsMouseMoveEvent(QMouseEvent* e) -{ - //QPoint p(contentsToViewport(e->pos())); - //printf("contentsMouseMoveEvent: %d,%d\n", p.x(), p.y()); - Parent::contentsMouseMoveEvent(e); -} - -void ConfigList::contentsMouseDoubleClickEvent(QMouseEvent* e) -{ - QPoint p(contentsToViewport(e->pos())); - ConfigItem* item = (ConfigItem*)itemAt(p); - struct menu *menu; - enum prop_type ptype; - - if (!item) - goto skip; - if (item->goParent) { - emit parentSelected(); - goto skip; - } - menu = item->menu; - if (!menu) - goto skip; - ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; - if (ptype == P_MENU && (mode == singleMode || mode == symbolMode)) - emit menuSelected(menu); - else if (menu->sym) - changeValue(item); - -skip: - //printf("contentsMouseDoubleClickEvent: %d,%d\n", p.x(), p.y()); - Parent::contentsMouseDoubleClickEvent(e); -} - -void ConfigList::focusInEvent(QFocusEvent *e) -{ - struct menu *menu = NULL; - - Parent::focusInEvent(e); - - ConfigItem* item = (ConfigItem *)currentItem(); - if (item) { - setSelected(item, TRUE); - menu = item->menu; - } - emit gotFocus(menu); -} - -void ConfigList::contextMenuEvent(QContextMenuEvent *e) -{ - if (e->y() <= header()->geometry().bottom()) { - if (!headerPopup) { - Q3Action *action; - - headerPopup = new Q3PopupMenu(this); - action = new Q3Action(NULL, _("Show Name"), 0, this); - action->setToggleAction(TRUE); - connect(action, SIGNAL(toggled(bool)), - parent(), SLOT(setShowName(bool))); - connect(parent(), SIGNAL(showNameChanged(bool)), - action, SLOT(setOn(bool))); - action->setOn(showName); - action->addTo(headerPopup); - action = new Q3Action(NULL, _("Show Range"), 0, this); - action->setToggleAction(TRUE); - connect(action, SIGNAL(toggled(bool)), - parent(), SLOT(setShowRange(bool))); - connect(parent(), SIGNAL(showRangeChanged(bool)), - action, SLOT(setOn(bool))); - action->setOn(showRange); - action->addTo(headerPopup); - action = new Q3Action(NULL, _("Show Data"), 0, this); - action->setToggleAction(TRUE); - connect(action, SIGNAL(toggled(bool)), - parent(), SLOT(setShowData(bool))); - connect(parent(), SIGNAL(showDataChanged(bool)), - action, SLOT(setOn(bool))); - action->setOn(showData); - action->addTo(headerPopup); - } - headerPopup->exec(e->globalPos()); - e->accept(); - } else - e->ignore(); -} - -ConfigView*ConfigView::viewList; -QAction *ConfigView::showNormalAction; -QAction *ConfigView::showAllAction; -QAction *ConfigView::showPromptAction; - -ConfigView::ConfigView(QWidget* parent, const char *name) - : Parent(parent, name) -{ - list = new ConfigList(this, name); - lineEdit = new ConfigLineEdit(this); - lineEdit->hide(); - - this->nextView = viewList; - viewList = this; -} - -ConfigView::~ConfigView(void) -{ - ConfigView** vp; - - for (vp = &viewList; *vp; vp = &(*vp)->nextView) { - if (*vp == this) { - *vp = nextView; - break; - } - } -} - -void ConfigView::setOptionMode(QAction *act) -{ - if (act == showNormalAction) - list->optMode = normalOpt; - else if (act == showAllAction) - list->optMode = allOpt; - else - list->optMode = promptOpt; - - list->updateListAll(); -} - -void ConfigView::setShowName(bool b) -{ - if (list->showName != b) { - list->showName = b; - list->reinit(); - emit showNameChanged(b); - } -} - -void ConfigView::setShowRange(bool b) -{ - if (list->showRange != b) { - list->showRange = b; - list->reinit(); - emit showRangeChanged(b); - } -} - -void ConfigView::setShowData(bool b) -{ - if (list->showData != b) { - list->showData = b; - list->reinit(); - emit showDataChanged(b); - } -} - -void ConfigList::setAllOpen(bool open) -{ - Q3ListViewItemIterator it(this); - - for (; it.current(); it++) - it.current()->setOpen(open); -} - -void ConfigView::updateList(ConfigItem* item) -{ - ConfigView* v; - - for (v = viewList; v; v = v->nextView) - v->list->updateList(item); -} - -void ConfigView::updateListAll(void) -{ - ConfigView* v; - - for (v = viewList; v; v = v->nextView) - v->list->updateListAll(); -} - -ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name) - : Parent(parent, name), sym(0), _menu(0) -{ - if (name) { - configSettings->beginGroup(name); - _showDebug = configSettings->readBoolEntry("/showDebug", false); - configSettings->endGroup(); - connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); - } -} - -void ConfigInfoView::saveSettings(void) -{ - if (name()) { - configSettings->beginGroup(name()); - configSettings->writeEntry("/showDebug", showDebug()); - configSettings->endGroup(); - } -} - -void ConfigInfoView::setShowDebug(bool b) -{ - if (_showDebug != b) { - _showDebug = b; - if (_menu) - menuInfo(); - else if (sym) - symbolInfo(); - emit showDebugChanged(b); - } -} - -void ConfigInfoView::setInfo(struct menu *m) -{ - if (_menu == m) - return; - _menu = m; - sym = NULL; - if (!_menu) - clear(); - else - menuInfo(); -} - -void ConfigInfoView::symbolInfo(void) -{ - QString str; - - str += "Symbol: "; - str += print_filter(sym->name); - str += "

value: "; - str += print_filter(sym_get_string_value(sym)); - str += "
visibility: "; - str += sym->visible == yes ? "y" : sym->visible == mod ? "m" : "n"; - str += "
"; - str += debug_info(sym); - - setText(str); -} - -void ConfigInfoView::menuInfo(void) -{ - struct symbol* sym; - QString head, debug, help; - - sym = _menu->sym; - if (sym) { - if (_menu->prompt) { - head += ""; - head += print_filter(_(_menu->prompt->text)); - head += ""; - if (sym->name) { - head += " ("; - if (showDebug()) - head += QString().sprintf("", sym); - head += print_filter(sym->name); - if (showDebug()) - head += ""; - head += ")"; - } - } else if (sym->name) { - head += ""; - if (showDebug()) - head += QString().sprintf("", sym); - head += print_filter(sym->name); - if (showDebug()) - head += ""; - head += ""; - } - head += "

"; - - if (showDebug()) - debug = debug_info(sym); - - struct gstr help_gstr = str_new(); - menu_get_ext_help(_menu, &help_gstr); - help = print_filter(str_get(&help_gstr)); - str_free(&help_gstr); - } else if (_menu->prompt) { - head += ""; - head += print_filter(_(_menu->prompt->text)); - head += "

"; - if (showDebug()) { - if (_menu->prompt->visible.expr) { - debug += "  dep: "; - expr_print(_menu->prompt->visible.expr, expr_print_help, &debug, E_NONE); - debug += "

"; - } - } - } - if (showDebug()) - debug += QString().sprintf("defined at %s:%d

", _menu->file->name, _menu->lineno); - - setText(head + debug + help); -} - -QString ConfigInfoView::debug_info(struct symbol *sym) -{ - QString debug; - - debug += "type: "; - debug += print_filter(sym_type_name(sym->type)); - if (sym_is_choice(sym)) - debug += " (choice)"; - debug += "
"; - if (sym->rev_dep.expr) { - debug += "reverse dep: "; - expr_print(sym->rev_dep.expr, expr_print_help, &debug, E_NONE); - debug += "
"; - } - for (struct property *prop = sym->prop; prop; prop = prop->next) { - switch (prop->type) { - case P_PROMPT: - case P_MENU: - debug += QString().sprintf("prompt: ", prop->menu); - debug += print_filter(_(prop->text)); - debug += "
"; - break; - case P_DEFAULT: - case P_SELECT: - case P_RANGE: - case P_ENV: - debug += prop_get_type_name(prop->type); - debug += ": "; - expr_print(prop->expr, expr_print_help, &debug, E_NONE); - debug += "
"; - break; - case P_CHOICE: - if (sym_is_choice(sym)) { - debug += "choice: "; - expr_print(prop->expr, expr_print_help, &debug, E_NONE); - debug += "
"; - } - break; - default: - debug += "unknown property: "; - debug += prop_get_type_name(prop->type); - debug += "
"; - } - if (prop->visible.expr) { - debug += "    dep: "; - expr_print(prop->visible.expr, expr_print_help, &debug, E_NONE); - debug += "
"; - } - } - debug += "
"; - - return debug; -} - -QString ConfigInfoView::print_filter(const QString &str) -{ - QRegExp re("[<>&\"\\n]"); - QString res = str; - for (int i = 0; (i = res.find(re, i)) >= 0;) { - switch (res[i].latin1()) { - case '<': - res.replace(i, 1, "<"); - i += 4; - break; - case '>': - res.replace(i, 1, ">"); - i += 4; - break; - case '&': - res.replace(i, 1, "&"); - i += 5; - break; - case '"': - res.replace(i, 1, """); - i += 6; - break; - case '\n': - res.replace(i, 1, "
"); - i += 4; - break; - } - } - return res; -} - -void ConfigInfoView::expr_print_help(void *data, struct symbol *sym, const char *str) -{ - QString* text = reinterpret_cast(data); - QString str2 = print_filter(str); - - if (sym && sym->name && !(sym->flags & SYMBOL_CONST)) { - *text += QString().sprintf("", sym); - *text += str2; - *text += ""; - } else - *text += str2; -} - -Q3PopupMenu* ConfigInfoView::createPopupMenu(const QPoint& pos) -{ - Q3PopupMenu* popup = Parent::createPopupMenu(pos); - Q3Action* action = new Q3Action(NULL, _("Show Debug Info"), 0, popup); - action->setToggleAction(TRUE); - connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool))); - connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool))); - action->setOn(showDebug()); - popup->insertSeparator(); - action->addTo(popup); - return popup; -} - -void ConfigInfoView::contentsContextMenuEvent(QContextMenuEvent *e) -{ - Parent::contentsContextMenuEvent(e); -} - -ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *name) - : Parent(parent, name), result(NULL) -{ - setCaption("Search Config"); - - QVBoxLayout* layout1 = new QVBoxLayout(this, 11, 6); - QHBoxLayout* layout2 = new QHBoxLayout(0, 0, 6); - layout2->addWidget(new QLabel(_("Find:"), this)); - editField = new QLineEdit(this); - connect(editField, SIGNAL(returnPressed()), SLOT(search())); - layout2->addWidget(editField); - searchButton = new QPushButton(_("Search"), this); - searchButton->setAutoDefault(FALSE); - connect(searchButton, SIGNAL(clicked()), SLOT(search())); - layout2->addWidget(searchButton); - layout1->addLayout(layout2); - - split = new QSplitter(this); - split->setOrientation(Qt::Vertical); - list = new ConfigView(split, name); - list->list->mode = listMode; - info = new ConfigInfoView(split, name); - connect(list->list, SIGNAL(menuChanged(struct menu *)), - info, SLOT(setInfo(struct menu *))); - connect(list->list, SIGNAL(menuChanged(struct menu *)), - parent, SLOT(setMenuLink(struct menu *))); - - layout1->addWidget(split); - - if (name) { - int x, y, width, height; - bool ok; - - configSettings->beginGroup(name); - width = configSettings->readNumEntry("/window width", parent->width() / 2); - height = configSettings->readNumEntry("/window height", parent->height() / 2); - resize(width, height); - x = configSettings->readNumEntry("/window x", 0, &ok); - if (ok) - y = configSettings->readNumEntry("/window y", 0, &ok); - if (ok) - move(x, y); - Q3ValueList sizes = configSettings->readSizes("/split", &ok); - if (ok) - split->setSizes(sizes); - configSettings->endGroup(); - connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); - } -} - -void ConfigSearchWindow::saveSettings(void) -{ - if (name()) { - configSettings->beginGroup(name()); - configSettings->writeEntry("/window x", pos().x()); - configSettings->writeEntry("/window y", pos().y()); - configSettings->writeEntry("/window width", size().width()); - configSettings->writeEntry("/window height", size().height()); - configSettings->writeSizes("/split", split->sizes()); - configSettings->endGroup(); - } -} - -void ConfigSearchWindow::search(void) -{ - struct symbol **p; - struct property *prop; - ConfigItem *lastItem = NULL; - - free(result); - list->list->clear(); - info->clear(); - - result = sym_re_search(editField->text().latin1()); - if (!result) - return; - for (p = result; *p; p++) { - for_all_prompts((*p), prop) - lastItem = new ConfigItem(list->list, lastItem, prop->menu, - menu_is_visible(prop->menu)); - } -} - -/* - * Construct the complete config widget - */ -ConfigMainWindow::ConfigMainWindow(void) - : searchWindow(0) -{ - QMenuBar* menu; - bool ok; - int x, y, width, height; - char title[256]; - - QDesktopWidget *d = configApp->desktop(); - snprintf(title, sizeof(title), "%s%s", - rootmenu.prompt->text, -#if QT_VERSION < 0x040000 - " (Qt3)" -#else - "" -#endif - ); - setCaption(title); - - width = configSettings->readNumEntry("/window width", d->width() - 64); - height = configSettings->readNumEntry("/window height", d->height() - 64); - resize(width, height); - x = configSettings->readNumEntry("/window x", 0, &ok); - if (ok) - y = configSettings->readNumEntry("/window y", 0, &ok); - if (ok) - move(x, y); - - split1 = new QSplitter(this); - split1->setOrientation(Qt::Horizontal); - setCentralWidget(split1); - - menuView = new ConfigView(split1, "menu"); - menuList = menuView->list; - - split2 = new QSplitter(split1); - split2->setOrientation(Qt::Vertical); - - // create config tree - configView = new ConfigView(split2, "config"); - configList = configView->list; - - helpText = new ConfigInfoView(split2, "help"); - helpText->setTextFormat(Qt::RichText); - - setTabOrder(configList, helpText); - configList->setFocus(); - - menu = menuBar(); - toolBar = new Q3ToolBar("Tools", this); - - backAction = new Q3Action("Back", QPixmap(xpm_back), _("Back"), 0, this); - connect(backAction, SIGNAL(activated()), SLOT(goBack())); - backAction->setEnabled(FALSE); - Q3Action *quitAction = new Q3Action("Quit", _("&Quit"), Qt::CTRL + Qt::Key_Q, this); - connect(quitAction, SIGNAL(activated()), SLOT(close())); - Q3Action *loadAction = new Q3Action("Load", QPixmap(xpm_load), _("&Load"), Qt::CTRL + Qt::Key_L, this); - connect(loadAction, SIGNAL(activated()), SLOT(loadConfig())); - saveAction = new Q3Action("Save", QPixmap(xpm_save), _("&Save"), Qt::CTRL + Qt::Key_S, this); - connect(saveAction, SIGNAL(activated()), SLOT(saveConfig())); - conf_set_changed_callback(conf_changed); - // Set saveAction's initial state - conf_changed(); - Q3Action *saveAsAction = new Q3Action("Save As...", _("Save &As..."), 0, this); - connect(saveAsAction, SIGNAL(activated()), SLOT(saveConfigAs())); - Q3Action *searchAction = new Q3Action("Find", _("&Find"), Qt::CTRL + Qt::Key_F, this); - connect(searchAction, SIGNAL(activated()), SLOT(searchConfig())); - Q3Action *singleViewAction = new Q3Action("Single View", QPixmap(xpm_single_view), _("Single View"), 0, this); - connect(singleViewAction, SIGNAL(activated()), SLOT(showSingleView())); - Q3Action *splitViewAction = new Q3Action("Split View", QPixmap(xpm_split_view), _("Split View"), 0, this); - connect(splitViewAction, SIGNAL(activated()), SLOT(showSplitView())); - Q3Action *fullViewAction = new Q3Action("Full View", QPixmap(xpm_tree_view), _("Full View"), 0, this); - connect(fullViewAction, SIGNAL(activated()), SLOT(showFullView())); - - Q3Action *showNameAction = new Q3Action(NULL, _("Show Name"), 0, this); - showNameAction->setToggleAction(TRUE); - connect(showNameAction, SIGNAL(toggled(bool)), configView, SLOT(setShowName(bool))); - connect(configView, SIGNAL(showNameChanged(bool)), showNameAction, SLOT(setOn(bool))); - showNameAction->setOn(configView->showName()); - Q3Action *showRangeAction = new Q3Action(NULL, _("Show Range"), 0, this); - showRangeAction->setToggleAction(TRUE); - connect(showRangeAction, SIGNAL(toggled(bool)), configView, SLOT(setShowRange(bool))); - connect(configView, SIGNAL(showRangeChanged(bool)), showRangeAction, SLOT(setOn(bool))); - showRangeAction->setOn(configList->showRange); - Q3Action *showDataAction = new Q3Action(NULL, _("Show Data"), 0, this); - showDataAction->setToggleAction(TRUE); - connect(showDataAction, SIGNAL(toggled(bool)), configView, SLOT(setShowData(bool))); - connect(configView, SIGNAL(showDataChanged(bool)), showDataAction, SLOT(setOn(bool))); - showDataAction->setOn(configList->showData); - - QActionGroup *optGroup = new QActionGroup(this); - optGroup->setExclusive(TRUE); - connect(optGroup, SIGNAL(selected(QAction *)), configView, - SLOT(setOptionMode(QAction *))); - connect(optGroup, SIGNAL(selected(QAction *)), menuView, - SLOT(setOptionMode(QAction *))); - -#if QT_VERSION >= 0x040000 - configView->showNormalAction = new QAction(_("Show Normal Options"), optGroup); - configView->showAllAction = new QAction(_("Show All Options"), optGroup); - configView->showPromptAction = new QAction(_("Show Prompt Options"), optGroup); -#else - configView->showNormalAction = new QAction(_("Show Normal Options"), 0, optGroup); - configView->showAllAction = new QAction(_("Show All Options"), 0, optGroup); - configView->showPromptAction = new QAction(_("Show Prompt Options"), 0, optGroup); -#endif - configView->showNormalAction->setToggleAction(TRUE); - configView->showNormalAction->setOn(configList->optMode == normalOpt); - configView->showAllAction->setToggleAction(TRUE); - configView->showAllAction->setOn(configList->optMode == allOpt); - configView->showPromptAction->setToggleAction(TRUE); - configView->showPromptAction->setOn(configList->optMode == promptOpt); - - Q3Action *showDebugAction = new Q3Action(NULL, _("Show Debug Info"), 0, this); - showDebugAction->setToggleAction(TRUE); - connect(showDebugAction, SIGNAL(toggled(bool)), helpText, SLOT(setShowDebug(bool))); - connect(helpText, SIGNAL(showDebugChanged(bool)), showDebugAction, SLOT(setOn(bool))); - showDebugAction->setOn(helpText->showDebug()); - - Q3Action *showIntroAction = new Q3Action(NULL, _("Introduction"), 0, this); - connect(showIntroAction, SIGNAL(activated()), SLOT(showIntro())); - Q3Action *showAboutAction = new Q3Action(NULL, _("About"), 0, this); - connect(showAboutAction, SIGNAL(activated()), SLOT(showAbout())); - - // init tool bar - backAction->addTo(toolBar); - toolBar->addSeparator(); - loadAction->addTo(toolBar); - saveAction->addTo(toolBar); - toolBar->addSeparator(); - singleViewAction->addTo(toolBar); - splitViewAction->addTo(toolBar); - fullViewAction->addTo(toolBar); - - // create config menu - Q3PopupMenu* config = new Q3PopupMenu(this); - menu->insertItem(_("&File"), config); - loadAction->addTo(config); - saveAction->addTo(config); - saveAsAction->addTo(config); - config->insertSeparator(); - quitAction->addTo(config); - - // create edit menu - Q3PopupMenu* editMenu = new Q3PopupMenu(this); - menu->insertItem(_("&Edit"), editMenu); - searchAction->addTo(editMenu); - - // create options menu - Q3PopupMenu* optionMenu = new Q3PopupMenu(this); - menu->insertItem(_("&Option"), optionMenu); - showNameAction->addTo(optionMenu); - showRangeAction->addTo(optionMenu); - showDataAction->addTo(optionMenu); - optionMenu->insertSeparator(); - optGroup->addTo(optionMenu); - optionMenu->insertSeparator(); - - // create help menu - Q3PopupMenu* helpMenu = new Q3PopupMenu(this); - menu->insertSeparator(); - menu->insertItem(_("&Help"), helpMenu); - showIntroAction->addTo(helpMenu); - showAboutAction->addTo(helpMenu); - - connect(configList, SIGNAL(menuChanged(struct menu *)), - helpText, SLOT(setInfo(struct menu *))); - connect(configList, SIGNAL(menuSelected(struct menu *)), - SLOT(changeMenu(struct menu *))); - connect(configList, SIGNAL(parentSelected()), - SLOT(goBack())); - connect(menuList, SIGNAL(menuChanged(struct menu *)), - helpText, SLOT(setInfo(struct menu *))); - connect(menuList, SIGNAL(menuSelected(struct menu *)), - SLOT(changeMenu(struct menu *))); - - connect(configList, SIGNAL(gotFocus(struct menu *)), - helpText, SLOT(setInfo(struct menu *))); - connect(menuList, SIGNAL(gotFocus(struct menu *)), - helpText, SLOT(setInfo(struct menu *))); - connect(menuList, SIGNAL(gotFocus(struct menu *)), - SLOT(listFocusChanged(void))); - connect(helpText, SIGNAL(menuSelected(struct menu *)), - SLOT(setMenuLink(struct menu *))); - - QString listMode = configSettings->readEntry("/listMode", "symbol"); - if (listMode == "single") - showSingleView(); - else if (listMode == "full") - showFullView(); - else /*if (listMode == "split")*/ - showSplitView(); - - // UI setup done, restore splitter positions - Q3ValueList sizes = configSettings->readSizes("/split1", &ok); - if (ok) - split1->setSizes(sizes); - - sizes = configSettings->readSizes("/split2", &ok); - if (ok) - split2->setSizes(sizes); -} - -void ConfigMainWindow::loadConfig(void) -{ - QString s = Q3FileDialog::getOpenFileName(conf_get_configname(), NULL, this); - if (s.isNull()) - return; - if (conf_read(QFile::encodeName(s))) - QMessageBox::information(this, "qconf", _("Unable to load configuration!")); - ConfigView::updateListAll(); -} - -void ConfigMainWindow::saveConfig(void) -{ - if (conf_write(NULL)) - QMessageBox::information(this, "qconf", _("Unable to save configuration!")); -} - -void ConfigMainWindow::saveConfigAs(void) -{ - QString s = Q3FileDialog::getSaveFileName(conf_get_configname(), NULL, this); - if (s.isNull()) - return; - if (conf_write(QFile::encodeName(s))) - QMessageBox::information(this, "qconf", _("Unable to save configuration!")); -} - -void ConfigMainWindow::searchConfig(void) -{ - if (!searchWindow) - searchWindow = new ConfigSearchWindow(this, "search"); - searchWindow->show(); -} - -void ConfigMainWindow::changeMenu(struct menu *menu) -{ - configList->setRootMenu(menu); - if (configList->rootEntry->parent == &rootmenu) - backAction->setEnabled(FALSE); - else - backAction->setEnabled(TRUE); -} - -void ConfigMainWindow::setMenuLink(struct menu *menu) -{ - struct menu *parent; - ConfigList* list = NULL; - ConfigItem* item; - - if (configList->menuSkip(menu)) - return; - - switch (configList->mode) { - case singleMode: - list = configList; - parent = menu_get_parent_menu(menu); - if (!parent) - return; - list->setRootMenu(parent); - break; - case symbolMode: - if (menu->flags & MENU_ROOT) { - configList->setRootMenu(menu); - configList->clearSelection(); - list = menuList; - } else { - list = configList; - parent = menu_get_parent_menu(menu->parent); - if (!parent) - return; - item = menuList->findConfigItem(parent); - if (item) { - menuList->setSelected(item, TRUE); - menuList->ensureItemVisible(item); - } - list->setRootMenu(parent); - } - break; - case fullMode: - list = configList; - break; - default: - break; - } - - if (list) { - item = list->findConfigItem(menu); - if (item) { - list->setSelected(item, TRUE); - list->ensureItemVisible(item); - list->setFocus(); - } - } -} - -void ConfigMainWindow::listFocusChanged(void) -{ - if (menuList->mode == menuMode) - configList->clearSelection(); -} - -void ConfigMainWindow::goBack(void) -{ - ConfigItem* item; - - configList->setParentMenu(); - if (configList->rootEntry == &rootmenu) - backAction->setEnabled(FALSE); - item = (ConfigItem*)menuList->selectedItem(); - while (item) { - if (item->menu == configList->rootEntry) { - menuList->setSelected(item, TRUE); - break; - } - item = (ConfigItem*)item->parent(); - } -} - -void ConfigMainWindow::showSingleView(void) -{ - menuView->hide(); - menuList->setRootMenu(0); - configList->mode = singleMode; - if (configList->rootEntry == &rootmenu) - configList->updateListAll(); - else - configList->setRootMenu(&rootmenu); - configList->setAllOpen(TRUE); - configList->setFocus(); -} - -void ConfigMainWindow::showSplitView(void) -{ - configList->mode = symbolMode; - if (configList->rootEntry == &rootmenu) - configList->updateListAll(); - else - configList->setRootMenu(&rootmenu); - configList->setAllOpen(TRUE); - configApp->processEvents(); - menuList->mode = menuMode; - menuList->setRootMenu(&rootmenu); - menuList->setAllOpen(TRUE); - menuView->show(); - menuList->setFocus(); -} - -void ConfigMainWindow::showFullView(void) -{ - menuView->hide(); - menuList->setRootMenu(0); - configList->mode = fullMode; - if (configList->rootEntry == &rootmenu) - configList->updateListAll(); - else - configList->setRootMenu(&rootmenu); - configList->setAllOpen(FALSE); - configList->setFocus(); -} - -/* - * ask for saving configuration before quitting - * TODO ask only when something changed - */ -void ConfigMainWindow::closeEvent(QCloseEvent* e) -{ - if (!conf_get_changed()) { - e->accept(); - return; - } - QMessageBox mb("qconf", _("Save configuration?"), QMessageBox::Warning, - QMessageBox::Yes | QMessageBox::Default, QMessageBox::No, QMessageBox::Cancel | QMessageBox::Escape); - mb.setButtonText(QMessageBox::Yes, _("&Save Changes")); - mb.setButtonText(QMessageBox::No, _("&Discard Changes")); - mb.setButtonText(QMessageBox::Cancel, _("Cancel Exit")); - switch (mb.exec()) { - case QMessageBox::Yes: - conf_write(NULL); - case QMessageBox::No: - e->accept(); - break; - case QMessageBox::Cancel: - e->ignore(); - break; - } -} - -void ConfigMainWindow::showIntro(void) -{ - static const QString str = _("Welcome to the qconf graphical configuration tool.\n\n" - "For each option, a blank box indicates the feature is disabled, a check\n" - "indicates it is enabled, and a dot indicates that it is to be compiled\n" - "as a module. Clicking on the box will cycle through the three states.\n\n" - "If you do not see an option (e.g., a device driver) that you believe\n" - "should be present, try turning on Show All Options under the Options menu.\n" - "Although there is no cross reference yet to help you figure out what other\n" - "options must be enabled to support the option you are interested in, you can\n" - "still view the help of a grayed-out option.\n\n" - "Toggling Show Debug Info under the Options menu will show the dependencies,\n" - "which you can then match by examining other options.\n\n"); - - QMessageBox::information(this, "qconf", str); -} - -void ConfigMainWindow::showAbout(void) -{ - static const QString str = _("qconf is Copyright (C) 2002 Roman Zippel .\n\n" - "Bug reports and feature request can also be entered at http://bugzilla.kernel.org/\n"); - - QMessageBox::information(this, "qconf", str); -} - -void ConfigMainWindow::saveSettings(void) -{ - configSettings->writeEntry("/window x", pos().x()); - configSettings->writeEntry("/window y", pos().y()); - configSettings->writeEntry("/window width", size().width()); - configSettings->writeEntry("/window height", size().height()); - - QString entry; - switch(configList->mode) { - case singleMode : - entry = "single"; - break; - - case symbolMode : - entry = "split"; - break; - - case fullMode : - entry = "full"; - break; - - default: - break; - } - configSettings->writeEntry("/listMode", entry); - - configSettings->writeSizes("/split1", split1->sizes()); - configSettings->writeSizes("/split2", split2->sizes()); -} - -void ConfigMainWindow::conf_changed(void) -{ - if (saveAction) - saveAction->setEnabled(conf_get_changed()); -} - -void fixup_rootmenu(struct menu *menu) -{ - struct menu *child; - static int menu_cnt = 0; - - menu->flags |= MENU_ROOT; - for (child = menu->list; child; child = child->next) { - if (child->prompt && child->prompt->type == P_MENU) { - menu_cnt++; - fixup_rootmenu(child); - menu_cnt--; - } else if (!menu_cnt) - fixup_rootmenu(child); - } -} - -static const char *progname; - -static void usage(void) -{ - printf(_("%s \n"), progname); - exit(0); -} - -int main(int ac, char** av) -{ - ConfigMainWindow* v; - const char *name; - - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); - -#ifndef LKC_DIRECT_LINK - kconfig_load(); -#endif - - progname = av[0]; - configApp = new QApplication(ac, av); - if (ac > 1 && av[1][0] == '-') { - switch (av[1][1]) { - case 'h': - case '?': - usage(); - } - name = av[2]; - } else - name = av[1]; - if (!name) - usage(); - - conf_parse(name); - fixup_rootmenu(&rootmenu); - conf_read(NULL); - //zconfdump(stdout); - - configSettings = new ConfigSettings(); - configSettings->beginGroup("/kconfig/qconf"); - v = new ConfigMainWindow(); - - //zconfdump(stdout); - configApp->setMainWidget(v); - configApp->connect(configApp, SIGNAL(lastWindowClosed()), SLOT(quit())); - configApp->connect(configApp, SIGNAL(aboutToQuit()), v, SLOT(saveSettings())); - v->show(); - configApp->exec(); - - configSettings->endGroup(); - delete configSettings; - - return 0; -} diff --git a/package/config/qconf.h b/package/config/qconf.h deleted file mode 100644 index 91677d9..0000000 --- a/package/config/qconf.h +++ /dev/null @@ -1,337 +0,0 @@ -/* - * Copyright (C) 2002 Roman Zippel - * Released under the terms of the GNU GPL v2.0. - */ - -#if QT_VERSION < 0x040000 -#include -#else -#include -#endif -#include - -#if QT_VERSION < 0x040000 -#define Q3ValueList QValueList -#define Q3PopupMenu QPopupMenu -#define Q3ListView QListView -#define Q3ListViewItem QListViewItem -#define Q3VBox QVBox -#define Q3TextBrowser QTextBrowser -#define Q3MainWindow QMainWindow -#define Q3Action QAction -#define Q3ToolBar QToolBar -#define Q3ListViewItemIterator QListViewItemIterator -#define Q3FileDialog QFileDialog -#endif - -class ConfigView; -class ConfigList; -class ConfigItem; -class ConfigLineEdit; -class ConfigMainWindow; - -class ConfigSettings : public QSettings { -public: - Q3ValueList readSizes(const QString& key, bool *ok); - bool writeSizes(const QString& key, const Q3ValueList& value); -}; - -enum colIdx { - promptColIdx, nameColIdx, noColIdx, modColIdx, yesColIdx, dataColIdx, colNr -}; -enum listMode { - singleMode, menuMode, symbolMode, fullMode, listMode -}; -enum optionMode { - normalOpt = 0, allOpt, promptOpt -}; - -class ConfigList : public Q3ListView { - Q_OBJECT - typedef class Q3ListView Parent; -public: - ConfigList(ConfigView* p, const char *name = 0); - void reinit(void); - ConfigView* parent(void) const - { - return (ConfigView*)Parent::parent(); - } - ConfigItem* findConfigItem(struct menu *); - -protected: - void keyPressEvent(QKeyEvent *e); - void contentsMousePressEvent(QMouseEvent *e); - void contentsMouseReleaseEvent(QMouseEvent *e); - void contentsMouseMoveEvent(QMouseEvent *e); - void contentsMouseDoubleClickEvent(QMouseEvent *e); - void focusInEvent(QFocusEvent *e); - void contextMenuEvent(QContextMenuEvent *e); - -public slots: - void setRootMenu(struct menu *menu); - - void updateList(ConfigItem *item); - void setValue(ConfigItem* item, tristate val); - void changeValue(ConfigItem* item); - void updateSelection(void); - void saveSettings(void); -signals: - void menuChanged(struct menu *menu); - void menuSelected(struct menu *menu); - void parentSelected(void); - void gotFocus(struct menu *); - -public: - void updateListAll(void) - { - updateAll = true; - updateList(NULL); - updateAll = false; - } - ConfigList* listView() - { - return this; - } - ConfigItem* firstChild() const - { - return (ConfigItem *)Parent::firstChild(); - } - int mapIdx(colIdx idx) - { - return colMap[idx]; - } - void addColumn(colIdx idx, const QString& label) - { - colMap[idx] = Parent::addColumn(label); - colRevMap[colMap[idx]] = idx; - } - void removeColumn(colIdx idx) - { - int col = colMap[idx]; - if (col >= 0) { - Parent::removeColumn(col); - colRevMap[col] = colMap[idx] = -1; - } - } - void setAllOpen(bool open); - void setParentMenu(void); - - bool menuSkip(struct menu *); - - template - void updateMenuList(P*, struct menu*); - - bool updateAll; - - QPixmap symbolYesPix, symbolModPix, symbolNoPix; - QPixmap choiceYesPix, choiceNoPix; - QPixmap menuPix, menuInvPix, menuBackPix, voidPix; - - bool showName, showRange, showData; - enum listMode mode; - enum optionMode optMode; - struct menu *rootEntry; - QColorGroup disabledColorGroup; - QColorGroup inactivedColorGroup; - Q3PopupMenu* headerPopup; - -private: - int colMap[colNr]; - int colRevMap[colNr]; -}; - -class ConfigItem : public Q3ListViewItem { - typedef class Q3ListViewItem Parent; -public: - ConfigItem(Q3ListView *parent, ConfigItem *after, struct menu *m, bool v) - : Parent(parent, after), menu(m), visible(v), goParent(false) - { - init(); - } - ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m, bool v) - : Parent(parent, after), menu(m), visible(v), goParent(false) - { - init(); - } - ConfigItem(Q3ListView *parent, ConfigItem *after, bool v) - : Parent(parent, after), menu(0), visible(v), goParent(true) - { - init(); - } - ~ConfigItem(void); - void init(void); - void okRename(int col); - void updateMenu(void); - void testUpdateMenu(bool v); - ConfigList* listView() const - { - return (ConfigList*)Parent::listView(); - } - ConfigItem* firstChild() const - { - return (ConfigItem *)Parent::firstChild(); - } - ConfigItem* nextSibling() const - { - return (ConfigItem *)Parent::nextSibling(); - } - void setText(colIdx idx, const QString& text) - { - Parent::setText(listView()->mapIdx(idx), text); - } - QString text(colIdx idx) const - { - return Parent::text(listView()->mapIdx(idx)); - } - void setPixmap(colIdx idx, const QPixmap& pm) - { - Parent::setPixmap(listView()->mapIdx(idx), pm); - } - const QPixmap* pixmap(colIdx idx) const - { - return Parent::pixmap(listView()->mapIdx(idx)); - } - void paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align); - - ConfigItem* nextItem; - struct menu *menu; - bool visible; - bool goParent; -}; - -class ConfigLineEdit : public QLineEdit { - Q_OBJECT - typedef class QLineEdit Parent; -public: - ConfigLineEdit(ConfigView* parent); - ConfigView* parent(void) const - { - return (ConfigView*)Parent::parent(); - } - void show(ConfigItem *i); - void keyPressEvent(QKeyEvent *e); - -public: - ConfigItem *item; -}; - -class ConfigView : public Q3VBox { - Q_OBJECT - typedef class Q3VBox Parent; -public: - ConfigView(QWidget* parent, const char *name = 0); - ~ConfigView(void); - static void updateList(ConfigItem* item); - static void updateListAll(void); - - bool showName(void) const { return list->showName; } - bool showRange(void) const { return list->showRange; } - bool showData(void) const { return list->showData; } -public slots: - void setShowName(bool); - void setShowRange(bool); - void setShowData(bool); - void setOptionMode(QAction *); -signals: - void showNameChanged(bool); - void showRangeChanged(bool); - void showDataChanged(bool); -public: - ConfigList* list; - ConfigLineEdit* lineEdit; - - static ConfigView* viewList; - ConfigView* nextView; - - static QAction *showNormalAction; - static QAction *showAllAction; - static QAction *showPromptAction; -}; - -class ConfigInfoView : public Q3TextBrowser { - Q_OBJECT - typedef class Q3TextBrowser Parent; -public: - ConfigInfoView(QWidget* parent, const char *name = 0); - bool showDebug(void) const { return _showDebug; } - -public slots: - void setInfo(struct menu *menu); - void saveSettings(void); - void setShowDebug(bool); - -signals: - void showDebugChanged(bool); - void menuSelected(struct menu *); - -protected: - void symbolInfo(void); - void menuInfo(void); - QString debug_info(struct symbol *sym); - static QString print_filter(const QString &str); - static void expr_print_help(void *data, struct symbol *sym, const char *str); - Q3PopupMenu* createPopupMenu(const QPoint& pos); - void contentsContextMenuEvent(QContextMenuEvent *e); - - struct symbol *sym; - struct menu *_menu; - bool _showDebug; -}; - -class ConfigSearchWindow : public QDialog { - Q_OBJECT - typedef class QDialog Parent; -public: - ConfigSearchWindow(ConfigMainWindow* parent, const char *name = 0); - -public slots: - void saveSettings(void); - void search(void); - -protected: - QLineEdit* editField; - QPushButton* searchButton; - QSplitter* split; - ConfigView* list; - ConfigInfoView* info; - - struct symbol **result; -}; - -class ConfigMainWindow : public Q3MainWindow { - Q_OBJECT - - static Q3Action *saveAction; - static void conf_changed(void); -public: - ConfigMainWindow(void); -public slots: - void changeMenu(struct menu *); - void setMenuLink(struct menu *); - void listFocusChanged(void); - void goBack(void); - void loadConfig(void); - void saveConfig(void); - void saveConfigAs(void); - void searchConfig(void); - void showSingleView(void); - void showSplitView(void); - void showFullView(void); - void showIntro(void); - void showAbout(void); - void saveSettings(void); - -protected: - void closeEvent(QCloseEvent *e); - - ConfigSearchWindow *searchWindow; - ConfigView *menuView; - ConfigList *menuList; - ConfigView *configView; - ConfigList *configList; - ConfigInfoView *helpText; - Q3ToolBar *toolBar; - Q3Action *backAction; - QSplitter* split1; - QSplitter* split2; -}; diff --git a/package/config/streamline_config.pl b/package/config/streamline_config.pl deleted file mode 100644 index fd81fc3..0000000 --- a/package/config/streamline_config.pl +++ /dev/null @@ -1,451 +0,0 @@ -#!/usr/bin/perl -w -# -# Copywrite 2005-2009 - Steven Rostedt -# Licensed under the terms of the GNU GPL License version 2 -# -# It's simple enough to figure out how this works. -# If not, then you can ask me at stripconfig@goodmis.org -# -# What it does? -# -# If you have installed a Linux kernel from a distribution -# that turns on way too many modules than you need, and -# you only want the modules you use, then this program -# is perfect for you. -# -# It gives you the ability to turn off all the modules that are -# not loaded on your system. -# -# Howto: -# -# 1. Boot up the kernel that you want to stream line the config on. -# 2. Change directory to the directory holding the source of the -# kernel that you just booted. -# 3. Copy the configuraton file to this directory as .config -# 4. Have all your devices that you need modules for connected and -# operational (make sure that their corresponding modules are loaded) -# 5. Run this script redirecting the output to some other file -# like config_strip. -# 6. Back up your old config (if you want too). -# 7. copy the config_strip file to .config -# 8. Run "make oldconfig" -# -# Now your kernel is ready to be built with only the modules that -# are loaded. -# -# Here's what I did with my Debian distribution. -# -# cd /usr/src/linux-2.6.10 -# cp /boot/config-2.6.10-1-686-smp .config -# ~/bin/streamline_config > config_strip -# mv .config config_sav -# mv config_strip .config -# make oldconfig -# -use strict; - -my $config = ".config"; - -my $uname = `uname -r`; -chomp $uname; - -my @searchconfigs = ( - { - "file" => ".config", - "exec" => "cat", - }, - { - "file" => "/proc/config.gz", - "exec" => "zcat", - }, - { - "file" => "/boot/config-$uname", - "exec" => "cat", - }, - { - "file" => "/boot/vmlinuz-$uname", - "exec" => "scripts/extract-ikconfig", - "test" => "scripts/extract-ikconfig", - }, - { - "file" => "vmlinux", - "exec" => "scripts/extract-ikconfig", - "test" => "scripts/extract-ikconfig", - }, - { - "file" => "/lib/modules/$uname/kernel/kernel/configs.ko", - "exec" => "scripts/extract-ikconfig", - "test" => "scripts/extract-ikconfig", - }, - { - "file" => "kernel/configs.ko", - "exec" => "scripts/extract-ikconfig", - "test" => "scripts/extract-ikconfig", - }, - { - "file" => "kernel/configs.o", - "exec" => "scripts/extract-ikconfig", - "test" => "scripts/extract-ikconfig", - }, -); - -sub find_config { - foreach my $conf (@searchconfigs) { - my $file = $conf->{"file"}; - - next if ( ! -f "$file"); - - if (defined($conf->{"test"})) { - `$conf->{"test"} $conf->{"file"} 2>/dev/null`; - next if ($?); - } - - my $exec = $conf->{"exec"}; - - print STDERR "using config: '$file'\n"; - - open(CIN, "$exec $file |") || die "Failed to run $exec $file"; - return; - } - die "No config file found"; -} - -find_config; - -# Get the build source and top level Kconfig file (passed in) -my $ksource = $ARGV[0]; -my $kconfig = $ARGV[1]; -my $lsmod_file = $ARGV[2]; - -my @makefiles = `find $ksource -name Makefile 2>/dev/null`; -chomp @makefiles; - -my %depends; -my %selects; -my %prompts; -my %objects; -my $var; -my $iflevel = 0; -my @ifdeps; - -# prevent recursion -my %read_kconfigs; - -sub read_kconfig { - my ($kconfig) = @_; - - my $state = "NONE"; - my $config; - my @kconfigs; - - my $cont = 0; - my $line; - - my $source = "$ksource/$kconfig"; - my $last_source = ""; - - # Check for any environment variables used - while ($source =~ /\$(\w+)/ && $last_source ne $source) { - my $env = $1; - $last_source = $source; - $source =~ s/\$$env/$ENV{$env}/; - } - - open(KIN, "$source") || die "Can't open $kconfig"; - while () { - chomp; - - # Make sure that lines ending with \ continue - if ($cont) { - $_ = $line . " " . $_; - } - - if (s/\\$//) { - $cont = 1; - $line = $_; - next; - } - - $cont = 0; - - # collect any Kconfig sources - if (/^source\s*"(.*)"/) { - $kconfigs[$#kconfigs+1] = $1; - } - - # configs found - if (/^\s*(menu)?config\s+(\S+)\s*$/) { - $state = "NEW"; - $config = $2; - - for (my $i = 0; $i < $iflevel; $i++) { - if ($i) { - $depends{$config} .= " " . $ifdeps[$i]; - } else { - $depends{$config} = $ifdeps[$i]; - } - $state = "DEP"; - } - - # collect the depends for the config - } elsif ($state eq "NEW" && /^\s*depends\s+on\s+(.*)$/) { - $state = "DEP"; - $depends{$config} = $1; - } elsif ($state eq "DEP" && /^\s*depends\s+on\s+(.*)$/) { - $depends{$config} .= " " . $1; - - # Get the configs that select this config - } elsif ($state ne "NONE" && /^\s*select\s+(\S+)/) { - if (defined($selects{$1})) { - $selects{$1} .= " " . $config; - } else { - $selects{$1} = $config; - } - - # configs without prompts must be selected - } elsif ($state ne "NONE" && /^\s*tristate\s\S/) { - # note if the config has a prompt - $prompts{$config} = 1; - - # Check for if statements - } elsif (/^if\s+(.*\S)\s*$/) { - my $deps = $1; - # remove beginning and ending non text - $deps =~ s/^[^a-zA-Z0-9_]*//; - $deps =~ s/[^a-zA-Z0-9_]*$//; - - my @deps = split /[^a-zA-Z0-9_]+/, $deps; - - $ifdeps[$iflevel++] = join ':', @deps; - - } elsif (/^endif/) { - - $iflevel-- if ($iflevel); - - # stop on "help" - } elsif (/^\s*help\s*$/) { - $state = "NONE"; - } - } - close(KIN); - - # read in any configs that were found. - foreach $kconfig (@kconfigs) { - if (!defined($read_kconfigs{$kconfig})) { - $read_kconfigs{$kconfig} = 1; - read_kconfig($kconfig); - } - } -} - -if ($kconfig) { - read_kconfig($kconfig); -} - -# Read all Makefiles to map the configs to the objects -foreach my $makefile (@makefiles) { - - my $cont = 0; - - open(MIN,$makefile) || die "Can't open $makefile"; - while () { - my $objs; - - # is this a line after a line with a backslash? - if ($cont && /(\S.*)$/) { - $objs = $1; - } - $cont = 0; - - # collect objects after obj-$(CONFIG_FOO_BAR) - if (/obj-\$\((CONFIG_[^\)]*)\)\s*[+:]?=\s*(.*)/) { - $var = $1; - $objs = $2; - } - if (defined($objs)) { - # test if the line ends with a backslash - if ($objs =~ m,(.*)\\$,) { - $objs = $1; - $cont = 1; - } - - foreach my $obj (split /\s+/,$objs) { - $obj =~ s/-/_/g; - if ($obj =~ /(.*)\.o$/) { - # Objects may be enabled by more than one config. - # Store configs in an array. - my @arr; - - if (defined($objects{$1})) { - @arr = @{$objects{$1}}; - } - - $arr[$#arr+1] = $var; - - # The objects have a hash mapping to a reference - # of an array of configs. - $objects{$1} = \@arr; - } - } - } - } - close(MIN); -} - -my %modules; - -if (defined($lsmod_file)) { - if ( ! -f $lsmod_file) { - die "$lsmod_file not found"; - } - if ( -x $lsmod_file) { - # the file is executable, run it - open(LIN, "$lsmod_file|"); - } else { - # Just read the contents - open(LIN, "$lsmod_file"); - } -} else { - - # see what modules are loaded on this system - my $lsmod; - - foreach my $dir ( ("/sbin", "/bin", "/usr/sbin", "/usr/bin") ) { - if ( -x "$dir/lsmod" ) { - $lsmod = "$dir/lsmod"; - last; - } -} - if (!defined($lsmod)) { - # try just the path - $lsmod = "lsmod"; - } - - open(LIN,"$lsmod|") || die "Can not call lsmod with $lsmod"; -} - -while () { - next if (/^Module/); # Skip the first line. - if (/^(\S+)/) { - $modules{$1} = 1; - } -} -close (LIN); - -# add to the configs hash all configs that are needed to enable -# a loaded module. -my %configs; -foreach my $module (keys(%modules)) { - if (defined($objects{$module})) { - my @arr = @{$objects{$module}}; - foreach my $conf (@arr) { - $configs{$conf} = $module; - } - } else { - # Most likely, someone has a custom (binary?) module loaded. - print STDERR "$module config not found!!\n"; - } -} - -my $valid = "A-Za-z_0-9"; -my $repeat = 1; - -# -# Note, we do not care about operands (like: &&, ||, !) we want to add any -# config that is in the depend list of another config. This script does -# not enable configs that are not already enabled. If we come across a -# config A that depends on !B, we can still add B to the list of depends -# to keep on. If A was on in the original config, B would not have been -# and B would not be turned on by this script. -# -sub parse_config_dep_select -{ - my ($p) = @_; - - while ($p =~ /[$valid]/) { - - if ($p =~ /^[^$valid]*([$valid]+)/) { - my $conf = "CONFIG_" . $1; - - $p =~ s/^[^$valid]*[$valid]+//; - - if (!defined($configs{$conf})) { - # We must make sure that this config has its - # dependencies met. - $repeat = 1; # do again - $configs{$conf} = 1; - } - } else { - die "this should never happen"; - } - } -} - -while ($repeat) { - $repeat = 0; - - foreach my $config (keys %configs) { - $config =~ s/^CONFIG_//; - - if (defined($depends{$config})) { - # This config has dependencies. Make sure they are also included - parse_config_dep_select $depends{$config}; - } - - if (defined($prompts{$config}) || !defined($selects{$config})) { - next; - } - - # config has no prompt and must be selected. - parse_config_dep_select $selects{$config}; - } -} - -my %setconfigs; - -# Finally, read the .config file and turn off any module enabled that -# we could not find a reason to keep enabled. -while() { - - if (/CONFIG_IKCONFIG/) { - if (/# CONFIG_IKCONFIG is not set/) { - # enable IKCONFIG at least as a module - print "CONFIG_IKCONFIG=m\n"; - # don't ask about PROC - print "# CONFIG_IKCONFIG_PROC is not set\n"; - } else { - print; - } - next; - } - - if (/^(CONFIG.*)=(m|y)/) { - if (defined($configs{$1})) { - $setconfigs{$1} = $2; - } elsif ($2 eq "m") { - print "# $1 is not set\n"; - next; - } - } - print; -} -close(CIN); - -# Integrity check, make sure all modules that we want enabled do -# indeed have their configs set. -loop: -foreach my $module (keys(%modules)) { - if (defined($objects{$module})) { - my @arr = @{$objects{$module}}; - foreach my $conf (@arr) { - if (defined($setconfigs{$conf})) { - next loop; - } - } - print STDERR "module $module did not have configs"; - foreach my $conf (@arr) { - print STDERR " " , $conf; - } - print STDERR "\n"; - } -} diff --git a/package/config/symbol.c b/package/config/symbol.c deleted file mode 100644 index a796c95..0000000 --- a/package/config/symbol.c +++ /dev/null @@ -1,1260 +0,0 @@ -/* - * Copyright (C) 2002 Roman Zippel - * Released under the terms of the GNU GPL v2.0. - */ - -#include -#include -#include -#include -#include - -#define LKC_DIRECT_LINK -#include "lkc.h" - -struct symbol symbol_yes = { - .name = "y", - .curr = { "y", yes }, - .flags = SYMBOL_CONST|SYMBOL_VALID, -}, symbol_mod = { - .name = "m", - .curr = { "m", mod }, - .flags = SYMBOL_CONST|SYMBOL_VALID, -}, symbol_no = { - .name = "n", - .curr = { "n", no }, - .flags = SYMBOL_CONST|SYMBOL_VALID, -}, symbol_empty = { - .name = "", - .curr = { "", no }, - .flags = SYMBOL_VALID, -}; - -struct symbol *sym_defconfig_list; -struct symbol *modules_sym; -tristate modules_val; - -struct expr *sym_env_list; - -static void sym_add_default(struct symbol *sym, const char *def) -{ - struct property *prop = prop_alloc(P_DEFAULT, sym); - - prop->expr = expr_alloc_symbol(sym_lookup(def, SYMBOL_CONST)); -} - -void sym_init(void) -{ - struct symbol *sym; - struct utsname uts; - static bool inited = false; - - if (inited) - return; - inited = true; - - uname(&uts); - - sym = sym_lookup("UNAME_RELEASE", 0); - sym->type = S_STRING; - sym->flags |= SYMBOL_AUTO; - sym_add_default(sym, uts.release); -} - -enum symbol_type sym_get_type(struct symbol *sym) -{ - enum symbol_type type = sym->type; - - if (type == S_TRISTATE) { - if (sym_is_choice_value(sym) && sym->visible == yes) - type = S_BOOLEAN; - else if (modules_val == no) - type = S_BOOLEAN; - } - return type; -} - -const char *sym_type_name(enum symbol_type type) -{ - switch (type) { - case S_BOOLEAN: - return "boolean"; - case S_TRISTATE: - return "tristate"; - case S_INT: - return "integer"; - case S_HEX: - return "hex"; - case S_STRING: - return "string"; - case S_UNKNOWN: - return "unknown"; - case S_OTHER: - break; - } - return "???"; -} - -struct property *sym_get_choice_prop(struct symbol *sym) -{ - struct property *prop; - - for_all_choices(sym, prop) - return prop; - return NULL; -} - -struct property *sym_get_env_prop(struct symbol *sym) -{ - struct property *prop; - - for_all_properties(sym, prop, P_ENV) - return prop; - return NULL; -} - -struct property *sym_get_default_prop(struct symbol *sym) -{ - struct property *prop; - - for_all_defaults(sym, prop) { - prop->visible.tri = expr_calc_value(prop->visible.expr); - if (prop->visible.tri != no) - return prop; - } - return NULL; -} - -static struct property *sym_get_range_prop(struct symbol *sym) -{ - struct property *prop; - - for_all_properties(sym, prop, P_RANGE) { - prop->visible.tri = expr_calc_value(prop->visible.expr); - if (prop->visible.tri != no) - return prop; - } - return NULL; -} - -static int sym_get_range_val(struct symbol *sym, int base) -{ - sym_calc_value(sym); - switch (sym->type) { - case S_INT: - base = 10; - break; - case S_HEX: - base = 16; - break; - default: - break; - } - return strtol(sym->curr.val, NULL, base); -} - -static void sym_validate_range(struct symbol *sym) -{ - struct property *prop; - int base, val, val2; - char str[64]; - - switch (sym->type) { - case S_INT: - base = 10; - break; - case S_HEX: - base = 16; - break; - default: - return; - } - prop = sym_get_range_prop(sym); - if (!prop) - return; - val = strtol(sym->curr.val, NULL, base); - val2 = sym_get_range_val(prop->expr->left.sym, base); - if (val >= val2) { - val2 = sym_get_range_val(prop->expr->right.sym, base); - if (val <= val2) - return; - } - if (sym->type == S_INT) - sprintf(str, "%d", val2); - else - sprintf(str, "0x%x", val2); - sym->curr.val = strdup(str); -} - -static void sym_calc_visibility(struct symbol *sym) -{ - struct property *prop; - tristate tri; - - /* any prompt visible? */ - tri = no; - for_all_prompts(sym, prop) { - prop->visible.tri = expr_calc_value(prop->visible.expr); - tri = EXPR_OR(tri, prop->visible.tri); - } - if (tri == mod && (sym->type != S_TRISTATE || modules_val == no)) - tri = yes; - if (sym->visible != tri) { - sym->visible = tri; - sym_set_changed(sym); - } - if (sym_is_choice_value(sym)) - return; - /* defaulting to "yes" if no explicit "depends on" are given */ - tri = yes; - if (sym->dir_dep.expr) - tri = expr_calc_value(sym->dir_dep.expr); - if (tri == mod) - tri = yes; - if (sym->dir_dep.tri != tri) { - sym->dir_dep.tri = tri; - sym_set_changed(sym); - } - tri = no; - if (sym->rev_dep.expr) - tri = expr_calc_value(sym->rev_dep.expr); - if (tri == mod && sym_get_type(sym) == S_BOOLEAN) - tri = yes; - if (sym->rev_dep.tri != tri) { - sym->rev_dep.tri = tri; - sym_set_changed(sym); - } -} - -/* - * Find the default symbol for a choice. - * First try the default values for the choice symbol - * Next locate the first visible choice value - * Return NULL if none was found - */ -struct symbol *sym_choice_default(struct symbol *sym) -{ - struct symbol *def_sym; - struct property *prop; - struct expr *e; - - /* any of the defaults visible? */ - for_all_defaults(sym, prop) { - prop->visible.tri = expr_calc_value(prop->visible.expr); - if (prop->visible.tri == no) - continue; - def_sym = prop_get_symbol(prop); - if (def_sym->visible != no) - return def_sym; - } - - /* just get the first visible value */ - prop = sym_get_choice_prop(sym); - expr_list_for_each_sym(prop->expr, e, def_sym) - if (def_sym->visible != no) - return def_sym; - - /* failed to locate any defaults */ - return NULL; -} - -static struct symbol *sym_calc_choice(struct symbol *sym) -{ - struct symbol *def_sym; - struct property *prop; - struct expr *e; - - /* first calculate all choice values' visibilities */ - prop = sym_get_choice_prop(sym); - expr_list_for_each_sym(prop->expr, e, def_sym) - sym_calc_visibility(def_sym); - - /* is the user choice visible? */ - def_sym = sym->def[S_DEF_USER].val; - if (def_sym && def_sym->visible != no) - return def_sym; - - def_sym = sym_choice_default(sym); - - if (def_sym == NULL) - /* no choice? reset tristate value */ - sym->curr.tri = no; - - return def_sym; -} - -void sym_calc_value(struct symbol *sym) -{ - struct symbol_value newval, oldval; - struct property *prop; - struct expr *e; - - if (!sym) - return; - - if (sym->flags & SYMBOL_VALID) - return; - sym->flags |= SYMBOL_VALID; - - oldval = sym->curr; - - switch (sym->type) { - case S_INT: - case S_HEX: - case S_STRING: - newval = symbol_empty.curr; - break; - case S_BOOLEAN: - case S_TRISTATE: - newval = symbol_no.curr; - break; - default: - sym->curr.val = sym->name; - sym->curr.tri = no; - return; - } - if (!sym_is_choice_value(sym)) - sym->flags &= ~SYMBOL_WRITE; - - sym_calc_visibility(sym); - - /* set default if recursively called */ - sym->curr = newval; - - switch (sym_get_type(sym)) { - case S_BOOLEAN: - case S_TRISTATE: - if (sym_is_choice_value(sym) && sym->visible == yes) { - prop = sym_get_choice_prop(sym); - newval.tri = (prop_get_symbol(prop)->curr.val == sym) ? yes : no; - } else { - if (sym->visible != no) { - /* if the symbol is visible use the user value - * if available, otherwise try the default value - */ - sym->flags |= SYMBOL_WRITE; - if (sym_has_value(sym)) { - newval.tri = EXPR_AND(sym->def[S_DEF_USER].tri, - sym->visible); - goto calc_newval; - } - } - if (sym->rev_dep.tri != no) - sym->flags |= SYMBOL_WRITE; - if (!sym_is_choice(sym)) { - prop = sym_get_default_prop(sym); - if (prop) { - sym->flags |= SYMBOL_WRITE; - newval.tri = EXPR_AND(expr_calc_value(prop->expr), - prop->visible.tri); - } - } - calc_newval: - if (sym->dir_dep.tri == no && sym->rev_dep.tri != no) { - struct expr *e; - e = expr_simplify_unmet_dep(sym->rev_dep.expr, - sym->dir_dep.expr); - fprintf(stderr, "warning: ("); - expr_fprint(e, stderr); - fprintf(stderr, ") selects %s which has unmet direct dependencies (", - sym->name); - expr_fprint(sym->dir_dep.expr, stderr); - fprintf(stderr, ")\n"); - expr_free(e); - } - newval.tri = EXPR_OR(newval.tri, sym->rev_dep.tri); - } - if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN) - newval.tri = yes; - break; - case S_STRING: - case S_HEX: - case S_INT: - if (sym->visible != no) { - sym->flags |= SYMBOL_WRITE; - if (sym_has_value(sym)) { - newval.val = sym->def[S_DEF_USER].val; - break; - } - } - prop = sym_get_default_prop(sym); - if (prop) { - struct symbol *ds = prop_get_symbol(prop); - if (ds) { - sym->flags |= SYMBOL_WRITE; - sym_calc_value(ds); - newval.val = ds->curr.val; - } - } - break; - default: - ; - } - - sym->curr = newval; - if (sym_is_choice(sym) && newval.tri == yes) - sym->curr.val = sym_calc_choice(sym); - sym_validate_range(sym); - - if (memcmp(&oldval, &sym->curr, sizeof(oldval))) { - sym_set_changed(sym); - if (modules_sym == sym) { - sym_set_all_changed(); - modules_val = modules_sym->curr.tri; - } - } - - if (sym_is_choice(sym)) { - struct symbol *choice_sym; - - prop = sym_get_choice_prop(sym); - expr_list_for_each_sym(prop->expr, e, choice_sym) { - if ((sym->flags & SYMBOL_WRITE) && - choice_sym->visible != no) - choice_sym->flags |= SYMBOL_WRITE; - if (sym->flags & SYMBOL_CHANGED) - sym_set_changed(choice_sym); - } - } - - if (sym->flags & SYMBOL_AUTO) - sym->flags &= ~SYMBOL_WRITE; -} - -void sym_clear_all_valid(void) -{ - struct symbol *sym; - int i; - - for_all_symbols(i, sym) - sym->flags &= ~SYMBOL_VALID; - sym_add_change_count(1); - if (modules_sym) - sym_calc_value(modules_sym); -} - -void sym_set_changed(struct symbol *sym) -{ - struct property *prop; - - sym->flags |= SYMBOL_CHANGED; - for (prop = sym->prop; prop; prop = prop->next) { - if (prop->menu) - prop->menu->flags |= MENU_CHANGED; - } -} - -void sym_set_all_changed(void) -{ - struct symbol *sym; - int i; - - for_all_symbols(i, sym) - sym_set_changed(sym); -} - -bool sym_tristate_within_range(struct symbol *sym, tristate val) -{ - int type = sym_get_type(sym); - - if (sym->visible == no) - return false; - - if (type != S_BOOLEAN && type != S_TRISTATE) - return false; - - if (type == S_BOOLEAN && val == mod) - return false; - if (sym->visible <= sym->rev_dep.tri) - return false; - if (sym_is_choice_value(sym) && sym->visible == yes) - return val == yes; - return val >= sym->rev_dep.tri && val <= sym->visible; -} - -bool sym_set_tristate_value(struct symbol *sym, tristate val) -{ - tristate oldval = sym_get_tristate_value(sym); - - if (oldval != val && !sym_tristate_within_range(sym, val)) - return false; - - if (!(sym->flags & SYMBOL_DEF_USER)) { - sym->flags |= SYMBOL_DEF_USER; - sym_set_changed(sym); - } - /* - * setting a choice value also resets the new flag of the choice - * symbol and all other choice values. - */ - if (sym_is_choice_value(sym) && val == yes) { - struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym)); - struct property *prop; - struct expr *e; - - cs->def[S_DEF_USER].val = sym; - cs->flags |= SYMBOL_DEF_USER; - prop = sym_get_choice_prop(cs); - for (e = prop->expr; e; e = e->left.expr) { - if (e->right.sym->visible != no) - e->right.sym->flags |= SYMBOL_DEF_USER; - } - } - - sym->def[S_DEF_USER].tri = val; - if (oldval != val) - sym_clear_all_valid(); - - return true; -} - -tristate sym_toggle_tristate_value(struct symbol *sym) -{ - tristate oldval, newval; - - oldval = newval = sym_get_tristate_value(sym); - do { - switch (newval) { - case no: - newval = mod; - break; - case mod: - newval = yes; - break; - case yes: - newval = no; - break; - } - if (sym_set_tristate_value(sym, newval)) - break; - } while (oldval != newval); - return newval; -} - -bool sym_string_valid(struct symbol *sym, const char *str) -{ - signed char ch; - - switch (sym->type) { - case S_STRING: - return true; - case S_INT: - ch = *str++; - if (ch == '-') - ch = *str++; - if (!isdigit(ch)) - return false; - if (ch == '0' && *str != 0) - return false; - while ((ch = *str++)) { - if (!isdigit(ch)) - return false; - } - return true; - case S_HEX: - if (str[0] == '0' && (str[1] == 'x' || str[1] == 'X')) - str += 2; - ch = *str++; - do { - if (!isxdigit(ch)) - return false; - } while ((ch = *str++)); - return true; - case S_BOOLEAN: - case S_TRISTATE: - switch (str[0]) { - case 'y': case 'Y': - case 'm': case 'M': - case 'n': case 'N': - return true; - } - return false; - default: - return false; - } -} - -bool sym_string_within_range(struct symbol *sym, const char *str) -{ - struct property *prop; - int val; - - switch (sym->type) { - case S_STRING: - return sym_string_valid(sym, str); - case S_INT: - if (!sym_string_valid(sym, str)) - return false; - prop = sym_get_range_prop(sym); - if (!prop) - return true; - val = strtol(str, NULL, 10); - return val >= sym_get_range_val(prop->expr->left.sym, 10) && - val <= sym_get_range_val(prop->expr->right.sym, 10); - case S_HEX: - if (!sym_string_valid(sym, str)) - return false; - prop = sym_get_range_prop(sym); - if (!prop) - return true; - val = strtol(str, NULL, 16); - return val >= sym_get_range_val(prop->expr->left.sym, 16) && - val <= sym_get_range_val(prop->expr->right.sym, 16); - case S_BOOLEAN: - case S_TRISTATE: - switch (str[0]) { - case 'y': case 'Y': - return sym_tristate_within_range(sym, yes); - case 'm': case 'M': - return sym_tristate_within_range(sym, mod); - case 'n': case 'N': - return sym_tristate_within_range(sym, no); - } - return false; - default: - return false; - } -} - -bool sym_set_string_value(struct symbol *sym, const char *newval) -{ - const char *oldval; - char *val; - int size; - - switch (sym->type) { - case S_BOOLEAN: - case S_TRISTATE: - switch (newval[0]) { - case 'y': case 'Y': - return sym_set_tristate_value(sym, yes); - case 'm': case 'M': - return sym_set_tristate_value(sym, mod); - case 'n': case 'N': - return sym_set_tristate_value(sym, no); - } - return false; - default: - ; - } - - if (!sym_string_within_range(sym, newval)) - return false; - - if (!(sym->flags & SYMBOL_DEF_USER)) { - sym->flags |= SYMBOL_DEF_USER; - sym_set_changed(sym); - } - - oldval = sym->def[S_DEF_USER].val; - size = strlen(newval) + 1; - if (sym->type == S_HEX && (newval[0] != '0' || (newval[1] != 'x' && newval[1] != 'X'))) { - size += 2; - sym->def[S_DEF_USER].val = val = malloc(size); - *val++ = '0'; - *val++ = 'x'; - } else if (!oldval || strcmp(oldval, newval)) - sym->def[S_DEF_USER].val = val = malloc(size); - else - return true; - - strcpy(val, newval); - free((void *)oldval); - sym_clear_all_valid(); - - return true; -} - -/* - * Find the default value associated to a symbol. - * For tristate symbol handle the modules=n case - * in which case "m" becomes "y". - * If the symbol does not have any default then fallback - * to the fixed default values. - */ -const char *sym_get_string_default(struct symbol *sym) -{ - struct property *prop; - struct symbol *ds; - const char *str; - tristate val; - - sym_calc_visibility(sym); - sym_calc_value(modules_sym); - val = symbol_no.curr.tri; - str = symbol_empty.curr.val; - - /* If symbol has a default value look it up */ - prop = sym_get_default_prop(sym); - if (prop != NULL) { - switch (sym->type) { - case S_BOOLEAN: - case S_TRISTATE: - /* The visibility may limit the value from yes => mod */ - val = EXPR_AND(expr_calc_value(prop->expr), prop->visible.tri); - break; - default: - /* - * The following fails to handle the situation - * where a default value is further limited by - * the valid range. - */ - ds = prop_get_symbol(prop); - if (ds != NULL) { - sym_calc_value(ds); - str = (const char *)ds->curr.val; - } - } - } - - /* Handle select statements */ - val = EXPR_OR(val, sym->rev_dep.tri); - - /* transpose mod to yes if modules are not enabled */ - if (val == mod) - if (!sym_is_choice_value(sym) && modules_sym->curr.tri == no) - val = yes; - - /* transpose mod to yes if type is bool */ - if (sym->type == S_BOOLEAN && val == mod) - val = yes; - - switch (sym->type) { - case S_BOOLEAN: - case S_TRISTATE: - switch (val) { - case no: return "n"; - case mod: return "m"; - case yes: return "y"; - } - case S_INT: - case S_HEX: - return str; - case S_STRING: - return str; - case S_OTHER: - case S_UNKNOWN: - break; - } - return ""; -} - -const char *sym_get_string_value(struct symbol *sym) -{ - tristate val; - - switch (sym->type) { - case S_BOOLEAN: - case S_TRISTATE: - val = sym_get_tristate_value(sym); - switch (val) { - case no: - return "n"; - case mod: - return "m"; - case yes: - return "y"; - } - break; - default: - ; - } - return (const char *)sym->curr.val; -} - -bool sym_is_changable(struct symbol *sym) -{ - return sym->visible > sym->rev_dep.tri; -} - -static unsigned strhash(const char *s) -{ - /* fnv32 hash */ - unsigned hash = 2166136261U; - for (; *s; s++) - hash = (hash ^ *s) * 0x01000193; - return hash; -} - -struct symbol *sym_lookup(const char *name, int flags) -{ - struct symbol *symbol; - char *new_name; - int hash; - - if (name) { - if (name[0] && !name[1]) { - switch (name[0]) { - case 'y': return &symbol_yes; - case 'm': return &symbol_mod; - case 'n': return &symbol_no; - } - } - hash = strhash(name) % SYMBOL_HASHSIZE; - - for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) { - if (symbol->name && - !strcmp(symbol->name, name) && - (flags ? symbol->flags & flags - : !(symbol->flags & (SYMBOL_CONST|SYMBOL_CHOICE)))) - return symbol; - } - new_name = strdup(name); - } else { - new_name = NULL; - hash = 0; - } - - symbol = malloc(sizeof(*symbol)); - memset(symbol, 0, sizeof(*symbol)); - symbol->name = new_name; - symbol->type = S_UNKNOWN; - symbol->flags |= flags; - - symbol->next = symbol_hash[hash]; - symbol_hash[hash] = symbol; - - return symbol; -} - -struct symbol *sym_find(const char *name) -{ - struct symbol *symbol = NULL; - int hash = 0; - - if (!name) - return NULL; - - if (name[0] && !name[1]) { - switch (name[0]) { - case 'y': return &symbol_yes; - case 'm': return &symbol_mod; - case 'n': return &symbol_no; - } - } - hash = strhash(name) % SYMBOL_HASHSIZE; - - for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) { - if (symbol->name && - !strcmp(symbol->name, name) && - !(symbol->flags & SYMBOL_CONST)) - break; - } - - return symbol; -} - -/* - * Expand symbol's names embedded in the string given in argument. Symbols' - * name to be expanded shall be prefixed by a '$'. Unknown symbol expands to - * the empty string. - */ -const char *sym_expand_string_value(const char *in) -{ - const char *src; - char *res; - size_t reslen; - - reslen = strlen(in) + 1; - res = malloc(reslen); - res[0] = '\0'; - - while ((src = strchr(in, '$'))) { - char *p, name[SYMBOL_MAXLENGTH]; - const char *symval = ""; - struct symbol *sym; - size_t newlen; - - strncat(res, in, src - in); - src++; - - p = name; - while (isalnum(*src) || *src == '_') - *p++ = *src++; - *p = '\0'; - - sym = sym_find(name); - if (sym != NULL) { - sym_calc_value(sym); - symval = sym_get_string_value(sym); - } - - newlen = strlen(res) + strlen(symval) + strlen(src) + 1; - if (newlen > reslen) { - reslen = newlen; - res = realloc(res, reslen); - } - - strcat(res, symval); - in = src; - } - strcat(res, in); - - return res; -} - -struct symbol **sym_re_search(const char *pattern) -{ - struct symbol *sym, **sym_arr = NULL; - int i, cnt, size; - regex_t re; - - cnt = size = 0; - /* Skip if empty */ - if (strlen(pattern) == 0) - return NULL; - if (regcomp(&re, pattern, REG_EXTENDED|REG_NOSUB|REG_ICASE)) - return NULL; - - for_all_symbols(i, sym) { - if (sym->flags & SYMBOL_CONST || !sym->name) - continue; - if (regexec(&re, sym->name, 0, NULL, 0)) - continue; - if (cnt + 1 >= size) { - void *tmp = sym_arr; - size += 16; - sym_arr = realloc(sym_arr, size * sizeof(struct symbol *)); - if (!sym_arr) { - free(tmp); - return NULL; - } - } - sym_calc_value(sym); - sym_arr[cnt++] = sym; - } - if (sym_arr) - sym_arr[cnt] = NULL; - regfree(&re); - - return sym_arr; -} - -/* - * When we check for recursive dependencies we use a stack to save - * current state so we can print out relevant info to user. - * The entries are located on the call stack so no need to free memory. - * Note inser() remove() must always match to properly clear the stack. - */ -static struct dep_stack { - struct dep_stack *prev, *next; - struct symbol *sym; - struct property *prop; - struct expr *expr; -} *check_top; - -static void dep_stack_insert(struct dep_stack *stack, struct symbol *sym) -{ - memset(stack, 0, sizeof(*stack)); - if (check_top) - check_top->next = stack; - stack->prev = check_top; - stack->sym = sym; - check_top = stack; -} - -static void dep_stack_remove(void) -{ - check_top = check_top->prev; - if (check_top) - check_top->next = NULL; -} - -/* - * Called when we have detected a recursive dependency. - * check_top point to the top of the stact so we use - * the ->prev pointer to locate the bottom of the stack. - */ -static void sym_check_print_recursive(struct symbol *last_sym) -{ - struct dep_stack *stack; - struct symbol *sym, *next_sym; - struct menu *menu = NULL; - struct property *prop; - struct dep_stack cv_stack; - - if (sym_is_choice_value(last_sym)) { - dep_stack_insert(&cv_stack, last_sym); - last_sym = prop_get_symbol(sym_get_choice_prop(last_sym)); - } - - for (stack = check_top; stack != NULL; stack = stack->prev) - if (stack->sym == last_sym) - break; - if (!stack) { - fprintf(stderr, "unexpected recursive dependency error\n"); - return; - } - - for (; stack; stack = stack->next) { - sym = stack->sym; - next_sym = stack->next ? stack->next->sym : last_sym; - prop = stack->prop; - if (prop == NULL) - prop = stack->sym->prop; - - /* for choice values find the menu entry (used below) */ - if (sym_is_choice(sym) || sym_is_choice_value(sym)) { - for (prop = sym->prop; prop; prop = prop->next) { - menu = prop->menu; - if (prop->menu) - break; - } - } - if (stack->sym == last_sym) - fprintf(stderr, "%s:%d:error: recursive dependency detected!\n", - prop->file->name, prop->lineno); - if (stack->expr) { - fprintf(stderr, "%s:%d:\tsymbol %s %s value contains %s\n", - prop->file->name, prop->lineno, - sym->name ? sym->name : "", - prop_get_type_name(prop->type), - next_sym->name ? next_sym->name : ""); - } else if (stack->prop) { - fprintf(stderr, "%s:%d:\tsymbol %s depends on %s\n", - prop->file->name, prop->lineno, - sym->name ? sym->name : "", - next_sym->name ? next_sym->name : ""); - } else if (sym_is_choice(sym)) { - fprintf(stderr, "%s:%d:\tchoice %s contains symbol %s\n", - menu->file->name, menu->lineno, - sym->name ? sym->name : "", - next_sym->name ? next_sym->name : ""); - } else if (sym_is_choice_value(sym)) { - fprintf(stderr, "%s:%d:\tsymbol %s is part of choice %s\n", - menu->file->name, menu->lineno, - sym->name ? sym->name : "", - next_sym->name ? next_sym->name : ""); - } else { - fprintf(stderr, "%s:%d:\tsymbol %s is selected by %s\n", - prop->file->name, prop->lineno, - sym->name ? sym->name : "", - next_sym->name ? next_sym->name : ""); - } - } - - if (check_top == &cv_stack) - dep_stack_remove(); -} - -static struct symbol *sym_check_expr_deps(struct expr *e) -{ - struct symbol *sym; - - if (!e) - return NULL; - switch (e->type) { - case E_OR: - case E_AND: - sym = sym_check_expr_deps(e->left.expr); - if (sym) - return sym; - return sym_check_expr_deps(e->right.expr); - case E_NOT: - return sym_check_expr_deps(e->left.expr); - case E_EQUAL: - case E_UNEQUAL: - sym = sym_check_deps(e->left.sym); - if (sym) - return sym; - return sym_check_deps(e->right.sym); - case E_SYMBOL: - return sym_check_deps(e->left.sym); - default: - break; - } - printf("Oops! How to check %d?\n", e->type); - return NULL; -} - -/* return NULL when dependencies are OK */ -static struct symbol *sym_check_sym_deps(struct symbol *sym) -{ - struct symbol *sym2; - struct property *prop; - struct dep_stack stack; - - dep_stack_insert(&stack, sym); - - sym2 = sym_check_expr_deps(sym->rev_dep.expr); - if (sym2) - goto out; - - for (prop = sym->prop; prop; prop = prop->next) { - if (prop->type == P_CHOICE || prop->type == P_SELECT) - continue; - stack.prop = prop; - sym2 = sym_check_expr_deps(prop->visible.expr); - if (sym2) - break; - if (prop->type != P_DEFAULT || sym_is_choice(sym)) - continue; - stack.expr = prop->expr; - sym2 = sym_check_expr_deps(prop->expr); - if (sym2) - break; - stack.expr = NULL; - } - -out: - dep_stack_remove(); - - return sym2; -} - -static struct symbol *sym_check_choice_deps(struct symbol *choice) -{ - struct symbol *sym, *sym2; - struct property *prop; - struct expr *e; - struct dep_stack stack; - - dep_stack_insert(&stack, choice); - - prop = sym_get_choice_prop(choice); - expr_list_for_each_sym(prop->expr, e, sym) - sym->flags |= (SYMBOL_CHECK | SYMBOL_CHECKED); - - choice->flags |= (SYMBOL_CHECK | SYMBOL_CHECKED); - sym2 = sym_check_sym_deps(choice); - choice->flags &= ~SYMBOL_CHECK; - if (sym2) - goto out; - - expr_list_for_each_sym(prop->expr, e, sym) { - sym2 = sym_check_sym_deps(sym); - if (sym2) - break; - } -out: - expr_list_for_each_sym(prop->expr, e, sym) - sym->flags &= ~SYMBOL_CHECK; - - if (sym2 && sym_is_choice_value(sym2) && - prop_get_symbol(sym_get_choice_prop(sym2)) == choice) - sym2 = choice; - - dep_stack_remove(); - - return sym2; -} - -struct symbol *sym_check_deps(struct symbol *sym) -{ - struct symbol *sym2; - struct property *prop; - - if (sym->flags & SYMBOL_CHECK) { - sym_check_print_recursive(sym); - return sym; - } - if (sym->flags & SYMBOL_CHECKED) - return NULL; - - if (sym_is_choice_value(sym)) { - struct dep_stack stack; - - /* for choice groups start the check with main choice symbol */ - dep_stack_insert(&stack, sym); - prop = sym_get_choice_prop(sym); - sym2 = sym_check_deps(prop_get_symbol(prop)); - dep_stack_remove(); - } else if (sym_is_choice(sym)) { - sym2 = sym_check_choice_deps(sym); - } else { - sym->flags |= (SYMBOL_CHECK | SYMBOL_CHECKED); - sym2 = sym_check_sym_deps(sym); - sym->flags &= ~SYMBOL_CHECK; - } - - if (sym2 && sym2 == sym) - sym2 = NULL; - - return sym2; -} - -struct property *prop_alloc(enum prop_type type, struct symbol *sym) -{ - struct property *prop; - struct property **propp; - - prop = malloc(sizeof(*prop)); - memset(prop, 0, sizeof(*prop)); - prop->type = type; - prop->sym = sym; - prop->file = current_file; - prop->lineno = zconf_lineno(); - - /* append property to the prop list of symbol */ - if (sym) { - for (propp = &sym->prop; *propp; propp = &(*propp)->next) - ; - *propp = prop; - } - - return prop; -} - -struct symbol *prop_get_symbol(struct property *prop) -{ - if (prop->expr && (prop->expr->type == E_SYMBOL || - prop->expr->type == E_LIST)) - return prop->expr->left.sym; - return NULL; -} - -const char *prop_get_type_name(enum prop_type type) -{ - switch (type) { - case P_PROMPT: - return "prompt"; - case P_ENV: - return "env"; - case P_COMMENT: - return "comment"; - case P_MENU: - return "menu"; - case P_DEFAULT: - return "default"; - case P_CHOICE: - return "choice"; - case P_SELECT: - return "select"; - case P_RANGE: - return "range"; - case P_SYMBOL: - return "symbol"; - case P_UNKNOWN: - break; - } - return "unknown"; -} - -static void prop_add_env(const char *env) -{ - struct symbol *sym, *sym2; - struct property *prop; - char *p; - - sym = current_entry->sym; - sym->flags |= SYMBOL_AUTO; - for_all_properties(sym, prop, P_ENV) { - sym2 = prop_get_symbol(prop); - if (strcmp(sym2->name, env)) - menu_warn(current_entry, "redefining environment symbol from %s", - sym2->name); - return; - } - - prop = prop_alloc(P_ENV, sym); - prop->expr = expr_alloc_symbol(sym_lookup(env, SYMBOL_CONST)); - - sym_env_list = expr_alloc_one(E_LIST, sym_env_list); - sym_env_list->right.sym = sym; - - p = getenv(env); - if (p) - sym_add_default(sym, p); - else - menu_warn(current_entry, "environment variable %s undefined", env); -} diff --git a/package/config/util.c b/package/config/util.c deleted file mode 100644 index f962cef..0000000 --- a/package/config/util.c +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright (C) 2002-2005 Roman Zippel - * Copyright (C) 2002-2005 Sam Ravnborg - * - * Released under the terms of the GNU GPL v2.0. - */ - -#include -#include "lkc.h" - -/* file already present in list? If not add it */ -struct file *file_lookup(const char *name) -{ - struct file *file; - const char *file_name = sym_expand_string_value(name); - - for (file = file_list; file; file = file->next) { - if (!strcmp(name, file->name)) { - free((void *)file_name); - return file; - } - } - - file = malloc(sizeof(*file)); - memset(file, 0, sizeof(*file)); - file->name = file_name; - file->next = file_list; - file_list = file; - return file; -} - -static char* br2_symbol_printer(const char * const in) -{ - ssize_t i, j, len = strlen(in); - char *ret; - if (len < 1) - return NULL; - ret = malloc(len+1); - if (!ret) { - printf("Out of memory!"); - exit(1); - } - memset(ret, 0, len+1); - i = j = 0; - if (strncmp("BR2_", in, 4) == 0) - i += 4; - if (strncmp("PACKAGE_", in + i, 8) == 0) - i += 8; - else if (strncmp("TARGET_", in + i, 7) == 0) - i += 7; - while (i <= len) - ret[j++] = tolower(in[i++]); - return ret; -} - -/* write dependencies of the individual config-symbols */ -static int write_make_deps(const char *name) -{ - char *str; - char dir[PATH_MAX+1], buf[PATH_MAX+1], buf2[PATH_MAX+1]; - struct menu *menu; - struct symbol *sym; - struct property *prop, *p; - unsigned done; - const char * const name_tmp = "..make.deps.tmp"; - FILE *out; - if (!name) - name = ".auto.deps"; - - strcpy(dir, conf_get_configname()); - str = strrchr(dir, '/'); - if (str) - str[1] = 0; - else - dir[0] = 0; - - sprintf(buf, "%s%s", dir, name_tmp); - out = fopen(buf, "w"); - if (!out) - return 1; - fprintf(out, "# ATTENTION! This does not handle 'depends', just 'select'! \n" - "# See package/config/util.c write_make_deps()\n#\n"); - menu = &rootmenu;//rootmenu.list; - while (menu) { - sym = menu->sym; - if (!sym) { - if (!menu_is_visible(menu)) - goto next; - } else if (!(sym->flags & SYMBOL_CHOICE)) { - sym_calc_value(sym); - if (sym->type == S_BOOLEAN - && sym_get_tristate_value(sym) != no) { - done = 0; - for_all_prompts(sym, prop) { - struct expr *e; -//printf("\nname=%s\n", sym->name); - for_all_properties(sym, p, P_SELECT) { - e = p->expr; - if (e && e->left.sym->name) { - if (!done) { - fprintf(out, "%s: $(BASE_TARGETS)", br2_symbol_printer(sym->name)); - done = 1; - } -//printf("SELECTS %s\n",e->left.sym->name); - fprintf(out, " %s",br2_symbol_printer(e->left.sym->name)); - } - } - if (done) - fprintf(out, "\n"); -#if 0 - e = sym->rev_dep.expr; - if (e && e->type == E_SYMBOL - && e->left.sym->name) { - fprintf(out, "%s: %s", br2_symbol_printer(e->left.sym->name), - br2_symbol_printer(sym->name)); -printf("%s is Selected BY: %s", sym->name, e->left.sym->name); - } -#endif - } - } - } -next: - if (menu->list) { - menu = menu->list; - continue; - } - if (menu->next) - menu = menu->next; - else while ((menu = menu->parent)) { - if (menu->next) { - menu = menu->next; - break; - } - } - } - fclose(out); - sprintf(buf2, "%s%s", dir, name); - rename(buf, buf2); - printf(_("#\n" - "# make dependencies written to %s\n" - "# ATTENTION buildroot devels!\n" - "# See top of this file before playing with this auto-preprequisites!\n" - "#\n"), name); - return 0; -} - -/* write a dependency file as used by kbuild to track dependencies */ -int file_write_dep(const char *name) -{ - char *str; - char buf[PATH_MAX+1], buf2[PATH_MAX+1], dir[PATH_MAX+1]; - struct symbol *sym, *env_sym; - struct expr *e; - struct file *file; - FILE *out; - - if (!name) - name = ".kconfig.d"; - - strcpy(dir, conf_get_configname()); - str = strrchr(dir, '/'); - if (str) - str[1] = 0; - else - dir[0] = 0; - - sprintf(buf, "%s..config.tmp", dir); - out = fopen(buf, "w"); - if (!out) - return 1; - fprintf(out, "deps_config := \\\n"); - for (file = file_list; file; file = file->next) { - if (file->next) - fprintf(out, "\t%s \\\n", file->name); - else - fprintf(out, "\t%s\n", file->name); - } - fprintf(out, "\n%s: \\\n" - "\t$(deps_config)\n\n", conf_get_autoconfig_name()); - - expr_list_for_each_sym(sym_env_list, e, sym) { - struct property *prop; - const char *value; - - prop = sym_get_env_prop(sym); - env_sym = prop_get_symbol(prop); - if (!env_sym) - continue; - value = getenv(env_sym->name); - if (!value) - value = ""; - fprintf(out, "ifneq \"$(%s)\" \"%s\"\n", env_sym->name, value); - fprintf(out, "%s: FORCE\n", conf_get_autoconfig_name()); - fprintf(out, "endif\n"); - } - - fprintf(out, "\n$(deps_config): ;\n"); - fclose(out); - sprintf(buf2, "%s%s", dir, name); - rename(buf, buf2); - return write_make_deps(NULL); -} - - -/* Allocate initial growable string */ -struct gstr str_new(void) -{ - struct gstr gs; - gs.s = malloc(sizeof(char) * 64); - gs.len = 64; - gs.max_width = 0; - strcpy(gs.s, "\0"); - return gs; -} - -/* Allocate and assign growable string */ -struct gstr str_assign(const char *s) -{ - struct gstr gs; - gs.s = strdup(s); - gs.len = strlen(s) + 1; - gs.max_width = 0; - return gs; -} - -/* Free storage for growable string */ -void str_free(struct gstr *gs) -{ - if (gs->s) - free(gs->s); - gs->s = NULL; - gs->len = 0; -} - -/* Append to growable string */ -void str_append(struct gstr *gs, const char *s) -{ - size_t l; - if (s) { - l = strlen(gs->s) + strlen(s) + 1; - if (l > gs->len) { - gs->s = realloc(gs->s, l); - gs->len = l; - } - strcat(gs->s, s); - } -} - -/* Append printf formatted string to growable string */ -void str_printf(struct gstr *gs, const char *fmt, ...) -{ - va_list ap; - char s[10000]; /* big enough... */ - va_start(ap, fmt); - vsnprintf(s, sizeof(s), fmt, ap); - str_append(gs, s); - va_end(ap); -} - -/* Retrieve value of growable string */ -const char *str_get(struct gstr *gs) -{ - return gs->s; -} - diff --git a/package/config/zconf.gperf b/package/config/zconf.gperf deleted file mode 100644 index c9e690e..0000000 --- a/package/config/zconf.gperf +++ /dev/null @@ -1,47 +0,0 @@ -%language=ANSI-C -%define hash-function-name kconf_id_hash -%define lookup-function-name kconf_id_lookup -%define string-pool-name kconf_id_strings -%compare-strncmp -%enum -%pic -%struct-type - -struct kconf_id; - -static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); - -%% -mainmenu, T_MAINMENU, TF_COMMAND -menu, T_MENU, TF_COMMAND -endmenu, T_ENDMENU, TF_COMMAND -source, T_SOURCE, TF_COMMAND -choice, T_CHOICE, TF_COMMAND -endchoice, T_ENDCHOICE, TF_COMMAND -comment, T_COMMENT, TF_COMMAND -config, T_CONFIG, TF_COMMAND -menuconfig, T_MENUCONFIG, TF_COMMAND -help, T_HELP, TF_COMMAND -if, T_IF, TF_COMMAND|TF_PARAM -endif, T_ENDIF, TF_COMMAND -depends, T_DEPENDS, TF_COMMAND -optional, T_OPTIONAL, TF_COMMAND -default, T_DEFAULT, TF_COMMAND, S_UNKNOWN -prompt, T_PROMPT, TF_COMMAND -tristate, T_TYPE, TF_COMMAND, S_TRISTATE -def_tristate, T_DEFAULT, TF_COMMAND, S_TRISTATE -bool, T_TYPE, TF_COMMAND, S_BOOLEAN -boolean, T_TYPE, TF_COMMAND, S_BOOLEAN -def_bool, T_DEFAULT, TF_COMMAND, S_BOOLEAN -int, T_TYPE, TF_COMMAND, S_INT -hex, T_TYPE, TF_COMMAND, S_HEX -string, T_TYPE, TF_COMMAND, S_STRING -select, T_SELECT, TF_COMMAND -range, T_RANGE, TF_COMMAND -visible, T_VISIBLE, TF_COMMAND -option, T_OPTION, TF_COMMAND -on, T_ON, TF_PARAM -modules, T_OPT_MODULES, TF_OPTION -defconfig_list, T_OPT_DEFCONFIG_LIST,TF_OPTION -env, T_OPT_ENV, TF_OPTION -%% diff --git a/package/config/zconf.hash.c_shipped b/package/config/zconf.hash.c_shipped deleted file mode 100644 index 4055d5d..0000000 --- a/package/config/zconf.hash.c_shipped +++ /dev/null @@ -1,245 +0,0 @@ -/* ANSI-C code produced by gperf version 3.0.3 */ -/* Command-line: gperf */ -/* Computed positions: -k'1,3' */ - -#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ - && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ - && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ - && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ - && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ - && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ - && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ - && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ - && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ - && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ - && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ - && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ - && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ - && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ - && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ - && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ - && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ - && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ - && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ - && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ - && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ - && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ - && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) -/* The character set is not based on ISO-646. */ -#error "gperf generated tables don't work with this execution character set. Please report a bug to ." -#endif - -struct kconf_id; - -static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); -/* maximum key range = 50, duplicates = 0 */ - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static unsigned int -kconf_id_hash (register const char *str, register unsigned int len) -{ - static unsigned char asso_values[] = - { - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 40, 5, - 0, 0, 5, 52, 0, 20, 52, 52, 10, 20, - 5, 0, 35, 52, 0, 30, 0, 15, 0, 52, - 15, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52 - }; - register int hval = len; - - switch (hval) - { - default: - hval += asso_values[(unsigned char)str[2]]; - /*FALLTHROUGH*/ - case 2: - case 1: - hval += asso_values[(unsigned char)str[0]]; - break; - } - return hval; -} - -struct kconf_id_strings_t - { - char kconf_id_strings_str2[sizeof("on")]; - char kconf_id_strings_str3[sizeof("env")]; - char kconf_id_strings_str5[sizeof("endif")]; - char kconf_id_strings_str6[sizeof("option")]; - char kconf_id_strings_str7[sizeof("endmenu")]; - char kconf_id_strings_str8[sizeof("optional")]; - char kconf_id_strings_str9[sizeof("endchoice")]; - char kconf_id_strings_str10[sizeof("range")]; - char kconf_id_strings_str11[sizeof("choice")]; - char kconf_id_strings_str12[sizeof("default")]; - char kconf_id_strings_str13[sizeof("def_bool")]; - char kconf_id_strings_str14[sizeof("help")]; - char kconf_id_strings_str16[sizeof("config")]; - char kconf_id_strings_str17[sizeof("def_tristate")]; - char kconf_id_strings_str18[sizeof("hex")]; - char kconf_id_strings_str19[sizeof("defconfig_list")]; - char kconf_id_strings_str22[sizeof("if")]; - char kconf_id_strings_str23[sizeof("int")]; - char kconf_id_strings_str27[sizeof("modules")]; - char kconf_id_strings_str28[sizeof("tristate")]; - char kconf_id_strings_str29[sizeof("menu")]; - char kconf_id_strings_str32[sizeof("comment")]; - char kconf_id_strings_str35[sizeof("menuconfig")]; - char kconf_id_strings_str36[sizeof("string")]; - char kconf_id_strings_str37[sizeof("visible")]; - char kconf_id_strings_str41[sizeof("prompt")]; - char kconf_id_strings_str42[sizeof("depends")]; - char kconf_id_strings_str44[sizeof("bool")]; - char kconf_id_strings_str46[sizeof("select")]; - char kconf_id_strings_str47[sizeof("boolean")]; - char kconf_id_strings_str48[sizeof("mainmenu")]; - char kconf_id_strings_str51[sizeof("source")]; - }; -static struct kconf_id_strings_t kconf_id_strings_contents = - { - "on", - "env", - "endif", - "option", - "endmenu", - "optional", - "endchoice", - "range", - "choice", - "default", - "def_bool", - "help", - "config", - "def_tristate", - "hex", - "defconfig_list", - "if", - "int", - "modules", - "tristate", - "menu", - "comment", - "menuconfig", - "string", - "visible", - "prompt", - "depends", - "bool", - "select", - "boolean", - "mainmenu", - "source" - }; -#define kconf_id_strings ((const char *) &kconf_id_strings_contents) -#ifdef __GNUC__ -__inline -#ifdef __GNUC_STDC_INLINE__ -__attribute__ ((__gnu_inline__)) -#endif -#endif -struct kconf_id * -kconf_id_lookup (register const char *str, register unsigned int len) -{ - enum - { - TOTAL_KEYWORDS = 32, - MIN_WORD_LENGTH = 2, - MAX_WORD_LENGTH = 14, - MIN_HASH_VALUE = 2, - MAX_HASH_VALUE = 51 - }; - - static struct kconf_id wordlist[] = - { - {-1}, {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_ON, TF_PARAM}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3, T_OPT_ENV, TF_OPTION}, - {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str5, T_ENDIF, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str6, T_OPTION, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_ENDMENU, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_OPTIONAL, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str9, T_ENDCHOICE, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str10, T_RANGE, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str11, T_CHOICE, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_UNKNOWN}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_HELP, TF_COMMAND}, - {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16, T_CONFIG, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_DEFAULT, TF_COMMAND, S_TRISTATE}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_TYPE, TF_COMMAND, S_HEX}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str19, T_OPT_DEFCONFIG_LIST,TF_OPTION}, - {-1}, {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_IF, TF_COMMAND|TF_PARAM}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_TYPE, TF_COMMAND, S_INT}, - {-1}, {-1}, {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_OPT_MODULES, TF_OPTION}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_TYPE, TF_COMMAND, S_TRISTATE}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND}, - {-1}, {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND}, - {-1}, {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_MENUCONFIG, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_TYPE, TF_COMMAND, S_STRING}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_VISIBLE, TF_COMMAND}, - {-1}, {-1}, {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_PROMPT, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42, T_DEPENDS, TF_COMMAND}, - {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str44, T_TYPE, TF_COMMAND, S_BOOLEAN}, - {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_SELECT, TF_COMMAND}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str47, T_TYPE, TF_COMMAND, S_BOOLEAN}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str48, T_MAINMENU, TF_COMMAND}, - {-1}, {-1}, - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str51, T_SOURCE, TF_COMMAND} - }; - - if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) - { - register int key = kconf_id_hash (str, len); - - if (key <= MAX_HASH_VALUE && key >= 0) - { - register int o = wordlist[key].name; - if (o >= 0) - { - register const char *s = o + kconf_id_strings; - - if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0') - return &wordlist[key]; - } - } - } - return 0; -} - diff --git a/package/config/zconf.l b/package/config/zconf.l deleted file mode 100644 index 3dbaec1..0000000 --- a/package/config/zconf.l +++ /dev/null @@ -1,360 +0,0 @@ -%option backup nostdinit noyywrap never-interactive full ecs -%option 8bit backup nodefault perf-report perf-report -%option noinput -%x COMMAND HELP STRING PARAM -%{ -/* - * Copyright (C) 2002 Roman Zippel - * Released under the terms of the GNU GPL v2.0. - */ - -#include -#include -#include -#include -#include - -#define LKC_DIRECT_LINK -#include "lkc.h" - -#define START_STRSIZE 16 - -static struct { - struct file *file; - int lineno; -} current_pos; - -static char *text; -static int text_size, text_asize; - -struct buffer { - struct buffer *parent; - YY_BUFFER_STATE state; -}; - -struct buffer *current_buf; - -static int last_ts, first_ts; - -static void zconf_endhelp(void); -static void zconf_endfile(void); - -static void new_string(void) -{ - text = malloc(START_STRSIZE); - text_asize = START_STRSIZE; - text_size = 0; - *text = 0; -} - -static void append_string(const char *str, int size) -{ - int new_size = text_size + size + 1; - if (new_size > text_asize) { - new_size += START_STRSIZE - 1; - new_size &= -START_STRSIZE; - text = realloc(text, new_size); - text_asize = new_size; - } - memcpy(text + text_size, str, size); - text_size += size; - text[text_size] = 0; -} - -static void alloc_string(const char *str, int size) -{ - text = malloc(size + 1); - memcpy(text, str, size); - text[size] = 0; -} -%} - -ws [ \n\t] -n [A-Za-z0-9_] - -%% - int str = 0; - int ts, i; - -[ \t]*#.*\n | -[ \t]*\n { - current_file->lineno++; - return T_EOL; -} -[ \t]*#.* - - -[ \t]+ { - BEGIN(COMMAND); -} - -. { - unput(yytext[0]); - BEGIN(COMMAND); -} - - -{ - {n}+ { - struct kconf_id *id = kconf_id_lookup(yytext, yyleng); - BEGIN(PARAM); - current_pos.file = current_file; - current_pos.lineno = current_file->lineno; - if (id && id->flags & TF_COMMAND) { - zconflval.id = id; - return id->token; - } - alloc_string(yytext, yyleng); - zconflval.string = text; - return T_WORD; - } - . - \n { - BEGIN(INITIAL); - current_file->lineno++; - return T_EOL; - } -} - -{ - "&&" return T_AND; - "||" return T_OR; - "(" return T_OPEN_PAREN; - ")" return T_CLOSE_PAREN; - "!" return T_NOT; - "=" return T_EQUAL; - "!=" return T_UNEQUAL; - \"|\' { - str = yytext[0]; - new_string(); - BEGIN(STRING); - } - \n BEGIN(INITIAL); current_file->lineno++; return T_EOL; - --- /* ignore */ - ({n}|[-/.])+ { - struct kconf_id *id = kconf_id_lookup(yytext, yyleng); - if (id && id->flags & TF_PARAM) { - zconflval.id = id; - return id->token; - } - alloc_string(yytext, yyleng); - zconflval.string = text; - return T_WORD; - } - #.* /* comment */ - \\\n current_file->lineno++; - . - <> { - BEGIN(INITIAL); - } -} - -{ - [^'"\\\n]+/\n { - append_string(yytext, yyleng); - zconflval.string = text; - return T_WORD_QUOTE; - } - [^'"\\\n]+ { - append_string(yytext, yyleng); - } - \\.?/\n { - append_string(yytext + 1, yyleng - 1); - zconflval.string = text; - return T_WORD_QUOTE; - } - \\.? { - append_string(yytext + 1, yyleng - 1); - } - \'|\" { - if (str == yytext[0]) { - BEGIN(PARAM); - zconflval.string = text; - return T_WORD_QUOTE; - } else - append_string(yytext, 1); - } - \n { - printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno()); - current_file->lineno++; - BEGIN(INITIAL); - return T_EOL; - } - <> { - BEGIN(INITIAL); - } -} - -{ - [ \t]+ { - ts = 0; - for (i = 0; i < yyleng; i++) { - if (yytext[i] == '\t') - ts = (ts & ~7) + 8; - else - ts++; - } - last_ts = ts; - if (first_ts) { - if (ts < first_ts) { - zconf_endhelp(); - return T_HELPTEXT; - } - ts -= first_ts; - while (ts > 8) { - append_string(" ", 8); - ts -= 8; - } - append_string(" ", ts); - } - } - [ \t]*\n/[^ \t\n] { - current_file->lineno++; - zconf_endhelp(); - return T_HELPTEXT; - } - [ \t]*\n { - current_file->lineno++; - append_string("\n", 1); - } - [^ \t\n].* { - while (yyleng) { - if ((yytext[yyleng-1] != ' ') && (yytext[yyleng-1] != '\t')) - break; - yyleng--; - } - append_string(yytext, yyleng); - if (!first_ts) - first_ts = last_ts; - } - <> { - zconf_endhelp(); - return T_HELPTEXT; - } -} - -<> { - if (current_file) { - zconf_endfile(); - return T_EOL; - } - fclose(yyin); - yyterminate(); -} - -%% -void zconf_starthelp(void) -{ - new_string(); - last_ts = first_ts = 0; - BEGIN(HELP); -} - -static void zconf_endhelp(void) -{ - zconflval.string = text; - BEGIN(INITIAL); -} - - -/* - * Try to open specified file with following names: - * ./name - * $(srctree)/name - * The latter is used when srctree is separate from objtree - * when compiling the kernel. - * Return NULL if file is not found. - */ -FILE *zconf_fopen(const char *name) -{ - char *env, fullname[PATH_MAX+1]; - FILE *f; - - f = fopen(name, "r"); - if (!f && name != NULL && name[0] != '/') { - env = getenv(SRCTREE); - if (env) { - sprintf(fullname, "%s/%s", env, name); - f = fopen(fullname, "r"); - } - } - return f; -} - -void zconf_initscan(const char *name) -{ - yyin = zconf_fopen(name); - if (!yyin) { - printf("can't find file %s\n", name); - exit(1); - } - - current_buf = malloc(sizeof(*current_buf)); - memset(current_buf, 0, sizeof(*current_buf)); - - current_file = file_lookup(name); - current_file->lineno = 1; - current_file->flags = FILE_BUSY; -} - -void zconf_nextfile(const char *name) -{ - struct file *file = file_lookup(name); - struct buffer *buf = malloc(sizeof(*buf)); - memset(buf, 0, sizeof(*buf)); - - current_buf->state = YY_CURRENT_BUFFER; - yyin = zconf_fopen(file->name); - if (!yyin) { - printf("%s:%d: can't open file \"%s\"\n", - zconf_curname(), zconf_lineno(), file->name); - exit(1); - } - yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE)); - buf->parent = current_buf; - current_buf = buf; - - if (file->flags & FILE_BUSY) { - printf("%s:%d: do not source '%s' from itself\n", - zconf_curname(), zconf_lineno(), name); - exit(1); - } - if (file->flags & FILE_SCANNED) { - printf("%s:%d: file '%s' is already sourced from '%s'\n", - zconf_curname(), zconf_lineno(), name, - file->parent->name); - exit(1); - } - file->flags |= FILE_BUSY; - file->lineno = 1; - file->parent = current_file; - current_file = file; -} - -static void zconf_endfile(void) -{ - struct buffer *parent; - - current_file->flags |= FILE_SCANNED; - current_file->flags &= ~FILE_BUSY; - current_file = current_file->parent; - - parent = current_buf->parent; - if (parent) { - fclose(yyin); - yy_delete_buffer(YY_CURRENT_BUFFER); - yy_switch_to_buffer(parent->state); - } - free(current_buf); - current_buf = parent; -} - -int zconf_lineno(void) -{ - return current_pos.lineno; -} - -const char *zconf_curname(void) -{ - return current_pos.file ? current_pos.file->name : ""; -} diff --git a/package/config/zconf.tab.c_shipped b/package/config/zconf.tab.c_shipped deleted file mode 100644 index c27391d..0000000 --- a/package/config/zconf.tab.c_shipped +++ /dev/null @@ -1,2505 +0,0 @@ - -/* A Bison parser, made by GNU Bison 2.4.1. */ - -/* Skeleton implementation for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "2.4.1" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 0 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - -/* Using locations. */ -#define YYLSP_NEEDED 0 - -/* Substitute the variable and function names. */ -#define yyparse zconfparse -#define yylex zconflex -#define yyerror zconferror -#define yylval zconflval -#define yychar zconfchar -#define yydebug zconfdebug -#define yynerrs zconfnerrs - - -/* Copy the first part of user declarations. */ - - -/* - * Copyright (C) 2002 Roman Zippel - * Released under the terms of the GNU GPL v2.0. - */ - -#include -#include -#include -#include -#include -#include - -#define LKC_DIRECT_LINK -#include "lkc.h" - -#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) - -#define PRINTD 0x0001 -#define DEBUG_PARSE 0x0002 - -int cdebug = PRINTD; - -extern int zconflex(void); -static void zconfprint(const char *err, ...); -static void zconf_error(const char *err, ...); -static void zconferror(const char *err); -static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken); - -struct symbol *symbol_hash[SYMBOL_HASHSIZE]; - -static struct menu *current_menu, *current_entry; - -#define YYDEBUG 0 -#if YYDEBUG -#define YYERROR_VERBOSE -#endif - - - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - T_MAINMENU = 258, - T_MENU = 259, - T_ENDMENU = 260, - T_SOURCE = 261, - T_CHOICE = 262, - T_ENDCHOICE = 263, - T_COMMENT = 264, - T_CONFIG = 265, - T_MENUCONFIG = 266, - T_HELP = 267, - T_HELPTEXT = 268, - T_IF = 269, - T_ENDIF = 270, - T_DEPENDS = 271, - T_OPTIONAL = 272, - T_PROMPT = 273, - T_TYPE = 274, - T_DEFAULT = 275, - T_SELECT = 276, - T_RANGE = 277, - T_VISIBLE = 278, - T_OPTION = 279, - T_ON = 280, - T_WORD = 281, - T_WORD_QUOTE = 282, - T_UNEQUAL = 283, - T_CLOSE_PAREN = 284, - T_OPEN_PAREN = 285, - T_EOL = 286, - T_OR = 287, - T_AND = 288, - T_EQUAL = 289, - T_NOT = 290 - }; -#endif - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ - - - char *string; - struct file *file; - struct symbol *symbol; - struct expr *expr; - struct menu *menu; - struct kconf_id *id; - - - -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - - -/* Copy the second part of user declarations. */ - - -/* Include zconf.hash.c here so it can see the token constants. */ -#include "zconf.hash.c" - - - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) -# endif -# endif -# ifndef YY_ -# define YY_(msgid) msgid -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) -#else -# define YYUSE(e) /* empty */ -#endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; -#endif -{ - return yyi; -} -#endif - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined _STDLIB_H \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) - -#endif - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 11 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 290 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 36 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 50 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 118 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 191 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 290 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint16 yyprhs[] = -{ - 0, 0, 3, 6, 8, 11, 13, 14, 17, 20, - 23, 26, 31, 36, 40, 42, 44, 46, 48, 50, - 52, 54, 56, 58, 60, 62, 64, 66, 68, 72, - 75, 79, 82, 86, 89, 90, 93, 96, 99, 102, - 105, 108, 112, 117, 122, 127, 133, 137, 138, 142, - 143, 146, 150, 153, 155, 159, 160, 163, 166, 169, - 172, 175, 180, 184, 187, 192, 193, 196, 200, 202, - 206, 207, 210, 213, 216, 220, 224, 228, 230, 234, - 235, 238, 241, 244, 248, 252, 255, 258, 261, 262, - 265, 268, 271, 276, 277, 280, 283, 286, 287, 290, - 292, 294, 297, 300, 303, 305, 308, 309, 312, 314, - 318, 322, 326, 329, 333, 337, 339, 341, 342 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 37, 0, -1, 81, 38, -1, 38, -1, 63, 39, - -1, 39, -1, -1, 39, 41, -1, 39, 55, -1, - 39, 67, -1, 39, 80, -1, 39, 26, 1, 31, - -1, 39, 40, 1, 31, -1, 39, 1, 31, -1, - 16, -1, 18, -1, 19, -1, 21, -1, 17, -1, - 22, -1, 20, -1, 23, -1, 31, -1, 61, -1, - 71, -1, 44, -1, 46, -1, 69, -1, 26, 1, - 31, -1, 1, 31, -1, 10, 26, 31, -1, 43, - 47, -1, 11, 26, 31, -1, 45, 47, -1, -1, - 47, 48, -1, 47, 49, -1, 47, 75, -1, 47, - 73, -1, 47, 42, -1, 47, 31, -1, 19, 78, - 31, -1, 18, 79, 82, 31, -1, 20, 83, 82, - 31, -1, 21, 26, 82, 31, -1, 22, 84, 84, - 82, 31, -1, 24, 50, 31, -1, -1, 50, 26, - 51, -1, -1, 34, 79, -1, 7, 85, 31, -1, - 52, 56, -1, 80, -1, 53, 58, 54, -1, -1, - 56, 57, -1, 56, 75, -1, 56, 73, -1, 56, - 31, -1, 56, 42, -1, 18, 79, 82, 31, -1, - 19, 78, 31, -1, 17, 31, -1, 20, 26, 82, - 31, -1, -1, 58, 41, -1, 14, 83, 81, -1, - 80, -1, 59, 62, 60, -1, -1, 62, 41, -1, - 62, 67, -1, 62, 55, -1, 3, 79, 81, -1, - 4, 79, 31, -1, 64, 76, 74, -1, 80, -1, - 65, 68, 66, -1, -1, 68, 41, -1, 68, 67, - -1, 68, 55, -1, 6, 79, 31, -1, 9, 79, - 31, -1, 70, 74, -1, 12, 31, -1, 72, 13, - -1, -1, 74, 75, -1, 74, 31, -1, 74, 42, - -1, 16, 25, 83, 31, -1, -1, 76, 77, -1, - 76, 31, -1, 23, 82, -1, -1, 79, 82, -1, - 26, -1, 27, -1, 5, 31, -1, 8, 31, -1, - 15, 31, -1, 31, -1, 81, 31, -1, -1, 14, - 83, -1, 84, -1, 84, 34, 84, -1, 84, 28, - 84, -1, 30, 83, 29, -1, 35, 83, -1, 83, - 32, 83, -1, 83, 33, 83, -1, 26, -1, 27, - -1, -1, 26, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = -{ - 0, 108, 108, 108, 110, 110, 112, 114, 115, 116, - 117, 118, 119, 123, 127, 127, 127, 127, 127, 127, - 127, 127, 131, 132, 133, 134, 135, 136, 140, 141, - 147, 155, 161, 169, 179, 181, 182, 183, 184, 185, - 186, 189, 197, 203, 213, 219, 225, 228, 230, 241, - 242, 247, 256, 261, 269, 272, 274, 275, 276, 277, - 278, 281, 287, 298, 304, 314, 316, 321, 329, 337, - 340, 342, 343, 344, 349, 356, 363, 368, 376, 379, - 381, 382, 383, 386, 394, 401, 408, 414, 421, 423, - 424, 425, 428, 436, 438, 439, 442, 449, 451, 456, - 457, 460, 461, 462, 466, 467, 470, 471, 474, 475, - 476, 477, 478, 479, 480, 483, 484, 487, 488 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "T_MAINMENU", "T_MENU", "T_ENDMENU", - "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG", - "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS", - "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT", "T_SELECT", "T_RANGE", - "T_VISIBLE", "T_OPTION", "T_ON", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL", - "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND", "T_EQUAL", - "T_NOT", "$accept", "input", "start", "stmt_list", "option_name", - "common_stmt", "option_error", "config_entry_start", "config_stmt", - "menuconfig_entry_start", "menuconfig_stmt", "config_option_list", - "config_option", "symbol_option", "symbol_option_list", - "symbol_option_arg", "choice", "choice_entry", "choice_end", - "choice_stmt", "choice_option_list", "choice_option", "choice_block", - "if_entry", "if_end", "if_stmt", "if_block", "mainmenu_stmt", "menu", - "menu_entry", "menu_end", "menu_stmt", "menu_block", "source_stmt", - "comment", "comment_stmt", "help_start", "help", "depends_list", - "depends", "visibility_list", "visible", "prompt_stmt_opt", "prompt", - "end", "nl", "if_expr", "expr", "symbol", "word_opt", 0 -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 36, 37, 37, 38, 38, 39, 39, 39, 39, - 39, 39, 39, 39, 40, 40, 40, 40, 40, 40, - 40, 40, 41, 41, 41, 41, 41, 41, 42, 42, - 43, 44, 45, 46, 47, 47, 47, 47, 47, 47, - 47, 48, 48, 48, 48, 48, 49, 50, 50, 51, - 51, 52, 53, 54, 55, 56, 56, 56, 56, 56, - 56, 57, 57, 57, 57, 58, 58, 59, 60, 61, - 62, 62, 62, 62, 63, 64, 65, 66, 67, 68, - 68, 68, 68, 69, 70, 71, 72, 73, 74, 74, - 74, 74, 75, 76, 76, 76, 77, 78, 78, 79, - 79, 80, 80, 80, 81, 81, 82, 82, 83, 83, - 83, 83, 83, 83, 83, 84, 84, 85, 85 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 2, 1, 2, 1, 0, 2, 2, 2, - 2, 4, 4, 3, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, - 3, 2, 3, 2, 0, 2, 2, 2, 2, 2, - 2, 3, 4, 4, 4, 5, 3, 0, 3, 0, - 2, 3, 2, 1, 3, 0, 2, 2, 2, 2, - 2, 4, 3, 2, 4, 0, 2, 3, 1, 3, - 0, 2, 2, 2, 3, 3, 3, 1, 3, 0, - 2, 2, 2, 3, 3, 2, 2, 2, 0, 2, - 2, 2, 4, 0, 2, 2, 2, 0, 2, 1, - 1, 2, 2, 2, 1, 2, 0, 2, 1, 3, - 3, 3, 2, 3, 3, 1, 1, 0, 1 -}; - -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 6, 0, 104, 0, 3, 0, 6, 6, 99, 100, - 0, 1, 0, 0, 0, 0, 117, 0, 0, 0, - 0, 0, 0, 14, 18, 15, 16, 20, 17, 19, - 21, 0, 22, 0, 7, 34, 25, 34, 26, 55, - 65, 8, 70, 23, 93, 79, 9, 27, 88, 24, - 10, 0, 105, 2, 74, 13, 0, 101, 0, 118, - 0, 102, 0, 0, 0, 115, 116, 0, 0, 0, - 108, 103, 0, 0, 0, 0, 0, 0, 0, 88, - 0, 0, 75, 83, 51, 84, 30, 32, 0, 112, - 0, 0, 67, 0, 0, 11, 12, 0, 0, 0, - 0, 97, 0, 0, 0, 47, 0, 40, 39, 35, - 36, 0, 38, 37, 0, 0, 97, 0, 59, 60, - 56, 58, 57, 66, 54, 53, 71, 73, 69, 72, - 68, 106, 95, 0, 94, 80, 82, 78, 81, 77, - 90, 91, 89, 111, 113, 114, 110, 109, 29, 86, - 0, 106, 0, 106, 106, 106, 0, 0, 0, 87, - 63, 106, 0, 106, 0, 96, 0, 0, 41, 98, - 0, 0, 106, 49, 46, 28, 0, 62, 0, 107, - 92, 42, 43, 44, 0, 0, 48, 61, 64, 45, - 50 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 3, 4, 5, 33, 34, 108, 35, 36, 37, - 38, 74, 109, 110, 157, 186, 39, 40, 124, 41, - 76, 120, 77, 42, 128, 43, 78, 6, 44, 45, - 137, 46, 80, 47, 48, 49, 111, 112, 81, 113, - 79, 134, 152, 153, 50, 7, 165, 69, 70, 60 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -90 -static const yytype_int16 yypact[] = -{ - 4, 42, -90, 96, -90, 111, -90, 15, -90, -90, - 75, -90, 82, 42, 104, 42, 110, 107, 42, 115, - 125, -4, 121, -90, -90, -90, -90, -90, -90, -90, - -90, 162, -90, 163, -90, -90, -90, -90, -90, -90, - -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, - -90, 139, -90, -90, 138, -90, 142, -90, 143, -90, - 152, -90, 164, 167, 168, -90, -90, -4, -4, 77, - -18, -90, 177, 185, 33, 71, 195, 247, 236, -2, - 236, 171, -90, -90, -90, -90, -90, -90, 41, -90, - -4, -4, 138, 97, 97, -90, -90, 186, 187, 194, - 42, 42, -4, 196, 97, -90, 219, -90, -90, -90, - -90, 210, -90, -90, 204, 42, 42, 199, -90, -90, - -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, - -90, 222, -90, 223, -90, -90, -90, -90, -90, -90, - -90, -90, -90, -90, 215, -90, -90, -90, -90, -90, - -4, 222, 228, 222, -5, 222, 97, 35, 229, -90, - -90, 222, 232, 222, -4, -90, 135, 233, -90, -90, - 234, 235, 222, 240, -90, -90, 237, -90, 239, -13, - -90, -90, -90, -90, 244, 42, -90, -90, -90, -90, - -90 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -90, -90, 269, 271, -90, 23, -70, -90, -90, -90, - -90, 243, -90, -90, -90, -90, -90, -90, -90, -48, - -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, - -90, -20, -90, -90, -90, -90, -90, 206, 205, -68, - -90, -90, 169, -1, 27, -7, 118, -66, -89, -90 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -86 -static const yytype_int16 yytable[] = -{ - 10, 88, 89, 54, 146, 147, 119, 1, 122, 164, - 93, 141, 56, 142, 58, 156, 94, 62, 1, 90, - 91, 131, 65, 66, 144, 145, 67, 90, 91, 132, - 127, 68, 136, -31, 97, 2, 154, -31, -31, -31, - -31, -31, -31, -31, -31, 98, 52, -31, -31, 99, - -31, 100, 101, 102, 103, 104, -31, 105, 129, 106, - 138, 173, 92, 141, 107, 142, 174, 172, 8, 9, - 143, -33, 97, 90, 91, -33, -33, -33, -33, -33, - -33, -33, -33, 98, 166, -33, -33, 99, -33, 100, - 101, 102, 103, 104, -33, 105, 11, 106, 179, 151, - 123, 126, 107, 135, 125, 130, 2, 139, 2, 90, - 91, -5, 12, 55, 161, 13, 14, 15, 16, 17, - 18, 19, 20, 65, 66, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 57, 59, 31, 61, -4, - 12, 63, 32, 13, 14, 15, 16, 17, 18, 19, - 20, 64, 71, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 72, 73, 31, 180, 90, 91, 52, - 32, -85, 97, 82, 83, -85, -85, -85, -85, -85, - -85, -85, -85, 84, 190, -85, -85, 99, -85, -85, - -85, -85, -85, -85, -85, 85, 97, 106, 86, 87, - -52, -52, 140, -52, -52, -52, -52, 98, 95, -52, - -52, 99, 114, 115, 116, 117, 96, 148, 149, 150, - 158, 106, 155, 159, 97, 163, 118, -76, -76, -76, - -76, -76, -76, -76, -76, 160, 164, -76, -76, 99, - 13, 14, 15, 16, 17, 18, 19, 20, 91, 106, - 21, 22, 14, 15, 140, 17, 18, 19, 20, 168, - 175, 21, 22, 177, 181, 182, 183, 32, 187, 167, - 188, 169, 170, 171, 185, 189, 53, 51, 32, 176, - 75, 178, 121, 0, 133, 162, 0, 0, 0, 0, - 184 -}; - -static const yytype_int16 yycheck[] = -{ - 1, 67, 68, 10, 93, 94, 76, 3, 76, 14, - 28, 81, 13, 81, 15, 104, 34, 18, 3, 32, - 33, 23, 26, 27, 90, 91, 30, 32, 33, 31, - 78, 35, 80, 0, 1, 31, 102, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 31, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 78, 26, - 80, 26, 69, 133, 31, 133, 31, 156, 26, 27, - 29, 0, 1, 32, 33, 4, 5, 6, 7, 8, - 9, 10, 11, 12, 150, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 0, 26, 164, 100, - 77, 78, 31, 80, 77, 78, 31, 80, 31, 32, - 33, 0, 1, 31, 115, 4, 5, 6, 7, 8, - 9, 10, 11, 26, 27, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 31, 26, 26, 31, 0, - 1, 26, 31, 4, 5, 6, 7, 8, 9, 10, - 11, 26, 31, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 1, 1, 26, 31, 32, 33, 31, - 31, 0, 1, 31, 31, 4, 5, 6, 7, 8, - 9, 10, 11, 31, 185, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 31, 1, 26, 31, 31, - 5, 6, 31, 8, 9, 10, 11, 12, 31, 14, - 15, 16, 17, 18, 19, 20, 31, 31, 31, 25, - 1, 26, 26, 13, 1, 26, 31, 4, 5, 6, - 7, 8, 9, 10, 11, 31, 14, 14, 15, 16, - 4, 5, 6, 7, 8, 9, 10, 11, 33, 26, - 14, 15, 5, 6, 31, 8, 9, 10, 11, 31, - 31, 14, 15, 31, 31, 31, 31, 31, 31, 151, - 31, 153, 154, 155, 34, 31, 7, 6, 31, 161, - 37, 163, 76, -1, 79, 116, -1, -1, -1, -1, - 172 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 3, 31, 37, 38, 39, 63, 81, 26, 27, - 79, 0, 1, 4, 5, 6, 7, 8, 9, 10, - 11, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 26, 31, 40, 41, 43, 44, 45, 46, 52, - 53, 55, 59, 61, 64, 65, 67, 69, 70, 71, - 80, 39, 31, 38, 81, 31, 79, 31, 79, 26, - 85, 31, 79, 26, 26, 26, 27, 30, 35, 83, - 84, 31, 1, 1, 47, 47, 56, 58, 62, 76, - 68, 74, 31, 31, 31, 31, 31, 31, 83, 83, - 32, 33, 81, 28, 34, 31, 31, 1, 12, 16, - 18, 19, 20, 21, 22, 24, 26, 31, 42, 48, - 49, 72, 73, 75, 17, 18, 19, 20, 31, 42, - 57, 73, 75, 41, 54, 80, 41, 55, 60, 67, - 80, 23, 31, 74, 77, 41, 55, 66, 67, 80, - 31, 42, 75, 29, 83, 83, 84, 84, 31, 31, - 25, 79, 78, 79, 83, 26, 84, 50, 1, 13, - 31, 79, 78, 26, 14, 82, 83, 82, 31, 82, - 82, 82, 84, 26, 31, 31, 82, 31, 82, 83, - 31, 31, 31, 31, 82, 34, 51, 31, 31, 31, - 79 -}; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ - -#define YYFAIL goto yyerrlab - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -#ifndef YY_LOCATION_PRINT -# if YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif -{ - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - switch (yytype) - { - default: - break; - } -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - yy_symbol_value_print (yyoutput, yytype, yyvaluep); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule) -#else -static void -yy_reduce_print (yyvsp, yyrule) - YYSTYPE *yyvsp; - int yyrule; -#endif -{ - int yynrhs = yyr2[yyrule]; - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule); \ -} while (YYID (0)) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static YYSIZE_T -yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static char * -yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) -{ - int yyn = yypact[yystate]; - - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else - { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } - - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - - if (yysize_overflow) - return YYSIZE_MAXIMUM; - - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; - } -} -#endif /* YYERROR_VERBOSE */ - - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yymsg, yytype, yyvaluep) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; -#endif -{ - YYUSE (yyvaluep); - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - switch (yytype) - { - case 53: /* "choice_entry" */ - - { - fprintf(stderr, "%s:%d: missing end statement for this entry\n", - (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno); - if (current_menu == (yyvaluep->menu)) - menu_end_menu(); -}; - - break; - case 59: /* "if_entry" */ - - { - fprintf(stderr, "%s:%d: missing end statement for this entry\n", - (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno); - if (current_menu == (yyvaluep->menu)) - menu_end_menu(); -}; - - break; - case 65: /* "menu_entry" */ - - { - fprintf(stderr, "%s:%d: missing end statement for this entry\n", - (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno); - if (current_menu == (yyvaluep->menu)) - menu_end_menu(); -}; - - break; - - default: - break; - } -} - -/* Prevent warnings from -Wmissing-prototypes. */ -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - -/* The lookahead symbol. */ -int yychar; - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; - -/* Number of syntax errors so far. */ -int yynerrs; - - - -/*-------------------------. -| yyparse or yypush_parse. | -`-------------------------*/ - -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void) -#else -int -yyparse () - -#endif -#endif -{ - - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - yyssp = yyss; - yyvsp = yyvs; - - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - *++yyvsp = yylval; - - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 10: - - { zconf_error("unexpected end statement"); ;} - break; - - case 11: - - { zconf_error("unknown statement \"%s\"", (yyvsp[(2) - (4)].string)); ;} - break; - - case 12: - - { - zconf_error("unexpected option \"%s\"", kconf_id_strings + (yyvsp[(2) - (4)].id)->name); -;} - break; - - case 13: - - { zconf_error("invalid statement"); ;} - break; - - case 28: - - { zconf_error("unknown option \"%s\"", (yyvsp[(1) - (3)].string)); ;} - break; - - case 29: - - { zconf_error("invalid option"); ;} - break; - - case 30: - - { - struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0); - sym->flags |= SYMBOL_OPTIONAL; - menu_add_entry(sym); - printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string)); -;} - break; - - case 31: - - { - menu_end_entry(); - printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 32: - - { - struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0); - sym->flags |= SYMBOL_OPTIONAL; - menu_add_entry(sym); - printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string)); -;} - break; - - case 33: - - { - if (current_entry->prompt) - current_entry->prompt->type = P_MENU; - else - zconfprint("warning: menuconfig statement without prompt"); - menu_end_entry(); - printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 41: - - { - menu_set_type((yyvsp[(1) - (3)].id)->stype); - printd(DEBUG_PARSE, "%s:%d:type(%u)\n", - zconf_curname(), zconf_lineno(), - (yyvsp[(1) - (3)].id)->stype); -;} - break; - - case 42: - - { - menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr)); - printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 43: - - { - menu_add_expr(P_DEFAULT, (yyvsp[(2) - (4)].expr), (yyvsp[(3) - (4)].expr)); - if ((yyvsp[(1) - (4)].id)->stype != S_UNKNOWN) - menu_set_type((yyvsp[(1) - (4)].id)->stype); - printd(DEBUG_PARSE, "%s:%d:default(%u)\n", - zconf_curname(), zconf_lineno(), - (yyvsp[(1) - (4)].id)->stype); -;} - break; - - case 44: - - { - menu_add_symbol(P_SELECT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr)); - printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 45: - - { - menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[(2) - (5)].symbol), (yyvsp[(3) - (5)].symbol)), (yyvsp[(4) - (5)].expr)); - printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 48: - - { - struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string))); - if (id && id->flags & TF_OPTION) - menu_add_option(id->token, (yyvsp[(3) - (3)].string)); - else - zconfprint("warning: ignoring unknown option %s", (yyvsp[(2) - (3)].string)); - free((yyvsp[(2) - (3)].string)); -;} - break; - - case 49: - - { (yyval.string) = NULL; ;} - break; - - case 50: - - { (yyval.string) = (yyvsp[(2) - (2)].string); ;} - break; - - case 51: - - { - struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), SYMBOL_CHOICE); - sym->flags |= SYMBOL_AUTO; - menu_add_entry(sym); - menu_add_expr(P_CHOICE, NULL, NULL); - printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 52: - - { - (yyval.menu) = menu_add_menu(); -;} - break; - - case 53: - - { - if (zconf_endtoken((yyvsp[(1) - (1)].id), T_CHOICE, T_ENDCHOICE)) { - menu_end_menu(); - printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno()); - } -;} - break; - - case 61: - - { - menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr)); - printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 62: - - { - if ((yyvsp[(1) - (3)].id)->stype == S_BOOLEAN || (yyvsp[(1) - (3)].id)->stype == S_TRISTATE) { - menu_set_type((yyvsp[(1) - (3)].id)->stype); - printd(DEBUG_PARSE, "%s:%d:type(%u)\n", - zconf_curname(), zconf_lineno(), - (yyvsp[(1) - (3)].id)->stype); - } else - YYERROR; -;} - break; - - case 63: - - { - current_entry->sym->flags |= SYMBOL_OPTIONAL; - printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 64: - - { - if ((yyvsp[(1) - (4)].id)->stype == S_UNKNOWN) { - menu_add_symbol(P_DEFAULT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr)); - printd(DEBUG_PARSE, "%s:%d:default\n", - zconf_curname(), zconf_lineno()); - } else - YYERROR; -;} - break; - - case 67: - - { - printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); - menu_add_entry(NULL); - menu_add_dep((yyvsp[(2) - (3)].expr)); - (yyval.menu) = menu_add_menu(); -;} - break; - - case 68: - - { - if (zconf_endtoken((yyvsp[(1) - (1)].id), T_IF, T_ENDIF)) { - menu_end_menu(); - printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno()); - } -;} - break; - - case 74: - - { - menu_add_prompt(P_MENU, (yyvsp[(2) - (3)].string), NULL); -;} - break; - - case 75: - - { - menu_add_entry(NULL); - menu_add_prompt(P_MENU, (yyvsp[(2) - (3)].string), NULL); - printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 76: - - { - (yyval.menu) = menu_add_menu(); -;} - break; - - case 77: - - { - if (zconf_endtoken((yyvsp[(1) - (1)].id), T_MENU, T_ENDMENU)) { - menu_end_menu(); - printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno()); - } -;} - break; - - case 83: - - { - printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string)); - zconf_nextfile((yyvsp[(2) - (3)].string)); -;} - break; - - case 84: - - { - menu_add_entry(NULL); - menu_add_prompt(P_COMMENT, (yyvsp[(2) - (3)].string), NULL); - printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 85: - - { - menu_end_entry(); -;} - break; - - case 86: - - { - printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); - zconf_starthelp(); -;} - break; - - case 87: - - { - current_entry->help = (yyvsp[(2) - (2)].string); -;} - break; - - case 92: - - { - menu_add_dep((yyvsp[(3) - (4)].expr)); - printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()); -;} - break; - - case 96: - - { - menu_add_visibility((yyvsp[(2) - (2)].expr)); -;} - break; - - case 98: - - { - menu_add_prompt(P_PROMPT, (yyvsp[(1) - (2)].string), (yyvsp[(2) - (2)].expr)); -;} - break; - - case 101: - - { (yyval.id) = (yyvsp[(1) - (2)].id); ;} - break; - - case 102: - - { (yyval.id) = (yyvsp[(1) - (2)].id); ;} - break; - - case 103: - - { (yyval.id) = (yyvsp[(1) - (2)].id); ;} - break; - - case 106: - - { (yyval.expr) = NULL; ;} - break; - - case 107: - - { (yyval.expr) = (yyvsp[(2) - (2)].expr); ;} - break; - - case 108: - - { (yyval.expr) = expr_alloc_symbol((yyvsp[(1) - (1)].symbol)); ;} - break; - - case 109: - - { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); ;} - break; - - case 110: - - { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); ;} - break; - - case 111: - - { (yyval.expr) = (yyvsp[(2) - (3)].expr); ;} - break; - - case 112: - - { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[(2) - (2)].expr)); ;} - break; - - case 113: - - { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} - break; - - case 114: - - { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} - break; - - case 115: - - { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), 0); free((yyvsp[(1) - (1)].string)); ;} - break; - - case 116: - - { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), SYMBOL_CONST); free((yyvsp[(1) - (1)].string)); ;} - break; - - case 117: - - { (yyval.string) = NULL; ;} - break; - - - - default: break; - } - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (YY_("syntax error")); -#else - { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (yymsg); - } - else - { - yyerror (YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } - } -#endif - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - - yydestruct ("Error: popping", - yystos[yystate], yyvsp); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - *++yyvsp = yylval; - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined(yyoverflow) || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); -} - - - - - -void conf_parse(const char *name) -{ - struct symbol *sym; - int i; - - zconf_initscan(name); - - sym_init(); - _menu_init(); - modules_sym = sym_lookup(NULL, 0); - modules_sym->type = S_BOOLEAN; - modules_sym->flags |= SYMBOL_AUTO; - rootmenu.prompt = menu_add_prompt(P_MENU, "Buildroot Configuration", NULL); - -#if YYDEBUG - if (getenv("ZCONF_DEBUG")) - zconfdebug = 1; -#endif - zconfparse(); - if (zconfnerrs) - exit(1); - if (!modules_sym->prop) { - struct property *prop; - - prop = prop_alloc(P_DEFAULT, modules_sym); - prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0)); - } - - rootmenu.prompt->text = _(rootmenu.prompt->text); - rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text); - - menu_finalize(&rootmenu); - for_all_symbols(i, sym) { - if (sym_check_deps(sym)) - zconfnerrs++; - } - if (zconfnerrs) - exit(1); - sym_set_change_count(1); -} - -static const char *zconf_tokenname(int token) -{ - switch (token) { - case T_MENU: return "menu"; - case T_ENDMENU: return "endmenu"; - case T_CHOICE: return "choice"; - case T_ENDCHOICE: return "endchoice"; - case T_IF: return "if"; - case T_ENDIF: return "endif"; - case T_DEPENDS: return "depends"; - case T_VISIBLE: return "visible"; - } - return ""; -} - -static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken) -{ - if (id->token != endtoken) { - zconf_error("unexpected '%s' within %s block", - kconf_id_strings + id->name, zconf_tokenname(starttoken)); - zconfnerrs++; - return false; - } - if (current_menu->file != current_file) { - zconf_error("'%s' in different file than '%s'", - kconf_id_strings + id->name, zconf_tokenname(starttoken)); - fprintf(stderr, "%s:%d: location of the '%s'\n", - current_menu->file->name, current_menu->lineno, - zconf_tokenname(starttoken)); - zconfnerrs++; - return false; - } - return true; -} - -static void zconfprint(const char *err, ...) -{ - va_list ap; - - fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno()); - va_start(ap, err); - vfprintf(stderr, err, ap); - va_end(ap); - fprintf(stderr, "\n"); -} - -static void zconf_error(const char *err, ...) -{ - va_list ap; - - zconfnerrs++; - fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno()); - va_start(ap, err); - vfprintf(stderr, err, ap); - va_end(ap); - fprintf(stderr, "\n"); -} - -static void zconferror(const char *err) -{ -#if YYDEBUG - fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err); -#endif -} - -static void print_quoted_string(FILE *out, const char *str) -{ - const char *p; - int len; - - putc('"', out); - while ((p = strchr(str, '"'))) { - len = p - str; - if (len) - fprintf(out, "%.*s", len, str); - fputs("\\\"", out); - str = p + 1; - } - fputs(str, out); - putc('"', out); -} - -static void print_symbol(FILE *out, struct menu *menu) -{ - struct symbol *sym = menu->sym; - struct property *prop; - - if (sym_is_choice(sym)) - fprintf(out, "\nchoice\n"); - else - fprintf(out, "\nconfig %s\n", sym->name); - switch (sym->type) { - case S_BOOLEAN: - fputs(" boolean\n", out); - break; - case S_TRISTATE: - fputs(" tristate\n", out); - break; - case S_STRING: - fputs(" string\n", out); - break; - case S_INT: - fputs(" integer\n", out); - break; - case S_HEX: - fputs(" hex\n", out); - break; - default: - fputs(" ???\n", out); - break; - } - for (prop = sym->prop; prop; prop = prop->next) { - if (prop->menu != menu) - continue; - switch (prop->type) { - case P_PROMPT: - fputs(" prompt ", out); - print_quoted_string(out, prop->text); - if (!expr_is_yes(prop->visible.expr)) { - fputs(" if ", out); - expr_fprint(prop->visible.expr, out); - } - fputc('\n', out); - break; - case P_DEFAULT: - fputs( " default ", out); - expr_fprint(prop->expr, out); - if (!expr_is_yes(prop->visible.expr)) { - fputs(" if ", out); - expr_fprint(prop->visible.expr, out); - } - fputc('\n', out); - break; - case P_CHOICE: - fputs(" #choice value\n", out); - break; - case P_SELECT: - fputs( " select ", out); - expr_fprint(prop->expr, out); - fputc('\n', out); - break; - case P_RANGE: - fputs( " range ", out); - expr_fprint(prop->expr, out); - fputc('\n', out); - break; - case P_MENU: - fputs( " menu ", out); - print_quoted_string(out, prop->text); - fputc('\n', out); - break; - default: - fprintf(out, " unknown prop %d!\n", prop->type); - break; - } - } - if (menu->help) { - int len = strlen(menu->help); - while (menu->help[--len] == '\n') - menu->help[len] = 0; - fprintf(out, " help\n%s\n", menu->help); - } -} - -void zconfdump(FILE *out) -{ - struct property *prop; - struct symbol *sym; - struct menu *menu; - - menu = rootmenu.list; - while (menu) { - if ((sym = menu->sym)) - print_symbol(out, menu); - else if ((prop = menu->prompt)) { - switch (prop->type) { - case P_COMMENT: - fputs("\ncomment ", out); - print_quoted_string(out, prop->text); - fputs("\n", out); - break; - case P_MENU: - fputs("\nmenu ", out); - print_quoted_string(out, prop->text); - fputs("\n", out); - break; - default: - ; - } - if (!expr_is_yes(prop->visible.expr)) { - fputs(" depends ", out); - expr_fprint(prop->visible.expr, out); - fputc('\n', out); - } - } - - if (menu->list) - menu = menu->list; - else if (menu->next) - menu = menu->next; - else while ((menu = menu->parent)) { - if (menu->prompt && menu->prompt->type == P_MENU) - fputs("\nendmenu\n", out); - if (menu->next) { - menu = menu->next; - break; - } - } - } -} - -#include "lex.zconf.c" -#include "util.c" -#include "confdata.c" -#include "expr.c" -#include "symbol.c" -#include "menu.c" - diff --git a/package/config/zconf.y b/package/config/zconf.y deleted file mode 100644 index 0717a32..0000000 --- a/package/config/zconf.y +++ /dev/null @@ -1,749 +0,0 @@ -%{ -/* - * Copyright (C) 2002 Roman Zippel - * Released under the terms of the GNU GPL v2.0. - */ - -#include -#include -#include -#include -#include -#include - -#define LKC_DIRECT_LINK -#include "lkc.h" - -#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) - -#define PRINTD 0x0001 -#define DEBUG_PARSE 0x0002 - -int cdebug = PRINTD; - -extern int zconflex(void); -static void zconfprint(const char *err, ...); -static void zconf_error(const char *err, ...); -static void zconferror(const char *err); -static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken); - -struct symbol *symbol_hash[SYMBOL_HASHSIZE]; - -static struct menu *current_menu, *current_entry; - -#define YYDEBUG 0 -#if YYDEBUG -#define YYERROR_VERBOSE -#endif -%} -%expect 30 - -%union -{ - char *string; - struct file *file; - struct symbol *symbol; - struct expr *expr; - struct menu *menu; - struct kconf_id *id; -} - -%token T_MAINMENU -%token T_MENU -%token T_ENDMENU -%token T_SOURCE -%token T_CHOICE -%token T_ENDCHOICE -%token T_COMMENT -%token T_CONFIG -%token T_MENUCONFIG -%token T_HELP -%token T_HELPTEXT -%token T_IF -%token T_ENDIF -%token T_DEPENDS -%token T_OPTIONAL -%token T_PROMPT -%token T_TYPE -%token T_DEFAULT -%token T_SELECT -%token T_RANGE -%token T_VISIBLE -%token T_OPTION -%token T_ON -%token T_WORD -%token T_WORD_QUOTE -%token T_UNEQUAL -%token T_CLOSE_PAREN -%token T_OPEN_PAREN -%token T_EOL - -%left T_OR -%left T_AND -%left T_EQUAL T_UNEQUAL -%nonassoc T_NOT - -%type prompt -%type symbol -%type expr -%type if_expr -%type end -%type option_name -%type if_entry menu_entry choice_entry -%type symbol_option_arg word_opt - -%destructor { - fprintf(stderr, "%s:%d: missing end statement for this entry\n", - $$->file->name, $$->lineno); - if (current_menu == $$) - menu_end_menu(); -} if_entry menu_entry choice_entry - -%{ -/* Include zconf.hash.c here so it can see the token constants. */ -#include "zconf.hash.c" -%} - -%% -input: nl start | start; - -start: mainmenu_stmt stmt_list | stmt_list; - -stmt_list: - /* empty */ - | stmt_list common_stmt - | stmt_list choice_stmt - | stmt_list menu_stmt - | stmt_list end { zconf_error("unexpected end statement"); } - | stmt_list T_WORD error T_EOL { zconf_error("unknown statement \"%s\"", $2); } - | stmt_list option_name error T_EOL -{ - zconf_error("unexpected option \"%s\"", kconf_id_strings + $2->name); -} - | stmt_list error T_EOL { zconf_error("invalid statement"); } -; - -option_name: - T_DEPENDS | T_PROMPT | T_TYPE | T_SELECT | T_OPTIONAL | T_RANGE | T_DEFAULT | T_VISIBLE -; - -common_stmt: - T_EOL - | if_stmt - | comment_stmt - | config_stmt - | menuconfig_stmt - | source_stmt -; - -option_error: - T_WORD error T_EOL { zconf_error("unknown option \"%s\"", $1); } - | error T_EOL { zconf_error("invalid option"); } -; - - -/* config/menuconfig entry */ - -config_entry_start: T_CONFIG T_WORD T_EOL -{ - struct symbol *sym = sym_lookup($2, 0); - sym->flags |= SYMBOL_OPTIONAL; - menu_add_entry(sym); - printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), $2); -}; - -config_stmt: config_entry_start config_option_list -{ - menu_end_entry(); - printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); -}; - -menuconfig_entry_start: T_MENUCONFIG T_WORD T_EOL -{ - struct symbol *sym = sym_lookup($2, 0); - sym->flags |= SYMBOL_OPTIONAL; - menu_add_entry(sym); - printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), $2); -}; - -menuconfig_stmt: menuconfig_entry_start config_option_list -{ - if (current_entry->prompt) - current_entry->prompt->type = P_MENU; - else - zconfprint("warning: menuconfig statement without prompt"); - menu_end_entry(); - printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); -}; - -config_option_list: - /* empty */ - | config_option_list config_option - | config_option_list symbol_option - | config_option_list depends - | config_option_list help - | config_option_list option_error - | config_option_list T_EOL -; - -config_option: T_TYPE prompt_stmt_opt T_EOL -{ - menu_set_type($1->stype); - printd(DEBUG_PARSE, "%s:%d:type(%u)\n", - zconf_curname(), zconf_lineno(), - $1->stype); -}; - -config_option: T_PROMPT prompt if_expr T_EOL -{ - menu_add_prompt(P_PROMPT, $2, $3); - printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); -}; - -config_option: T_DEFAULT expr if_expr T_EOL -{ - menu_add_expr(P_DEFAULT, $2, $3); - if ($1->stype != S_UNKNOWN) - menu_set_type($1->stype); - printd(DEBUG_PARSE, "%s:%d:default(%u)\n", - zconf_curname(), zconf_lineno(), - $1->stype); -}; - -config_option: T_SELECT T_WORD if_expr T_EOL -{ - menu_add_symbol(P_SELECT, sym_lookup($2, 0), $3); - printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno()); -}; - -config_option: T_RANGE symbol symbol if_expr T_EOL -{ - menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,$2, $3), $4); - printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno()); -}; - -symbol_option: T_OPTION symbol_option_list T_EOL -; - -symbol_option_list: - /* empty */ - | symbol_option_list T_WORD symbol_option_arg -{ - struct kconf_id *id = kconf_id_lookup($2, strlen($2)); - if (id && id->flags & TF_OPTION) - menu_add_option(id->token, $3); - else - zconfprint("warning: ignoring unknown option %s", $2); - free($2); -}; - -symbol_option_arg: - /* empty */ { $$ = NULL; } - | T_EQUAL prompt { $$ = $2; } -; - -/* choice entry */ - -choice: T_CHOICE word_opt T_EOL -{ - struct symbol *sym = sym_lookup($2, SYMBOL_CHOICE); - sym->flags |= SYMBOL_AUTO; - menu_add_entry(sym); - menu_add_expr(P_CHOICE, NULL, NULL); - printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno()); -}; - -choice_entry: choice choice_option_list -{ - $$ = menu_add_menu(); -}; - -choice_end: end -{ - if (zconf_endtoken($1, T_CHOICE, T_ENDCHOICE)) { - menu_end_menu(); - printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno()); - } -}; - -choice_stmt: choice_entry choice_block choice_end -; - -choice_option_list: - /* empty */ - | choice_option_list choice_option - | choice_option_list depends - | choice_option_list help - | choice_option_list T_EOL - | choice_option_list option_error -; - -choice_option: T_PROMPT prompt if_expr T_EOL -{ - menu_add_prompt(P_PROMPT, $2, $3); - printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); -}; - -choice_option: T_TYPE prompt_stmt_opt T_EOL -{ - if ($1->stype == S_BOOLEAN || $1->stype == S_TRISTATE) { - menu_set_type($1->stype); - printd(DEBUG_PARSE, "%s:%d:type(%u)\n", - zconf_curname(), zconf_lineno(), - $1->stype); - } else - YYERROR; -}; - -choice_option: T_OPTIONAL T_EOL -{ - current_entry->sym->flags |= SYMBOL_OPTIONAL; - printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno()); -}; - -choice_option: T_DEFAULT T_WORD if_expr T_EOL -{ - if ($1->stype == S_UNKNOWN) { - menu_add_symbol(P_DEFAULT, sym_lookup($2, 0), $3); - printd(DEBUG_PARSE, "%s:%d:default\n", - zconf_curname(), zconf_lineno()); - } else - YYERROR; -}; - -choice_block: - /* empty */ - | choice_block common_stmt -; - -/* if entry */ - -if_entry: T_IF expr nl -{ - printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); - menu_add_entry(NULL); - menu_add_dep($2); - $$ = menu_add_menu(); -}; - -if_end: end -{ - if (zconf_endtoken($1, T_IF, T_ENDIF)) { - menu_end_menu(); - printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno()); - } -}; - -if_stmt: if_entry if_block if_end -; - -if_block: - /* empty */ - | if_block common_stmt - | if_block menu_stmt - | if_block choice_stmt -; - -/* mainmenu entry */ - -mainmenu_stmt: T_MAINMENU prompt nl -{ - menu_add_prompt(P_MENU, $2, NULL); -}; - -/* menu entry */ - -menu: T_MENU prompt T_EOL -{ - menu_add_entry(NULL); - menu_add_prompt(P_MENU, $2, NULL); - printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); -}; - -menu_entry: menu visibility_list depends_list -{ - $$ = menu_add_menu(); -}; - -menu_end: end -{ - if (zconf_endtoken($1, T_MENU, T_ENDMENU)) { - menu_end_menu(); - printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno()); - } -}; - -menu_stmt: menu_entry menu_block menu_end -; - -menu_block: - /* empty */ - | menu_block common_stmt - | menu_block menu_stmt - | menu_block choice_stmt -; - -source_stmt: T_SOURCE prompt T_EOL -{ - printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), $2); - zconf_nextfile($2); -}; - -/* comment entry */ - -comment: T_COMMENT prompt T_EOL -{ - menu_add_entry(NULL); - menu_add_prompt(P_COMMENT, $2, NULL); - printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); -}; - -comment_stmt: comment depends_list -{ - menu_end_entry(); -}; - -/* help option */ - -help_start: T_HELP T_EOL -{ - printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); - zconf_starthelp(); -}; - -help: help_start T_HELPTEXT -{ - current_entry->help = $2; -}; - -/* depends option */ - -depends_list: - /* empty */ - | depends_list depends - | depends_list T_EOL - | depends_list option_error -; - -depends: T_DEPENDS T_ON expr T_EOL -{ - menu_add_dep($3); - printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()); -}; - -/* visibility option */ - -visibility_list: - /* empty */ - | visibility_list visible - | visibility_list T_EOL -; - -visible: T_VISIBLE if_expr -{ - menu_add_visibility($2); -}; - -/* prompt statement */ - -prompt_stmt_opt: - /* empty */ - | prompt if_expr -{ - menu_add_prompt(P_PROMPT, $1, $2); -}; - -prompt: T_WORD - | T_WORD_QUOTE -; - -end: T_ENDMENU T_EOL { $$ = $1; } - | T_ENDCHOICE T_EOL { $$ = $1; } - | T_ENDIF T_EOL { $$ = $1; } -; - -nl: - T_EOL - | nl T_EOL -; - -if_expr: /* empty */ { $$ = NULL; } - | T_IF expr { $$ = $2; } -; - -expr: symbol { $$ = expr_alloc_symbol($1); } - | symbol T_EQUAL symbol { $$ = expr_alloc_comp(E_EQUAL, $1, $3); } - | symbol T_UNEQUAL symbol { $$ = expr_alloc_comp(E_UNEQUAL, $1, $3); } - | T_OPEN_PAREN expr T_CLOSE_PAREN { $$ = $2; } - | T_NOT expr { $$ = expr_alloc_one(E_NOT, $2); } - | expr T_OR expr { $$ = expr_alloc_two(E_OR, $1, $3); } - | expr T_AND expr { $$ = expr_alloc_two(E_AND, $1, $3); } -; - -symbol: T_WORD { $$ = sym_lookup($1, 0); free($1); } - | T_WORD_QUOTE { $$ = sym_lookup($1, SYMBOL_CONST); free($1); } -; - -word_opt: /* empty */ { $$ = NULL; } - | T_WORD - -%% - -void conf_parse(const char *name) -{ - struct symbol *sym; - int i; - - zconf_initscan(name); - - sym_init(); - _menu_init(); - modules_sym = sym_lookup(NULL, 0); - modules_sym->type = S_BOOLEAN; - modules_sym->flags |= SYMBOL_AUTO; - rootmenu.prompt = menu_add_prompt(P_MENU, "Buildroot Configuration", NULL); - -#if YYDEBUG - if (getenv("ZCONF_DEBUG")) - zconfdebug = 1; -#endif - zconfparse(); - if (zconfnerrs) - exit(1); - if (!modules_sym->prop) { - struct property *prop; - - prop = prop_alloc(P_DEFAULT, modules_sym); - prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0)); - } - - rootmenu.prompt->text = _(rootmenu.prompt->text); - rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text); - - menu_finalize(&rootmenu); - for_all_symbols(i, sym) { - if (sym_check_deps(sym)) - zconfnerrs++; - } - if (zconfnerrs) - exit(1); - sym_set_change_count(1); -} - -static const char *zconf_tokenname(int token) -{ - switch (token) { - case T_MENU: return "menu"; - case T_ENDMENU: return "endmenu"; - case T_CHOICE: return "choice"; - case T_ENDCHOICE: return "endchoice"; - case T_IF: return "if"; - case T_ENDIF: return "endif"; - case T_DEPENDS: return "depends"; - case T_VISIBLE: return "visible"; - } - return ""; -} - -static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken) -{ - if (id->token != endtoken) { - zconf_error("unexpected '%s' within %s block", - kconf_id_strings + id->name, zconf_tokenname(starttoken)); - zconfnerrs++; - return false; - } - if (current_menu->file != current_file) { - zconf_error("'%s' in different file than '%s'", - kconf_id_strings + id->name, zconf_tokenname(starttoken)); - fprintf(stderr, "%s:%d: location of the '%s'\n", - current_menu->file->name, current_menu->lineno, - zconf_tokenname(starttoken)); - zconfnerrs++; - return false; - } - return true; -} - -static void zconfprint(const char *err, ...) -{ - va_list ap; - - fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno()); - va_start(ap, err); - vfprintf(stderr, err, ap); - va_end(ap); - fprintf(stderr, "\n"); -} - -static void zconf_error(const char *err, ...) -{ - va_list ap; - - zconfnerrs++; - fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno()); - va_start(ap, err); - vfprintf(stderr, err, ap); - va_end(ap); - fprintf(stderr, "\n"); -} - -static void zconferror(const char *err) -{ -#if YYDEBUG - fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err); -#endif -} - -static void print_quoted_string(FILE *out, const char *str) -{ - const char *p; - int len; - - putc('"', out); - while ((p = strchr(str, '"'))) { - len = p - str; - if (len) - fprintf(out, "%.*s", len, str); - fputs("\\\"", out); - str = p + 1; - } - fputs(str, out); - putc('"', out); -} - -static void print_symbol(FILE *out, struct menu *menu) -{ - struct symbol *sym = menu->sym; - struct property *prop; - - if (sym_is_choice(sym)) - fprintf(out, "\nchoice\n"); - else - fprintf(out, "\nconfig %s\n", sym->name); - switch (sym->type) { - case S_BOOLEAN: - fputs(" boolean\n", out); - break; - case S_TRISTATE: - fputs(" tristate\n", out); - break; - case S_STRING: - fputs(" string\n", out); - break; - case S_INT: - fputs(" integer\n", out); - break; - case S_HEX: - fputs(" hex\n", out); - break; - default: - fputs(" ???\n", out); - break; - } - for (prop = sym->prop; prop; prop = prop->next) { - if (prop->menu != menu) - continue; - switch (prop->type) { - case P_PROMPT: - fputs(" prompt ", out); - print_quoted_string(out, prop->text); - if (!expr_is_yes(prop->visible.expr)) { - fputs(" if ", out); - expr_fprint(prop->visible.expr, out); - } - fputc('\n', out); - break; - case P_DEFAULT: - fputs( " default ", out); - expr_fprint(prop->expr, out); - if (!expr_is_yes(prop->visible.expr)) { - fputs(" if ", out); - expr_fprint(prop->visible.expr, out); - } - fputc('\n', out); - break; - case P_CHOICE: - fputs(" #choice value\n", out); - break; - case P_SELECT: - fputs( " select ", out); - expr_fprint(prop->expr, out); - fputc('\n', out); - break; - case P_RANGE: - fputs( " range ", out); - expr_fprint(prop->expr, out); - fputc('\n', out); - break; - case P_MENU: - fputs( " menu ", out); - print_quoted_string(out, prop->text); - fputc('\n', out); - break; - default: - fprintf(out, " unknown prop %d!\n", prop->type); - break; - } - } - if (menu->help) { - int len = strlen(menu->help); - while (menu->help[--len] == '\n') - menu->help[len] = 0; - fprintf(out, " help\n%s\n", menu->help); - } -} - -void zconfdump(FILE *out) -{ - struct property *prop; - struct symbol *sym; - struct menu *menu; - - menu = rootmenu.list; - while (menu) { - if ((sym = menu->sym)) - print_symbol(out, menu); - else if ((prop = menu->prompt)) { - switch (prop->type) { - case P_COMMENT: - fputs("\ncomment ", out); - print_quoted_string(out, prop->text); - fputs("\n", out); - break; - case P_MENU: - fputs("\nmenu ", out); - print_quoted_string(out, prop->text); - fputs("\n", out); - break; - default: - ; - } - if (!expr_is_yes(prop->visible.expr)) { - fputs(" depends ", out); - expr_fprint(prop->visible.expr, out); - fputc('\n', out); - } - } - - if (menu->list) - menu = menu->list; - else if (menu->next) - menu = menu->next; - else while ((menu = menu->parent)) { - if (menu->prompt && menu->prompt->type == P_MENU) - fputs("\nendmenu\n", out); - if (menu->next) { - menu = menu->next; - break; - } - } - } -} - -#include "lex.zconf.c" -#include "util.c" -#include "confdata.c" -#include "expr.c" -#include "symbol.c" -#include "menu.c" diff --git a/package/cramfs/cramfs-01-devtable.patch b/package/cramfs/cramfs-01-devtable.patch deleted file mode 100644 index 884eb8c..0000000 --- a/package/cramfs/cramfs-01-devtable.patch +++ /dev/null @@ -1,1269 +0,0 @@ ---- cramfs-1.1.orig/cramfsck.c 2002-02-22 17:00:42.000000000 -0700 -+++ cramfs-1.1/cramfsck.c 2002-12-21 01:25:17.000000000 -0700 -@@ -51,10 +51,11 @@ - #include - #include - #define _LINUX_STRING_H_ --#include --#include -+#include "linux/cramfs_fs.h" - #include - -+#define BLKGETSIZE _IO(0x12,96) /* return device size /512 (long *arg) */ -+ - /* Exit codes used by fsck-type programs */ - #define FSCK_OK 0 /* No errors */ - #define FSCK_NONDESTRUCT 1 /* File system errors corrected */ -@@ -75,7 +76,7 @@ - static int opt_verbose = 0; /* 1 = verbose (-v), 2+ = very verbose (-vv) */ - #ifdef INCLUDE_FS_TESTS - static int opt_extract = 0; /* extract cramfs (-x) */ --static char *extract_dir = "root"; /* extraction directory (-x) */ -+static char *extract_dir = "/"; /* extraction directory (-x) */ - static uid_t euid; /* effective UID */ - - /* (cramfs_super + start) <= start_dir < end_dir <= start_data <= end_data */ -@@ -155,7 +156,7 @@ - } - - if (*length < sizeof(struct cramfs_super)) { -- die(FSCK_UNCORRECTED, 0, "file length too short"); -+ die(FSCK_UNCORRECTED, 0, "filesystem smaller than a cramfs superblock!"); - } - - /* find superblock */ -@@ -190,7 +191,8 @@ - die(FSCK_UNCORRECTED, 0, "zero file count"); - } - if (*length < super.size) { -- die(FSCK_UNCORRECTED, 0, "file length too short"); -+ die(FSCK_UNCORRECTED, 0, "file length too short, %lu is smaller than %lu", -+ *length, super.size); - } - else if (*length > super.size) { - fprintf(stderr, "warning: file extends past end of filesystem\n"); -@@ -267,11 +269,11 @@ - #ifdef INCLUDE_FS_TESTS - static void print_node(char type, struct cramfs_inode *i, char *name) - { -- char info[10]; -+ char info[11]; - - if (S_ISCHR(i->mode) || (S_ISBLK(i->mode))) { - /* major/minor numbers can be as high as 2^12 or 4096 */ -- snprintf(info, 10, "%4d,%4d", major(i->size), minor(i->size)); -+ snprintf(info, 11, "%4d,%4d", major(i->size), minor(i->size)); - } - else { - /* size be as high as 2^24 or 16777216 */ -@@ -445,8 +447,10 @@ - } - /* TODO: Do we need to check end_dir for empty case? */ - memcpy(newpath, path, pathlen); -- newpath[pathlen] = '/'; -- pathlen++; -+ if (pathlen > 1) { -+ newpath[pathlen] = '/'; -+ pathlen++; -+ } - if (opt_verbose) { - print_node('d', i, path); - } ---- cramfs-1.1.orig/device_table.txt 1969-12-31 17:00:00.000000000 -0700 -+++ cramfs-1.1/device_table.txt 2003-01-01 05:13:44.000000000 -0700 -@@ -0,0 +1,129 @@ -+# When building a target filesystem, it is desirable to not have to -+# become root and then run 'mknod' a thousand times. Using a device -+# table you can create device nodes and directories "on the fly". -+# -+# This is a sample device table file for use with mkcramfs. You can -+# do all sorts of interesting things with a device table file. For -+# example, if you want to adjust the permissions on a particular file -+# you can just add an entry like: -+# /sbin/foobar f 2755 0 0 - - - - - -+# and (assuming the file /sbin/foobar exists) it will be made setuid -+# root (regardless of what its permissions are on the host filesystem. -+# Furthermore, you can use a single table entry to create a many device -+# minors. For example, if I wanted to create /dev/hda and /dev/hda[0-15] -+# I could just use the following two table entries: -+# /dev/hda b 640 0 0 3 0 0 0 - -+# /dev/hda b 640 0 0 3 1 1 1 15 -+# -+# Device table entries take the form of: -+# -+# where name is the file name, type can be one of: -+# f A regular file -+# d Directory -+# c Character special device file -+# b Block special device file -+# p Fifo (named pipe) -+# uid is the user id for the target file, gid is the group id for the -+# target file. The rest of the entries (major, minor, etc) apply only -+# to device special files. -+ -+# Have fun -+# -Erik Andersen -+# -+ -+# -+/dev d 755 0 0 - - - - - -+/dev/mem c 640 0 0 1 1 0 0 - -+/dev/kmem c 640 0 0 1 2 0 0 - -+/dev/null c 640 0 0 1 3 0 0 - -+/dev/zero c 640 0 0 1 5 0 0 - -+/dev/random c 640 0 0 1 8 0 0 - -+/dev/urandom c 640 0 0 1 9 0 0 - -+/dev/tty c 666 0 0 5 0 0 0 - -+/dev/tty c 666 0 0 4 0 0 1 6 -+/dev/console c 640 0 0 5 1 0 0 - -+/dev/ram b 640 0 0 1 1 0 0 - -+/dev/ram b 640 0 0 1 0 0 1 4 -+/dev/loop b 640 0 0 7 0 0 1 2 -+/dev/ptmx c 666 0 0 5 2 0 0 - -+#/dev/ttyS c 640 0 0 4 64 0 1 4 -+#/dev/psaux c 640 0 0 10 1 0 0 - -+#/dev/rtc c 640 0 0 10 135 0 0 - -+ -+# Adjust permissions on some normal files -+#/etc/shadow f 600 0 0 - - - - - -+#/bin/tinylogin f 4755 0 0 - - - - - -+ -+# User-mode Linux stuff -+/dev/ubda b 640 0 0 98 0 0 0 - -+/dev/ubda b 640 0 0 98 1 1 1 15 -+ -+# IDE Devices -+/dev/hda b 640 0 0 3 0 0 0 - -+/dev/hda b 640 0 0 3 1 1 1 15 -+/dev/hdb b 640 0 0 3 64 0 0 - -+/dev/hdb b 640 0 0 3 65 1 1 15 -+#/dev/hdc b 640 0 0 22 0 0 0 - -+#/dev/hdc b 640 0 0 22 1 1 1 15 -+#/dev/hdd b 640 0 0 22 64 0 0 - -+#/dev/hdd b 640 0 0 22 65 1 1 15 -+#/dev/hde b 640 0 0 33 0 0 0 - -+#/dev/hde b 640 0 0 33 1 1 1 15 -+#/dev/hdf b 640 0 0 33 64 0 0 - -+#/dev/hdf b 640 0 0 33 65 1 1 15 -+#/dev/hdg b 640 0 0 34 0 0 0 - -+#/dev/hdg b 640 0 0 34 1 1 1 15 -+#/dev/hdh b 640 0 0 34 64 0 0 - -+#/dev/hdh b 640 0 0 34 65 1 1 15 -+ -+# SCSI Devices -+#/dev/sda b 640 0 0 8 0 0 0 - -+#/dev/sda b 640 0 0 8 1 1 1 15 -+#/dev/sdb b 640 0 0 8 16 0 0 - -+#/dev/sdb b 640 0 0 8 17 1 1 15 -+#/dev/sdc b 640 0 0 8 32 0 0 - -+#/dev/sdc b 640 0 0 8 33 1 1 15 -+#/dev/sdd b 640 0 0 8 48 0 0 - -+#/dev/sdd b 640 0 0 8 49 1 1 15 -+#/dev/sde b 640 0 0 8 64 0 0 - -+#/dev/sde b 640 0 0 8 65 1 1 15 -+#/dev/sdf b 640 0 0 8 80 0 0 - -+#/dev/sdf b 640 0 0 8 81 1 1 15 -+#/dev/sdg b 640 0 0 8 96 0 0 - -+#/dev/sdg b 640 0 0 8 97 1 1 15 -+#/dev/sdh b 640 0 0 8 112 0 0 - -+#/dev/sdh b 640 0 0 8 113 1 1 15 -+#/dev/sg c 640 0 0 21 0 0 1 15 -+#/dev/scd b 640 0 0 11 0 0 1 15 -+#/dev/st c 640 0 0 9 0 0 1 8 -+#/dev/nst c 640 0 0 9 128 0 1 8 -+#/dev/st c 640 0 0 9 32 1 1 4 -+#/dev/st c 640 0 0 9 64 1 1 4 -+#/dev/st c 640 0 0 9 96 1 1 4 -+ -+# Floppy disk devices -+#/dev/fd b 640 0 0 2 0 0 1 2 -+#/dev/fd0d360 b 640 0 0 2 4 0 0 - -+#/dev/fd1d360 b 640 0 0 2 5 0 0 - -+#/dev/fd0h1200 b 640 0 0 2 8 0 0 - -+#/dev/fd1h1200 b 640 0 0 2 9 0 0 - -+#/dev/fd0u1440 b 640 0 0 2 28 0 0 - -+#/dev/fd1u1440 b 640 0 0 2 29 0 0 - -+#/dev/fd0u2880 b 640 0 0 2 32 0 0 - -+#/dev/fd1u2880 b 640 0 0 2 33 0 0 - -+ -+# All the proprietary cdrom devices in the world -+#/dev/aztcd b 640 0 0 29 0 0 0 - -+#/dev/bpcd b 640 0 0 41 0 0 0 - -+#/dev/capi20 c 640 0 0 68 0 0 1 2 -+#/dev/cdu31a b 640 0 0 15 0 0 0 - -+#/dev/cdu535 b 640 0 0 24 0 0 0 - -+#/dev/cm206cd b 640 0 0 32 0 0 0 - -+#/dev/sjcd b 640 0 0 18 0 0 0 - -+#/dev/sonycd b 640 0 0 15 0 0 0 - -+#/dev/gscd b 640 0 0 16 0 0 0 - -+#/dev/sbpcd b 640 0 0 25 0 0 0 - -+#/dev/sbpcd b 640 0 0 25 0 0 1 4 -+#/dev/mcd b 640 0 0 23 0 0 0 - -+#/dev/optcd b 640 0 0 17 0 0 0 - -+ ---- cramfs-1.1.orig/mkcramfs.c 2002-02-20 01:03:32.000000000 -0700 -+++ cramfs-1.1/mkcramfs.c 2002-12-21 01:25:17.000000000 -0700 -@@ -1,3 +1,4 @@ -+/* vi: set sw=8 ts=8: */ - /* - * mkcramfs - make a cramfs file system - * -@@ -16,12 +17,21 @@ - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ * Added device table support (code taken from mkfs.jffs2.c, credit to -+ * Erik Andersen ) as well as an option to squash -+ * permissions. - Russ Dill September 2002 -+ * -+ * Reworked, cleaned up, and updated for cramfs-1.1, December 2002 -+ * - Erik Andersen -+ * - */ - - /* - * If you change the disk format of cramfs, please update fs/cramfs/README. - */ - -+#define _GNU_SOURCE - #include - #include - #include -@@ -33,8 +43,15 @@ - #include - #include - #include -+#include -+#include -+#include -+#include - #include - #include -+#ifdef DMALLOC -+#include -+#endif - - /* Exit codes used by mkfs-type programs */ - #define MKFS_OK 0 /* No errors */ -@@ -71,11 +88,17 @@ - + (1 << CRAMFS_SIZE_WIDTH) - 1 /* filesize */ \ - + (1 << CRAMFS_SIZE_WIDTH) * 4 / PAGE_CACHE_SIZE /* block pointers */ ) - -+ -+/* The kernel assumes PAGE_CACHE_SIZE as block size. */ -+#define PAGE_CACHE_SIZE (4096) -+ -+ - static const char *progname = "mkcramfs"; - static unsigned int blksize = PAGE_CACHE_SIZE; - static long total_blocks = 0, total_nodes = 1; /* pre-count the root node */ - static int image_length = 0; - -+ - /* - * If opt_holes is set, then mkcramfs can create explicit holes in the - * data, which saves 26 bytes per hole (which is a lot smaller a -@@ -91,10 +114,12 @@ - static int opt_holes = 0; - static int opt_pad = 0; - static int opt_verbose = 0; -+static int opt_squash = 0; - static char *opt_image = NULL; - static char *opt_name = NULL; - - static int warn_dev, warn_gid, warn_namelen, warn_skip, warn_size, warn_uid; -+static const char *const memory_exhausted = "memory exhausted"; - - /* In-core version of inode / directory entry. */ - struct entry { -@@ -123,7 +148,7 @@ - { - FILE *stream = status ? stderr : stdout; - -- fprintf(stream, "usage: %s [-h] [-e edition] [-i file] [-n name] dirname outfile\n" -+ fprintf(stream, "usage: %s [-h] [-e edition] [-i file] [-n name] [-D file] dirname outfile\n" - " -h print this help\n" - " -E make all warnings errors (non-zero exit status)\n" - " -e edition set edition number (part of fsid)\n" -@@ -133,39 +158,157 @@ - " -s sort directory entries (old option, ignored)\n" - " -v be more verbose\n" - " -z make explicit holes (requires >= 2.3.39)\n" -- " dirname root of the directory tree to be compressed\n" -+ " -D Use the named FILE as a device table file\n" -+ " -q squash permissions (make everything owned by root)\n" -+ " dirname root of the filesystem to be compressed\n" - " outfile output file\n", progname, PAD_SIZE); - - exit(status); - } - --static void die(int status, int syserr, const char *fmt, ...) -+static void verror_msg(const char *s, va_list p) -+{ -+ fflush(stdout); -+ fprintf(stderr, "mkcramfs: "); -+ vfprintf(stderr, s, p); -+} -+ -+static void vperror_msg(const char *s, va_list p) -+{ -+ int err = errno; -+ -+ if (s == 0) -+ s = ""; -+ verror_msg(s, p); -+ if (*s) -+ s = ": "; -+ fprintf(stderr, "%s%s\n", s, strerror(err)); -+} -+ -+static void perror_msg(const char *s, ...) -+{ -+ va_list p; -+ -+ va_start(p, s); -+ vperror_msg(s, p); -+ va_end(p); -+} -+ -+static void error_msg_and_die(const char *s, ...) -+{ -+ va_list p; -+ -+ va_start(p, s); -+ verror_msg(s, p); -+ va_end(p); -+ putc('\n', stderr); -+ exit(MKFS_ERROR); -+} -+ -+static void perror_msg_and_die(const char *s, ...) -+{ -+ va_list p; -+ -+ va_start(p, s); -+ vperror_msg(s, p); -+ va_end(p); -+ exit(MKFS_ERROR); -+} -+#ifndef DMALLOC -+extern char *xstrdup(const char *s) -+{ -+ char *t; -+ -+ if (s == NULL) -+ return NULL; -+ t = strdup(s); -+ if (t == NULL) -+ error_msg_and_die(memory_exhausted); -+ return t; -+} -+ -+extern void *xmalloc(size_t size) -+{ -+ void *ptr = malloc(size); -+ -+ if (ptr == NULL && size != 0) -+ error_msg_and_die(memory_exhausted); -+ return ptr; -+} -+ -+extern void *xcalloc(size_t nmemb, size_t size) -+{ -+ void *ptr = calloc(nmemb, size); -+ -+ if (ptr == NULL && nmemb != 0 && size != 0) -+ error_msg_and_die(memory_exhausted); -+ return ptr; -+} -+ -+extern void *xrealloc(void *ptr, size_t size) -+{ -+ ptr = realloc(ptr, size); -+ if (ptr == NULL && size != 0) -+ error_msg_and_die(memory_exhausted); -+ return ptr; -+} -+#endif -+ -+static FILE *xfopen(const char *path, const char *mode) - { -- va_list arg_ptr; -- int save = errno; -+ FILE *fp; -+ -+ if ((fp = fopen(path, mode)) == NULL) -+ perror_msg_and_die("%s", path); -+ return fp; -+} - -- fflush(0); -- va_start(arg_ptr, fmt); -- fprintf(stderr, "%s: ", progname); -- vfprintf(stderr, fmt, arg_ptr); -- if (syserr) { -- fprintf(stderr, ": %s", strerror(save)); -+extern int xopen(const char *pathname, int flags, mode_t mode) -+{ -+ int ret; -+ -+ if (flags & O_CREAT) -+ ret = open(pathname, flags, mode); -+ else -+ ret = open(pathname, flags); -+ if (ret == -1) { -+ perror_msg_and_die("%s", pathname); - } -- fprintf(stderr, "\n"); -- va_end(arg_ptr); -- exit(status); -+ return ret; - } - -+extern char *xreadlink(const char *path) -+{ -+ static const int GROWBY = 80; /* how large we will grow strings by */ -+ -+ char *buf = NULL; -+ int bufsize = 0, readsize = 0; -+ -+ do { -+ buf = xrealloc(buf, bufsize += GROWBY); -+ readsize = readlink(path, buf, bufsize); /* 1st try */ -+ if (readsize == -1) { -+ perror_msg("%s:%s", progname, path); -+ return NULL; -+ } -+ } -+ while (bufsize < readsize + 1); -+ -+ buf[readsize] = '\0'; -+ -+ return buf; -+} -+ - static void map_entry(struct entry *entry) - { - if (entry->path) { - entry->fd = open(entry->path, O_RDONLY); - if (entry->fd < 0) { -- die(MKFS_ERROR, 1, "open failed: %s", entry->path); -+ error_msg_and_die("open failed: %s", entry->path); - } - entry->uncompressed = mmap(NULL, entry->size, PROT_READ, MAP_PRIVATE, entry->fd, 0); - if (entry->uncompressed == MAP_FAILED) { -- die(MKFS_ERROR, 1, "mmap failed: %s", entry->path); -+ error_msg_and_die("mmap failed: %s", entry->path); - } - } - } -@@ -174,8 +317,9 @@ - { - if (entry->path) { - if (munmap(entry->uncompressed, entry->size) < 0) { -- die(MKFS_ERROR, 1, "munmap failed: %s", entry->path); -+ error_msg_and_die("munmap failed: %s", entry->path); - } -+ entry->uncompressed=NULL; - close(entry->fd); - } - } -@@ -204,7 +348,8 @@ - find_identical_file(orig->next, newfile)); - } - --static void eliminate_doubles(struct entry *root, struct entry *orig) { -+static void eliminate_doubles(struct entry *root, struct entry *orig) -+{ - if (orig) { - if (orig->size && (orig->path || orig->uncompressed)) - find_identical_file(root, orig); -@@ -232,10 +377,7 @@ - - /* Set up the path. */ - /* TODO: Reuse the parent's buffer to save memcpy'ing and duplication. */ -- path = malloc(len + 1 + MAX_INPUT_NAMELEN + 1); -- if (!path) { -- die(MKFS_ERROR, 1, "malloc failed"); -- } -+ path = xmalloc(len + 1 + MAX_INPUT_NAMELEN + 1); - memcpy(path, name, len); - endpath = path + len; - *endpath = '/'; -@@ -245,7 +387,7 @@ - dircount = scandir(name, &dirlist, 0, cramsort); - - if (dircount < 0) { -- die(MKFS_ERROR, 1, "scandir failed: %s", name); -+ error_msg_and_die("scandir failed: %s", name); - } - - /* process directory */ -@@ -269,25 +411,20 @@ - } - namelen = strlen(dirent->d_name); - if (namelen > MAX_INPUT_NAMELEN) { -- die(MKFS_ERROR, 0, -- "very long (%u bytes) filename found: %s\n" -- "please increase MAX_INPUT_NAMELEN in mkcramfs.c and recompile", -+ error_msg_and_die( -+ "Very long (%u bytes) filename `%s' found.\n" -+ " Please increase MAX_INPUT_NAMELEN in mkcramfs.c and recompile. Exiting.\n", - namelen, dirent->d_name); - } - memcpy(endpath, dirent->d_name, namelen + 1); - - if (lstat(path, &st) < 0) { -+ perror(endpath); - warn_skip = 1; - continue; - } -- entry = calloc(1, sizeof(struct entry)); -- if (!entry) { -- die(MKFS_ERROR, 1, "calloc failed"); -- } -- entry->name = strdup(dirent->d_name); -- if (!entry->name) { -- die(MKFS_ERROR, 1, "strdup failed"); -- } -+ entry = xcalloc(1, sizeof(struct entry)); -+ entry->name = xstrdup(dirent->d_name); - /* truncate multi-byte UTF-8 filenames on character boundary */ - if (namelen > CRAMFS_MAXPATHLEN) { - namelen = CRAMFS_MAXPATHLEN; -@@ -297,24 +434,25 @@ - namelen--; - /* are we reasonably certain it was UTF-8 ? */ - if (entry->name[namelen] < 0x80 || !namelen) { -- die(MKFS_ERROR, 0, "cannot truncate filenames not encoded in UTF-8"); -+ error_msg_and_die("cannot truncate filenames not encoded in UTF-8"); - } - } - entry->name[namelen] = '\0'; - } - entry->mode = st.st_mode; - entry->size = st.st_size; -- entry->uid = st.st_uid; -+ entry->uid = opt_squash ? 0 : st.st_uid; - if (entry->uid >= 1 << CRAMFS_UID_WIDTH) - warn_uid = 1; -- entry->gid = st.st_gid; -- if (entry->gid >= 1 << CRAMFS_GID_WIDTH) -+ entry->gid = opt_squash ? 0 : st.st_gid; -+ if (entry->gid >= 1 << CRAMFS_GID_WIDTH) { - /* TODO: We ought to replace with a default - gid instead of truncating; otherwise there - are security problems. Maybe mode should - be &= ~070. Same goes for uid once Linux - supports >16-bit uids. */ - warn_gid = 1; -+ } - size = sizeof(struct cramfs_inode) + ((namelen + 3) & ~3); - *fslen_ub += size; - if (S_ISDIR(st.st_mode)) { -@@ -325,21 +463,15 @@ - warn_skip = 1; - continue; - } -- entry->path = strdup(path); -- if (!entry->path) { -- die(MKFS_ERROR, 1, "strdup failed"); -- } -+ entry->path = xstrdup(path); - if ((entry->size >= 1 << CRAMFS_SIZE_WIDTH)) { - warn_size = 1; - entry->size = (1 << CRAMFS_SIZE_WIDTH) - 1; - } - } - } else if (S_ISLNK(st.st_mode)) { -- entry->uncompressed = malloc(entry->size); -+ entry->uncompressed = xreadlink(path); - if (!entry->uncompressed) { -- die(MKFS_ERROR, 1, "malloc failed"); -- } -- if (readlink(path, entry->uncompressed, entry->size) < 0) { - warn_skip = 1; - continue; - } -@@ -351,7 +483,7 @@ - if (entry->size & -(1<name); -+ error_msg_and_die("bogus file type: %s", entry->name); - } - - if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) { -@@ -378,7 +510,9 @@ - struct cramfs_super *super = (struct cramfs_super *) base; - unsigned int offset = sizeof(struct cramfs_super) + image_length; - -- offset += opt_pad; /* 0 if no padding */ -+ if (opt_pad) { -+ offset += opt_pad; /* 0 if no padding */ -+ } - - super->magic = CRAMFS_MAGIC; - super->flags = CRAMFS_FLAG_FSID_VERSION_2 | CRAMFS_FLAG_SORTED_DIRS; -@@ -414,10 +548,10 @@ - struct cramfs_inode *inode = (struct cramfs_inode *) (base + entry->dir_offset); - - if ((offset & 3) != 0) { -- die(MKFS_ERROR, 0, "illegal offset of %lu bytes", offset); -+ error_msg_and_die("illegal offset of %lu bytes", offset); - } - if (offset >= (1 << (2 + CRAMFS_OFFSET_WIDTH))) { -- die(MKFS_ERROR, 0, "filesystem too big"); -+ error_msg_and_die("filesystem too big"); - } - inode->offset = (offset >> 2); - } -@@ -429,7 +563,7 @@ - */ - static void print_node(struct entry *e) - { -- char info[10]; -+ char info[12]; - char type = '?'; - - if (S_ISREG(e->mode)) type = 'f'; -@@ -442,11 +576,11 @@ - - if (S_ISCHR(e->mode) || (S_ISBLK(e->mode))) { - /* major/minor numbers can be as high as 2^12 or 4096 */ -- snprintf(info, 10, "%4d,%4d", major(e->size), minor(e->size)); -+ snprintf(info, 11, "%4d,%4d", major(e->size), minor(e->size)); - } - else { - /* size be as high as 2^24 or 16777216 */ -- snprintf(info, 10, "%9d", e->size); -+ snprintf(info, 11, "%9d", e->size); - } - - printf("%c %04o %s %5d:%-3d %s\n", -@@ -462,17 +596,9 @@ - { - int stack_entries = 0; - int stack_size = 64; -- struct entry **entry_stack; -- -- entry_stack = malloc(stack_size * sizeof(struct entry *)); -- if (!entry_stack) { -- die(MKFS_ERROR, 1, "malloc failed"); -- } -- -- if (opt_verbose) { -- printf("root:\n"); -- } -+ struct entry **entry_stack = NULL; - -+ entry_stack = xmalloc(stack_size * sizeof(struct entry *)); - for (;;) { - int dir_start = stack_entries; - while (entry) { -@@ -506,10 +632,7 @@ - if (entry->child) { - if (stack_entries >= stack_size) { - stack_size *= 2; -- entry_stack = realloc(entry_stack, stack_size * sizeof(struct entry *)); -- if (!entry_stack) { -- die(MKFS_ERROR, 1, "realloc failed"); -- } -+ entry_stack = xrealloc(entry_stack, stack_size * sizeof(struct entry *)); - } - entry_stack[stack_entries] = entry; - stack_entries++; -@@ -543,7 +666,7 @@ - - set_data_offset(entry, base, offset); - if (opt_verbose) { -- printf("%s:\n", entry->name); -+ printf("'%s':\n", entry->name); - } - entry = entry->child; - } -@@ -553,16 +676,21 @@ - - static int is_zero(char const *begin, unsigned len) - { -- /* Returns non-zero iff the first LEN bytes from BEGIN are all NULs. */ -- return (len-- == 0 || -- (begin[0] == '\0' && -- (len-- == 0 || -- (begin[1] == '\0' && -- (len-- == 0 || -- (begin[2] == '\0' && -- (len-- == 0 || -- (begin[3] == '\0' && -- memcmp(begin, begin + 4, len) == 0)))))))); -+ if (opt_holes) -+ /* Returns non-zero iff the first LEN bytes from BEGIN are -+ all NULs. */ -+ return (len-- == 0 || -+ (begin[0] == '\0' && -+ (len-- == 0 || -+ (begin[1] == '\0' && -+ (len-- == 0 || -+ (begin[2] == '\0' && -+ (len-- == 0 || -+ (begin[3] == '\0' && -+ memcmp(begin, begin + 4, len) == 0)))))))); -+ else -+ /* Never create holes. */ -+ return 0; - } - - /* -@@ -575,37 +703,34 @@ - * Note that size > 0, as a zero-sized file wouldn't ever - * have gotten here in the first place. - */ --static unsigned int do_compress(char *base, unsigned int offset, char const *name, char *uncompressed, unsigned int size) -+static unsigned int do_compress(char *base, unsigned int offset, struct entry *entry) - { -+ unsigned int size = entry->size; - unsigned long original_size = size; - unsigned long original_offset = offset; - unsigned long new_size; - unsigned long blocks = (size - 1) / blksize + 1; - unsigned long curr = offset + 4 * blocks; - int change; -+ char *uncompressed = entry->uncompressed; - -- total_blocks += blocks; -+ total_blocks += blocks; - - do { - unsigned long len = 2 * blksize; - unsigned int input = size; -- int err; -- - if (input > blksize) - input = blksize; - size -= input; -- if (!(opt_holes && is_zero (uncompressed, input))) { -- err = compress2(base + curr, &len, uncompressed, input, Z_BEST_COMPRESSION); -- if (err != Z_OK) { -- die(MKFS_ERROR, 0, "compression error: %s", zError(err)); -- } -+ if (!is_zero (uncompressed, input)) { -+ compress(base + curr, &len, uncompressed, input); - curr += len; - } - uncompressed += input; - - if (len > blksize*2) { - /* (I don't think this can happen with zlib.) */ -- die(MKFS_ERROR, 0, "AIEEE: block \"compressed\" to > 2*blocklength (%ld)", len); -+ error_msg_and_die("AIEEE: block \"compressed\" to > 2*blocklength (%ld)\n", len); - } - - *(u32 *) (base + offset) = curr; -@@ -618,10 +743,12 @@ - st_blocks * 512. But if you say that then perhaps - administrative data should also be included in both. */ - change = new_size - original_size; -- if (opt_verbose > 1) { -- printf("%6.2f%% (%+d bytes)\t%s\n", -- (change * 100) / (double) original_size, change, name); -+#if 0 -+ if (opt_verbose) { -+ printf("%6.2f%% (%+d bytes)\t%s\n", -+ (change * 100) / (double) original_size, change, entry->name); - } -+#endif - - return curr; - } -@@ -644,7 +771,7 @@ - set_data_offset(entry, base, offset); - entry->offset = offset; - map_entry(entry); -- offset = do_compress(base, offset, entry->name, entry->uncompressed, entry->size); -+ offset = do_compress(base, offset, entry); - unmap_entry(entry); - } - } -@@ -660,13 +787,10 @@ - int fd; - char *buf; - -- fd = open(file, O_RDONLY); -- if (fd < 0) { -- die(MKFS_ERROR, 1, "open failed: %s", file); -- } -+ fd = xopen(file, O_RDONLY, 0); - buf = mmap(NULL, image_length, PROT_READ, MAP_PRIVATE, fd, 0); - if (buf == MAP_FAILED) { -- die(MKFS_ERROR, 1, "mmap failed"); -+ error_msg_and_die("mmap failed"); - } - memcpy(base + offset, buf, image_length); - munmap(buf, image_length); -@@ -679,6 +803,328 @@ - return (offset + image_length); - } - -+static struct entry *find_filesystem_entry(struct entry *dir, char *name, mode_t type) -+{ -+ struct entry *e = dir; -+ -+ if (S_ISDIR(dir->mode)) { -+ e = dir->child; -+ } -+ while (e) { -+ /* Only bother to do the expensive strcmp on matching file types */ -+ if (type == (e->mode & S_IFMT) && e->name) { -+ if (S_ISDIR(e->mode)) { -+ int len = strlen(e->name); -+ -+ /* Check if we are a parent of the correct path */ -+ if (strncmp(e->name, name, len) == 0) { -+ /* Is this an _exact_ match? */ -+ if (strcmp(name, e->name) == 0) { -+ return (e); -+ } -+ /* Looks like we found a parent of the correct path */ -+ if (name[len] == '/') { -+ if (e->child) { -+ return (find_filesystem_entry (e, name + len + 1, type)); -+ } else { -+ return NULL; -+ } -+ } -+ } -+ } else { -+ if (strcmp(name, e->name) == 0) { -+ return (e); -+ } -+ } -+ } -+ e = e->next; -+ } -+ return (NULL); -+} -+ -+void modify_entry(char *full_path, unsigned long uid, unsigned long gid, -+ unsigned long mode, unsigned long rdev, struct entry *root, loff_t *fslen_ub) -+{ -+ char *name, *path, *full; -+ struct entry *curr, *parent, *entry, *prev; -+ -+ full = xstrdup(full_path); -+ path = xstrdup(dirname(full)); -+ name = full_path + strlen(path) + 1; -+ free(full); -+ if (strcmp(path, "/") == 0) { -+ parent = root; -+ name = full_path + 1; -+ } else { -+ if (!(parent = find_filesystem_entry(root, path+1, S_IFDIR))) -+ error_msg_and_die("%s/%s: could not find parent\n", path, name); -+ } -+ if ((entry = find_filesystem_entry(parent, name, (mode & S_IFMT)))) { -+ /* its there, just modify permissions */ -+ entry->mode = mode; -+ entry->uid = uid; -+ entry->gid = gid; -+ } else { /* make a new entry */ -+ -+ /* code partially replicated from parse_directory() */ -+ size_t namelen; -+ if (S_ISREG(mode)) { -+ error_msg_and_die("%s: regular file from device_table file must exist on disk!", full_path); -+ } -+ -+ namelen = strlen(name); -+ if (namelen > MAX_INPUT_NAMELEN) { -+ error_msg_and_die( -+ "Very long (%u bytes) filename `%s' found.\n" -+ " Please increase MAX_INPUT_NAMELEN in mkcramfs.c and recompile. Exiting.\n", -+ namelen, name); -+ } -+ entry = xcalloc(1, sizeof(struct entry)); -+ entry->name = xstrdup(name); -+ /* truncate multi-byte UTF-8 filenames on character boundary */ -+ if (namelen > CRAMFS_MAXPATHLEN) { -+ namelen = CRAMFS_MAXPATHLEN; -+ warn_namelen = 1; -+ /* the first lost byte must not be a trail byte */ -+ while ((entry->name[namelen] & 0xc0) == 0x80) { -+ namelen--; -+ /* are we reasonably certain it was UTF-8 ? */ -+ if (entry->name[namelen] < 0x80 || !namelen) { -+ error_msg_and_die("cannot truncate filenames not encoded in UTF-8"); -+ } -+ } -+ entry->name[namelen] = '\0'; -+ } -+ entry->mode = mode; -+ entry->uid = uid; -+ entry->gid = gid; -+ entry->size = 0; -+ if (S_ISBLK(mode) || S_ISCHR(mode)) { -+ entry->size = rdev; -+ if (entry->size & -(1<size += sizeof(struct cramfs_inode) + ((namelen + 3) & ~3); -+ -+ /* alright, time to link us in */ -+ curr = parent->child; -+ prev = NULL; -+ while (curr && strcmp(name, curr->name) > 0) { -+ prev = curr; -+ curr = curr->next; -+ } -+ if (!prev) parent->child = entry; -+ else prev->next = entry; -+ entry->next = curr; -+ entry->child = NULL; -+ } -+ if (entry->uid >= 1 << CRAMFS_UID_WIDTH) -+ warn_uid = 1; -+ if (entry->gid >= 1 << CRAMFS_GID_WIDTH) { -+ /* TODO: We ought to replace with a default -+ gid instead of truncating; otherwise there -+ are security problems. Maybe mode should -+ be &= ~070. Same goes for uid once Linux -+ supports >16-bit uids. */ -+ warn_gid = 1; -+ } -+ free(path); -+} -+ -+/* the GNU C library has a wonderful scanf("%as", string) which will -+ allocate the string with the right size, good to avoid buffer overruns. -+ the following macros use it if available or use a hacky workaround... -+ */ -+ -+#ifdef __GNUC__ -+#define SCANF_PREFIX "a" -+#define SCANF_STRING(s) (&s) -+#define GETCWD_SIZE 0 -+#else -+#define SCANF_PREFIX "511" -+#define SCANF_STRING(s) (s = xmalloc(512)) -+#define GETCWD_SIZE -1 -+inline int snprintf(char *str, size_t n, const char *fmt, ...) -+{ -+ int ret; -+ va_list ap; -+ -+ va_start(ap, fmt); -+ ret = vsprintf(str, fmt, ap); -+ va_end(ap); -+ return ret; -+} -+#endif -+ -+/* device table entries take the form of: -+ -+ /dev/mem c 640 0 0 1 1 0 0 - -+ -+ type can be one of: -+ f A regular file -+ d Directory -+ c Character special device file -+ b Block special device file -+ p Fifo (named pipe) -+ -+ I don't bother with symlinks (permissions are irrelevant), hard -+ links (special cases of regular files), or sockets (why bother). -+ -+ Regular files must exist in the target root directory. If a char, -+ block, fifo, or directory does not exist, it will be created. -+*/ -+ -+static int interpret_table_entry(char *line, struct entry *root, loff_t *fslen_ub) -+{ -+ char type, *name = NULL; -+ unsigned long mode = 0755, uid = 0, gid = 0, major = 0, minor = 0; -+ unsigned long start = 0, increment = 1, count = 0; -+ -+ if (sscanf (line, "%" SCANF_PREFIX "s %c %lo %lu %lu %lu %lu %lu %lu %lu", -+ SCANF_STRING(name), &type, &mode, &uid, &gid, &major, &minor, -+ &start, &increment, &count) < 0) -+ { -+ return 1; -+ } -+ -+ if (!strcmp(name, "/")) { -+ error_msg_and_die("Device table entries require absolute paths"); -+ } -+ -+ switch (type) { -+ case 'd': -+ mode |= S_IFDIR; -+ modify_entry(name, uid, gid, mode, 0, root, fslen_ub); -+ break; -+ case 'f': -+ mode |= S_IFREG; -+ modify_entry(name, uid, gid, mode, 0, root, fslen_ub); -+ break; -+ case 'p': -+ mode |= S_IFIFO; -+ modify_entry(name, uid, gid, mode, 0, root, fslen_ub); -+ break; -+ case 'c': -+ case 'b': -+ mode |= (type == 'c') ? S_IFCHR : S_IFBLK; -+ if (count > 0) { -+ char *buf; -+ unsigned long i; -+ dev_t rdev; -+ -+ for (i = start; i < count; i++) { -+ asprintf(&buf, "%s%lu", name, i); -+ rdev = makedev(major, minor + (i * increment - start)); -+ modify_entry(buf, uid, gid, mode, rdev, root, fslen_ub); -+ free(buf); -+ } -+ } else { -+ dev_t rdev = makedev(major, minor); -+ modify_entry(name, uid, gid, mode, rdev, root, fslen_ub); -+ } -+ break; -+ default: -+ error_msg_and_die("Unsupported file type"); -+ } -+ free(name); -+ return 0; -+} -+ -+static int parse_device_table(FILE *file, struct entry *root, loff_t *fslen_ub) -+{ -+ char *line; -+ int status = 0; -+ size_t length = 0; -+ -+ /* Turn off squash, since we must ensure that values -+ * entered via the device table are not squashed */ -+ opt_squash = 0; -+ -+ /* Looks ok so far. The general plan now is to read in one -+ * line at a time, check for leading comment delimiters ('#'), -+ * then try and parse the line as a device table. If we fail -+ * to parse things, try and help the poor fool to fix their -+ * device table with a useful error msg... */ -+ line = NULL; -+ while (getline(&line, &length, file) != -1) { -+ /* First trim off any whitespace */ -+ int len = strlen(line); -+ -+ /* trim trailing whitespace */ -+ while (len > 0 && isspace(line[len - 1])) -+ line[--len] = '\0'; -+ /* trim leading whitespace */ -+ memmove(line, &line[strspn(line, " \n\r\t\v")], len); -+ -+ /* How long are we after trimming? */ -+ len = strlen(line); -+ -+ /* If this is NOT a comment line, try to interpret it */ -+ if (len && *line != '#') { -+ if (interpret_table_entry(line, root, fslen_ub)) -+ status = 1; -+ } -+ -+ free(line); -+ line = NULL; -+ } -+ free(line); -+ fclose(file); -+ -+ return status; -+} -+ -+void traverse(struct entry *entry, int depth) -+{ -+ struct entry *curr = entry; -+ int i; -+ -+ while (curr) { -+ for (i = 0; i < depth; i++) putchar(' '); -+ printf("%s: size=%d mode=%d same=%p\n", -+ (curr->name)? (char*)curr->name : "/", -+ curr->size, curr->mode, curr->same); -+ if (curr->child) traverse(curr->child, depth + 4); -+ curr = curr->next; -+ } -+} -+ -+static void free_filesystem_entry(struct entry *dir) -+{ -+ struct entry *e = dir, *last; -+ -+ if (S_ISDIR(dir->mode)) { -+ e = dir->child; -+ } -+ while (e) { -+ if (e->name) -+ free(e->name); -+ if (e->path) -+ free(e->path); -+ if (e->uncompressed) -+ free(e->uncompressed); -+ last = e; -+ if (e->child) { -+ free_filesystem_entry(e); -+ } -+ e = e->next; -+ free(last); -+ } -+} -+ -+ -+/* -+ * Usage: -+ * -+ * mkcramfs directory-name outfile -+ * -+ * where "directory-name" is simply the root of the directory -+ * tree that we want to generate a compressed filesystem out -+ * of. -+ */ - int main(int argc, char **argv) - { - struct stat st; /* used twice... */ -@@ -692,6 +1138,7 @@ - u32 crc; - int c; /* for getopt */ - char *ep; /* for strtoul */ -+ FILE *devtable = NULL; - - total_blocks = 0; - -@@ -699,7 +1146,7 @@ - progname = argv[0]; - - /* command line options */ -- while ((c = getopt(argc, argv, "hEe:i:n:psvz")) != EOF) { -+ while ((c = getopt(argc, argv, "hEe:i:n:psvzD:q")) != EOF) { - switch (c) { - case 'h': - usage(MKFS_OK); -@@ -715,7 +1162,7 @@ - case 'i': - opt_image = optarg; - if (lstat(opt_image, &st) < 0) { -- die(MKFS_ERROR, 1, "lstat failed: %s", opt_image); -+ error_msg_and_die("lstat failed: %s", opt_image); - } - image_length = st.st_size; /* may be padded later */ - fslen_ub += (image_length + 3); /* 3 is for padding */ -@@ -736,6 +1183,16 @@ - case 'z': - opt_holes = 1; - break; -+ case 'q': -+ opt_squash = 1; -+ break; -+ case 'D': -+ devtable = xfopen(optarg, "r"); -+ if (fstat(fileno(devtable), &st) < 0) -+ perror_msg_and_die(optarg); -+ if (st.st_size < 10) -+ error_msg_and_die("%s: not a proper device table file\n", optarg); -+ break; - } - } - -@@ -745,25 +1202,23 @@ - outfile = argv[optind + 1]; - - if (stat(dirname, &st) < 0) { -- die(MKFS_USAGE, 1, "stat failed: %s", dirname); -- } -- fd = open(outfile, O_WRONLY | O_CREAT | O_TRUNC, 0666); -- if (fd < 0) { -- die(MKFS_USAGE, 1, "open failed: %s", outfile); -+ error_msg_and_die("stat failed: %s", dirname); - } -+ fd = xopen(outfile, O_WRONLY | O_CREAT | O_TRUNC, 0666); - -- root_entry = calloc(1, sizeof(struct entry)); -- if (!root_entry) { -- die(MKFS_ERROR, 1, "calloc failed"); -- } -+ root_entry = xcalloc(1, sizeof(struct entry)); - root_entry->mode = st.st_mode; - root_entry->uid = st.st_uid; - root_entry->gid = st.st_gid; - - root_entry->size = parse_directory(root_entry, dirname, &root_entry->child, &fslen_ub); - -+ if (devtable) { -+ parse_device_table(devtable, root_entry, &fslen_ub); -+ } -+ - /* always allocate a multiple of blksize bytes because that's -- what we're going to write later on */ -+ what we're going to write later on */ - fslen_ub = ((fslen_ub - 1) | (blksize - 1)) + 1; - - if (fslen_ub > MAXFSLEN) { -@@ -790,7 +1245,7 @@ - rom_image = mmap(NULL, fslen_ub?fslen_ub:1, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - - if (rom_image == MAP_FAILED) { -- die(MKFS_ERROR, 1, "mmap failed"); -+ error_msg_and_die("mmap failed"); - } - - /* Skip the first opt_pad bytes for boot loader code */ -@@ -807,6 +1262,7 @@ - } - - offset = write_directory_structure(root_entry->child, rom_image, offset); -+ if (opt_verbose) - printf("Directory data: %d bytes\n", offset); - - offset = write_data(root_entry, rom_image, offset); -@@ -814,30 +1270,38 @@ - /* We always write a multiple of blksize bytes, so that - losetup works. */ - offset = ((offset - 1) | (blksize - 1)) + 1; -+ if (opt_verbose) - printf("Everything: %d kilobytes\n", offset >> 10); - - /* Write the superblock now that we can fill in all of the fields. */ - write_superblock(root_entry, rom_image+opt_pad, offset); -+ if (opt_verbose) - printf("Super block: %d bytes\n", sizeof(struct cramfs_super)); - - /* Put the checksum in. */ - crc = crc32(0L, Z_NULL, 0); - crc = crc32(crc, (rom_image+opt_pad), (offset-opt_pad)); - ((struct cramfs_super *) (rom_image+opt_pad))->fsid.crc = crc; -+ if (opt_verbose) - printf("CRC: %x\n", crc); - - /* Check to make sure we allocated enough space. */ - if (fslen_ub < offset) { -- die(MKFS_ERROR, 0, "not enough space allocated for ROM image (%Ld allocated, %d used)", fslen_ub, offset); -+ error_msg_and_die("not enough space allocated for ROM " -+ "image (%Ld allocated, %d used)", fslen_ub, offset); - } - - written = write(fd, rom_image, offset); - if (written < 0) { -- die(MKFS_ERROR, 1, "write failed"); -+ error_msg_and_die("write failed"); - } - if (offset != written) { -- die(MKFS_ERROR, 0, "ROM image write failed (wrote %d of %d bytes)", written, offset); -+ error_msg_and_die("ROM image write failed (wrote %d of %d bytes)", written, offset); - } -+ -+ /* Free up memory */ -+ free_filesystem_entry(root_entry); -+ free(root_entry); - - /* (These warnings used to come at the start, but they scroll off the - screen too quickly.) */ diff --git a/package/cramfs/cramfs-02-endian.patch b/package/cramfs/cramfs-02-endian.patch deleted file mode 100644 index 0da55bf..0000000 --- a/package/cramfs/cramfs-02-endian.patch +++ /dev/null @@ -1,284 +0,0 @@ ---- cramfs-1.1/mkcramfs.c.orig 2005-04-13 05:55:57.000000000 -0600 -+++ cramfs-1.1/mkcramfs.c 2005-04-13 16:19:57.000000000 -0600 -@@ -117,6 +117,7 @@ - static int opt_squash = 0; - static char *opt_image = NULL; - static char *opt_name = NULL; -+static int swap_endian = 0; - - static int warn_dev, warn_gid, warn_namelen, warn_skip, warn_size, warn_uid; - static const char *const memory_exhausted = "memory exhausted"; -@@ -155,6 +156,8 @@ - " -i file insert a file image into the filesystem (requires >= 2.4.0)\n" - " -n name set name of cramfs filesystem\n" - " -p pad by %d bytes for boot code\n" -+ " -l litte endian filesystem\n" -+ " -b big endian filesystem\n" - " -s sort directory entries (old option, ignored)\n" - " -v be more verbose\n" - " -z make explicit holes (requires >= 2.3.39)\n" -@@ -504,6 +506,50 @@ - return totalsize; - } - -+/* routines to swap endianness/bitfields in inode/superblock block data */ -+static void fix_inode(struct cramfs_inode *inode) -+{ -+#define wswap(x) (((x)>>24) | (((x)>>8)&0xff00) | (((x)&0xff00)<<8) | (((x)&0xff)<<24)) -+ /* attempt #2 */ -+ inode->mode = (inode->mode >> 8) | ((inode->mode&0xff)<<8); -+ inode->uid = (inode->uid >> 8) | ((inode->uid&0xff)<<8); -+ inode->size = (inode->size >> 16) | (inode->size&0xff00) | -+ ((inode->size&0xff)<<16); -+ ((u32*)inode)[2] = wswap(inode->offset | (inode->namelen<<26)); -+} -+ -+static void fix_offset(struct cramfs_inode *inode, u32 offset) -+{ -+ u32 tmp = wswap(((u32*)inode)[2]); -+ ((u32*)inode)[2] = wswap((offset >> 2) | (tmp&0xfc000000)); -+} -+ -+static void fix_block_pointer(u32 *p) -+{ -+ *p = wswap(*p); -+} -+ -+static void fix_super(struct cramfs_super *super) -+{ -+ u32 *p = (u32*)super; -+ -+ /* fix superblock fields */ -+ p[0] = wswap(p[0]); /* magic */ -+ p[1] = wswap(p[1]); /* size */ -+ p[2] = wswap(p[2]); /* flags */ -+ p[3] = wswap(p[3]); /* future */ -+ -+ /* fix filesystem info fields */ -+ p = (u32*)&super->fsid; -+ p[0] = wswap(p[0]); /* crc */ -+ p[1] = wswap(p[1]); /* edition */ -+ p[2] = wswap(p[2]); /* blocks */ -+ p[3] = wswap(p[3]); /* files */ -+ -+ fix_inode(&super->root); -+#undef wswap -+} -+ - /* Returns sizeof(struct cramfs_super), which includes the root inode. */ - static unsigned int write_superblock(struct entry *root, char *base, int size) - { -@@ -539,6 +585,7 @@ - super->root.gid = root->gid; - super->root.size = root->size; - super->root.offset = offset >> 2; -+ if (swap_endian) fix_super(super); - - return offset; - } -@@ -553,7 +600,10 @@ - if (offset >= (1 << (2 + CRAMFS_OFFSET_WIDTH))) { - error_msg_and_die("filesystem too big"); - } -- inode->offset = (offset >> 2); -+ if (swap_endian) -+ fix_offset(inode, offset); -+ else -+ inode->offset = (offset >> 2); - } - - /* -@@ -638,6 +688,7 @@ - stack_entries++; - } - entry = entry->next; -+ if (swap_endian) fix_inode(inode); - } - - /* -@@ -734,6 +785,7 @@ - } - - *(u32 *) (base + offset) = curr; -+ if (swap_endian) fix_block_pointer((u32*)(base + offset)); - offset += 4; - } while (size); - -@@ -1146,7 +1198,7 @@ - progname = argv[0]; - - /* command line options */ -- while ((c = getopt(argc, argv, "hEe:i:n:psvzD:q")) != EOF) { -+ while ((c = getopt(argc, argv, "hEe:i:n:psvzD:qlb")) != EOF) { - switch (c) { - case 'h': - usage(MKFS_OK); -@@ -1174,6 +1227,18 @@ - opt_pad = PAD_SIZE; - fslen_ub += PAD_SIZE; - break; -+ case 'b': -+#if __BYTE_ORDER == __LITTLE_ENDIAN -+ swap_endian = 1; -+ printf("Swapping filesystem endian-ness\n"); -+#endif -+ break; -+ case 'l': -+#if __BYTE_ORDER == __BIG_ENDIAN -+ swap_endian = 1; -+ printf("Swapping filesystem endian-ness\n"); -+#endif -+ break; - case 's': - /* old option, ignored */ - break; ---- cramfs-1.1/cramfsck.c.orig 2005-04-25 11:50:31.000000000 -0700 -+++ cramfs-1.1/cramfsck.c 2005-04-25 16:53:25.000000000 -0700 -@@ -30,6 +30,7 @@ - * 2000/07/15: Daniel Quinlan (initial support for block devices) - * 2002/01/10: Daniel Quinlan (additional checks, test more return codes, - * use read if mmap fails, standardize messages) -+ * 2004/09/01: Alfonso Acosta (Add swapping support) - */ - - /* compile-time options */ -@@ -51,6 +52,7 @@ - #include - #include - #define _LINUX_STRING_H_ -+#include - #include "linux/cramfs_fs.h" - #include - -@@ -74,6 +76,7 @@ - static char *filename; /* ROM image filename */ - struct cramfs_super super; /* just find the cramfs superblock once */ - static int opt_verbose = 0; /* 1 = verbose (-v), 2+ = very verbose (-vv) */ -+static int need_swapping = 0; /* fs and host dont have the same endianness */ - #ifdef INCLUDE_FS_TESTS - static int opt_extract = 0; /* extract cramfs (-x) */ - static char *extract_dir = "/"; /* extraction directory (-x) */ -@@ -85,6 +88,9 @@ - static unsigned long start_data = ~0UL; /* start of the data (256 MB = max) */ - static unsigned long end_data = 0; /* end of the data */ - -+/* access 32 byte variables */ -+#define CRAMFS_32(x) (need_swapping ? bswap_32(x) : x) -+ - /* Guarantee access to at least 8kB at a time */ - #define ROMBUFFER_BITS 13 - #define ROMBUFFERSIZE (1 << ROMBUFFER_BITS) -@@ -166,20 +172,34 @@ - if (super.magic == CRAMFS_MAGIC) { - *start = 0; - } -+ else if (super.magic == bswap_32(CRAMFS_MAGIC)) { -+ *start = 0; -+ need_swapping = 1; -+ } -+ - else if (*length >= (PAD_SIZE + sizeof(super))) { - lseek(fd, PAD_SIZE, SEEK_SET); - if (read(fd, &super, sizeof(super)) != sizeof(super)) { - die(FSCK_ERROR, 1, "read failed: %s", filename); - } -- if (super.magic == CRAMFS_MAGIC) { -+ if (super.magic == CRAMFS_32(CRAMFS_MAGIC)) { - *start = PAD_SIZE; - } - } - - /* superblock tests */ -- if (super.magic != CRAMFS_MAGIC) { -+ if (super.magic != CRAMFS_32(CRAMFS_MAGIC)) { - die(FSCK_UNCORRECTED, 0, "superblock magic not found"); - } -+ if (need_swapping){ -+ super.size = bswap_32(super.size); -+ super.flags = bswap_32(super.flags); -+ super.future = bswap_32(super.future); -+ super.fsid.crc = bswap_32(super.fsid.crc); -+ super.fsid.edition = bswap_32(super.fsid.edition); -+ super.fsid.blocks = bswap_32(super.fsid.blocks); -+ super.fsid.files = bswap_32(super.fsid.files); -+ } - if (super.flags & ~CRAMFS_SUPPORTED_FLAGS) { - die(FSCK_ERROR, 0, "unsupported filesystem features"); - } -@@ -215,7 +235,10 @@ - die(FSCK_USAGE, 0, "unable to test CRC: old cramfs format"); - #endif /* not INCLUDE_FS_TESTS */ - } -- -+ else if (need_swapping) { -+ /* crc checking in this case would mean translating the whole file */ -+ return; -+ } - crc = crc32(0L, Z_NULL, 0); - - buf = mmap(NULL, super.size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); -@@ -300,12 +323,23 @@ - - static struct cramfs_inode *cramfs_iget(struct cramfs_inode * i) - { -+#define wswap(x) (((x)>>24) | (((x)>>8)&0xff00) | (((x)&0xff00)<<8) | (((x)&0xff)<<24)) - struct cramfs_inode *inode = malloc(sizeof(struct cramfs_inode)); - - if (!inode) { - die(FSCK_ERROR, 1, "malloc failed"); - } -- *inode = *i; -+ if(!need_swapping) { -+ *inode = *i; -+ } -+ else { -+ inode->mode=bswap_16(i->mode); -+ inode->uid=bswap_16(i->uid); -+ inode->size=bswap_32(i->size << 8); -+ inode->gid=i->gid; -+ inode->namelen = bswap_32(((u32*)i)[2]) >> 26; -+ inode->offset = bswap_32(((u32*)i)[2]) & 0x3FFFFFFF; -+ } - return inode; - } - -@@ -324,9 +358,9 @@ - */ - static struct cramfs_inode *read_super(void) - { -- unsigned long offset = super.root.offset << 2; -- -- if (!S_ISDIR(super.root.mode)) -+ struct cramfs_inode *root = cramfs_iget(&super.root); -+ unsigned long offset = root->offset << 2; -+ if (!S_ISDIR(root->mode)) - die(FSCK_UNCORRECTED, 0, "root inode is not directory"); - if (!(super.flags & CRAMFS_FLAG_SHIFTED_ROOT_OFFSET) && - ((offset != sizeof(struct cramfs_super)) && -@@ -334,7 +368,7 @@ - { - die(FSCK_UNCORRECTED, 0, "bad root offset (%lu)", offset); - } -- return cramfs_iget(&super.root); -+ return root; - } - - static int uncompress_block(void *src, int len) -@@ -366,7 +400,7 @@ - - do { - unsigned long out = PAGE_CACHE_SIZE; -- unsigned long next = *(u32 *) romfs_read(offset); -+ unsigned long next = CRAMFS_32(*(u32 *) romfs_read(offset)); - - if (next > end_data) { - end_data = next; -@@ -529,7 +563,7 @@ - { - unsigned long offset = i->offset << 2; - unsigned long curr = offset + 4; -- unsigned long next = *(u32 *) romfs_read(offset); -+ unsigned long next = CRAMFS_32(*(u32 *) romfs_read(offset)); - unsigned long size; - - if (offset == 0) { diff --git a/package/cramfs/cramfs-03-cygwin_IO.patch b/package/cramfs/cramfs-03-cygwin_IO.patch deleted file mode 100644 index 4ea358e..0000000 --- a/package/cramfs/cramfs-03-cygwin_IO.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- cramfs-1.1/cramfsck.c.orig 2006-12-22 22:16:59.328125000 +1100 -+++ cramfs-1.1/cramfsck.c 2006-12-19 01:02:05.531250000 +1100 -@@ -56,6 +56,10 @@ - #include "linux/cramfs_fs.h" - #include - -+#ifdef __CYGWIN__ -+#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) -+#endif /* __CYGWIN__ */ -+ - #define BLKGETSIZE _IO(0x12,96) /* return device size /512 (long *arg) */ - - /* Exit codes used by fsck-type programs */ diff --git a/package/dash/dash-0.5.5.1-no-config.h-for-helpers.patch b/package/dash/dash-0.5.5.1-no-config.h-for-helpers.patch deleted file mode 100644 index 9fd449c..0000000 --- a/package/dash/dash-0.5.5.1-no-config.h-for-helpers.patch +++ /dev/null @@ -1,35 +0,0 @@ -[PATCH] Don't include config.h when building helpers using the native compiler - -config.h contains settings for the cross compiler (most importantly -32/64bit versions of functions), so don't include it when calling the -native compiler to build the helpers. - -Otherwise we get build errors like: - -/usr/bin/gcc -include ../config.h -DBSD=1 -DSHELL -DIFS_BROKEN -g -O2 -Wall -o mkinit mkinit.c -In file included from /usr/include/sys/stat.h:107, - from /usr/include/fcntl.h:38, - from mkinit.c:50: -/usr/include/bits/stat.h:117: error: redefinition of ‘struct stat’ -In file included from /usr/include/fcntl.h:38, - from mkinit.c:50: -/usr/include/sys/stat.h:504: error: redefinition of ‘stat’ -/usr/include/sys/stat.h:455: note: previous definition of ‘stat’ was here - -Signed-off-by: Peter Korsgaard ---- - src/Makefile.in | 1 - - 1 file changed, 1 deletion(-) - -Index: dash-0.5.5.1/src/Makefile.in -=================================================================== ---- dash-0.5.5.1.orig/src/Makefile.in -+++ dash-0.5.5.1/src/Makefile.in -@@ -165,7 +165,6 @@ COMMON_CPPFLAGS = \ - AM_CFLAGS = $(COMMON_CFLAGS) - AM_CPPFLAGS = $(COMMON_CPPFLAGS) - AM_CFLAGS_FOR_BUILD = -g -O2 $(COMMON_CFLAGS) --AM_CPPFLAGS_FOR_BUILD = $(COMMON_CPPFLAGS) - COMPILE_FOR_BUILD = \ - $(CC_FOR_BUILD) $(AM_CPPFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) \ - $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) diff --git a/package/dbus/dbus-1.2.12-launch-helper-xml-fix.patch b/package/dbus/dbus-1.2.12-launch-helper-xml-fix.patch deleted file mode 100644 index bf6b4ae..0000000 --- a/package/dbus/dbus-1.2.12-launch-helper-xml-fix.patch +++ /dev/null @@ -1,33 +0,0 @@ -dbus-daemon-launch-helper: fix build with libxml - -dbus-daemon-launch-helper links with the trival config parser, which -doesn't provide bus_config_parser_check_doctype(), like the big parser does. -The libxml loader unfortunately wants to call it, so this breaks the build. - -Fix it by including a dummy bus_config_parser_check_doctype() in the trivial -config parser. - -Signed-off-by: Peter Korsgaard ---- - bus/config-parser-trivial.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -Index: dbus-1.2.12/bus/config-parser-trivial.c -=================================================================== ---- dbus-1.2.12.orig/bus/config-parser-trivial.c -+++ dbus-1.2.12/bus/config-parser-trivial.c -@@ -310,6 +310,14 @@ - return &parser->service_dirs; - } - -+dbus_bool_t -+bus_config_parser_check_doctype (BusConfigParser *parser, -+ const char *doctype, -+ DBusError *error) -+{ -+ return TRUE; -+} -+ - #ifdef DBUS_BUILD_TESTS - #include - #include "test.h" diff --git a/package/directfb/directfb-1.4.11-ppc-compile-fix.patch b/package/directfb/directfb-1.4.11-ppc-compile-fix.patch deleted file mode 100644 index 2514eae..0000000 --- a/package/directfb/directfb-1.4.11-ppc-compile-fix.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - lib/direct/ppcasm_memcpy_cachable.S | 2 -- - 1 file changed, 2 deletions(-) - -Index: DirectFB-1.2.7/lib/direct/ppcasm_memcpy_cachable.S -=================================================================== ---- DirectFB-1.2.7.orig/lib/direct/ppcasm_memcpy_cachable.S -+++ DirectFB-1.2.7/lib/direct/ppcasm_memcpy_cachable.S -@@ -34,8 +34,6 @@ - - #define __ASSEMBLY__ - --#include -- - #if defined(CONFIG_8xx) || defined(CONFIG_403GCX) - #define L1_CACHE_LINE_SIZE 16 - #define LG_L1_CACHE_LINE_SIZE 4 diff --git a/package/email/Config.in b/package/email/Config.in deleted file mode 100755 index e23d15d..0000000 --- a/package/email/Config.in +++ /dev/null @@ -1,6 +0,0 @@ -config BR2_PACKAGE_EMAIL - bool "email" - help - Email is a program for the Unix environment that sends messages. - - http://www.cleancode.org/projects/email diff --git a/package/email/email-3.1.3-fix-dlib-configure.patch b/package/email/email-3.1.3-fix-dlib-configure.patch deleted file mode 100644 index 3be8527..0000000 --- a/package/email/email-3.1.3-fix-dlib-configure.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff -NarU20 a/configure b/configure ---- a/configure 2010-11-01 04:13:38.000000000 +1100 -+++ b/configure 2011-06-03 08:24:07.442446874 +1000 -@@ -1,34 +1,36 @@ - #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. - # Generated by GNU Autoconf 2.61 for email 3.1.3. - # - # Report bugs to <>. - # - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, - # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - # This configure script is free software; the Free Software Foundation - # gives unlimited permission to copy, distribute and modify it. - ## --------------------- ## - ## M4sh Initialization. ## - ## --------------------- ## - -+dlib_args=$@ -+ - # Be more Bourne compatible - DUALCASE=1; export DUALCASE # for MKS sh - if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST - else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; - esac - - fi - - - - - # PATH needs CR -@@ -7360,25 +7362,25 @@ - # Unfortunately, on DOS this fails, as config.log is still kept open - # by configure, so config.status won't be able to write to it; its - # output is simply discarded. So we exec the FD to /dev/null, - # effectively closing config.log, so it can be properly (re)opened and - # appended to by config.status. When coming back to configure, we - # need to make the FD available again. - if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } - fi - - if test "$use_ssl" = "no"; then -- args="--without-ssl" -+ dlib_args+="--without-ssl" - fi - cd dlib --./configure $args -+./configure $dlib_args - cd .. diff --git a/package/email/email.mk b/package/email/email.mk deleted file mode 100755 index dc8ab5f..0000000 --- a/package/email/email.mk +++ /dev/null @@ -1,14 +0,0 @@ -############################################################# -# -# email -# -############################################################# -EMAIL_VERSION = 3.1.3 -EMAIL_SITE = http://www.cleancode.org/downloads/email - -ifeq ($(BR2_PACKAGE_OPENSSL),y) -EMAIL_CONF_OPT += --with-ssl -EMAIL_DEPENDENCIES += openssl -endif - -$(eval $(call AUTOTARGETS,package,email)) diff --git a/package/fuse/Config.in b/package/fuse/Config.in deleted file mode 100644 index dffadf8..0000000 --- a/package/fuse/Config.in +++ /dev/null @@ -1,10 +0,0 @@ -config BR2_PACKAGE_LIBFUSE - bool "libfuse" - depends on BR2_LARGEFILE - help - FUSE (Filesystem in UserSpacE) - - http://fuse.sourceforge.net/ - -comment "libfuse requires a toolchain with LARGEFILE support" - depends on !BR2_LARGEFILE diff --git a/package/fuse/libfuse.mk b/package/fuse/libfuse.mk deleted file mode 100644 index 5a86e84..0000000 --- a/package/fuse/libfuse.mk +++ /dev/null @@ -1,32 +0,0 @@ -############################################################# -# -# libfuse -# -############################################################# - -LIBFUSE_VERSION = 2.8.5 -LIBFUSE_SOURCE = fuse-$(LIBFUSE_VERSION).tar.gz -LIBFUSE_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/fuse/ - -LIBFUSE_INSTALL_STAGING = YES -LIBFUSE_CONF_OPT= --program-prefix="" \ - --enable-shared \ - --enable-static \ - --disable-nls \ - --disable-example \ - --disable-kernel-module \ - --enable-lib \ - --enable-util - -define LIBFUSE_INSTALL_TARGET_CMDS - cp -dpf $(STAGING_DIR)/usr/bin/fusermount $(TARGET_DIR)/usr/bin/ - cp -dpf $(STAGING_DIR)/usr/lib/libfuse.so* $(TARGET_DIR)/usr/lib/ -endef - -define LIBFUSE_CLEAN_CMDS - -$(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) uninstall - -$(MAKE) -C $(@D) clean - rm -f $(TARGET_DIR)/usr/bin/fusermount $(TARGET_DIR)/usr/lib/libfuse.so* -endef - -$(eval $(call AUTOTARGETS,package,libfuse)) diff --git a/package/gnuconfig/.cvsignore b/package/gnuconfig/.cvsignore deleted file mode 100644 index 669c89f..0000000 --- a/package/gnuconfig/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -.cvsignore -README.buildroot -gnuconfig.mk -patches -.svn diff --git a/package/gnuconfig/README.buildroot b/package/gnuconfig/README.buildroot deleted file mode 100644 index fd43a68..0000000 --- a/package/gnuconfig/README.buildroot +++ /dev/null @@ -1,20 +0,0 @@ ---- ABOUT --- -This isnt a real package, it just exists to easily update the -config.sub / config.guess files in packages to the latest version -(since many bundled ones don't support the latest possible targets) - ---- HOWTO --- -To use, just add this to your unpack rule in the package.mk: -$(CONFIG_UPDATE) $(PACKAGE_DIR)/ - ---- UPDATE --- -GNU config is now managed in git, so to update: - -# git clone git://git.savannah.gnu.org/config.git -# cp config/config.* . -# for p in $(ls patches/*.patch); do patch -p0 < $p; done -# rm -rf config - -A few local customizations are used to support uClibc so you may -have to make sure they're still needed. The patches are broken -out in the patches/ dir to keep things simple. diff --git a/package/gnuconfig/config.guess b/package/gnuconfig/config.guess deleted file mode 100755 index 40cf0af..0000000 --- a/package/gnuconfig/config.guess +++ /dev/null @@ -1,1527 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. - -timestamp='2011-02-02' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -if [ "${UNAME_SYSTEM}" = "Linux" ] ; then - eval $set_cc_for_build - cat << EOF > $dummy.c - #include - #ifdef __UCLIBC__ - # ifdef __UCLIBC_CONFIG_VERSION__ - LIBC=uclibc __UCLIBC_CONFIG_VERSION__ - # else - LIBC=uclibc - # endif - #else - LIBC=gnu - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'` -fi - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="gnulibc1" ; fi - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-${LIBC} - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-${LIBC} - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-${LIBC} - exit ;; - i*86:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-${LIBC} - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; - PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; - *) echo hppa-unknown-linux-${LIBC} ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-${LIBC} - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-${LIBC} - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - tile*:Linux:*:*) - echo ${UNAME_MACHINE}-tilera-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-${LIBC} - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-${LIBC} - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NEO-?:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/package/gnuconfig/config.sub b/package/gnuconfig/config.sub deleted file mode 100755 index 8ad167c..0000000 --- a/package/gnuconfig/config.sub +++ /dev/null @@ -1,1757 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. - -timestamp='2011-02-24' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx | dvp \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze) - basic_machine=microblaze-xilinx - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mipsEE* | ee | ps2) - basic_machine=mips64r5900el-scei - case $os in - -linux*) - ;; - *) - os=-elf - ;; - esac - ;; - iop) - basic_machine=mipsel-scei - os=-irx - ;; - dvp) - basic_machine=dvp-scei - os=-elf - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - # This must be matched before tile*. - tilegx*) - basic_machine=tilegx-unknown - os=-linux-gnu - ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -irx*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -nacl*) - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - tic54x-*) - os=-coff - ;; - tic55x-*) - os=-coff - ;; - tic6x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/package/gnuconfig/gnuconfig.mk b/package/gnuconfig/gnuconfig.mk deleted file mode 100644 index b6aa5fc..0000000 --- a/package/gnuconfig/gnuconfig.mk +++ /dev/null @@ -1,3 +0,0 @@ -# See README.buildroot -gnuconfig-source: -CONFIG_UPDATE = cp -f package/gnuconfig/config.sub package/gnuconfig/config.guess diff --git a/package/gnuconfig/patches/config.guess.uclibc.patch b/package/gnuconfig/patches/config.guess.uclibc.patch deleted file mode 100644 index 85f9b89..0000000 --- a/package/gnuconfig/patches/config.guess.uclibc.patch +++ /dev/null @@ -1,149 +0,0 @@ ---- config.guess -+++ config.guess -@@ -140,6 +141,23 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown - UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown - UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -+if [ "${UNAME_SYSTEM}" = "Linux" ] ; then -+ eval $set_cc_for_build -+ cat << EOF > $dummy.c -+ #include -+ #ifdef __UCLIBC__ -+ # ifdef __UCLIBC_CONFIG_VERSION__ -+ LIBC=uclibc __UCLIBC_CONFIG_VERSION__ -+ # else -+ LIBC=uclibc -+ # endif -+ #else -+ LIBC=gnu -+ #endif -+EOF -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'` -+fi -+ - # Note: order is significant - the case branches are not exclusive. - - case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in -@@ -872,33 +890,32 @@ EOF - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 -- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi -- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi - exit ;; - avr32*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - cris:Linux:*:*) -- echo cris-axis-linux-gnu -+ echo cris-axis-linux-${LIBC} - exit ;; - crisv32:Linux:*:*) -- echo crisv32-axis-linux-gnu -+ echo crisv32-axis-linux-${LIBC} - exit ;; - frv:Linux:*:*) -- echo frv-unknown-linux-gnu -+ echo frv-unknown-linux-${LIBC} - exit ;; - i*86:Linux:*:*) -- LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ -@@ -909,13 +926,13 @@ EOF - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit ;; - ia64:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m32r*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m68*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build -@@ -934,10 +951,10 @@ EOF - #endif - EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` -- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } - ;; - or32:Linux:*:*) -- echo or32-unknown-linux-gnu -+ echo or32-unknown-linux-${LIBC} - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu -@@ -948,40 +965,40 @@ EOF - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in -- PA7*) echo hppa1.1-unknown-linux-gnu ;; -- PA8*) echo hppa2.0-unknown-linux-gnu ;; -- *) echo hppa-unknown-linux-gnu ;; -+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; -+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; -+ *) echo hppa-unknown-linux-${LIBC} ;; - esac - exit ;; - ppc64:Linux:*:*) -- echo powerpc64-unknown-linux-gnu -+ echo powerpc64-unknown-linux-${LIBC} - exit ;; - ppc:Linux:*:*) -- echo powerpc-unknown-linux-gnu -+ echo powerpc-unknown-linux-${LIBC} - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sh*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - tile*:Linux:*:*) - echo ${UNAME_MACHINE}-tilera-linux-gnu - exit ;; - vax:Linux:*:*) -- echo ${UNAME_MACHINE}-dec-linux-gnu -+ echo ${UNAME_MACHINE}-dec-linux-${LIBC} - exit ;; - x86_64:Linux:*:*) -- echo x86_64-unknown-linux-gnu -+ echo x86_64-unknown-linux-${LIBC} - exit ;; - xtensa*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. diff --git a/package/gnuconfig/patches/config.sub.ps2.patch b/package/gnuconfig/patches/config.sub.ps2.patch deleted file mode 100644 index 57d09dc..0000000 --- a/package/gnuconfig/patches/config.sub.ps2.patch +++ /dev/null @@ -1,45 +0,0 @@ ---- config.sub -+++ config.sub -@@ -253,7 +253,7 @@ case $basic_machine in - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ -- | d10v | d30v | dlx | dsp16xx \ -+ | d10v | d30v | dlx | dsp16xx | dvp \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ -@@ -773,6 +773,24 @@ case $basic_machine in - basic_machine=m68k-atari - os=-mint - ;; -+ mipsEE* | ee | ps2) -+ basic_machine=mips64r5900el-scei -+ case $os in -+ -linux*) -+ ;; -+ *) -+ os=-elf -+ ;; -+ esac -+ ;; -+ iop) -+ basic_machine=mipsel-scei -+ os=-irx -+ ;; -+ dvp) -+ basic_machine=dvp-scei -+ os=-elf -+ ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; -@@ -1325,7 +1343,7 @@ case $os in - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ -- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) -+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -irx*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) diff --git a/package/gtk2-themes/gtk2_themes.mk b/package/gtk2-themes/gtk2_themes.mk deleted file mode 100644 index 8dc8af4..0000000 --- a/package/gtk2-themes/gtk2_themes.mk +++ /dev/null @@ -1,18 +0,0 @@ -############################################################# -# -# GTK Theme - Hicolour -# -############################################################# -GTK2_THEME_HICOLOR_VERSION = 0.10 -GTK2_THEME_HICOLOR_SOURCE = hicolor-icon-theme-$(GTK2_THEME_HICOLOR_VERSION).tar.gz -GTK2_THEME_HICOLOR_SITE = http://icon-theme.freedesktop.org/releases/ -GTK2_THEME_HICOLOR_INSTALL_STAGING = NO -GTK2_THEME_HICOLOR_INSTALL_TARGET = YES - -GTK2_THEME_HICOLOR_CONF_OPT = --target=$(GNU_TARGET_NAME) --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) --prefix=/usr \ - --includedir=/usr/include - -GTK2_THEME_HICOLOR_DEPENDENCIES = libgtk2 - -$(eval $(call AUTOTARGETS,package,gtk2_theme_hicolor)) diff --git a/package/hal/Config.in b/package/hal/Config.in deleted file mode 100644 index 1951c9d..0000000 --- a/package/hal/Config.in +++ /dev/null @@ -1,19 +0,0 @@ -config BR2_PACKAGE_HAL - bool "hal" - depends on BR2_USE_WCHAR # glib2 - select BR2_PACKAGE_EXPAT - select BR2_PACKAGE_LIBGLIB2 - select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE - select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE - select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE - select BR2_PACKAGE_DBUS - select BR2_DBUS_EXPAT - select BR2_PACKAGE_DBUS_GLIB - select BR2_PACKAGE_HWDATA - select BR2_PACKAGE_UDEV - select BR2_PACKAGE_UDEV_VOLUME_ID - help - The Hardware Abstraction Layer (HAL) suite. - -comment "hal requires a toolchain with WCHAR support" - depends on !BR2_USE_WCHAR diff --git a/package/hal/S98haldaemon b/package/hal/S98haldaemon deleted file mode 100755 index 40ea0f4..0000000 --- a/package/hal/S98haldaemon +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh -# -# haldaemon: HAL daemon -# -# chkconfig: 345 98 02 -# description: This is a daemon for collecting and maintaing information \ -# about hardware from several sources. \ -# See http://www.freedesktop.org/Software/hal -# -# processname: hald -# pidfile: /var/run/haldaemon.pid -# - -# Sanity checks. -[ -x /usr/sbin/hald ] || exit 0 - -RETVAL=0 - -start() { - echo -n "Starting HAL daemon: " - hald - RETVAL=$? - echo "done" - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/haldaemon -} - -stop() { - echo -n "Stopping HAL daemon: " - - killall hald - RETVAL=$? - echo "done" - if [ $RETVAL -eq 0 ]; then - rm -f /var/lock/subsys/haldaemon - rm -f /var/run/haldaemon.pid - fi -} - -# See how we were called. -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - stop - sleep 3 - start - ;; - *) - echo $"Usage: $0 {start|stop|restart}" - ;; -esac -exit $RETVAL diff --git a/package/hal/hal-include-fix.patch b/package/hal/hal-include-fix.patch deleted file mode 100644 index af2a7fe..0000000 --- a/package/hal/hal-include-fix.patch +++ /dev/null @@ -1,35 +0,0 @@ -[PATCH] hal: add missing includes - -- hald/linux/classdev.c needs sys/socket.h for struct sockaddr -- hald/linux/addons/addon-storage.c needs limits.h for INT_MAX - -Signed-off-by: Peter Korsgaard ---- - hald/linux/addons/addon-storage.c | 1 + - hald/linux/classdev.c | 1 + - 2 files changed, 2 insertions(+) - -Index: hal-0.5.8/hald/linux/addons/addon-storage.c -=================================================================== ---- hal-0.5.8.orig/hald/linux/addons/addon-storage.c -+++ hal-0.5.8/hald/linux/addons/addon-storage.c -@@ -29,6 +29,7 @@ - - #include - #include -+#include - #include - #include - #include -Index: hal-0.5.8/hald/linux/classdev.c -=================================================================== ---- hal-0.5.8.orig/hald/linux/classdev.c -+++ hal-0.5.8/hald/linux/classdev.c -@@ -31,6 +31,7 @@ - - #include - #include -+#include - #include - #include /* for ARPHRD_... */ - #include diff --git a/package/hal/hal.mk b/package/hal/hal.mk deleted file mode 100644 index 801fe92..0000000 --- a/package/hal/hal.mk +++ /dev/null @@ -1,107 +0,0 @@ -############################################################# -# -# hal -# -############################################################# -HAL_VERSION:=0.5.8 -HAL_SOURCE:=hal-$(HAL_VERSION).tar.gz -HAL_SITE:=http://people.freedesktop.org/~david/dist/ -HAL_DIR:=$(BUILD_DIR)/hal-$(HAL_VERSION) -HAL_CAT:=$(ZCAT) -HAL_BINARY:=hald/hald -HAL_TARGET_BINARY:=usr/sbin/hald - -GLIB_CFLAGS:=-I$(STAGING_DIR)/usr/include/glib-2.0 \ - -I$(STAGING_DIR)/usr/lib/glib-2.0/include -GLIB_LIBS:=$(STAGING_DIR)/usr/lib/libglib-2.0.so \ - $(STAGING_DIR)/usr/lib/libgmodule-2.0.so \ - $(STAGING_DIR)/usr/lib/libgobject-2.0.so \ - $(STAGING_DIR)/usr/lib/libgthread-2.0.so -DBUS_GLIB_LIBS:=$(STAGING_DIR)/usr/lib/libdbus-glib-1.so - -$(DL_DIR)/$(HAL_SOURCE): - $(call DOWNLOAD,$(HAL_SITE),$(HAL_SOURCE)) - -hal-source: $(DL_DIR)/$(HAL_SOURCE) - -$(HAL_DIR)/.unpacked: $(DL_DIR)/$(HAL_SOURCE) - $(HAL_CAT) $(DL_DIR)/$(HAL_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - toolchain/patch-kernel.sh $(HAL_DIR) package/hal/ \*.patch - touch $(HAL_DIR)/.unpacked - -$(HAL_DIR)/.configured: $(HAL_DIR)/.unpacked - (cd $(HAL_DIR); rm -rf config.cache; \ - $(TARGET_CONFIGURE_OPTS) \ - $(TARGET_CONFIGURE_ARGS) \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/lib/glib-2.0/include" \ - GLIB_CFLAGS="$(GLIB_CFLAGS)" \ - GLIB_LIBS="$(GLIB_LIBS)" \ - DBUS_CFLAGS="-I$(STAGING_DIR)/usr/include/dbus-1.0 -I$(STAGING_DIR)/usr/lib/dbus-1.0/include" \ - DBUS_LIBS="$(STAGING_DIR)/usr/lib/libdbus-1.so" \ - VOLUME_ID_CFLAGS="$(TARGET_CFLAGS)" \ - VOLUME_ID_LIBS="$(STAGING_DIR)/lib/libvolume_id.so" \ - ac_cv_path_LIBUSB_CONFIG= \ - ./configure $(QUIET) \ - --target=$(GNU_TARGET_NAME) \ - --host=$(GNU_TARGET_NAME) \ - --build=$(GNU_HOST_NAME) \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --with-hwdata=$(TARGET_DIR)/usr/share/hwdata \ - --with-expat=$(STAGING_DIR)/usr/ \ - --disable-policy-kit \ - --disable-gtk-doc \ - --disable-static \ - --disable-acpi-acpid \ - --disable-acpi-proc \ - ) - touch $(HAL_DIR)/.configured - -$(HAL_DIR)/hald/hald: $(HAL_DIR)/.configured - $(MAKE) STAGING_DIR="$(STAGING_DIR)" DESTDIR="$(TARGET_DIR)" DBUS_GLIB_LIBS="$(DBUS_GLIB_LIBS)" -C $(HAL_DIR) - -$(TARGET_DIR)/$(HAL_TARGET_BINARY): $(HAL_DIR)/hald/hald - $(MAKE) STAGING_DIR="$(STAGING_DIR)" DESTDIR="$(TARGET_DIR)" -C $(HAL_DIR) install - rm -rf $(TARGET_DIR)/usr/share/hal/device-manager - rm -rf $(TARGET_DIR)/usr/lib/libhal*.so - rm -rf $(TARGET_DIR)/usr/lib/hal - rm -rf $(TARGET_DIR)/etc/PolicyKit - $(INSTALL) -m 0755 -D package/hal/S98haldaemon $(TARGET_DIR)/etc/init.d - for file in hald-addon-acpi* hald-addon-cpufreq \ - hald-addon-keyboard hald-addon-pmu \ - hald-probe-pc-floppy hald-probe-printer \ - hald-probe-serial hald-probe-smbios \ - hal-storage-eject hal-storage-closetray \ - hal-system-power-pmu hald-probe-input \ - hald-probe-hiddev hald-addon-hid-ups; \ - do \ - rm -f $(TARGET_DIR)/usr/libexec/$$file; \ - done - -hal: host-pkg-config host-libxml-parser-perl dbus-glib hwdata udev $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl) $(TARGET_DIR)/$(HAL_TARGET_BINARY) - -hal-clean: - rm -f $(TARGET_DIR)/etc/dbus-1/system.d/hal.conf - rm -rf $(TARGET_DIR)/etc/hal $(TARGET_DIR)/usr/share/hal - rm -f $(TARGET_DIR)/etc/init.d/S98haldaemon - rm -f $(TARGET_DIR)/etc/udev/rules.d/90-hal.rules - rm -f $(TARGET_DIR)/usr/bin/hal-* $(TARGET_DIR)/usr/bin/lshal - rm -f $(TARGET_DIR)/usr/sbin/hald - rm -f $(TARGET_DIR)/usr/libexec/hald-* $(TARGET_DIR)/usr/libexec/hal-* - rmdir -p --ignore-fail-on-non-empty $(TARGET_DIR)/usr/libexec - rm -f $(TARGET_DIR)/usr/lib/libhal.so.1* - rm -f $(TARGET_DIR)/usr/lib/libhal-storage.so.1* - -$(MAKE) -C $(HAL_DIR) clean - -hal-dirclean: - rm -rf $(HAL_DIR) - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_HAL),y) -TARGETS+=hal -endif diff --git a/package/hal/hal02-include-ieee80211-fix.patch b/package/hal/hal02-include-ieee80211-fix.patch deleted file mode 100644 index 9e7b5e2..0000000 --- a/package/hal/hal02-include-ieee80211-fix.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -ur hal-0.5.8/hald/linux/classdev.c hal-0.5.8-patched/hald/linux/classdev.c ---- hal-0.5.8/hald/linux/classdev.c 2006-09-11 18:32:56.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/classdev.c 2007-01-13 22:00:46.896769548 -0600 -@@ -32,7 +32,10 @@ - #include - #include - #include --#include /* for ARPHRD_... */ -+#include /* for ARPHRD_... */ -+#ifndef ARPHRD_IEEE80211_RADIOTAP -+# define ARPHRD_IEEE80211_RADIOTAP 803 -+#endif - #include - #include - #include diff --git a/package/hal/hal03-link-dbus.patch b/package/hal/hal03-link-dbus.patch deleted file mode 100644 index d522b85..0000000 --- a/package/hal/hal03-link-dbus.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff -urN hal-0.5.8/hald/linux/addons/Makefile.in hal-0.5.8-patched/hald/linux/addons/Makefile.in ---- hal-0.5.8/hald/linux/addons/Makefile.in 2006-09-11 18:25:31.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/addons/Makefile.in 2006-11-16 10:08:30.000000000 -0600 -@@ -119,7 +119,7 @@ - $(AM_CFLAGS) $(CFLAGS) - CCLD = $(CC) - LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ -- $(AM_LDFLAGS) $(LDFLAGS) -o $@ -+ $(AM_LDFLAGS) $(LDFLAGS) $(DBUS_LIBS) $(GLIB_LIBS) $(DBUS_GLIB_LIBS) -o $@ - SOURCES = $(hald_addon_acpi_SOURCES) \ - $(hald_addon_acpi_buttons_toshiba_SOURCES) \ - $(hald_addon_cpufreq_SOURCES) $(hald_addon_hid_ups_SOURCES) \ -diff -urN hal-0.5.8/hald/linux/probing/Makefile.in hal-0.5.8-patched/hald/linux/probing/Makefile.in ---- hal-0.5.8/hald/linux/probing/Makefile.in 2006-09-11 18:25:31.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/probing/Makefile.in 2006-11-16 10:08:30.000000000 -0600 -@@ -97,7 +97,7 @@ - $(AM_CFLAGS) $(CFLAGS) - CCLD = $(CC) - LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ -- $(AM_LDFLAGS) $(LDFLAGS) -o $@ -+ $(AM_LDFLAGS) $(LDFLAGS) $(DBUS_LIBS) -o $@ - SOURCES = $(hald_probe_hiddev_SOURCES) $(hald_probe_input_SOURCES) \ - $(hald_probe_pc_floppy_SOURCES) $(hald_probe_printer_SOURCES) \ - $(hald_probe_serial_SOURCES) $(hald_probe_smbios_SOURCES) \ -diff -urN hal-0.5.8/hald/Makefile.in hal-0.5.8-patched/hald/Makefile.in ---- hal-0.5.8/hald/Makefile.in 2006-09-11 18:25:30.000000000 -0500 -+++ hal-0.5.8-patched/hald/Makefile.in 2006-11-16 10:08:30.000000000 -0600 -@@ -71,7 +71,7 @@ - $(AM_CFLAGS) $(CFLAGS) - CCLD = $(CC) - LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ -- $(AM_LDFLAGS) $(LDFLAGS) -o $@ -+ $(AM_LDFLAGS) $(LDFLAGS) $(DBUS_GLIB_LIBS) $(GLIB_LIBS) -o $@ - SOURCES = $(hald_SOURCES) - DIST_SOURCES = $(hald_SOURCES) - RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ -diff -urN hal-0.5.8/hald-runner/Makefile.in hal-0.5.8-patched/hald-runner/Makefile.in ---- hal-0.5.8/hald-runner/Makefile.in 2006-09-11 18:25:30.000000000 -0500 -+++ hal-0.5.8-patched/hald-runner/Makefile.in 2006-11-16 10:09:06.000000000 -0600 -@@ -64,7 +64,7 @@ - $(AM_CFLAGS) $(CFLAGS) - CCLD = $(CC) - LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ -- $(AM_LDFLAGS) $(LDFLAGS) -o $@ -+ $(AM_LDFLAGS) $(LDFLAGS) $(GLIB_LIBS) $(DBUS_GLIB_LIBS) -o $@ - SOURCES = $(hald_runner_SOURCES) - DIST_SOURCES = $(hald_runner_SOURCES) - ETAGS = etags -diff -urN hal-0.5.8/tools/Makefile.in hal-0.5.8-patched/tools/Makefile.in ---- hal-0.5.8/tools/Makefile.in 2006-09-11 18:25:33.000000000 -0500 -+++ hal-0.5.8-patched/tools/Makefile.in 2006-11-16 10:10:14.000000000 -0600 -@@ -133,7 +133,7 @@ - $(AM_CFLAGS) $(CFLAGS) - CCLD = $(CC) - LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ -- $(AM_LDFLAGS) $(LDFLAGS) -o $@ -+ $(AM_LDFLAGS) $(LDFLAGS) $(DBUS_LIBS) $(GLIB_LIBS) $(DBUS_GLIB_LIBS) -o $@ - SOURCES = $(hal_device_SOURCES) $(hal_find_by_capability_SOURCES) \ - $(hal_find_by_property_SOURCES) $(hal_get_property_SOURCES) \ - $(hal_set_property_SOURCES) \ diff --git a/package/hal/hal04-remove-glib-dbus-headers.patch b/package/hal/hal04-remove-glib-dbus-headers.patch deleted file mode 100644 index fd83bd2..0000000 --- a/package/hal/hal04-remove-glib-dbus-headers.patch +++ /dev/null @@ -1,275 +0,0 @@ -diff -ur hal-0.5.8/hald/device_info.c hal-0.5.8-patched/hald/device_info.c ---- hal-0.5.8/hald/device_info.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/device_info.c 2006-11-15 11:52:24.000000000 -0600 -@@ -33,8 +33,6 @@ - #include - #include - #include --#include --#include - #include - - #include "hald.h" -diff -ur hal-0.5.8/hald/dummy/osspec.c hal-0.5.8-patched/hald/dummy/osspec.c ---- hal-0.5.8/hald/dummy/osspec.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/dummy/osspec.c 2006-11-15 11:52:24.000000000 -0600 -@@ -28,8 +28,6 @@ - #endif - - #include --#include --#include - - #include "../osspec.h" - #include "../logger.h" -diff -ur hal-0.5.8/hald/hald.c hal-0.5.8-patched/hald/hald.c ---- hal-0.5.8/hald/hald.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/hald.c 2006-11-15 11:52:24.000000000 -0600 -@@ -42,10 +42,6 @@ - #include - #include - --#include --#include --#include -- - /*#include "master_slave.h"*/ - - #include "logger.h" -diff -ur hal-0.5.8/hald/hald_dbus.c hal-0.5.8-patched/hald/hald_dbus.c ---- hal-0.5.8/hald/hald_dbus.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/hald_dbus.c 2006-11-15 11:52:24.000000000 -0600 -@@ -35,9 +35,6 @@ - #include - #include - --#include --#include -- - #include "hald.h" - #include "hald_dbus.h" - #include "device.h" -diff -ur hal-0.5.8/hald/hald_runner.c hal-0.5.8-patched/hald/hald_runner.c ---- hal-0.5.8/hald/hald_runner.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/hald_runner.c 2006-11-15 11:52:24.000000000 -0600 -@@ -31,8 +31,6 @@ - #include - - #include --#include --#include - - #include "hald.h" - #include "util.h" -diff -ur hal-0.5.8/hald/linux/addons/addon-cpufreq.h hal-0.5.8-patched/hald/linux/addons/addon-cpufreq.h ---- hal-0.5.8/hald/linux/addons/addon-cpufreq.h 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/addons/addon-cpufreq.h 2006-11-15 11:52:24.000000000 -0600 -@@ -29,8 +29,6 @@ - #include - #endif - --#include --#include - #include - #include - #include -diff -ur hal-0.5.8/hald/linux/addons/addon-macbookpro-backlight.c hal-0.5.8-patched/hald/linux/addons/addon-macbookpro-backlight.c ---- hal-0.5.8/hald/linux/addons/addon-macbookpro-backlight.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/addons/addon-macbookpro-backlight.c 2006-11-15 11:52:24.000000000 -0600 -@@ -37,8 +37,6 @@ - #include - - #include --#include --#include - - #include "libhal/libhal.h" - #include "../../logger.h" -diff -ur hal-0.5.8/hald/linux/addons/addon-usb-csr.c hal-0.5.8-patched/hald/linux/addons/addon-usb-csr.c ---- hal-0.5.8/hald/linux/addons/addon-usb-csr.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/addons/addon-usb-csr.c 2006-11-15 11:52:24.000000000 -0600 -@@ -30,8 +30,6 @@ - #include - - #include --#include --#include - - #include "libhal/libhal.h" - #include "../../logger.h" -diff -ur hal-0.5.8/hald/linux/blockdev.c hal-0.5.8-patched/hald/linux/blockdev.c ---- hal-0.5.8/hald/linux/blockdev.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/blockdev.c 2006-11-15 11:52:24.000000000 -0600 -@@ -37,9 +37,6 @@ - #include - #include - --#include --#include -- - #include "../device_info.h" - #include "../hald.h" - #include "../hald_dbus.h" -diff -ur hal-0.5.8/hald/linux/classdev.c hal-0.5.8-patched/hald/linux/classdev.c ---- hal-0.5.8/hald/linux/classdev.c 2006-09-11 18:32:56.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/classdev.c 2006-11-15 11:52:24.000000000 -0600 -@@ -39,9 +39,6 @@ - #include - #include - --#include --#include -- - #include "../device_info.h" - #include "../device_store.h" - #include "../hald.h" -diff -ur hal-0.5.8/hald/linux/coldplug.c hal-0.5.8-patched/hald/linux/coldplug.c ---- hal-0.5.8/hald/linux/coldplug.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/coldplug.c 2006-11-15 11:52:24.000000000 -0600 -@@ -33,9 +33,6 @@ - #include - #include - --#include --#include -- - #include "../device_info.h" - #include "../hald.h" - #include "../logger.h" -diff -ur hal-0.5.8/hald/linux/hotplug.c hal-0.5.8-patched/hald/linux/hotplug.c ---- hal-0.5.8/hald/linux/hotplug.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/hotplug.c 2006-11-15 11:52:24.000000000 -0600 -@@ -32,9 +32,6 @@ - #include - #include - --#include --#include -- - #include "../device_info.h" - #include "../hald.h" - #include "../logger.h" -diff -ur hal-0.5.8/hald/linux/ids.c hal-0.5.8-patched/hald/linux/ids.c ---- hal-0.5.8/hald/linux/ids.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/ids.c 2006-11-15 11:56:11.000000000 -0600 -@@ -33,7 +33,6 @@ - #include - - #include --#include - - #include "../logger.h" - -diff -ur hal-0.5.8/hald/linux/osspec.c hal-0.5.8-patched/hald/linux/osspec.c ---- hal-0.5.8/hald/linux/osspec.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/osspec.c 2006-11-15 11:52:24.000000000 -0600 -@@ -44,9 +44,6 @@ - #include - #include - --#include --#include -- - #include "../device_info.h" - #include "../hald.h" - #include "../hald_dbus.h" -diff -ur hal-0.5.8/hald/linux/physdev.c hal-0.5.8-patched/hald/linux/physdev.c ---- hal-0.5.8/hald/linux/physdev.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/linux/physdev.c 2006-11-15 11:52:24.000000000 -0600 -@@ -31,9 +31,6 @@ - #include - #include - --#include --#include -- - #include "../device_info.h" - #include "../hald.h" - #include "../logger.h" -diff -ur hal-0.5.8/hald/util.c hal-0.5.8-patched/hald/util.c ---- hal-0.5.8/hald/util.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald/util.c 2006-11-15 11:52:24.000000000 -0600 -@@ -42,8 +42,6 @@ - #include - - #include --#include --#include - - #include "osspec.h" - #include "logger.h" -diff -ur hal-0.5.8/hald-runner/main.c hal-0.5.8-patched/hald-runner/main.c ---- hal-0.5.8/hald-runner/main.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald-runner/main.c 2006-11-15 11:52:24.000000000 -0600 -@@ -24,8 +24,6 @@ - **************************************************************************/ - #include - #include --#define DBUS_API_SUBJECT_TO_CHANGE --#include - - #include - #include "utils.h" -diff -ur hal-0.5.8/hald-runner/runner.c hal-0.5.8-patched/hald-runner/runner.c ---- hal-0.5.8/hald-runner/runner.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald-runner/runner.c 2006-11-15 11:56:42.000000000 -0600 -@@ -31,8 +31,7 @@ - #include - #include - --#define DBUS_API_SUBJECT_TO_CHANGE --#include -+#include - - #include - #include "utils.h" -diff -ur hal-0.5.8/hald-runner/runner.h hal-0.5.8-patched/hald-runner/runner.h ---- hal-0.5.8/hald-runner/runner.h 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald-runner/runner.h 2006-11-15 11:52:24.000000000 -0600 -@@ -25,9 +25,6 @@ - #ifndef RUNNER_H - #define RUNNER_H - --#define DBUS_API_SUBJECT_TO_CHANGE --#include -- - #include - - typedef struct { -diff -ur hal-0.5.8/hald-runner/utils.c hal-0.5.8-patched/hald-runner/utils.c ---- hal-0.5.8/hald-runner/utils.c 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald-runner/utils.c 2006-11-15 11:52:24.000000000 -0600 -@@ -24,8 +24,6 @@ - **************************************************************************/ - #include - #include --#define DBUS_API_SUBJECT_TO_CHANGE --#include - #include - - #include "utils.h" -diff -ur hal-0.5.8/hald-runner/utils.h hal-0.5.8-patched/hald-runner/utils.h ---- hal-0.5.8/hald-runner/utils.h 2006-09-11 16:56:39.000000000 -0500 -+++ hal-0.5.8-patched/hald-runner/utils.h 2006-11-15 11:52:35.000000000 -0600 -@@ -25,8 +25,7 @@ - #ifndef UTILS_H - #define UTILS_H - --#define DBUS_API_SUBJECT_TO_CHANGE --#include -+#include - - char **get_string_array(DBusMessageIter *iter, gchar *extra); - char **get_string_array_from_fd(int fd); -diff -ur hal-0.5.8/tools/lshal.c hal-0.5.8-patched/tools/lshal.c ---- hal-0.5.8/tools/lshal.c 2006-09-11 16:56:40.000000000 -0500 -+++ hal-0.5.8-patched/tools/lshal.c 2006-11-15 11:52:24.000000000 -0600 -@@ -36,8 +36,6 @@ - #include - - #include --#include --#include - #include - - #ifdef __SUNPRO_C diff --git a/package/hal/hal05-libtool-hack.patch b/package/hal/hal05-libtool-hack.patch deleted file mode 100644 index 1b7e112..0000000 --- a/package/hal/hal05-libtool-hack.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -ur hal-0.5.8/libhal-storage/Makefile.in hal-0.5.8-patched/libhal-storage/Makefile.in ---- hal-0.5.8/libhal-storage/Makefile.in 2006-09-11 18:25:32.000000000 -0500 -+++ hal-0.5.8-patched/libhal-storage/Makefile.in 2007-01-14 17:17:28.628840792 -0600 -@@ -354,8 +354,7 @@ - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ -- echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ -- $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ -+ cp -a "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - diff --git a/package/hal/hal06-libintl.patch b/package/hal/hal06-libintl.patch deleted file mode 100644 index d38124e..0000000 --- a/package/hal/hal06-libintl.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -ur hal-0.5.8/hald/Makefile.in hal-0.5.8-patched/hald/Makefile.in ---- hal-0.5.8/hald/Makefile.in 2006-09-11 18:25:30.000000000 -0500 -+++ hal-0.5.8-patched/hald/Makefile.in 2007-01-17 08:54:04.000000000 -0600 -@@ -336,7 +336,7 @@ - osspec.h \ - property.h property.c - --hald_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ -lm @EXPAT_LIB@ $(top_builddir)/hald/$(HALD_BACKEND)/libhald_$(HALD_BACKEND).la -+hald_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ -lm @EXPAT_LIB@ @INTLLIBS@ $(top_builddir)/hald/$(HALD_BACKEND)/libhald_$(HALD_BACKEND).la - - #### Init scripts fun - SCRIPT_IN_FILES = haldaemon.in -diff -ur hal-0.5.8/hald-runner/Makefile.in hal-0.5.8-patched/hald-runner/Makefile.in ---- hal-0.5.8/hald-runner/Makefile.in 2006-09-11 18:25:30.000000000 -0500 -+++ hal-0.5.8-patched/hald-runner/Makefile.in 2007-01-17 08:54:18.000000000 -0600 -@@ -303,7 +303,7 @@ - @DBUS_CFLAGS@ @GLIB_CFLAGS@ - - hald_runner_SOURCES = main.c runner.c runner.h utils.h utils.c --hald_runner_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ -+hald_runner_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ @INTLLIBS@ - all: all-am - - .SUFFIXES: diff --git a/package/libconfuse/libconfuse-2.6-dont-use-werror.patch b/package/libconfuse/libconfuse-2.6-dont-use-werror.patch deleted file mode 100644 index 50d0733..0000000 --- a/package/libconfuse/libconfuse-2.6-dont-use-werror.patch +++ /dev/null @@ -1,34 +0,0 @@ -confuse: don't compile with -Werror - -Werror isn't really a robust setting for !development. ---- - src/Makefile.am | 2 +- - src/Makefile.in | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -Index: confuse-2.6/src/Makefile.am -=================================================================== ---- confuse-2.6.orig/src/Makefile.am -+++ confuse-2.6/src/Makefile.am -@@ -10,7 +10,7 @@ - DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ - - if cc_is_gcc --AM_CFLAGS=-Wall -Werror -+AM_CFLAGS=-Wall - endif - - LIBS = @LIBS@ -Index: confuse-2.6/src/Makefile.in -=================================================================== ---- confuse-2.6.orig/src/Makefile.in -+++ confuse-2.6/src/Makefile.in -@@ -196,7 +196,7 @@ - libconfuse_la_SOURCES = confuse.c lexer.l - libconfuse_la_LIBADD = $(LTLIBINTL) - include_HEADERS = confuse.h --@cc_is_gcc_TRUE@AM_CFLAGS = -Wall -Werror -+@cc_is_gcc_TRUE@AM_CFLAGS = -Wall - CLEANFILES = *~ \#*\# - AM_LFLAGS = -Pcfg_yy -olex.yy.c - all: all-am diff --git a/package/liboil/Config.in b/package/liboil/Config.in deleted file mode 100644 index 0acbbfc..0000000 --- a/package/liboil/Config.in +++ /dev/null @@ -1,6 +0,0 @@ -config BR2_PACKAGE_LIBOIL - bool "liboil" - help - Library of simple functions that are optimized for various CPUs. - - http://liboil.freedesktop.org/ diff --git a/package/liboil/liboil-0.3.15-arm-vfp.patch b/package/liboil/liboil-0.3.15-arm-vfp.patch deleted file mode 100644 index 815c9bb..0000000 --- a/package/liboil/liboil-0.3.15-arm-vfp.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index 06a0ac9..b8d1640 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -158,7 +158,10 @@ if test x$HAVE_GCC_ASM = xyes -a x$HAVE_POWERPC = xyes ; then - true) - fi - --if test x$HAVE_GCC_ASM = xyes -a x$HAVE_ARM = xyes ; then -+AC_ARG_ENABLE(vfp, -+ AC_HELP_STRING([--enable-vfp],[compile with Vector Floating-point unit support]), -+ enable_vfp=$enableval,enable_vfp=yes) -+if test "x$enable-vfp" = xyes -a x$HAVE_GCC_ASM = xyes -a x$HAVE_ARM = xyes; then - AS_COMPILER_FLAG(["-Wa,-mfpu=vfp"], - [LIBOIL_CFLAGS="$LIBOIL_CFLAGS -mfpu=vfp"], - true) diff --git a/package/liboil/liboil-0.3.15-fixes-arm-softfloat-build.patch.arm b/package/liboil/liboil-0.3.15-fixes-arm-softfloat-build.patch.arm deleted file mode 100644 index c9a2be3..0000000 --- a/package/liboil/liboil-0.3.15-fixes-arm-softfloat-build.patch.arm +++ /dev/null @@ -1,39 +0,0 @@ -Patch generated from: -http://cgit.freedesktop.org/liboil/commit/?id=227782d45d14ca0d68ee73b54eab71c1582dcbfa - -From 227782d45d14ca0d68ee73b54eab71c1582dcbfa Mon Sep 17 00:00:00 2001 -From: Adrian Bunk -Date: Wed, 09 Sep 2009 13:31:40 +0000 -Subject: fix ARM -mfloat-abi=soft builds - -If __SOFTFP__ is defined, VFP support is not available -even when __VFP_FP__ is defined. ---- -diff --git a/liboil/arm/math_vfp.c b/liboil/arm/math_vfp.c -index ffd3981..0bed96e 100644 ---- a/liboil/arm/math_vfp.c -+++ b/liboil/arm/math_vfp.c -@@ -30,7 +30,7 @@ - #include - #include - --#if __VFP_FP__ -+#if defined(__VFP_FP__) && !defined(__SOFTFP__) - - extern void vfp_add_f32 (float *d, const float *s1, const float *s2, int n); - extern void vfp_add_f64 (double *d, const double *s1, const double *s2, int n); -diff --git a/liboil/arm/math_vfp_asm.S b/liboil/arm/math_vfp_asm.S -index ea68dba..ae5c803 100644 ---- a/liboil/arm/math_vfp_asm.S -+++ b/liboil/arm/math_vfp_asm.S -@@ -24,7 +24,7 @@ - * SUCH DAMAGE. - */ - --#if __VFP_FP__ -+#if defined(__VFP_FP__) && !defined(__SOFTFP__) - /* - ** compile with -mcpu=arm1136j-s -mfpu=vfp -mfloat-abi=softfp - ** --- -cgit v0.8.3-6-g21f6 diff --git a/package/liboil/liboil-0.3.15-no-examples.patch b/package/liboil/liboil-0.3.15-no-examples.patch deleted file mode 100644 index a79b5e7..0000000 --- a/package/liboil/liboil-0.3.15-no-examples.patch +++ /dev/null @@ -1,34 +0,0 @@ -[patch] liboil: don't build examples - -Signed-off-by: Peter Korsgaard ---- - Makefile.am | 2 +- - Makefile.in | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -Index: liboil-0.3.15/Makefile.am -=================================================================== ---- liboil-0.3.15.orig/Makefile.am -+++ liboil-0.3.15/Makefile.am -@@ -1,7 +1,7 @@ - - AUTOMAKE_OPTIONS = foreign - --SUBDIRS = liboil testsuite examples doc -+SUBDIRS = liboil testsuite doc - - EXTRA_DIST = COPYING autogen.sh gtk-doc.make HACKING BUG-REPORTING - -Index: liboil-0.3.15/Makefile.in -=================================================================== ---- liboil-0.3.15.orig/Makefile.in -+++ liboil-0.3.15/Makefile.in -@@ -259,7 +259,7 @@ - sysconfdir = @sysconfdir@ - target_alias = @target_alias@ - AUTOMAKE_OPTIONS = foreign --SUBDIRS = liboil testsuite examples doc -+SUBDIRS = liboil testsuite doc - EXTRA_DIST = COPYING autogen.sh gtk-doc.make HACKING BUG-REPORTING - DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc - pkgconfig_DATA = liboil-$(LIBOIL_MAJORMINOR).pc diff --git a/package/liboil/liboil.mk b/package/liboil/liboil.mk deleted file mode 100644 index 4350c0f..0000000 --- a/package/liboil/liboil.mk +++ /dev/null @@ -1,41 +0,0 @@ -############################################################# -# -# liboil -# -############################################################# -LIBOIL_VERSION = 0.3.15 -LIBOIL_SOURCE = liboil-$(LIBOIL_VERSION).tar.gz -LIBOIL_SITE = http://liboil.freedesktop.org/download -LIBOIL_AUTORECONF = YES -LIBOIL_INSTALL_STAGING = YES -LIBOIL_INSTALL_TARGET = YES - -# Checking if unaligned memory access works correctly cannot be done when cross -# compiling. For the following architectures there is no information available -# in the configure script. -ifeq ($(BR2_avr32),y) -LIBOIL_CONF_ENV = as_cv_unaligned_access=no -endif -ifeq ($(BR2_x86_64),y) -LIBOIL_CONF_ENV = as_cv_unaligned_access=yes -endif - -LIBOIL_CONF_OPT+=--with-gnu-ld - -ifeq ($(BR2_PACKAGE_LIBGLIB2),y) -LIBOIL_GLIB_DEP = libglib2 -endif - -ifeq ($(BR2_VFP_FLOAT),y) -LIBOIL_CONF_OPT+=--enable-vfp -endif - -LIBOIL_DEPENDENCIES = $(LIBOIL_GLIB_DEP) - -define LIBOIL_TARGET_CLEANUP - rm -f $(TARGET_DIR)/usr/bin/oil-bugreport -endef - -LIBOIL_POST_INSTALL_TARGET_HOOKS += LIBOIL_TARGET_CLEANUP - -$(eval $(call AUTOTARGETS,package,liboil)) diff --git a/package/linux-fusion/linux-fusion-8.1.2-fix-warnings-at-link-time.patch b/package/linux-fusion/linux-fusion-8.1.2-fix-warnings-at-link-time.patch deleted file mode 100644 index 7c46eaf..0000000 --- a/package/linux-fusion/linux-fusion-8.1.2-fix-warnings-at-link-time.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 7884688ba7a2e4cb7772cbedb34245a7fc9bf9d9 Mon Sep 17 00:00:00 2001 -From: Lionel Landwerlin -Date: Wed, 3 Nov 2010 10:25:17 +0100 -Subject: [PATCH] Fix warnings at link time - -Signed-off-by: Lionel Landwerlin ---- - linux/drivers/char/fusion/entries.c | 2 +- - linux/drivers/char/fusion/fusiondev.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/linux/drivers/char/fusion/entries.c b/linux/drivers/char/fusion/entries.c -index 11edd43..8d102cf 100644 ---- a/linux/drivers/char/fusion/entries.c -+++ b/linux/drivers/char/fusion/entries.c -@@ -28,7 +28,7 @@ - #include "fusiondev.h" - #include "entries.h" - --struct timeval now; -+static struct timeval now; - - void - fusion_entries_init(FusionEntries * entries, -diff --git a/linux/drivers/char/fusion/fusiondev.c b/linux/drivers/char/fusion/fusiondev.c -index 2457bc1..7c7680d 100644 ---- a/linux/drivers/char/fusion/fusiondev.c -+++ b/linux/drivers/char/fusion/fusiondev.c -@@ -64,7 +64,7 @@ - MODULE_LICENSE("GPL"); - MODULE_AUTHOR("Denis Oliver Kropp "); - --struct proc_dir_entry *proc_fusion_dir; -+static struct proc_dir_entry *proc_fusion_dir; - - static int fusion_major = FUSION_MAJOR; - --- -1.6.0.6 - diff --git a/package/lite/no_tests.patch b/package/lite/no_tests.patch deleted file mode 100644 index c6e8092..0000000 --- a/package/lite/no_tests.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.in.orig 2008-07-07 13:07:12.000000000 +0200 -+++ Makefile.in 2008-07-07 13:07:05.000000000 +0200 -@@ -202,7 +202,7 @@ - target_vendor = @target_vendor@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ --SUBDIRS = data fonts lite leck examples tests -+SUBDIRS = data fonts lite leck examples - EXTRA_DIST = TODO lite.pc.in leck.pc.in - pkgconfigdir = $(libdir)/pkgconfig - pkgconfig_DATA = lite.pc leck.pc diff --git a/package/lsof/lsof-4.84-makefile.patch b/package/lsof/lsof-4.84-makefile.patch deleted file mode 100644 index 65b1b2e..0000000 --- a/package/lsof/lsof-4.84-makefile.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -ru lsof_4.81.orig/lsof_4.81_src/lib/Makefile.skel lsof_4.81/lsof_4.81_src/lib/Makefile.skel ---- a/lib/Makefile.skel 2001-02-13 03:12:22.000000000 +0100 -+++ b/lib/Makefile.skel 2006-11-29 13:51:44.000000000 +0100 -@@ -21,8 +21,8 @@ - all: ${LIB} - - ${LIB}: ${OBJ} -- ${AR} -- ${RANLIB} -+ ${AR} cr ${LIB} ${OBJ} -+ ${RANLIB} ${LIB} - - clean: FRC - rm -f ${LIB} ${OBJ} errs Makefile.bak a.out core diff --git a/package/lsof/lsof-4.84-noportmap.patch b/package/lsof/lsof-4.84-noportmap.patch deleted file mode 100644 index 984e0d8..0000000 --- a/package/lsof/lsof-4.84-noportmap.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/print.c 2006-08-23 13:37:43.000000000 -0600 -+++ b/print.c 2006-08-23 13:38:29.000000000 -0600 -@@ -148,6 +148,7 @@ - static void - fill_portmap() - { -+#if !defined __UCLIBC__ || (defined __UCLIBC__ && defined __UCLIBC_HAS_RPC__) - char buf[128], *cp, *nm; - CLIENT *c; - int h, port, pr; -@@ -266,6 +267,7 @@ - Pth[pr][h] = pt; - } - clnt_destroy(c); -+#endif - } - - diff --git a/package/lsof/lsof-4.84-override-cflags.patch b/package/lsof/lsof-4.84-override-cflags.patch deleted file mode 100644 index 135e599..0000000 --- a/package/lsof/lsof-4.84-override-cflags.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- lsof_4.84/Configure 2008-10-21 18:21:45.000000000 +0200 -+++ lsof_4.84/Configure 2010-11-03 14:00:00.000000000 +0100 -@@ -5206,6 +5206,10 @@ - cp $LSOF_MKFC ${LSOF_LIB}/$LSOF_LIBMKF - fi # } - cat ./dialects/$LSOF_DIALECT_DIR/$LSOF_REST >> $LSOF_MKFC -+if test "X$LSOF_CFLAGS_OVERRIDE" != "X" # { -+then -+ sed -i -e 's/^CFLAGS=/override CFLAGS=/' $LSOF_MKFC -+fi # } - if test "X$LSOF_LIB_NO" = "X" # { - then - diff --git a/package/lsof/lsof-4.84-remove-susvlegacy-funcs.patch b/package/lsof/lsof-4.84-remove-susvlegacy-funcs.patch deleted file mode 100644 index fca66ae..0000000 --- a/package/lsof/lsof-4.84-remove-susvlegacy-funcs.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -rdup lsof_4.81.orig/lsof_4.81_src/dialects/linux/machine.h lsof_4.81/lsof_4.81_src/dialects/linux/machine.h ---- a/dialects/linux/machine.h 2007-04-24 18:20:58.000000000 +0200 -+++ b/dialects/linux/machine.h 2007-05-15 12:17:03.000000000 +0200 -@@ -616,6 +616,6 @@ - * zeromem is a macro that uses bzero or memset. - */ - --#define zeromem(a, l) bzero(a, l) -+#define zeromem(a, l) memset(a, 0, l) - - #endif /* !defined(LSOF_MACHINE_H) */ - diff --git a/package/lzma/lzmacheck.sh b/package/lzma/lzmacheck.sh deleted file mode 100755 index bcb0423..0000000 --- a/package/lzma/lzmacheck.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -bin=$(toolchain/dependencies/check-host-lzma.sh) -if [ "x$bin" = "x" ] ; then - echo build-lzma-host-binary -else - echo use-lzma-host-binary -fi - diff --git a/package/lzo/lzo-2.03-acinclude-m4.patch b/package/lzo/lzo-2.03-acinclude-m4.patch deleted file mode 100644 index 8f860f4..0000000 --- a/package/lzo/lzo-2.03-acinclude-m4.patch +++ /dev/null @@ -1,377 +0,0 @@ -The lzo tarball only contains an aclocal.m4, which is the result from -running aclocal. Unfortunately, it lacks the acinclude.m4 file which -would allow us to do an autoreconf of the package. Therefore, this -patch extracts from aclocal.m4 the parts that are specific to this lzo -package, and put them into an acinclude.m4 so that autoreconf on this -package will work. - -Signed-off-by: Thomas Petazzoni ---- - acinclude.m4 | 360 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 360 insertions(+) - -Index: lzo-2.03/acinclude.m4 -=================================================================== ---- /dev/null -+++ lzo-2.03/acinclude.m4 -@@ -0,0 +1,360 @@ -+# /*********************************************************************** -+# // standard ACC macros -+# ************************************************************************/ -+ -+AC_DEFUN([mfx_ACC_CHECK_ENDIAN], [ -+AC_C_BIGENDIAN([AC_DEFINE(ACC_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(ACC_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])]) -+])# -+ -+AC_DEFUN([mfx_ACC_CHECK_HEADERS], [ -+AC_HEADER_TIME -+AC_CHECK_HEADERS([assert.h ctype.h dirent.h errno.h fcntl.h float.h limits.h malloc.h memory.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h utime.h sys/mman.h sys/resource.h sys/stat.h sys/time.h sys/types.h sys/wait.h]) -+])# -+ -+AC_DEFUN([mfx_ACC_CHECK_FUNCS], [ -+AC_CHECK_FUNCS(access alloca atexit atoi atol chmod chown clock_getcpuclockid clock_getres clock_gettime ctime difftime fstat getenv getpagesize getrusage gettimeofday gmtime isatty localtime longjmp lstat memcmp memcpy memmove memset mkdir mktime mmap mprotect munmap qsort raise rmdir setjmp signal snprintf strcasecmp strchr strdup strerror strftime stricmp strncasecmp strnicmp strrchr strstr time umask utime vsnprintf) -+])# -+ -+ -+AC_DEFUN([mfx_ACC_CHECK_SIZEOF], [ -+AC_CHECK_SIZEOF(short) -+AC_CHECK_SIZEOF(int) -+AC_CHECK_SIZEOF(long) -+ -+AC_CHECK_SIZEOF(long long) -+AC_CHECK_SIZEOF(__int16) -+AC_CHECK_SIZEOF(__int32) -+AC_CHECK_SIZEOF(__int64) -+ -+AC_CHECK_SIZEOF(void *) -+AC_CHECK_SIZEOF(size_t) -+AC_CHECK_SIZEOF(ptrdiff_t) -+])# -+ -+ -+# /*********************************************************************** -+# // Check for ACC_conformance -+# ************************************************************************/ -+ -+AC_DEFUN([mfx_ACC_ACCCHK], [ -+mfx_tmp=$1 -+mfx_save_CPPFLAGS=$CPPFLAGS -+dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here -+test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS" -+ -+AC_MSG_CHECKING([whether your compiler passes the ACC conformance test]) -+ -+AC_LANG_CONFTEST([AC_LANG_PROGRAM( -+[[#define ACC_CONFIG_NO_HEADER 1 -+#include "acc/acc.h" -+#include "acc/acc_incd.h" -+#undef ACCCHK_ASSERT -+#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr) -+#include "acc/acc_chk.ch" -+#undef ACCCHK_ASSERT -+static void test_acc_compile_time_assert(void) { -+#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr) -+#include "acc/acc_chk.ch" -+#undef ACCCHK_ASSERT -+} -+#undef NDEBUG -+#include -+static int test_acc_run_time_assert(int r) { -+#define ACCCHK_ASSERT(expr) assert(expr); -+#include "acc/acc_chk.ch" -+#undef ACCCHK_ASSERT -+return r; -+} -+]], [[ -+test_acc_compile_time_assert(); -+if (test_acc_run_time_assert(1) != 1) return 1; -+]] -+)]) -+ -+mfx_tmp=FAILED -+_AC_COMPILE_IFELSE([], [mfx_tmp=yes]) -+rm -f conftest.$ac_ext conftest.$ac_objext -+ -+CPPFLAGS=$mfx_save_CPPFLAGS -+ -+AC_MSG_RESULT([$mfx_tmp]) -+case x$mfx_tmp in -+ xpassed | xyes) ;; -+ *) -+ AC_MSG_NOTICE([]) -+ AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ]) -+ AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending]) -+ AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.]) -+ AC_MSG_NOTICE([Thanks for your support.]) -+ AC_MSG_NOTICE([]) -+ AC_MSG_ERROR([ACC conformance test failed. Stop.]) -+dnl AS_EXIT -+ ;; -+esac -+])# mfx_ACC_ACCCHK -+ -+ -+# /*********************************************************************** -+# // Check for ACC_conformance -+# ************************************************************************/ -+ -+AC_DEFUN([mfx_MINIACC_ACCCHK], [ -+mfx_tmp=$1 -+mfx_save_CPPFLAGS=$CPPFLAGS -+dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here -+test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS" -+ -+AC_MSG_CHECKING([whether your compiler passes the ACC conformance test]) -+ -+AC_LANG_CONFTEST([AC_LANG_PROGRAM( -+[[#define ACC_CONFIG_NO_HEADER 1 -+#define ACC_WANT_ACC_INCD_H 1 -+#include $2 -+ -+#define ACC_WANT_ACC_CHK_CH 1 -+#undef ACCCHK_ASSERT -+#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr) -+#include $2 -+ -+#define ACC_WANT_ACC_CHK_CH 1 -+#undef ACCCHK_ASSERT -+#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr) -+static void test_acc_compile_time_assert(void) { -+#include $2 -+} -+ -+#undef NDEBUG -+#include -+#define ACC_WANT_ACC_CHK_CH 1 -+#undef ACCCHK_ASSERT -+#define ACCCHK_ASSERT(expr) assert(expr); -+static int test_acc_run_time_assert(int r) { -+#include $2 -+return r; -+} -+]], [[ -+test_acc_compile_time_assert(); -+if (test_acc_run_time_assert(1) != 1) return 1; -+]] -+)]) -+ -+mfx_tmp=FAILED -+_AC_COMPILE_IFELSE([], [mfx_tmp=yes]) -+rm -f conftest.$ac_ext conftest.$ac_objext -+ -+CPPFLAGS=$mfx_save_CPPFLAGS -+ -+AC_MSG_RESULT([$mfx_tmp]) -+case x$mfx_tmp in -+ xpassed | xyes) ;; -+ *) -+ AC_MSG_NOTICE([]) -+ AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ]) -+ AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending]) -+ AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.]) -+ AC_MSG_NOTICE([Thanks for your support.]) -+ AC_MSG_NOTICE([]) -+ AC_MSG_ERROR([ACC conformance test failed. Stop.]) -+dnl AS_EXIT -+ ;; -+esac -+])# mfx_MINIACC_ACCCHK -+ -+ -+ -+# serial 1 -+ -+AC_DEFUN([mfx_PROG_CPPFLAGS], [ -+AC_MSG_CHECKING([whether the C preprocessor needs special flags]) -+ -+AC_LANG_CONFTEST([AC_LANG_PROGRAM( -+[[#include -+#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul) -+# include "your C preprocessor is broken 1" -+#elif (0xffffu == 0xfffffffful) -+# include "your C preprocessor is broken 2" -+#elif (32767 >= ULONG_MAX) || (65535u >= ULONG_MAX) -+# include "your C preprocessor is broken 3" -+#endif -+]], [[ ]] -+)]) -+ -+mfx_save_CPPFLAGS=$CPPFLAGS -+mfx_tmp=ERROR -+for mfx_arg in "" -no-cpp-precomp -+do -+ CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS" -+ _AC_COMPILE_IFELSE([], -+[mfx_tmp=$mfx_arg -+break]) -+done -+CPPFLAGS=$mfx_save_CPPFLAGS -+rm -f conftest.$ac_ext conftest.$ac_objext -+case x$mfx_tmp in -+ x) -+ AC_MSG_RESULT([none needed]) ;; -+ xERROR) -+ AC_MSG_RESULT([ERROR]) -+ AC_MSG_ERROR([your C preprocessor is broken - for details see config.log]) -+ ;; -+ *) -+ AC_MSG_RESULT([$mfx_tmp]) -+ CPPFLAGS="$mfx_tmp $CPPFLAGS" -+ ;; -+esac -+])# mfx_PROG_CPPFLAGS -+ -+# serial 3 -+ -+AC_DEFUN([mfx_CHECK_HEADER_SANE_LIMITS_H], [ -+AC_CACHE_CHECK([whether limits.h is sane], -+mfx_cv_header_sane_limits_h, -+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include -+#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul) -+# if defined(__APPLE__) && defined(__GNUC__) -+# error "your preprocessor is broken - use compiler option -no-cpp-precomp" -+# else -+# include "your preprocessor is broken" -+# endif -+#endif -+#define MFX_0xffff 0xffff -+#define MFX_0xffffffffL 4294967295ul -+#if !defined(CHAR_BIT) || (CHAR_BIT != 8) -+# include "error CHAR_BIT" -+#endif -+#if !defined(UCHAR_MAX) -+# include "error UCHAR_MAX 1" -+#endif -+#if !defined(USHRT_MAX) -+# include "error USHRT_MAX 1" -+#endif -+#if !defined(UINT_MAX) -+# include "error UINT_MAX 1" -+#endif -+#if !defined(ULONG_MAX) -+# include "error ULONG_MAX 1" -+#endif -+#if !defined(SHRT_MAX) -+# include "error SHRT_MAX 1" -+#endif -+#if !defined(INT_MAX) -+# include "error INT_MAX 1" -+#endif -+#if !defined(LONG_MAX) -+# include "error LONG_MAX 1" -+#endif -+#if (UCHAR_MAX < 1) -+# include "error UCHAR_MAX 2" -+#endif -+#if (USHRT_MAX < 1) -+# include "error USHRT_MAX 2" -+#endif -+#if (UINT_MAX < 1) -+# include "error UINT_MAX 2" -+#endif -+#if (ULONG_MAX < 1) -+# include "error ULONG_MAX 2" -+#endif -+#if (UCHAR_MAX < 0xff) -+# include "error UCHAR_MAX 3" -+#endif -+#if (USHRT_MAX < MFX_0xffff) -+# include "error USHRT_MAX 3" -+#endif -+#if (UINT_MAX < MFX_0xffff) -+# include "error UINT_MAX 3" -+#endif -+#if (ULONG_MAX < MFX_0xffffffffL) -+# include "error ULONG_MAX 3" -+#endif -+#if (USHRT_MAX > UINT_MAX) -+# include "error USHRT_MAX vs UINT_MAX" -+#endif -+#if (UINT_MAX > ULONG_MAX) -+# include "error UINT_MAX vs ULONG_MAX" -+#endif -+]], [[ -+#if (USHRT_MAX == MFX_0xffff) -+{ typedef char a_short2a[1 - 2 * !(sizeof(short) == 2)]; } -+#elif (USHRT_MAX >= MFX_0xffff) -+{ typedef char a_short2b[1 - 2 * !(sizeof(short) > 2)]; } -+#endif -+#if (UINT_MAX == MFX_0xffff) -+{ typedef char a_int2a[1 - 2 * !(sizeof(int) == 2)]; } -+#elif (UINT_MAX >= MFX_0xffff) -+{ typedef char a_int2b[1 - 2 * !(sizeof(int) > 2)]; } -+#endif -+#if (ULONG_MAX == MFX_0xffff) -+{ typedef char a_long2a[1 - 2 * !(sizeof(long) == 2)]; } -+#elif (ULONG_MAX >= MFX_0xffff) -+{ typedef char a_long2b[1 - 2 * !(sizeof(long) > 2)]; } -+#endif -+#if !defined(_CRAY1) /* CRAY PVP systems */ -+#if (USHRT_MAX == MFX_0xffffffffL) -+{ typedef char a_short4a[1 - 2 * !(sizeof(short) == 4)]; } -+#elif (USHRT_MAX >= MFX_0xffffffffL) -+{ typedef char a_short4b[1 - 2 * !(sizeof(short) > 4)]; } -+#endif -+#endif /* _CRAY1 */ -+#if (UINT_MAX == MFX_0xffffffffL) -+{ typedef char a_int4a[1 - 2 * !(sizeof(int) == 4)]; } -+#elif (UINT_MAX >= MFX_0xffffffffL) -+{ typedef char a_int4b[1 - 2 * !(sizeof(int) > 4)]; } -+#endif -+#if (ULONG_MAX == MFX_0xffffffffL) -+{ typedef char a_long4a[1 - 2 * !(sizeof(long) == 4)]; } -+#elif (ULONG_MAX >= MFX_0xffffffffL) -+{ typedef char a_long4b[1 - 2 * !(sizeof(long) > 4)]; } -+#endif -+]])], -+[mfx_cv_header_sane_limits_h=yes], -+[mfx_cv_header_sane_limits_h=no])]) -+]) -+ -+# /*********************************************************************** -+# // standard -+# ************************************************************************/ -+ -+AC_DEFUN([mfx_LZO_CHECK_ENDIAN], [ -+AC_C_BIGENDIAN([AC_DEFINE(LZO_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(LZO_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])]) -+])# -+ -+ -+# /*********************************************************************** -+# // -+# ************************************************************************/ -+ -+dnl more types which are not yet covered by ACC -+ -+AC_DEFUN([mfx_CHECK_SIZEOF], [ -+AC_CHECK_SIZEOF(__int32) -+AC_CHECK_SIZEOF(intmax_t) -+AC_CHECK_SIZEOF(uintmax_t) -+AC_CHECK_SIZEOF(intptr_t) -+AC_CHECK_SIZEOF(uintptr_t) -+ -+AC_CHECK_SIZEOF(float) -+AC_CHECK_SIZEOF(double) -+AC_CHECK_SIZEOF(long double) -+ -+AC_CHECK_SIZEOF(dev_t) -+AC_CHECK_SIZEOF(fpos_t) -+AC_CHECK_SIZEOF(mode_t) -+AC_CHECK_SIZEOF(off_t) -+AC_CHECK_SIZEOF(ssize_t) -+AC_CHECK_SIZEOF(time_t) -+])# -+ -+ -+ -+AC_DEFUN([mfx_CHECK_LIB_WINMM], [ -+if test "X$GCC" = Xyes; then -+case $host_os in -+cygwin* | mingw* | pw32*) -+ test "X$LIBS" != "X" && LIBS="$LIBS " -+ LIBS="${LIBS}-lwinmm" ;; -+*) -+ ;; -+esac -+fi -+])# diff --git a/package/lzo/lzo-2.03-fix-configure-ac.patch b/package/lzo/lzo-2.03-fix-configure-ac.patch deleted file mode 100644 index 26aece7..0000000 --- a/package/lzo/lzo-2.03-fix-configure-ac.patch +++ /dev/null @@ -1,21 +0,0 @@ -_AC_SRCPATHS doesn't exist in autoconf, _AC_SRCDIRS should be used -instead according to many reports found by Google. - -Signed-off-by: Thomas Petazzoni ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: lzo-2.03/configure.ac -=================================================================== ---- lzo-2.03.orig/configure.ac -+++ lzo-2.03/configure.ac -@@ -48,7 +48,7 @@ - AM_MAINTAINER_MODE - - if test -z "$ac_abs_top_srcdir"; then -- _AC_SRCPATHS(.) -+ _AC_SRCDIRS(.) - fi - if test -r .Conf.settings1; then - . ./.Conf.settings1 diff --git a/package/lzo/lzo-2.03-fix-makefile-am.patch b/package/lzo/lzo-2.03-fix-makefile-am.patch deleted file mode 100644 index 9f23e40..0000000 --- a/package/lzo/lzo-2.03-fix-makefile-am.patch +++ /dev/null @@ -1,24 +0,0 @@ -Makefile.am is not allowed to override CFLAGS/CPPFLAGS, it must use -AM_CFLAGS and AM_CPPFLAGS. This is needed in order for autoreconf to -work on this package. - -Signed-off-by: Thomas Petazzoni ---- - src/Makefile.am | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: lzo-2.03/src/Makefile.am -=================================================================== ---- lzo-2.03.orig/src/Makefile.am -+++ lzo-2.03/src/Makefile.am -@@ -7,8 +7,8 @@ - SUFFIXES = .S - - INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir) --CPPFLAGS = $(LZO_CPPFLAGS) $(configure_CPPFLAGS) $(LZO_EXTRA_CPPFLAGS) --CFLAGS = $(LZO_CFLAGS) $(configure_CFLAGS) $(LZO_EXTRA_CFLAGS) -+AM_CPPFLAGS = $(LZO_CPPFLAGS) $(configure_CPPFLAGS) $(LZO_EXTRA_CPPFLAGS) -+AM_CFLAGS = $(LZO_CFLAGS) $(configure_CFLAGS) $(LZO_EXTRA_CFLAGS) - - lib_LTLIBRARIES = liblzo2.la - diff --git a/package/mc/Config.in b/package/mc/Config.in deleted file mode 100755 index eaf843b..0000000 --- a/package/mc/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -config BR2_PACKAGE_MC - bool "mc" - select BR2_PACKAGE_NCURSES - help - GNU Midnight Commander is a visual file manager, licensed under - GNU General Public License and therefore qualifies as Free Software. - It's a feature rich full-screen text mode application that allows - you to copy, move and delete files and whole directory trees, search - for files and run commands in the subshell. Internal viewer and - editor are included. - - http://www.midnight-commander.org/ diff --git a/package/mc/mc.mk b/package/mc/mc.mk deleted file mode 100755 index da4ca5d..0000000 --- a/package/mc/mc.mk +++ /dev/null @@ -1,30 +0,0 @@ -############################################################# -# -# mc -# -############################################################# -MC_VERSION = 4.7.5.2 -MC_SITE = http://www.midnight-commander.org/downloads/ -MC_DEPENDENCIES += ncurses -MC_CONF_OPT += \ - --with-screen=ncurses \ - --with-ncurses-libs=$(STAGING_DIR)/usr/lib \ - --with-ncurses-includes=$(STAGING_DIR)/usr/include \ - --disable-rpath - -ifneq ($(BR2_LARGEFILE),y) - MC_CONF_OPT += --disable-largefile -endif - -# MC requires ncurses includes to be instlled in .../usr/include/ncurses -# folder but not in .../usr/include. -define MC_FIX_NCURSES_INCLUDE_DIR - /bin/mkdir -p $(STAGING_DIR)/usr/include/ncurses - /bin/cp -dpf $(STAGING_DIR)/usr/include/curses.h $(STAGING_DIR)/usr/include/ncurses/curses.h - /bin/cp -dpf $(STAGING_DIR)/usr/include/term.h $(STAGING_DIR)/usr/include/ncurses/term.h - (cd $(STAGING_DIR)/usr/include/ncurses; /bin/ln -fs curses.h ncurses.h) -endef - -MC_PRE_CONFIGURE_HOOKS += MC_FIX_NCURSES_INCLUDE_DIR - -$(eval $(call AUTOTARGETS,package,mc)) diff --git a/package/monit/Config.in b/package/monit/Config.in deleted file mode 100755 index 4415459..0000000 --- a/package/monit/Config.in +++ /dev/null @@ -1,9 +0,0 @@ -config BR2_PACKAGE_MONIT - bool "monit" - help - Monit is a free open source utility for managing and monitoring, - processes, files, directories and filesystems on a UNIX system. - Monit conducts automatic maintenance and repair and can execute - meaningful causal actions in error situations. - - http://mmonit.com/monit/ diff --git a/package/monit/monit.mk b/package/monit/monit.mk deleted file mode 100755 index 57c3fbe..0000000 --- a/package/monit/monit.mk +++ /dev/null @@ -1,28 +0,0 @@ -############################################################# -# -# monit -# -############################################################# -MONIT_VERSION = 5.2.5 -MONIT_SITE = http://mmonit.com/monit/dist/ - -ifneq ($(BR2_PACKAGE_OPENSSL),y) -MONIT_CONF_OPT += --without-ssl -else -MONIT_CONF_OPT += \ - --with-ssl-incl-dir=$(STAGING_DIR)/usr/include \ - --with-ssl-lib-dir=$(STAGING_DIR)/usr/lib -MONIT_DEPENDENCIES += openssl -endif - -define MONIT_INSTALL_TARGET_CMDS - $(INSTALL) -m 0755 $(@D)/monit $(TARGET_DIR)/usr/bin/monit - $(INSTALL) -m 0644 $(@D)/monitrc $(TARGET_DIR)/etc/monitrc - $(INSTALL) -d -m 0777 $(TARGET_DIR)/etc/monit.d -endef - -define MONIT_UNINSTALL_TARGET_CMDS - rm -f $(TARGET_DIR)/usr/bin/monit -endef - -$(eval $(call AUTOTARGETS,package,monit)) diff --git a/package/multimedia/mpd/mpd-0.16.2-tremor-needs-ogg_common.patch b/package/multimedia/mpd/mpd-0.16.2-tremor-needs-ogg_common.patch deleted file mode 100644 index d315f14..0000000 --- a/package/multimedia/mpd/mpd-0.16.2-tremor-needs-ogg_common.patch +++ /dev/null @@ -1,20 +0,0 @@ -[PATCH] configure: tremor needs common ogg support just like libvorbis does - -Signed-off-by: Peter Korsgaard ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: mpd-0.16.2/configure.ac -=================================================================== ---- mpd-0.16.2.orig/configure.ac -+++ mpd-0.16.2/configure.ac -@@ -1081,7 +1081,7 @@ - fi - - AM_CONDITIONAL(HAVE_OGG_COMMON, -- test x$enable_vorbis = xyes || test x$enable_oggflac = xyes || test x$enable_flac = xyes) -+ test x$enable_vorbis = xyes || test x$enable_tremor = xyes || test x$enable_oggflac = xyes || test x$enable_flac = xyes) - - AM_CONDITIONAL(HAVE_FLAC_COMMON, - test x$enable_flac = xyes || test x$enable_oggflac = xyes) diff --git a/package/multimedia/swfdec/Config.in b/package/multimedia/swfdec/Config.in deleted file mode 100644 index bc1c73a..0000000 --- a/package/multimedia/swfdec/Config.in +++ /dev/null @@ -1,35 +0,0 @@ -config BR2_PACKAGE_SWFDEC - bool "swfdec" - depends on BR2_USE_WCHAR # glib2 - depends on BR2_INSTALL_LIBSTDCPP # pango - select BR2_PACKAGE_LIBOIL - select BR2_PACKAGE_ALSA_LIB - select BR2_PACKAGE_PANGO - select BR2_PACKAGE_CAIRO - select BR2_PACKAGE_CAIRO_PNG - help - Library to play Flash files - - http://swfdec.freedesktop.org/ - -config BR2_PACKAGE_SWFDEC_GTK_SUPPORT - bool "gtk support" - depends on BR2_PACKAGE_SWFDEC - depends on BR2_PACKAGE_LIBGTK2 - select BR2_PACKAGE_LIBSOUP - default y - help - Swfdec-gtk library is used for easy integration - of swfdec in GTK applications - -config BR2_PACKAGE_SWFDEC_GSTREAMER - bool "gstreamer support" - depends on BR2_PACKAGE_SWFDEC - depends on BR2_PACKAGE_GSTREAMER - select BR2_PACKAGE_GST_PLUGINS_BASE - default y - help - Enables GStreamer support - -comment "swfdec requires a toolchain with WCHAR and C++ support" - depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP diff --git a/package/multimedia/swfdec/swfdec.mk b/package/multimedia/swfdec/swfdec.mk deleted file mode 100644 index 9b4b729..0000000 --- a/package/multimedia/swfdec/swfdec.mk +++ /dev/null @@ -1,37 +0,0 @@ -############################################################# -# -# Swfdec -# -############################################################# -SWFDEC_VERSION_MAJOR = 0.8 -SWFDEC_VERSION_MINOR = 4 -SWFDEC_VERSION = $(SWFDEC_VERSION_MAJOR).$(SWFDEC_VERSION_MINOR) -SWFDEC_SOURCE = swfdec-$(SWFDEC_VERSION).tar.gz -SWFDEC_SITE = http://swfdec.freedesktop.org/download/swfdec/$(SWFDEC_VERSION_MAJOR) -SWFDEC_MAKE_OPT = \ - GLIB_MKENUMS=$(HOST_DIR)/usr/bin/glib-mkenums \ - GLIB_GENMARSHAL=$(HOST_DIR)/usr/bin/glib-genmarshal - -SWFDEC_INSTALL_STAGING = YES -SWFDEC_INSTALL_TARGET = YES - -SWFDEC_DEPENDENCIES = liboil alsa-lib pango cairo host-pkg-config - -ifeq ($(BR2_PACKAGE_SWFDEC_GSTREAMER),y) -SWFDEC_DEPENDENCIES += gstreamer gst-plugins-base -else -SWFDEC_CONF_OPT += --disable-gstreamer -endif - -ifeq ($(BR2_PACKAGE_SWFDEC_GTK_SUPPORT),y) -SWFDEC_DEPENDENCIES += libgtk2 libsoup -else -SWFDEC_CONF_OPT += --disable-gtk -endif - -$(eval $(call AUTOTARGETS,package/multimedia,swfdec)) - -# swfdec uses glib-* at install time -# Notice: must come after AUTOTARGETS as that's where these variables gets set -SWFDEC_INSTALL_TARGET_OPT += $(SWFDEC_MAKE_OPT) -SWFDEC_INSTALL_STAGING_OPT += $(SWFDEC_MAKE_OPT) diff --git a/package/multimedia/taglib/taglib-1.5-libtool.patch b/package/multimedia/taglib/taglib-1.5-libtool.patch deleted file mode 100644 index d4160f0..0000000 --- a/package/multimedia/taglib/taglib-1.5-libtool.patch +++ /dev/null @@ -1,4084 +0,0 @@ -[PATCH] fix libtool - -Update to 1.5.22 so it doesn't get confused about rpath, and apply -buildroot-libtool-v1.5.patch so cross compilation works. - -Signed-off-by: Peter Korsgaard ---- - admin/ltmain.sh | 2080 ++++++++++++++++++++++++++++++++++---------------------- - 1 file changed, 1284 insertions(+), 796 deletions(-) - -Index: taglib-1.5/admin/ltmain.sh -=================================================================== ---- taglib-1.5.orig/admin/ltmain.sh -+++ taglib-1.5/admin/ltmain.sh -@@ -1,7 +1,7 @@ - # ltmain.sh - Provide generalized library-building support services. - # NOTE: Changing this file will not affect anything until you rerun configure. - # --# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003 -+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 - # Free Software Foundation, Inc. - # Originally by Gordon Matzigkeit , 1996 - # -@@ -24,6 +24,34 @@ - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+basename="s,^.*/,,g" -+ -+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -+# is ksh but when the shell is invoked as "sh" and the current value of -+# the _XPG environment variable is not equal to 1 (one), the special -+# positional parameter $0, within a function call, is the name of the -+# function. -+progpath="$0" -+ -+# The name of this program: -+progname=`echo "$progpath" | $SED $basename` -+modename="$progname" -+ -+# Global variables: -+EXIT_SUCCESS=0 -+EXIT_FAILURE=1 -+ -+PROGRAM=ltmain.sh -+PACKAGE=libtool -+VERSION=1.5.22 -+TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" -+ -+# See if we are running on zsh, and set the options which allow our -+# commands through without removal of \ escapes. -+if test -n "${ZSH_VERSION+set}" ; then -+ setopt NO_GLOB_SUBST -+fi -+ - # Check that we have a working $echo. - if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. -@@ -36,7 +64,7 @@ - : - else - # Restart under the correct shell, and then maybe $echo will work. -- exec $SHELL "$0" --no-reexec ${1+"$@"} -+ exec $SHELL "$progpath" --no-reexec ${1+"$@"} - fi - - if test "X$1" = X--fallback-echo; then -@@ -45,19 +73,9 @@ - cat <&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - # Global variables. -@@ -111,6 +132,8 @@ - show="$echo" - show_help= - execute_dlfiles= -+duplicate_deps=no -+preserve_args= - lo2o="s/\\.lo\$/.${objext}/" - o2lo="s/\\.${objext}\$/.lo/" - -@@ -118,10 +141,51 @@ - # Shell function definitions: - # This seems to be the best place for them - -+# func_mktempdir [string] -+# Make a temporary directory that won't clash with other running -+# libtool processes, and avoids race conditions if possible. If -+# given, STRING is the basename for that directory. -+func_mktempdir () -+{ -+ my_template="${TMPDIR-/tmp}/${1-$progname}" -+ -+ if test "$run" = ":"; then -+ # Return a directory name, but don't create it in dry-run mode -+ my_tmpdir="${my_template}-$$" -+ else -+ -+ # If mktemp works, use that first and foremost -+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` -+ -+ if test ! -d "$my_tmpdir"; then -+ # Failing that, at least try and use $RANDOM to avoid a race -+ my_tmpdir="${my_template}-${RANDOM-0}$$" -+ -+ save_mktempdir_umask=`umask` -+ umask 0077 -+ $mkdir "$my_tmpdir" -+ umask $save_mktempdir_umask -+ fi -+ -+ # If we're not in dry-run mode, bomb out on failure -+ test -d "$my_tmpdir" || { -+ $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 -+ exit $EXIT_FAILURE -+ } -+ fi -+ -+ $echo "X$my_tmpdir" | $Xsed -+} -+ -+ -+# func_win32_libid arg -+# return the library type of file 'arg' -+# - # Need a lot of goo to handle *both* DLLs and import libs - # Has to be a shell function in order to 'eat' the argument - # that is supplied when $file_magic_command is called. --win32_libid () { -+func_win32_libid () -+{ - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in -@@ -130,17 +194,16 @@ - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ -- grep -E 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then -+ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | \ -- sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` -- if test "X$win32_nmres" = "Ximport" ; then -- win32_libid_type="x86 archive import" -- else -- win32_libid_type="x86 archive static" -- fi -+ $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` -+ case $win32_nmres in -+ import*) win32_libid_type="x86 archive import";; -+ *) win32_libid_type="x86 archive static";; -+ esac - fi - ;; -- *DLL*) -+ *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... -@@ -154,9 +217,182 @@ - $echo $win32_libid_type - } - -+ -+# func_infer_tag arg -+# Infer tagged configuration to use if any are available and -+# if one wasn't chosen via the "--tag" command line option. -+# Only attempt this if the compiler in the base compile -+# command doesn't match the default compiler. -+# arg is usually of the form 'gcc ...' -+func_infer_tag () -+{ -+ if test -n "$available_tags" && test -z "$tagname"; then -+ CC_quoted= -+ for arg in $CC; do -+ case $arg in -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -+ arg="\"$arg\"" -+ ;; -+ esac -+ CC_quoted="$CC_quoted $arg" -+ done -+ case $@ in -+ # Blanks in the command may have been stripped by the calling shell, -+ # but not from the CC environment variable when configure was run. -+ " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; -+ # Blanks at the start of $base_compile will cause this to fail -+ # if we don't check for them as well. -+ *) -+ for z in $available_tags; do -+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then -+ # Evaluate the configuration. -+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" -+ CC_quoted= -+ for arg in $CC; do -+ # Double-quote args containing other shell metacharacters. -+ case $arg in -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -+ arg="\"$arg\"" -+ ;; -+ esac -+ CC_quoted="$CC_quoted $arg" -+ done -+ case "$@ " in -+ " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) -+ # The compiler in the base compile command matches -+ # the one in the tagged configuration. -+ # Assume this is the tagged configuration we want. -+ tagname=$z -+ break -+ ;; -+ esac -+ fi -+ done -+ # If $tagname still isn't set, then no tagged configuration -+ # was found and let the user know that the "--tag" command -+ # line option must be used. -+ if test -z "$tagname"; then -+ $echo "$modename: unable to infer tagged configuration" -+ $echo "$modename: defaulting to \`CC'" -+ $echo "$modename: if this is not correct, specify a tag with \`--tag'" -+# exit $EXIT_FAILURE -+# else -+# $echo "$modename: using $tagname tagged configuration" -+ fi -+ ;; -+ esac -+ fi -+} -+ -+ -+# func_extract_an_archive dir oldlib -+func_extract_an_archive () -+{ -+ f_ex_an_ar_dir="$1"; shift -+ f_ex_an_ar_oldlib="$1" -+ -+ $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" -+ $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? -+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then -+ : -+ else -+ $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 -+ exit $EXIT_FAILURE -+ fi -+} -+ -+# func_extract_archives gentop oldlib ... -+func_extract_archives () -+{ -+ my_gentop="$1"; shift -+ my_oldlibs=${1+"$@"} -+ my_oldobjs="" -+ my_xlib="" -+ my_xabs="" -+ my_xdir="" -+ my_status="" -+ -+ $show "${rm}r $my_gentop" -+ $run ${rm}r "$my_gentop" -+ $show "$mkdir $my_gentop" -+ $run $mkdir "$my_gentop" -+ my_status=$? -+ if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then -+ exit $my_status -+ fi -+ -+ for my_xlib in $my_oldlibs; do -+ # Extract the objects. -+ case $my_xlib in -+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; -+ *) my_xabs=`pwd`"/$my_xlib" ;; -+ esac -+ my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` -+ my_xdir="$my_gentop/$my_xlib" -+ -+ $show "${rm}r $my_xdir" -+ $run ${rm}r "$my_xdir" -+ $show "$mkdir $my_xdir" -+ $run $mkdir "$my_xdir" -+ exit_status=$? -+ if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then -+ exit $exit_status -+ fi -+ case $host in -+ *-darwin*) -+ $show "Extracting $my_xabs" -+ # Do not bother doing anything if just a dry run -+ if test -z "$run"; then -+ darwin_orig_dir=`pwd` -+ cd $my_xdir || exit $? -+ darwin_archive=$my_xabs -+ darwin_curdir=`pwd` -+ darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` -+ darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` -+ if test -n "$darwin_arches"; then -+ darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` -+ darwin_arch= -+ $show "$darwin_base_archive has multiple architectures $darwin_arches" -+ for darwin_arch in $darwin_arches ; do -+ mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" -+ lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" -+ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" -+ func_extract_an_archive "`pwd`" "${darwin_base_archive}" -+ cd "$darwin_curdir" -+ $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" -+ done # $darwin_arches -+ ## Okay now we have a bunch of thin objects, gotta fatten them up :) -+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` -+ darwin_file= -+ darwin_files= -+ for darwin_file in $darwin_filelist; do -+ darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` -+ lipo -create -output "$darwin_file" $darwin_files -+ done # $darwin_filelist -+ ${rm}r unfat-$$ -+ cd "$darwin_orig_dir" -+ else -+ cd "$darwin_orig_dir" -+ func_extract_an_archive "$my_xdir" "$my_xabs" -+ fi # $darwin_arches -+ fi # $run -+ ;; -+ *) -+ func_extract_an_archive "$my_xdir" "$my_xabs" -+ ;; -+ esac -+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` -+ done -+ func_extract_archives_result="$my_oldobjs" -+} - # End of Shell function definitions - ##################################### - -+# Darwin sucks -+eval std_shrext=\"$shrext_cmds\" -+ -+disable_libs=no -+ - # Parse our command line options once, thoroughly. - while test "$#" -gt 0 - do -@@ -176,12 +412,13 @@ - ;; - tag) - tagname="$arg" -+ preserve_args="${preserve_args}=$arg" - - # Check whether tagname contains only valid characters - case $tagname in - *[!-_A-Za-z0-9,/]*) - $echo "$progname: invalid tag name: $tagname" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - -@@ -191,10 +428,10 @@ - # not specially marked. - ;; - *) -- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then -+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then - taglist="$taglist $tagname" - # Evaluate the configuration. -- eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`" -+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" - else - $echo "$progname: ignoring unknown tag $tagname" 1>&2 - fi -@@ -220,24 +457,25 @@ - --version) - $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" - $echo -- $echo "Copyright (C) 2003 Free Software Foundation, Inc." -+ $echo "Copyright (C) 2005 Free Software Foundation, Inc." - $echo "This is free software; see the source for copying conditions. There is NO" - $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -- exit 0 -+ exit $? - ;; - - --config) -- ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 -+ ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath - # Now print the configurations for the tags. - for tagname in $taglist; do -- ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0" -+ ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" - done -- exit 0 -+ exit $? - ;; - - --debug) - $echo "$progname: enabling shell trace mode" - set -x -+ preserve_args="$preserve_args $arg" - ;; - - --dry-run | -n) -@@ -256,7 +494,7 @@ - else - $echo "disable static libraries" - fi -- exit 0 -+ exit $? - ;; - - --finish) mode="finish" ;; -@@ -268,13 +506,19 @@ - - --quiet | --silent) - show=: -+ preserve_args="$preserve_args $arg" - ;; - -- --tag) prevopt="--tag" prev=tag ;; -+ --tag) -+ prevopt="--tag" -+ prev=tag -+ preserve_args="$preserve_args --tag" -+ ;; - --tag=*) - set tag "$optarg" ${1+"$@"} - shift - prev=tag -+ preserve_args="$preserve_args --tag" - ;; - - -dlopen) -@@ -285,7 +529,7 @@ - -*) - $echo "$modename: unrecognized option \`$arg'" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - - *) -@@ -298,9 +542,21 @@ - if test -n "$prevopt"; then - $echo "$modename: option \`$prevopt' requires an argument" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - -+case $disable_libs in -+no) -+ ;; -+shared) -+ build_libtool_libs=no -+ build_old_libs=yes -+ ;; -+static) -+ build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -+ ;; -+esac -+ - # If this variable is set in any of the actions, the command in it - # will be execed at the end. This prevents here-documents from being - # left over by shells. -@@ -311,7 +567,7 @@ - # Infer the operation mode. - if test -z "$mode"; then - $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 -- $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2 -+ $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 - case $nonopt in - *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) - mode=link -@@ -354,7 +610,7 @@ - if test -n "$execute_dlfiles" && test "$mode" != execute; then - $echo "$modename: unrecognized option \`-dlopen'" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. -@@ -369,13 +625,15 @@ - # Get the compilation command and the source file. - base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" -+ suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= -+ later= - - for arg - do -- case "$arg_mode" in -+ case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg="$arg" -@@ -394,24 +652,19 @@ - -o) - if test -n "$libobj" ; then - $echo "$modename: you cannot specify \`-o' more than once" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - arg_mode=target - continue - ;; - -- -static) -- build_old_libs=yes -+ -static | -prefer-pic | -prefer-non-pic) -+ later="$later $arg" - continue - ;; - -- -prefer-pic) -- pic_mode=yes -- continue -- ;; -- -- -prefer-non-pic) -- pic_mode=no -+ -no-suppress) -+ suppress_opt=no - continue - ;; - -@@ -424,7 +677,7 @@ - args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` - lastarg= - save_ifs="$IFS"; IFS=',' -- for arg in $args; do -+ for arg in $args; do - IFS="$save_ifs" - - # Double-quote args containing other shell metacharacters. -@@ -462,7 +715,10 @@ - case $lastarg in - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly -- # in scan sets, so we specify it separately. -+ # in scan sets, and some SunOS ksh mistreat backslash-escaping -+ # in scan sets (worked around with variable expansion), -+ # and furthermore cannot handle '|' '&' '(' ')' in scan sets -+ # at all, so we specify them separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - lastarg="\"$lastarg\"" - ;; -@@ -474,11 +730,11 @@ - case $arg_mode in - arg) - $echo "$modename: you must specify an argument for -Xcompile" -- exit 1 -+ exit $EXIT_FAILURE - ;; - target) - $echo "$modename: you must specify a target with \`-o'" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - *) - # Get the name of the library object. -@@ -511,51 +767,39 @@ - *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; - *) - $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - -- # Infer tagged configuration to use if any are available and -- # if one wasn't chosen via the "--tag" command line option. -- # Only attempt this if the compiler in the base compile -- # command doesn't match the default compiler. -- if test -n "$available_tags" && test -z "$tagname"; then -- case $base_compile in -- # Blanks in the command may have been stripped by the calling shell, -- # but not from the CC environment variable when configure was run. -- " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "*) ;; -- # Blanks at the start of $base_compile will cause this to fail -- # if we don't check for them as well. -- *) -- for z in $available_tags; do -- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then -- # Evaluate the configuration. -- eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" -- case "$base_compile " in -- "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) -- # The compiler in the base compile command matches -- # the one in the tagged configuration. -- # Assume this is the tagged configuration we want. -- tagname=$z -- break -- ;; -- esac -- fi -- done -- # If $tagname still isn't set, then no tagged configuration -- # was found and let the user know that the "--tag" command -- # line option must be used. -- if test -z "$tagname"; then -- $echo "$modename: unable to infer tagged configuration" -- $echo "$modename: specify a tag with \`--tag'" 1>&2 -- exit 1 --# else --# $echo "$modename: using $tagname tagged configuration" -- fi -+ func_infer_tag $base_compile -+ -+ for arg in $later; do -+ case $arg in -+ -static) -+ build_old_libs=yes -+ continue -+ ;; -+ -+ -prefer-pic) -+ pic_mode=yes -+ continue -+ ;; -+ -+ -prefer-non-pic) -+ pic_mode=no -+ continue - ;; - esac -- fi -+ done - -+ qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` -+ case $qlibobj in -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -+ qlibobj="\"$qlibobj\"" ;; -+ esac -+ test "X$libobj" != "X$qlibobj" \ -+ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ -+ && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." - objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$obj"; then -@@ -568,7 +812,7 @@ - if test -z "$base_compile"; then - $echo "$modename: you must specify a compilation command" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - # Delete any leftover library objects. -@@ -579,7 +823,7 @@ - fi - - $run $rm $removelist -- trap "$run $rm $removelist; exit 1" 1 2 15 -+ trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in -@@ -598,7 +842,7 @@ - output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - removelist="$removelist $output_obj $lockfile" -- trap "$run $rm $removelist; exit 1" 1 2 15 -+ trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - else - output_obj= - need_locks=no -@@ -608,7 +852,7 @@ - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then -- until $run ln "$0" "$lockfile" 2>/dev/null; do -+ until $run ln "$progpath" "$lockfile" 2>/dev/null; do - $show "Waiting for $lockfile to be removed" - sleep 2 - done -@@ -626,14 +870,19 @@ - compiler." - - $run $rm $removelist -- exit 1 -+ exit $EXIT_FAILURE - fi -- $echo $srcfile > "$lockfile" -+ $echo "$srcfile" > "$lockfile" - fi - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi -+ qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` -+ case $qsrcfile in -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -+ qsrcfile="\"$qsrcfile\"" ;; -+ esac - - $run $rm "$libobj" "${libobj}T" - -@@ -655,18 +904,18 @@ - fbsd_hideous_sh_bug=$base_compile - - if test "$pic_mode" != no; then -- command="$base_compile $srcfile $pic_flag" -+ command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code -- command="$base_compile $srcfile" -+ command="$base_compile $qsrcfile" - fi - - if test ! -d "${xdir}$objdir"; then - $show "$mkdir ${xdir}$objdir" - $run $mkdir ${xdir}$objdir -- status=$? -- if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then -- exit $status -+ exit_status=$? -+ if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then -+ exit $exit_status - fi - fi - -@@ -681,7 +930,7 @@ - if $run eval "$command"; then : - else - test -n "$output_obj" && $run $rm $removelist -- exit 1 -+ exit $EXIT_FAILURE - fi - - if test "$need_locks" = warn && -@@ -701,7 +950,7 @@ - compiler." - - $run $rm $removelist -- exit 1 -+ exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one -@@ -722,7 +971,9 @@ - EOF - - # Allow error messages only from the first compilation. -- suppress_output=' >/dev/null 2>&1' -+ if test "$suppress_opt" = yes; then -+ suppress_output=' >/dev/null 2>&1' -+ fi - else - # No PIC object so indicate it doesn't exist in the libtool - # object file. -@@ -736,9 +987,9 @@ - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then - # Don't build PIC code -- command="$base_compile $srcfile" -+ command="$base_compile $qsrcfile" - else -- command="$base_compile $srcfile $pic_flag" -+ command="$base_compile $qsrcfile $pic_flag" - fi - if test "$compiler_c_o" = yes; then - command="$command -o $obj" -@@ -751,7 +1002,7 @@ - if $run eval "$command"; then : - else - $run $rm $removelist -- exit 1 -+ exit $EXIT_FAILURE - fi - - if test "$need_locks" = warn && -@@ -771,7 +1022,7 @@ - compiler." - - $run $rm $removelist -- exit 1 -+ exit $EXIT_FAILURE - fi - - # Just move the object if needed -@@ -809,7 +1060,7 @@ - $run $rm "$lockfile" - fi - -- exit 0 -+ exit $EXIT_SUCCESS - ;; - - # libtool link mode -@@ -835,7 +1086,7 @@ - ;; - esac - libtool_args="$nonopt" -- base_compile="$nonopt" -+ base_compile="$nonopt $@" - compile_command="$nonopt" - finalize_command="$nonopt" - -@@ -847,7 +1098,6 @@ - old_convenience= - deplibs= - old_deplibs= -- add_flags= - compiler_flags= - linker_flags= - dllsearchpath= -@@ -868,6 +1118,8 @@ - no_install=no - objs= - non_pic_objects= -+ notinst_path= # paths that contain not-installed libtool libraries -+ precious_files_regex= - prefer_static_libs=no - preload=no - prev= -@@ -881,6 +1133,8 @@ - vinfo= - vinfo_number=no - -+ func_infer_tag $base_compile -+ - # We need to know -static, to get the right output filenames. - for arg - do -@@ -893,14 +1147,15 @@ - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi -+ prefer_static_libs=yes - else - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi -+ prefer_static_libs=built - fi - build_libtool_libs=no - build_old_libs=yes -- prefer_static_libs=yes - break - ;; - esac -@@ -912,7 +1167,6 @@ - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" -- base_compile="$base_compile $arg" - shift - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") -@@ -976,7 +1230,7 @@ - export_symbols="$arg" - if test ! -f "$arg"; then - $echo "$modename: symbol file \`$arg' does not exist" -- exit 1 -+ exit $EXIT_FAILURE - fi - prev= - continue -@@ -991,6 +1245,11 @@ - prev= - continue - ;; -+ precious_regex) -+ precious_files_regex="$arg" -+ prev= -+ continue -+ ;; - release) - release="-$arg" - prev= -@@ -1023,7 +1282,7 @@ - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. -@@ -1071,12 +1330,17 @@ - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi -+ else -+ # If the PIC object exists, use it instead. -+ # $xdir was prepended to $pic_object above. -+ non_pic_object="$pic_object" -+ non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - else - # Dry-run case. - -@@ -1097,7 +1361,7 @@ - done - else - $echo "$modename: link input file \`$save_arg' does not exist" -- exit 1 -+ exit $EXIT_FAILURE - fi - arg=$save_arg - prev= -@@ -1109,7 +1373,7 @@ - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - if test "$prev" = rpath; then -@@ -1149,16 +1413,15 @@ - finalize_command="$finalize_command $qarg" - continue - ;; -- framework) -- case $host in -- *-*-darwin*) -- case "$deplibs " in -- *" $qarg.ltframework "*) ;; -- *) deplibs="$deplibs $qarg.ltframework" # this is fixed later -- ;; -- esac -- ;; -- esac -+ shrext) -+ shrext_cmds="$arg" -+ prev= -+ continue -+ ;; -+ darwin_framework|darwin_framework_skip) -+ test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" -+ compile_command="$compile_command $arg" -+ finalize_command="$finalize_command $arg" - prev= - continue - ;; -@@ -1210,7 +1473,7 @@ - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: more than one -exported-symbols argument is not allowed" -- exit 1 -+ exit $EXIT_FAILURE - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms -@@ -1220,6 +1483,18 @@ - continue - ;; - -+ -framework|-arch|-isysroot) -+ case " $CC " in -+ *" ${arg} ${1} "* | *" ${arg} ${1} "*) -+ prev=darwin_framework_skip ;; -+ *) compiler_flags="$compiler_flags $arg" -+ prev=darwin_framework ;; -+ esac -+ compile_command="$compile_command $arg" -+ finalize_command="$finalize_command $arg" -+ continue -+ ;; -+ - -inst-prefix-dir) - prev=inst_prefix - continue -@@ -1246,7 +1521,8 @@ - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 -- exit 1 -+ absdir="$dir" -+ notinst_path="$notinst_path $dir" - fi - dir="$absdir" - ;; -@@ -1260,10 +1536,15 @@ - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) -+ testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac -+ case :$dllsearchpath: in -+ *":$testbindir:"*) ;; -+ *) dllsearchpath="$dllsearchpath:$testbindir";; -+ esac - ;; - esac - continue -@@ -1272,26 +1553,35 @@ - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in -- *-*-cygwin* | *-*-pw32* | *-*-beos*) -+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) - # These systems don't actually have a C or math library (as such) - continue - ;; -- *-*-mingw* | *-*-os2*) -+ *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; -- *-*-openbsd* | *-*-freebsd*) -+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework -- deplibs="$deplibs System.ltframework" -+ deplibs="$deplibs -framework System" - continue -+ ;; -+ *-*-sco3.2v5* | *-*-sco5v6*) -+ # Causes problems with __ctype -+ test "X$arg" = "X-lc" && continue -+ ;; -+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) -+ # Compiler inserts libc in the correct place for threads to work -+ test "X$arg" = "X-lc" && continue -+ ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in -- *-*-openbsd*) -+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; -@@ -1301,18 +1591,41 @@ - continue - ;; - -+ # Tru64 UNIX uses -model [arg] to determine the layout of C++ -+ # classes, name mangling, and exception handling. -+ -model) -+ compile_command="$compile_command $arg" -+ compiler_flags="$compiler_flags $arg" -+ finalize_command="$finalize_command $arg" -+ prev=xcompiler -+ continue -+ ;; -+ -+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) -+ compiler_flags="$compiler_flags $arg" -+ compile_command="$compile_command $arg" -+ finalize_command="$finalize_command $arg" -+ continue -+ ;; -+ - -module) - module=yes - continue - ;; - -- # gcc -m* arguments should be passed to the linker via $compiler_flags -- # in order to pass architecture information to the linker -- # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo -- # but this is not reliable with gcc because gcc may use -mfoo to -- # select a different linker, different libraries, etc, while -- # -Wl,-mfoo simply passes -mfoo to the linker. -- -m*) -+ # -64, -mips[0-9] enable 64-bit mode on the SGI compiler -+ # -r[0-9][0-9]* specifies the processor on the SGI compiler -+ # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler -+ # +DA*, +DD* enable 64-bit mode on the HP compiler -+ # -q* pass through compiler args for the IBM compiler -+ # -m* pass through architecture-specific compiler args for GCC -+ # -m*, -t[45]*, -txscale* pass through architecture-specific -+ # compiler args for GCC -+ # -pg pass through profiling flag for GCC -+ # @file GCC response files -+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ -+ -t[45]*|-txscale*|@*) -+ - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` -@@ -1323,9 +1636,7 @@ - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" -- if test "$with_gcc" = "yes" ; then -- compiler_flags="$compiler_flags $arg" -- fi -+ compiler_flags="$compiler_flags $arg" - continue - ;; - -@@ -1365,6 +1676,11 @@ - - -o) prev=output ;; - -+ -precious-files-regex) -+ prev=precious_regex -+ continue -+ ;; -+ - -release) - prev=release - continue -@@ -1387,7 +1703,7 @@ - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - case "$xrpath " in -@@ -1473,11 +1789,6 @@ - continue - ;; - -- -framework) -- prev=framework -- continue -- ;; -- - # Some other compiler flag. - -* | +*) - # Unknown arguments in both finalize_command and compile_command need -@@ -1488,7 +1799,6 @@ - arg="\"$arg\"" - ;; - esac -- add_flags="$add_flags $arg" - ;; - - *.$objext) -@@ -1516,7 +1826,7 @@ - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. -@@ -1564,12 +1874,17 @@ - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi -+ else -+ # If the PIC object exists, use it instead. -+ # $xdir was prepended to $pic_object above. -+ non_pic_object="$pic_object" -+ non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - else - # Dry-run case. - -@@ -1623,7 +1938,6 @@ - arg="\"$arg\"" - ;; - esac -- add_flags="$add_flags $arg" - ;; - esac # arg - -@@ -1637,48 +1951,7 @@ - if test -n "$prev"; then - $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 - $echo "$help" 1>&2 -- exit 1 -- fi -- -- # Infer tagged configuration to use if any are available and -- # if one wasn't chosen via the "--tag" command line option. -- # Only attempt this if the compiler in the base link -- # command doesn't match the default compiler. -- if test -n "$available_tags" && test -z "$tagname"; then -- case $base_compile in -- # Blanks in the command may have been stripped by the calling shell, -- # but not from the CC environment variable when configure was run. -- "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;; -- # Blanks at the start of $base_compile will cause this to fail -- # if we don't check for them as well. -- *) -- for z in $available_tags; do -- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then -- # Evaluate the configuration. -- eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" -- case $base_compile in -- "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) -- # The compiler in $compile_command matches -- # the one in the tagged configuration. -- # Assume this is the tagged configuration we want. -- tagname=$z -- break -- ;; -- esac -- fi -- done -- # If $tagname still isn't set, then no tagged configuration -- # was found and let the user know that the "--tag" command -- # line option must be used. -- if test -z "$tagname"; then -- $echo "$modename: unable to infer tagged configuration" -- $echo "$modename: specify a tag with \`--tag'" 1>&2 -- exit 1 --# else --# $echo "$modename: using $tagname tagged configuration" -- fi -- ;; -- esac -+ exit $EXIT_FAILURE - fi - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then -@@ -1711,9 +1984,9 @@ - if test ! -d "$output_objdir"; then - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir -- status=$? -- if test "$status" -ne 0 && test ! -d "$output_objdir"; then -- exit $status -+ exit_status=$? -+ if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then -+ exit $exit_status - fi - fi - -@@ -1722,7 +1995,7 @@ - "") - $echo "$modename: you must specify an output file" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; -@@ -1732,7 +2005,7 @@ - - case $host in - *cygwin* | *mingw* | *pw32*) -- # don't eliminate duplcations in $postdeps and $predeps -+ # don't eliminate duplications in $postdeps and $predeps - duplicate_compiler_generated_deps=yes - ;; - *) -@@ -1776,7 +2049,6 @@ - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries -- notinst_path= # paths that contain not-installed libtool libraries - case $linkmode in - lib) - passes="conv link" -@@ -1785,7 +2057,7 @@ - *.la) ;; - *) - $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - done -@@ -1823,18 +2095,23 @@ - lib= - found=no - case $deplib in -+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) -+ if test "$linkmode,$pass" = "prog,link"; then -+ compile_deplibs="$deplib $compile_deplibs" -+ finalize_deplibs="$deplib $finalize_deplibs" -+ else -+ compiler_flags="$compiler_flags $deplib" -+ fi -+ continue -+ ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 - continue - fi -- if test "$pass" = conv && test "$allow_undefined" = yes; then -- deplibs="$deplib $deplibs" -- continue -- fi - name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` - for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do -- for search_ext in .la $shrext .so .a; do -+ for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then -@@ -1895,18 +2172,6 @@ - fi - fi - ;; # -l -- *.ltframework) -- if test "$linkmode,$pass" = "prog,link"; then -- compile_deplibs="$deplib $compile_deplibs" -- finalize_deplibs="$deplib $finalize_deplibs" -- else -- deplibs="$deplib $deplibs" -- if test "$linkmode" = lib ; then -- newdependency_libs="$deplib $newdependency_libs" -- fi -- fi -- continue -- ;; - -L*) - case $linkmode in - lib) -@@ -1922,11 +2187,11 @@ - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" -- newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi -+ newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - *) - $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 -@@ -1954,7 +2219,22 @@ - fi - case $linkmode in - lib) -- if test "$deplibs_check_method" != pass_all; then -+ valid_a_lib=no -+ case $deplibs_check_method in -+ match_pattern*) -+ set dummy $deplibs_check_method -+ match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` -+ if eval $echo \"$deplib\" 2>/dev/null \ -+ | $SED 10q \ -+ | $EGREP "$match_pattern_regex" > /dev/null; then -+ valid_a_lib=yes -+ fi -+ ;; -+ pass_all) -+ valid_a_lib=yes -+ ;; -+ esac -+ if test "$valid_a_lib" != yes; then - $echo - $echo "*** Warning: Trying to link with static lib archive $deplib." - $echo "*** I have the capability to make that library automatically link in when" -@@ -2004,15 +2284,15 @@ - esac # case $deplib - if test "$found" = yes || test -f "$lib"; then : - else -- $echo "$modename: cannot find the library \`$lib'" 1>&2 -- exit 1 -+ $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 -+ exit $EXIT_FAILURE - fi - - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` -@@ -2028,6 +2308,8 @@ - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no -+ avoidtemprpath= -+ - - # Read the .la file - case $lib in -@@ -2035,13 +2317,6 @@ - *) . ./$lib ;; - esac - -- case $host in -- *-*-darwin*) -- # Convert "-framework foo" to "foo.ltframework" in dependency_libs -- test -n "$dependency_libs" && dependency_libs=`$echo "X$dependency_libs" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` -- ;; -- esac -- - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then -@@ -2052,33 +2327,32 @@ - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" -- tmp_libs= -- for deplib in $dependency_libs; do -- #echo "Adding $deplib to \$deplibs" -- deplibs="$deplib $deplibs" -- if test "X$duplicate_deps" = "Xyes" ; then -- case "$tmp_libs " in -- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -- esac -- fi -- tmp_libs="$tmp_libs $deplib" -- done - if test -z "$libdir"; then - if test -z "$old_library"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" -+ tmp_libs= -+ for deplib in $dependency_libs; do -+ deplibs="$deplib $deplibs" -+ if test "X$duplicate_deps" = "Xyes" ; then -+ case "$tmp_libs " in -+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; -+ esac -+ fi -+ tmp_libs="$tmp_libs $deplib" -+ done - elif test "$linkmode" != prog && test "$linkmode" != lib; then - $echo "$modename: \`$lib' is not a convenience library" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - continue - fi # $pass = conv - -- -+ - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do -@@ -2086,16 +2360,18 @@ - done - if test -z "$linklib"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi -- if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then -+ if test -z "$dlname" || -+ test "$dlopen_support" != yes || -+ test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't -@@ -2129,14 +2405,28 @@ - absdir="$abs_ladir" - libdir="$abs_ladir" - else -- dir="$libdir" -- absdir="$libdir" -+ # Adding 'libdir' from the .la file to our library search paths -+ # breaks crosscompilation horribly. We cheat here and don't add -+ # it, instead adding the path where we found the .la. -CL -+ dir="$abs_ladir" -+ absdir="$abs_ladir" -+ libdir="$abs_ladir" -+ #dir="$libdir" -+ #absdir="$libdir" - fi -+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else -- dir="$ladir/$objdir" -- absdir="$abs_ladir/$objdir" -- # Remove this search path later -- notinst_path="$notinst_path $abs_ladir" -+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then -+ dir="$ladir" -+ absdir="$abs_ladir" -+ # Remove this search path later -+ notinst_path="$notinst_path $abs_ladir" -+ else -+ dir="$ladir/$objdir" -+ absdir="$abs_ladir/$objdir" -+ # Remove this search path later -+ notinst_path="$notinst_path $abs_ladir" -+ fi - fi # $installed = yes - name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - -@@ -2144,7 +2434,7 @@ - if test "$pass" = dlpreopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). -@@ -2171,7 +2461,7 @@ - continue - fi - -- -+ - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" -@@ -2209,12 +2499,12 @@ - if test -n "$library_names" && - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then - # We need to hardcode the library path -- if test -n "$shlibpath_var"; then -+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath " in - *" $dir "*) ;; - *" $absdir "*) ;; -- *) temp_rpath="$temp_rpath $dir" ;; -+ *) temp_rpath="$temp_rpath $absdir" ;; - esac - fi - -@@ -2251,24 +2541,29 @@ - fi - - link_static=no # Whether the deplib will be linked statically -+ use_static_libs=$prefer_static_libs -+ if test "$use_static_libs" = built && test "$installed" = yes ; then -+ use_static_libs=no -+ fi - if test -n "$library_names" && -- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then -+ { test "$use_static_libs" = no || test -z "$old_library"; }; then - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" -- need_relink=yes -+ need_relink=no - fi - # This is a shared library -- -- # Warn about portability, can't link against -module's on some systems (darwin) -- if test "$shouldnotlink" = yes && test "$pass" = link ; then -+ -+ # Warn about portability, can't link against -module's on -+ # some systems (darwin) -+ if test "$shouldnotlink" = yes && test "$pass" = link ; then - $echo - if test "$linkmode" = prog; then - $echo "*** Warning: Linking the executable $output against the loadable module" - else - $echo "*** Warning: Linking the shared library $output against the loadable module" - fi -- $echo "*** $linklib is not portable!" -- fi -+ $echo "*** $linklib is not portable!" -+ fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. -@@ -2326,9 +2621,10 @@ - else - $show "extracting exported symbol list from \`$soname'" - save_ifs="$IFS"; IFS='~' -- eval cmds=\"$extract_expsyms_cmds\" -+ cmds=$extract_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done -@@ -2339,9 +2635,10 @@ - if test -f "$output_objdir/$newlib"; then :; else - $show "generating import library for \`$soname'" - save_ifs="$IFS"; IFS='~' -- eval cmds=\"$old_archive_from_expsyms_cmds\" -+ cmds=$old_archive_from_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done -@@ -2362,11 +2659,15 @@ - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in -- *-*-sco3.2v5* ) add_dir="-L$dir" ;; -+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; -+ *-*-sysv4*uw2*) add_dir="-L$dir" ;; -+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ -+ *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) -- # if the lib is a module then we can not link against it, someone -- # is ignoring the new warnings I added -- if /usr/bin/file -L $add 2> /dev/null | grep "bundle" >/dev/null ; then -+ # if the lib is a module then we can not link against -+ # it, someone is ignoring the new warnings I added -+ if /usr/bin/file -L $add 2> /dev/null | -+ $EGREP ": [^:]* bundle" >/dev/null ; then - $echo "** Warning, lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $echo -@@ -2374,7 +2675,7 @@ - $echo "** The link will probably fail, sorry" - else - add="$dir/$old_library" -- fi -+ fi - fi - esac - elif test "$hardcode_minus_L" = no; then -@@ -2397,9 +2698,9 @@ - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then -- case "$libdir" in -+ case $libdir in - [\\/]*) -- add_dir="-L$inst_prefix_dir$libdir $add_dir" -+ add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi -@@ -2416,7 +2717,7 @@ - - if test "$lib_linked" != yes; then - $echo "$modename: configuration error: unsupported hardcode properties" -- exit 1 -+ exit $EXIT_FAILURE - fi - - if test -n "$add_shlibpath"; then -@@ -2459,7 +2760,8 @@ - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then -- if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then -+ if test -n "$inst_prefix_dir" && -+ test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" -@@ -2469,9 +2771,9 @@ - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then -- case "$libdir" in -+ case $libdir in - [\\/]*) -- add_dir="-L$inst_prefix_dir$libdir $add_dir" -+ add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi -@@ -2530,17 +2832,16 @@ - fi - fi - else -- convenience="$convenience $dir/$old_library" -- old_convenience="$old_convenience $dir/$old_library" - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then -- #if test -n "$dependency_libs" && -- # { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || -- # test "$link_static" = yes; }; then -+ if test -n "$dependency_libs" && -+ { test "$hardcode_into_libs" != yes || -+ test "$build_old_libs" = yes || -+ test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do -@@ -2554,7 +2855,7 @@ - esac - done - dependency_libs="$temp_deplibs" -- #fi -+ fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library -@@ -2596,20 +2897,18 @@ - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - if test "$absdir" != "$libdir"; then -- # Sure, some shells/systems don't implement the -ef. -- # Those will have to live with the warning. -- test "$absdir" -ef "$libdir" > /dev/null 2>&1 || -- $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 -+ $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 - fi - path="$absdir" - fi - depdepl= - case $host in - *-*-darwin*) -- # we do not want to link against static libs, but need to link against shared -+ # we do not want to link against static libs, -+ # but need to link against shared - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do -@@ -2617,46 +2916,36 @@ - done - if test -f "$path/$depdepl" ; then - depdepl="$path/$depdepl" -- fi -+ fi - # do not add paths which are already there - case " $newlib_search_path " in - *" $path "*) ;; - *) newlib_search_path="$newlib_search_path $path";; - esac -- path="" - fi -+ path="" - ;; - *) -- path="-L$path" -- ;; -- esac -- -+ path="-L$path" -+ ;; -+ esac - ;; -- -l*) -+ -l*) - case $host in - *-*-darwin*) -- # Again, we only want to link against shared libraries -- eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` -- for tmp in $newlib_search_path ; do -- if test -f "$tmp/lib$tmp_libs.dylib" ; then -- eval depdepl="$tmp/lib$tmp_libs.dylib" -- break -- fi -- done -- path="" -+ # Again, we only want to link against shared libraries -+ eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` -+ for tmp in $newlib_search_path ; do -+ if test -f "$tmp/lib$tmp_libs.dylib" ; then -+ eval depdepl="$tmp/lib$tmp_libs.dylib" -+ break -+ fi -+ done -+ path="" - ;; - *) continue ;; -- esac -- ;; -- -- *.ltframework) -- case $host in -- *-*-darwin*) -- depdepl="$deplib" -- ;; - esac - ;; -- - *) continue ;; - esac - case " $deplibs " in -@@ -2660,12 +2949,12 @@ - *) continue ;; - esac - case " $deplibs " in -- *" $depdepl "*) ;; -- *) deplibs="$deplibs $depdepl" ;; -- esac -- case " $deplibs " in - *" $path "*) ;; -- *) deplibs="$deplibs $path" ;; -+ *) deplibs="$path $deplibs" ;; -+ esac -+ case " $deplibs " in -+ *" $depdepl "*) ;; -+ *) deplibs="$depdepl $deplibs" ;; - esac - done - fi # link_all_deplibs != no -@@ -2752,7 +3041,8 @@ - eval $var=\"$tmp_libs\" - done # for var - fi -- # Last step: remove runtime libs from dependency_libs (they stay in deplibs) -+ # Last step: remove runtime libs from dependency_libs -+ # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in -@@ -2812,19 +3102,19 @@ - case $outputname in - lib*) - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` -- eval shared_ext=\"$shrext\" -+ eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - if test "$module" = no; then - $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` -- eval shared_ext=\"$shrext\" -+ eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` -@@ -2835,7 +3125,7 @@ - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 -- exit 1 -+ exit $EXIT_FAILURE - else - $echo - $echo "*** Warning: Linking the shared library $output against the non-libtool" -@@ -2883,13 +3173,13 @@ - if test -n "$8"; then - $echo "$modename: too many parameters to \`-version-info'" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible -- -+ - case $vinfo_number in - yes) - number_major="$2" -@@ -2929,36 +3219,36 @@ - - # Check that each of the things are valid numbers. - case $current in -- 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; -+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) -- $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 -+ $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - - case $revision in -- 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; -+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) -- $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 -+ $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - - case $age in -- 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; -+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) -- $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 -+ $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - - if test "$age" -gt "$current"; then - $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - # Calculate the version variables. -@@ -2975,7 +3265,7 @@ - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - minor_current=`expr $current + 1` -- verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" -+ verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - ;; - - freebsd-aout) -@@ -3047,7 +3337,7 @@ - *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - -@@ -3098,9 +3388,15 @@ - tempremovelist=`$echo "$output_objdir/*"` - for p in $tempremovelist; do - case $p in -- *.$objext | *$exeext) -+ *.$objext) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) -+ if test "X$precious_files_regex" != "X"; then -+ if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 -+ then -+ continue -+ fi -+ fi - removelist="$removelist $p" - ;; - *) ;; -@@ -3122,9 +3418,9 @@ - - # Eliminate all temporary directories. - for path in $notinst_path; do -- lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'` -- deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` -- dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` -+ lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` -+ deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` -+ dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` - done - - if test -n "$xrpath"; then -@@ -3137,7 +3433,7 @@ - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done -- if true || test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then -+ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi -@@ -3170,14 +3466,19 @@ - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework -- deplibs="$deplibs System.ltframework" -+ deplibs="$deplibs -framework System" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; -- *-*-openbsd* | *-*-freebsd*) -+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. -- test "X$arg" = "X-lc" && continue -+ ;; -+ *-*-sco3.2v5* | *-*-sco5v6*) -+ # Causes problems with __ctype -+ ;; -+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) -+ # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. -@@ -3221,11 +3522,11 @@ - int main() { return 0; } - EOF - $rm conftest -- $LTCC -o conftest conftest.c $deplibs -+ $LTCC $LTCFLAGS -o conftest conftest.c $deplibs - if test "$?" -eq 0 ; then - ldd_output=`ldd conftest` - for i in $deplibs; do -- name="`expr $i : '-l\(.*\)'`" -+ name=`expr $i : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test "$name" != "" && test "$name" -ne "0"; then - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then -@@ -3262,11 +3563,11 @@ - # Error occurred in the first compile. Let's try to salvage - # the situation: Compile a separate program for each library. - for i in $deplibs; do -- name="`expr $i : '-l\(.*\)'`" -+ name=`expr $i : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test "$name" != "" && test "$name" != "0"; then - $rm conftest -- $LTCC -o conftest conftest.c $i -+ $LTCC $LTCFLAGS -o conftest conftest.c $i - # Did it work? - if test "$?" -eq 0 ; then - ldd_output=`ldd conftest` -@@ -3314,7 +3615,7 @@ - set dummy $deplibs_check_method - file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - for a_deplib in $deplibs; do -- name="`expr $a_deplib : '-l\(.*\)'`" -+ name=`expr $a_deplib : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test "$name" != "" && test "$name" != "0"; then - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then -@@ -3383,7 +3684,7 @@ - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - for a_deplib in $deplibs; do -- name="`expr $a_deplib : '-l\(.*\)'`" -+ name=`expr $a_deplib : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test -n "$name" && test "$name" != "0"; then - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then -@@ -3463,7 +3764,7 @@ - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework -- newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` -+ newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - -@@ -3509,17 +3810,39 @@ - fi - fi - fi -- # Time to change all our "foo.ltframework" stuff back to "-framework foo" -- case $host in -- *-*-darwin*) -- newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` -- dependency_libs=`$echo "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` -- ;; -- esac - # Done checking deplibs! - deplibs=$newdeplibs - fi - -+ -+ # move library search paths that coincide with paths to not yet -+ # installed libraries to the beginning of the library search list -+ new_libs= -+ for path in $notinst_path; do -+ case " $new_libs " in -+ *" -L$path/$objdir "*) ;; -+ *) -+ case " $deplibs " in -+ *" -L$path/$objdir "*) -+ new_libs="$new_libs -L$path/$objdir" ;; -+ esac -+ ;; -+ esac -+ done -+ for deplib in $deplibs; do -+ case $deplib in -+ -L*) -+ case " $new_libs " in -+ *" $deplib "*) ;; -+ *) new_libs="$new_libs $deplib" ;; -+ esac -+ ;; -+ *) new_libs="$new_libs $deplib" ;; -+ esac -+ done -+ deplibs="$new_libs" -+ -+ - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= -@@ -3532,7 +3855,7 @@ - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" -- test "$mode" != relink && test "$fast_install" = no && rpath="$compile_rpath$rpath" -+ test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then -@@ -3587,7 +3910,7 @@ - fi - - # Get the real and link names of the library. -- eval shared_ext=\"$shrext\" -+ eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - realname="$2" -@@ -3603,6 +3926,7 @@ - fi - - lib="$output_objdir/$realname" -+ linknames= - for link - do - linknames="$linknames $link" -@@ -3617,10 +3941,11 @@ - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols -- eval cmds=\"$export_symbols_cmds\" -+ cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - if len=`expr "X$cmd" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - $show "$cmd" -@@ -3630,6 +3955,9 @@ - # The command line is too long to execute in one step. - $show "using reloadable object file for export list..." - skipped_export=: -+ # Break out early, otherwise skipped_export may be -+ # set to false by a later but shorter cmd. -+ break - fi - done - IFS="$save_ifs" -@@ -3650,12 +3978,12 @@ - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; -- *) -+ *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done -- deplibs="$tmp_deplibs" -+ deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then -@@ -3663,67 +3991,13 @@ - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${outputname}x" -- $show "${rm}r $gentop" -- $run ${rm}r "$gentop" -- $show "$mkdir $gentop" -- $run $mkdir "$gentop" -- status=$? -- if test "$status" -ne 0 && test ! -d "$gentop"; then -- exit $status -- fi - generated="$generated $gentop" - -- for xlib in $convenience; do -- # Extract the objects. -- case $xlib in -- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; -- *) xabs=`pwd`"/$xlib" ;; -- esac -- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` -- xdir="$gentop/$xlib" -- -- $show "${rm}r $xdir" -- $run ${rm}r "$xdir" -- $show "$mkdir $xdir" -- $run $mkdir "$xdir" -- status=$? -- if test "$status" -ne 0 && test ! -d "$xdir"; then -- exit $status -- fi -- # We will extract separately just the conflicting names and we will no -- # longer touch any unique names. It is faster to leave these extract -- # automatically by $AR in one run. -- $show "(cd $xdir && $AR x $xabs)" -- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? -- if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then -- : -- else -- $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 -- $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 -- $AR t "$xabs" | sort | uniq -cd | while read -r count name -- do -- i=1 -- while test "$i" -le "$count" -- do -- # Put our $i before any first dot (extension) -- # Never overwrite any file -- name_to="$name" -- while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" -- do -- name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` -- done -- $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" -- $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? -- i=`expr $i + 1` -- done -- done -- fi -- -- libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` -- done -+ func_extract_archives $gentop $convenience -+ libobjs="$libobjs $func_extract_archives_result" - fi - fi -- -+ - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" -@@ -3734,31 +4008,27 @@ - $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? - fi - -- # Add all flags from the command line. We here create a library, -- # but those flags were only added to compile_command and -- # finalize_command, which are only used when creating executables. -- # So do it by hand here. -- compiler_flags="$compiler_flags $add_flags" -- # Only add it to commands which use CC, instead of LD, i.e. -- # only to $compiler_flags -- #linker_flags="$linker_flags $add_flags" -- - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then -- eval cmds=\"$module_expsym_cmds\" -+ eval test_cmds=\"$module_expsym_cmds\" -+ cmds=$module_expsym_cmds - else -- eval cmds=\"$module_cmds\" -+ eval test_cmds=\"$module_cmds\" -+ cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then -- eval cmds=\"$archive_expsym_cmds\" -+ eval test_cmds=\"$archive_expsym_cmds\" -+ cmds=$archive_expsym_cmds - else -- eval cmds=\"$archive_cmds\" -+ eval test_cmds=\"$archive_cmds\" -+ cmds=$archive_cmds - fi - fi - -- if test "X$skipped_export" != "X:" && len=`expr "X$cmds" : ".*"` && -+ if test "X$skipped_export" != "X:" && -+ len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else -@@ -3777,6 +4047,7 @@ - save_libobjs=$libobjs - fi - save_output=$output -+ output_la=`$echo "X$output" | $Xsed -e "$basename"` - - # Clear the reloadable object creation command queue and - # initialize k to one. -@@ -3786,13 +4057,13 @@ - delfiles= - last_robj= - k=1 -- output=$output_objdir/$save_output-${k}.$objext -+ output=$output_objdir/$output_la-${k}.$objext - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - eval test_cmds=\"$reload_cmds $objlist $last_robj\" - if test "X$objlist" = X || -- { len=`expr "X$test_cmds" : ".*"` && -+ { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; }; then - objlist="$objlist $obj" - else -@@ -3806,9 +4077,9 @@ - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" - fi -- last_robj=$output_objdir/$save_output-${k}.$objext -+ last_robj=$output_objdir/$output_la-${k}.$objext - k=`expr $k + 1` -- output=$output_objdir/$save_output-${k}.$objext -+ output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - len=1 - fi -@@ -3828,13 +4099,13 @@ - eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" - fi - -- # Set up a command to remove the reloadale object files -+ # Set up a command to remove the reloadable object files - # after they are used. - i=0 - while test "$i" -lt "$k" - do - i=`expr $i + 1` -- delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" -+ delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" - done - - $echo "creating a temporary reloadable object file: $output" -@@ -3859,28 +4130,54 @@ - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. -+ if test "$module" = yes && test -n "$module_cmds" ; then -+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then -+ cmds=$module_expsym_cmds -+ else -+ cmds=$module_cmds -+ fi -+ else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then -- eval cmds=\"$archive_expsym_cmds\" -+ cmds=$archive_expsym_cmds - else -- eval cmds=\"$archive_cmds\" -+ cmds=$archive_cmds -+ fi - fi - - # Append the command to remove the reloadable object files - # to the just-reset $cmds. -- eval cmds=\"\$cmds~$rm $delfiles\" -+ eval cmds=\"\$cmds~\$rm $delfiles\" - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" -- $run eval "$cmd" || exit $? -+ $run eval "$cmd" || { -+ lt_exit=$? -+ -+ # Restore the uninstalled library and exit -+ if test "$mode" = relink; then -+ $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' -+ fi -+ -+ exit $lt_exit -+ } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? -- exit 0 -+ -+ if test -n "$convenience"; then -+ if test -z "$whole_archive_flag_spec"; then -+ $show "${rm}r $gentop" -+ $run ${rm}r "$gentop" -+ fi -+ fi -+ -+ exit $EXIT_SUCCESS - fi - - # Create links to the real library. -@@ -3928,7 +4225,7 @@ - *.lo) - if test -n "$objs$old_deplibs"; then - $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - libobj="$output" - obj=`$echo "X$output" | $Xsed -e "$lo2o"` -@@ -3957,64 +4254,10 @@ - eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${obj}x" -- $show "${rm}r $gentop" -- $run ${rm}r "$gentop" -- $show "$mkdir $gentop" -- $run $mkdir "$gentop" -- status=$? -- if test "$status" -ne 0 && test ! -d "$gentop"; then -- exit $status -- fi - generated="$generated $gentop" - -- for xlib in $convenience; do -- # Extract the objects. -- case $xlib in -- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; -- *) xabs=`pwd`"/$xlib" ;; -- esac -- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` -- xdir="$gentop/$xlib" -- -- $show "${rm}r $xdir" -- $run ${rm}r "$xdir" -- $show "$mkdir $xdir" -- $run $mkdir "$xdir" -- status=$? -- if test "$status" -ne 0 && test ! -d "$xdir"; then -- exit $status -- fi -- # We will extract separately just the conflicting names and we will no -- # longer touch any unique names. It is faster to leave these extract -- # automatically by $AR in one run. -- $show "(cd $xdir && $AR x $xabs)" -- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? -- if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then -- : -- else -- $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 -- $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 -- $AR t "$xabs" | sort | uniq -cd | while read -r count name -- do -- i=1 -- while test "$i" -le "$count" -- do -- # Put our $i before any first dot (extension) -- # Never overwrite any file -- name_to="$name" -- while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" -- do -- name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` -- done -- $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" -- $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? -- i=`expr $i + 1` -- done -- done -- fi -- -- reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` -- done -+ func_extract_archives $gentop $convenience -+ reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - -@@ -4022,10 +4265,11 @@ - reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" -- eval cmds=\"$reload_cmds\" -+ cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done -@@ -4038,7 +4282,7 @@ - $run ${rm}r $gentop - fi - -- exit 0 -+ exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then -@@ -4051,17 +4295,18 @@ - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $run eval "echo timestamp > $libobj" || exit $? -- exit 0 -+ exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" -- eval cmds=\"$reload_cmds\" -+ cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done -@@ -4073,7 +4318,7 @@ - $run ${rm}r $gentop - fi - -- exit 0 -+ exit $EXIT_SUCCESS - ;; - - prog) -@@ -4098,24 +4343,50 @@ - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework -- compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` -- finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` -+ compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` -+ finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - case $host in -- *-*-darwin*) -+ *darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - if test "$tagname" = CXX ; then - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - fi -- # Time to change all our "foo.ltframework" stuff back to "-framework foo" -- compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` -- finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - -+ -+ # move library search paths that coincide with paths to not yet -+ # installed libraries to the beginning of the library search list -+ new_libs= -+ for path in $notinst_path; do -+ case " $new_libs " in -+ *" -L$path/$objdir "*) ;; -+ *) -+ case " $compile_deplibs " in -+ *" -L$path/$objdir "*) -+ new_libs="$new_libs -L$path/$objdir" ;; -+ esac -+ ;; -+ esac -+ done -+ for deplib in $compile_deplibs; do -+ case $deplib in -+ -L*) -+ case " $new_libs " in -+ *" $deplib "*) ;; -+ *) new_libs="$new_libs $deplib" ;; -+ esac -+ ;; -+ *) new_libs="$new_libs $deplib" ;; -+ esac -+ done -+ compile_deplibs="$new_libs" -+ -+ - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - -@@ -4160,10 +4431,15 @@ - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) -+ testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac -+ case :$dllsearchpath: in -+ *":$testbindir:"*) ;; -+ *) dllsearchpath="$dllsearchpath:$testbindir";; -+ esac - ;; - esac - done -@@ -4277,13 +4553,25 @@ - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then -- export_symbols="$output_objdir/$output.exp" -+ export_symbols="$output_objdir/$outputname.exp" - $run $rm $export_symbols -- $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' -+ $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' -+ case $host in -+ *cygwin* | *mingw* ) -+ $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' -+ $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' -+ ;; -+ esac - else -- $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' -- $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' -+ $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' -+ $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - $run eval 'mv "$nlist"T "$nlist"' -+ case $host in -+ *cygwin* | *mingw* ) -+ $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' -+ $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' -+ ;; -+ esac - fi - fi - -@@ -4334,7 +4622,26 @@ - #endif - - /* The mapping between symbol names and symbols. */ -+" -+ -+ case $host in -+ *cygwin* | *mingw* ) -+ $echo >> "$output_objdir/$dlsyms" "\ -+/* DATA imports from DLLs on WIN32 can't be const, because -+ runtime relocations are performed -- see ld's documentation -+ on pseudo-relocs */ -+struct { -+" -+ ;; -+ * ) -+ $echo >> "$output_objdir/$dlsyms" "\ - const struct { -+" -+ ;; -+ esac -+ -+ -+ $echo >> "$output_objdir/$dlsyms" "\ - const char *name; - lt_ptr address; - } -@@ -4381,20 +4688,33 @@ - esac - - # Now compile the dynamic symbol file. -- $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" -- $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? -+ $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" -+ $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? - - # Clean up the generated files. - $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" - $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" - - # Transform the symbol file into the correct name. -- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` -- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` -+ case $host in -+ *cygwin* | *mingw* ) -+ if test -f "$output_objdir/${outputname}.def" ; then -+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` -+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` -+ else -+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` -+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` -+ fi -+ ;; -+ * ) -+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` -+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` -+ ;; -+ esac - ;; - *) - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - else -@@ -4407,17 +4727,6 @@ - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi - -- # AIX runtime linking requires linking programs with -Wl,-brtl and libs with -Wl,-G -- # Also add -bnolibpath to the beginning of the link line, to clear the hardcoded runpath. -- # Otherwise, things like the -L path to libgcc.a are accidentally hardcoded by ld. -- # This does not apply on AIX for ia64, which uses a SysV linker. -- case "$host" in -- ia64-*-aix5*) ;; -- *-*-aix4* | *-*-aix5*) -- compile_command=`$echo "X$compile_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"` -- finalize_command=`$echo "X$finalize_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"` ;; -- esac -- - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` -@@ -4426,7 +4735,7 @@ - # We have no uninstalled library dependencies, so finalize right now. - $show "$link_command" - $run eval "$link_command" -- status=$? -+ exit_status=$? - - # Delete the generated files. - if test -n "$dlsyms"; then -@@ -4434,7 +4743,7 @@ - $run $rm "$output_objdir/${outputname}S.${objext}" - fi - -- exit $status -+ exit $exit_status - fi - - if test -n "$shlibpath_var"; then -@@ -4493,7 +4802,7 @@ - # Link the executable and exit - $show "$link_command" - $run eval "$link_command" || exit $? -- exit 0 -+ exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then -@@ -4548,10 +4857,10 @@ - fi - - # Quote $echo for shipping. -- if test "X$echo" = "X$SHELL $0 --fallback-echo"; then -- case $0 in -- [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; -- *) qecho="$SHELL `pwd`/$0 --fallback-echo";; -+ if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then -+ case $progpath in -+ [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; -+ *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` - else -@@ -4573,11 +4882,13 @@ - *) exeext= ;; - esac - case $host in -- *mingw* ) -- cwrappersource=`$echo ${output_objdir}/lt-${outputname}.c` -- cwrapper=`$echo ${output}.exe` -- $rm $cwrappersource $cwrapper -- trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 15 -+ *cygwin* | *mingw* ) -+ output_name=`basename $output` -+ output_path=`dirname $output` -+ cwrappersource="$output_path/$objdir/lt-$output_name.c" -+ cwrapper="$output_path/$output_name.exe" -+ $rm $cwrappersource $cwrapper -+ trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - cat > $cwrappersource < - #include - #include -+#include -+#include -+#include - - #if defined(PATH_MAX) - # define LT_PATHMAX PATH_MAX -@@ -4612,15 +4926,19 @@ - #endif - - #ifndef DIR_SEPARATOR --#define DIR_SEPARATOR '/' -+# define DIR_SEPARATOR '/' -+# define PATH_SEPARATOR ':' - #endif - - #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) --#define HAVE_DOS_BASED_FILE_SYSTEM --#ifndef DIR_SEPARATOR_2 --#define DIR_SEPARATOR_2 '\\' --#endif -+# define HAVE_DOS_BASED_FILE_SYSTEM -+# ifndef DIR_SEPARATOR_2 -+# define DIR_SEPARATOR_2 '\\' -+# endif -+# ifndef PATH_SEPARATOR_2 -+# define PATH_SEPARATOR_2 ';' -+# endif - #endif - - #ifndef DIR_SEPARATOR_2 -@@ -4630,17 +4948,32 @@ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) - #endif /* DIR_SEPARATOR_2 */ - -+#ifndef PATH_SEPARATOR_2 -+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -+#else /* PATH_SEPARATOR_2 */ -+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -+#endif /* PATH_SEPARATOR_2 */ -+ - #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) - #define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ - } while (0) - -+/* -DDEBUG is fairly common in CFLAGS. */ -+#undef DEBUG -+#if defined DEBUGWRAPPER -+# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) -+#else -+# define DEBUG(format, ...) -+#endif -+ - const char *program_name = NULL; - - void * xmalloc (size_t num); - char * xstrdup (const char *string); --char * basename (const char *name); --char * fnqualify(const char *path); -+const char * base_name (const char *name); -+char * find_executable(const char *wrapper); -+int check_executable(const char *path); - char * strendzap(char *str, const char *pat); - void lt_fatal (const char *message, ...); - -@@ -4649,30 +4982,52 @@ - { - char **newargz; - int i; -- -- program_name = (char *) xstrdup ((char *) basename (argv[0])); -+ -+ program_name = (char *) xstrdup (base_name (argv[0])); -+ DEBUG("(main) argv[0] : %s\n",argv[0]); -+ DEBUG("(main) program_name : %s\n",program_name); - newargz = XMALLOC(char *, argc+2); - EOF - -- cat >> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" -- newargz[1] = fnqualify(argv[0]); -+ cat >> $cwrappersource <<"EOF" -+ newargz[1] = find_executable(argv[0]); -+ if (newargz[1] == NULL) -+ lt_fatal("Couldn't find %s", argv[0]); -+ DEBUG("(main) found exe at : %s\n",newargz[1]); - /* we know the script has the same name, without the .exe */ - /* so make sure newargz[1] doesn't end in .exe */ -- strendzap(newargz[1],".exe"); -+ strendzap(newargz[1],".exe"); - for (i = 1; i < argc; i++) - newargz[i+1] = xstrdup(argv[i]); - newargz[argc+1] = NULL; -+ -+ for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" -+ cat >> $cwrappersource <<"EOF" -+ return 127; - } - - void * -@@ -4685,59 +5040,159 @@ - return p; - } - --char * -+char * - xstrdup (const char *string) - { - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL - ; - } - --char * --basename (const char *name) -+const char * -+base_name (const char *name) - { - const char *base; - - #if defined (HAVE_DOS_BASED_FILE_SYSTEM) - /* Skip over the disk name in MSDOS pathnames. */ -- if (isalpha (name[0]) && name[1] == ':') -+ if (isalpha ((unsigned char)name[0]) && name[1] == ':') - name += 2; - #endif - - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; -- return (char *) base; -+ return base; -+} -+ -+int -+check_executable(const char * path) -+{ -+ struct stat st; -+ -+ DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); -+ if ((!path) || (!*path)) -+ return 0; -+ -+ if ((stat (path, &st) >= 0) && -+ ( -+ /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ -+#if defined (S_IXOTH) -+ ((st.st_mode & S_IXOTH) == S_IXOTH) || -+#endif -+#if defined (S_IXGRP) -+ ((st.st_mode & S_IXGRP) == S_IXGRP) || -+#endif -+ ((st.st_mode & S_IXUSR) == S_IXUSR)) -+ ) -+ return 1; -+ else -+ return 0; - } - --char * --fnqualify(const char *path) -+/* Searches for the full path of the wrapper. Returns -+ newly allocated full path name if found, NULL otherwise */ -+char * -+find_executable (const char* wrapper) - { -- size_t size; -- char *p; -+ int has_slash = 0; -+ const char* p; -+ const char* p_next; -+ /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; -+ int tmp_len; -+ char* concat_name; -+ -+ DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); - -- assert(path != NULL); -+ if ((wrapper == NULL) || (*wrapper == '\0')) -+ return NULL; - -- /* Is it qualified already? */ -+ /* Absolute path? */ - #if defined (HAVE_DOS_BASED_FILE_SYSTEM) -- if (isalpha (path[0]) && path[1] == ':') -- return xstrdup (path); -+ if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') -+ { -+ concat_name = xstrdup (wrapper); -+ if (check_executable(concat_name)) -+ return concat_name; -+ XFREE(concat_name); -+ } -+ else -+ { -+#endif -+ if (IS_DIR_SEPARATOR (wrapper[0])) -+ { -+ concat_name = xstrdup (wrapper); -+ if (check_executable(concat_name)) -+ return concat_name; -+ XFREE(concat_name); -+ } -+#if defined (HAVE_DOS_BASED_FILE_SYSTEM) -+ } - #endif -- if (IS_DIR_SEPARATOR (path[0])) -- return xstrdup (path); - -- /* prepend the current directory */ -- /* doesn't handle '~' */ -+ for (p = wrapper; *p; p++) -+ if (*p == '/') -+ { -+ has_slash = 1; -+ break; -+ } -+ if (!has_slash) -+ { -+ /* no slashes; search PATH */ -+ const char* path = getenv ("PATH"); -+ if (path != NULL) -+ { -+ for (p = path; *p; p = p_next) -+ { -+ const char* q; -+ size_t p_len; -+ for (q = p; *q; q++) -+ if (IS_PATH_SEPARATOR(*q)) -+ break; -+ p_len = q - p; -+ p_next = (*q == '\0' ? q : q + 1); -+ if (p_len == 0) -+ { -+ /* empty path: current directory */ -+ if (getcwd (tmp, LT_PATHMAX) == NULL) -+ lt_fatal ("getcwd failed"); -+ tmp_len = strlen(tmp); -+ concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); -+ memcpy (concat_name, tmp, tmp_len); -+ concat_name[tmp_len] = '/'; -+ strcpy (concat_name + tmp_len + 1, wrapper); -+ } -+ else -+ { -+ concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); -+ memcpy (concat_name, p, p_len); -+ concat_name[p_len] = '/'; -+ strcpy (concat_name + p_len + 1, wrapper); -+ } -+ if (check_executable(concat_name)) -+ return concat_name; -+ XFREE(concat_name); -+ } -+ } -+ /* not found in PATH; assume curdir */ -+ } -+ /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); -- size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ -- p = XMALLOC(char, size); -- sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); -- return p; -+ tmp_len = strlen(tmp); -+ concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); -+ memcpy (concat_name, tmp, tmp_len); -+ concat_name[tmp_len] = '/'; -+ strcpy (concat_name + tmp_len + 1, wrapper); -+ -+ if (check_executable(concat_name)) -+ return concat_name; -+ XFREE(concat_name); -+ return NULL; - } - - char * --strendzap(char *str, const char *pat) -+strendzap(char *str, const char *pat) - { - size_t len, patlen; - -@@ -4757,7 +5212,7 @@ - } - - static void --lt_error_core (int exit_status, const char * mode, -+lt_error_core (int exit_status, const char * mode, - const char * message, va_list ap) - { - fprintf (stderr, "%s: %s: ", program_name, mode); -@@ -4777,16 +5232,16 @@ - va_end (ap); - } - EOF -- # we should really use a build-platform specific compiler -- # here, but OTOH, the wrappers (shell script and this C one) -- # are only useful if you want to execute the "real" binary. -- # Since the "real" binary is built for $host, then this -- # wrapper might as well be built for $host, too. -- $run $LTCC -s -o $cwrapper $cwrappersource -- ;; -- esac -- $rm $output -- trap "$rm $output; exit 1" 1 2 15 -+ # we should really use a build-platform specific compiler -+ # here, but OTOH, the wrappers (shell script and this C one) -+ # are only useful if you want to execute the "real" binary. -+ # Since the "real" binary is built for $host, then this -+ # wrapper might as well be built for $host, too. -+ $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource -+ ;; -+ esac -+ $rm $output -+ trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 - - $echo > $output "\ - #! $SHELL -@@ -4807,7 +5262,7 @@ - - # The HP-UX ksh and POSIX shell print the target directory to stdout - # if CDPATH is set. --if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi -+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - relink_command=\"$relink_command\" - -@@ -4886,7 +5341,7 @@ - else - $echo \"\$relink_command_output\" >&2 - $rm \"\$progdir/\$file\" -- exit 1 -+ exit $EXIT_FAILURE - fi - fi - -@@ -4936,34 +5391,32 @@ - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2*) - $echo >> $output "\ -- exec \$progdir\\\\\$program \${1+\"\$@\"} -+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} - " - ;; - - *) -- # Need to set LD_LIBRARY_PATH, to the value already -- # computed within libtool. - $echo >> $output "\ -- LD_LIBRARY_PATH=\"$rpath\" exec \$progdir/\$program \${1+\"\$@\"} -+ exec \"\$progdir/\$program\" \${1+\"\$@\"} - " - ;; - esac - $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" -- exit 1 -+ exit $EXIT_FAILURE - fi - else - # The program doesn't exist. -- \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 -+ \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$echo \"This script is just a wrapper for \$program.\" 1>&2 - $echo \"See the $PACKAGE documentation for more information.\" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - fi\ - " - chmod +x $output - fi -- exit 0 -+ exit $EXIT_SUCCESS - ;; - esac - -@@ -4986,78 +5439,78 @@ - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" -- $show "${rm}r $gentop" -- $run ${rm}r "$gentop" -- $show "$mkdir $gentop" -- $run $mkdir "$gentop" -- status=$? -- if test "$status" -ne 0 && test ! -d "$gentop"; then -- exit $status -- fi - generated="$generated $gentop" - -- # Add in members from convenience archives. -- for xlib in $addlibs; do -- # Extract the objects. -- case $xlib in -- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; -- *) xabs=`pwd`"/$xlib" ;; -- esac -- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` -- xdir="$gentop/$xlib" -- -- $show "${rm}r $xdir" -- $run ${rm}r "$xdir" -- $show "$mkdir $xdir" -- $run $mkdir "$xdir" -- status=$? -- if test "$status" -ne 0 && test ! -d "$xdir"; then -- exit $status -- fi -- # We will extract separately just the conflicting names and we will no -- # longer touch any unique names. It is faster to leave these extract -- # automatically by $AR in one run. -- $show "(cd $xdir && $AR x $xabs)" -- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? -- if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then -- : -- else -- $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 -- $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 -- $AR t "$xabs" | sort | uniq -cd | while read -r count name -- do -- i=1 -- while test "$i" -le "$count" -- do -- # Put our $i before any first dot (extension) -- # Never overwrite any file -- name_to="$name" -- while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" -- do -- name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` -- done -- $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" -- $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? -- i=`expr $i + 1` -- done -- done -- fi -- -- oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` -- done -+ func_extract_archives $gentop $addlibs -+ oldobjs="$oldobjs $func_extract_archives_result" - fi - -- compiler_flags="$compiler_flags $add_flags" -- - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then -- eval cmds=\"$old_archive_from_new_cmds\" -+ cmds=$old_archive_from_new_cmds - else -+ # POSIX demands no paths to be encoded in archives. We have -+ # to avoid creating archives with duplicate basenames if we -+ # might have to extract them afterwards, e.g., when creating a -+ # static archive out of a convenience library, or when linking -+ # the entirety of a libtool archive into another (currently -+ # not supported by libtool). -+ if (for obj in $oldobjs -+ do -+ $echo "X$obj" | $Xsed -e 's%^.*/%%' -+ done | sort | sort -uc >/dev/null 2>&1); then -+ : -+ else -+ $echo "copying selected object files to avoid basename conflicts..." -+ -+ if test -z "$gentop"; then -+ gentop="$output_objdir/${outputname}x" -+ generated="$generated $gentop" -+ -+ $show "${rm}r $gentop" -+ $run ${rm}r "$gentop" -+ $show "$mkdir $gentop" -+ $run $mkdir "$gentop" -+ exit_status=$? -+ if test "$exit_status" -ne 0 && test ! -d "$gentop"; then -+ exit $exit_status -+ fi -+ fi -+ -+ save_oldobjs=$oldobjs -+ oldobjs= -+ counter=1 -+ for obj in $save_oldobjs -+ do -+ objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` -+ case " $oldobjs " in -+ " ") oldobjs=$obj ;; -+ *[\ /]"$objbase "*) -+ while :; do -+ # Make sure we don't pick an alternate name that also -+ # overlaps. -+ newobj=lt$counter-$objbase -+ counter=`expr $counter + 1` -+ case " $oldobjs " in -+ *[\ /]"$newobj "*) ;; -+ *) if test ! -f "$gentop/$newobj"; then break; fi ;; -+ esac -+ done -+ $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" -+ $run ln "$obj" "$gentop/$newobj" || -+ $run cp "$obj" "$gentop/$newobj" -+ oldobjs="$oldobjs $gentop/$newobj" -+ ;; -+ *) oldobjs="$oldobjs $obj" ;; -+ esac -+ done -+ fi -+ - eval cmds=\"$old_archive_cmds\" - - if len=`expr "X$cmds" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then -- : -+ cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - $echo "using piecewise archive linking..." -@@ -5066,31 +5519,18 @@ - objlist= - concat_cmds= - save_oldobjs=$oldobjs -- # GNU ar 2.10+ was changed to match POSIX; thus no paths are -- # encoded into archives. This makes 'ar r' malfunction in -- # this piecewise linking case whenever conflicting object -- # names appear in distinct ar calls; check, warn and compensate. -- if (for obj in $save_oldobjs -- do -- $echo "X$obj" | $Xsed -e 's%^.*/%%' -- done | sort | sort -uc >/dev/null 2>&1); then -- : -- else -- $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2 -- $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2 -- AR_FLAGS=cq -- fi -+ - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj -- done -+ done - for obj in $save_oldobjs - do - oldobjs="$objlist $obj" - objlist="$objlist $obj" - eval test_cmds=\"$old_archive_cmds\" -- if len=`expr "X$test_cmds" : ".*"` && -+ if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; then - : - else -@@ -5098,7 +5538,7 @@ - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB -- fi -+ fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= -@@ -5109,12 +5549,13 @@ - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else -- eval cmds=\"\$concat_cmds~$old_archive_cmds\" -+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do -+ eval cmd=\"$cmd\" - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? -@@ -5146,11 +5587,13 @@ - fi - done - # Quote the link command for shipping. -- relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)" -+ relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then -- relink_command= -- fi -+ relink_command= -+ fi -+ -+ - # Only create the output if not a dry run. - if test -z "$run"; then - for installed in no yes; do -@@ -5162,13 +5605,17 @@ - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do -+ # Replacing uninstalled with installed can easily break crosscompilation, -+ # since the installed path is generally the wrong architecture. -CL -+ newdependency_libs="$newdependency_libs $deplib" -+ continue - case $deplib in - *.la) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - newdependency_libs="$newdependency_libs $libdir/$name" - ;; -@@ -5182,7 +5629,7 @@ - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - newdlfiles="$newdlfiles $libdir/$name" - done -@@ -5193,11 +5640,30 @@ - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - newdlprefiles="$newdlprefiles $libdir/$name" - done - dlprefiles="$newdlprefiles" -+ else -+ newdlfiles= -+ for lib in $dlfiles; do -+ case $lib in -+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; -+ *) abs=`pwd`"/$lib" ;; -+ esac -+ newdlfiles="$newdlfiles $abs" -+ done -+ dlfiles="$newdlfiles" -+ newdlprefiles= -+ for lib in $dlprefiles; do -+ case $lib in -+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; -+ *) abs=`pwd`"/$lib" ;; -+ esac -+ newdlprefiles="$newdlprefiles $abs" -+ done -+ dlprefiles="$newdlprefiles" - fi - $rm $output - # place dlname in correct position for cygwin -@@ -5241,7 +5707,7 @@ - - # Directory that this library needs to be installed in: - libdir='$install_libdir'" -- if test "$installed" = no && test "$need_relink" = yes && test "$fast_install" = no; then -+ if test "$installed" = no && test "$need_relink" = yes; then - $echo >> $output "\ - relink_command=\"$relink_command\"" - fi -@@ -5254,7 +5720,7 @@ - $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? - ;; - esac -- exit 0 -+ exit $EXIT_SUCCESS - ;; - - # libtool install mode -@@ -5265,11 +5731,11 @@ - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. -- $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then -+ $echo "X$nonopt" | grep shtool > /dev/null; then - # Aesthetically quote it. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` - case $arg in -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac -@@ -5278,14 +5744,14 @@ - shift - else - install_prog= -- arg="$nonopt" -+ arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac -@@ -5303,28 +5769,31 @@ - do - if test -n "$dest"; then - files="$files $dest" -- dest="$arg" -+ dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; -- -f) prev="-f" ;; -- -g) prev="-g" ;; -- -m) prev="-m" ;; -- -o) prev="-o" ;; -+ -f) -+ case " $install_prog " in -+ *[\\\ /]cp\ *) ;; -+ *) prev=$arg ;; -+ esac -+ ;; -+ -g | -m | -o) prev=$arg ;; - -s) - stripme=" -s" - continue - ;; -- -*) ;; -- -+ -*) -+ ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else -- dest="$arg" -+ dest=$arg - continue - fi - ;; -@@ -5333,7 +5802,7 @@ - # Aesthetically quote the argument. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in -- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) -+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac -@@ -5343,13 +5812,13 @@ - if test -z "$install_prog"; then - $echo "$modename: you must specify an install program" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - if test -n "$prev"; then - $echo "$modename: the \`$prev' option requires an argument" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - if test -z "$files"; then -@@ -5359,7 +5828,7 @@ - $echo "$modename: you must specify a destination" 1>&2 - fi - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - # Strip any trailing slash from the destination. -@@ -5380,7 +5849,7 @@ - if test "$#" -gt 2; then - $echo "$modename: \`$dest' is not a directory" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - fi - case $destdir in -@@ -5392,7 +5861,7 @@ - *) - $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - done -@@ -5421,7 +5890,7 @@ - else - $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - library_names= -@@ -5461,10 +5930,13 @@ - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. -- if test "$inst_prefix_dir" = "$destdir"; then -- $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 -- exit 1 -- fi -+ # -+ # This breaks install into our staging area. -PB -+ # -+ # if test "$inst_prefix_dir" = "$destdir"; then -+ # $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 -+ # exit $EXIT_FAILURE -+ # fi - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. -@@ -5478,7 +5950,7 @@ - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - fi - -@@ -5502,23 +5974,36 @@ - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. -+ # Try `ln -sf' first, because the `ln' binary might depend on -+ # the symlink we replace! Solaris /bin/ln does not understand -f, -+ # so we also need to try rm && ln -s. - for linkname - do - if test "$linkname" != "$realname"; then -- $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" -- $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" -+ $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" -+ $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - fi - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" -- eval cmds=\"$postinstall_cmds\" -+ cmds=$postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" -- $run eval "$cmd" || exit $? -+ $run eval "$cmd" || { -+ lt_exit=$? -+ -+ # Restore the uninstalled library and exit -+ if test "$mode" = relink; then -+ $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' -+ fi -+ -+ exit $lt_exit -+ } - done - IFS="$save_ifs" - fi -@@ -5556,7 +6041,7 @@ - *) - $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - -@@ -5574,7 +6059,7 @@ - $show "$install_prog $staticobj $staticdest" - $run eval "$install_prog \$staticobj \$staticdest" || exit $? - fi -- exit 0 -+ exit $EXIT_SUCCESS - ;; - - *) -@@ -5612,23 +6097,21 @@ - notinst_deplibs= - relink_command= - -- # To insure that "foo" is sourced, and not "foo.exe", -- # finese the cygwin/MSYS system by explicitly sourcing "foo." -- # which disallows the automatic-append-.exe behavior. -- case $build in -- *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; -- *) wrapperdot=${wrapper} ;; -- esac -+ # Note that it is not necessary on cygwin/mingw to append a dot to -+ # foo even if both foo and FILE.exe exist: automatic-append-.exe -+ # behavior happens only for exec(3), not for open(2)! Also, sourcing -+ # `FILE.' does not work on cygwin managed mounts. -+ # - # If there is no directory component, then add one. -- case $file in -- */* | *\\*) . ${wrapperdot} ;; -- *) . ./${wrapperdot} ;; -+ case $wrapper in -+ */* | *\\*) . ${wrapper} ;; -+ *) . ./${wrapper} ;; - esac - - # Check the variables that should have been set. - if test -z "$notinst_deplibs"; then - $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - finalize=yes -@@ -5650,30 +6133,21 @@ - done - - relink_command= -- # To insure that "foo" is sourced, and not "foo.exe", -- # finese the cygwin/MSYS system by explicitly sourcing "foo." -- # which disallows the automatic-append-.exe behavior. -- case $build in -- *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; -- *) wrapperdot=${wrapper} ;; -- esac -+ # Note that it is not necessary on cygwin/mingw to append a dot to -+ # foo even if both foo and FILE.exe exist: automatic-append-.exe -+ # behavior happens only for exec(3), not for open(2)! Also, sourcing -+ # `FILE.' does not work on cygwin managed mounts. -+ # - # If there is no directory component, then add one. -- case $file in -- */* | *\\*) . ${wrapperdot} ;; -- *) . ./${wrapperdot} ;; -+ case $wrapper in -+ */* | *\\*) . ${wrapper} ;; -+ *) . ./${wrapper} ;; - esac - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - if test "$finalize" = yes && test -z "$run"; then -- tmpdir="/tmp" -- test -n "$TMPDIR" && tmpdir="$TMPDIR" -- tmpdir="$tmpdir/libtool-$$" -- if $mkdir "$tmpdir" && chmod 700 "$tmpdir"; then : -- else -- $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 -- continue -- fi -+ tmpdir=`func_mktempdir` - file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` - outputname="$tmpdir/$file" - # Replace the output file specification. -@@ -5697,7 +6171,7 @@ - fi - - # remove .exe since cygwin /usr/bin/install will append another -- # one anyways -+ # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in -@@ -5729,16 +6203,17 @@ - $show "$install_prog $file $oldlib" - $run eval "$install_prog \$file \$oldlib" || exit $? - -- if test -n "$stripme" && test -n "$striplib"; then -+ if test -n "$stripme" && test -n "$old_striplib"; then - $show "$old_striplib $oldlib" - $run eval "$old_striplib $oldlib" || exit $? - fi - - # Do each command in the postinstall commands. -- eval cmds=\"$old_postinstall_cmds\" -+ cmds=$old_postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done -@@ -5752,9 +6227,9 @@ - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - test -n "$run" && current_libdirs=" -n$current_libdirs" -- exec_cmd='$SHELL $0 --finish$current_libdirs' -+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else -- exit 0 -+ exit $EXIT_SUCCESS - fi - ;; - -@@ -5773,10 +6248,11 @@ - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. -- eval cmds=\"$finish_cmds\" -+ cmds=$finish_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || admincmds="$admincmds - $cmd" -@@ -5793,9 +6269,9 @@ - fi - - # Exit here if they wanted silent mode. -- exit 0 -+ test "$show" = : && exit $EXIT_SUCCESS - -- $echo "----------------------------------------------------------------------" -+ $echo "X----------------------------------------------------------------------" | $Xsed - $echo "Libraries have been installed in:" - for libdir in $libdirs; do - $echo " $libdir" -@@ -5828,8 +6304,8 @@ - $echo - $echo "See any operating system documentation about shared libraries for" - $echo "more information, such as the ld(1) and ld.so(8) manual pages." -- $echo "----------------------------------------------------------------------" -- exit 0 -+ $echo "X----------------------------------------------------------------------" | $Xsed -+ exit $EXIT_SUCCESS - ;; - - # libtool execute mode -@@ -5841,7 +6317,7 @@ - if test -z "$cmd"; then - $echo "$modename: you must specify a COMMAND" 1>&2 - $echo "$help" -- exit 1 -+ exit $EXIT_FAILURE - fi - - # Handle -dlopen flags immediately. -@@ -5849,7 +6325,7 @@ - if test ! -f "$file"; then - $echo "$modename: \`$file' is not a file" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - dir= -@@ -5860,7 +6336,7 @@ - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - # Read the libtool library. -@@ -5887,7 +6363,7 @@ - dir="$dir/$objdir" - else - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - ;; - -@@ -5967,7 +6443,7 @@ - $echo "export $shlibpath_var" - fi - $echo "$cmd$args" -- exit 0 -+ exit $EXIT_SUCCESS - fi - ;; - -@@ -5995,7 +6471,7 @@ - if test -z "$rm"; then - $echo "$modename: you must specify an RM program" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - - rmdirs= -@@ -6045,15 +6521,24 @@ - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" -- test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - -- if test "$mode" = uninstall; then -+ case "$mode" in -+ clean) -+ case " $library_names " in -+ # " " in the beginning catches empty $dlname -+ *" $dlname "*) ;; -+ *) rmfiles="$rmfiles $objdir/$dlname" ;; -+ esac -+ test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" -+ ;; -+ uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. -- eval cmds=\"$postuninstall_cmds\" -+ cmds=$postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then -@@ -6065,10 +6550,11 @@ - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. -- eval cmds=\"$old_postuninstall_cmds\" -+ cmds=$old_postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" -+ eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then -@@ -6078,7 +6564,8 @@ - IFS="$save_ifs" - fi - # FIXME: should reinstall the best remaining shared library. -- fi -+ ;; -+ esac - fi - ;; - -@@ -6107,7 +6594,7 @@ - if test "$mode" = clean ; then - noexename=$name - case $file in -- *.exe) -+ *.exe) - file=`$echo $file|${SED} 's,.exe$,,'` - noexename=`$echo $name|${SED} 's,.exe$,,'` - # $file with .exe has already been added to rmfiles, -@@ -6152,20 +6639,20 @@ - "") - $echo "$modename: you must specify a MODE" 1>&2 - $echo "$generic_help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - - if test -z "$exec_cmd"; then - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - fi - fi # test -z "$show_help" - - if test -n "$exec_cmd"; then - eval exec $exec_cmd -- exit 1 -+ exit $EXIT_FAILURE - fi - - # We need to display help for each of the modes. -@@ -6201,7 +6688,7 @@ - a more detailed description of MODE. - - Report bugs to ." -- exit 0 -+ exit $EXIT_SUCCESS - ;; - - clean) -@@ -6313,6 +6800,8 @@ - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects -+ -precious-files-regex REGEX -+ don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -@@ -6354,14 +6843,14 @@ - *) - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$help" 1>&2 -- exit 1 -+ exit $EXIT_FAILURE - ;; - esac - - $echo - $echo "Try \`$modename --help' for more information about other modes." - --exit 0 -+exit $? - - # The TAGs below are defined such that we never get into a situation - # in which we disable both kinds of libraries. Given conflicting -@@ -6375,12 +6864,11 @@ - # configuration. But we'll never go from static-only to shared-only. - - # ### BEGIN LIBTOOL TAG CONFIG: disable-shared --build_libtool_libs=no --build_old_libs=yes -+disable_libs=shared - # ### END LIBTOOL TAG CONFIG: disable-shared - - # ### BEGIN LIBTOOL TAG CONFIG: disable-static --build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` -+disable_libs=static - # ### END LIBTOOL TAG CONFIG: disable-static - - # Local Variables: diff --git a/package/mutt/mutt-1.5.17+20080114-nodoc.patch b/package/mutt/mutt-1.5.17+20080114-nodoc.patch deleted file mode 100644 index 6fd556d..0000000 --- a/package/mutt/mutt-1.5.17+20080114-nodoc.patch +++ /dev/null @@ -1,21 +0,0 @@ -Disable the documentation build - -The documentation tool is compiled for the target, but executed on the -host. We don't bother fixing this, as we don't care of the -documentation in Buildroot. - -Signed-off-by: Thomas Petazzoni - -Index: mutt-1.5.17+20080114/Makefile.am -=================================================================== ---- mutt-1.5.17+20080114.orig/Makefile.am 2010-05-15 18:15:08.000000000 +0200 -+++ mutt-1.5.17+20080114/Makefile.am 2010-05-15 18:15:17.000000000 +0200 -@@ -9,7 +9,7 @@ - IMAP_INCLUDES = -I$(top_srcdir)/imap - endif - --SUBDIRS = m4 po intl doc contrib $(IMAP_SUBDIR) -+SUBDIRS = m4 po intl contrib $(IMAP_SUBDIR) - - bin_SCRIPTS = muttbug flea @SMIMEAUX_TARGET@ - diff --git a/package/opencv/opencv-2.2.0-fix-arm-no-sift.patch b/package/opencv/opencv-2.2.0-fix-arm-no-sift.patch deleted file mode 100644 index 2ba5ed2..0000000 --- a/package/opencv/opencv-2.2.0-fix-arm-no-sift.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -NarU 20 a/modules/features2d/src/sift.cpp b/modules/features2d/src/sift.cpp ---- a/modules/features2d/src/sift.cpp 2010-12-05 14:35:24.000000000 +1100 -+++ b/modules/features2d/src/sift.cpp 2011-05-14 10:57:27.435726626 +1000 -@@ -31,44 +31,40 @@ - // This software embodies a method for which the following patent has - // been issued: "Method and apparatus for identifying scale invariant - // features in an image and use of same for locating an object in an - // image," David G. Lowe, US Patent 6,711,293 (March 23, - // 2004). Provisional application filed March 8, 1999. Asignee: The - // University of British Columbia. - // - // IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY - // FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, - // INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND - // ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN - // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE UNIVERSITY OF - // CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT - // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - // A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" - // BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE - // MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. - - #include "precomp.hpp" - --#ifdef __arm__ --#define ARM_NO_SIFT --#endif -- - #ifdef ANDROID - #undef ARM_NO_SIFT - #endif //ANDROID - - #ifndef ARM_NO_SIFT - - #include - #include - - #define log2(a) (log((a))/CV_LOG2) - - #if defined _MSC_VER && _MSC_VER >= 1400 - #pragma warning(disable: 4100 4244 4267 4305) - #endif - - /* - * from sift.hpp of original code - */ - #if defined (VL_USEFASTMATH) - #if defined (VL_MAC) diff --git a/package/opencv/opencv-2.2.0-fix-zlib-64-bit-arm.patch b/package/opencv/opencv-2.2.0-fix-zlib-64-bit-arm.patch deleted file mode 100644 index fb1f372..0000000 --- a/package/opencv/opencv-2.2.0-fix-zlib-64-bit-arm.patch +++ /dev/null @@ -1,102 +0,0 @@ -diff -NarU 20 a/3rdparty/include/zconf.h b/3rdparty/include/zconf.h ---- a/3rdparty/include/zconf.h 2010-12-05 14:35:23.000000000 +1100 -+++ b/3rdparty/include/zconf.h 2011-05-14 11:03:52.473399977 +1000 -@@ -377,41 +377,41 @@ - #if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) - # include /* for SEEK_* and off_t */ - # ifdef VMS - # include /* for off_t */ - # endif - # ifndef z_off_t - # define z_off_t off_t - # endif - #endif - - #ifndef SEEK_SET - # define SEEK_SET 0 /* Seek from beginning of file. */ - # define SEEK_CUR 1 /* Seek from current position. */ - # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ - #endif - - #ifndef z_off_t - # define z_off_t long - #endif - --#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 -+#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 && !defined(__arm__) - # define z_off64_t off64_t - #else - # define z_off64_t z_off_t - #endif - - #if defined(__OS400__) - # define NO_vsnprintf - #endif - - #if defined(__MVS__) - # define NO_vsnprintf - #endif - - /* MVS linker does not support external names larger than 8 bytes */ - #if defined(__MVS__) - #pragma map(deflateInit_,"DEIN") - #pragma map(deflateInit2_,"DEIN2") - #pragma map(deflateEnd,"DEEND") - #pragma map(deflateBound,"DEBND") - #pragma map(inflateInit_,"ININ") -diff -NarU 20 a/3rdparty/include/zlib.h b/3rdparty/include/zlib.h ---- a/3rdparty/include/zlib.h 2010-12-05 14:35:23.000000000 +1100 -+++ b/3rdparty/include/zlib.h 2011-05-14 11:04:38.600820078 +1000 -@@ -1545,50 +1545,50 @@ - int stream_size)); - #define deflateInit(strm, level) \ - deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream)) - #define inflateInit(strm) \ - inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream)) - #define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ - deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ - (strategy), ZLIB_VERSION, sizeof(z_stream)) - #define inflateInit2(strm, windowBits) \ - inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) - #define inflateBackInit(strm, windowBits, window) \ - inflateBackInit_((strm), (windowBits), (window), \ - ZLIB_VERSION, sizeof(z_stream)) - - /* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or - * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if - * both are true, the application gets the *64 functions, and the regular - * functions are changed to 64 bits) -- in case these are set on systems - * without large file support, _LFS64_LARGEFILE must also be true - */ --#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 -+#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 && !defined(__arm__) - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); - ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); - #endif - --#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0 -+#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0 && !defined(__arm__) - # define gzopen gzopen64 - # define gzseek gzseek64 - # define gztell gztell64 - # define gzoffset gzoffset64 - # define adler32_combine adler32_combine64 - # define crc32_combine crc32_combine64 - # ifdef _LARGEFILE64_SOURCE - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); - # endif - #else - ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); diff --git a/package/opencv/opencv-2.2.0-remove-obsolete-rej-files.patch b/package/opencv/opencv-2.2.0-remove-obsolete-rej-files.patch deleted file mode 100644 index 396c2a1..0000000 --- a/package/opencv/opencv-2.2.0-remove-obsolete-rej-files.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -NarU 20 a/modules/haartraining/createsamples.cpp.rej b/modules/haartraining/createsamples.cpp.rej ---- a/modules/haartraining/createsamples.cpp.rej 2010-12-05 14:35:24.000000000 +1100 -+++ b/modules/haartraining/createsamples.cpp.rej 1970-01-01 10:00:00.000000000 +1000 -@@ -1,17 +0,0 @@ --*************** --*** 50,55 **** -- #include -- #include -- -- #include "cvhaartraining.h" -- -- int main( int argc, char* argv[] ) ----- 50,57 ---- -- #include -- #include -- --+ using namespace std; --+ -- #include "cvhaartraining.h" -- -- int main( int argc, char* argv[] ) -diff -NarU 20 a/modules/haartraining/haartraining.cpp.rej b/modules/haartraining/haartraining.cpp.rej ---- a/modules/haartraining/haartraining.cpp.rej 2010-12-05 14:35:24.000000000 +1100 -+++ b/modules/haartraining/haartraining.cpp.rej 1970-01-01 10:00:00.000000000 +1000 -@@ -1,17 +0,0 @@ --*************** --*** 49,54 **** -- #include -- #include -- -- #include "cvhaartraining.h" -- -- int main( int argc, char* argv[] ) ----- 49,56 ---- -- #include -- #include -- --+ using namespace std; --+ -- #include "cvhaartraining.h" -- -- int main( int argc, char* argv[] ) diff --git a/package/openvpn/openvpn-fix-tmpdir.patch b/package/openvpn/openvpn-fix-tmpdir.patch deleted file mode 100644 index 919d49b..0000000 --- a/package/openvpn/openvpn-fix-tmpdir.patch +++ /dev/null @@ -1,39 +0,0 @@ -From b70d99fb617350b252c8bde2f1f2d81d3f5b7955 Mon Sep 17 00:00:00 2001 -From: Gustavo Zacarias -Date: Wed, 27 Apr 2011 18:43:50 +0200 -Subject: [PATCH] Fix compile issues when using --enable-small and --disable-ssl/--disable-crypto - -The tmp_dir string is required in the options struct regardless of options -so spin it out of #if conditionals. - -Signed-off-by: Gustavo Zacarias -Acked-by: David Sommerseth -Signed-off-by: David Sommerseth ---- - options.h | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) - -diff --git a/options.h b/options.h -index a9c6a94..8a51502 100644 ---- a/options.h -+++ b/options.h -@@ -369,6 +369,8 @@ struct options - struct plugin_option_list *plugin_list; - #endif - -+ const char *tmp_dir; -+ - #if P2MP - - #if P2MP_SERVER -@@ -409,7 +411,6 @@ struct options - const char *client_connect_script; - const char *client_disconnect_script; - const char *learn_address_script; -- const char *tmp_dir; - const char *client_config_dir; - bool ccd_exclusive; - bool disable; --- -1.7.0.1 - diff --git a/package/oprofile/oprofile-0.9.4-001-avr32-enable-lookup_dcookie.patch b/package/oprofile/oprofile-0.9.4-001-avr32-enable-lookup_dcookie.patch deleted file mode 100644 index 7c41389..0000000 --- a/package/oprofile/oprofile-0.9.4-001-avr32-enable-lookup_dcookie.patch +++ /dev/null @@ -1,24 +0,0 @@ -Index: oprofile-0.9.4/daemon/opd_cookie.c -=================================================================== ---- oprofile-0.9.4.orig/daemon/opd_cookie.c 2008-07-25 16:00:17.000000000 +0200 -+++ oprofile-0.9.4/daemon/opd_cookie.c 2008-07-25 16:00:20.000000000 +0200 -@@ -78,6 +78,19 @@ - (unsigned long)(cookie & 0xffffffff), - (unsigned long)(cookie >> 32), buf, size); - } -+#elif (defined(__avr32__)) -+static inline int lookup_dcookie(cookie_t cookie, char * buf, size_t size) -+{ -+ /* On avr32, the first 64bit arg (cookie) is expected to be in -+ * r11(MSW)/r10(LSW) which normally hold arg 2 and arg 3. The second arg -+ * (buf) is then expected to be in r12 which normally holds the first -+ * arg. Third arg (size) is at the right position. -+ */ -+ return syscall(__NR_lookup_dcookie, buf, -+ (unsigned long)(cookie >> 32), -+ (unsigned long)(cookie & 0xffffffff), -+ size); -+} - #else - static inline int lookup_dcookie(cookie_t cookie, char * buf, size_t size) - { diff --git a/package/oprofile/oprofile-0.9.4-002-no-query-modules.patch b/package/oprofile/oprofile-0.9.4-002-no-query-modules.patch deleted file mode 100644 index 9f00da6..0000000 --- a/package/oprofile/oprofile-0.9.4-002-no-query-modules.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -urN oprofile-0.9.4-0rig//daemon/liblegacy/opd_kernel.c oprofile-0.9.4/daemon/liblegacy/opd_kernel.c ---- oprofile-0.9.4-0rig//daemon/liblegacy/opd_kernel.c 2005-05-04 04:47:03.000000000 +0200 -+++ oprofile-0.9.4/daemon/liblegacy/opd_kernel.c 2009-01-21 07:40:20.000000000 +0100 -@@ -270,6 +270,9 @@ - */ - static void opd_drop_module_sample(unsigned long eip) - { -+ verbprintf(vmodule, "query_module not available on linux-2.6: %s\n", strerror(EPERM)); -+ -+#if 0 - char * module_names; - char * name; - size_t size = 1024; -@@ -307,6 +310,7 @@ - - if (module_names) - free(module_names); -+#endif - } - - diff --git a/package/proftpd/proftpd-1.3.3b-fix-kernel-header-capability-version.patch b/package/proftpd/proftpd-1.3.3b-fix-kernel-header-capability-version.patch deleted file mode 100644 index 4401c9a..0000000 --- a/package/proftpd/proftpd-1.3.3b-fix-kernel-header-capability-version.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/lib/libcap/libcap.h 2008-08-22 19:49:48.000000000 -0700 -+++ b/lib/libcap/libcap.h 2010-10-06 15:31:11.000000000 -0700 -@@ -65,7 +65,8 @@ struct _cap_struct { - */ - - #if !defined(_LINUX_CAPABILITY_VERSION_1) || \ -- (_LINUX_CAPABILITY_VERSION_1 != 0x19980330) -+ ((_LINUX_CAPABILITY_VERSION_1 != 0x19980330) && \ -+ (_LINUX_CAPABILITY_VERSION_1 != 0x20071026)) - - # error "Kernel does not match library" - # error "file "libcap.h" --> fix and recompile libcap" diff --git a/package/qt/qt-4.7.3-configure.patch b/package/qt/qt-4.7.3-configure.patch deleted file mode 100644 index cef53e3..0000000 --- a/package/qt/qt-4.7.3-configure.patch +++ /dev/null @@ -1,48 +0,0 @@ -Fix -hostprefix behaviour - -When -hostprefix ./configure option is used, Qt installs all its -headers, libraries and binaries inside the given host prefix, instead -of the prefix. This is used by Buildroot to make sure that all Qt -libraries and headers are installed in $(STAGING_DIR). - -Qt ./configure script also allows to tune the installation location of -various elements, for examples the plugins through the -plugindir -option. Unfortunately, this option only impact the installation path -on the target, but not on the host when -hostprefix is used. - -This patch modifies Qt ./configure script so that HOST_*PATH_STR -variables are composed of the host prefix concatenated with the path -of installation on the target. This way, the plugin installation local -in the $(STAGING_DIR) and on the target remains the same. - -Signed-off-by: Thomas Petazzoni - -Index: qt-4.7.2/configure -=================================================================== ---- qt-4.7.2.orig/configure 2011-03-31 22:28:16.530647168 +0200 -+++ qt-4.7.2/configure 2011-03-31 22:29:38.908081695 +0200 -@@ -4456,15 +4456,15 @@ - - - if [ ! -z "$QT_HOST_PREFIX" ]; then -- HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"` -- HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"` -- HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"` -- HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"` -- HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"` -- HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"` -- HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"` -- HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"` -- HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"` -+ HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX/$QT_INSTALL_PREFIX"` -+ HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/$QT_INSTALL_DOCS"` -+ HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/$QT_INSTALL_HEADERS"` -+ HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/$QT_INSTALL_LIBS"` -+ HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/$QT_INSTALL_BINS"` -+ HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/$QT_INSTALL_PLUGINS"` -+ HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/$QT_INSTALL_IMPORTS"` -+ HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX/$QT_INSTALL_DATA"` -+ HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/$QT_INSTALL_TRANSLATIONS"` - HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"` - HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"` - HOSTDEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"` diff --git a/package/qt/qt-4.7.3-pthread_getattr_np.patch b/package/qt/qt-4.7.3-pthread_getattr_np.patch deleted file mode 100644 index 5cbd7d2..0000000 --- a/package/qt/qt-4.7.3-pthread_getattr_np.patch +++ /dev/null @@ -1,100 +0,0 @@ -Add pthred_getattr_np / phread_attr_getstrack alternatives for uClibc - -Based on https://dev.openwrt.org/log/packages/Xorg/lib/qt4/patches/100-fix-webkit-for-uclibc.patch?rev=20371 - -Signed-off-by: Johan Sagaert ---- qt-everywhere-opensource-src-4.6.2/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp 2010-02-11 16:55:20.000000000 +0100 -+++ qt-everywhere-opensource-src-4.6.2JS/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp 2010-05-23 10:49:29.000000000 +0200 -@@ -75,6 +75,22 @@ - #endif - #include - -+#if defined(QT_LINUXBASE) -+#include -+#endif -+ -+#if defined(__UCLIBC__) -+// versions of uClibc 0.9.31 and below do not have -+// pthread_getattr_np or pthread_attr_getstack. -+#if __UCLIBC_MAJOR__ == 0 && \ -+ (__UCLIBC_MINOR__ < 9 || \ -+ (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ <= 31)) -+#define UCLIBC_USE_PROC_SELF_MAPS 1 -+#include -+extern int *__libc_stack_end; -+#endif -+#endif -+ - #if OS(SOLARIS) - #include - #else -@@ -667,18 +683,61 @@ static inline void* currentThreadStackBa - get_thread_info(find_thread(NULL), &threadInfo); - return threadInfo.stack_end; - #elif OS(UNIX) -+#ifdef UCLIBC_USE_PROC_SELF_MAPS -+ // Read /proc/self/maps and locate the line whose address -+ // range contains __libc_stack_end. -+ FILE *file = fopen("/proc/self/maps", "r"); -+ if (!file) -+ return 0; -+ __fsetlocking(file, FSETLOCKING_BYCALLER); -+ char *line = NULL; -+ size_t lineLen = 0; -+ while (!feof_unlocked(file)) { -+ if (getdelim(&line, &lineLen, '\n', file) <= 0) -+ break; -+ -+ long from; -+ long to; -+ if (sscanf (line, "%lx-%lx", &from, &to) != 2) -+ continue; -+ if (from <= (long)__libc_stack_end && (long)__libc_stack_end < to) { -+ fclose(file); -+ free(line); -+#ifdef _STACK_GROWS_UP -+ return (void *)from; -+#else -+ return (void *)to; -+#endif -+ } -+ } -+ fclose(file); -+ free(line); -+ return 0; -+#else - AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex); - MutexLocker locker(mutex); - static void* stackBase = 0; - static size_t stackSize = 0; - static pthread_t stackThread; - pthread_t thread = pthread_self(); - if (stackBase == 0 || thread != stackThread) { -+ -+#if defined(QT_LINUXBASE) -+ // LinuxBase is missing pthread_getattr_np - resolve it once at runtime instead -+ // see http://bugs.linuxbase.org/show_bug.cgi?id=2364 -+ typedef int (*GetAttrPtr)(pthread_t, pthread_attr_t *); -+ static int (*pthread_getattr_np_ptr)(pthread_t, pthread_attr_t *) = 0; -+ if (!pthread_getattr_np_ptr) -+ *(void **)&pthread_getattr_np_ptr = dlsym(RTLD_DEFAULT, "pthread_getattr_np"); -+#endif - pthread_attr_t sattr; - pthread_attr_init(&sattr); - #if HAVE(PTHREAD_NP_H) || OS(NETBSD) - // e.g. on FreeBSD 5.4, neundorf@kde.org - pthread_attr_get_np(thread, &sattr); -+#elif defined(QT_LINUXBASE) -+ if (pthread_getattr_np_ptr) -+ pthread_getattr_np_ptr(thread, &sattr); - #else - // FIXME: this function is non-portable; other POSIX systems may have different np alternatives - pthread_getattr_np(thread, &sattr); -@@ -690,6 +749,7 @@ static inline void* currentThreadStackBa - stackThread = thread; - } - return static_cast(stackBase) + stackSize; -+#endif - #elif OS(WINCE) - AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex); - MutexLocker locker(mutex); diff --git a/package/qt/qt-4.7.3-pthread_getattr_np_webkit.patch b/package/qt/qt-4.7.3-pthread_getattr_np_webkit.patch deleted file mode 100644 index e2bc188..0000000 --- a/package/qt/qt-4.7.3-pthread_getattr_np_webkit.patch +++ /dev/null @@ -1,67 +0,0 @@ ---- a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp 2010-09-10 11:05:22.000000000 +0200 -+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp 2010-11-15 16:39:53.000000000 +0100 -@@ -70,6 +70,18 @@ - #endif - #include - -+#if defined(__UCLIBC__) -+// versions of uClibc 0.9.31 and below do not have -+// pthread_getattr_np or pthread_attr_getstack. -+#if __UCLIBC_MAJOR__ == 0 && \ -+ (__UCLIBC_MINOR__ < 9 || \ -+ (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ <= 31)) -+#define UCLIBC_USE_PROC_SELF_MAPS 1 -+#include -+extern int* __libc_stack_end; -+#endif -+#endif -+ - #if OS(SOLARIS) - #include - #else -@@ -580,6 +592,37 @@ - get_thread_info(find_thread(NULL), &threadInfo); - return threadInfo.stack_end; - #elif OS(UNIX) -+#ifdef UCLIBC_USE_PROC_SELF_MAPS -+ // Read /proc/self/maps and locate the line whose address -+ // range contains __libc_stack_end. -+ FILE* file = fopen("/proc/self/maps", "r"); -+ if (!file) -+ return 0; -+ __fsetlocking(file, FSETLOCKING_BYCALLER); -+ char* line = 0; -+ size_t lineLen = 0; -+ while (!feof_unlocked(file)) { -+ if (getdelim(&line, &lineLen, '\n', file) <= 0) -+ break; -+ -+ long from; -+ long to; -+ if (sscanf (line, "%lx-%lx", &from, &to) != 2) -+ continue; -+ if (from <= (long)__libc_stack_end && (long)__libc_stack_end < to) { -+ fclose(file); -+ free(line); -+#ifdef _STACK_GROWS_UP -+ return (void *)from; -+#else -+ return (void *)to; -+#endif -+ } -+ } -+ fclose(file); -+ free(line); -+ return 0; -+#else - AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex); - MutexLocker locker(mutex); - static void* stackBase = 0; -@@ -603,6 +646,7 @@ - stackThread = thread; - } - return static_cast(stackBase) + stackSize; -+#endif - #elif OS(WINCE) - AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex); - MutexLocker locker(mutex); diff --git a/package/qt/qt-4.7.3-script-qtdbus-no-gui.patch b/package/qt/qt-4.7.3-script-qtdbus-no-gui.patch deleted file mode 100644 index e29e9e4..0000000 --- a/package/qt/qt-4.7.3-script-qtdbus-no-gui.patch +++ /dev/null @@ -1,22 +0,0 @@ -[PATCH] fix build with script+dbus enabled, but no gui - -The script/qtdbus plugin doesn't need gui support, so don't try to -link it against libQtGui. - -Signed-off-by: Peter Korsgaard ---- - src/plugins/script/qtdbus/qtdbus.pro | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: qt-4.7.3/src/plugins/script/qtdbus/qtdbus.pro -=================================================================== ---- qt-4.7.3.orig/src/plugins/script/qtdbus/qtdbus.pro -+++ qt-4.7.3/src/plugins/script/qtdbus/qtdbus.pro -@@ -1,6 +1,6 @@ - TARGET = qtscriptdbus - include(../../qpluginbase.pri) --QT = core gui script -+QT = core script - CONFIG += qdbus - - SOURCES += main.cpp diff --git a/package/quagga/quagga-fix-no-ipv6.patch b/package/quagga/quagga-fix-no-ipv6.patch deleted file mode 100644 index acf8fec..0000000 --- a/package/quagga/quagga-fix-no-ipv6.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 3bde17f1af635c9ca19df0b3516cb8ad0376e6d3 Mon Sep 17 00:00:00 2001 -From: Paul Jakma -Date: Wed, 23 Mar 2011 10:30:30 +0000 -Subject: [PATCH 1/1] bgpd: Fix compile failure if IPv6 build was disabled. - -* bgp_route.c: ({no_,}ipv6_bgp_network_ttl_cmd) depends on ipv6_bgp_network - which is HAVE_IPV6, so these should be too. - (bgp_route_init) and the installs should be similarly ifdefed ---- - bgpd/bgp_route.c | 6 +++++- - 1 files changed, 5 insertions(+), 1 deletions(-) - -diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c -index 8c05ba6..5c516f0 100644 ---- a/bgpd/bgp_route.c -+++ b/bgpd/bgp_route.c -@@ -4327,6 +4327,7 @@ ALIAS_DEPRECATED (no_bgp_network_mask_natural, - "Specify a BGP backdoor route\n" - "AS-Path hopcount limit attribute\n" - "AS-Pathlimit TTL, in number of AS-Path hops\n") -+#ifdef HAVE_IPV6 - ALIAS_DEPRECATED (ipv6_bgp_network, - ipv6_bgp_network_ttl_cmd, - "network X:X::X:X/M pathlimit <0-255>", -@@ -4342,6 +4343,7 @@ ALIAS_DEPRECATED (no_ipv6_bgp_network, - "IPv6 prefix /\n" - "AS-Path hopcount limit attribute\n" - "AS-Pathlimit TTL, in number of AS-Path hops\n") -+#endif /* HAVE_IPV6 */ - - /* Aggreagete address: - -@@ -12958,9 +12960,11 @@ bgp_route_init (void) - install_element (BGP_IPV4M_NODE, &no_bgp_network_backdoor_ttl_cmd); - install_element (BGP_IPV4M_NODE, &no_bgp_network_mask_backdoor_ttl_cmd); - install_element (BGP_IPV4M_NODE, &no_bgp_network_mask_natural_backdoor_ttl_cmd); -- -+ -+#ifdef HAVE_IPV6 - install_element (BGP_IPV6_NODE, &ipv6_bgp_network_ttl_cmd); - install_element (BGP_IPV6_NODE, &no_ipv6_bgp_network_ttl_cmd); -+#endif - } - - void --- -1.7.4 - diff --git a/package/quagga/quagga-fix-opaque.patch b/package/quagga/quagga-fix-opaque.patch deleted file mode 100644 index 17a970e..0000000 --- a/package/quagga/quagga-fix-opaque.patch +++ /dev/null @@ -1,127 +0,0 @@ -From d71ea65270408a45e4bec036671ec73b24b994b4 Mon Sep 17 00:00:00 2001 -From: Paul Jakma -Date: Tue, 22 Mar 2011 15:23:55 +0000 -Subject: [PATCH 1/1] ospfd: Compile fix for opaque support - -* ospfd: Refresher logic cleanup broke OSPF opaque, which does its own thing - with regard to refresher logic and which also, in the protocol, requires - implementations to keep state of which OI an LSA is received on (rather - than providing information in the LSA to allow it to be looked up - as - other LSAs requiring such assocation were careful to do). -* ospf_lsa.h: (struct ospf_interface) Add back the pointer to oi, but only - for type-9 now. -* ospf_nsm.c: (ospf_db_summary_add) check the oi actually exists first - - doesn't obviate the need for opaque to ensure oi pointers get cleaned up - when ospf_interfaces disappear. -* ospf_opaque.{c,h}: (ospf_opaque_functab,ospf_opaque_lsa_refresh) Refresher - LSA functions now need to return the LSA to the general refresh logic, - to indicate whether the LSA was refreshed. ---- - ospfd/ospf_lsa.h | 3 +++ - ospfd/ospf_nsm.c | 2 +- - ospfd/ospf_opaque.c | 13 +++++++------ - ospfd/ospf_opaque.h | 4 ++-- - 4 files changed, 13 insertions(+), 9 deletions(-) - -diff --git a/ospfd/ospf_lsa.h b/ospfd/ospf_lsa.h -index fee3470..72e2f8a 100644 ---- a/ospfd/ospf_lsa.h -+++ b/ospfd/ospf_lsa.h -@@ -114,6 +114,9 @@ struct ospf_lsa - - /* Refreshement List or Queue */ - int refresh_list; -+ -+ /* For Type-9 Opaque-LSAs */ -+ struct ospf_interface *oi; - }; - - /* OSPF LSA Link Type. */ -diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c -index 279d2a0..cbc3171 100644 ---- a/ospfd/ospf_nsm.c -+++ b/ospfd/ospf_nsm.c -@@ -216,7 +216,7 @@ ospf_db_summary_add (struct ospf_neighbor *nbr, struct ospf_lsa *lsa) - { - case OSPF_OPAQUE_LINK_LSA: - /* Exclude type-9 LSAs that does not have the same "oi" with "nbr". */ -- if (lsa->oi != nbr->oi) -+ if (nbr->oi && ospf_if_exists (lsa->oi) != nbr->oi) - return 0; - break; - case OSPF_OPAQUE_AREA_LSA: -diff --git a/ospfd/ospf_opaque.c b/ospfd/ospf_opaque.c -index 6e90011..aa126e1 100644 ---- a/ospfd/ospf_opaque.c -+++ b/ospfd/ospf_opaque.c -@@ -251,7 +251,7 @@ struct ospf_opaque_functab - void (* config_write_debug )(struct vty *vty); - void (* show_opaque_info )(struct vty *vty, struct ospf_lsa *lsa); - int (* lsa_originator)(void *arg); -- void (* lsa_refresher )(struct ospf_lsa *lsa); -+ struct ospf_lsa *(* lsa_refresher )(struct ospf_lsa *lsa); - int (* new_lsa_hook)(struct ospf_lsa *lsa); - int (* del_lsa_hook)(struct ospf_lsa *lsa); - }; -@@ -354,7 +354,7 @@ ospf_register_opaque_functab ( - void (* config_write_debug )(struct vty *vty), - void (* show_opaque_info )(struct vty *vty, struct ospf_lsa *lsa), - int (* lsa_originator)(void *arg), -- void (* lsa_refresher )(struct ospf_lsa *lsa), -+ struct ospf_lsa *(* lsa_refresher )(struct ospf_lsa *lsa), - int (* new_lsa_hook)(struct ospf_lsa *lsa), - int (* del_lsa_hook)(struct ospf_lsa *lsa)) - { -@@ -1608,12 +1608,13 @@ out: - return new; - } - --void -+struct ospf_lsa * - ospf_opaque_lsa_refresh (struct ospf_lsa *lsa) - { - struct ospf *ospf; - struct ospf_opaque_functab *functab; -- -+ struct ospf_lsa *new = NULL; -+ - ospf = ospf_lookup (); - - if ((functab = ospf_opaque_functab_lookup (lsa)) == NULL -@@ -1633,9 +1634,9 @@ ospf_opaque_lsa_refresh (struct ospf_lsa *lsa) - ospf_lsa_flush (ospf, lsa); - } - else -- (* functab->lsa_refresher)(lsa); -+ new = (* functab->lsa_refresher)(lsa); - -- return; -+ return new; - } - - /*------------------------------------------------------------------------* -diff --git a/ospfd/ospf_opaque.h b/ospfd/ospf_opaque.h -index f49fe46..2273064 100644 ---- a/ospfd/ospf_opaque.h -+++ b/ospfd/ospf_opaque.h -@@ -120,7 +120,7 @@ ospf_register_opaque_functab ( - void (* config_write_debug )(struct vty *vty), - void (* show_opaque_info )(struct vty *vty, struct ospf_lsa *lsa), - int (* lsa_originator)(void *arg), -- void (* lsa_refresher )(struct ospf_lsa *lsa), -+ struct ospf_lsa *(* lsa_refresher )(struct ospf_lsa *lsa), - int (* new_lsa_hook)(struct ospf_lsa *lsa), - int (* del_lsa_hook)(struct ospf_lsa *lsa) - ); -@@ -143,7 +143,7 @@ extern void ospf_opaque_lsa_originate_schedule (struct ospf_interface *oi, - int *init_delay); - extern struct ospf_lsa *ospf_opaque_lsa_install (struct ospf_lsa *, - int rt_recalc); --extern void ospf_opaque_lsa_refresh (struct ospf_lsa *lsa); -+extern struct ospf_lsa *ospf_opaque_lsa_refresh (struct ospf_lsa *lsa); - - extern void ospf_opaque_lsa_reoriginate_schedule (void *lsa_type_dependent, - u_char lsa_type, --- -1.7.4 - diff --git a/package/quagga/quagga-zlog.patch b/package/quagga/quagga-zlog.patch deleted file mode 100644 index ad75bfe..0000000 --- a/package/quagga/quagga-zlog.patch +++ /dev/null @@ -1,43 +0,0 @@ -From fc95186c30884c96543aecfc56cfe5b08774525b Mon Sep 17 00:00:00 2001 -From: Christian Hammers -Date: Wed, 23 Mar 2011 13:07:55 +0300 -Subject: [PATCH] lib: fix more format warnings (#637) - -The following patch was also neccessary to compile. - -* command.c: (config_logmsg_cmd) use "%s" format spec -* if.c: (connected_log) ditto ---- - lib/command.c | 2 +- - lib/if.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/lib/command.c b/lib/command.c -index 5a13f39..264e0f7 100644 ---- a/lib/command.c -+++ b/lib/command.c -@@ -3056,7 +3056,7 @@ DEFUN (config_logmsg, - if ((level = level_match(argv[0])) == ZLOG_DISABLED) - return CMD_ERR_NO_MATCH; - -- zlog(NULL, level, ((message = argv_concat(argv, argc, 1)) ? message : "")); -+ zlog(NULL, level, "%s", ((message = argv_concat(argv, argc, 1)) ? message : "")); - if (message) - XFREE(MTYPE_TMP, message); - return CMD_SUCCESS; -diff --git a/lib/if.c b/lib/if.c -index b61bdbf..86f754b 100644 ---- a/lib/if.c -+++ b/lib/if.c -@@ -664,7 +664,7 @@ connected_log (struct connected *connected, char *str) - strncat (logbuf, inet_ntop (p->family, &p->u.prefix, buf, BUFSIZ), - BUFSIZ - strlen(logbuf)); - } -- zlog (NULL, LOG_INFO, logbuf); -+ zlog (NULL, LOG_INFO, "%s", logbuf); - } - - /* If two connected address has same prefix return 1. */ --- -1.7.4 - diff --git a/package/samba/samba-CVE-2011-0719.patch b/package/samba/samba-CVE-2011-0719.patch deleted file mode 100644 index 1cb8580..0000000 --- a/package/samba/samba-CVE-2011-0719.patch +++ /dev/null @@ -1,613 +0,0 @@ -From 724e44eed299c618066dec411530aa9f156119ec Mon Sep 17 00:00:00 2001 -From: Karolin Seeger -Date: Sun, 27 Feb 2011 18:28:29 +0100 -Subject: [PATCH] Fix denial of service - memory corruption. - -CVE-2011-0719 - -Fix bug #7949 (DoS in Winbind and smbd with many file descriptors open). - -All current released versions of Samba are vulnerable to -a denial of service caused by memory corruption. Range -checks on file descriptors being used in the FD_SET macro -were not present allowing stack corruption. This can cause -the Samba code to crash or to loop attempting to select -on a bad file descriptor set. - -A connection to a file share, or a local account is needed -to exploit this problem, either authenticated or unauthenticated -(guest connection). - -Currently we do not believe this flaw is exploitable -beyond a crash or causing the code to loop, but on the -advice of our security reviewers we are releasing fixes -in case an exploit is discovered at a later date. ---- - source/client/client.c | 4 +++- - source/client/dnsbrowse.c | 12 ++++++++++++ - source/lib/events.c | 13 +++++++++++++ - source/lib/packet.c | 5 +++++ - source/lib/readline.c | 5 +++++ - source/lib/select.c | 6 ++++++ - source/lib/util_sock.c | 11 +++++++++-- - source/libaddns/dnssock.c | 6 +++++- - source/libsmb/nmblib.c | 5 +++++ - source/nmbd/nmbd_packets.c | 24 ++++++++++++++++++++++-- - source/nsswitch/wb_common.c | 22 ++++++++++++++++++++-- - source/printing/printing.c | 5 +++++ - source/smbd/dnsregister.c | 6 ++++++ - source/smbd/oplock.c | 5 ++++- - source/smbd/oplock_irix.c | 5 +++++ - source/smbd/process.c | 2 +- - source/smbd/server.c | 29 +++++++++++++++++++++-------- - source/utils/smbfilter.c | 8 ++++++-- - source/winbindd/winbindd.c | 12 +++++++++++- - source/winbindd/winbindd_dual.c | 7 +++++++ - 20 files changed, 171 insertions(+), 21 deletions(-) - -diff --git a/source/client/client.c b/source/client/client.c -index 53bd9e6..a989441 100644 ---- a/source/client/client.c -+++ b/source/client/client.c -@@ -4379,8 +4379,10 @@ static void readline_callback(void) - - again: - -- if (cli->fd == -1) -+ if (cli->fd < 0 || cli->fd >= FD_SETSIZE) { -+ errno = EBADF; - return; -+ } - - FD_ZERO(&fds); - FD_SET(cli->fd,&fds); -diff --git a/source/client/dnsbrowse.c b/source/client/dnsbrowse.c -index 5e3a4de..aa2fb22 100644 ---- a/source/client/dnsbrowse.c -+++ b/source/client/dnsbrowse.c -@@ -81,6 +81,11 @@ static void do_smb_resolve(struct mdns_smbsrv_result *browsesrv) - TALLOC_FREE(fdset); - } - -+ if (mdnsfd < 0 || mdnsfd >= FD_SETSIZE) { -+ errno = EBADF; -+ break; -+ } -+ - fdsetsz = howmany(mdnsfd + 1, NFDBITS) * sizeof(fd_mask); - fdset = TALLOC_ZERO(ctx, fdsetsz); - FD_SET(mdnsfd, fdset); -@@ -183,6 +188,13 @@ int do_smb_browse(void) - - fdsetsz = howmany(mdnsfd + 1, NFDBITS) * sizeof(fd_mask); - fdset = TALLOC_ZERO(ctx, fdsetsz); -+ -+ if (mdnsfd < 0 || mdnsfd >= FD_SETSIZE) { -+ errno = EBADF; -+ TALLOC_FREE(ctx); -+ return 1; -+ } -+ - FD_SET(mdnsfd, fdset); - - tv.tv_sec = 1; -diff --git a/source/lib/events.c b/source/lib/events.c -index cd20ceb..2ddbab7 100644 ---- a/source/lib/events.c -+++ b/source/lib/events.c -@@ -140,6 +140,11 @@ struct fd_event *event_add_fd(struct event_context *event_ctx, - { - struct fd_event *fde; - -+ if (fd < 0 || fd >= FD_SETSIZE) { -+ errno = EBADF; -+ return NULL; -+ } -+ - if (!(fde = TALLOC_P(mem_ctx, struct fd_event))) { - return NULL; - } -@@ -190,6 +195,14 @@ bool event_add_to_select_args(struct event_context *event_ctx, - bool ret = False; - - for (fde = event_ctx->fd_events; fde; fde = fde->next) { -+ if (fde->fd < 0 || fde->fd >= FD_SETSIZE) { -+ /* We ignore here, as it shouldn't be -+ possible to add an invalid fde->fd -+ but we don't want FD_SET to see an -+ invalid fd. */ -+ continue; -+ } -+ - if (fde->flags & EVENT_FD_READ) { - FD_SET(fde->fd, read_fds); - ret = True; -diff --git a/source/lib/packet.c b/source/lib/packet.c -index e048616..512c7f2 100644 ---- a/source/lib/packet.c -+++ b/source/lib/packet.c -@@ -106,6 +106,11 @@ NTSTATUS packet_fd_read_sync(struct packet_context *ctx) - int res; - fd_set r_fds; - -+ if (ctx->fd < 0 || ctx->fd >= FD_SETSIZE) { -+ errno = EBADF; -+ return map_nt_error_from_unix(errno); -+ } -+ - FD_ZERO(&r_fds); - FD_SET(ctx->fd, &r_fds); - -diff --git a/source/lib/readline.c b/source/lib/readline.c -index 34867aa..70a82f2 100644 ---- a/source/lib/readline.c -+++ b/source/lib/readline.c -@@ -91,6 +91,11 @@ static char *smb_readline_replacement(const char *prompt, void (*callback)(void) - timeout.tv_sec = 5; - timeout.tv_usec = 0; - -+ if (fd < 0 || fd >= FD_SETSIZE) { -+ errno = EBADF; -+ break; -+ } -+ - FD_ZERO(&fds); - FD_SET(fd,&fds); - -diff --git a/source/lib/select.c b/source/lib/select.c -index c3da6a9..2d5f02c 100644 ---- a/source/lib/select.c -+++ b/source/lib/select.c -@@ -61,6 +61,11 @@ int sys_select(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, s - if (pipe(select_pipe) == -1) - smb_panic("Could not create select pipe"); - -+ if (select_pipe[0] < 0 || select_pipe[0] >= FD_SETSIZE) { -+ errno = EBADF; -+ return -1; -+ } -+ - /* - * These next two lines seem to fix a bug with the Linux - * 2.0.x kernel (and probably other UNIXes as well) where -@@ -87,6 +92,7 @@ int sys_select(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, s - readfds2 = &readfds_buf; - FD_ZERO(readfds2); - } -+ - FD_SET(select_pipe[0], readfds2); - - errno = 0; -diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c -index 650bd13..8aa2c97 100644 ---- a/source/lib/util_sock.c -+++ b/source/lib/util_sock.c -@@ -960,6 +960,11 @@ NTSTATUS read_socket_with_timeout(int fd, char *buf, - timeout.tv_usec = (long)(1000 * (time_out % 1000)); - - for (nread=0; nread < mincnt; ) { -+ if (fd < 0 || fd >= FD_SETSIZE) { -+ errno = EBADF; -+ return map_nt_error_from_unix(EBADF); -+ } -+ - FD_ZERO(&fds); - FD_SET(fd,&fds); - -@@ -1492,7 +1497,7 @@ bool open_any_socket_out(struct sockaddr_storage *addrs, int num_addrs, - - for (i=0; i= FD_SETSIZE) - goto done; - set_blocking(sockets[i], false); - } -@@ -1541,8 +1546,10 @@ bool open_any_socket_out(struct sockaddr_storage *addrs, int num_addrs, - FD_ZERO(&r_fds); - - for (i=0; i= FD_SETSIZE) { -+ /* This cannot happen - ignore if so. */ - continue; -+ } - FD_SET(sockets[i], &wr_fds); - FD_SET(sockets[i], &r_fds); - if (sockets[i]>maxfd) -diff --git a/source/libaddns/dnssock.c b/source/libaddns/dnssock.c -index 7c8bd41..f427bd5 100644 ---- a/source/libaddns/dnssock.c -+++ b/source/libaddns/dnssock.c -@@ -218,7 +218,11 @@ static DNS_ERROR read_all(int fd, uint8 *data, size_t len) - while (total < len) { - ssize_t ret; - int fd_ready; -- -+ -+ if (fd < 0 || fd >= FD_SETSIZE) { -+ return ERROR_DNS_SOCKET_ERROR; -+ } -+ - FD_ZERO( &rfds ); - FD_SET( fd, &rfds ); - -diff --git a/source/libsmb/nmblib.c b/source/libsmb/nmblib.c -index bfe5e7b..768e54d 100644 ---- a/source/libsmb/nmblib.c -+++ b/source/libsmb/nmblib.c -@@ -1097,6 +1097,11 @@ struct packet_struct *receive_packet(int fd,enum packet_type type,int t) - struct timeval timeout; - int ret; - -+ if (fd < 0 || fd >= FD_SETSIZE) { -+ errno = EBADF; -+ return NULL; -+ } -+ - FD_ZERO(&fds); - FD_SET(fd,&fds); - timeout.tv_sec = t/1000; -diff --git a/source/nmbd/nmbd_packets.c b/source/nmbd/nmbd_packets.c -index 4b97819..03e5362 100644 ---- a/source/nmbd/nmbd_packets.c -+++ b/source/nmbd/nmbd_packets.c -@@ -1683,7 +1683,7 @@ static bool create_listen_fdset(fd_set **ppset, int **psock_array, int *listen_n - for (subrec = FIRST_SUBNET; subrec; subrec = NEXT_SUBNET_EXCLUDING_UNICAST(subrec)) - count++; - -- if((count*2) + 2 > FD_SETSIZE) { -+ if((count*2) + 2 >= FD_SETSIZE) { - DEBUG(0,("create_listen_fdset: Too many file descriptors needed (%d). We can \ - only use %d.\n", (count*2) + 2, FD_SETSIZE)); - SAFE_FREE(pset); -@@ -1699,24 +1699,44 @@ only use %d.\n", (count*2) + 2, FD_SETSIZE)); - FD_ZERO(pset); - - /* Add in the broadcast socket on 137. */ -+ if (ClientNMB < 0 || ClientNMB >= FD_SETSIZE) { -+ errno = EBADF; -+ SAFE_FREE(pset); -+ return True; -+ } -+ - FD_SET(ClientNMB,pset); - sock_array[num++] = ClientNMB; - *maxfd = MAX( *maxfd, ClientNMB); - - /* Add in the 137 sockets on all the interfaces. */ - for (subrec = FIRST_SUBNET; subrec; subrec = NEXT_SUBNET_EXCLUDING_UNICAST(subrec)) { -+ if (subrec->nmb_sock < 0 || subrec->nmb_sock >= FD_SETSIZE) { -+ /* We have to ignore sockets outside FD_SETSIZE. */ -+ continue; -+ } - FD_SET(subrec->nmb_sock,pset); - sock_array[num++] = subrec->nmb_sock; - *maxfd = MAX( *maxfd, subrec->nmb_sock); - } - - /* Add in the broadcast socket on 138. */ -+ if (ClientDGRAM < 0 || ClientDGRAM >= FD_SETSIZE) { -+ errno = EBADF; -+ SAFE_FREE(pset); -+ return True; -+ } -+ - FD_SET(ClientDGRAM,pset); - sock_array[num++] = ClientDGRAM; - *maxfd = MAX( *maxfd, ClientDGRAM); - - /* Add in the 138 sockets on all the interfaces. */ - for (subrec = FIRST_SUBNET; subrec; subrec = NEXT_SUBNET_EXCLUDING_UNICAST(subrec)) { -+ if (subrec->dgram_sock < 0 || subrec->dgram_sock >= FD_SETSIZE) { -+ /* We have to ignore sockets outside FD_SETSIZE. */ -+ continue; -+ } - FD_SET(subrec->dgram_sock,pset); - sock_array[num++] = subrec->dgram_sock; - *maxfd = MAX( *maxfd, subrec->dgram_sock); -@@ -1767,7 +1787,7 @@ bool listen_for_packets(bool run_election) - - #ifndef SYNC_DNS - dns_fd = asyncdns_fd(); -- if (dns_fd != -1) { -+ if (dns_fd >= 0 && dns_fd < FD_SETSIZE) { - FD_SET(dns_fd, &r_fds); - maxfd = MAX( maxfd, dns_fd); - } -diff --git a/source/nsswitch/wb_common.c b/source/nsswitch/wb_common.c -index a164621..4f76bd0 100644 ---- a/source/nsswitch/wb_common.c -+++ b/source/nsswitch/wb_common.c -@@ -240,6 +240,12 @@ static int winbind_named_pipe_sock(const char *dir) - - switch (errno) { - case EINPROGRESS: -+ -+ if (fd < 0 || fd >= FD_SETSIZE) { -+ errno = EBADF; -+ goto error_out; -+ } -+ - FD_ZERO(&w_fds); - FD_SET(fd, &w_fds); - tv.tv_sec = CONNECT_TIMEOUT - wait_time; -@@ -383,7 +389,13 @@ int winbind_write_sock(void *buffer, int count, int recursing, int need_priv) - while(nwritten < count) { - struct timeval tv; - fd_set r_fds; -- -+ -+ if (winbindd_fd < 0 || winbindd_fd >= FD_SETSIZE) { -+ errno = EBADF; -+ winbind_close_sock(); -+ return -1; -+ } -+ - /* Catch pipe close on other end by checking if a read() - call would not block by calling select(). */ - -@@ -443,7 +455,13 @@ int winbind_read_sock(void *buffer, int count) - while(nread < count) { - struct timeval tv; - fd_set r_fds; -- -+ -+ if (winbindd_fd < 0 || winbindd_fd >= FD_SETSIZE) { -+ errno = EBADF; -+ winbind_close_sock(); -+ return -1; -+ } -+ - /* Catch pipe close on other end by checking if a read() - call would not block by calling select(). */ - -diff --git a/source/printing/printing.c b/source/printing/printing.c -index a9272eb..c3b8c61 100644 ---- a/source/printing/printing.c -+++ b/source/printing/printing.c -@@ -1407,6 +1407,11 @@ void start_background_queue(void) - exit(1); - } - -+ if (pause_pipe[1] < 0 || pause_pipe[1] >= FD_SETSIZE) { -+ DEBUG(5,("start_background_queue: pipe fd out of range.\n")); -+ exit(1); -+ } -+ - background_lpq_updater_pid = sys_fork(); - - if (background_lpq_updater_pid == -1) { -diff --git a/source/smbd/dnsregister.c b/source/smbd/dnsregister.c -index f02739e..3c689b9 100644 ---- a/source/smbd/dnsregister.c -+++ b/source/smbd/dnsregister.c -@@ -125,6 +125,9 @@ void dns_register_smbd(struct dns_reg_state ** dns_state_ptr, - */ - if (dns_state->srv_ref != NULL) { - mdnsd_conn_fd = DNSServiceRefSockFD(dns_state->srv_ref); -+ if (mdnsd_conn_fd < 0 || mdnsd_conn_fd >= FD_SETSIZE) { -+ return; -+ } - FD_SET(mdnsd_conn_fd, listen_set); - return; - } -@@ -156,6 +159,9 @@ void dns_register_smbd(struct dns_reg_state ** dns_state_ptr, - } - - mdnsd_conn_fd = DNSServiceRefSockFD(dns_state->srv_ref); -+ if (mdnsd_conn_fd < 0 || mdnsd_conn_fd >= FD_SETSIZE) { -+ return; -+ } - FD_SET(mdnsd_conn_fd, listen_set); - *maxfd = MAX(*maxfd, mdnsd_conn_fd); - *timeout = timeval_zero(); -diff --git a/source/smbd/oplock.c b/source/smbd/oplock.c -index a07d05d..5ae3fdf 100644 ---- a/source/smbd/oplock.c -+++ b/source/smbd/oplock.c -@@ -241,7 +241,10 @@ bool downgrade_oplock(files_struct *fsp) - int oplock_notify_fd(void) - { - if (koplocks) { -- return koplocks->notification_fd; -+ int fd = koplocks->notification_fd; -+ if (fd < 0 || fd >= FD_SETSIZE) { -+ return -1; -+ } - } - - return -1; -diff --git a/source/smbd/oplock_irix.c b/source/smbd/oplock_irix.c -index 8c287c9..6e86fac 100644 ---- a/source/smbd/oplock_irix.c -+++ b/source/smbd/oplock_irix.c -@@ -284,6 +284,11 @@ struct kernel_oplocks *irix_init_kernel_oplocks(void) - return False; - } - -+ if (pfd[0] < 0 || pfd[0] >= FD_SETSIZE) { -+ DEBUG(0,("setup_kernel_oplock_pipe: fd out of range.\n")); -+ return False; -+ } -+ - oplock_pipe_read = pfd[0]; - oplock_pipe_write = pfd[1]; - -diff --git a/source/smbd/process.c b/source/smbd/process.c -index 403c7c6..9b8f29b 100644 ---- a/source/smbd/process.c -+++ b/source/smbd/process.c -@@ -698,7 +698,7 @@ static void async_processing(fd_set *pfds) - - static int select_on_fd(int fd, int maxfd, fd_set *fds) - { -- if (fd != -1) { -+ if (fd != -1 && fd < FD_SETSIZE) { - FD_SET(fd, fds); - maxfd = MAX(maxfd, fd); - } -diff --git a/source/smbd/server.c b/source/smbd/server.c -index 5129484..a670334 100644 ---- a/source/smbd/server.c -+++ b/source/smbd/server.c -@@ -209,7 +209,13 @@ static bool open_sockets_inetd(void) - /* Started from inetd. fd 0 is the socket. */ - /* We will abort gracefully when the client or remote system - goes away */ -- smbd_set_server_fd(dup(0)); -+ int fd = dup(0); -+ -+ if (fd < 0 || fd >= FD_SETSIZE) { -+ return false; -+ } -+ -+ smbd_set_server_fd(fd); - - /* close our standard file descriptors */ - close_low_fds(False); /* Don't close stderr */ -@@ -436,7 +442,8 @@ static bool open_sockets_smbd(bool is_daemon, bool interactive, const char *smb_ - num_sockets == 0 ? 0 : 2, - ifss, - true); -- if(s == -1) { -+ if(s < 0 || s >= FD_SETSIZE) { -+ close(s); - continue; - } - -@@ -516,7 +523,7 @@ static bool open_sockets_smbd(bool is_daemon, bool interactive, const char *smb_ - num_sockets == 0 ? 0 : 2, - &ss, - true); -- if (s == -1) { -+ if (s < 0 || s >= FD_SETSIZE) { - continue; - } - -@@ -709,6 +716,7 @@ static bool open_sockets_smbd(bool is_daemon, bool interactive, const char *smb_ - struct sockaddr addr; - socklen_t in_addrlen = sizeof(addr); - pid_t child = 0; -+ int fd; - - s = -1; - for(i = 0; i < num_sockets; i++) { -@@ -721,16 +729,21 @@ static bool open_sockets_smbd(bool is_daemon, bool interactive, const char *smb_ - } - } - -- smbd_set_server_fd(accept(s,&addr,&in_addrlen)); -- -- if (smbd_server_fd() == -1 && errno == EINTR) -+ fd = accept(s,&addr,&in_addrlen); -+ if (fd == -1 && errno == EINTR) - continue; -- -- if (smbd_server_fd() == -1) { -+ if (fd == -1) { - DEBUG(2,("open_sockets_smbd: accept: %s\n", - strerror(errno))); - continue; - } -+ if (fd < 0 || fd >= FD_SETSIZE) { -+ DEBUG(2,("open_sockets_smbd: bad fd %d\n", -+ fd )); -+ continue; -+ } -+ -+ smbd_set_server_fd(fd); - - /* Ensure child is set to blocking mode */ - set_blocking(smbd_server_fd(),True); -diff --git a/source/utils/smbfilter.c b/source/utils/smbfilter.c -index 1e22a40..45f9207 100644 ---- a/source/utils/smbfilter.c -+++ b/source/utils/smbfilter.c -@@ -162,8 +162,8 @@ static void filter_child(int c, struct sockaddr_storage *dest_ss) - int num; - - FD_ZERO(&fds); -- if (s != -1) FD_SET(s, &fds); -- if (c != -1) FD_SET(c, &fds); -+ if (s >= 0 && s < FD_SETSIZE) FD_SET(s, &fds); -+ if (c >= 0 && c < FD_SETSIZE) FD_SET(c, &fds); - - num = sys_select_intr(MAX(s+1, c+1),&fds,NULL,NULL,NULL); - if (num <= 0) continue; -@@ -235,6 +235,10 @@ static void start_filter(char *desthost) - struct sockaddr_storage ss; - socklen_t in_addrlen = sizeof(ss); - -+ if (s < 0 || s >= FD_SETSIZE) { -+ break; -+ } -+ - FD_ZERO(&fds); - FD_SET(s, &fds); - -diff --git a/source/winbindd/winbindd.c b/source/winbindd/winbindd.c -index 1d618e2..6b5c251 100644 ---- a/source/winbindd/winbindd.c -+++ b/source/winbindd/winbindd.c -@@ -836,7 +836,8 @@ static void process_loop(void) - listen_sock = open_winbindd_socket(); - listen_priv_sock = open_winbindd_priv_socket(); - -- if (listen_sock == -1 || listen_priv_sock == -1) { -+ if (listen_sock < 0 || listen_sock >= FD_SETSIZE || -+ listen_priv_sock < 0 || listen_priv_sock >= FD_SETSIZE) { - perror("open_winbind_socket"); - exit(1); - } -@@ -861,6 +862,9 @@ static void process_loop(void) - - FD_ZERO(&r_fds); - FD_ZERO(&w_fds); -+ -+ /* We check the range for listen_sock and -+ listen_priv_sock above. */ - FD_SET(listen_sock, &r_fds); - FD_SET(listen_priv_sock, &r_fds); - -@@ -890,6 +894,12 @@ static void process_loop(void) - } - - for (ev = fd_events; ev; ev = ev->next) { -+ if (ev->fd < 0 || ev->fd >= FD_SETSIZE) { -+ /* Ignore here - event_add_to_select_args -+ should make this impossible. */ -+ continue; -+ } -+ - if (ev->flags & EVENT_FD_READ) { - FD_SET(ev->fd, &r_fds); - maxfd = MAX(ev->fd, maxfd); -diff --git a/source/winbindd/winbindd_dual.c b/source/winbindd/winbindd_dual.c -index ff004f2..b30ec20 100644 ---- a/source/winbindd/winbindd_dual.c -+++ b/source/winbindd/winbindd_dual.c -@@ -1250,6 +1250,12 @@ static bool fork_domain_child(struct winbindd_child *child) - return False; - } - -+ if (fdpair[0] < 0 || fdpair[0] >= FD_SETSIZE) { -+ DEBUG(0, ("fork_domain_child: bad fd range (%d)\n", fdpair[0])); -+ errno = EBADF; -+ return False; -+ } -+ - ZERO_STRUCT(state); - state.pid = sys_getpid(); - -@@ -1405,6 +1411,7 @@ static bool fork_domain_child(struct winbindd_child *child) - message_dispatch(winbind_messaging_context()); - - FD_ZERO(&read_fds); -+ /* We check state.sock against FD_SETSIZE above. */ - FD_SET(state.sock, &read_fds); - - ret = sys_select(state.sock + 1, &read_fds, NULL, NULL, tp); --- -1.6.4.2 - diff --git a/package/samba/samba-add-check-for-__use_bsd.patch b/package/samba/samba-add-check-for-__use_bsd.patch deleted file mode 100644 index a4c7109..0000000 --- a/package/samba/samba-add-check-for-__use_bsd.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/source/client/mount.cifs.c 2009-04-01 13:48:54.000000000 +0200 -+++ b/source/client/mount.cifs.c 2009-04-20 12:59:57.000000000 +0200 -@@ -100,6 +100,7 @@ - - /* glibc doesn't have strlcpy, strlcat. Ensure we do. JRA. We - * don't link to libreplace so need them here. */ -+#if defined(__GLIBC__) && !(defined(__UCLIBC__) && defined(__USE_BSD)) - - /* like strncpy but does not 0 fill the buffer and always null - * terminates. bufsize is the size of the destination buffer */ -@@ -181,6 +182,7 @@ - SAFE_FREE(mountpassword); - exit(EX_USAGE); - } -+#endif /* __GLIBC__ && !(__UCLIBC__ && __USE_BSD) */ - - /* caller frees username if necessary */ - static char * getusername(void) { diff --git a/package/samba/samba-do-not-check-glibc-version.patch b/package/samba/samba-do-not-check-glibc-version.patch deleted file mode 100644 index c5e3cd4..0000000 --- a/package/samba/samba-do-not-check-glibc-version.patch +++ /dev/null @@ -1,104 +0,0 @@ ---- a/source/configure 2009-04-01 14:19:36.000000000 +0200 -+++ b/source/configure 2009-04-20 13:05:12.000000000 +0200 -@@ -44061,90 +44061,8 @@ - - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - --# --# --# --case "$host_os" in -- *linux*) -- # glibc <= 2.3.2 has a broken getgrouplist -- if test "$cross_compiling" = yes; then -- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 --$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling --See \`config.log' for more details." >&5 --$as_echo "$as_me: error: cannot run test program while cross compiling --See \`config.log' for more details." >&2;} -- { (exit 1); exit 1; }; }; } --else -- cat >conftest.$ac_ext <<_ACEOF --/* confdefs.h. */ --_ACEOF --cat confdefs.h >>conftest.$ac_ext --cat >>conftest.$ac_ext <<_ACEOF --/* end confdefs.h. */ -- --#include --#include --main() { -- /* glibc up to 2.3 has a broken getgrouplist */ --#if defined(__GLIBC__) && defined(__GLIBC_MINOR__) -- int libc_major = __GLIBC__; -- int libc_minor = __GLIBC_MINOR__; -- -- if (libc_major < 2) -- exit(1); -- if ((libc_major == 2) && (libc_minor <= 3)) -- exit(1); --#endif -- exit(0); --} -- --_ACEOF --rm -f conftest$ac_exeext --if { (ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" --$as_echo "$ac_try_echo") >&5 -- (eval "$ac_link") 2>&5 -- ac_status=$? -- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" --$as_echo "$ac_try_echo") >&5 -- (eval "$ac_try") 2>&5 -- ac_status=$? -- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -- (exit $ac_status); }; }; then -- linux_getgrouplist_ok=yes --else -- $as_echo "$as_me: program exited with status $ac_status" >&5 --$as_echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- --( exit $ac_status ) --linux_getgrouplist_ok=no --fi --rm -rf conftest.dSYM --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext --fi -- -- -- if test x"$linux_getgrouplist_ok" = x"yes"; then -- --cat >>confdefs.h <<\_ACEOF --#define HAVE_GETGROUPLIST 1 --_ACEOF -- -- fi -- ;; -- *) -+# Stripped glibc test which is not needed for uClibc -+linux_getgrouplist_ok=yes - - for ac_func in getgrouplist - do -@@ -44246,8 +44164,6 @@ - fi - done - -- ;; --esac - - # - # stat64 family may need on some systems, notably ReliantUNIX diff --git a/package/samba/samba-fix-client-mtab.patch b/package/samba/samba-fix-client-mtab.patch deleted file mode 100644 index 21e7158..0000000 --- a/package/samba/samba-fix-client-mtab.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/source/client/mtab.c -+++ b/source/client/mtab.c -@@ -31,6 +31,8 @@ - #include - #include - #include -+#include -+#include - #include - #include - #include diff --git a/package/samba/samba-getgrouplist.patch b/package/samba/samba-getgrouplist.patch deleted file mode 100644 index e98d9cd..0000000 --- a/package/samba/samba-getgrouplist.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- a/source/configure.in 2009-04-01 13:48:54.000000000 +0200 -+++ b/source/configure.in 2009-04-20 13:08:42.000000000 +0200 -@@ -1219,38 +1219,6 @@ - AC_DEFINE(HAVE_PRCTL, 1, [Whether prctl is available]),[]) - - # --# --# --case "$host_os" in -- *linux*) -- # glibc <= 2.3.2 has a broken getgrouplist -- AC_TRY_RUN([ --#include --#include --main() { -- /* glibc up to 2.3 has a broken getgrouplist */ --#if defined(__GLIBC__) && defined(__GLIBC_MINOR__) -- int libc_major = __GLIBC__; -- int libc_minor = __GLIBC_MINOR__; -- -- if (libc_major < 2) -- exit(1); -- if ((libc_major == 2) && (libc_minor <= 3)) -- exit(1); --#endif -- exit(0); --} --], [linux_getgrouplist_ok=yes], [linux_getgrouplist_ok=no]) -- if test x"$linux_getgrouplist_ok" = x"yes"; then -- AC_DEFINE(HAVE_GETGROUPLIST, 1, [Have good getgrouplist]) -- fi -- ;; -- *) -- AC_CHECK_FUNCS(getgrouplist) -- ;; --esac -- --# - # stat64 family may need on some systems, notably ReliantUNIX - # - diff --git a/package/sfdisk/Config.in b/package/sfdisk/Config.in deleted file mode 100644 index c5b84be..0000000 --- a/package/sfdisk/Config.in +++ /dev/null @@ -1,5 +0,0 @@ -config BR2_PACKAGE_SFDISK - bool "sfdisk" - depends on BR2_DEPRECATED - help - Partition table manipulator for Linux. diff --git a/package/sfdisk/sfdisk.001.include_sys_syscalls_h.patch b/package/sfdisk/sfdisk.001.include_sys_syscalls_h.patch deleted file mode 100644 index dd35951..0000000 --- a/package/sfdisk/sfdisk.001.include_sys_syscalls_h.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- sfdisk/sfdisk.c.oorig 2006-10-09 16:24:06.000000000 +0200 -+++ sfdisk/sfdisk.c 2006-10-09 16:24:20.000000000 +0200 -@@ -47,6 +47,9 @@ - #include - #include - #ifdef __linux__ -+#define _LIBC -+#include -+#undef _LIBC - #include /* _syscall */ - #endif - #include "nls.h" diff --git a/package/sfdisk/sfdisk.005.no-llseek-fix.patch b/package/sfdisk/sfdisk.005.no-llseek-fix.patch deleted file mode 100644 index 4ea571c..0000000 --- a/package/sfdisk/sfdisk.005.no-llseek-fix.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -ur sfdisk_vanilla/sfdisk.c sfdisk_llseek-fix/sfdisk.c ---- sfdisk_vanilla/sfdisk.c 2004-01-13 13:03:11.000000000 +0000 -+++ sfdisk_llseek-fix/sfdisk.c 2008-04-17 08:42:35.000000000 +0000 -@@ -134,9 +137,17 @@ - * Note: we use 512-byte sectors here, irrespective of the hardware ss. - */ - #if defined(__linux__) && !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) && !defined (__s390x__) -+#if defined(_llseek) - static - _syscall5(int, _llseek, unsigned int, fd, ulong, hi, ulong, lo, - loff_t *, res, unsigned int, wh); -+#else -+static int _llseek (unsigned int fd, unsigned long oh, -+ unsigned long ol, long long *result, -+ unsigned int origin) { -+ return syscall (__NR__llseek, fd, oh, ol, result, origin); -+#endif -+} - #endif - - static int diff --git a/package/sfdisk/sfdisk.010.index-rindex-fix-2.patch b/package/sfdisk/sfdisk.010.index-rindex-fix-2.patch deleted file mode 100644 index b3ca81d..0000000 --- a/package/sfdisk/sfdisk.010.index-rindex-fix-2.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -ru sfdisk_vanilla/sfdisk.c sfdisk_index-rindex-fix/sfdisk.c ---- sfdisk_vanilla/sfdisk.c 2004-01-13 13:03:11.000000000 +0000 -+++ sfdisk_index-rindex-fix/sfdisk.c 2008-04-17 13:44:40.000000000 +0000 -@@ -40,7 +40,7 @@ - #include /* read, write */ - #include /* O_RDWR */ - #include /* ERANGE */ --#include /* index() */ -+#include /* strchr, strrchr */ - #include - #include - #include -@@ -1672,12 +1672,12 @@ - eof = 1; - return RD_EOF; - } -- if (!(lp = index(lp, '\n'))) -+ if (!(lp = strchr(lp, '\n'))) - fatal(_("long or incomplete input line - quitting\n")); - *lp = 0; - - /* remove comments, if any */ -- if ((lp = index(line+2, '#')) != 0) -+ if ((lp = strchr(line+2, '#')) != 0) - *lp = 0; - - /* recognize a few commands - to be expanded */ -@@ -1687,7 +1687,7 @@ - } - - /* dump style? - then bad input is fatal */ -- if ((ip = index(line+2, ':')) != 0) { -+ if ((ip = strchr(line+2, ':')) != 0) { - struct dumpfld *d; - - nxtfld: -@@ -2436,7 +2436,7 @@ - - if (argc < 1) - fatal(_("no command?\n")); -- if ((progn = rindex(argv[0], '/')) == NULL) -+ if ((progn = strrchr(argv[0], '/')) == NULL) - progn = argv[0]; - else - progn++; diff --git a/package/sfdisk/sfdisk.mk b/package/sfdisk/sfdisk.mk deleted file mode 100644 index 81c4943..0000000 --- a/package/sfdisk/sfdisk.mk +++ /dev/null @@ -1,49 +0,0 @@ -############################################################# -# -# sfdisk support -# -############################################################# -SFDISK_VERSION:= -SFDISK_SOURCE=sfdisk$(SFDISK_VERSION).tar.bz2 -SFDISK_CAT:=$(BZCAT) -SFDISK_SITE:=http://www.uclibc.org/ -SFDISK_DIR=$(BUILD_DIR)/sfdisk$(SFDISK_VERSION) - -$(DL_DIR)/$(SFDISK_SOURCE): - $(call DOWNLOAD,$(SFDISK_SITE),$(SFDISK_SOURCE)) - -$(SFDISK_DIR)/.patched: $(DL_DIR)/$(SFDISK_SOURCE) - $(SFDISK_CAT) $(DL_DIR)/$(SFDISK_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - toolchain/patch-kernel.sh $(SFDISK_DIR) package/sfdisk/ sfdisk.\*.patch - touch $@ - - -$(SFDISK_DIR)/sfdisk: $(SFDISK_DIR)/.patched - $(MAKE) \ - CROSS=$(TARGET_CROSS) DEBUG=false OPTIMIZATION="$(TARGET_CFLAGS)" \ - DOLFS=$(if $(BR2_LARGEFILE),true,false) -C $(SFDISK_DIR) - -$(STRIPCMD) $(SFDISK_DIR)/sfdisk - touch -c $(SFDISK_DIR)/sfdisk - -$(TARGET_DIR)/sbin/sfdisk: $(SFDISK_DIR)/sfdisk - cp $(SFDISK_DIR)/sfdisk $(TARGET_DIR)/sbin/sfdisk - touch -c $(TARGET_DIR)/sbin/sfdisk - -sfdisk: $(TARGET_DIR)/sbin/sfdisk - -sfdisk-source: $(DL_DIR)/$(SFDISK_SOURCE) - -sfdisk-clean: - rm -f $(TARGET_DIR)/sbin/sfdisk - -$(MAKE) -C $(SFDISK_DIR) clean - -sfdisk-dirclean: - rm -rf $(SFDISK_DIR) -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_SFDISK),y) -TARGETS+=sfdisk -endif diff --git a/package/shared-mime-info/shared-mime-info-0.60-fix-xmllint.patch b/package/shared-mime-info/shared-mime-info-0.60-fix-xmllint.patch deleted file mode 100644 index 921333e..0000000 --- a/package/shared-mime-info/shared-mime-info-0.60-fix-xmllint.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: shared-mime-info-0.60/Makefile.am -=================================================================== ---- shared-mime-info-0.60.orig/Makefile.am -+++ shared-mime-info-0.60/Makefile.am -@@ -72,7 +72,7 @@ - - check: freedesktop.org.xml - if test -n $(XMLLINT) ; then \ -- xmllint --noout --valid $(top_srcdir)/freedesktop.org.xml; \ -+ $(XMLLINT) --noout --valid $(top_srcdir)/freedesktop.org.xml; \ - fi - if test -d CVS/ && test -x ../xdgmime/src/test-mime-data && test -x $(top_builddir)/test-tree-magic ; then \ - mkdir -p $(top_builddir)/temp-mime-dir/mime/packages ; \ diff --git a/package/squid/squid-cross-compile.patch b/package/squid/squid-cross-compile.patch deleted file mode 100644 index 98424ae..0000000 --- a/package/squid/squid-cross-compile.patch +++ /dev/null @@ -1,65 +0,0 @@ -diff -Nura squid-3.1.10.orig/configure.ac squid-3.1.10/configure.ac ---- squid-3.1.10.orig/configure.ac 2010-12-22 02:48:27.000000000 -0300 -+++ squid-3.1.10/configure.ac 2010-12-22 11:31:08.420533635 -0300 -@@ -384,7 +384,7 @@ - - dnl Nasty hack to get autoconf 2.64 on Linux to run. - dnl all other uses of RUN_IFELSE are wrapped inside CACHE_CHECK which breaks on 2.64 --AC_RUN_IFELSE([AC_LANG_SOURCE([[ int main(int argc, char **argv) { return 0; } ]])],[],[],[:]) -+dnl AC_RUN_IFELSE([AC_LANG_SOURCE([[ int main(int argc, char **argv) { return 0; } ]])],[],[],[:]) - - dnl This is a developer only option.. developers know how to set defines - dnl -@@ -1889,7 +1889,7 @@ - AC_MSG_NOTICE([Negotiate auth helpers built: $NEGOTIATE_AUTH_HELPERS]) - fi - AC_SUBST(NEGOTIATE_AUTH_HELPERS) --AC_CONFIG_SUBDIRS(helpers/negotiate_auth/squid_kerb_auth) -+dnl AC_CONFIG_SUBDIRS(helpers/negotiate_auth/squid_kerb_auth) - - dnl Select digest auth scheme helpers to build - if test -n "$AUTH_MODULE_digest"; then -@@ -2202,6 +2202,18 @@ - ;; - esac - -+dnl Define CXX_FOR_BUILD -+CXX_FOR_BUILD="$CXX_FOR_BUILD" -+AC_SUBST(CXX_FOR_BUILD) -+ -+dnl Define CXXFLAGS_FOR_BUILD -+CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD" -+AC_SUBST(CXXFLAGS_FOR_BUILD) -+ -+dnl Define LDFLAGS_FOR_BUILD -+LDFLAGS_FOR_BUILD="$LDFLAGS_FOR_BUILD" -+AC_SUBST(LDFLAGS_FOR_BUILD) -+ - dnl Check for programs - AC_PROG_CPP - AC_PROG_INSTALL -diff -Nura squid-3.1.10.orig/src/Makefile.am squid-3.1.10/src/Makefile.am ---- squid-3.1.10.orig/src/Makefile.am 2010-12-22 02:46:56.000000000 -0300 -+++ squid-3.1.10/src/Makefile.am 2010-12-22 11:31:08.422533643 -0300 -@@ -195,8 +195,6 @@ - cf_gen_SOURCES = cf_gen.cc - nodist_cf_gen_HEADER = cf_gen_defines.cci - cf_gen_LDADD= \ -- ../compat/libcompat.la \ -- -L../lib -lmiscutil \ - $(EPOLL_LIBS) \ - $(MINGW_LIBS) \ - $(XTRA_LIBS) -@@ -753,6 +751,12 @@ - squid.conf.default squid.conf.documented: cf_parser.cci - true - -+cf_gen$(EXEEXT): $(cf_gen_OBJECTS) $(cf_gen_DEPENDENCIES) -+ $(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ $(srcdir)/cf_gen.cc \ -+ $(top_srcdir)/lib/util.c \ -+ $(top_srcdir)/compat/assert.cc \ -+ $(cf_gen_LDADD) $(LIBS) ${INCLUDES} -+ - cf_parser.cci: cf.data cf_gen$(EXEEXT) - ./cf_gen cf.data $(srcdir)/cf.data.depend - diff --git a/package/udev/libvolume_id.la.tmpl b/package/udev/libvolume_id.la.tmpl deleted file mode 100644 index 725628b..0000000 --- a/package/udev/libvolume_id.la.tmpl +++ /dev/null @@ -1,35 +0,0 @@ -# libvolume_id.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libvolume_id.so.REPLACE_CURRENT' - -# Names of this library. -library_names='libvolume_id.so.REPLACE_CURRENT.REPLACE_AGE.REPLACE_REVISION libvolume_id.so.REPLACE_CURRENT libvolume_id.so' - -# The name of the static archive. -old_library='libvolume_id.a' - -# Libraries that this one depends upon. -dependency_libs=' -lc' - -# Version information for libvolume_id. -current=REPLACE_CURRENT -age=REPLACE_AGE -revision=REPLACE_REVISION - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='REPLACE_LIB_DIR' diff --git a/package/usbmount/usbmount-0.0.14.1.patch b/package/usbmount/usbmount-0.0.14.1.patch deleted file mode 100644 index 22a5857..0000000 --- a/package/usbmount/usbmount-0.0.14.1.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff -ur usbmount-0.0.14.1/usbmount usbmount-0.0.14.1-patched/usbmount ---- usbmount-0.0.14.1/usbmount 2007-01-27 05:22:14.000000000 -0600 -+++ usbmount-0.0.14.1-patched/usbmount 2007-03-15 07:25:18.000000000 -0500 -@@ -20,7 +20,7 @@ - log() - { - if test $1 != debug || expr "$VERBOSE" : "[yY]" > /dev/null; then -- logger -p user.$1 -t "usbmount[$$]" -- "$2" -+ echo "usbmount[$$] -- $2" >> $LOGFILE - fi - } - -@@ -57,11 +57,11 @@ - if test "$1" = add; then - - # Acquire lock. -- log debug "trying to acquire lock /var/run/usbmount/.mount.lock" -- lockfile-create --retry 3 /var/run/usbmount/.mount || \ -- { log err "cannot acquire lock /var/run/usbmount/.mount.lock"; exit 1; } -- trap '( lockfile-remove /var/run/usbmount/.mount )' 0 -- log debug "acquired lock /var/run/usbmount/.mount.lock" -+ log debug "trying to acquire lock /var/run/.usbmount.lock" -+ lockfile-create --retry 5 /var/run/.usbmount || \ -+ { log err "cannot acquire lock /var/run/.usbmount.lock"; exit 1; } -+ trap '( lockfile-remove /var/run/.usbmount )' 0 -+ log debug "acquired lock /var/run/.usbmount.lock" - - # Try to read from the device. Some devices need a few seconds - # initialization time before they can be accessed. Give up after -@@ -184,6 +184,7 @@ - log info "executing command: run-parts /etc/usbmount/umount.d" - run-parts /etc/usbmount/umount.d || : - fi -+ lockfile-remove /var/run/.usbmount - break - fi - done < /proc/mounts -diff -ur usbmount-0.0.14.1/usbmount.conf usbmount-0.0.14.1-patched/usbmount.conf ---- usbmount-0.0.14.1/usbmount.conf 2005-04-08 09:05:10.000000000 -0500 -+++ usbmount-0.0.14.1-patched/usbmount.conf 2007-03-15 07:21:33.000000000 -0500 -@@ -17,7 +17,7 @@ - # sure all data is written to the medium before you remove it (e.g. run the # - # "sync" command in a terminal window). Otherwise, you *WILL* lose data! # - ############################################################################# --FILESYSTEMS="ext2 ext3" -+FILESYSTEMS="ext2 ext3 msdos vfat" - - # Mount options: Options passed to the mount command with the -o flag. - # WARNING! Removing "sync" from the options is a very bad idea and -@@ -35,3 +35,7 @@ - # If set to "yes", more information will be logged via the syslog - # facility. - VERBOSE="no" -+ -+# Location of the log file when verbose is Yes -+LOGFILE="/var/log/usbmount.log" -+ diff --git a/package/util-linux/util-linux-2.13-pre17-hardcode-a-out-constants.patch b/package/util-linux/util-linux-2.13-pre17-hardcode-a-out-constants.patch deleted file mode 100644 index b115c41..0000000 --- a/package/util-linux/util-linux-2.13-pre17-hardcode-a-out-constants.patch +++ /dev/null @@ -1,41 +0,0 @@ -Hardcode a.out related constants - -The OMAGIC, NMAGIC and ZMAGIC constants, related to the legacy a.out -binary format, are no longer available in the headers of all -architectures, due to this binary format being deprecated. For that -reason, util-linux fails to build. - -We therefore take the approach used in newer versions of -util-linux-ng: hardcoding those values. See -http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git;a=commitdiff;h=e9eb4dad0ece03914f67f6d1ded74cfbbe694ba4 - -Signed-off-by: Thomas Petazzoni ---- - text-utils/more.c | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -Index: util-linux-2.13-pre7/text-utils/more.c -=================================================================== ---- util-linux-2.13-pre7.orig/text-utils/more.c -+++ util-linux-2.13-pre7/text-utils/more.c -@@ -53,7 +53,6 @@ - #include - #include - #include --#include - #include - #include "xstrncpy.h" - #include "nls.h" -@@ -504,9 +503,9 @@ - - if (fread(twobytes, 2, 1, f) == 1) { - switch(twobytes[0] + (twobytes[1]<<8)) { -- case OMAGIC: /* 0407 */ -- case NMAGIC: /* 0410 */ -- case ZMAGIC: /* 0413 */ -+ case 0407: /* a.out obj */ -+ case 0410: /* a.out exec */ -+ case 0413: /* a.out demand exec */ - case 0405: - case 0411: - case 0177545: diff --git a/package/util-linux/util-linux-no-nls-fix.patch b/package/util-linux/util-linux-no-nls-fix.patch deleted file mode 100644 index c02009f..0000000 --- a/package/util-linux/util-linux-no-nls-fix.patch +++ /dev/null @@ -1,25 +0,0 @@ -[PATCH]: fix util-linux build without NLS support - -util-linux partly supports builds without NLS support, but it forgets to -provide a dummy setlocale() macro. - -Signed-off-by: Peter Korsgaard ---- - include/nls.h | 4 ++++ - 1 file changed, 4 insertions(+) - -Index: util-linux-2.13-pre7/include/nls.h -=================================================================== ---- util-linux-2.13-pre7.orig/include/nls.h -+++ util-linux-2.13-pre7/include/nls.h -@@ -19,6 +19,10 @@ - # define textdomain(Domain) /* empty */ - # define _(Text) (Text) - # define N_(Text) (Text) -+# undef LC_ALL -+# define LC_ALL 0 -+# undef setlocale -+# define setlocale(category, locale) - #endif - - diff --git a/package/util-linux/util-linux-susv3-legacy.patch b/package/util-linux/util-linux-susv3-legacy.patch deleted file mode 100644 index 2239119..0000000 --- a/package/util-linux/util-linux-susv3-legacy.patch +++ /dev/null @@ -1,429 +0,0 @@ -[PATCH] replace susv3 legacy functions with modern equivalents - -Signed-off-by: Peter Korsgaard ---- - fdisk/cfdisk.c | 2 +- - fdisk/fdiskbsdlabel.c | 16 ++++++++-------- - fdisk/sfdisk.c | 10 +++++----- - login-utils/login.c | 6 +++--- - login-utils/shutdown.c | 2 +- - login-utils/ttymsg.c | 2 +- - login-utils/vipw.c | 4 ++-- - login-utils/wall.c | 2 +- - misc-utils/logger.c | 2 +- - misc-utils/namei.c | 2 +- - misc-utils/whereis.c | 4 ++-- - mount/mntent.c | 4 ++-- - mount/mount.c | 4 ++-- - mount/mount_by_label.c | 2 +- - mount/sundries.c | 2 +- - mount/umount.c | 2 +- - partx/partx.c | 2 +- - text-utils/colcrt.c | 4 ++-- - text-utils/display.c | 2 +- - text-utils/parse.c | 8 ++++---- - 20 files changed, 41 insertions(+), 41 deletions(-) - -Index: util-linux-2.13-pre7/fdisk/fdiskbsdlabel.c -=================================================================== ---- util-linux-2.13-pre7.orig/fdisk/fdiskbsdlabel.c -+++ util-linux-2.13-pre7/fdisk/fdiskbsdlabel.c -@@ -538,10 +538,10 @@ - - /* We need a backup of the disklabel (xbsd_dlabel might have changed). */ - d = &disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE]; -- bcopy (d, &dl, sizeof (struct xbsd_disklabel)); -+ memmove (&dl, d, sizeof (struct xbsd_disklabel)); - - /* The disklabel will be overwritten by 0's from bootxx anyway */ -- bzero (d, sizeof (struct xbsd_disklabel)); -+ memset (d, 0, sizeof (struct xbsd_disklabel)); - - snprintf (path, sizeof(path), "%s/boot%s", bootdir, dkbasename); - if (!xbsd_get_bootstrap (path, &disklabelbuffer[xbsd_dlabel.d_secsize], -@@ -555,7 +555,7 @@ - exit ( EXIT_FAILURE ); - } - -- bcopy (&dl, d, sizeof (struct xbsd_disklabel)); -+ memmove (d, &dl, sizeof (struct xbsd_disklabel)); - - #if defined (__powerpc__) || defined (__hppa__) - sector = 0; -@@ -657,7 +657,7 @@ - struct geom g; - - get_geometry (fd, &g); -- bzero (d, sizeof (struct xbsd_disklabel)); -+ memset (d, 0, sizeof (struct xbsd_disklabel)); - - d -> d_magic = BSD_DISKMAGIC; - -@@ -740,8 +740,8 @@ - if (BSD_BBSIZE != read (fd, disklabelbuffer, BSD_BBSIZE)) - fatal (unable_to_read); - -- bcopy (&disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET], -- d, sizeof (struct xbsd_disklabel)); -+ memmove (d, &disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET], -+ sizeof (struct xbsd_disklabel)); - - if (d -> d_magic != BSD_DISKMAGIC || d -> d_magic2 != BSD_DISKMAGIC) - return 0; -@@ -776,8 +776,8 @@ - /* This is necessary if we want to write the bootstrap later, - otherwise we'd write the old disklabel with the bootstrap. - */ -- bcopy (d, &disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET], -- sizeof (struct xbsd_disklabel)); -+ memmove (&disklabelbuffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET], -+ d, sizeof (struct xbsd_disklabel)); - - #if defined (__alpha__) && BSD_LABELSECTOR == 0 - alpha_bootblock_checksum (disklabelbuffer); -Index: util-linux-2.13-pre7/login-utils/ttymsg.c -=================================================================== ---- util-linux-2.13-pre7.orig/login-utils/ttymsg.c -+++ util-linux-2.13-pre7/login-utils/ttymsg.c -@@ -111,7 +111,7 @@ - if (wret >= 0) { - left -= wret; - if (iov != localiov) { -- bcopy(iov, localiov, -+ memmove(localiov, iov, - iovcnt * sizeof(struct iovec)); - iov = localiov; - } -Index: util-linux-2.13-pre7/login-utils/vipw.c -=================================================================== ---- util-linux-2.13-pre7.orig/login-utils/vipw.c -+++ util-linux-2.13-pre7/login-utils/vipw.c -@@ -313,8 +313,8 @@ - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); - -- bzero(tmp_file, FILENAMELEN); -- progname = (rindex(argv[0], '/')) ? rindex(argv[0], '/') + 1 : argv[0]; -+ memset(tmp_file, 0, FILENAMELEN); -+ progname = (strrchr(argv[0], '/')) ? strrchr(argv[0], '/') + 1 : argv[0]; - if (!strcmp(progname, "vigr")) { - program = VIGR; - xstrncpy(orig_file, GROUP_FILE, sizeof(orig_file)); -Index: util-linux-2.13-pre7/misc-utils/logger.c -=================================================================== ---- util-linux-2.13-pre7.orig/misc-utils/logger.c -+++ util-linux-2.13-pre7/misc-utils/logger.c -@@ -198,7 +198,7 @@ - } else { - if (p != buf) - *p++ = ' '; -- bcopy(*argv++, p, len); -+ memmove(p, *argv++, len); - *(p += len) = '\0'; - } - } -Index: util-linux-2.13-pre7/misc-utils/namei.c -=================================================================== ---- util-linux-2.13-pre7.orig/misc-utils/namei.c -+++ util-linux-2.13-pre7/misc-utils/namei.c -@@ -242,7 +242,7 @@ - * call namei() - */ - -- bzero(sym, BUFSIZ); -+ memset(sym, 0, BUFSIZ); - if(readlink(buf, sym, BUFSIZ) == -1){ - (void)printf(_(" ? problems reading symlink %s - %s (%d)\n"), buf, ERR); - return; -Index: util-linux-2.13-pre7/text-utils/colcrt.c -=================================================================== ---- util-linux-2.13-pre7.orig/text-utils/colcrt.c -+++ util-linux-2.13-pre7/text-utils/colcrt.c -@@ -252,8 +252,8 @@ - } - putwchar('\n'); - } -- bcopy(page[ol], page, (267 - ol) * 132 * sizeof(wchar_t)); -- bzero(page[267- ol], ol * 132 * sizeof(wchar_t)); -+ memmove(page, page[ol], (267 - ol) * 132 * sizeof(wchar_t)); -+ memset(page[267- ol], 0, ol * 132 * sizeof(wchar_t)); - outline -= ol; - outcol = 0; - first = 1; -Index: util-linux-2.13-pre7/fdisk/sfdisk.c -=================================================================== ---- util-linux-2.13-pre7.orig/fdisk/sfdisk.c -+++ util-linux-2.13-pre7/fdisk/sfdisk.c -@@ -40,7 +40,7 @@ - #include /* read, write */ - #include /* O_RDWR */ - #include /* ERANGE */ --#include /* index() */ -+#include /* strchr() */ - #include - #include - #include -@@ -1709,12 +1709,12 @@ - eof = 1; - return RD_EOF; - } -- if (!(lp = index(lp, '\n'))) -+ if (!(lp = strchr(lp, '\n'))) - fatal(_("long or incomplete input line - quitting\n")); - *lp = 0; - - /* remove comments, if any */ -- if ((lp = index(line+2, '#')) != 0) -+ if ((lp = strchr(line+2, '#')) != 0) - *lp = 0; - - /* recognize a few commands - to be expanded */ -@@ -1724,7 +1724,7 @@ - } - - /* dump style? - then bad input is fatal */ -- if ((ip = index(line+2, ':')) != 0) { -+ if ((ip = strchr(line+2, ':')) != 0) { - struct dumpfld *d; - - nxtfld: -@@ -2491,7 +2491,7 @@ - - if (argc < 1) - fatal(_("no command?\n")); -- if ((progn = rindex(argv[0], '/')) == NULL) -+ if ((progn = strrchr(argv[0], '/')) == NULL) - progn = argv[0]; - else - progn++; -Index: util-linux-2.13-pre7/login-utils/login.c -=================================================================== ---- util-linux-2.13-pre7.orig/login-utils/login.c -+++ util-linux-2.13-pre7/login-utils/login.c -@@ -337,7 +337,7 @@ - */ - gethostname(tbuf, sizeof(tbuf)); - xstrncpy(thishost, tbuf, sizeof(thishost)); -- domain = index(tbuf, '.'); -+ domain = strchr(tbuf, '.'); - - username = tty_name = hostname = NULL; - fflag = hflag = pflag = 0; -@@ -356,7 +356,7 @@ - exit(1); - } - hflag = 1; -- if (domain && (p = index(optarg, '.')) && -+ if (domain && (p = strchr(optarg, '.')) && - strcasecmp(p, domain) == 0) - *p = 0; - -@@ -1101,7 +1101,7 @@ - childArgv[childArgc++] = buff; - } else { - tbuf[0] = '-'; -- xstrncpy(tbuf + 1, ((p = rindex(pwd->pw_shell, '/')) ? -+ xstrncpy(tbuf + 1, ((p = strrchr(pwd->pw_shell, '/')) ? - p + 1 : pwd->pw_shell), - sizeof(tbuf)-1); - -Index: util-linux-2.13-pre7/login-utils/shutdown.c -=================================================================== ---- util-linux-2.13-pre7.orig/login-utils/shutdown.c -+++ util-linux-2.13-pre7/login-utils/shutdown.c -@@ -279,7 +279,7 @@ - if (fgets (line, sizeof(line), fp) != NULL && - strncasecmp (line, "HALT_ACTION", 11) == 0 && - iswhitespace(line[11])) { -- p = index(line, '\n'); -+ p = strchr(line, '\n'); - if (p) - *p = 0; /* strip final '\n' */ - p = line+11; -Index: util-linux-2.13-pre7/misc-utils/whereis.c -=================================================================== ---- util-linux-2.13-pre7.orig/misc-utils/whereis.c -+++ util-linux-2.13-pre7/misc-utils/whereis.c -@@ -323,14 +323,14 @@ - char dirbuf[1024]; - struct stat statbuf; - -- dd = index(dir, '*'); -+ dd = strchr(dir, '*'); - if (!dd) - goto noglob; - - l = strlen(dir); - if (l < sizeof(dirbuf)) { /* refuse excessively long names */ - strcpy (dirbuf, dir); -- d = index(dirbuf, '*'); -+ d = strchr(dirbuf, '*'); - *d = 0; - dirp = opendir(dirbuf); - if (dirp == NULL) -Index: util-linux-2.13-pre7/mount/mntent.c -=================================================================== ---- util-linux-2.13-pre7.orig/mount/mntent.c -+++ util-linux-2.13-pre7/mount/mntent.c -@@ -158,7 +158,7 @@ - return NULL; - - mfp->mntent_lineno++; -- s = index (buf, '\n'); -+ s = strchr (buf, '\n'); - if (s == NULL) { - /* Missing final newline? Otherwise extremely */ - /* long line - assume file was corrupted */ -@@ -166,7 +166,7 @@ - fprintf(stderr, _("[mntent]: warning: no final " - "newline at the end of %s\n"), - mfp->mntent_file); -- s = index (buf, 0); -+ s = strchr (buf, 0); - } else { - mfp->mntent_errs = 1; - goto err; -Index: util-linux-2.13-pre7/mount/mount.c -=================================================================== ---- util-linux-2.13-pre7.orig/mount/mount.c -+++ util-linux-2.13-pre7/mount/mount.c -@@ -488,11 +488,11 @@ - - /* Accept a comma-separated list of types, and try them one by one */ - /* A list like "nonfs,.." indicates types not to use */ -- if (*types && strncmp(*types, "no", 2) && index(*types,',')) { -+ if (*types && strncmp(*types, "no", 2) && strchr(*types,',')) { - char *t = strdup(*types); - char *p; - -- while((p = index(t,',')) != NULL) { -+ while((p = strchr(t,',')) != NULL) { - *p = 0; - args.type = *types = t; - if(do_mount_syscall (&args) == 0) -Index: util-linux-2.13-pre7/mount/mount_by_label.c -=================================================================== ---- util-linux-2.13-pre7.orig/mount/mount_by_label.c -+++ util-linux-2.13-pre7/mount/mount_by_label.c -@@ -213,7 +213,7 @@ - fseek(procpt, 0, SEEK_SET); - - while (fgets(line, sizeof(line), procpt)) { -- if (!index(line, '\n')) -+ if (!strchr(line, '\n')) - break; - - if (sscanf (line, " %d %d %d %[^\n ]", -Index: util-linux-2.13-pre7/mount/sundries.c -=================================================================== ---- util-linux-2.13-pre7.orig/mount/sundries.c -+++ util-linux-2.13-pre7/mount/sundries.c -@@ -138,7 +138,7 @@ - if (strncmp(p, type, len) == 0 && - (p[len] == 0 || p[len] == ',')) - return !no; -- p = index(p,','); -+ p = strchr(p,','); - if (!p) - break; - p++; -Index: util-linux-2.13-pre7/mount/umount.c -=================================================================== ---- util-linux-2.13-pre7.orig/mount/umount.c -+++ util-linux-2.13-pre7/mount/umount.c -@@ -332,7 +332,7 @@ - if (res < 0) - umnt_err2 = errno; - /* Do not complain about remote NFS mount points */ -- if (errno == ENOENT && index(spec, ':')) -+ if (errno == ENOENT && strchr(spec, ':')) - umnt_err2 = 0; - } - } -Index: util-linux-2.13-pre7/partx/partx.c -=================================================================== ---- util-linux-2.13-pre7.orig/partx/partx.c -+++ util-linux-2.13-pre7/partx/partx.c -@@ -130,7 +130,7 @@ - case 'n': - p = optarg; - lower = atoi(p); -- p = index(p, '-'); -+ p = strchr(p, '-'); - if (p) - upper = atoi(p+1); - else -Index: util-linux-2.13-pre7/text-utils/display.c -=================================================================== ---- util-linux-2.13-pre7.orig/text-utils/display.c -+++ util-linux-2.13-pre7/text-utils/display.c -@@ -163,7 +163,7 @@ - pr->cchar[0] = 's'; - pr->cchar[1] = 0; - for (p1 = pr->fmt; *p1 != '%'; ++p1); -- for (p2 = ++p1; *p1 && index(spec, *p1); ++p1); -+ for (p2 = ++p1; *p1 && strchr(spec, *p1); ++p1); - while ((*p2++ = *p1++) != 0) ; - } - -Index: util-linux-2.13-pre7/text-utils/parse.c -=================================================================== ---- util-linux-2.13-pre7.orig/text-utils/parse.c -+++ util-linux-2.13-pre7/text-utils/parse.c -@@ -64,7 +64,7 @@ - exit(1); - } - while (fgets(buf, sizeof(buf), fp)) { -- if ((p = index(buf, '\n')) == NULL) { -+ if ((p = strchr(buf, '\n')) == NULL) { - (void)fprintf(stderr, _("hexdump: line too long.\n")); - while ((ch = getchar()) != '\n' && ch != EOF); - continue; -@@ -171,7 +171,7 @@ - * skip any special chars -- save precision in - * case it's a %s format. - */ -- while (index(spec + 1, *++fmt)); -+ while (strchr(spec + 1, *++fmt)); - if (*fmt == '.' && isdigit((unsigned char)*++fmt)) { - prec = atoi(fmt); - while (isdigit((unsigned char)*++fmt)); -@@ -244,10 +244,10 @@ - if (fu->bcnt) { - sokay = USEBCNT; - /* skip to conversion character */ -- for (++p1; index(spec, *p1); ++p1); -+ for (++p1; strchr(spec, *p1); ++p1); - } else { - /* skip any special chars, field width */ -- while (index(spec + 1, *++p1)); -+ while (strchr(spec + 1, *++p1)); - if (*p1 == '.' && - isdigit((unsigned char)*++p1)) { - sokay = USEPREC; -Index: util-linux-2.13-pre7/fdisk/cfdisk.c -=================================================================== ---- util-linux-2.13-pre7.orig/fdisk/cfdisk.c -+++ util-linux-2.13-pre7/fdisk/cfdisk.c -@@ -348,7 +348,7 @@ - /* Some libc's have their own basename() */ - static char * - my_basename(char *devname) { -- char *s = rindex(devname, '/'); -+ char *s = strrchr(devname, '/'); - return s ? s+1 : devname; - } - -Index: util-linux-2.13-pre7/login-utils/wall.c -=================================================================== ---- util-linux-2.13-pre7.orig/login-utils/wall.c -+++ util-linux-2.13-pre7/login-utils/wall.c -@@ -87,7 +87,7 @@ - textdomain(PACKAGE); - - progname = argv[0]; -- p = rindex(progname, '/'); -+ p = strrchr(progname, '/'); - if (p) - progname = p+1; - diff --git a/package/util-linux/util-linux-umount2-fix.patch b/package/util-linux/util-linux-umount2-fix.patch deleted file mode 100644 index 14b6c34..0000000 --- a/package/util-linux/util-linux-umount2-fix.patch +++ /dev/null @@ -1,20 +0,0 @@ -[PATCH] fix multiple definitions of umount2 issue - -Signed-off-by: Peter Korsgaard ---- - mount/umount.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: util-linux-2.13-pre7/mount/umount.c -=================================================================== ---- util-linux-2.13-pre7.orig/mount/umount.c -+++ util-linux-2.13-pre7/mount/umount.c -@@ -29,7 +29,7 @@ - #include "nfsmount.h" - #include - --#if defined(MNT_FORCE) && !defined(__sparc__) && !defined(__arm__) -+#if 1 - /* Interesting ... it seems libc knows about MNT_FORCE and presumably - about umount2 as well -- need not do anything */ - #else /* MNT_FORCE */ diff --git a/package/webif/Config.in b/package/webif/Config.in deleted file mode 100644 index 2ecbf36..0000000 --- a/package/webif/Config.in +++ /dev/null @@ -1,28 +0,0 @@ -config BR2_PACKAGE_WEBIF - bool "webif - Status Console" - depends on BR2_PACKAGE_BUSYBOX # httpd - depends on BR2_DEPRECATED - select BR2_PACKAGE_HASERL - help - A web interface for showing different network status. This package - requires awk support on the system, either the one provided by - Busybox or gawk. - - The default login on the status web pages are root/root and - admin/admin. This can be changed in the etc/httpd.conf file. - -config BR2_PACKAGE_WEBIF_INSTALL_INDEX_HTML - bool "instal index.html in /www which redirects to webif" - depends on BR2_PACKAGE_WEBIF - help - Installs a /www/index.html which redirects to the status console cgi - scripts. - -config BR2_PACKAGE_WEBIF_LANGUAGES - bool "install language support" - depends on BR2_PACKAGE_WEBIF - help - This option installs support for other languages than english. - - Supported languages: ca, cz, de, dk, ee, es, fr, hr, hu, it, nl, no, - pl, pt, ru and se. diff --git a/package/webif/files/etc/httpd.conf b/package/webif/files/etc/httpd.conf deleted file mode 100644 index 9e125da..0000000 --- a/package/webif/files/etc/httpd.conf +++ /dev/null @@ -1,8 +0,0 @@ -.asp:text/html -/cgi-bin/webif:root:root -/cgi-bin/webif:admin:admin -.svg:image/svg+xml -.png:image/png -.gif:image/gif -.jpg:image/jpg - diff --git a/package/webif/files/usr/lib/webif/apply.sh b/package/webif/files/usr/lib/webif/apply.sh deleted file mode 100755 index 9cbadf4..0000000 --- a/package/webif/files/usr/lib/webif/apply.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/ash -# -# Default handlers for config files -# -HANDLERS_config=' - wireless) reload_wireless;; - network) reload_network;; - system) reload_system;; -' -HANDLERS_file=' - hosts) rm -f /etc/hosts; mv $config /etc/hosts; killall -HUP dnsmasq ;; - ethers) rm -f /etc/ethers; mv $config /etc/ethers; killall -HUP dnsmasq ;; - firewall) mv /tmp/.webif/file-firewall /etc/config/firewall && /etc/init.d/S45firewall;; -' - -# for some reason a for loop with "." doesn't work -eval "$(cat /usr/lib/webif/apply-*.sh 2>&-)" - -reload_network() { - echo '@TR<> @TR<> ...' - grep '^wan_' config-network >&- 2>&- && { - ifdown wan - ifup wan - killall -HUP dnsmasq - } - - grep '^lan_' config-network >&- 2>&- && { - ifdown lan - ifup lan - killall dnsmasq - /etc/init.d/S??dnsmasq - } -} - -reload_wireless() { - echo '@TR<> @TR<> ...' - killall nas >&- 2>&- && sleep 2 - ( - /sbin/wifi - [ -f /etc/init.d/S41wpa ] && /etc/init.d/S41wpa - ) >&- 2>&- <&- -} - -reload_system() { - echo '@TR<> @TR<> ...' - echo "$(nvram get wan_hostname)" > /proc/sys/kernel/hostname -} - -cd /tmp/.webif - -# file-* other config files -for config in $(ls file-* 2>&-); do - name=${config#file-} - echo "@TR<> @TR<>: $name" - eval 'case "$name" in - '"$HANDLERS_file"' - esac' -done - -# config-* simple config files -( - cd /proc/self - cat /tmp/.webif/config-* 2>&- | grep '=' >&- 2>&- && { - cat /tmp/.webif/config-* 2>&- | tee fd/1 | xargs -n1 nvram set - echo "@TR<> NVRAM ..." - nvram commit - } -) -for config in $(ls config-* 2>&-); do - name=${config#config-} - eval 'case "$name" in - '"$HANDLERS_config"' - esac' -done -sleep 2 -rm -f config-* diff --git a/package/webif/files/usr/lib/webif/categories.awk b/package/webif/files/usr/lib/webif/categories.awk deleted file mode 100644 index 00312c9..0000000 --- a/package/webif/files/usr/lib/webif/categories.awk +++ /dev/null @@ -1,27 +0,0 @@ -BEGIN { - n = 0 - sel = 0 - FS=":" -} -($3 == "category") && (categories !~ /:$4:/) { - categories = categories ":" $4 ":"; - n++ - if ($4 ~ "^" selected "$") sel = n - c[n] = $4 - if (f[$4] == "") f[$4] = rootdir "/" indexpage "?cat=" $4 -} -($3 == "name") && ((p[$4] == 0) || (p[$4] > int($5))) { - gsub(/^.*\//, "", $1); - p[$4] = int($5) + 1 - f[$4] = rootdir "/" $1 -} -END { - print "

@TR<>:

" -} diff --git a/package/webif/files/usr/lib/webif/common.awk b/package/webif/files/usr/lib/webif/common.awk deleted file mode 100644 index de3483e..0000000 --- a/package/webif/files/usr/lib/webif/common.awk +++ /dev/null @@ -1,38 +0,0 @@ -function start_form(title, field_opts, field_opts2) { - print "
" - if (title != "") print "

" title "

" - print "
" -} - -function end_form(form_help, form_help_link) { - print "
" - if (form_help != "") form_help = "
" form_help "
" - print "

@TR<>:

" form_help form_help_link "
" - print "
 
" -} - -function textinput(name, value) { - return "" -} - -function hidden(name, value) { - return "" -} - -function button(name, caption) { - return ">\" />" -} - -function helpitem(name) { - return "
@TR<<" name ">>:
" -} - -function helptext(short, name) { - return "
@TR<<" short "|" name ">>:
" -} - -function sel_option(name, caption, default, sel) { - if (default == name) sel = " selected=\"selected\"" - else sel = "" - return "" -} diff --git a/package/webif/files/usr/lib/webif/form.awk b/package/webif/files/usr/lib/webif/form.awk deleted file mode 100644 index 808b99e..0000000 --- a/package/webif/files/usr/lib/webif/form.awk +++ /dev/null @@ -1,100 +0,0 @@ -# $1 = type -# $2 = form variable name -# $3 = form variable value -# $4 = (radio button) value of button -# $5 = string to append -# $6 = additional attributes - -BEGIN { - FS="|" -} - -# trim leading whitespaces -{ - gsub(/^[ \t]+/,"",$1) -} - -$1 ~ /^onchange/ { - onchange = $2 -} - -($1 != "") && ($1 !~ /^option/) && (select_open == 1) { - select_open = 0 - printf "" -} -$1 ~ /^start_form/ { - if ($3 != "") field_opts=" id=\"" $3 "\"" - else field_opts="" - if ($4 == "hidden") field_opts = field_opts " style=\"display: none\"" - start_form($2, field_opts); - print "" - form_help = "" - form_help_link = "" -} -$1 ~ /^field/ { - if (field_open == 1) print "" - if ($3 != "") field_opts=" id=\"" $3 "\"" - else field_opts="" - if ($4 == "hidden") field_opts = field_opts " style=\"display: none\"" - print "" - if ($2 != "") print "" - } - print "" -} -$1 ~ /^caption/ { print "" $2 "" } -$1 ~ /^string/ { print $2 } -$1 ~ /^text/ { print "" $4 } -$1 ~ /^password/ { print "" $4 } -$1 ~ /^upload/ { print "" } -$1 ~ /^submit/ { print "" } -$1 ~ /^helpitem/ { form_help = form_help "
@TR<<" $2 ">>:
" } -$1 ~ /^helptext/ { form_help = form_help "
@TR<<" $2 ">>
" } -$1 ~ /^helplink/ { form_help_link = "" } - -($1 ~ /^checkbox/) || ($1 ~ /^radio/) { - print $5 -} - -$1 ~ /^end_form/ { - if (field_open == 1) print "" - field_open = 0 - print "
" $2 "" - else print "" - - field_open=1 -} -$1 ~ /^checkbox/ { - if ($3==$4) opts="checked=\"checked\" " - else opts="" - if (onchange != "") opts = opts " onClick=\"" onchange "()\" onChange=\"" onchange "()\"" - print "" -} -$1 ~ /^radio/ { - if ($3==$4) opts="checked=\"checked\" " - else opts="" - if (onchange != "") opts = opts " onClick=\"" onchange "()\" onChange=\"" onchange "()\"" - print "" -} -$1 ~ /^select/ { - opts = "" - if (onchange != "") opts = opts " onClick=\"" onchange "()\" onChange=\"" onchange "()\"" - print "
" items[i] " @TR<>
>\" />
" - end_form(form_help, form_help_link); - form_help = "" - form_help_link = "" -} diff --git a/package/webif/files/usr/lib/webif/lang/ca/common.txt b/package/webif/files/usr/lib/webif/lang/ca/common.txt deleted file mode 100644 index 3d19974..0000000 --- a/package/webif/files/usr/lib/webif/lang/ca/common.txt +++ /dev/null @@ -1,226 +0,0 @@ -lang => Català -# Common -Settings saved => Canvis desats -Settings not saved => No s'han pogut desar els canvis -Save Changes => Desar canvis -Apply Changes => Aplicar canvis -Clear Changes => Desfer canvis -Review Changes => Comprovar canvis -Host Name => Nom de l'equip -Uptime => Uptime -Load => Càrrega del sistema -Version => Versió -Categories => Categories -Subcategories => Subcategories -more... => més... -Add => Afegir -Remove => Eliminar -Warning => Atenció -Password_warning => No heu establert una clau d'accés pel router (accés web i ssh). Per favor, elegiu-ne una ara (el nom d'usuari serà 'root') - -# Categories -Info => Info -About => Quant a -Router Info => Informació del router - -Status => Estat -Connections => Connexions -DHCP => DHCP -Wireless => Wi-Fi - -System => Sistema -Password => Clau -Settings => Configuració -Installed Software => Programes instal·lats -Firmware Upgrade => Actualitzar Firmware - -Network => Xarxa -LAN => LAN -WAN => Internet -Wireless => Wi-Fi -Advanced Wireless => Wi-Fi (avançat) -Hosts => Configuració de hosts - - -# 'About' page -Copyright => Copyright - -GPL_Text => Aquest programa és programari lliure; podeu redistribuir-lo i/o
modificar-lo baix els termes de la General Public License
tal i com està publicada per la Free Sofware Foundation; bé la versió 2 d'aquesta Llicència o bé (segons la seva elecció) de qualsevol posterior. -Contributions by => Contribuidors -Layout based on => Aspecte basat en -by => realitzat per - - -No config change. => No hi ha hagut canvis a la configuració. -Config discarded. => Els canvis no s'han acceptat. -Config changes: => Configuració actual: -Updating config... => Actualitzant la configuració... - - -# 'Router Info' page -Firmware Version => Versió del firmware -Kernel Version => Versió del Kernel -Current Date/Time => Data/Hora -MAC Address => Adreça MAC - - -# 'Connections' page -Connection Status => Estat de les connexions -Physical Connections => Connexions físiques -Router Connections => Connexions del router - - -# 'DHCP' page -DHCP leases => Préstecs DHCP -IP Address => Adreça IP -Name => Nom -Expires in => Caduca d'ara a - - -# 'Wireless Status' page -Wireless Status => Estat del Wi-Fi - -# 'Password' page -Password Change => Canvi de la clau -New Password => Nova clau -Confirm Password => Confirmeu la clau - -# 'System Settings' page -System Settings => Paràmetres del sistema -Host Name => Nom de l'host -Language => Idioma - -# 'Installed Software' page -Installed Packages => Paquets instal·lats -Update package lists => Actualització de la llista de paquets -Uninstall => Desinstal·lar -Install => Instal·lar - - -# 'Firmware Upgrade' page -Firmware format => Format del firmware -Error => Error -done => fet -Invalid_formt => Format del firmware invàlid -Erase_JFFS2 => Esborrar la partició JFFS2 -Options => Opcions -Firmware_image => Fitxer del firmware -Upgrade => Actualitzar -Upgrading... => Actualitzant... - -# 'LAN Settings' page -LAN Settings => Opcions LAN -LAN Configuration => Configuració LAN -Netmask => Màscara de subxarxa -Default Gateway => Porta d'enllaç (gateway) -DNS Servers => Servidor DNS -DNS Address => Adreça IP del DNS - -Note => Nota - -# 'WAN Settings' page -WAN Settings => Opcions d'Internet -WAN Configuration => Configuració d'Internet -PPTP Server IP => Adreça IP del servidor PPTP -Connection Type => Tipus de connexió -No WAN => Sense configuració d'Internet -DHCP => DHCP -Static IP => IP estàtica -IP Settings => Opcions IP -PPP Settings => Opcions PPP -Redial Policy => Política de reconnexió -Connect on Demand => Baix demanda -Keep Alive => Connexió permanent -Maximum Idle Time => Temps màxim d'inactivitat -Redial Timeout => Temps de reconnexió -MTU => MTU (mida dels paquets) -Username => Nom d'usuari - - -# 'Wireless Configuration' page -Wireless Configuration => Configuració Wi-Fi -Wireless Interface => Interfície Wi-Fi -WEP Key => Clau WEP -Selected WEP Key => Clau WEP seleccionada -WPA PSK => WPA-PSK -ESSID => ESSID -Channel => Canal -RADIUS IP Address => Adreça IP del servidor RADIUS -RADIUS Server Key => Secret RADIUS -Enabled => Actiu -Disabled => Inactiu -ESSID Broadcast => Difusió del SSID -Show => Mostrar -Hide => Ocultar -WLAN Mode => Mode Wi-Fi -Access Point => Punt d'accés -Client => Client -Bridge => Bridge -Ad-Hoc => Ad-Hoc -Operation mode => Mode de funcionament -Encryption Settings => Paràmetres d'enriptació -Encryption Type => Tipus d'encriptació -PSK => PSK -WPA Mode => Mode WPA -WPA Algorithms => Algoritmes WPA -WEP Keys => Clau WEP - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => Configuració Wi-Fi avançada -WDS Connections => Connexions WDS -MAC Filter List => Filtrat per adreça MAC -Filter Mode => Mode de filtrat -Allow => Autoritzar -Deny => Denegar -Set => Establir -Settings => Paràmetres -Automatic WDS => WDS automàtic - -# "Hosts" page - -MAC Address => Adreça MAC -Configured Hosts => Equips configurats -DHCP Static => Entrades DHCP estàtiques -Host Names => Nom dels equips - -Up => Pujar -Down => Baixar -Edit => Editar -Delete => Esborrar -Save => Desar -Cancel => Rebutjar - -Forward => Redirigir -Accept => Acceptar -Drop => Rebutjar - -Firewall => Firewall -Firewall Rules => Regles del Firewall -Firewall Configuration => Configuració del Firewall - -New Rule => Nova regla -Match => Filtrar -Target => Acció -Port => Port - -Protocol => Protocol -Source IP => IP origen -Destination IP => IP destí -Source Ports => Ports origen -Destination Ports => Ports destí - -Forward to => Redirigir a -Port => Port - -Helptext ESSID => SSID -Helptext DNS save => És recomanable desar els canvis abans d'afegir o eliminar servidors DNS a la llista - -Helptext Operation mode => Estableix el mode d'operació de la xarxa inalàmbrica (Wi-Fi) 'Client (bridge)' no canviarà la configuració de la interfície de xarxa. Simplement afegirà uns paràmetres que permetran que la interfície wireless actui en certa mida com un bridge. -Helptext Encryption Type => 'WPA (RADIUS)' només pot emprar-se en mode Punt d'Accés.
'WPA (PSK)' no funciona en mode Ad-Hoc. -Helptext IP Settings => Les opcions IP són opcionals per a DHCP y PPTP. Si les elegiu, s'empraran per defecte en cas de que la configuració automàtica falli. -Helptext Idle Time => Nombre de segons sense activitat amb Internet que ha d'esperar el router abans de desconectar-se. (Només pel mode Baix Demanda). -Helptext Redial Timeout => Nombre de segons sense rebre resposta del servidor que ha d'esperar el router per a tornar a connectar-se. - -# untranslated: -Available packages => Paquets disponibles - diff --git a/package/webif/files/usr/lib/webif/lang/cz/common.txt b/package/webif/files/usr/lib/webif/lang/cz/common.txt deleted file mode 100644 index 773e9d9..0000000 --- a/package/webif/files/usr/lib/webif/lang/cz/common.txt +++ /dev/null @@ -1,225 +0,0 @@ -lang => Česky -# Common -Settings saved => Nastavení uloženo -Settings not saved => Nastavení nebylo uloženo -Save Changes => Uložit zmĕny -Apply Changes => Provést zmĕny -Clear Changes => Vymazat zmĕny -Review Changes => Prohlédnout zmĕny -Host Name => Hostname -Uptime => Uptime -Load => Zatížení -Version => Verze -Categories => Kategorie -Subcategories => Podkategorie -more... => více... -Add => Přidat -Remove => Odebrat -Warning => Varování -Password_warning => není nastaveno žádné heslo pro přístup do webové administrace a přes SSH.
Nastavte jej prosím nyní (Login ve webu používejte: 'root'). - -# Categories -Info => Info -About => Projekt -Router Info => Router - -Status => Stav -Connections => Připojení -DHCP => DHCP -Wireless => WLAN - -System => Systém -Password => Heslo -Settings => Nastavení -Installed Software => Nainstalovaný software -Firmware Upgrade => Flashnutí firmware - -Network => Síť -LAN => LAN -WAN => WAN port -Wireless => WLAN -Advanced Wireless => WLAN (podrobné) -Hosts => Stanice (hosts) - - -# 'About' page -Copyright => Copyright - -GPL_Text => Tento program patří mezi volný software, můžete jej distribuovat a/nebo mĕnit pod podmínkami uvedenými
v licenci GNU GPL (General Public License) vydanými Nadací pro svobodný software (Free Software Foundation),
její druhé verze, případnĕ pozdĕjších verzí. -Contributions by => S přispĕním -Layout based on => Layout postaven na -by => od - - -No config change. => Nebyly provedeny žádné zmĕny konfigurace. -Config discarded. => Vaše nastavení byla zahozena. -Config changes: => Aktuální zmĕny konfigurace: -Updating config... => Aktualizuji konfiguraci... - - -# 'Router Info' page -Firmware Version => Verze firmware -Kernel Version => Verze jádra -Current Date/Time => Aktuální datum/čas -MAC Address => MAC adresa - - -# 'Connections' page -Connection Status => Stav spojení -Physical Connections => Obsah ARP cache - aktivní MAC/IP adresy -Router Connections => Spojení na router - - -# 'DHCP' page -DHCP leases => DHCP výpůjčky -IP Address => IP adresa -Name => Jméno -Expires in => Vyprší - - -# 'Wireless Status' page -Wireless Status => Stav wifi - -# 'Password' page -Password Change => Zmĕna hesla -New Password => Nové heslo -Confirm Password => Nové heslo (potvrzení) - -# 'System Settings' page -System Settings => Systémová nastavení -Host Name => Hostname -Language => Jazyk - -# 'Installed Software' page -Installed Packages => Nainstalované balíčky -Available packages => Dostupné balíčky -Update package lists => Aktualizovat seznam balíčků -Uninstall => Odinstalovat -Install => Nainstalovat - - -# 'Firmware Upgrade' page -Firmware format => Formát firmware -Error => Chyba -done => hotovo -Invalid_format => Formát firmware je neznámý -Erase_JFFS2 => Smazat JFFS2 oblast -Options => Možnosti -Firmware_image => Soubor firmware: -Upgrade => Flashnout -Upgrading... => Flashuji... - -# 'LAN Settings' page -LAN Settings => Nastavení LAN -LAN Configuration => Konfigurace LAN -Netmask => Maska -Default Gateway => Brána -DNS Servers => DNS servery -DNS Address => Adresa DNS serveru - -Note => Poznámka - - -# 'WAN Settings' page -WAN Settings => Nastavení WAN portu -WAN Configuration => Konfigurace -PPTP Server IP => Adresa PPTP serveru -Connection Type => Typ připojení -No WAN => Odpojeno -DHCP => DHCP -Static IP => Pevná IP -IP Settings => Nastavení IP -PPP Settings => Nastavení PPP -Redial Policy => Navázání spojení -Connect on Demand => Na vyžádání (Connect on Demand) -Keep Alive => Stále připojen (Keep Alive) -Maximum Idle Time => Maximální čas bez aktivity (Maximum Idle Time) -Redial Timeout => Prodleva znovunavázání spojení po jeho ztrátĕ (Redial Timeout) -MTU => Maximální velikost paketu (MTU) -Username => Uživatelské jméno - - -# 'Wireless Configuration' page -Wireless Configuration => Konfigurace wifi -Wireless Interface => Wifi rozhraní -WEP Key => WEP klíč -Selected WEP Key => Vybraný WEP klíč -WPA PSK => WPA klíč -ESSID => ESSID -Channel => Kanál -RADIUS IP Address => Adresa RADIUS serveru -RADIUS Server Key => Heslo RADIUS serveru -Enabled => Zapnuto -Disabled => Vypnuto -ESSID Broadcast => Skrytí ESSID (ESSID-Broadcast) -Show => Zobrazeno -Hide => Skryto -WLAN Mode => Operační mód -Access Point => Access Point -Client => Klient -Bridge => Bridge -Ad-Hoc => Ad-Hoc -Encryption Settings => Šifrování přenosu -Encryption Type => Typ šifrování -PSK => WPA PSK -WPA Mode => Mód WPA -WPA Algorithms => WPA algoritmus -WEP Keys => WEP klíče - - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => Rozšířené nastavení wifi -WDS Connections => WDS spojení -MAC Filter List => Seznam MAC filtru -Filter Mode => Mód MAC filtru -Allow => Povolit MAC v seznamu -Deny => Zakázat MAC s seznamu -Set => Nastavit -Settings => Nastavení -Automatic WDS => Automatické WDS spojení (LazyWDS) - -# "Hosts" page - -MAC Address => MAC adresa -Configured Hosts => Konfigurace stanic (hosts) -DHCP Static => Pevné přidĕlení IP podle MAC (DHCP) -Host Names => Jména stanic (hosts) - - -Up => Nahoru -Down => Dolů -Edit => Editovat -Delete => Smazat -Save => Uložit -Cancel => Storno - -Forward => Forward -Accept => Accept -Drop => Drop - -Firewall => Firewall -Firewall Rules => Pravidla firewallu -Firewall Configuration => Konfigurace firewallu - -New Rule => Nové pravidlo -Match => Filtr -Target => Cíl -Port => Port - -Protocol => Protokol -Source IP => Zdrojová IP -Destination IP => Cílová IP -Source Ports => Zdrojový port -Destination Ports => Cílový port - -Forward to => Forward na -Port => Port - -Helptext ESSID => Název Vaší bezdrátové sítĕ -Helptext DNS save => Před úpravou nastavení DNS serverů uložte ostatní zmĕny na této stránce. - -Helptext Operation mode => Toto nastavení mĕní mód bezdrátové sítĕ. Volbou Klient (bridge) se nezmĕní nastavení síťových rozhraní, pouze se nastaví nĕkteré parametry ovladače wifi, které umožní funkčnĕ omezenou možnost vytvoření bridge nad rozhraními. -Helptext Encryption Type => 'WPA (RADIUS)' lze použít pouze v módu Access Point.
'WPA (PSK)' nelze použít v Ad-Hoc módu. -Helptext IP Settings => Nastavení IP je pro možnost DHCP a PPTP volitelné. Zadaná adresa se použije v případĕ, že není DHCP server dostupný. -Helptext Idle Time => Čas v sekundách, po který když nedojde k žádné aktivitĕ, je spojení do Internetu uzavřeno. (pouze pro volbu Connect on Demand) -Helptext Redial Timeout => Čas po odpojení, po který router čeká, než se pokusí znovu navázat spojení. diff --git a/package/webif/files/usr/lib/webif/lang/de/common.txt b/package/webif/files/usr/lib/webif/lang/de/common.txt deleted file mode 100644 index f8ab28d..0000000 --- a/package/webif/files/usr/lib/webif/lang/de/common.txt +++ /dev/null @@ -1,228 +0,0 @@ -lang => Deutsch -# Common -Settings saved => Einstellungen gespeichert -Settings not saved => Einstellungen nicht gespeichert -Save Changes => Speichern -Apply Changes => Übernehmen -Clear Changes => Verwerfen -Review Changes => Anzeigen -Host Name => Hostname -Uptime => Uptime -Load => Systemlast -Version => Version -Categories => Kategorien -Subcategories => Unterkategorien -more... => Weitere Informationen... -Add => Hinzufügen -Remove => Entfernen -Warning => Warnung -Password_warning => es wurde noch kein Passwort für Web-Administration und SSH gesetzt.
Bitte geben Sie jetzt ein neues Passwort ein (Benutzername im Browser: 'root'). - -# Categories -Info => Info -About => Über -Router Info => Routerinformationen - -Status => Status -Connections => Netzwerkverbindungen -DHCP => DHCP -Wireless => WLAN - -System => System -Password => Passwort -Settings => Einstellungen -Installed Software => Installierte Software -Firmware Upgrade => Firmware aktualisieren - -Network => Netzwerk -LAN => LAN -WAN => Internet -Wireless => WLAN -Advanced Wireless => WLAN (erweitert) -Hosts => Host-Konfiguration - - -# 'About' page -Copyright => Copyright - -GPL_Text => Dieses Programm ist freie Software. Sie können es unter den Bedingungen der GNU General Public License,
wie von der Free Software Foundation veröffentlicht, weitergeben und/oder modifizieren,
entweder gemäß Version 2 der Lizenz oder (nach Ihrer Option) jeder späteren Version. -Contributions by => Mit Beiträgen von -Layout based on => Layout basiert auf -by => von - - -No config change. => Es wurden keine Konfigurationsänderungen vorgenommen. -Config discarded. => Ihre Konfigurationsänderungen wurden verworfen. -Config changes: => Aktuelle Konfigurationsänderungen: -Updating config... => Aktualisiere die Konfiguration... - - -# 'Router Info' page -Firmware Version => Firmwareversion -Kernel Version => Kernelversion -Current Date/Time => Datum/Uhrzeit -MAC Address => MAC-Adresse - - -# 'Connections' page -Connection Status => Verbindungsstatus -Physical Connections => Netzwerkschnittstellen -Router Connections => Netzwerkverbindungen auf dem Router - - -# 'DHCP' page -DHCP leases => DHCP-Leases -IP Address => IP-Adresse -Name => Name -Expires in => Gültigkeitsdauer - - -# 'Wireless Status' page -Wireless Status => WLAN-Status - -# 'Password' page -Password Change => Passwort ändern -New Password => Neues Passwort -Confirm Password => Passwort bestätigen - -# 'System Settings' page -System Settings => Systemeinstellungen -Host Name => Hostname -Language => Sprache - -# 'Installed Software' page -Installed Packages => Installierte Pakete -Update package lists => Paketlisten aktualisieren -Uninstall => Deinstallieren -Install => Installieren - - -# 'Firmware Upgrade' page -Firmware format => Firmware-Format -Error => Fehler -done => fertig -Invalid_format => Das Dateiformat der Firmware ist ungültig -Erase_JFFS2 => JFFS2-Partition löschen -Options => Optionen -Firmware_image => Firmware-Datei: -Upgrade => Aktualisieren -Upgrading... => Aktualisiere... - -# 'LAN Settings' page -LAN Settings => Netzwerkeinstellungen -LAN Configuration => Netzwerkkonfiguration -Netmask => Subnetzmaske -Default Gateway => Standardgateway -DNS Servers => DNS-Server -DNS Address => DNS-Serveradresse - -Note => Hinweis - - -# 'WAN Settings' page -WAN Settings => Internet-Einstellungen -WAN Configuration => Internet-Konfiguration -PPTP Server IP => PPTP-Serveradresse -Connection Type => Verbindungsart -No WAN => Keine Verbindung -DHCP => DHCP -Static IP => Statische Konfiguration -IP Settings => IP-Konfiguration -PPP Settings => PPP-Einstellungen -Redial Policy => Verbindungsaufbau -Connect on Demand => Bei Bedarf -Keep Alive => Verbindung aufrechterhalten -Maximum Idle Time => Wartezeit bei Inaktivität -Redial Timeout => Wartezeit bei unterbrochener Verbindung -MTU => Maximale Paketgröße -Username => Benutzername - - -# 'Wireless Configuration' page -Wireless Configuration => WLAN-Konfiguration -Wireless Interface => WLAN-Interface -WEP Key => WEP-Schlüssel -Selected WEP Key => Ausgewählter WEP Schlüssel -WPA PSK => WPA-Schlüssel -ESSID => ESSID -Channel => Kanal -RADIUS IP Address => RADIUS-Serveradresse -RADIUS Server Key => RADIUS-Serverpasswort -Enabled => Aktiviert -Disabled => Deaktiviert -ESSID Broadcast => ESSID-Broadcast -Show => Anzeigen -Hide => Verstecken -WLAN Mode => Betriebsmodus -Access Point => Access Point -Client => Client -Bridge => Bridge -Ad-Hoc => Ad-Hoc -Encryption Settings => Verschlüsselungseinstellungen -Encryption Type => Verschlüsselungsart -PSK => Passwort -WPA Mode => WPA-Modus -WPA Algorithms => WPA-Verschlüsselungsalgorithmen -WEP Keys => WEP-Schlüssel - - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => WLAN-Konfiguration (erweitert) -WDS Connections => WDS-Verbindungen -MAC Filter List => Zugriffsbeschränkung (MAC-Adresse) -Filter Mode => Filtermodus -Allow => Erlauben -Deny => Verweigern -Set => Setzen -Settings => Einstellungen -Automatic WDS => Automatische WDS-Verbindung - -# "Hosts" page - -MAC Address => MAC-Adresse -Configured Hosts => Konfigurierte Hosts -DHCP Static => Statische DHCP-Einträge -Host Names => Host-Einträge - - -Up => Hoch -Down => Runter -Edit => Bearbeiten -Delete => Löschen -Save => Speichern -Cancel => Abbrechen - -Forward => Weiterleiten -Accept => Zulassen -Drop => Verweigern - -Firewall => Firewall -Firewall Rules => Firewall-Regeln -Firewall Configuration => Firewall-Konfiguration - -New Rule => Neue Regel -Match => Filter -Target => Ziel -Port => Port - -Protocol => Protokoll -Source IP => Quell-IP -Destination IP => Ziel-IP -Source Ports => Quell-Ports -Destination Ports => Ziel-Ports - -Forward to => Weiterleiten an -Port => Port - -Helptext ESSID => Name des Funknetzwerks -Helptext DNS save => Sie müssen Ihre Änderungen an dieser Seite speichern, bevor Sie DNS-Server hinzufügen oder entfernen - -Helptext Operation mode => Setzt den Betriebsmodus für das WLAN-Interface. Die Einstellung 'Client (Bridge)' ändert nichts an den eigentlichen Netzwerkeinstellungen, es ändert lediglich einige Parameter im WLAN-Treiber, damit man das Interface eingeschränkt in einer Bridge verwenden kann. -Helptext Encryption Type => 'WPA (RADIUS)' wird nur im Access-Point-Modus unterstützt.
'WPA (PSK)' funktioniert nicht im Ad-Hoc-Modus. -Helptext IP Settings => IP-Einstellungen sind optional für DHCP und PPTP. Wenn sie gesetzt sind, werden sie als Standardwerte verwendet, falls kein DHCP-Server erreichbar ist. -Helptext Idle Time => Wartezeit in Sekunden, nach der bei Inaktivität die Internetverbindung getrennt wird. -Helptext Redial Timeout => Maximale Zeit, die der Router auf Antwort vom Provider warten soll, bevor die Verbindung neu aufgebaut wird. - -# untranslated: -Available packages => Verfügbare Pakete - diff --git a/package/webif/files/usr/lib/webif/lang/dk/common.txt b/package/webif/files/usr/lib/webif/lang/dk/common.txt deleted file mode 100644 index bd8f867..0000000 --- a/package/webif/files/usr/lib/webif/lang/dk/common.txt +++ /dev/null @@ -1,231 +0,0 @@ -lang => Dansk -# Common -Settings saved => Indstillingerne er gemt -Settings not saved => Indstillinger er ikke gemt -Save Changes => Gem ændringerne -Apply Changes => Aktiver ændringer -Clear Changes => Glem ændringerne -Review Changes => Se ændringer -Host Name => Værtsnavn -Uptime => Oppetid -Load => Systembelastning -Version => Version -Categories => Kategorier -Subcategories => Underkategorier -more... => mere... -Add => Tilføje -Remove => Fjern -Warning => Advarsel -Password_warning => Der er ikke sat noget kodeord eller løsen på hverken Webadministration eller SSH.
Vær venlig at vælge og/eller indtaste dit kodeord (Brugernavn er 'root' med små bogstaver). - -# Categories -Info => Info -About => Om -Router Info => Routerinformation - -Status => Status -Connections => Netværksforbindelser -DHCP => DHCP -Wireless => Trådløs - -System => System -Password => Kodeord -Settings => Indstillinger -Installed Software => Installeret programmel -Firmware Upgrade => Firmware opgradering - -Network => Netværk -LAN => Lokalnet -WAN => Internet -Wireless => Trådløs -Advanced Wireless => Avanceret trådløs -Hosts => Værtsnavne - - -# 'About' page -Copyright => Ophavsret - -GPL_Text => Dette program er fri software. De må bruge, ændre og videredistribuere det under betingelserne for "GNU General Public License",
som offentliggjort af "Free Software Foundation" (Den frie softwarebevægelse), enten i version 2 af licensen eller (efter deres valg), en hvilkensomhelst senere version. - -Contributions by => Bidrag fra -Layout based on => Layoutet er baseret på -by => af - - -No config change. => Ingen konfigurationsændring foretaget -Config discarded. => Konfigurationsændringerne blev kasseret -Config changes: => Foreløbige ændringer -Updating config... => Sætter ændringerne i kraft - -# 'Router Info' page -Firmware Version => Firmwareversion -Kernel Version => Kerneversion -Current Date/Time => Aktuel dato/tid -MAC Address => MAC adresse - - -# 'Connections' page -Connection Status => Forbindelsesstatus -Physical Connections => Fysiske forbindelser -Router Connections => Routerens forbindelser - - -# 'DHCP' page -DHCP leases => DHCP leasinger -IP Address => IP adresse -Name => Navn -Expires in => Udløbstid - - -# 'Wireless Status' page -Wireless Status => Trådløs status - -# 'Password' page -Password Change => Ændre kodeord -New Password => Nyt kodeord -Confirm Password => Nyt kodeord igen - -# 'System Settings' page -System Settings => Systemindstillinger -Host Name => Værtsnavn -Language => Sprog - -# 'Installed Software' page -Installed Packages => Installerede pakker -Update package lists => Opdater pakkelisten -Uninstall => Afindstaller -Install => Installer - - -# 'Firmware Upgrade' page -Firmware format => Firmwareformat -Error => Fejl -done => færdig -Invalid_format => Ubrugelig_format -Erase_JFFS2 => Slet JFFS2 partitionen -Options => Tilvalg -Firmware_image => Firmwarefil: -Upgrade => Opgradere -Upgrading... => Opgraderer... - -# 'LAN Settings' page -LAN Settings => Lokale netindstillinger -LAN Configuration => Lokal netværkskonfiguration -Netmask => Undernetmaske -Default Gateway => Standard gateway -DNS Servers => DNS-Server -DNS Address => DNS-Serveradresse - -Note => Bemærk - - -# 'WAN Settings' page -WAN Settings => Internet indstillinger -WAN Configuration => Internetkonfiguration -PPTP Server IP => PPTP-serveradresse -Connection Type => Forbindelsestype -No WAN => Ingen Internetopsætning -DHCP => DHCP -Static IP => Statisk IP -IP Settings => IP indstillinger -PPP Settings => PPP indstillinger -Redial Policy => Genopkaldspolitik -Connect on Demand => Forbind når behovet er der -Keep Alive => Hold forbindelsen i live (keep alive) -Maximum Idle Time => Maksimal tid i tomgang (max idle) -Redial Timeout => Opkaldstimeout -MTU => Maksimal pakkestørelse (MTU) -Username => Brugernavn - - -# 'Wireless Configuration' page -Wireless Configuration => Trådløs konfiguration -Wireless Interface => Trådløs netkort -WEP Key => WEP nøgle -Selected WEP Key => Valgt WEP nøgle -WPA PSK => WPA nøgle -ESSID => ESSID -Channel => Kanal -RADIUS IP Address => IP adressen på RADIUS server -RADIUS Server Key => Kodeord til RADIUS server -Enabled => Aktiveret -Disabled => Deaktiveret -ESSID Broadcast => ESSID-Broadcast -Show => Vis -Hide => Skjul -WLAN Mode => Trådløs tilstand -Access Point => Access Point -Client => Klient -Bridge => bro -Ad-Hoc => Ad-Hoc -Encryption Settings => Krypteringsindstillinger -Encryption Type => Krypteringstype -PSK => PSK kode -WPA Mode => WPA tilstand -WPA Algorithms => WPA krypteringsalgoritme -WEP Keys => WEP nøgler - - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => Avanceret opsætning af trådløs -WDS Connections => WDS forbindelser (WDS repeater) -MAC Filter List => Filteringsliste (MAC-numre) -Filter Mode => Filtreingstilstand -Allow => Tillad -Deny => Forbyd -Set => Sæt -Settings => Indstillinger -Automatic WDS => Automatisk WDS forbindelse - -# "Hosts" page - -MAC Address => MAC adresse -Configured Hosts => Værtsnavne -DHCP Static => Statiske IP adresser til DHCP -Host Names => Værtsnavne - - -Up => Op -Down => Ned -Edit => Rette -Delete => Slette -Save => Gemme -Cancel => Annullere - -Forward => Forward (videresend) -Accept => Accept (tillad) -Drop => Drop (smid væk) - -Firewall => Firewall -Firewall Rules => Firewall regler -Firewall Configuration => Firewallkonfiguration - -New Rule => Ny regel -Match => Match (sammenlign) -Target => Target (Gå til) -Port => Port - -Protocol => Protokol -Source IP => Afsenders IP -Destination IP => Modtagers IP -Source Ports => Afsender porte -Destination Ports => Modtager porte - -Forward to => Send videre til -Port => Port - -Helptext ESSID => Navn på trådløs netværk -Helptext DNS save => Gem ændringer på denne side før du tilføjer eller fjerner DNS servere. (Hvis ikke du vil miste dem.) - -Helptext Operation mode => Sætter driftstilstanden for den trådløse del af routeren. 'Klient' og 'Klient (bro)' bruges til at forbinde 2 trådløse routere. I mange tilfælde er WDS en bedre (men mere avanceret) løsning. 'Klient' udnytter dog båndbredden bedst, hvis du vitterlig kun har en maskine tilsluttet.
Indstillingen 'Klient (bro)' ændrer ikke direkte ved netværksindstillingerne. Det er et beskidt hack som får routeren til at foregiver at kun en maskine (et MAC nummer) er tilsluttet. Det sker for at overvinde et problem i 802.11 protokollen, som forhindrer at man problemfrit (i almindelig 'Klient'-tilstand) kan bruge den trådløse forbindelse fra flere maskiner samtidig.
AP bruges til en standalone router, hvor f.eks. bærbare computere skal have adgang til Internet og/eller lokalnet.
Hvis du ikke ved hvad 'Ad Hoc' tilstanden gør, har du højst sandsynligt ikke brug for den. - -Helptext Encryption Type => 'WPA (RADIUS)' er kun understøttet i AP (Access Point) tilstand.
'WPA (PSK)' fungerer ikke i 'Ad-Hoc' tilstand. - -Helptext IP Settings => IP indstilinger er frivillig for DHCP og PPTP. Når de er sat, bliver de brugt som standværdiger, hvis der ikke er en tilgængelig DHCP server. - -Helptext Idle Time => Ventetid i sekunder før inaktivitet bliver årsagen til at forbindelsen afbrydes. - -Helptext Redial Timeout => Ventetid før der prøves at ringe op igen. - -# untranslated: -Available packages => Available packages diff --git a/package/webif/files/usr/lib/webif/lang/ee/common.txt b/package/webif/files/usr/lib/webif/lang/ee/common.txt deleted file mode 100644 index e3690cd..0000000 --- a/package/webif/files/usr/lib/webif/lang/ee/common.txt +++ /dev/null @@ -1,230 +0,0 @@ -lang => Eesti -#Common -Settings saved => Sätted salvestatud -Settings not saved => Sätted on salvestamata -Save Changes => Salvesta muudatused -Apply Changes => Rakenda muudatused -Clear Changes => Kustuta muudatused -Review Changes => Vaata tehtud muudatusi -Host Name => Hostinimi -Uptime => Töövõimeaega seni -Load => Koormus -Version => Versioon -Categories => Kategooriad -Subcategories => Alamkategooriad -more... => veel... -Add => Lisa -Remove => Eemalda -Warning => Hoiatus -Password_warning => veebilidese ja SSH salasõna on seadmata
Palun, sisesta see (veebiliidese kasutajanimi on 'root'). - -# Categories -Info => Info -About => Teavet -Router Info => Marsruuteri info - -Status => Olek -Connections => Ühendused -DHCP => DHCP -Wireless => Raadioliides - -System => Süsteem -Password => Parool -Settings => Sätted -Installed Software => Installitud tarkvara -Firmware Upgrade => Püsivara uuendamine - -Network => Võrk -LAN => LAN -WAN => WAN -Wireless => Raadioliides -Advanced Wireless => Raadioliidese täpsemad sätted -Hosts => Hostid - - -# About page -Copyright => Copyright - -GPL_Text => Käesolev programm on vabavara; seda võib levitada ja/või
modifitseerida vastavalt Free Software Foundationi
avaldatud avaliku litsentsi GNU General Public License 2. versiooni või
(teie valikul) mis tahes uuema versiooni tingimustele. - -Contributions by => Kaasaaitajad -Layout based on => Kujunduse idee -by => autor - - -No config change. => Konfiguratsioon muutmata. -Config discarded. => Konfiguratsioon hüljatud. -Config changes: => Konfiguratsiooni muudatused: -Updating config... => Uuendan konfiguratsiooni... - -# Router Info page -Firmware Version => Püsivara versioon -Kernel Version => Kerneli versioon -Current Date/Time => Praegune kuupäev/kellaaeg -MAC Address => MAC-aadress - - -# Connections page -Connection Status => Ühenduse olek -Physical Connections => Füüsilised ühendused -Router Connections => Marsruuteriühendused - - -# DHCP page -DHCP leases => DHCP antud aadressid -IP Address => IP-aadress -Name => Nimi -Expires in => Aegub - - -# Wireless Status page -Wireless Status => Raadioliidese olek - -# Password page -Password Change => Parooli muutmine -New Password => Uus parool -Confirm Password => Korrake parooli - -# System Settings page -System Settings => Süsteemi sätted -Host Name => Hostinimi -Language => Keel - -# Installed Software page -Installed Packages => Installitud paketid -Update package lists => Värskenda paketiloendit -Uninstall => Desinstalli -Install => Installi -Available packages => Saadaolevad paketid - -# Firmware Upgrade page -Firmware format => Püsivara vorming -Error => Tõrge -done => valmis -Invalid_format => Vale vorming -Erase_JFFS2 => Kustuta JFFS2 -Options => Valikud -Firmware_image => Püsivara tõmmis -Upgrade => Versiooniuuendus -Upgrading... => Uuendan... - -# LAN Settings page -LAN Settings => LAN-i sätted -LAN Configuration => LAN-i konfiguratsioon -Netmask => Võrgu mask -Default Gateway => Vaikelüüs -DNS Servers => DNS-serverid -DNS Address => DNS-i aadress - -Note => Märkus - - -# WAN Settings page -WAN Settings => WAN-i sätted -WAN Configuration => WAN-i konfiguratsioon -PPTP Server IP => PPTP-serveri IP -Connection Type => Ühenduse tüüp -No WAN => WAN-i ei kasutata -DHCP => DHCP -Static IP => Staatiline IP -IP Settings => IP-sätted -PPP Settings => PPP-sätted -Redial Policy => Kordusvalimispoliitika -Connect on Demand => Ühenda nõudmisel -Keep Alive => Hoia ühendust töös -Maximum Idle Time => Maksimaalne jõudeaeg -Redial Timeout => Kordusvalimise aegumine -MTU => MTU -Username => Kasutajanimi - - -# Wireless Configuration page -Wireless Configuration => Raadioliidese konfiguratsioon -Wireless Interface => Raadioliides -WEP Key => WEP-võti -Selected WEP Key => Valitud WEP-võti -WPA PSK => WPA PSK -ESSID => ESSID -Channel => Kanal -RADIUS IP Address => RADIUS IP-aadress -RADIUS Server Key => RADIUS-serveri võti -Enabled => Lubatud -Disabled => Keelatud -ESSID Broadcast => ESSID-i levindamine -Show => Näita -Hide => Peida -WLAN Mode => WLAN-i rez"iim -Access Point => AP -Client => Klient -Bridge => Sild -Ad-Hoc => Ad-Hoc -Encryption Settings => Krüpteerimise sätted -Encryption Type => Krüpteerimise tüüp -PSK => PSK -WPA Mode => WPA rez"iim -WPA Algorithms => WPA algoritmid -WEP Keys => WEP-võtmed - - -# Advanced Wireless Configuration page -Advanced Wireless Configuration => Raadioliidese täpsem konfiguratsioon -WDS Connections => WDS-ühendused -MAC Filter List => MAC-filtri loend -Filter Mode => Filtri rez"iim -Allow => Luba -Deny => Keela -Set => Sea -Settings => Sätted -Automatic WDS => Automaatne WDS - -# "Hosts" page - -MAC Address => MAC-aadress -Configured Hosts => Konfigureeritud hostid -DHCP Static => Staatiline DHCP -Host Names => Hostinimed - - -Up => Üles -Down => Alla -Edit => Muuda -Delete => Kustuta -Save => Salvesta -Cancel => Loobu - -Forward => Forward -Accept => Accept -Drop => Drop - -Firewall => Tulemüür -Firewall Rules => Tulemüüri reeglid -Firewall Configuration => Tulemüüri konfiguratsioon - -New Rule => Uus reegel -Match => Vastavus -Target => Sihtkoht -Port => Port - -Protocol => Protokoll -Source IP => Saatja IP -Destination IP => Saaja IP -Source Ports => Saatja pordid -Destination Ports => Saaja pordid - -Forward to => Suuna: -Port => Port - -Helptext ESSID => Teie traadita võrgu võrgunimi - -Helptext DNS save => Sellel lehel tehtud muudatused tuleb enne DNS-serverite lisamist/eemaldamist salvestada - -Helptext Operation mode => Määrab teie traadita võrgu tööreziimi. Säte "Klient (Sild)" ei muuda võrguliidese sätteid. Muudetakse ainult raadioliidese draiveri teatud parameetreid, mis on seotud liidese sillarez"iimi piirangute lubamisega - -Helptext Encryption Type => 'WPA (RADIUS)' on lubatud ainult rez"iimis "AP".
Säte 'WPA (PSK)' ei tööta võrdõigusvõrgurez"iimis (Ad-Hoc) - -Helptext IP Settings => IP-sätted on DHCP ja PPTP puhul valikulised. Kui muudate neid sätteid, siis rakendatakse need vaikesätetena juhul, kui DHCP-server pole saadaval. - -Helptext Idle Time => Aeg sekundites, mille vältel marsruuter enne Interneti-ühenduse katkestamist ootab (ainult sätte Connect on Demand puhul). - -Helptext Redial Timeout => Aeg sekundites, kui kaua marsruuter pärast teenusepakkuja võrgust teate "pole vastust" saamist ootab, enne kui asub ühendust taastama. - diff --git a/package/webif/files/usr/lib/webif/lang/es/common.txt b/package/webif/files/usr/lib/webif/lang/es/common.txt deleted file mode 100644 index d488d1f..0000000 --- a/package/webif/files/usr/lib/webif/lang/es/common.txt +++ /dev/null @@ -1,227 +0,0 @@ -lang => Español -# Common -Settings saved => Cambios guardados -Settings not saved => No se han podido guardar los cambios -Save Changes => Guardar cambios -Apply Changes => Aplicar cambios -Clear Changes => Deshacer cambios -Review Changes => Comprobar cambios -Host Name => Nombre del equipo -Uptime => Uptime -Load => Carga del sistema -Version => Versión -Categories => Categorías -Subcategories => Subcategorís -more... => más... -Add => Añadir -Remove => Eliminar -Warning => Atención -Password_warning => no has establecido una contraseña de protección para el router (acceso web y ssh). Por favor, elija una ahora (el nombre de usuario será 'root') - -# Categories -Info => Info -About => Acerca de -Router Info => Información del router - -Status => Estado -Connections => Conexiones -DHCP => DHCP -Wireless => Wi-Fi - -System => Sistema -Password => Contraseña -Settings => Configuración -Installed Software => Programas instalados -Firmware Upgrade => Actualizar Firmware - -Network => Red -LAN => LAN -WAN => Internet -Wireless => Wi-Fi -Advanced Wireless => Wi-Fi (avanzado) -Hosts => Configuration de hosts - - -# 'About' page -Copyright => Copyright - -GPL_Text => Este programa es software libre; Usted puede distribuirlo y/o
modificarlo bajo los términos de la General Public License
como está publicada por la Free Sofware Foundation; bien de la versión 2 de dicha Licencia o bien (según su elección) de cualquier versión posterior. -Contributions by => Contribuidores -Layout based on => Aspecto basado en -by => por - - -No config change. => No ha habido cambios de configuración. -Config discarded. => Los cambios no se han aceptado. -Config changes: => Configuración actual: -Updating config... => Actualizando la configuración... - - -# 'Router Info' page -Firmware Version => Versión del firmware -Kernel Version => Versión del Kernel -Current Date/Time => Fecha/Hora -MAC Address => Dirección MAC - - -# 'Connections' page -Connection Status => Estado de las conexiones -Physical Connections => Conexiones físicas -Router Connections => Conexiones del router - - -# 'DHCP' page -DHCP leases => Préstamos DHCP -IP Address => Dirección IP -Name => Nombre -Expires in => Caduca en - - -# 'Wireless Status' page -Wireless Status => Estado del Wi-Fi - -# 'Password' page -Password Change => Cambio de la contraseña -New Password => Nueva contraseña -Confirm Password => Confirme la contraseña - -# 'System Settings' page -System Settings => Parámetros del sistema -Host Name => Nombre del host -Language => Idioma - -# 'Installed Software' page -Installed Packages => Paquetes instalados -Update package lists => Actualización de la lista de paquetes -Uninstall => Desinstalar -Install => Instalar - - -# 'Firmware Upgrade' page -Firmware format => Formato del firmware -Error => Error -done => hecho -Invalid_formt => Formato del firmware inválido -Erase_JFFS2 => Borrar la partición JFFS2 -Options => Opciones -Firmware_image => Archivo del firmware -Upgrade => Actualizar -Upgrading... => Actualización... - -# 'LAN Settings' page -LAN Settings => Configuración LAN -LAN Configuration => Configuración LAN -Netmask => Máscara de subred -Default Gateway => Puerta de enlace (gateway) -DNS Servers => Servidor DNS -DNS Address => Dirección IP del DNS - -Note => Nota - -# 'WAN Settings' page -WAN Settings => Configuración de Internet -WAN Configuration => Configuración de Internet -PPTP Server IP => Dirección IP del servidor PPTP -Connection Type => Tipo de conexión -No WAN => Sin configuración de Internet -DHCP => DHCP -Static IP => IP estática -IP Settings => Configuración IP -PPP Settings => Configuración PPP -Redial Policy => Opciones de reconexión -Connect on Demand => Bajo demanda -Keep Alive => Conexión permanente -Maximum Idle Time => Tiempo máximo de inactividad -Redial Timeout => Tiempo de reconexión -MTU => MTU (tamaño de los paquetes) -Username => Nombre de usuario - - -# 'Wireless Configuration' page -Wireless Configuration => Configuración Wi-Fi -Wireless Interface => Interfaz Wi-Fi -WEP Key => Clave WEP -Selected WEP Key => Clave WEP seleccionada -WPA PSK => WPA-PSK -ESSID => ESSID -Channel => Canal -RADIUS IP Address => Dirección IP del servidor RADIUS -RADIUS Server Key => Secreto RADIUS -Enabled => Activado -Disabled => Desactivado -ESSID Broadcast => Difusión del SSID -Show => Mostrar -Hide => Ocultar -WLAN Mode => Modo Wi-Fi -Access Point => Punto de acceso -Client => Cliente -Bridge => Bridge -Ad-Hoc => Ad-Hoc -Operation mode => Modo de funcionamiento -Encryption Settings => Parámetros de enriptación -Encryption Type => Tipo de encriptación -PSK => PSK -WPA Mode => Modo WPA -WPA Algorithms => Algoritmos WPA -WEP Keys => Clave WEP - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => Configuración Wi-Fi avanzada -WDS Connections => Conexiones WDS -MAC Filter List => Filtrar por dirección MAC -Filter Mode => Modo de filtrado -Allow => Autorizar -Deny => Denegar -Set => Establecer -Settings => Parámetros -Automatic WDS => WDS automático - -# "Hosts" page - -MAC Address => Dirección MAC -Configured Hosts => Equipos configurados -DHCP Static => Entradas DHCP estáticas -Host Names => Nombre de los equipos - -Up => Subir -Down => Bajar -Edit => Editar -Delete => Borrar -Save => Guardar -Cancel => Cancelar - -Forward => Redirigir -Accept => Aceptar -Drop => Descartar - -Firewall => Firewall -Firewall Rules => Reglas del Firewall -Firewall Configuration => Configuración del Firewall - -New Rule => Nueva regla -Match => Filtrar -Target => Acción -Port => Puerto - -Protocol => Protocolo -Source IP => IP origen -Destination IP => IP destino -Source Ports => Puertos origen -Destination Ports => Puertos destino - -Forward to => Redirigir a -Port => Puerto - -Helptext ESSID => SSID -Helptext DNS save => Es recomendable guardar los cambios antes de añadir o eliminar servidores de DNS de la lista - -Helptext Operation mode => Establece el modo de operación de tu red wireless. Eligiendo 'Client (bridge)' no cambiará la configuración de la interfaz de red. Simplemente añadirá unos parámetros que permitirán que la interfaz wireless actúe en cierta medida en modo bridge. -Helptext Encryption Type => 'WPA (RADIUS)' sólo puede usarse en modo Punto de Acceso.
'WPA (PSK)' no funciona en modo Ad-Hoc. -Helptext IP Settings => Las opciones IP son opcionales para DHCP y PPTP. Si las eliges, se utilizarán por defecto en caso de que la configuración automática falle. -Helptext Idle Time => Número de segundos sin actividad con Internet que debe esperar el router antes de desconectarse. (Sólo para el modo Bajo Demanda). -Helptext Redial Timeout => Número de segundos sin recibir respuesta del servidor que debe esperar el router para volver a conectarse. - - -# untranslated: -Available packages => Available packages - diff --git a/package/webif/files/usr/lib/webif/lang/fr/common.txt b/package/webif/files/usr/lib/webif/lang/fr/common.txt deleted file mode 100644 index 96cdb83..0000000 --- a/package/webif/files/usr/lib/webif/lang/fr/common.txt +++ /dev/null @@ -1,238 +0,0 @@ -lang => Français -Encoding => UTF-8 - -# Common -Settings saved => Sauvegardé -Settings not saved => Non sauvegardé -Save Changes => Sauvegarder -Apply Changes => Appliquer -Clear Changes => Effacer -Review Changes => Revoir -Host Name => Nom de machine -Uptime => Uptime -Load => Charge système -Version => Version -Categories => Catégories -Subcategories => Sous-catétgories -more... => davantage... -Add => Ajouter -Remove => Enlever - -Warning => Attention -Password_warning => vous n'avez pas configuré de mot de passe pour l'interface Web et l'accès SSH
Entrez en un maintenant (le nom d'utilisateur dans le navigateur sera 'root'). - -# Categories -Info => Info -About => A propos -Router Info => Informations routeur - -Status => Statut -Connections => Connexions réseau -DHCP => DHCP -Wireless => Wi-Fi - -System => Système -Password => Mot de passe -Settings => Paramètres -Installed Software => Logiciels installés -Firmware Upgrade => Mise à jour firmware - -Network => Réseau -LAN => LAN -WAN => Internet -Wireless => Wi-Fi -Advanced Wireless => Wi-Fi (avancé) -Hosts => Configuration des hôtes - - -# 'About' page -Copyright => Copyright - -GPL_Text => Ce programme est un logiciel libre; vous pouvez le redistribuer -et/ou le modifier sous les termes de la General Public License telle qu'elle -est publiée par la Free Sofware Foundation; que ce soit sous la version -2 de la license, ou (à votre convenance) une version ultérieure -Contributions by => Contributions par -Layout based on => Présentation basée sur -by => par - - -No config change. => Pas de changements. -Config discarded. => Pas de prise en compte. -Config changes: => Configuration actuelle: -Updating config... => Mise à jour... - - -# 'Router Info' page -Firmware Version => Version du firmware -Kernel Version => Version du noyau -Current Date/Time => Date et heure -MAC Address => Adresse MAC - - -# 'Connections' page -Connection Status => Etat des connexions -Physical Connections => Connexions physiques -Router Connections => Connexions au routeur - - -# 'DHCP' page -DHCP leases => Baux DHCP -IP Address => Adresse IP -Name => Nom -Expires in => Expire dans - - -# 'Wireless Status' page -Wireless Status => Etat du Wi-Fi - -# 'Password' page -Password Change => Changement du mot de passe -New Password => Nouveau mot de passe -Confirm Password => Confirmez le mot de passe - -# 'System Settings' page -System Settings => Paramètres du système -Host Name => Nom d'hôte -Language => Langue - -# 'Installed Software' page -Installed Packages => Paquets logiciels installés -Update package lists => Mise à jour de la liste des paquets -Uninstall => Désinstaller -Install => Installer - - -# 'Firmware Upgrade' page -Firmware format => Format du firmware -Error => Erreur -done => prêt -Invalid_formt => Le firmware n'a pas un format valide -Erase_JFFS2 => Effacer la partition JFFS2 -Options => Options -Firmware_image => Fichier firmware -Upgrade => Mettre à jour -Upgrading... => Mise à jour en cours... - -# 'LAN Settings' page -LAN Settings => Paramètres LAN -LAN Configuration => Configuration LAN -Netmask => Masque réseau -Default Gateway => Passerelle par défaut -DNS Servers => Serveur DNS -DNS Address => Addresse DNS - -Note => Note - - -# 'WAN Settings' page -WAN Settings => Paramètres Internet -WAN Configuration => Configuration Internet -PPTP Server IP => Adresse IP du serveur PPTP -Connection Type => Type de connexion -No WAN => Pas de configuration WAN -DHCP => DHCP -Static IP => IP statique -IP Settings => Paramètres IP -PPP Settings => Paramètres PPP -Redial Policy => Options de renumérotation -Connect on Demand => Sur demande -Keep Alive => Toujours connecté -Maximum Idle Time => Délai maximal d'inactivté -Redial Timeout => Délai avant renumérotation -MTU => Taille maximale des paquets -Username => Nom d'utilisateur - - -# 'Wireless Configuration' page -Wireless Configuration => Configuration Wi-Fi -Wireless Interface => Interface Wi-Fi -WEP Key => Clé WEP -Selected WEP Key => Choix de la clé WEP -WPA PSK => WPA clé pré-partagée -ESSID => ESSID -Channel => Canal -RADIUS IP Address => Adresse IP du serveur RADIUS -RADIUS Server Key => Secret partagé avec le serveur RADIUS -Enabled => Activé -Disabled => Désactivé -ESSID Broadcast => Diffusion du SSID -Show => Montrer -Hide => Cacher -WLAN Mode => Mode de fonctionnement Wi-Fi -Access Point => Point d'accès -Client => Client -Bridge => Pont-réseau -Ad-Hoc => Ad-Hoc -Encryption Settings => Paramètres de chiffrement -Encryption Type => Type de chiffrement -PSK => Clé pré-partagée -WPA Mode => Mode WPA -WPA Algorithms => Algorithmes WPA -WEP Keys => Clés WEP - - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => Configuration Wi-Fi avancée -WDS Connections => Connexions WDS -MAC Filter List => Filtre par adresses MAC -Filter Mode => Mode de filtrage -Allow => Autoriser -Deny => Refuser -Set => Paramètrer -Settings => Paramètres -Automatic WDS => WDS automatique -WDS watchdog timeout => Délai d'inactivité WDS -Antenna selection => Sélection de l'antenne - -# "Hosts" page - -MAC Address => Adresse MAC -Configured Hosts => Hôtes configurés -DHCP Static => Entrées DHCP statiques -Host Names => Noms d'hôtes - -Up => Monter -Down => Descendre -Edit => Editer -Delete => Effacer -Save => Sauvegarder -Cancel => Annuler - -Forward => Transférer -Accept => Accepter -Drop => Ignorer - -Firewall => Pare-feu -Firewall Rules => Règles du pare-feu -Firewall Configuration => Configuration du pare-feu - -New Rule => Nouvelle règle -Match => Concordance -Target => Destination -Port => Port - -Protocol => Protocole -Source IP => IP source -Destination IP => IP de destination -Source Ports => Ports source -Destination Ports => Ports de destination - -Forward to => Transférer vers -Port => Port - - -Helptext ESSID => Nom du réseau sans-fil -Helptext DNS save => Il est recommandé de sauvegarder vos paramètres avant d'ajouter/enlever des serveurs DNS - - -Helptext Operation mode => Configure le mode de fonctionnement de votre -réseau sans-fil. Le mode Client (Pont réseau sans-fil) ne changera pas les paramètres de votre interface. Certains paramètres de la carte Wi-Fi seront modifiés de manière à pouvoir fonctionner en mode réseau sans-fil. -Helptext Encryption Type => 'WPA (RADIUS)' ne fonctionne qu'en mode point d'accès.
'WPA (PSK)' ne fonctionne pas en mode Ad-hoc. -Helptext IP Settings => Les paramètres IP sont optionnels pour DHCP et PPTP. Si vous les configurez, ils seront utilisé comme paramètres par défaut dans le cas oú le serveur DHCP ne répond< pas. -Helptext Idle Time => Nombre de secondes sans traffic internet à attendre avant que le routeur déconnecte d'Internet (Connexion à la demande) -Helptext Redial Timeout => Nombre de secondes à attendre après n'avoir recu aucune réponse du fournisseur avant un nouvel éssai de connexion. - - -Available packages => Paquetages disponibles - diff --git a/package/webif/files/usr/lib/webif/lang/hr/common.txt b/package/webif/files/usr/lib/webif/lang/hr/common.txt deleted file mode 100644 index a6291a2..0000000 --- a/package/webif/files/usr/lib/webif/lang/hr/common.txt +++ /dev/null @@ -1,199 +0,0 @@ -lang => Hrvatski -Encoding => UTF-8 -# Common -Settings saved => Postavke Spremljene -Settings not saved => Postavke Nisu Spremljene -Save Changes => Spremi Postavke -Apply Changes => Primijeni Postavke -Clear Changes => Obriši Postavke -Review Changes => Pregledaj Izmjene -Host Name => Naziv Hosta -Uptime => U Pogonu Od -Load => Optereæenje -Version => Verzija -Categories => Kategorije -Subcategories => Podkategorije -more... => nastavak... -Add => Dodaj -Remove => Makni -Warning => Upozorenje -Password_warning => Niste postavili lozinku za Web suèelje i SSH pristup -Molimo vas unesite lozinku (korisnièko ime u vašem pregledniku æ biti 'root'). -# Categories -Info => Informacije -About => Opis -Router Info => O ureðaju -Status => Status -Connections => Veze -DHCP => DHCP -Wireless => Wireless -System => Sustav -Password => Lozinka -Settings => Postavke -Installed Software => Instalirani Softver -Firmware Upgrade => Nadogradnja Firmware-a -Network => Mreža -LAN => LAN -WAN => WAN -Wireless => Wireless -Advanced Wireless => Napredne Wireless Postavke -Hosts => Konfigurirani Hostovi - -# 'About' page -Copyright => Copyright -GPL_Text => This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -Contributions by => Contributions by SL SOLUCIJE d.o.o. -Layout based on => Layout based on SmartHop webif -by => by Silvije Filipovic - silvije.filipovic@slsolucije.hr - -No config change. => Nema nikakvih promjena konfiguracije. -Config discarded. => Vaše promjene konfiguracije su opozvane. -Config changes: => Trenutne promjene konfiguracije: -Updating config... => Konfiguracija se nadograðuje... - -# 'Router Info' page -Firmware Version => Firmware Verzija -Kernel Version => Kernel Verzija -Current Date/Time => Trenutni Datum/ Vrijeme -MAC Address => Mac Adresa - -# 'Connections' page -Connection Status => Status Veza -Physical Connections => Fizièke Veze -Router Connections => Usmjeravanje - -# 'DHCP' page -DHCP leases => DHCP dodjela -IP Address => IP Adresa -Name => Naziv -Expires in => Rok istjecanja - -# 'Wireless Status' page -Wireless Status => Wireless Status -# 'Password' page -Password Change => Promjena Lozinke -New Password => Nova Lozinka -Confirm Password => Potvrdi Lozinku -# 'System Settings' page -System Settings => Postavke Sustava -Host Name => Naziv Hosta -Language => Jezik -# 'Installed Software' page -Installed Packages => Instalirani Paketi -Update package lists => Ažuriraj listu paketa -Uninstall => Deinstaliraj -Install => Instaliraj - -# 'Firmware Upgrade' page -Firmware format => Firmware format -Error => Greška -done => gotovo -Invalid_formt => Neispravan Firmware Format -Erase_JFFS2 => Izbriši JFFS2 particiju -Options => Opcije -Firmware_image => Firmware image za upload -Upgrade => Nadogradi -Upgrading... => Nadogradnja u tijeku... -# 'LAN Settings' page -LAN Settings => LAN Postavke -LAN Configuration => LAN Konfiguracija -Netmask => Netmask -Default Gateway => Default Gateway -DNS Servers => DNS Serveri -DNS Address => DNS Adresa -Note => Bilješke -# 'WAN Settings' page -WAN Settings => WAN Postavke -WAN Configuration => WAN Konfiguracija -PPTP Server IP => PPTP Server IP -Connection Type => Tip Konekcije -No WAN => Bez WAN Konekcije -DHCP => DHCP -Static IP => Statièki IP -IP Settings => IP Postavke -PPP Settings => PPP Postavke -Redial Policy => Redial Policy -Connect on Demand => Spajanje na Zahtjev -Keep Alive => Keep Alive -Maximum Idle Time => Dozvoljeni Max. Idle Time -Redial Timeout => Redial Timeout -MTU => MTU -Username => Korisnièko Ime - -# 'Wireless Configuration' page -Wireless Configuration => Wireless Konfiguracija -Wireless Interface => Wireless Interface -WEP Key => WEP Key -Selected WEP Key => Odabrani WEP Key -WPA PSK => WPA PSK -ESSID => ESSID -Channel => Kanal -RADIUS IP Address => RADIUS IP Adresa -RADIUS Server Key => RADIUS Server Key -Enabled => Omoguæeno -Disabled => Onemoguæeno -ESSID Broadcast => ESSID Broadcast -Show => Neskriveni -Hide => Skriveni -WLAN Mode => WLAN Mod -Access Point => Access Point -Client => Client -Bridge => Bridge -Ad-Hoc => Ad-Hoc -Operation mode => Operaativni mod -Encryption Settings => Postavke Enkripcije -Encryption Type => Tip Enkripcije -PSK => PSK -WPA Mode => WPA Mod -WPA Algorithms => WPA Algoritmi -WEP Keys => WEP Keys -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => Napredne Wireless Postavke -WDS Connections => WDS Veze -MAC Filter List => MAC Filter Lista -Filter Mode => Filter Mod -Allow => Dozvoli -Deny => Zabrani -Set => Postavi -Settings => Postavke -Automatic WDS => Automatski WDS -# "Hosts" page -MAC Address => MAC Adresa -Configured Hosts => Konfigurirani Hostovi -DHCP Static => Statièki DHCP -Host Names => Nazivi Hostova -Up => Gore -Down => Dolje -Edit => Uredi -Delete => Briši -Save => Spremi -Cancel => Odustani -Forward => Naprijed -Accept => Prihvati -Drop => Otkaži -Firewall => Firewall -Firewall Rules => Firewall Pravila -Firewall Configuration => Firewall Konfiguracija -New Rule => Novo Pravilo -Match => Uvjet -Target => Cilj -Port => Port -Protocol => Protokol -Source IP => Ishodišni IP -Destination IP => Odredišni IP -Source Ports => Ishodišni Portovi -Destination Ports => Odredišni Portovi -Forward to => Preusmjeravanje na -Port => Port -Helptext ESSID => Naziv Wireless Mreže -Helptext DNS save => Trebali biste spremiti vaše postavke na ovoj stranici prije dodavanja/brisanja DNS posljužitelja -Helptext Operation mode => Ova opcija odreðuje operativni mod rada vaše wireless mreže. Odabir 'Client (Bridge)' neæe promijeniti postavke mrežnog suèelja. Samo æe biti dodani parametri u pogonski program koji omoguæavaju ogranièene bridging funkcije suèelja. -Helptext Encryption Type => 'WPA (RADIUS)' je podržan samo u Access Point modu. -'WPA (PSK)' ne radi u Ad-Hoc modu. -Helptext IP Settings => IP Postavke su opcionalne za DHCP i PPTP. Ukoliko su postavljene, koriste se kao pretpostavljene, u sluèaju kada DHCP poslužitelj nije dostupan. -Helptext Idle Time => Vrijeme u sekundama bez internet prometa do kojeg ureðaj treba èekati prije prekida veze (samo kod Spajanja na Zahtjev) -Helptext Redial Timeout => Vrijeme u sekundama za prijem odgovora od prividera prije ponovnog spajanja diff --git a/package/webif/files/usr/lib/webif/lang/hu/common.txt b/package/webif/files/usr/lib/webif/lang/hu/common.txt deleted file mode 100644 index a8a08e6..0000000 --- a/package/webif/files/usr/lib/webif/lang/hu/common.txt +++ /dev/null @@ -1,227 +0,0 @@ -lang => Magyar -# Common -Settings saved => Beállítások elmentve -Settings not saved => Beállítások mentésének mellőzése -Save Changes => Változatások mentése -Apply Changes => Változtatások alkalmazása -Clear Changes => Változtatások eldobása -Review Changes => Változtatások megtekintése -Host Name => Host név -Uptime => Üzemidő -Load => Rendszer terhelés -Version => Verzió -Categories => Kategoriák -Subcategories => Alkategóriák -more... => További információk... -Add => Hozzáad -Remove => Eltávolít -Warning => Vigyázat -Password_warning => A Web-Adminisztrátoenak és az SSH hozzáféréshez még nincs jelszó beállítva.
Adjon meg most egy új jelszót (felhasználónév a böngészőben: 'root'). - -# Categories -Info => Információ -About => Rólunk -Router Info => Router információ - -Status => Állapot -Connections => Hálózati kapcsolatok -DHCP => DHCP -Wireless => WLAN - -System => Rendszer -Password => Jelszó -Settings => Beállítások -Installed Software => Telepítés -Firmware Upgrade => Firmware frissítés - -Network => Hálózat -LAN => LAN -WAN => Internet -Wireless => WLAN -Advanced Wireless => WLAN (haladó) -Hosts => Host konfiguráció - - -# 'About' page -Copyright => Copyright - -GPL_Text => This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version. -Contributions by => Contributions by -Layout based on => Layout based on -by => by - -No config change. => A konfigurációban nincs változás. -Config discarded. => Konfiguráció változtatások eldobva. -Config changes: => Konfiguráció módodítások: -Updating config... => Konfiguráció frissítése... - - -# 'Router Info' page -Firmware Version => Firmware verzió -Kernel Version => Kernel verzió -Current Date/Time => Aktuális dátum/idő -MAC Address => MAC Address - - -# 'Connections' page -Connection Status => Kapcsolatok -Physical Connections => Fizikai kapcsolatok -Router Connections => Router kapcsolatok - - -# 'DHCP' page -DHCP leases => DHCP bérletek -IP Address => IP cím -Name => Név -Expires in => Lejár - - -# 'Wireless Status' page -Wireless Status => WLAN állapot - -# 'Password' page -Password Change => Jelszó csere -New Password => Új jelszó -Confirm Password => Jelszó mégegyszer - -# 'System Settings' page -System Settings => Rendszer beállítások -Host Name => Host név -Language => Nyelv - -# 'Installed Software' page -Installed Packages => Telepített csomagok -Update package lists => Csomaglista frissítése -Uninstall => Eltávolítás -Install => Telepítés - - -# 'Firmware Upgrade' page -Firmware format => Firmware format -Error => Hiba -done => Kész -Invalid_format => Érvénytelen Firmware -Erase_JFFS2 => JFFS2 partíció törlése -Options => Opciók -Firmware_image => Firmware -Upgrade => Frissítés -Upgrading... => Frissítés folyamatban... - -# 'LAN Settings' page -LAN Settings => Hálózat beállítások -LAN Configuration => Hálózat konfiguráció -Netmask => Hálózati maszk -Default Gateway => Alapértelmezett átjáró -DNS Servers => DNS szerverek -DNS Address => DNS szerver cím - -Note => Megjegyzés - - -# 'WAN Settings' page -WAN Settings => Internet beállítások -WAN Configuration => Internet konfiguráció -PPTP Server IP => PPTP szerver cím -Connection Type => Kapcsolat típusa -No WAN => Nincs internet -DHCP => DHCP -Static IP => Statikus IP konfiguráció -IP Settings => IP beállítások -PPP Settings => PPP beállítások -Redial Policy => Újratárcsázás szabálya -Connect on Demand => Csatlakozás kérés esetén -Keep Alive => Tartsd életben -Maximum Idle Time => Maximum inaktív ídő -Redial Timeout => Újratárcsázási idő -MTU => Maximal Transfer Unit -Username => Felhasználó - - -# 'Wireless Configuration' page -Wireless Configuration => WLAN konfiguráció -Wireless Interface => WLAN interfész -WEP Key => WEP kulcs -Selected WEP Key => Választott WEP kulcs -WPA PSK => WPA PSK -ESSID => ESSID -Channel => Csatorna -RADIUS IP Address => RADIUS szerver cím -RADIUS Server Key => RADIUS szerver kulcs -Enabled => Engedélyezve -Disabled => Tiltva -ESSID Broadcast => ESSID hirdetése (szórása) -Show => Engedélyezve -Hide => Tiltva -WLAN Mode => WLAN mód -Access Point => Access Point -Client => Client -Bridge => Bridge -Ad-Hoc => Ad-Hoc -Encryption Settings => Titkosítás beállítások -Encryption Type => Titkosítás típusa -PSK => PSK -WPA Mode => WPA mód -WPA Algorithms => WPA algoritmus -WEP Keys => WEP kulcsok - - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => WLAN konfiguráció (haladó) -WDS Connections => WDS kapcsolatok -MAC Filter List => MAC Address szürés -Filter Mode => Szürő mód -Allow => Engedélyező -Deny => Tiltó -Set => Beállítás -Settings => Beállítások -Automatic WDS => Automatikus WDS - -# "Hosts" page - -MAC Address => MAC-Address -Configured Hosts => Konfigurált gépek -DHCP Static => Statikus DHCP beállítások -Host Names => Host nevek - - -Up => Fel -Down => Le -Edit => Szerkesztés -Delete => Törlés -Save => Mentés -Cancel => Mégse - -Forward => Továbbít -Accept => Elfogad -Drop => Eldob - -Firewall => Tűzfal -Firewall Rules => Tűzfal szabályok -Firewall Configuration => Tűzfal konfiguráció - -New Rule => Új szabály -Match => Illeszt -Target => Cél -Port => Port - -Protocol => Protokoll -Source IP => Forrás-IP -Destination IP => Cél-IP -Source Ports => Forrás-Portok -Destination Ports => Cél-Portok - -Forward to => Továbbít -Port => Port - -Helptext ESSID => A vezeték nélküli hálózat neve. -Helptext DNS save => Mentsd el a beállításokat, mielőtt ezen az oldalon hozzáadsz ill. eltávolítasz DNS szervert. - -Helptext Operation mode => Ezek a beállítsok a vezeték nélküli hálozat működését határozzák meg. A 'Client (Bridge)' mód a hálózati csatoló beállításait nem módosítja. Csak néhány paramétert állít a vezetéknélküli eszközmeghajtóban, a korlátozott áthidaláshoz. -Helptext Encryption Type => 'WPA (RADIUS)' csak Access-Pont módban támogatott.
'WPA (PSK)' nem működik Ad-Hoc módban. -Helptext IP Settings => IP beállítások opcionálisak a DHCP-hez és a PPTP-hez. Az itt beállított értékek lesznek az alapértelmezettek, ha a DHCP szerver nem elérhető. -Helptext Idle Time => Maximális idő másodpercben internet forgalom nélkül, amennyit a router vár mielőtt bontja a kapcsolatot (csak 'Csatlakozás kérés esetén' módban). -Helptext Redial Timeout => Maximális idő másodpercben az újratárcsázás előtt, ha a szolgáltató nem válaszol. - -# untranslated: -Available packages => Használható csomagok - diff --git a/package/webif/files/usr/lib/webif/lang/it/common.txt b/package/webif/files/usr/lib/webif/lang/it/common.txt deleted file mode 100644 index 8607fac..0000000 --- a/package/webif/files/usr/lib/webif/lang/it/common.txt +++ /dev/null @@ -1,226 +0,0 @@ -lang => Italiano -# Common -Settings saved => Cambiamenti salvati -Settings not saved => Cambiamenti non salvati -Save Changes => Salva cambiamenti -Apply Changes => Applica cambiamenti -Clear Changes => Elimina cambiamenti -Review Changes => Controlla cambiamenti -Host Name => Nome Host -Uptime => Uptime -Load => Caricamento del sistema -Version => Versione -Categories => Categoria -Subcategories => Sottocategoria -more... => altro... -Add => Aggiungi -Remove => Elimina -Warning => Attenzione -Password_warning => non e' stata ancora impostata una password di protezione per il router (accesso web o ssh). Per favore, inseriscine una ora (il nome utente sara': 'root') - -# Categories -Info => Info -About => Ringraziamenti -Router Info => Informazioni del router - -Status => Stato -Connections => Connessioni -DHCP => DHCP -Wireless => Wireless - -System => Sistema -Password => Password -Settings => Configurazione -Installed Software => Programmi installati -Firmware Upgrade => Aggiornamento Firmware - -Network => Rete -LAN => LAN -WAN => Internet -Wireless => Wireless -Advanced Wireless => Wireless (avanzato) -Hosts => Configurazione Host - - -# 'About' page -Copyright => Copyright - -GPL_Text => Questo programma software libero; lecito ridistribuirlo e/o
modificarlo secondo i termini della Licenza Pubblica Generica GNU
come pubblicata dalla Free Software Foundation; o la versione 2 della licenza o (a scelta) una versione successiva. -Contributions by => Contributi -Layout based on => Interfaccia basata su -by => da - - -No config change. => Nessun cambiamento della configurazione. -Config discarded. => I cambiamenti non sono stati accettati. -Config changes: => Cambiamenti configurazione: -Updating config... => Aggiornamento configurazione... - - -# 'Router Info' page -Firmware Version => Versione del firmware -Kernel Version => Versione del Kernel -Current Date/Time => Data/Ora -MAC Address => Indirizzo MAC - - -# 'Connections' page -Connection Status => Stato della connessione -Physical Connections => Connessioni fisiche -Router Connections => Connessioni del router - - -# 'DHCP' page -DHCP leases => lease DHCP -IP Address => Indirizzo IP -Name => Nome -Expires in => Scade il - - -# 'Wireless Status' page -Wireless Status => Stato Wireless - -# 'Password' page -Password Change => Cambio password -New Password => Nuova password -Confirm Password => Confema password - -# 'System Settings' page -System Settings => Parametri di sistema -Host Name => Nome dell'host -Language => Linguaggio - -# 'Installed Software' page -Installed Packages => Pacchetti installati -Update package lists => Aggiorna la lista dei pacchetti -Uninstall => Disinstalla -Install => Installa - - -# 'Firmware Upgrade' page -Firmware format => Formato del firmware -Error => Errore -done => eseguito -Invalid_formt => Formato del firmware invalido -Erase_JFFS2 => Cancella la partizione JFFS2 -Options => Opzioni -Firmware_image => Immagine del firmware -Upgrade => Aggiorna -Upgrading... => Aggiornamento in corso... - -# 'LAN Settings' page -LAN Settings => Parametri LAN -LAN Configuration => Configuzione LAN -Netmask => Netmask -Default Gateway => Default Gateway -DNS Servers => Server DNS -DNS Address => Indirizzo IP del DNS - -Note => Nota - -# 'WAN Settings' page -WAN Settings => Parametri Internet -WAN Configuration => Configurazione Internet -PPTP Server IP => Indirizzo IP del server PPTP -Connection Type => Tipo di connessione -No WAN => No WAN -DHCP => DHCP -Static IP => IP statico -IP Settings => Paramentri IP -PPP Settings => Parametri PPP -Redial Policy => Opzioni di riconnessione -Connect on Demand => Connessione su richiesta -Keep Alive => Connessione permanente -Maximum Idle Time => Tempo di inattivita' massimo -Redial Timeout => Tempo di riconnessione -MTU => MTU (grandezza pacchetti) -Username => Nome utente - - -# 'Wireless Configuration' page -Wireless Configuration => Parametri Wireless -Wireless Interface => Interfaccia Wireless -WEP Key => Chiave WEP -Selected WEP Key => Chiave WEP selezionata -WPA PSK => WPA-PSK -ESSID => ESSID -Channel => Canale -RADIUS IP Address => Indirizzo IP del server RADIUS -RADIUS Server Key => Server Key RADIUS -Enabled => Attivato -Disabled => Disattivato -ESSID Broadcast => SSID Broadcast -Show => Mostra -Hide => Nascondi -WLAN Mode => Modo WLAN -Access Point => Punto di accesso -Client => Client -Bridge => Bridge -Ad-Hoc => Ad-Hoc -Operation mode => Modo di funzionamento -Encryption Settings => Parametri di encryption -Encryption Type => Tipo di encryption -PSK => PSK -WPA Mode => Modo WPA -WPA Algorithms => Algoritmo WPA -WEP Keys => Chiave WEP - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => Configurazione Wireless avanzata -WDS Connections => Connessioni WDS -MAC Filter List => Filtro per indirizzo MAC -Filter Mode => Metodo di filtraggio -Allow => Autorizza -Deny => Nega -Set => Setta -Settings => Parametri -Automatic WDS => WDS Automatico - -# "Hosts" page - -MAC Address => Indirizzo MAC -Configured Hosts => Host configurati -DHCP Static => DHCP Statico -Host Names => Nome Host - -Up => Su -Down => Giu' -Edit => Edita -Delete => Elimina -Save => Salva -Cancel => Cancella - -Forward => Ridirigi -Accept => Accetta -Drop => Scarta - -Firewall => Firewall -Firewall Rules => Regole del Firewall -Firewall Configuration => Configurazione del Firewall - -New Rule => Nuova regola -Match => Filtro -Target => Obiettivo -Port => Porta - -Protocol => Protocollo -Source IP => IP di origine -Destination IP => IP di destinazione -Source Ports => Porta di origine -Destination Ports => Porta di destinazione - -Forward to => Redirigi su -Port => Porta - -Helptext ESSID => SSID -Helptext DNS save => E' consigliabile salvare i cambiamenti prima di aggiungere o eliminare server DNS dalla lista - -Helptext Operation mode => Imposta il metodo di utilizzo della rete wireless. Scegliendo 'Client (bridge)' non cambiera' la configurazione dell'interfaccia di rete. -Helptext Encryption Type => 'WPA (RADIUS)' puo' essere usato solo nel modo Access Point.
'WPA (PSK)' non funziona nel modo Ad-Hoc. -Helptext IP Settings => Le opzioni IP sono opzioni per DHCP e PPTP. -Helptext Idle Time => Numero di secondi che deve aspettare il router prima di disconnettersi. (Solo nel metodo ' Connessione su richiesta'). -Helptext Redial Timeout => Numero di secondi che il router deve aspettare per effettuare una nuova riconnessione. - -# untranslated: -Available packages => Available packages - diff --git a/package/webif/files/usr/lib/webif/lang/nl/common.txt b/package/webif/files/usr/lib/webif/lang/nl/common.txt deleted file mode 100644 index 875ba6c..0000000 --- a/package/webif/files/usr/lib/webif/lang/nl/common.txt +++ /dev/null @@ -1,224 +0,0 @@ -lang => Nederlands -# Common -Settings saved => Instellingen bewaard -Settings not saved => Instellingen niet bewaard -Save Changes => Bewaar wijzigingen -Apply Changes => Gebruik wijzigingen -Clear Changes => Wis wijzigingen -Review Changes => Bekijk wijzigingen -Host Name => Host naam -Uptime => Uptime -Load => Laad -Version => Versie -Categories => Categorie -Subcategories => Subcategorie -more... => meer... -Add => Bijvoegen -Remove => Verwijder -Warning => Waarschuwing -Password_warning => U hebt nog geen wachtwoord ingesteld voor de Web interface en SSH toegang. Gelieve er nu een in te geven (de gebruikersnaam in uw browser zal 'root' zijn). - -# Categories -Info => Info -About => Over -Router Info => Router Info - -Status => Status -Connections => Connecties -DHCP => DHCP -Wireless => Draadloos - -System => Systeem -Password => Wachtwoord -Settings => Instellingen -Installed Software => Geinstalleerde Software -Firmware Upgrade => Firmware Upgrade - -Network => Netwerk -LAN => LAN -WAN => WAN -Wireless => Draadloos -Advanced Wireless => Geavanceerd Draadloos -Hosts => Geconfigureerde Hosts - - -# 'About' page -Copyright => Copyright - -GPL_Text => Dit programma is vrije software; u mag het verdelen en/of wijzigen onder de voorwaarden van GNU General Public License zoals gepubliceerd door de Free Software Foundation; ofwel versie 2 van de licentie, of (volgens Uw keuze) iedere latere versie. - -Contributions by => Bijdragen door -Layout based on => Layout gebasseerd op -by => door - - -No config change. => Er werden geen configuratie wijzigingen aangebracht. -Config discarded. => Uw configuratie wijzigingen werden verworpen. -Config changes: => Huidige configuratie wijzigingen: -Updating config... => Uw configuratie wordt aangepast... - - -# 'Router Info' page -Firmware Version => Firmware Versie -Kernel Version => Kernel Versie -Current Date/Time => Huidige Datum/Tijd -MAC Address => MAC Adres - - -# 'Connections' page -Connection Status => Verbindings Status -Physical Connections => Fysieke Verbindingen -Router Connections => Router Verbindingen - - -# 'DHCP' page -DHCP leases => DHCP leases -IP Address => IP Adres -Name => Naam -Expires in => Vervalt binnen - - -# 'Wireless Status' page -Wireless Status => Draadloos Status - -# 'Password' page -Password Change => Wachtwoord Wijzigen -New Password => Nieuw Wachtwoord -Confirm Password => Bevestig Wachtwoord - -# 'System Settings' page -System Settings => Systeem Instellingen -Host Name => Host naam -Language => Taal - -# 'Installed Software' page -Installed Packages => Geinstalleerde Pakketten -Available packages => Beschikbare pakketten -Update package lists => Aanpassen Pakketlijst -Uninstall => Deinstalleren -Install => Installeren - - -# 'Firmware Upgrade' page -Firmware format => Firmware Formaat -Error => Fout -done => voltooid -Erase_JFFS2 => Wis JFFS2 partitie -Options => Opties -Firmware_image => Firmware image om te laden -Upgrade => Upgrade -Upgrading... => Upgrading... - -# 'LAN Settings' page -LAN Settings => LAN Instellingen -LAN Configuration => LAN Configuratie -Netmask => Netmask -Default Gateway => Standaard Gateway -DNS Servers => DNS Servers -DNS Address => DNS Adres - -Note => Nota - -# 'WAN Settings' page -WAN Settings => WAN Instellingen -WAN Configuration => WAN configuratie -PPTP Server IP => PPTP Server IP -Connection Type => Connectie Type -No WAN => Geen WAN -DHCP => DHCP -Static IP => Statisch IP -IP Settings => IP Instellingen -PPP Settings => PPP Instellingen -Redial Policy => Opnieuw bel beleid -Redial Timeout => Bel vertraging -Connect on Demand => Verbinden op Aanvraag -Keep Alive => Hou actief -Maximum Idle Time => Maximale Idle Time -MTU => MTU -Username => Gebruikersnaam - - -# 'Wireless Configuration' page -Wireless Configuration => Draadloos Configuratie -Wireless Interface => Draadloos Interface -WEP Key => WEP Sleutel -Selected WEP Key => Geselecteerde WEP sleutely -WPA PSK => WPA PSK -ESSID => ESSID -Channel => Kanaal -RADIUS IP Address => RADIUS IP Adres -RADIUS Server Key => RADIUS Server Sleutel -Enabled => Ingeschakeld -Disabled => Uitgeschakeld -ESSID Broadcast => ESSID Broadcast -Show => Toon -Hide => Verberg -WLAN Mode => WLAN Mode -Access Point => Toegangs Punt -# Was "Klant" first which can only be translated as an economical client, i.e. a customer. AFAIK Dutch doesn't provide any true translation for Client in this context -Client => Client -Bridge => Brug -Ad-Hoc => Ad-Hoc -Operation mode => Operation mode -Encryption Settings => Encryptie Instelligen -Encryption Type => Encryptie Type -PSK => PSK -WPA Mode => WPA Mode -WPA Algorithms => WPA Algoritmen -WEP Keys => WEP Sleutels - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => Geavanceerde Draadloze Configuratie -WDS Connections => WDS Verbindingen -MAC Filter List => MAC Filter Lijst -Filter Mode => Filter Mode -Allow => Toelaten -Deny => Weigeren -Set => Stel -Settings => Instellingen -Automatic WDS => Automatische WDS - -# "Hosts" page - -MAC Address => MAC Adres -Configured Hosts => Geconfigureerde Hosts -DHCP Static => DHCP Statisch -Host Names => Host Namen - -Up => Op -Down => Neer -Edit => Wijzig -Delete => Wis -Save => Bewaar -Cancel => Afbreken - -Forward => Doorsturen -Accept => Accepteren -Drop => Negeren - -Firewall => Firewall -Firewall Rules => Firewall Regels -Firewall Configuration => Firewall Configuratie - -New Rule => Nieuwe Regel -Match => Overeenstemmen -Target => Doel -Port => Poort - -Protocol => Protocol -Source IP => Bron IP -Destination IP => Bestemmings IP -Source Ports => Bron Poorten -Destination Ports => Bestemmings Poorten - -Forward to => Doorsturen naar -Port => Poort - -Helptext ESSID => Naam van uw Draadloos Netwerk -Helptext DNS save => U moet de instellingen op deze pagina bewaren alvorens DNS servers te wijzigen/verwijderen - -Helptext Operation mode => Dit stelt de Operatie Mode voor uw draadloos netwerk in. Door 'Client (Brug)' te kiezen zullen uw network interface instellingen niet wijzigen. Er zullen alleen enkele parameters ingesteld worden in de draadloze driver die gelimiteerde overbrugging van de interface mogelijk maakt. -Helptext Encryption Type => 'WPA (RADIUS)' wordt enkel ondersteund in de Toegangs Punt mode.
'WPA (PSK)' werkt niet in Ad-Hoc mode. -Helptext IP Settings => IP instellingen zijn optioneel voor DHCP en PPTP. Indien U ze instelt dan worden ze als standaardwaarden gebruikt indien de DHCP server onbeschikbaar is. -Helptext Idle Time => Het aantal seconden zonder internet verkeer dat de router zou moeten wachten alvorens zich af te sluiten van het Internet (Alleen bij Verbinden op Aanvraag) -Helptext Redial Timeout => Het aantal seconden dat gewacht moet worden alvorens opnieuw een verbinding wordt gemaakt indien deze geweigerd werd door uw ISP. diff --git a/package/webif/files/usr/lib/webif/lang/no/common.txt b/package/webif/files/usr/lib/webif/lang/no/common.txt deleted file mode 100644 index f94684f..0000000 --- a/package/webif/files/usr/lib/webif/lang/no/common.txt +++ /dev/null @@ -1,230 +0,0 @@ -lang => Norsk -# Common -Settings saved => Innstillingene ble lagret -Settings not saved => Innstillingene ble ikke lagret -Save Changes => Lagre endringer -Apply Changes => Aktiver endringer -Clear Changes => Glem endringer -Review Changes => Se endringer -Host Name => Vertsnavn -Uptime => Oppetid -Load => Systembelastning -Version => Versjon -Categories => Kategorier -Subcategories => Underkategorier -more... => mer... -Add => Legg til -Remove => Fjern -Warning => Advarsel -Password_warning => Det er ikke satt et passord på hverken Webadministrasjon eller SSH.
Vennligst velg eller tast inn ditt passord (Brukernavn er 'root' med små bokstaver). - -# Categories -Info => Info -About => Om -Router Info => Routerinformasjon - -Status => Status -Connections => Nettverksforbindelser -DHCP => DHCP -Wireless => Trådløs - -System => System -Password => Passord -Settings => Innstillinger -Installed Software => Installerte programmer -Firmware Upgrade => Firmwareoppgradering - -Network => Nettverk -LAN => Lokalnett -WAN => Internett -Wireless => Trådløs -Advanced Wireless => Avansert trådløs -Hosts => Vertsnavn - - -# 'About' page -Copyright => Opphavsrett - -GPL_Text => Dette programmet er fri programvare. Du må bruke, endre og videredistribuere det under betingelsene i "GNU General Public License",
som offentliggjort av "Free Software Foundation" (Den frie programbevegelse), enten i versjon 2 av lisensen eller (etter ditt valg), en hvilkensomhelst senere versjon. - -Contributions by => Bidrag fra -Layout based on => Layout er basert på -by => av - - -No config change. => Ingen konfigurasjonsendring foretatt -Config discarded. => Konfigurasjonsendringerne ble forkastet -Config changes: => Foreløpige endringer -Updating config... => Oppdaterer konfigurasjonen - -# 'Router Info' page -Firmware Version => Firmwareversjon -Kernel Version => Kjerneversjon -Current Date/Time => Nåværende tid/dato -MAC Address => MAC adresse - - -# 'Connections' page -Connection Status => Forbindelsesstatus -Physical Connections => Fysiske forbindelser -Router Connections => Routerens forbindelser - - -# 'DHCP' page -DHCP leases => DHCP leasinger -IP Address => IP adresse -Name => Navn -Expires in => Utløpstid - - -# 'Wireless Status' page -Wireless Status => Trådløs status - -# 'Password' page -Password Change => Endre passord -New Password => Nytt passord -Confirm Password => Nytt passord igjen - -# 'System Settings' page -System Settings => Systeminnstillinger -Host Name => Vertsnavn -Language => Språk - -# 'Installed Software' page -Installed Packages => Installerte pakker -Update package lists => Oppdater pakkelisten -Uninstall => Avinstaller -Install => Installer -Available packages => Tilgjengelige pakker - - -# 'Firmware Upgrade' page -Firmware format => Firmwareformat -Error => Feil -done => ferdig -Invalid_format => Ugyldig_format -Erase_JFFS2 => Slett_JFFS2_partisjonen -Options => Alternativer -Firmware_image => Firmwarefil -Upgrade => Oppgrader -Upgrading... => Oppgraderer... - -# 'LAN Settings' page -LAN Settings => Lokale nettinnstillinger -LAN Configuration => Lokal nettverkskonfigurasjon -Netmask => Undernettmaske -Default Gateway => Standard gateway -DNS Servers => DNS-tjenere -DNS Address => DNS-tjeneradresse - -Note => Merk - - -# 'WAN Settings' page -WAN Settings => WAN-innstillinger -WAN Configuration => WAN-konfigurasjon -PPTP Server IP => PPTP-tjeneradresse -Connection Type => Forbindelsestype -No WAN => Ingen WAN -DHCP => DHCP -Static IP => Statisk IP -IP Settings => IP-innstillinger -PPP Settings => PPP-innstillinger -Redial Policy => Gjenoppringingspolise -Connect on Demand => Ring opp når behovet er der -Keep Alive => Hold forbindelsen i live (keep alive) -Maximum Idle Time => Maksimal tid i tomgang (max idle) -Redial Timeout => Gjenoppringningsavbrekkstid -MTU => MTU -Username => Brukernavn - - -# 'Wireless Configuration' page -Wireless Configuration => Trådløs konfigurasjon -Wireless Interface => Trådløst nettkort -WEP Key => WEP nøkler -Selected WEP Key => Valgt WEP nøkkel -WPA PSK => WPA nøkler -ESSID => ESSID -Channel => Kanal -RADIUS IP Address => IP adressen på RADIUS server -RADIUS Server Key => Passord til RADIUS server -Enabled => Aktivert -Disabled => Deaktivert -ESSID Broadcast => ESSID-Kringkasting -Show => Vis -Hide => Skjul -WLAN Mode => Trådløs tilstand -Access Point => Tilgangspunkt -Client => Klient -Bridge => Bro -Ad-Hoc => Ad-Hoc -Encryption Settings => Krypteringsinnstillinger -Encryption Type => Krypteringstype -PSK => PSK-kode -WPA Mode => WPA tilstand -WPA Algorithms => WPA krypteringsalgoritme -WEP Keys => WEP nøkler - - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => Avansert oppsett av trådløs -WDS Connections => WDS forbindelser (WDS repeater) -MAC Filter List => Filteringsliste (MAC-nummer) -Filter Mode => Filtreringstilstand -Allow => Tillat -Deny => Forby -Set => Sett -Settings => Innstillinger -Automatic WDS => Automatisk WDS-forbindelse - -# "Hosts" page - -MAC Address => MAC-adresse -Configured Hosts => Vertsnavn -DHCP Static => Statiske IP adresser til DHCP -Host Names => Vertsnavn - - -Up => Opp -Down => Ned -Edit => Endre -Delete => Slette -Save => Lagre -Cancel => Annuller - -Forward => Forward (videresend) -Accept => Accept (tillat) -Drop => Drop (kast) - -Firewall => Brannmur -Firewall Rules => Brannmurregler -Firewall Configuration => Brannmurkonfigurasjon - -New Rule => Ny regel -Match => Match (sammenlign) -Target => Target (Gå til) -Port => Port - -Protocol => Protokoll -Source IP => Avsenders IP -Destination IP => Mottakers IP -Source Ports => Avsenders porter -Destination Ports => Mottakers porter - -Forward to => Send videre til -Port => Port - -Helptext ESSID => Navn på trådløs nettverk -Helptext DNS save => Lagre endringer på denne siden før du legger til eller fjerner DNS-tjenere (Hvis du ikke vil miste dem.) - -Helptext Operation mode => Setter driftstilstanden for den trådløse delen av routeren. 'Klient' og 'Klient (bro)' brukes for å koble 2 trådløse routere. I mange tilfeller er WDS en bedre (men mer avansert) løning. 'Klient' utnytter dog båndbredden best, hvis du kun har en maskin tilkoblet.
Innstillingen 'Klient (bro)' endrer ikke direkte ved nettverksinnstillingene. Det er et lite 'hack' som få routeren til å tro at kun en maskin (en MAC-adresse) er tilkoblet. Det er gjort for å overvinne begrensninger i 802.11-protokollen, som forhindrer at man problemfritt (i vanlig 'Klient'-tilstand) kan bruke den trådløse forbindelsen fra flere maskiner samtidig.
AP brukes til en standalone router, hvor f.eks bærbare pc'er skal ha tilgang til Internett og/eller lokalt nettverk.
Hvis du ikke vet hva 'Ad Hoc'-tilstanden gjø, har du sannsynligvis ikke bruk for den. - -Helptext Encryption Type => 'WPA (RADIUS)' er kun støttet i AP (Tilgangspunkt)-tilstand.
'WPA (PSK)' fungerer ikke i 'Ad-Hoc' tilstand. - -Helptext IP Settings => IP-innstillinger er frivillig for DHCP og PPTP. Nå de er satt, blir de brukt som standardverdier hvis en DHCP-tjener ikke er tilgjengelig. - -Helptext Idle Time => Ventetid med inaktivitet før routeren kobler ned forbindelesen. - -Helptext Redial Timeout => Ventetid før routeren forsøker å ringe opp igjen. - diff --git a/package/webif/files/usr/lib/webif/lang/pl/common.txt b/package/webif/files/usr/lib/webif/lang/pl/common.txt deleted file mode 100644 index c01b20c..0000000 --- a/package/webif/files/usr/lib/webif/lang/pl/common.txt +++ /dev/null @@ -1,228 +0,0 @@ -lang => Polski -# Common -Settings saved => Ustawienia zostały zapisane -Settings not saved => Ustawienia niezostały zapisane -Save Changes => Zapisz zmiany -Apply Changes => Zastosuj zmiany -Clear Changes => Czyść zmiany -Review Changes => Przejżyj zmiany -Host Name => Hostname -Uptime => Czas pracy -Load => Obciążenie -Version => Wersja -Categories => Kategorie -Subcategories => Podkategorie -more... => Więcej Informacji... -Add => Dodaj -Remove => Usuń -Warning => Uwaga -Password_warning => Niemasz ustawionego hasła dostępu do WWW oraz SSH
Prosze wpisz je teraz(nazwa użytkownika to 'root') - -# Categories -Info => Info -About => O Autorze -Router Info => Info o WRT - -Status => Status -Connections => Połaczenia -DHCP => DHCP -Wireless => WLAN - -System => System -Password => Hasło -Settings => Ustawienia -Installed Software => Zainstalowane pakiety -Firmware Upgrade => Aktualizacja opr. - -Network => Sieć -LAN => LAN -WAN => Internet(WAN) -Wireless => WLAN -Advanced Wireless => Zaawansowane WLAN -Hosts => Konfiguracja Hostów - - -# 'About' page -Copyright => Copyright - -GPL_Text => This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version. -Contributions by => Wspólpracownicy -Layout based on => Layout bazuje na -by => by - - -No config change. => Nie dokonano zmian. -Config discarded. => Zmiany zostały anulowane. -Config changes: => Aktualna konfiguracja: -Updating config... => Aktualizacja konfiguracji... - - -# 'Router Info' page -Firmware Version => Wersja Opr. -Kernel Version => Wersja kernela -Current Date/Time => Aktualna Data/Czas -MAC Address => Adres MAC - - -# 'Connections' page -Connection Status => Stan połaczeń -Physical Connections => Połączenia fizyczne -Router Connections => Połączenia do routera - - -# 'DHCP' page -DHCP leases => Dzierżawa DHCP -IP Address => Adres IP -Name => Nazwa -Expires in => Wygasa za - - -# 'Wireless Status' page -Wireless Status => Status WLAN - -# 'Password' page -Password Change => Zmien hasło -New Password => Nowe hasło -Confirm Password => Potwierdz hasło - -# 'System Settings' page -System Settings => Ustawienia Systemu -Host Name => Hostname -Language => Język - -# 'Installed Software' page -Installed Packages => Zainstalowane pakiety -Update package lists => Aktualizuj liste pakietów -Uninstall => Usuń -Install => Instaluj - - -# 'Firmware Upgrade' page -Firmware format => Format pliku firmware -Error => Błąd -done => Gotowe -Invalid_format => Błędny format firmware -Erase_JFFS2 => Formatuj JFFS2 -Options => Opcje -Firmware_image => Obraz FW: -Upgrade => Aktualizuj -Upgrading... => Aktualizuje... - -# 'LAN Settings' page -LAN Settings => Ustawienia LAN -LAN Configuration => Konfiguracja LAN -Netmask => Maska sieci -Default Gateway => Brama domyślna -DNS Servers => Serwer DNS -DNS Address => Adres DNS - -Note => Notatka - - -# 'WAN Settings' page -WAN Settings => Ustawienia WAN -WAN Configuration => Konfiguracja WAN -PPTP Server IP => Adres serwera PPTP -Connection Type => Połaczenie -No WAN => Bez WAN -DHCP => DHCP -Static IP => Statyczne IP -IP Settings => Ustawienia IP -PPP Settings => Ustawienia PPP -Redial Policy => Rodzaj wydzwaniania -Connect on Demand => Połączenia na żadanie -Keep Alive => Trzymaj połączenie -Maximum Idle Time => Max. czas bezczynności - -MTU => MTU -Username => Nazwa uzyt. - - -# 'Wireless Configuration' page -Wireless Configuration => WLAN-Konfiguracja -Wireless Interface => Intefejs WLAN -WEP Key => Klucz WEP -Selected WEP Key => Wybrany klucz WEP -WPA PSK => WPA PSK -ESSID => ESSID -Channel => Kanał -RADIUS IP Address => Adres IP RADIUS -RADIUS Server Key => Klucz RADIUS -Enabled => Właczone -Disabled => Wyłączone -ESSID Broadcast => Rozsyłanie ESSID -Show => Pokaż -Hide => Ukryj -WLAN Mode => Tryb Radiowy -Access Point => Punkt Dostępowy -Client => Klient -Bridge => Most -Ad-Hoc => Ad-Hoc -Encryption Settings => Ustawienia kodowania -Encryption Type => Rodzaj kodowania -PSK => PSK -WPA Mode => Tryb WPA -WPA Algorithms => Algorytm WPA -WEP Keys => Klucze WEP - - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => Zaawansowane WLAN -WDS Connections => Połączenie WDS -MAC Filter List => Filtrowanie MAC -Filter Mode => Rodzaj filtra -Allow => Udzielaj dostępu -Deny => Odrzucaj dostęp -Set => Ustaw -Settings => Ustawienia -Automatic WDS => Automatyczny WDS - -# "Hosts" page - -MAC Address => Adres MAC -Configured Hosts => Konfiguracja Hostów -DHCP Static => Statyczne DHCP -Host Names => Lista Hostów - - -Up => W górę -Down => W dół -Edit => Edytuj -Delete => Kasuj -Save => Zapisz -Cancel => Anuluj - -Forward => Przekieruj -Accept => Akceptuj -Drop => Odrzuć - -Firewall => Firewall -Firewall Rules => Reguły Firewalla -Firewall Configuration => Konfiguracja Firewalla - -New Rule => Nowa reguła -Match => Dotyczy -Target => Cel -Port => Port - -Protocol => Protokół -Source IP => IP żródłowe -Destination IP => IP docelowe -Source Ports => Port żródłowy -Destination Ports => Port docelowy - -Forward to => Przekieruj do -Port => Port - -Helptext ESSID => Nazwa sieci radiowej -Helptext DNS save => Musisz zapisać ustawienia przed dodaniem/usunięciem serwera DNS - -Helptext Operation mode => Umożliwia wybór pracy urządzenia. -Helptext Encryption Type => 'WPA (RADIUS)' działa tylko w trybie Access Point
'WPA (PSK)' nie działa w trybie Ad-Hoc. -Helptext IP Settings => Ustawienia numeru IP dla DHCP i PPTP jest niekonieczne. Jeżeli je ustawisz, będa używane jako domyślnje w przypadku , gdy serwer DHCP bedzie niedostępny. -Helptext Idle Time => Czas w sekundach bezruchu internetowego, po upływie których następuje rozłaczenie (tylko Połączenie na ządanie) -Helptext Redial Timeout => Liczba sekund, które trzeba odczekac po tym, jak nie otrzymales odpowiedzi od providera (przed ponowna proba podlaczenia) - -# untranslated: -Available packages => Available packages - diff --git a/package/webif/files/usr/lib/webif/lang/pt/common.txt b/package/webif/files/usr/lib/webif/lang/pt/common.txt deleted file mode 100644 index 2fb4693..0000000 --- a/package/webif/files/usr/lib/webif/lang/pt/common.txt +++ /dev/null @@ -1,454 +0,0 @@ -lang => Português - -# Common - -Settings saved => Alterações guardadas - -Settings not saved => Alterações não foram guardadas - -Save Changes => Guardar alterações - -Apply Changes => Aplicar alterações - -Clear Changes => Eliminar alterações - -Review Changes => Verificar alterações - -Host Name => Nome do sistema - -Uptime => Uptime - -Load => Carga do sistema - -Version => Versão - -Categories => Categorias - -Subcategories => Subcategorias - -more... => mais - -Add => Adicionar - -Remove => Eliminar - -Warning => Atenção - -Password_warning => Não foi estabelecida uma palavra-chave para o acesso ao router (acesso web e ssh). Por favor, estabeleça uma palavra-chave agora (o nome de utilizador será ‘root’) - - - -# Categories - -Info => Informação - -About => Acerca de - -Router Info => Informações do router - - - -Status => Estado - -Connections => Ligações - -DHCP => DHCP - -Wireless => Wi-Fi - - - -System => Sistema - -Password => Palavra-chave - -Settings => Configurações - -Installed Software => Software instalado - -Firmware Upgrade => Actualizar Firmware - - - -Network => Rede - -LAN => LAN - -WAN => Internet - -Wireless => Rede sem fios - -Advanced Wireless => Rede sem fios (avançado) - -Hosts => Configuração de sistemas (hosts) - - - - - -# 'About' page - -Copyright => Copyright - - - -GPL_Text => Este programa é livre e poderá ser distribuído e/ou
modificado segundo os termos da licença GPL (General Public License)
tal como publicada pela Free Software Foundation como está publicada por la Free Sofware Foundation; quer pela versão 2
quer por qualquer versão posterior (à sua escolha). - -Contributions by => Contribuidores - -Layout based on => Layout baseado em - -by => por - - - - - -No config change. => Não existem alterações de configurações. - -Config discarded. => As alterações foram ignoradas. - -Config changes: => Configuração actual: - -Updating config... => Actualizando as alterações... - - - - - -# 'Router Info' page - -Firmware Version => Versão do firmware - -Kernel Version => Versão do Kernel - -Current Date/Time => Data/Hora - -MAC Address => Endereço MAC - - - - - -# 'Connections' page - -Connection Status => Estado das ligações - -Physical Connections => Ligações físicas - -Router Connections => Ligações do router - - - - - -# 'DHCP' page - -DHCP leases => Préstimos de DHCP - -IP Address => Endereço IP - -Name => Nome - -Expires in => Expira em - - - - - -# 'Wireless Status' page - -Wireless Status => Estado da rede sem fios - - - -# 'Password' page - -Password Change => Alteração da palavra-chave - -New Password => Nova palavra-chave - -Confirm Password => Confirme a palavra-chave - - - -# 'System Settings' page - -System Settings => Parâmetros do sistema - -Host Name => Nome do sistema - -Language => Idioma - - - -# 'Installed Software' page - -Installed Packages => Pacotes (packages) instalados - -Update package lists => Actualização da lista de pacotes - -Uninstall => Remover - -Install => Instalar - -Available packages => Pacotes disponíveis - - - - - -# 'Firmware Upgrade' page - -Firmware format => Formato do firmware - -Error => Erro - -done => terminado - -Invalid_formt => Formato de firmware inválido - -Erase_JFFS2 => Apagar partição JFFS2 - -Options => Opções - -Firmware_image => Ficheiro de firmware - -Upgrade => Actualizar - -Upgrading... => Actualizando... - - - -# 'LAN Settings' page - -LAN Settings => Configurações da LAN (rede local) - -LAN Configuration => Parâmetros LAN - -Netmask => Máscara da sub rede (netmask) - -Default Gateway => Gateway - -DNS Servers => Servidor DNS - -DNS Address => Endereço IP do DNS - - - -Note => Nota - - - -# 'WAN Settings' page - -WAN Settings => Configurações Internet - -WAN Configuration => Parâmetros de Internet - -PPTP Server IP => Endereço IP do servidor PPTP - -Connection Type => Tipo de ligação - -No WAN => Sem ligação à Internet - -DHCP => DHCP - -Static IP => IP estático - -IP Settings => Configurações IP - -PPP Settings => Configurações PPP - -Redial Policy => Opções de restabelecimento da ligação - -Connect on Demand => Ligar quando necessário - -Keep Alive => Manter ligação sempre activa - -Maximum Idle Time => Tempo máximo de inactividade - -Redial Timeout => Tempo de restabelecimento da ligação - -MTU => MTU (tamanho dos pacotes) - -Username => Nome do utilizador - - - - - -# 'Wireless Configuration' page - -Wireless Configuration => Configurações rede sem fios - -Wireless Interface => Interface rede sem fios - -WEP Key => Chave WEP - -Selected WEP Key => Palavra-chave WEP seleccionada - -WPA PSK => WPA-PSK - -ESSID => ESSID - -Channel => Canal - -RADIUS IP Address => Endereço IP do servidor RADIUS - -RADIUS Server Key => Palavra-chave RADIUS - -Enabled => Activo - -Disabled => Inactivo - -ESSID Broadcast => Difusão do SSID - -Show => Mostrar - -Hide => Ocultar - -WLAN Mode => Modo rede sem fios - -Access Point => Ponto de acesso - -Client => Cliente - -Bridge => Ponte (Bridge) - -Ad-Hoc => Ad-Hoc - -Operation mode => Modo de funcionamento - -Encryption Settings => Parâmetros de encriptação - -Encryption Type => Tipo de encriptação - -PSK => PSK - -WPA Mode => Modo WPA - -WPA Algorithms => Algoritmos WPA - -WEP Keys => Palavra-chave WEP - - - -# 'Advanced Wireless Configuration' page - -Advanced Wireless Configuration => Configurações rede sem fios (avançadas) - -WDS Connections => Ligações WDS - -MAC Filter List => Filtrar por endereço MAC - -Filter Mode => Tipo de filtro - -Allow => Autorizar - -Deny => Negar - -Set => Estabelecer - -Settings => Parâmetros - -Automatic WDS => WDS automático - - - -# "Hosts" page - - - -MAC Address => Endereço MAC - -Configured Hosts => Sistemas configurados - -DHCP Static => DHCP estático - -Host Names => Nome dos sistemas - - - -Up => Subir - -Down => Baixar - -Edit => Editar - -Delete => eliminar - -Save => Guardar - -Cancel => Cancelar - - - -Forward => Redireccionar - -Accept => Aceitar - -Drop => Descartar - - - -Firewall => Firewall - -Firewall Rules => Regras da Firewall - -Firewall Configuration => Configurações da Firewall - - - -New Rule => Nova regra - -Match => Filtrar - -Target => Destino - -Port => Porta - - - -Protocol => Protocolo - -Source IP => IP de origem - -Destination IP => IP de destino - -Source Ports => Portas de origem - -Destination Ports => Portas de destino - - - -Forward to => Redireccionar para - -Port => Porta - - - -Helptext ESSID => SSID - -Helptext DNS save => É recomendável guardar as alterações antes de adicionar ou eliminar servidores DNS - - - -Helptext Operation mode => Estabelece o modo de operação da rede sem fios. Escolhendo ‘Client (bridge)’ não altera a configuração da interface de rede. Irá simplesmente configurar alguns parâmetros da rede sem fios para operar em modo ponte (bridge). - - - -Helptext Encryption Type => 'WPA (RADIUS)' só pode ser usado em modo ‘Ponto de acesso’.
'WPA (PSK)' não funciona em modo Ad-Hoc. - - - -Helptext IP Settings => As opções IP são opcionais para os modos DHCP e PPTP. Apenas serão usadas caso alguma das configurações automática falhe - -. - -Helptext Idle Time => Número de segundos sem actividade na Internet que o router deve esperar antes de se desligar da Internet. - -(Apenas para o modo ‘Ligar quando necessário’ (connect on demand)) - - -Helptext Redial Timeout => Número de segundo sem receber resposta que o router deve esperar para voltar a estabelecer ligação à Internet. \ No newline at end of file diff --git a/package/webif/files/usr/lib/webif/lang/ru/common.txt b/package/webif/files/usr/lib/webif/lang/ru/common.txt deleted file mode 100644 index 1d490bd..0000000 --- a/package/webif/files/usr/lib/webif/lang/ru/common.txt +++ /dev/null @@ -1,223 +0,0 @@ -lang => Русский -# Common -Settings saved => Настройки сохранены -Settings not saved => Настройки не сохранены -Save Changes => Сохранить настройки -Apply Changes => Применить изменения -Clear Changes => Отменить изменения -Review Changes => Пересмотреть изменения -Host Name => Имя узла -Uptime => Время работы -Load => Загрузка -Version => Версия -Categories => Категории -Subcategories => Подкатегории -more... => далее... -Add => Добавить -Remove => Удалить -Warning => Предупреждение -Password_warning => Пароль для веб-интерфейса и доступа по SSH не задан
Введите новый пароль (имя пользователя в web-интерфейсе: 'root'). - -# Categories -Info => Информация -About => О системе -Router Info => Маршрутизатор - -Status => Статус -Connections => Соединения -DHCP => DHCP -Wireless => Беспроводная сеть - -System => Система -Password => Пароль -Settings => Настройки -Installed Software => Установленные пакеты -Firmware Upgrade => Обновление прошивки - -Network => Сеть -LAN => Локальная -WAN => Внешняя -Wireless => Беспроводная -Advanced Wireless => Беспроводная (подробнее) -Hosts => Узлы - - -# 'About' page -Copyright => Copyright - -GPL_Text => Это свободное программное обеспечение. Оно распространяется и модифицируется в соответствии с лицензией GNU General Public License,
опубликованной Free Software Foundation; версии 2 или по усмотрению пользователя любой более поздней версии. -Contributions by => Помощники -Layout based on => Дизайнер -by => от - - -No config change. => Конфигурация не изменялась. -Config discarded. => Конфигурация отклонена. -Config changes: => Изменение конфигурации: -Updating config... => Обновление конфигурации... - - -# 'Router Info' page -Firmware Version => Версия прошивки -Kernel Version => Версия ядра -Current Date/Time => Время и дата -MAC Address => MAC-адрес - -# 'Connections' page -Connection Status => Соединение -Physical Connections => Аппаратные соединения -Router Connections => Программные соединения маршрутизатора - - -# 'DHCP' page -DHCP leases => DHCP клиенты -IP Address => IP адрес -Name => Имя -Expires in => Истекает - - -# 'Wireless Status' page -Wireless Status => Беспроводная сеть - -# 'Password' page -Password Change => Изменить пароль -New Password => Новый пароль -Confirm Password => Подтверждение пароля - -# 'System Settings' page -System Settings => Настройки системы -Host Name => Имя узла -Language => Язык - -# 'Installed Software' page -Installed Packages => Установленные пакеты -Update package lists => Обновить список пакетов -Available packages => Доступные пакеты -Uninstall => Удалить -Install => Установить - - -# 'Firmware Upgrade' page -Firmware format => Формат прошивки -Error => Ошибка -done => готово -Invalid_format => Неизвестный формат прошивки -Erase_JFFS2 => Очистить раздел jffs2 -Options => Параметры -Firmware_image => Образ прошивки: -Upgrade => Обновить -Upgrading... => Обновление... - -# 'LAN Settings' page -LAN Settings => Настройки сети -LAN Configuration => Конфигурация сети -Netmask => Маска подсети -Default Gateway => Шлюз по умолчанию -DNS Servers => сервера DNS -DNS Address => адрес DNS - -Note => Заметка - - -# 'WAN Settings' page -WAN Settings => Настройки внешней сети -WAN Configuration => Конфигурация внешней сети -PPTP Server IP => адрес IP сервера PPTP -Connection Type => Тип соединения -No WAN => Нет внешней сети -DHCP => DHCP -Static IP => Статический IP -IP Settings => Настройки IP -PPP Settings => Настройки PPP -Redial Policy => Разрыв соединения -Connect on Demand => Соединяться по требованию -Keep Alive => Поддерживать связь -Maximum Idle Time => Наибольшее время простоя -Redial Timeout => Задержка перед повторным соединением -MTU => MTU -Username => Имя пользователя - - -# 'Wireless Configuration' page -Wireless Configuration => Конфигурация беспроводной сети -Wireless Interface => Беспроводной интерфейс -WEP Key => Ключ WEP -Selected WEP Key => Выбранный ключ WEP -WPA PSK => WPA разделяемый ключ -ESSID => ESSID -Channel => Канал -RADIUS IP Address => Адрес IP сервера RADIUS -RADIUS Server Key => Ключ сервера RADIUS -Enabled => Включён -Disabled => Выключен -ESSID Broadcast => Вещание ESSID -Show => Показать -Hide => Спрятать -WLAN Mode => Режим беспроводной сети -Access Point => Точка доступа -Client => Клиент -Bridge => Мост -Ad-Hoc => По запросу -Encryption Settings => Настройки безопасности -Encryption Type => Тип шифрования -PSK => Пароль -WPA Mode => Режим WPA -WPA Algorithms => Алгоритм WPA -WEP Keys => WEP ключи - - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => Расширенная конфигурация беспроводной сети -WDS Connections => Соединение WDS -MAC Filter List => Фильтр MAC-адресов -Filter Mode => режим фильтра -Allow => Пропустить -Deny => Отклонить -Set => Установить -Settings => Настройки -Automatic WDS => Автоматический WDS - -# "Hosts" page - -MAC Address => MAC-адрес -Configured Hosts => Настроенные узлы -DHCP Static => Статический DHCP -Host Names => Имена узлов - - -Up => Вверх -Down => Вниз -Edit => Правка -Delete => Удалить -Save => Сохранить -Cancel => Отменить - -Forward => Перенаправить -Accept => Принять -Drop => Отклонить - -Firewall => Сетевой экран -Firewall Rules => Правила сетевого экрана -Firewall Configuration => Настройки сетевого экрана - -New Rule => Новое правило -Match => Фильтр -Target => Цель -Port => Порт - -Protocol => Протокол -Source IP => IP отправителя -Destination IP => IP получателя -Source Ports => Порты отправителя -Destination Ports => Порты получателя - -Forward to => Перенаправить на -Port => Порт - -Helptext ESSID => Имя беспроводной сети -Helptext DNS save => Нужно сохранить настройки на этой странице перед правкой DNS серверов. -Helptext Operation mode => Эта настройка задаёт режим работы беспроводной сети. Выбор 'Клиент или Мост' неповлияет на настройки сетевого интерфейса. Будут обновлены только некоторые параметры драйвера беспроводной сети, который позволят маршрутизацию пакетов с этого интерфейса. -Helptext Encryption Type => 'WPA (RADIUS)' поддерживается только в режиме точки доступа
'WPA (PSK)' не работает в режиме по запросу. -Helptext IP Settings => Настройки IP могут не задаваться в режимах DHCP и PPTP. Если DHCP сервер будет недоступен, будут использоваться заданные настройки. -Helptext Idle Time => Промежуток времени в секундах по истечению которого соединение будет разорвано, если данные не передовались по внешнему интерфейсу (используется только в режиме соединения по запросу). -Helptext Redial Timeout => Задержка в секундах перед попыткой установки повторного соединения с провайдером. diff --git a/package/webif/files/usr/lib/webif/lang/se/common.txt b/package/webif/files/usr/lib/webif/lang/se/common.txt deleted file mode 100644 index 1c019f5..0000000 --- a/package/webif/files/usr/lib/webif/lang/se/common.txt +++ /dev/null @@ -1,223 +0,0 @@ -lang => Svenska -# Common -Settings saved => Inställningar sparade -Settings not saved => Inställningar inte sparade -Save Changes => Spara förändringar -Apply Changes => Applicera förändringar -Clear Changes => Ta bort förändringar -Review Changes => Se gjorda förändringar -Host Name => Värdnamn -Uptime => Tid uppe -Load => Ladda -Version => Version -Categories => Kategorier -Subcategories => Underkategorier -more... => mer... -Add => Lägg till -Remove => Ta bort -Warning => Varning -Password_warning => Du har inte satt något lösenord för Web-gränssnittet och SSH accessen
Var vänlig och gör detta nu (användarnamnet i din browser kommer vara 'root'). -# Categories -Info => Info -About => Om -Router Info => Router Info - -Status => Status -Connections => Anslutningar -DHCP => DHCP -Wireless => Trådlös - -System => System -Password => Lösenord -Settings => Inställningar -Installed Software => Installerad mjukvara -Firmware Upgrade => Firmware uppgradering - -Network => Nätverk -LAN => LAN -WAN => WAN -Wireless => Trådlös -Advanced Wireless => Avancerad Trådlös -Hosts => Konfigurerade Värdar - - -# 'About' page -Copyright => Copyright - -GPL_Text => Detta program är öppen programvara; du kan återdistribuera den och/eller
modifiera den under villkoren av bestämmelserna i GNU General Public License
publicerad av Free Software Foundation; antingen version 2
av licensen eller senare.
-Contributions by => Bidrag av -Layout based on => Layout baserad på -by => av - - -No config change. => Inga ändringar i inställningarna gjordes. -Config discarded. => Dina ändringar i inställningarna har avbrutits. -Config changes: => Nuvarande ändringar i inställningarna: -Updating config... => Uppdaterar dina inställningar... - -# 'Router Info' page -Firmware Version => Firmware Version -Kernel Version => Kernel Version -Current Date/Time => Nuvarande Datum/Tid -MAC Address => Mac Adress - - -# 'Connections' page -Connection Status => Anslutningsstatus -Physical Connections => Fysiska anslutningar -Router Connections => Router anslutningar - - -# 'DHCP' page -DHCP leases => DHCP leases -IP Address => IP Adress -Name => Namn -Expires in => Utgår om - - -# 'Wireless Status' page -Wireless Status => Trådlös Status - -# 'Password' page -Password Change => Byt lösenord -New Password => Nytt lösenord -Confirm Password => Bekräfta nytt lösenord - -# 'System Settings' page -System Settings => System Inställningar -Host Name => Värdnamn -Language => Språk - -# 'Installed Software' page -Installed Packages => Installerade mjukvaror -Update package lists => Uppdatera mjukvarulista -Uninstall => Avinstallera -Install => Installera - - -# 'Firmware Upgrade' page -Firmware format => Firmware format -Error => Fel -done => utförd -Invalid_formt => Felaktigt Firmware Format -Erase_JFFS2 => Ta bort JFFS2 partition -Options => Möjligheter -Firmware_image => Firmware att ladda upp -Upgrade => Uppgradering -Upgrading... => Uppgradering... - -# 'LAN Settings' page -LAN Settings => LAN Inställningar -LAN Configuration => LAN Inställningar -Netmask => Netmask -Default Gateway => Default Gateway -DNS Servers => DNS Servrar -DNS Address => DNS Adress - -Note => Noteringar - -# 'WAN Settings' page -WAN Settings => WAN Inställningar -WAN Configuration => WAN Inställningar -PPTP Server IP => PPTP Server IP -Connection Type => Anslutningstyp -No WAN => Ingen -DHCP => DHCP -Static IP => Statisk IP -IP Settings => IP Inställningar -PPP Settings => PPP Inställningar -Redial Policy => Återuppringsnings Policy -Connect on Demand => Anslut på begäran -Keep Alive => Håll levande -Maximum Idle Time => Maximum tid i vila -Redial Timeout => Timeout för återuppringning -MTU => MTU -Username => Användarnamn - -# 'Wireless Configuration' page -Wireless Configuration => Trådlösa Inställningar -Wireless Interface => Trådlöst Gränssnitt -WEP Key => WEP Nyckel -Selected WEP Key => Vald WEP Nyckel -WPA PSK => WPA PSK -ESSID => ESSID -Channel => Kanal -RADIUS IP Address => RADIUS IP Adress -RADIUS Server Key => RADIUS Server Nyckel -Enabled => Påsatt -Disabled => Avstängd -ESSID Broadcast => ESSID Broadcast -Show => Visa -Hide => Göm -WLAN Mode => WLAN Läge -Access Point => Accesspunkt -Client => Klient -Bridge => Brygga -Ad-Hoc => Ad-Hoc -Operation mode => Tillståndsläge -Encryption Settings => Krypteringsinställningar -Encryption Type => Krypteringstyp -PSK => PSK -WPA Mode => WPA Läge -WPA Algorithms => WPA Algoritmer -WEP Keys => WEP Nyckel - -# 'Advanced Wireless Configuration' page -Advanced Wireless Configuration => Avancerad Trådlös Inställning -WDS Connections => WDS Anslutningar -MAC Filter List => MAC Filter Lista -Filter Mode => Filterläge -Allow => Tillåt -Deny => Neka -Set => Sätt -Settings => Settings -Automatic WDS => Automatisk WDS - -# "Hosts" page - -MAC Address => MAC Adress -Configured Hosts => Konfigurerade Värdar -DHCP Static => Statisk DHCP -Host Names => Värdnamn - -Up => Upp -Down => Ned -Edit => Editera -Delete => Ta bort -Save => Spara -Cancel => Avbryt - -Forward => Framåt -Accept => Acceptera -Drop => Tappa - -Firewall => Brandvägg -Firewall Rules => Brandväggsregler -Firewall Configuration => Brandväggsinställningar - -New Rule => Ny Regel -Match => Match -Target => Mål -Port => Port - -Protocol => Protokoll -Source IP => Käll IP -Destination IP => Destinations IP -Source Ports => Källport -Destination Ports => Destinationsport - -Forward to => Skicka till -Port => Port - -Helptext ESSID => Namn på ditt trådlösa Nätverk -Helptext DNS save => Du bör spara dina inställningar på denna sida före du lägger till/tar bort DNS servrar - -Helptext Operation mode => Detta sätter lägesinställningen för ditt trådlösa nätverk. Att välja 'Klient (Brygga)' kommer inte ändra ditt nätverks gränssnittsinställningar. Det kommer endast att sätta några parametrar i drivrutinerna som tillåter en begränsad bryggning av gränssnittet. -Helptext Encryption Type => 'WPA (RADIUS)' stödjs endast i Accesspunktsläge.
'WPA (PSK)' fungerar inte i Ad-Hoc läge. -Helptext IP Settings => IP inställningar är inte obligatoriska för DHCP och PPTP. Om du sätter dem så används de som standard om DHCP-servern inte är tillgänlig. -Helptext Idle Time => Antalet sekunder utan internet trafik som routern skall vänta på innan den frånkopplar sig från Internet. (Anslut endast på begäran) -Helptext Redial Timeout => Antalet sekunder att vänta i innan försök till ny uppkoppling görs. (om ingen kontakt kunnat upprättas med tillhandahållaren) - -# untranslated: -Available packages => Available packages - diff --git a/package/webif/files/usr/lib/webif/languages.awk b/package/webif/files/usr/lib/webif/languages.awk deleted file mode 100644 index f0111dd..0000000 --- a/package/webif/files/usr/lib/webif/languages.awk +++ /dev/null @@ -1,12 +0,0 @@ -BEGIN { - print "option|en|English" -} - -/webif\/lang\/[a-zA-Z][a-zA-Z]*/ { - gsub(/^.*webif\/lang\//, "") - shortname = $0 - gsub(/\/.*$/, "", shortname) - gsub(/^.*=>[ \t]*/, "") - longname = $0 - print "option|" shortname "|" longname -} diff --git a/package/webif/files/usr/lib/webif/subcategories.awk b/package/webif/files/usr/lib/webif/subcategories.awk deleted file mode 100644 index 8891ce4..0000000 --- a/package/webif/files/usr/lib/webif/subcategories.awk +++ /dev/null @@ -1,12 +0,0 @@ -BEGIN { - FS=":" - print "

@TR<>:

" -} - diff --git a/package/webif/files/usr/lib/webif/validate.awk b/package/webif/files/usr/lib/webif/validate.awk deleted file mode 100644 index 60b5915..0000000 --- a/package/webif/files/usr/lib/webif/validate.awk +++ /dev/null @@ -1,151 +0,0 @@ -# $1 = type -# $2 = variable name -# $3 = field name -# $4 = options -# $5 = value -BEGIN { - FS="|" - output="" -} - -{ - valid_type = 0 - valid = 1 - # XXX: weird hack, but it works... - n = split($0, param, "|") - value = param[5] - for (i = 6; i <= n; i++) value = value FS param[i] - verr = "" -} - -$1 == "int" { - valid_type = 1 - if (value !~ /^[0-9]*$/) { valid = 0; verr = "@TR<>" } -} - -# FIXME: add proper netmask validation -($1 == "ip") || ($1 == "netmask") { - valid_type = 1 - if ((value != "") && (value !~ /^[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$/)) valid = 0 - else { - split(value, ipaddr, "\\.") - for (i = 1; i <= 4; i++) { - if ((ipaddr[i] < 0) || (ipaddr[i] > 255)) valid = 0 - } - } - if (valid == 0) verr = "@TR<>" -} - -$1 == "wep" { - valid_type = 1 - if (value !~ /^[0-9A-Fa-f]*$/) { - valid = 0 - verr = "@TR<>" - } else if ((length(value) != 0) && (length(value) != 10) && (length(value) != 26)) { - valid = 0 - verr = "Invalid key length" - } else if (value ~ /0$/) { - valid = 0 - verr = "Key must not end with '0'" - } -} - -$1 == "hostname" { - valid_type = 1 - if (value !~ /^[0-9a-zA-z\.\-]*$/) { - valid = 0 - verr = "@TR<>" - } -} - -$1 == "string" { - valid_type = 1 -} - -$1 == "mac" { - valid_type = 1 - if ((value != "") && (value !~ /^[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]$/)) { - valid = 0 - verr = "@TR<>" - } -} - -$1 == "port" { - valid_type = 1 - if (value !~ /^[0-9]*$/) { - valid = 0 - verr = "@TR<>" - } -} - -$1 == "ports" { - valid_type = 1 - n = split(value ",", ports, ",") - for (i = 1; i <= n; i++) { - if ((ports[i] !~ /^[0-9]*$/) && (ports[i] !~ /^[0-9][0-9]*-[0-9][0-9]*$/)) { - valid = 0 - verr = "@TR<>" - } - } -} - -$1 == "wpapsk" { - valid_type = 1 - if (length(value) > 64) { - valid = 0 - verr = "String too long" - } - if ((length(value) != 0) && (length(value) < 8)) { - valid = 0 - verr = "String too short" - } - if ((length(value) == 64) && (value ~ /[^0-9a-fA-F]/)) { - valid = 0 - verr = "Invalid hex key" - } -} - -valid_type != 1 { valid = 0 } - -valid == 1 { - n = split($4, options, " ") - for (i = 1; (valid == 1) && (i <= n); i++) { - if (options[i] == "required") { - if (value == "") { valid = 0; verr = "No value entered" } - } else if ((options[i] ~ /^min=/) && (value != "")) { - min = options[i] - sub(/^min=/, "", min) - min = int(min) - if ($1 == "int") { - if (value < min) { valid = 0; verr = "Value too small (minimum: " min ")" } - } else if ($1 == "string") { - if (length(value) < min) { valid = 0; verr = "Value too small (minimum length: " min ")"} - } - } else if ((options[i] ~ /^max=/) && (value != "")) { - max = options[i] - sub(/^max=/, "", max) - max = int(max) - if ($1 == "int") { - if (value > max) { valid = 0; verr = "@TR<> (@TR<>: " max ")" } - } else if ($1 == "string") { - if (length(value) > max) { valid = 0; verr = "@TR<> (@TR<>: " max ")" } - } - } else if ((options[i] == "nodots") && ($1 == "hostname")) { - if (value ~ /\./) { - valid = 0 - verr = "@TR<>" - } - } - } -} - -valid_type == 1 { - if (valid == 1) output = output $2 "=\"" value "\";\n" - else error = error "Error in " $3 ": " verr "
" -} - -END { - print output "ERROR=\"" error "\";\n" - if (error == "") print "return 0" - else print "return 255" -} diff --git a/package/webif/files/usr/lib/webif/webif.sh b/package/webif/files/usr/lib/webif/webif.sh deleted file mode 100755 index e6147fd..0000000 --- a/package/webif/files/usr/lib/webif/webif.sh +++ /dev/null @@ -1,286 +0,0 @@ -libdir=/usr/lib/webif -wwwdir=/www -cgidir=/www/cgi-bin/webif -rootdir=/cgi-bin/webif -indexpage=index.sh - -# workarounds for stupid busybox slowness on [ ] -empty() { - case "$1" in - "") return 0 ;; - *) return 255 ;; - esac -} -equal() { - case "$1" in - "$2") return 0 ;; - *) return 255 ;; - esac -} -neq() { - case "$1" in - "$2") return 255 ;; - *) return 0 ;; - esac -} -# very crazy, but also very fast :-) -exists() { - ( < $1 ) 2>&- -} - -categories() { - grep '##WEBIF:' $cgidir/.categories $cgidir/*.sh 2>/dev/null | \ - awk -v "selected=$1" \ - -v "rootdir=$rootdir" \ - -v "indexpage=$indexpage" \ - -f /usr/lib/webif/categories.awk - -} - -subcategories() { - grep -H "##WEBIF:name:$1:" $cgidir/*.sh 2>/dev/null | \ - sed -e 's,^.*/\([a-zA-Z0-9_\.\-]*\):\(.*\)$,\2:\1,' | \ - sort -n | \ - awk -v "selected=$2" \ - -v "rootdir=$rootdir" \ - -f /usr/lib/webif/subcategories.awk - -} - -update_changes() { - CHANGES=$(($( (cat /tmp/.webif/config-* ; ls /tmp/.webif/file-*) 2>&- | wc -l))) -} - -header() { - empty "$ERROR" && { - _saved_title="${SAVED:+: @TR<>}" - } || { - FORM_submit=""; - ERROR="

$ERROR



" - _saved_title=": @TR<>" - } - - _category="$1" - _uptime="$(uptime)" - _loadavg="${_uptime#*load average: }" - _uptime="${_uptime#*up }" - _uptime="${_uptime%%,*}" - _hostname=$(cat /proc/sys/kernel/hostname) - _version=$( grep "(" /etc/banner ) - _version="${_version%% ---*}" - _head="${3:+

$3$_saved_title

}" - _form="${5:+
}" - _savebutton="${5:+

>\" />

}" - _categories=$(categories $1) - _subcategories=${2:+$(subcategories "$1" "$2")} - - empty "$REMOTE_USER" && neq "${SCRIPT_NAME#/cgi-bin/}" "webif.sh" && grep 'root:!' /etc/passwd >&- 2>&- && { - _nopasswd=1 - _form="" - _savebutton="" - } - - update_changes - cat < - - - - @TR<<Web Status Console>> - - - - -
- - $_form -
-
- $_head - $ERROR -EOF - empty "$REMOTE_USER" && neq "${SCRIPT_NAME#/cgi-bin/}" "webif.sh" && { - empty "$FORM_passwd1" || { - echo '
'
-			(
-				echo "$FORM_passwd1"
-				sleep 1
-				echo "$FORM_passwd2"
-			) | passwd root 2>&1 && apply_passwd
-			echo '
' - footer - exit - } - - equal "$_nopasswd" 1 && { - cat < -
-
-

@TR<>: @TR<Please enter one now (the user name in your browser will be 'root').>>

-
-
-EOF - empty "$NOINPUT" && cat < - - - - - - - - - - - - -
@TR<>:
@TR<>:  
-
- -EOF - footer - exit - } || { - apply_passwd - } - } -} - -footer() { - _changes=${CHANGES#0} - _changes=${_changes:+(${_changes})} - _endform=${_savebutton:+} - cat < -
-
-
-
-
-
-
-
-
-
-
- $_endform -
- -EOF -} - -apply_passwd() { - case ${SERVER_SOFTWARE%% *} in - mini_httpd/*) - grep '^root:' /etc/passwd | cut -d: -f1,2 > $cgidir/.htpasswd - killall -HUP mini_httpd - ;; - esac -} - -display_form() { - if empty "$1"; then - awk -F'|' -f /usr/lib/webif/common.awk -f /usr/lib/webif/form.awk - else - echo "$1" | awk -F'|' -f /usr/lib/webif/common.awk -f /usr/lib/webif/form.awk - fi -} - -list_remove() { - echo "$1 " | awk ' -BEGIN { - RS=" " - FS=":" -} -($0 !~ /^'"$2"'/) && ($0 != "") { - printf " " $0 - first = 0 -}' -} - -handle_list() { - # $1 - remove - # $2 - add - # $3 - submit - # $4 - validate - - empty "$1" || { - LISTVAL="$(list_remove "$LISTVAL" "$1") " - LISTVAL="${LISTVAL# }" - LISTVAL="${LISTVAL%% }" - _changed=1 - } - - empty "$3" || { - validate "${4:-none}|$2" && { - if empty "$LISTVAL"; then - LISTVAL="$2" - else - LISTVAL="$LISTVAL $2" - fi - _changed=1 - } - } - - LISTVAL="${LISTVAL# }" - LISTVAL="${LISTVAL%% }" - LISTVAL="${LISTVAL:- }" - - if empty "$_changed"; then - return 255 - else - return 0 - fi -} - -load_settings() { - equal "$1" "nvram" || { - exists /etc/config/$1 && . /etc/config/$1 - } - exists /tmp/.webif/config-$1 && . /tmp/.webif/config-$1 -} - -validate() { - if empty "$1"; then - eval "$(awk -f /usr/lib/webif/validate.awk)" - else - eval "$(echo "$1" | awk -f /usr/lib/webif/validate.awk)" - fi -} - - -save_setting() { - exists /tmp/.webif/* || mkdir -p /tmp/.webif - oldval=$(eval "echo \${$2}") - oldval=${oldval:-$(nvram get "$2")} - grep "^$2=" /tmp/.webif/config-$1 >&- 2>&- && { - grep -v "^$2=" /tmp/.webif/config-$1 > /tmp/.webif/config-$1-new 2>&- - mv /tmp/.webif/config-$1-new /tmp/.webif/config-$1 2>&- >&- - oldval="" - } - equal "$oldval" "$3" || echo "$2=\"$3\"" >> /tmp/.webif/config-$1 -} - - -is_bcm947xx() { - read _systype < /proc/cpuinfo - equal "${_systype##* }" "BCM947XX" -} - diff --git a/package/webif/files/www/cgi-bin/webif.sh b/package/webif/files/www/cgi-bin/webif.sh deleted file mode 100755 index 63ed48f..0000000 --- a/package/webif/files/www/cgi-bin/webif.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./webif/info.sh diff --git a/package/webif/files/www/cgi-bin/webif/.categories b/package/webif/files/www/cgi-bin/webif/.categories deleted file mode 100644 index 331d4df..0000000 --- a/package/webif/files/www/cgi-bin/webif/.categories +++ /dev/null @@ -1,2 +0,0 @@ -##WEBIF:category:Info -##WEBIF:category:Status diff --git a/package/webif/files/www/cgi-bin/webif/about.sh b/package/webif/files/www/cgi-bin/webif/about.sh deleted file mode 100755 index a0049c2..0000000 --- a/package/webif/files/www/cgi-bin/webif/about.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/webif-page ->..." -?> - -

webif - @TR<>

-
-@TR<modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
>> -
-@TR<> © 2005-2006 OpenWrt.org
-
-@TR<>: - - - - - diff --git a/package/webif/files/www/cgi-bin/webif/config.sh b/package/webif/files/www/cgi-bin/webif/config.sh deleted file mode 100755 index 0259537..0000000 --- a/package/webif/files/www/cgi-bin/webif/config.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/webif-page ->";; - clear) - rm -rf /tmp/.webif >&- 2>&- - header $FORM_cat . "@TR<>" - CHANGES="" - echo "${FORM_prev:+}" - ;; - review) - header $FORM_cat . "@TR<>" - cd /tmp/.webif - for configname in config-*; do - grep = $configname >&- 2>&- && { - echo -n "

${configname#config-}


"
-				cat $configname
-				echo '

' - } - done - CONFIGFILES="" - for configname in file-*; do - exists "$configname" && CONFIGFILES="$CONFIGFILES ${configname#file-}" - done - CONFIGFILES="${CONFIGFILES:+

Config files:

$CONFIGFILES
}" - echo $CONFIGFILES - ;; - save) - header $FORM_cat . "@TR<>" - CHANGES="" - echo "
"
-		sh /usr/lib/webif/apply.sh 2>&1
-		echo "
${FORM_prev:+}" - ;; -esac - -footer - -?> diff --git a/package/webif/files/www/cgi-bin/webif/index.sh b/package/webif/files/www/cgi-bin/webif/index.sh deleted file mode 100755 index 466b34d..0000000 --- a/package/webif/files/www/cgi-bin/webif/index.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/webif-page - diff --git a/package/webif/files/www/cgi-bin/webif/info.sh b/package/webif/files/www/cgi-bin/webif/info.sh deleted file mode 100755 index cc76397..0000000 --- a/package/webif/files/www/cgi-bin/webif/info.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/webif-page ->" - -?> -

-
-
- - - - - - - - - - - - - - - - - - - -
@TR<>$_version
@TR<>$_kversion
@TR<>$_date
@TR<>$_mac
-EOF - -footer -?> - diff --git a/package/webif/files/www/cgi-bin/webif/ipkg.sh b/package/webif/files/www/cgi-bin/webif/ipkg.sh deleted file mode 100755 index 62c0fae..0000000 --- a/package/webif/files/www/cgi-bin/webif/ipkg.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec ./system-ipkg.sh diff --git a/package/webif/files/www/cgi-bin/webif/status-connection.sh b/package/webif/files/www/cgi-bin/webif/status-connection.sh deleted file mode 100755 index fbf329b..0000000 --- a/package/webif/files/www/cgi-bin/webif/status-connection.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/webif-page ->" -?> - - - - - - - - - - - - - - - - - - -
@TR<>


@TR<>
&- | awk '$0 ~ /^Active UNIX/ {ignore = 1}; ignore != 1 { print $0 }' ?>
- - - diff --git a/package/webif/files/www/cgi-bin/webif/status-dhcp.sh b/package/webif/files/www/cgi-bin/webif/status-dhcp.sh deleted file mode 100755 index 5517b78..0000000 --- a/package/webif/files/www/cgi-bin/webif/status-dhcp.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/webif-page ->" -?> - - - - - - - - - 0 { - print "" - print "" - print "" - print "" - print "" - print "" -} -' /tmp/dhcp.leases ?> - -
@TR<>@TR<>@TR<>@TR<>
" $2 "" $3 "" $4 "" - t = $1 - date - h = int(t / 60 / 60) - if (h > 0) printf h "h " - m = int(t / 60 % 60) - if (m > 0) printf m "min " - s = int(t % 60) - printf s "sec " - printf "
- - - diff --git a/package/webif/files/www/cgi-bin/webif/status-wireless.sh b/package/webif/files/www/cgi-bin/webif/status-wireless.sh deleted file mode 100755 index c7ad0a3..0000000 --- a/package/webif/files/www/cgi-bin/webif/status-wireless.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/webif-page ->" -?> - -
&1 | grep -v 'no wireless' | grep '\w' ?>
- - - diff --git a/package/webif/files/www/index.html b/package/webif/files/www/index.html deleted file mode 100644 index 72a9187..0000000 --- a/package/webif/files/www/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - Web Administrative Console - - -
-

Web Administrative Console
Redirecting to : main page

-
- - diff --git a/package/webif/files/www/webif.css b/package/webif/files/www/webif.css deleted file mode 100644 index 86c5a62..0000000 --- a/package/webif/files/www/webif.css +++ /dev/null @@ -1,296 +0,0 @@ -/* layout */ - -* { - margin: 0; - padding: 0; -} - -html, body { - width: inherit; - height: 100%; -} - -dd { - margin-left: 1em; - margin-bottom: 0.2em; -} - -ul { - display: inline; - list-style-type: none; -} - -ul.about { - list-style-type: disc; -} - -li.about { - margin-left: 2em; -} - -hr, -#submenu h3, -#short-status h3, -#content .settings-block .settings .settings-help h3 { - display: none; -} - -ul.about, -hr.separator { - display: block; -} - -option { - padding-right: 1em; -} - -#container { - position: relative; - min-height: 100%; -} - -#header { - position: relative; - width: 100%; -} - -#header-title { - padding-top: 2em; - padding-bottom: 0.2em; -} - -#openwrt-title { - position: relative; - float: left; - left: 1em; - top: 0.7em; -} - -#short-status { - position: relative; - right: 1em; - line-height: 1.2em; - padding-bottom: 0.2em; -} - -#mainmenu, -#submenu { - position: absolute; - width: 100%; - padding-top: 0.2em; - padding-bottom: 0.2em; -} - -#mainmenu -{ - top: 0; - left: 0; -} - -#mainmenu h3 { - padding-left: 1em; - float: left; -} - -#mainmenu li { - font-size: 0.9em; - float: left; - margin-left: 1.5em; -} - -#submenu li { - float: left; - margin-left: 1em; -} - - -#content { - padding-top: 2em; - margin-left: 1em; - padding-bottom: 6em; -} - -#content .settings-block { - margin-bottom: 1.5em; -} - -#content .settings-block .settings-block-title { - margin-bottom: 10px; -} - -#content .settings-block .settings { - clear: both; - margin-left: 1.5em; - padding-right: 1em; -} - -#content .settings-block .settings-block-title, -#content .settings-block .settings .settings-title { - padding: 0.2em; -} - -#content .settings-block .settings .settings-content { - padding-top: 1em; - margin-left: 1em; - float: left; - width: 58%; - padding-bottom: 0.5em; -} - -#content .settings-block .settings .settings-content select, -#content .settings-block .settings .settings-content input { - margin-top: 0.8em; -} - -#content .settings-block .settings .settings-help { - padding: 0.4em; - padding-top: 1.4em; - margin-left: 42%; -} - -#content .settings-block .settings .settings-help .more-help { - margin-right: 10%; - text-align: right; -} - -#save { - position: absolute; - bottom: 0; - width: 100%; -} - -#save .page-save div { - float: right; - width: 15em; - height: 1.5em; - padding-right: 1em; - padding-top: 0.5em; - padding-bottom: 0.4em; -} - -#save .apply { - clear: both; - width: 100%; - height: 5em; -} - -#save .apply div { - float: right; - width: 15em; - height: 4em; - padding-right: 1em; - padding-top: 0.5em; - padding-bottom: 0.5em; -} - -th { - text-align: left; -} - -#content .settings-block .settings .settings-help .more-help, -#save, -#short-status { - text-align: right; -} - -/* font */ -body { - font-family: Verdana, Helvetica, sans-serif; - font-size: 1.0em; -} - -dt, -.selected-maincat, -#mainmenu a:active, -#submenu a { - font-weight: bold; -} - - - -#openwrt-title h1 { - font-size: 2.8em; -} - - -#short-status ul { - font-size: 0.8em; -} - -#mainmenu h3, -#mainmenu li, -#short-status h3 { - font-size: 0.9em; -} - -#mainmenu a, -#submenu a, -#save a { - text-decoration: none; -} - -#save a:hover { - text-decoration: underline; -} - -#mainmenu h3 { - text-transform: uppercase; -} - -#save a { - font-weight: normal; - font-size: 1.1em; -} - - -/* color */ - -#header-title, -#submenu, -#submenu a, -#save a, -#save .page-save -{ - color: #fff; -} - -#header-title, -#save .apply div { - background-color: #3D5C7A; -} - -#mainmenu { - color: #C3C4D2; - background-color: #213242; -} - -#mainmenu a { - color: #C3C4D2; -} - -#mainmenu a:hover { - color: rgb(193,102,90); -} - -#submenu, -#save div { - background-color: #7590AE; -} - -#content .settings-block .settings-block-title h2 { - color: #7590AE; -} - -#submenu a:hover { - color: #FB0; -} - -#content .settings-block .settings .settings-title { - color: #000; - background-color: #CCC; -} - -#save .page-save { - background-color: #FFF; -} - diff --git a/package/webif/files/www/webif.js b/package/webif/files/www/webif.js deleted file mode 100644 index 64d26cd..0000000 --- a/package/webif/files/www/webif.js +++ /dev/null @@ -1,33 +0,0 @@ -function value(name) -{ - var item = document.getElementById(name); - return (item ? item.value : ""); -} -function isset(name, val) -{ - return (value(name) == val); -} -function checked(name) -{ - var item = document.getElementById(name); - return ((item) && item.checked); -} -function hide(name) -{ - var item = document.getElementById(name); - if (item) - item.style.display = 'none'; -} -function show(name) -{ - var item = document.getElementById(name); - if (item) - item.style.display = ''; -} -function set_visible(name, value) -{ - if (value) - show(name) - else - hide(name) -} diff --git a/package/webif/src/bstrip.c b/package/webif/src/bstrip.c deleted file mode 100644 index 1e17d4e..0000000 --- a/package/webif/src/bstrip.c +++ /dev/null @@ -1,75 +0,0 @@ -#include -#include -#include - -#define BUF_SIZE 1024 -#define READ_LEN 14 - -static int read_len = READ_LEN; -static char rbuf[32]; -static char rbuflen = 0; - -int do_gets(char *buf) -{ - int r = 0, c = 0; - char *m; - - if (rbuflen > 0) - memcpy(buf, rbuf, rbuflen); - c += rbuflen; - - while ((c + read_len < BUF_SIZE) && ((r = read(0, &buf[c], read_len)) > 0)) { - m = NULL; - - if ((m = memchr(&buf[c], '\n', r)) != NULL) { - rbuflen = r - (m - &buf[c] + 1); - if (rbuflen > 0) - memcpy(rbuf, m + 1, rbuflen); - c += m - &buf[c] + 1; - } else { - rbuflen = 0; - c += r; - } - - if ((c > 3) && (memcmp(&buf[c - 3], "---", 3) == 0)) - read_len = 1; - - if (m != NULL) - return c; - } - - return c; -} - -int main(int argc, char **argv) -{ - char buf[BUF_SIZE]; - char buf1[BUF_SIZE]; - char *tmp; - int len, r = 0, r1 = 0; - - if (argc != 2) { - fprintf(stderr, "Syntax: %s (name|data )\n", argv[0]); - exit(1); - } - while (tmp = strchr(argv[1], '\r')) - *tmp = 0; - - len = strlen(argv[1]); - - *buf = 0; - while ((strncmp(buf, argv[1], len) != 0) && - (strncmp(buf + 2, argv[1], len) != 0)) { - if (r > 0) { - if (r1 > 0) - write (1, buf1, r1); - r1 = r; - memcpy(buf1, buf, r); - } - if ((r = do_gets(buf)) <= 0) - exit(1); - } - - if (r1 > 2) - write(1, buf1, r1 - 2); -} diff --git a/package/webif/src/webif-page.c b/package/webif/src/webif-page.c deleted file mode 100644 index 13e7093..0000000 --- a/package/webif/src/webif-page.c +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Webif page translator - * - * Copyright (C) 2005 Felix Fietkau - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - - -#include -#include -#include -#include -#include -#ifdef NVRAM -#include -#endif - -#define HASH_MAX 100 -#define LINE_BUF 1024 /* max. buffer allocated for one line */ -#define MAX_TR 32 /* max. translations done on one line */ -#define TR_START "@TR<<" -#define TR_END ">>" - -struct lstr { - char *name; - char *value; - struct lstr *next; -}; -typedef struct lstr lstr; - -static lstr *ltable[HASH_MAX]; -static char buf[LINE_BUF], buf2[LINE_BUF]; - -/* djb2 hash function */ -static inline unsigned long hash(char *str) -{ - unsigned long hash = 5381; - int c; - - while ((c = *str++)) - hash = ((hash << 5) + hash) + c; /* hash * 33 + c */ - - return hash; -} - -static inline char *translate_lookup(char *str) -{ - char *name, *def, *p, *res = NULL; - lstr *i; - int h; - - def = name = str; - if (((p = strchr(str, '|')) != NULL) - || ((p = strchr(str, '#')) != NULL)) { - def = p + 1; - *p = 0; - } - - h = hash(name) % HASH_MAX; - i = ltable[h]; - while ((res == NULL) && (i != NULL)) { - if (strcmp(name, i->name) == 0) - res = i->value; - i = i->next; - } - - if (res == NULL) - res = def; - - return res; -} - -static inline void add_line(char *name, char *value) -{ - int h = hash(name) % HASH_MAX; - lstr *s = malloc(sizeof(lstr)); - lstr *p; - - s->name = strdup(name); - s->value = strdup(value); - s->next = NULL; - - if (ltable[h] == NULL) - ltable[h] = s; - else { - for(p = ltable[h]; p->next != NULL; p = p->next); - p->next = s; - } -} - -static char *translate_line(char *line) -{ - static char *tok[MAX_TR * 3]; - char *l, *p, *p2, *res; - int len = 0, pos = 0, i; - - l = line; - while (l != NULL) { - if ((p = strstr(l, TR_START)) == NULL) { - len += strlen((tok[pos++] = l)); - break; - } - - p2 = strstr(p, TR_END); - if (p2 == NULL) - break; - - *p = 0; - *p2 = 0; - len += strlen((tok[pos++] = l)); - len += strlen((tok[pos++] = translate_lookup(p + strlen(TR_START)))); - - l = p2; - l += strlen(TR_END); - } - len++; - - if (len > LINE_BUF) - p = malloc(len); - else - p = buf2; - - p[0] = 0; - res = p; - for (i = 0; i < pos; i++) { - strcat(p, tok[i]); - p += strlen(tok[i]); - } - - return res; -} - -/* load and parse language file */ -static void load_lang(char *file) -{ - FILE *f; - char *b, *name, *value; - - f = fopen(file, "r"); - while (!feof(f) && (fgets(buf, LINE_BUF - 1, f) != NULL)) { - b = buf; - while (isspace(*b)) - b++; /* skip leading spaces */ - if (!*b) - continue; - - name = b; - if ((b = strstr(name, "=>")) == NULL) - continue; /* separator not found */ - - value = b + 2; - if (!*value) - continue; - - *b = 0; - for (b--; isspace(*b); b--) - *b = 0; /* remove trailing spaces */ - - while (isspace(*value)) - value++; /* skip leading spaces */ - - for (b = value + strlen(value) - 1; isspace(*b); b--) - *b = 0; /* remove trailing spaces */ - - if (!*value) - continue; - - add_line(name, value); - } -} - -int main (int argc, char **argv) -{ - FILE *f; - int len, i, done; - char line[LINE_BUF], *tmp, *arg; - glob_t langfiles; - char *lang = NULL; - char *proc = "/usr/bin/haserl"; - - memset(ltable, 0, HASH_MAX * sizeof(lstr *)); -#ifdef NVRAM - if ((lang = nvram_get("language")) != NULL) { -#else - if ((f = fopen("/etc/config/webif", "r")) != NULL) { - int n, i; - - while (!feof(f) && (lang == NULL)) { - fgets(line, LINE_BUF - 1, f); - - if (strncasecmp(line, "lang", 4) != 0) - goto nomatch; - - lang = line + 4; - while (isspace(*lang)) - lang++; - - if (*lang != '=') - goto nomatch; - - lang++; - - while (isspace(*lang)) - lang++; - - for (i = 0; isalpha(lang[i]) && (i < 32); i++); - lang[i] = 0; - continue; -nomatch: - lang = NULL; - } - fclose(f); -#endif - - sprintf(buf, "/usr/lib/webif/lang/%s/*.txt", lang); - i = glob(buf, GLOB_ERR | GLOB_MARK, NULL, &langfiles); - if (i == GLOB_NOSPACE || i == GLOB_ABORTED || i == GLOB_NOMATCH) { - // no language files found - } else { - for (i = 0; i < langfiles.gl_pathc; i++) { - load_lang(langfiles.gl_pathv[i]); - } - } - } - - /* - * command line options for this parser are stored in argv[1] only. - * filename to be processed is in argv[2] - */ - done = 0; - i = 1; - while (!done) { - if (argv[1] == NULL) { - done = 1; - } else if (strncmp(argv[1], "-e", 2) == 0) { - argv[1] = strchr(argv[1], ' '); - argv[1]++; - if (argv[1] != NULL) { - arg = argv[1]; - if ((tmp = strchr(argv[1], ' ')) != NULL) { - *tmp = 0; - argv[1] = &tmp[1]; - } else { - argv[1] = NULL; - i++; - } - system(arg); - } - } else if (strncmp(argv[1], "-p", 2) == 0) { - argv[1] = strchr(argv[1], ' '); - argv[1]++; - if (argv[1] != NULL) { - arg = argv[1]; - if ((tmp = strchr(argv[1], ' ')) != NULL) { - *tmp = 0; - argv[1] = &tmp[1]; - } else { - argv[1] = NULL; - i++; - } - proc = strdup(arg); - } - } else { - done = 1; - } - } - - strcpy(buf, proc); - while (argv[i]) { - sprintf(buf + strlen(buf), " %s", argv[i++]); - } - f = popen(buf, "r"); - - while (!feof(f) && (fgets(buf, LINE_BUF - 1, f)) != NULL) { - fprintf(stdout, "%s", translate_line(buf)); - fflush(stdout); - } - - return 0; -} diff --git a/package/webif/webif.mk b/package/webif/webif.mk deleted file mode 100644 index d9f3e04..0000000 --- a/package/webif/webif.mk +++ /dev/null @@ -1,71 +0,0 @@ -############################################################# -# -# webif -# -############################################################# -WEBIF_VERSION:=0.2 -WEBIF_SOURCE:=package/webif -WEBIF_SITE:=https://svn.openwrt.org/openwrt/tags/whiterussian_0.9/package/webif -WEBIF_DIR:=$(BUILD_DIR)/webif-$(WEBIF_VERSION) - -$(WEBIF_DIR)/.unpacked: - mkdir -p $(WEBIF_DIR) - touch $@ - -$(WEBIF_DIR)/.built: $(WEBIF_DIR)/.unpacked - $(TARGET_CC) $(TARGET_CFLAGS) -o $(WEBIF_DIR)/webif-page $(WEBIF_SOURCE)/src/webif-page.c - $(TARGET_CC) $(TARGET_CFLAGS) -o $(WEBIF_DIR)/bstrip $(WEBIF_SOURCE)/src/bstrip.c - $(STRIPCMD) --strip-unneeded $(WEBIF_DIR)/webif-page $(WEBIF_DIR)/bstrip - touch $@ - -$(TARGET_DIR)/www/webif.css: $(WEBIF_DIR)/.built - mkdir -p $(TARGET_DIR)/etc - mkdir -p $(TARGET_DIR)/usr/bin - mkdir -p $(TARGET_DIR)/usr/lib - mkdir -p $(TARGET_DIR)/www - cat $(WEBIF_SOURCE)/files/etc/httpd.conf >> $(TARGET_DIR)/etc/httpd.conf - cp -dpfr $(WEBIF_SOURCE)/files/usr/lib/webif $(TARGET_DIR)/usr/lib/ -ifneq ($(BR2_PACKAGE_WEBIF_LANGUAGES),y) - rm -rf $(TARGET_DIR)/usr/lib/webif/lang -endif - $(INSTALL) -m0755 $(WEBIF_DIR)/webif-page $(TARGET_DIR)/usr/bin/ - $(INSTALL) -m0755 $(WEBIF_DIR)/bstrip $(TARGET_DIR)/usr/bin/ -ifeq ($(BR2_PACKAGE_WEBIF_INSTALL_INDEX_HTML),y) - @if [ -f "$(TARGET_DIR)/www/index.html" ]; then \ - echo; \ - echo "webif WARNING:"; \ - echo "There is already a $(TARGET_DIR)/www/index.html"; \ - echo "webif might be replacing another package;" \ - echo; \ - echo "Sleeping for 10 seconds"; \ - sleep 10; \ - fi - cp -dpf $(WEBIF_SOURCE)/files/www/index.html $(TARGET_DIR)/www/ -endif - cp -dpfr $(WEBIF_SOURCE)/files/www/cgi-bin $(TARGET_DIR)/www/ - cp -dpfr $(WEBIF_SOURCE)/files/www/webif.* $(TARGET_DIR)/www/ - @if [ ! -f $(TARGET_DIR)/etc/banner ]; then \ - ln -sf issue $(TARGET_DIR)/etc/banner; \ - fi - touch $@ - -webif: busybox $(TARGET_DIR)/www/webif.css - -webif-clean: - rm -rf $(TARGET_DIR)/www/cgi-bin/webif* $(TARGET_DIR)/www/webif.* - rm -rf $(TARGET_DIR)/usr/lib/webif - rm -f $(TARGET_DIR)/usr/bin/bstrip $(TARGET_DIR)/usr/bin/webif-page - rm -r $(WEBIF_DIR)/bstrip $(WEBIF_DIR)/webif-page - -webif-source: - -webif-dirclean: - rm -rf $(WEBIF_DIR) -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_WEBIF),y) -TARGETS+=webif -endif diff --git a/scripts/add_new_package.wizard b/scripts/add_new_package.wizard deleted file mode 100755 index 4ee02df..0000000 --- a/scripts/add_new_package.wizard +++ /dev/null @@ -1,120 +0,0 @@ -#!/bin/sh - -echo "**** Autotools Add New Package Wizard ****" -echo " This script will generate files to add a" -echo " new package to buildroot." -echo - -echo "What is the name of the package?" -read PACKAGE_NAME - -echo "What is the version number?" -read VERSION_NUM - -echo "What is the web address of the tarball?" -read DOWNLOAD_LOC - -echo "Enter any known dependencies, separated" -echo "by spaces, or just press enter." -read EXTRA_DEPS - -echo "Enter a description of the package." -read DESCRIPTION - -echo "Does autoreconf need to be run first? (y/n)" -read ANSWER - -if [ "$ANSWER" = "y" ]; then - RECONF="YES" -else - RECONF="NO" -fi - -echo "Does it need to be installed to the staging dir?" -echo "Say yes, if other packages depend on it." -echo "(If not sure, just say yes. It will only use more" -echo "space on your hard drive.)" -read ANSWER - -if [ "$ANSWER" = "y" ]; then - STAGING="YES" -else - STAGING="NO" -fi - -echo "Enter an additional subdirectory below package/" -echo "as category, or just press enter." -read SUB_DIR - -if [ -z "$SUB_DIR" ]; then - CATEGORY_DIR=package -else - CATEGORY_DIR=package/${SUB_DIR} -fi - -echo "Enter any configure script options." -read CONFIG_OPTIONS - -URL=${DOWNLOAD_LOC%/*} -TARBALL=${DOWNLOAD_LOC##*/} -EXTENSION=${TARBALL##*.tar.} -NAME_UPPER=`echo ${PACKAGE_NAME} | tr a-z- A-Z_` -PACKAGE_DIR=`dirname $0`/../${CATEGORY_DIR}/${PACKAGE_NAME} - -mkdir -p ${PACKAGE_DIR} - -sed -e 's/ *$//g' > ${PACKAGE_DIR}/${PACKAGE_NAME}.mk < ${PACKAGE_DIR}/Config.in < ${IMAGE_PATH}/buildroot.vmx < /dev/null - - # create the control file - cd ${BUILDROOT_DIR} - mkdir ${BUILDROOT_DIR}/ipkg-temp/CONTROL - - # find it's corresponding buildroot package directory - PACK_NAME=`find ./package -path './package/config' -prune -o -name ${NAME_WITHOUT_DIR}` - PACK_NAME=${PACK_NAME%./package/config} - PACK_NAME=${PACK_NAME#./package/config} - PACK_NAME=`echo -n ${PACK_NAME}` - - # there must be an better way to extract the description and - # dependencies from the Config.in and *.mk file. - # Haven't figured it out just yet. - CONF_FILE=`cat ${PACK_NAME}/Config.in` - #MAKE_FILE=`cat ${PACK_NAME}/*.mk` - HELP_STR=${CONF_FILE#*help} - HELP_STR=${HELP_STR%%comment*} - HELP_STR=${HELP_STR%%choice*} - HELP_STR=${HELP_STR%%depends*} - HELP_STR=${HELP_STR%%http*} - HELP_STR=`echo -n ${HELP_STR}` - - echo ${HELP_STR} - - if [ "${PACK_NAME}" != "" ]; then - echo "Creating ipkg of: ${PACKAGE}" - -cat > ${BUILDROOT_DIR}/ipkg-temp/CONTROL/control <-linux-2.6...config" or -# "-linux-2.6..config" -# -####################################################################### - -TOPDIR=`pwd` -DEBUG=0 -# parameter #1 BOARD_PATH -# parameter #2 LINUX26_DIR - -CONFIGS=`ls -X $1/*linux-2.6.*.config | sed s/[.]config// - | sort` -LINUX26_DIR=`basename $2` -LINUX26_CONFIG=${2}/.config -LINUX_MAJOR_VERSION=${LINUX26_DIR:10:2} -LINUX_MINOR_VERSION=${LINUX26_DIR:13} - -function DBG_PRINT -{ - if [ ${DEBUG} = 1 ] ; then - echo $1 - fi -} - -function linux_version() -{ - local KCONFIG - KCONFIG=`basename $1` - KERNEL=`echo ${KCONFIG} | sed s/.*linux-2.6./linux-2.6./g -` - THIS_MAJOR=${KERNEL:10:2} - THIS_MINOR=${KERNEL:13} - THIS_MINOR=${THIS_MINOR:=0} -} - -# Try to be careful... -DBG_PRINT MAJOR=\"${LINUX_MAJOR_VERSION}\" -DBG_PRINT MINOR=\"${LINUX_MINOR_VERSION}\" - -for i in ${CONFIGS} ; do - DBG_PRINT FILE=$i - linux_version $i - DBG_PRINT KERNEL=${KERNEL} - if [ ${THIS_MAJOR} -lt ${LINUX_MAJOR_VERSION} ] ; then - echo Copying `basename $i`.config ... - cp $i.config ${LINUX26_CONFIG} - elif [ ${THIS_MAJOR} -eq ${LINUX_MAJOR_VERSION} ] ; then - if [ "${LINUX_MINOR_VERSION}X" = "X" ] ; then - if [ "${THIS_MINOR}X" = "X" ] ; then - echo Copying `basename $i`.config ... - cp $i.config ${LINUX26_CONFIG} - else - return - fi - elif [ ${THIS_MINOR} -le ${LINUX_MINOR_VERSION} ] ; then - echo Copying `basename $i`.config ... - cp $i.config ${LINUX26_CONFIG} - fi - else - return - fi -done - -# Did not work... - be promisceous - -if [ ! -f "${LINUX26_CONFIG}" ] ; then \ - for i in `ls $1/*linux*.config` ; do - echo Copying `basename $i` ... - cp $i ${LINUX26_CONFIG} - done -fi - diff --git a/scripts/graph-depends b/scripts/graph-depends deleted file mode 100755 index 4d82282..0000000 --- a/scripts/graph-depends +++ /dev/null @@ -1,169 +0,0 @@ -#!/usr/bin/python - -# Usage (the graphviz package must be installed in your distribution) -# ./scripts/graph-depends [package-name] > test.dot -# dot -Tpdf test.dot -o test.pdf -# -# With no arguments, graph-depends will draw a complete graph of -# dependencies for the current configuration. With an argument, -# graph-depends will draw a graph of dependencies for the given -# package name. -# -# Limitations -# -# * Some packages have dependencies that depend on the Buildroot -# configuration. For example, many packages have a dependency on -# openssl if openssl has been enabled. This tool will graph the -# dependencies as they are with the current Buildroot -# configuration. -# -# * The X.org package definitions are only included when -# BR2_PACKAGE_XORG7 is enabled, so if this option is not enabled, -# it isn't possible to graph the dependencies of X.org stack -# components. -# -# Copyright (C) 2010 Thomas Petazzoni - -import sys -import subprocess - -# In FULL_MODE, we draw the full dependency graph for all selected -# packages -FULL_MODE = 1 - -# In PKG_MODE, we only draw the dependency graph for a given package -PKG_MODE = 2 - -mode = 0 - -if len(sys.argv) == 1: - mode = FULL_MODE -elif len(sys.argv) == 2: - mode = PKG_MODE - rootpkg = sys.argv[1] -else: - print "Usage: graph-depends [package-name]" - sys.exit(1) - -allpkgs = [] -unknownpkgs = [] - -# Execute the "make show-targets" command to get the list of the main -# Buildroot TARGETS and return it formatted as a Python list. This -# list is used as the starting point for full dependency graphs -def get_targets(): - sys.stderr.write("Getting targets\n") - cmd = ["make", "show-targets"] - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - output = p.communicate()[0].strip() - if p.returncode != 0: - return None - if output == '': - return [] - return output.split(' ') - -# Execute the "make -show-depends" command to get the list of -# dependencies of a given package, and return the list of dependencies -# formatted as a Python list. -def get_depends(pkg): - sys.stderr.write("Getting dependencies for %s\n" % pkg) - cmd = ["make", "%s-show-depends" % pkg] - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - output = p.communicate()[0].strip() - if p.returncode != 0: - return None - if output == '': - return [] - return output.split(' ') - -# Recursive function that builds the tree of dependencies for a given -# package. The dependencies are built in a list called 'dependencies', -# which contains tuples of the form (pkg1 -> -# pkg2_on_which_pkg1_depends) and the function finally returns this -# list. -def get_all_depends(pkg): - dependencies = [] - - # We already have the dependencies for this package - if pkg in allpkgs: - return - allpkgs.append(pkg) - depends = get_depends(pkg) - - # We couldn't get the dependencies of this package, because it - # doesn't use the generic or autotools infrastructure. Add it to - # unknownpkgs so that it is later rendered in red color to warn - # the user. - if depends == None: - unknownpkgs.append(pkg) - return - - # This package has no dependency. - if depends == []: - return - - # Add dependencies to the list of dependencies - for dep in depends: - dependencies.append((pkg, dep)) - - # Recurse into the dependencies - for dep in depends: - newdeps = get_all_depends(dep) - if newdeps != None: - dependencies += newdeps - - return dependencies - -# The Graphviz "dot" utility doesn't like dashes in node names. So for -# node names, we strip all dashes. -def pkg_node_name(pkg): - return pkg.replace("-","") - -# In full mode, start with the result of get_targets() to get the main -# targets and then use get_all_depends() for each individual target. -if mode == FULL_MODE: - targets = get_targets() - dependencies = [] - allpkgs.append('all') - for tg in targets: - # Skip uninteresting targets - if tg == 'target-generic-issue' or \ - tg == 'target-finalize' or \ - tg == 'erase-fakeroots' or \ - tg == 'target-generic-hostname': - continue - dependencies.append(('all', tg)) - deps = get_all_depends(tg) - if deps != None: - dependencies += deps - -# In pkg mode, start directly with get_all_depends() on the requested -# package -elif mode == PKG_MODE: - dependencies = get_all_depends(rootpkg) - -# Start printing the graph data -print "digraph G {" - -# First, the dependencies. Usage of set allows to remove duplicated -# dependencies in the graph -for dep in set(dependencies): - print "%s -> %s" % (pkg_node_name(dep[0]), pkg_node_name(dep[1])) - -# Then, the node attributes: color, style and label. -for pkg in allpkgs: - if pkg == 'all': - print "all [label = \"ALL\"]" - print "all [color=lightblue,style=filled]" - continue - - print "%s [label = \"%s\"]" % (pkg_node_name(pkg), pkg) - - if pkg in unknownpkgs: - print "%s [color=red,style=filled]" % pkg_node_name(pkg) - elif mode == PKG_MODE and pkg == rootpkg: - print "%s [color=lightblue,style=filled]" % pkg_node_name(rootpkg) - else: - print "%s [color=grey,style=filled]" % pkg_node_name(pkg) - -print "}" diff --git a/scripts/mkmakefile b/scripts/mkmakefile deleted file mode 100755 index 38d8268..0000000 --- a/scripts/mkmakefile +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -# Generates a small Makefile used in the root of the output -# directory, to allow make to be started from there. -# The Makefile also allow for more convinient build of external modules - -# Usage -# $1 - Kernel src directory -# $2 - Output directory - - -test ! -r $2/Makefile -o -O $2/Makefile || exit 0 -# Only overwrite automatically generated Makefiles -# (so we do not overwrite buildroot Makefile) -if test -e $2/Makefile && ! grep -q Automatically $2/Makefile -then - exit 0 -fi -if [ "${quiet}" != "silent_" ]; then - echo " GEN $2/Makefile" -fi - -cat << EOF > $2/Makefile -# Automatically generated by $0: don't edit - -lastword = \$(word \$(words \$(1)),\$(1)) -makedir := \$(dir \$(call lastword,\$(MAKEFILE_LIST))) - -MAKEARGS := -C $1 -MAKEARGS += O=\$(if \$(patsubst /%,,\$(makedir)),\$(CURDIR)/)\$(patsubst %/,%,\$(makedir)) - -MAKEFLAGS += --no-print-directory - -.PHONY: all \$(MAKECMDGOALS) - -all := \$(filter-out all Makefile,\$(MAKECMDGOALS)) - -all: - \$(MAKE) \$(MAKEARGS) \$(all) - -Makefile:; - -\$(all): all - @: - -%/: all - @: -EOF diff --git a/scripts/pkg-stats b/scripts/pkg-stats deleted file mode 100755 index 7bb2928..0000000 --- a/scripts/pkg-stats +++ /dev/null @@ -1,284 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2009 by Thomas Petazzoni -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -# This script generates an HTML file that contains a report about all -# Buildroot packages, their usage of the different package -# infrastructure and possible cleanup actions -# -# Run the script from the Buildroot toplevel directory: -# -# ./scripts/pkg-stats > /tmp/pkg.html -# - -echo " - - - -Results
- - - - - - - - - - - - - - - - - - - - - -" - -convert_to_generic_target=0 -convert_to_generic_host=0 -convert_to_autotools=0 -total_patch_count=0 -cnt=1 -for i in $(find package/ -name '*.mk') ; do - - if test \ - $i = "package/java/java.mk" -o \ - $i = "package/games/games.mk" -o \ - $i = "package/multimedia/multimedia.mk" -o \ - $i = "package/customize/customize.mk" -o \ - $i = "package/gnuconfig/gnuconfig.mk" -o \ - $i = "package/matchbox/matchbox.mk" -o \ - $i = "package/x11r7/x11r7.mk" ; then - echo "skipping $i" 1>&2 - continue - fi - - cnt=$((cnt+1)) - - is_auto_host=0 - is_auto_target=0 - is_cmake_host=0 - is_cmake_target=0 - is_pkg_target=0 - is_pkg_host=0 - is_manual_target=0 - is_manual_host=0 - - if grep -E "\(call AUTOTARGETS,[^,]*,[^,]*,host\)" $i > /dev/null ; then - is_auto_host=1 - fi - - if grep -E "\(call AUTOTARGETS,[^,]*,[^,]*(,target|)\)" $i > /dev/null ; then - is_auto_target=1 - fi - - if grep -E "\(call GENTARGETS,[^,]*,[^,]*,host\)" $i > /dev/null ; then - is_pkg_host=1 - fi - - if grep -E "\(call GENTARGETS,[^,]*,[^,]*(,target|)\)" $i > /dev/null ; then - is_pkg_target=1 - fi - - if grep -E "\(call CMAKETARGETS,[^,]*,[^,]*,host\)" $i > /dev/null ; then - is_cmake_host=1 - fi - - if grep -E "\(call CMAKETARGETS,[^,]*,[^,]*(,target|)\)" $i > /dev/null ; then - is_cmake_target=1 - fi - - pkg=$(basename $i) - pkg=${pkg%.mk} - - if grep "^host-$pkg:" $i > /dev/null ; then - is_manual_host=1 - fi - - if test $is_pkg_target -eq 0 -a $is_auto_target -eq 0 -a $is_cmake_target -eq 0; then - is_manual_target=1 - fi - - tasks="" - - if [ $is_manual_target -eq 1 ] ; then - if grep "/configure" $i > /dev/null ; then - tasks=$tasks"
  • convert package to autotools ?
  • " - convert_to_target_autotools=$((convert_to_target_autotools+1)) - else - tasks=$tasks"
  • convert to generic target
  • " - convert_to_generic_target=$((convert_to_generic_target+1)) - fi - fi - - if [ $is_manual_host -eq 1 ]; then - if grep "/configure" $i > /dev/null ; then - tasks=$tasks"
  • convert package to autotools ?
  • " - convert_to_host_autotools=$((convert_to_host_autotools+1)) - else - tasks=$tasks"
  • convert to generic host
  • " - convert_to_generic_host=$((convert_to_generic_host+1)) - fi - fi - - if test -n "$tasks" ; then - echo "" - else - echo "" - fi - - echo "" - echo "" - - package_dir=$(dirname $i) - patch_count=$(find ${package_dir} -name '*.patch' | wc -l) - total_patch_count=$(($total_patch_count+$patch_count)) - - if test $patch_count -lt 1 ; then - patch_count_color="#00ff00" - elif test $patch_count -lt 5 ; then - patch_count_color="#ffc600" - else - patch_count_color="#ff0000" - fi - - echo "" - - echo "" - - echo "" - - echo "" - - echo "" - - echo "" - - echo "" - - echo "" - - echo "" - - echo "" - - echo "" - -done -echo "
    IdPackagePatch countAUTOTARGETSGENTARGETSCMAKETARGETSmanualActions
    hosttargethosttargethosttargethosttarget
    $cnt$i" - echo $patch_count - echo "" - if [ $is_auto_host -eq 1 ] ; then - echo "YES" - else - echo "NO" - fi - echo "" - if [ $is_auto_target -eq 1 ] ; then - echo "YES" - else - echo "NO" - fi - echo "" - if [ $is_pkg_host -eq 1 ] ; then - echo "YES" - else - echo "NO" - fi - echo "" - if [ $is_pkg_target -eq 1 ] ; then - echo "YES" - else - echo "NO" - fi - echo "" - if [ $is_cmake_host -eq 1 ] ; then - echo "YES" - else - echo "NO" - fi - echo "" - if [ $is_cmake_target -eq 1 ] ; then - echo "YES" - else - echo "NO" - fi - echo "" - if [ $is_manual_host -eq 1 ] ; then - echo "YES" - else - echo "NO" - fi - echo "" - if [ $is_manual_target -eq 1 ] ; then - echo "YES" - else - echo "NO" - fi - echo "" - echo "
      " - echo $tasks - echo "
    " - echo "
    " - -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "" -echo "
    Packages to convert to generic target$convert_to_generic_target
    Packages to convert to generic host$convert_to_generic_host
    Packages to convert to target autotools$convert_to_target_autotools
    Packages to convert to host autotools$convert_to_host_autotools
    Number of patches in all packages$total_patch_count
    TOTAL$cnt
    " diff --git a/scripts/setlocalversion b/scripts/setlocalversion deleted file mode 100755 index 8d6fe90..0000000 --- a/scripts/setlocalversion +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/sh -# Print additional version information for non-release trees. - -usage() { - echo "Usage: $0 [srctree]" >&2 - exit 1 -} - -cd "${1:-.}" || usage - -# Check for git and a git repo. -if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then - # Do we have an untagged version? - if git name-rev --tags HEAD | grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$' > /dev/null; then - if tag=`git describe 2>/dev/null`; then - echo $tag | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}' - else - printf '%s%s' -g $head - fi - fi - - # Is this git on svn? - if git config --get svn-remote.svn.url >/dev/null; then - printf -- '-svn%s' "`git svn find-rev $head`" - fi - - # Are there uncommitted changes? - git update-index --refresh --unmerged > /dev/null - if git diff-index --name-only HEAD | grep -v "^scripts/package" \ - | read dummy; then - printf '%s' -dirty - fi - - # All done with git - exit -fi - -# Check for mercurial and a mercurial repo. -if hgid=`hg id 2>/dev/null`; then - tag=`printf '%s' "$hgid" | cut -d' ' -f2` - - # Do we have an untagged version? - if [ -z "$tag" -o "$tag" = tip ]; then - id=`printf '%s' "$hgid" | sed 's/[+ ].*//'` - printf '%s%s' -hg "$id" - fi - - # Are there uncommitted changes? - # These are represented by + after the changeset id. - case "$hgid" in - *+|*+\ *) printf '%s' -dirty ;; - esac - - # All done with mercurial - exit -fi - -# Check for svn and a svn repo. -if rev=`LANG=C svn info 2>/dev/null | grep '^Last Changed Rev'`; then - rev=`echo $rev | awk '{print $NF}'` - changes=`LANG=C svn status 2>/dev/null | grep '^[AMD]' | wc -l` - - # Are there uncommitted changes? - if [ $changes != 0 ]; then - printf -- '-svn%s%s' "$rev" -dirty - else - printf -- '-svn%s' "$rev" - fi - - # All done with svn - exit -fi diff --git a/toolchain/dependencies/check-host-lzma.sh b/toolchain/dependencies/check-host-lzma.sh deleted file mode 100755 index 34e8f03..0000000 --- a/toolchain/dependencies/check-host-lzma.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -ok="" - -for bin in /usr/bin/lzma $LZMA -do -# TODO: add check for proper functionality here.. - $bin --version > /dev/null 2>&1 && ok="$bin" - if test "x$ok" != "x" ; then - break - fi -done -echo "$ok" diff --git a/toolchain/gcc/4.3.5/100-uclibc-conf.patch b/toolchain/gcc/4.3.5/100-uclibc-conf.patch deleted file mode 100644 index cca8c82..0000000 --- a/toolchain/gcc/4.3.5/100-uclibc-conf.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- gcc/gcc/config/--- gcc/contrib/regression/objs-gcc.sh -+++ gcc/contrib/regression/objs-gcc.sh -@@ -105,6 +105,10 @@ - then - make all-gdb all-dejagnu all-ld || exit 1 - make install-gdb install-dejagnu install-ld || exit 1 -+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] -+ then -+ make all-gdb all-dejagnu all-ld || exit 1 -+ make install-gdb install-dejagnu install-ld || exit 1 - elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then - make bootstrap || exit 1 - make install || exit 1 ---- gcc/libjava/classpath/ltconfig -+++ gcc/libjava/classpath/ltconfig -@@ -603,7 +603,7 @@ - - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in --linux-gnu*) ;; -+linux-gnu*|linux-uclibc*) ;; - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac - -@@ -1251,7 +1251,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - version_type=linux - need_lib_prefix=no - need_version=no diff --git a/toolchain/gcc/4.3.5/104-gnuhurd-uclibc-conf.patch b/toolchain/gcc/4.3.5/104-gnuhurd-uclibc-conf.patch deleted file mode 100644 index c04dd9f..0000000 --- a/toolchain/gcc/4.3.5/104-gnuhurd-uclibc-conf.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -rdup gcc-4.2.1.oorig/gcc/config.gcc gcc-4.2.1/gcc/config.gcc ---- gcc-4.2.1.oorig/gcc/config.gcc 2007-10-01 11:52:52.000000000 +0200 -+++ gcc-4.2.1/gcc/config.gcc 2007-10-01 13:22:12.000000000 +0200 -@@ -494,6 +494,9 @@ case ${target} in - alpha*) - tm_file="${cpu_type}/${cpu_type}.h alpha/elf.h alpha/linux.h alpha/linux-elf.h gnu.h ${tm_file}" - ;; -+ i[34567]86-*hurd*-*) -+ tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/gnu.h gnu.h ${tm_file}" -+ ;; - i[34567]86-*-*) - tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h gnu.h ${tm_file}" - ;; diff --git a/toolchain/gcc/4.3.5/301-missing-execinfo_h.patch b/toolchain/gcc/4.3.5/301-missing-execinfo_h.patch deleted file mode 100644 index 0e2092f..0000000 --- a/toolchain/gcc/4.3.5/301-missing-execinfo_h.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500 -+++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500 -@@ -500,7 +500,7 @@ - #ifdef __linux__ - # include - # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ -- && !defined(__ia64__) -+ && !defined(__ia64__) && !defined(__UCLIBC__) - # ifndef GC_HAVE_BUILTIN_BACKTRACE - # define GC_HAVE_BUILTIN_BACKTRACE - # endif diff --git a/toolchain/gcc/4.3.5/302-c99-snprintf.patch b/toolchain/gcc/4.3.5/302-c99-snprintf.patch deleted file mode 100644 index ba51a0e..0000000 --- a/toolchain/gcc/4.3.5/302-c99-snprintf.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: gcc-4.3.0/libstdc++-v3/include/c_global/cstdio -=================================================================== ---- gcc-4.3.0/libstdc++-v3/include/c_global/cstdio (revision 129202) -+++ gcc-4.3.0/libstdc++-v3/include/c_global/cstdio (working copy) -@@ -144,7 +144,7 @@ - - _GLIBCXX_END_NAMESPACE - --#if _GLIBCXX_USE_C99 -+#if _GLIBCXX_USE_C99 || defined __UCLIBC__ - - #undef snprintf - #undef vfscanf diff --git a/toolchain/gcc/4.3.5/305-libmudflap-susv3-legacy.patch b/toolchain/gcc/4.3.5/305-libmudflap-susv3-legacy.patch deleted file mode 100644 index 374b1f8..0000000 --- a/toolchain/gcc/4.3.5/305-libmudflap-susv3-legacy.patch +++ /dev/null @@ -1,49 +0,0 @@ -Index: gcc-4.2/libmudflap/mf-hooks2.c -=================================================================== ---- gcc-4.2/libmudflap/mf-hooks2.c (revision 119834) -+++ gcc-4.2/libmudflap/mf-hooks2.c (working copy) -@@ -427,7 +427,7 @@ - { - TRACE ("%s\n", __PRETTY_FUNCTION__); - MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region"); -- bzero (s, n); -+ memset (s, 0, n); - } - - -@@ -437,7 +437,7 @@ - TRACE ("%s\n", __PRETTY_FUNCTION__); - MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src"); - MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest"); -- bcopy (src, dest, n); -+ memmove (dest, src, n); - } - - -@@ -447,7 +447,7 @@ - TRACE ("%s\n", __PRETTY_FUNCTION__); - MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg"); - MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg"); -- return bcmp (s1, s2, n); -+ return n == 0 ? 0 : memcmp (s1, s2, n); - } - - -@@ -456,7 +456,7 @@ - size_t n = strlen (s); - TRACE ("%s\n", __PRETTY_FUNCTION__); - MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region"); -- return index (s, c); -+ return strchr (s, c); - } - - -@@ -465,7 +465,7 @@ - size_t n = strlen (s); - TRACE ("%s\n", __PRETTY_FUNCTION__); - MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region"); -- return rindex (s, c); -+ return strrchr (s, c); - } - - /* XXX: stpcpy, memccpy */ diff --git a/toolchain/gcc/4.3.5/810-arm-softfloat-libgcc.patch b/toolchain/gcc/4.3.5/810-arm-softfloat-libgcc.patch deleted file mode 100644 index 1639c39..0000000 --- a/toolchain/gcc/4.3.5/810-arm-softfloat-libgcc.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: gcc-4.3.0/gcc/config/arm/t-linux -=================================================================== ---- gcc-4.3.0/gcc/config/arm/t-linux (revision 129896) -+++ gcc-4.3.0/gcc/config/arm/t-linux (working copy) -@@ -3,7 +3,10 @@ - TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC - - LIB1ASMSRC = arm/lib1funcs.asm --LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx -+LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \ -+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \ -+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \ -+ _fixsfsi _fixunssfsi _floatdidf _floatundidf _floatdisf _floatundisf - - # MULTILIB_OPTIONS = mhard-float/msoft-float - # MULTILIB_DIRNAMES = hard-float soft-float -Index: gcc-4.3.0/gcc/config/arm/linux-elf.h -=================================================================== ---- gcc-4.3.0/gcc/config/arm/linux-elf.h (revision 129896) -+++ gcc-4.3.0/gcc/config/arm/linux-elf.h (working copy) -@@ -48,7 +62,7 @@ - %{shared:-lc} \ - %{!shared:%{profile:-lc_p}%{!profile:-lc}}" - --#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc" -+#define LIBGCC_SPEC "-lgcc" - - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - diff --git a/toolchain/gcc/4.3.5/993-arm_insn-opinit-RTX_CODE-fixup.patch b/toolchain/gcc/4.3.5/993-arm_insn-opinit-RTX_CODE-fixup.patch deleted file mode 100644 index 69f0c37..0000000 --- a/toolchain/gcc/4.3.5/993-arm_insn-opinit-RTX_CODE-fixup.patch +++ /dev/null @@ -1,41 +0,0 @@ -gcc/ChangeLog -2007-11-27 Bernhard Fischer <> - - * config/arm/arm-protos.h (arm_vector_mode_supported_p, - arm_hard_regno_mode_ok, const_ok_for_arm): Do not hide non-rtx related - function prototypes in RTX_CODE. - * genopinit.c: Include tm_p.h. - -Index: gcc-4.3.0/gcc/config/arm/arm-protos.h -=================================================================== ---- gcc-4.3.0/gcc/config/arm/arm-protos.h (revision 130463) -+++ gcc-4.3.0/gcc/config/arm/arm-protos.h (working copy) -@@ -40,15 +40,14 @@ - unsigned int); - extern unsigned int arm_dbx_register_number (unsigned int); - extern void arm_output_fn_unwind (FILE *, bool); -- - - #ifdef TREE_CODE - extern int arm_return_in_memory (const_tree); - #endif --#ifdef RTX_CODE - extern bool arm_vector_mode_supported_p (enum machine_mode); - extern int arm_hard_regno_mode_ok (unsigned int, enum machine_mode); - extern int const_ok_for_arm (HOST_WIDE_INT); -+#ifdef RTX_CODE - extern int arm_split_constant (RTX_CODE, enum machine_mode, rtx, - HOST_WIDE_INT, rtx, rtx, int); - extern RTX_CODE arm_canonicalize_comparison (RTX_CODE, enum machine_mode, -Index: gcc-4.3.0/gcc/genopinit.c -=================================================================== ---- gcc-4.3.0/gcc/genopinit.c (revision 130463) -+++ gcc-4.3.0/gcc/genopinit.c (working copy) -@@ -486,6 +486,7 @@ - printf ("#include \"expr.h\"\n"); - printf ("#include \"optabs.h\"\n"); - printf ("#include \"reload.h\"\n\n"); -+ printf ("#include \"tm_p.h\"\n\n"); - - printf ("void\ninit_all_optabs (void)\n{\n"); - diff --git a/toolchain/gcc/4.3.5/998-gcc-4.3.0-fix-header.00.patch b/toolchain/gcc/4.3.5/998-gcc-4.3.0-fix-header.00.patch deleted file mode 100644 index 7fe59d2..0000000 --- a/toolchain/gcc/4.3.5/998-gcc-4.3.0-fix-header.00.patch +++ /dev/null @@ -1,15 +0,0 @@ -\\\\ -\\ gcc PR33200 -Index: gcc-4.3.0/gcc/config.gcc -=================================================================== ---- gcc-4.3.0/gcc/config.gcc (revision 131628) -+++ gcc-4.3.0/gcc/config.gcc (working copy) -@@ -2302,7 +2305,7 @@ sh-*-symbianelf* | sh[12346l]*-*-symbian - if test x${enable_incomplete_targets} = xyes ; then - tm_defines="$tm_defines SUPPORT_SH1=1 SUPPORT_SH2E=1 SUPPORT_SH4=1 SUPPORT_SH4_SINGLE=1 SUPPORT_SH2A=1 SUPPORT_SH2A_SINGLE=1 SUPPORT_SH5_32MEDIA=1 SUPPORT_SH5_32MEDIA_NOFPU=1 SUPPORT_SH5_64MEDIA=1 SUPPORT_SH5_64MEDIA_NOFPU=1" - fi -- use_fixproto=yes -+ # XXX: why? use_fixproto=yes - ;; - sh-*-rtemscoff*) - tmake_file="sh/t-sh t-rtems sh/t-rtems" diff --git a/toolchain/gcc/4.3.5/999-4.3.2-armeabi-aapcs-linux.patch b/toolchain/gcc/4.3.5/999-4.3.2-armeabi-aapcs-linux.patch deleted file mode 100644 index f4b1c9c..0000000 --- a/toolchain/gcc/4.3.5/999-4.3.2-armeabi-aapcs-linux.patch +++ /dev/null @@ -1,18 +0,0 @@ -\\\\ followup of PR34205; trying to use aapcs-linux -\\ gcc/ChangeLog -\\ -\\ 2008-09-18 Bernhard Reutner-Fischer -\\ -\\ * config.gcc (arm*-*-*): Add aapcs-linux to supported ABIs. -\\ ---- gcc-4.3.2.orig/gcc/config.gcc 2008-09-18 20:33:55.000000000 +0200 -+++ gcc-4.3.2/gcc/config.gcc 2008-09-18 21:38:52.000000000 +0200 -@@ -2921,7 +2921,7 @@ - - case "$with_abi" in - "" \ -- | apcs-gnu | atpcs | aapcs | iwmmxt ) -+ | apcs-gnu | atpcs | aapcs | iwmmxt | aapcs-linux ) - #OK - ;; - *) diff --git a/toolchain/gcc/4.3.5/999-4.3.3-arm-fix-for-bug-37436.patch b/toolchain/gcc/4.3.5/999-4.3.3-arm-fix-for-bug-37436.patch deleted file mode 100644 index 99a016f..0000000 --- a/toolchain/gcc/4.3.5/999-4.3.3-arm-fix-for-bug-37436.patch +++ /dev/null @@ -1,86 +0,0 @@ -gcc svn 142778: - -PR target/37436 -* arm.c (arm_legitimate_index): Only accept addresses that are in -canonical form. -* predicates.md (arm_reg_or_extendqisi_mem_op): New predicate. -* arm.md (extendqihi2): Use arm_reg_or_extendqisi_mem_op predicate -for operand1. -(extendqisi2): Likewise. -(arm_extendqisi, arm_extendqisi_v6): Use arm_extendqisi_mem_op -predicate for operand1. - -diff -Nura gcc-4.3.3.orig/gcc/config/arm/arm.c gcc-4.3.3/gcc/config/arm/arm.c ---- gcc-4.3.3.orig/gcc/config/arm/arm.c 2008-06-11 07:52:55.000000000 -0300 -+++ gcc-4.3.3/gcc/config/arm/arm.c 2009-05-21 16:06:45.000000000 -0300 -@@ -3769,6 +3769,7 @@ - rtx xop1 = XEXP (x, 1); - - return ((arm_address_register_rtx_p (xop0, strict_p) -+ && GET_CODE(xop1) == CONST_INT - && arm_legitimate_index_p (mode, xop1, outer, strict_p)) - || (arm_address_register_rtx_p (xop1, strict_p) - && arm_legitimate_index_p (mode, xop0, outer, strict_p))); -diff -Nura gcc-4.3.3.orig/gcc/config/arm/arm.md gcc-4.3.3/gcc/config/arm/arm.md ---- gcc-4.3.3.orig/gcc/config/arm/arm.md 2007-09-04 01:44:47.000000000 -0300 -+++ gcc-4.3.3/gcc/config/arm/arm.md 2009-05-21 16:06:45.000000000 -0300 -@@ -4199,7 +4199,7 @@ - - (define_expand "extendqihi2" - [(set (match_dup 2) -- (ashift:SI (match_operand:QI 1 "general_operand" "") -+ (ashift:SI (match_operand:QI 1 "arm_reg_or_extendqisi_mem_op" "") - (const_int 24))) - (set (match_operand:HI 0 "s_register_operand" "") - (ashiftrt:SI (match_dup 2) -@@ -4224,7 +4224,7 @@ - - (define_insn "*arm_extendqihi_insn" - [(set (match_operand:HI 0 "s_register_operand" "=r") -- (sign_extend:HI (match_operand:QI 1 "memory_operand" "Uq")))] -+ (sign_extend:HI (match_operand:QI 1 "arm_extendqisi_mem_op" "Uq")))] - "TARGET_ARM && arm_arch4" - "ldr%(sb%)\\t%0, %1" - [(set_attr "type" "load_byte") -@@ -4235,7 +4235,7 @@ - - (define_expand "extendqisi2" - [(set (match_dup 2) -- (ashift:SI (match_operand:QI 1 "general_operand" "") -+ (ashift:SI (match_operand:QI 1 "arm_reg_or_extendqisi_mem_op" "") - (const_int 24))) - (set (match_operand:SI 0 "s_register_operand" "") - (ashiftrt:SI (match_dup 2) -@@ -4267,7 +4267,7 @@ - - (define_insn "*arm_extendqisi" - [(set (match_operand:SI 0 "s_register_operand" "=r") -- (sign_extend:SI (match_operand:QI 1 "memory_operand" "Uq")))] -+ (sign_extend:SI (match_operand:QI 1 "arm_extendqisi_mem_op" "Uq")))] - "TARGET_ARM && arm_arch4 && !arm_arch6" - "ldr%(sb%)\\t%0, %1" - [(set_attr "type" "load_byte") -@@ -4278,7 +4278,8 @@ - - (define_insn "*arm_extendqisi_v6" - [(set (match_operand:SI 0 "s_register_operand" "=r,r") -- (sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,Uq")))] -+ (sign_extend:SI -+ (match_operand:QI 1 "arm_reg_or_extendqisi_mem_op" "r,Uq")))] - "TARGET_ARM && arm_arch6" - "@ - sxtb%?\\t%0, %1 -diff -Nura gcc-4.3.3.orig/gcc/config/arm/predicates.md gcc-4.3.3/gcc/config/arm/predicates.md ---- gcc-4.3.3.orig/gcc/config/arm/predicates.md 2007-08-02 07:49:31.000000000 -0300 -+++ gcc-4.3.3/gcc/config/arm/predicates.md 2009-05-21 16:06:45.000000000 -0300 -@@ -234,6 +234,10 @@ - (match_test "arm_legitimate_address_p (mode, XEXP (op, 0), SIGN_EXTEND, - 0)"))) - -+(define_special_predicate "arm_reg_or_extendqisi_mem_op" -+ (ior (match_operand 0 "arm_extendqisi_mem_op") -+ (match_operand 0 "s_register_operand"))) -+ - (define_predicate "power_of_two_operand" - (match_code "const_int") - { diff --git a/toolchain/gcc/4.3.5/999-gcc-4.3.0-cris-pragma-pack-warning-remove.patch b/toolchain/gcc/4.3.5/999-gcc-4.3.0-cris-pragma-pack-warning-remove.patch deleted file mode 100644 index dcf01f2..0000000 --- a/toolchain/gcc/4.3.5/999-gcc-4.3.0-cris-pragma-pack-warning-remove.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -urN gcc-4.3.1.orig/gcc/config/cris/cris.h gcc-4.3.1/gcc/config/cris/cris.h ---- gcc-4.3.1.orig/gcc/config/cris/cris.h 2008-02-22 12:11:01.000000000 +0100 -+++ gcc-4.3.1/gcc/config/cris/cris.h 2008-07-02 10:42:42.000000000 +0200 -@@ -1529,9 +1529,6 @@ - - #define NO_IMPLICIT_EXTERN_C - --/* No specific purpose other than warningless compatibility. */ --#define HANDLE_PRAGMA_PACK_PUSH_POP 1 -- - /* - * Local variables: - * eval: (c-set-style "gnu") diff --git a/toolchain/gcc/4.3.5/powerpc-link-with-math-lib.patch.conditional b/toolchain/gcc/4.3.5/powerpc-link-with-math-lib.patch.conditional deleted file mode 100644 index 9d01eba..0000000 --- a/toolchain/gcc/4.3.5/powerpc-link-with-math-lib.patch.conditional +++ /dev/null @@ -1,125 +0,0 @@ -See: http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00237.html -Patch by: Bernhard Reutner-Fischer - ---- gcc-4.3.3/gcc/config/t-slibgcc-elf-ver 2005-02-20 00:44:10.000000000 +1300 -+++ gcc-4.3.3-p/gcc/config/t-slibgcc-elf-ver 2009-05-06 07:05:50.000000000 +1200 -@@ -9,7 +9,7 @@ - SHLIB_OBJS = @shlib_objs@ - SHLIB_DIR = @multilib_dir@ - SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@ --SHLIB_LC = -lc -+SHLIB_LC = @libgcc_libm@ -lc - - SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ - -Wl,--soname=$(SHLIB_SONAME) \ ---- gcc-4.3.3/libgcc/configure 2008-11-21 06:09:53.000000000 +1300 -+++ gcc-4.3.3-p/libgcc/configure 2009-05-06 07:05:50.000000000 +1200 -@@ -272,7 +272,7 @@ - PACKAGE_BUGREPORT='' - - ac_unique_file="static-object.mk" --ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libgcc_topdir enable_shared slibdir INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK build build_cpu build_vendor build_os host host_cpu host_vendor host_os host_noncanonical build_libsubdir build_subdir host_subdir target_subdir AR ac_ct_AR LIPO ac_ct_LIPO NM ac_ct_NM RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP decimal_float enable_decimal_float fixed_point vis_hide set_have_cc_tls tmake_file extra_parts asm_hidden_op LIBOBJS LTLIBOBJS' -+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libgcc_topdir enable_shared slibdir INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK build build_cpu build_vendor build_os host host_cpu host_vendor host_os host_noncanonical build_libsubdir build_subdir host_subdir target_subdir AR ac_ct_AR LIPO ac_ct_LIPO NM ac_ct_NM RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP decimal_float enable_decimal_float fixed_point vis_hide set_have_cc_tls LIBGCC_LIBM tmake_file extra_parts asm_hidden_op LIBOBJS LTLIBOBJS' - ac_subst_files='' - - # Initialize some variables set by options. -@@ -3505,6 +3505,39 @@ - fi - - -+# On powerpc libgcc_s references copysignl which is a libm function but -+# glibc apparently also provides it via libc as opposed to uClibc where -+# it lives in libm. -+echo "$as_me:$LINENO: checking for library containing copysignl" >&5 -+echo $ECHO_N "checking for library containing copysignl... $ECHO_C" >&6 -+if test "${libgcc_cv_copysignl_lib+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ -+ echo '#include ' > conftest.c -+ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c -+ libgcc_cv_copysignl_lib="-lc" -+ if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } -+ then -+ libgcc_cv_copysignl_lib="-lm" -+ fi -+ rm -f conftest.* -+ -+fi -+echo "$as_me:$LINENO: result: $libgcc_cv_copysignl_lib" >&5 -+echo "${ECHO_T}$libgcc_cv_copysignl_lib" >&6 -+ -+case /${libgcc_cv_copysignl_lib}/ in -+ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;; -+ *) LIBGCC_LIBM= ;; -+esac -+ -+ - # Conditionalize the makefile for this target machine. - tmake_file_= - for f in ${tmake_file} -@@ -4225,6 +4258,7 @@ - s,@fixed_point@,$fixed_point,;t t - s,@vis_hide@,$vis_hide,;t t - s,@set_have_cc_tls@,$set_have_cc_tls,;t t -+s,@LIBGCC_LIBM@,$LIBGCC_LIBM,;t t - s,@tmake_file@,$tmake_file,;t t - s,@extra_parts@,$extra_parts,;t t - s,@asm_hidden_op@,$asm_hidden_op,;t t ---- gcc-4.3.3/libgcc/configure.ac 2008-11-21 06:09:53.000000000 +1300 -+++ gcc-4.3.3-p/libgcc/configure.ac 2009-05-06 07:05:50.000000000 +1200 -@@ -207,6 +207,27 @@ - fi - AC_SUBST(set_have_cc_tls) - -+# On powerpc libgcc_s references copysignl which is a libm function but -+# glibc apparently also provides it via libc as opposed to uClibc where -+# it lives in libm. -+AC_CACHE_CHECK([for library containing copysignl], -+ libgcc_cv_copysignl_lib, [ -+ echo '#include ' > conftest.c -+ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c -+ libgcc_cv_copysignl_lib="-lc" -+ if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD) -+ then -+ libgcc_cv_copysignl_lib="-lm" -+ fi -+ rm -f conftest.* -+ ]) -+ -+case /${libgcc_cv_copysignl_lib}/ in -+ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;; -+ *) LIBGCC_LIBM= ;; -+esac -+AC_SUBST(LIBGCC_LIBM) -+ - # Conditionalize the makefile for this target machine. - tmake_file_= - for f in ${tmake_file} ---- gcc-4.3.3/libgcc/Makefile.in 2008-06-17 21:32:34.000000000 +1200 -+++ gcc-4.3.3-p/libgcc/Makefile.in 2009-05-06 07:05:50.000000000 +1200 -@@ -40,6 +40,7 @@ - decimal_float = @decimal_float@ - enable_decimal_float = @enable_decimal_float@ - fixed_point = @fixed_point@ -+LIBGCC_LIBM = @LIBGCC_LIBM@ - - host_noncanonical = @host_noncanonical@ - -@@ -738,9 +739,10 @@ - @multilib_dir@,$(MULTIDIR),$(subst \ - @shlib_objs@,$(objects),$(subst \ - @shlib_base_name@,libgcc_s,$(subst \ -+ @libgcc_libm@,$(LIBGCC_LIBM),$(subst \ - @shlib_map_file@,$(mapfile),$(subst \ - @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \ -- @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK)))))))) -+ @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))) - - libunwind$(SHLIB_EXT): $(libunwind-s-objects) $(extra-parts) - # @multilib_flags@ is still needed because this may use diff --git a/toolchain/gcc/4.6.0/100-uclibc-conf.patch b/toolchain/gcc/4.6.0/100-uclibc-conf.patch deleted file mode 100644 index cca8c82..0000000 --- a/toolchain/gcc/4.6.0/100-uclibc-conf.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- gcc/gcc/config/--- gcc/contrib/regression/objs-gcc.sh -+++ gcc/contrib/regression/objs-gcc.sh -@@ -105,6 +105,10 @@ - then - make all-gdb all-dejagnu all-ld || exit 1 - make install-gdb install-dejagnu install-ld || exit 1 -+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] -+ then -+ make all-gdb all-dejagnu all-ld || exit 1 -+ make install-gdb install-dejagnu install-ld || exit 1 - elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then - make bootstrap || exit 1 - make install || exit 1 ---- gcc/libjava/classpath/ltconfig -+++ gcc/libjava/classpath/ltconfig -@@ -603,7 +603,7 @@ - - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in --linux-gnu*) ;; -+linux-gnu*|linux-uclibc*) ;; - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac - -@@ -1251,7 +1251,7 @@ - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - version_type=linux - need_lib_prefix=no - need_version=no diff --git a/toolchain/gcc/4.6.0/301-missing-execinfo_h.patch b/toolchain/gcc/4.6.0/301-missing-execinfo_h.patch deleted file mode 100644 index 0e2092f..0000000 --- a/toolchain/gcc/4.6.0/301-missing-execinfo_h.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500 -+++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500 -@@ -500,7 +500,7 @@ - #ifdef __linux__ - # include - # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ -- && !defined(__ia64__) -+ && !defined(__ia64__) && !defined(__UCLIBC__) - # ifndef GC_HAVE_BUILTIN_BACKTRACE - # define GC_HAVE_BUILTIN_BACKTRACE - # endif diff --git a/toolchain/gcc/4.6.0/302-c99-snprintf.patch b/toolchain/gcc/4.6.0/302-c99-snprintf.patch deleted file mode 100644 index ba51a0e..0000000 --- a/toolchain/gcc/4.6.0/302-c99-snprintf.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: gcc-4.3.0/libstdc++-v3/include/c_global/cstdio -=================================================================== ---- gcc-4.3.0/libstdc++-v3/include/c_global/cstdio (revision 129202) -+++ gcc-4.3.0/libstdc++-v3/include/c_global/cstdio (working copy) -@@ -144,7 +144,7 @@ - - _GLIBCXX_END_NAMESPACE - --#if _GLIBCXX_USE_C99 -+#if _GLIBCXX_USE_C99 || defined __UCLIBC__ - - #undef snprintf - #undef vfscanf diff --git a/toolchain/gcc/4.6.0/305-libmudflap-susv3-legacy.patch b/toolchain/gcc/4.6.0/305-libmudflap-susv3-legacy.patch deleted file mode 100644 index 374b1f8..0000000 --- a/toolchain/gcc/4.6.0/305-libmudflap-susv3-legacy.patch +++ /dev/null @@ -1,49 +0,0 @@ -Index: gcc-4.2/libmudflap/mf-hooks2.c -=================================================================== ---- gcc-4.2/libmudflap/mf-hooks2.c (revision 119834) -+++ gcc-4.2/libmudflap/mf-hooks2.c (working copy) -@@ -427,7 +427,7 @@ - { - TRACE ("%s\n", __PRETTY_FUNCTION__); - MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region"); -- bzero (s, n); -+ memset (s, 0, n); - } - - -@@ -437,7 +437,7 @@ - TRACE ("%s\n", __PRETTY_FUNCTION__); - MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src"); - MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest"); -- bcopy (src, dest, n); -+ memmove (dest, src, n); - } - - -@@ -447,7 +447,7 @@ - TRACE ("%s\n", __PRETTY_FUNCTION__); - MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg"); - MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg"); -- return bcmp (s1, s2, n); -+ return n == 0 ? 0 : memcmp (s1, s2, n); - } - - -@@ -456,7 +456,7 @@ - size_t n = strlen (s); - TRACE ("%s\n", __PRETTY_FUNCTION__); - MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region"); -- return index (s, c); -+ return strchr (s, c); - } - - -@@ -465,7 +465,7 @@ - size_t n = strlen (s); - TRACE ("%s\n", __PRETTY_FUNCTION__); - MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region"); -- return rindex (s, c); -+ return strrchr (s, c); - } - - /* XXX: stpcpy, memccpy */ diff --git a/toolchain/gcc/4.6.0/810-arm-softfloat-libgcc.patch b/toolchain/gcc/4.6.0/810-arm-softfloat-libgcc.patch deleted file mode 100644 index e6a30a3..0000000 --- a/toolchain/gcc/4.6.0/810-arm-softfloat-libgcc.patch +++ /dev/null @@ -1,38 +0,0 @@ -[PATCH] add the correct symbols to libgcc for uclibc arm softfloat - -Signed-off-by: Peter Korsgaard ---- - gcc/config/arm/linux-elf.h | 2 +- - gcc/config/arm/t-linux | 6 +++++- - 2 files changed, 6 insertions(+), 2 deletions(-) - -Index: gcc-4.4.0/gcc/config/arm/t-linux -=================================================================== ---- gcc-4.4.0.orig/gcc/config/arm/t-linux -+++ gcc-4.4.0/gcc/config/arm/t-linux -@@ -4,7 +4,11 @@ - - LIB1ASMSRC = arm/lib1funcs.asm - LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ -- _arm_addsubdf3 _arm_addsubsf3 -+ _arm_addsubdf3 _arm_addsubsf3 \ -+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ -+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ -+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ -+ _arm_fixsfsi _arm_fixunssfsi - - # MULTILIB_OPTIONS = mhard-float/msoft-float - # MULTILIB_DIRNAMES = hard-float soft-float -Index: gcc-4.4.0/gcc/config/arm/linux-elf.h -=================================================================== ---- gcc-4.4.0.orig/gcc/config/arm/linux-elf.h -+++ gcc-4.4.0/gcc/config/arm/linux-elf.h -@@ -60,7 +60,7 @@ - %{shared:-lc} \ - %{!shared:%{profile:-lc_p}%{!profile:-lc}}" - --#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc" -+#define LIBGCC_SPEC "-lgcc" - - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - diff --git a/toolchain/gcc/4.6.0/820-arm-unbreak-armv4t.patch b/toolchain/gcc/4.6.0/820-arm-unbreak-armv4t.patch deleted file mode 100644 index 8651afc..0000000 --- a/toolchain/gcc/4.6.0/820-arm-unbreak-armv4t.patch +++ /dev/null @@ -1,14 +0,0 @@ -http://sourceware.org/ml/crossgcc/2008-05/msg00009.html - -diff -Nura gcc-4.5.1.orig/gcc/config/arm/linux-eabi.h gcc-4.5.1/gcc/config/arm/linux-eabi.h ---- gcc-4.5.1.orig/gcc/config/arm/linux-eabi.h 2009-10-30 17:03:09.000000000 -0300 -+++ gcc-4.5.1/gcc/config/arm/linux-eabi.h 2010-11-02 15:38:25.792208500 -0300 -@@ -44,7 +44,7 @@ - The ARM10TDMI core is the default for armv5t, so set - SUBTARGET_CPU_DEFAULT to achieve this. */ - #undef SUBTARGET_CPU_DEFAULT --#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi -+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi - - /* TARGET_BIG_ENDIAN_DEFAULT is set in - config.gcc for big endian configurations. */ diff --git a/toolchain/gcc/4.6.0/powerpc-link-with-math-lib.patch.conditional b/toolchain/gcc/4.6.0/powerpc-link-with-math-lib.patch.conditional deleted file mode 100644 index 7e75e87..0000000 --- a/toolchain/gcc/4.6.0/powerpc-link-with-math-lib.patch.conditional +++ /dev/null @@ -1,125 +0,0 @@ -http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00269.html - -On glibc the libc.so carries a copy of the math function copysignl() but -on uClibc math functions like copysignl() live in libm. Since libgcc_s -contains unresolved symbols, any attempt to link against libgcc_s -without explicitely specifying -lm fails, resulting in a broken -bootstrap of the compiler. - -Forward port to gcc 4.5.1 by Gustavo Zacarias - -diff -Nura gcc-4.5.1.orig/gcc/config/t-slibgcc-elf-ver gcc-4.5.1/gcc/config/t-slibgcc-elf-ver ---- gcc-4.5.1.orig/gcc/config/t-slibgcc-elf-ver 2010-11-03 14:35:08.644904042 -0300 -+++ gcc-4.5.1/gcc/config/t-slibgcc-elf-ver 2010-11-03 14:35:56.332904024 -0300 -@@ -27,7 +27,7 @@ - SHLIB_OBJS = @shlib_objs@ - SHLIB_DIR = @multilib_dir@ - SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@ --SHLIB_LC = -lc -+SHLIB_LC = @libgcc_libm@ -lc - SHLIB_MAKE_SOLINK = $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK) - SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \ - $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK) -diff -Nura gcc-4.5.1.orig/libgcc/Makefile.in gcc-4.5.1/libgcc/Makefile.in ---- gcc-4.5.1.orig/libgcc/Makefile.in 2010-11-03 14:32:44.272904042 -0300 -+++ gcc-4.5.1/libgcc/Makefile.in 2010-11-03 14:37:03.893904042 -0300 -@@ -39,6 +39,7 @@ - decimal_float = @decimal_float@ - enable_decimal_float = @enable_decimal_float@ - fixed_point = @fixed_point@ -+LIBGCC_LIBM = @LIBGCC_LIBM@ - - host_noncanonical = @host_noncanonical@ - -@@ -798,9 +799,10 @@ - @multilib_dir@,$(MULTIDIR),$(subst \ - @shlib_objs@,$(objects),$(subst \ - @shlib_base_name@,libgcc_s,$(subst \ -+ @libgcc_libm@,$(LIBGCC_LIBM),$(subst \ - @shlib_map_file@,$(mapfile),$(subst \ - @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \ -- @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK)))))))) -+ @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))) - - libunwind$(SHLIB_EXT): $(libunwind-s-objects) $(extra-parts) - # @multilib_flags@ is still needed because this may use -diff -Nura gcc-4.5.1.orig/libgcc/configure gcc-4.5.1/libgcc/configure ---- gcc-4.5.1.orig/libgcc/configure 2010-11-03 14:32:44.283904042 -0300 -+++ gcc-4.5.1/libgcc/configure 2010-11-03 14:39:48.685904042 -0300 -@@ -557,6 +557,7 @@ - extra_parts - tmake_file - set_use_emutls -+LIBGCC_LIBM - set_have_cc_tls - vis_hide - fixed_point -@@ -3847,6 +3848,37 @@ - set_use_emutls="-DUSE_EMUTLS" - fi - -+# On powerpc libgcc_s references copysignl which is a libm function but -+# glibc apparently also provides it via libc as opposed to uClibc where -+# it lives in libm. -+echo "$as_me:$LINENO: checking for library containing copysignl" >&5 -+echo $ECHO_N "checking for library containing copysignl... $ECHO_C" >&6 -+if test "${libgcc_cv_copysignl_lib+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ -+ echo '#include ' > conftest.c -+ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c -+ libgcc_cv_copysignl_lib="-lc" -+ if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } -+ then -+ libgcc_cv_copysignl_lib="-lm" -+ fi -+ rm -f conftest.* -+ -+fi -+echo "$as_me:$LINENO: result: $libgcc_cv_copysignl_lib" >&5 -+echo "${ECHO_T}$libgcc_cv_copysignl_lib" >&6 -+ -+case /${libgcc_cv_copysignl_lib}/ in -+ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;; -+ *) LIBGCC_LIBM= ;; -+esac - - # Conditionalize the makefile for this target machine. - tmake_file_= -diff -Nura gcc-4.5.1.orig/libgcc/configure.ac gcc-4.5.1/libgcc/configure.ac ---- gcc-4.5.1.orig/libgcc/configure.ac 2010-11-03 14:32:44.735904042 -0300 -+++ gcc-4.5.1/libgcc/configure.ac 2010-11-03 14:42:11.278904045 -0300 -@@ -238,6 +238,27 @@ - fi - AC_SUBST(set_have_cc_tls) - -+# On powerpc libgcc_s references copysignl which is a libm function but -+# glibc apparently also provides it via libc as opposed to uClibc where -+# it lives in libm. -+AC_CACHE_CHECK -+ libgcc_cv_copysignl_lib, -+ echo '#include ' > conftest.c -+ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c -+ libgcc_cv_copysignl_lib="-lc" -+ if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD) -+ then -+ libgcc_cv_copysignl_lib="-lm" -+ fi -+ rm -f conftest.* -+ ]) -+ -+case /${libgcc_cv_copysignl_lib}/ in -+ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;; -+ *) LIBGCC_LIBM= ;; -+esac -+AC_SUBST(LIBGCC_LIBM) -+ - # See if we have emulated thread-local storage. - GCC_CHECK_EMUTLS - set_use_emutls= diff --git a/toolchain/gdb/6.6/100-uclibc-conf.patch b/toolchain/gdb/6.6/100-uclibc-conf.patch deleted file mode 100644 index a790b6f..0000000 --- a/toolchain/gdb/6.6/100-uclibc-conf.patch +++ /dev/null @@ -1,82 +0,0 @@ -diff -rNdup gdb-6.6.orig/bfd/configure gdb-6.6/bfd/configure ---- gdb-6.6.orig/bfd/configure 2006-10-25 08:49:20.000000000 +0200 -+++ gdb-6.6/bfd/configure 2007-05-14 10:35:50.000000000 +0200 -@@ -3579,6 +3579,11 @@ linux-gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd* | knetbsd*-gnu) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -rNdup gdb-6.6.orig/libtool.m4 gdb-6.6/libtool.m4 ---- gdb-6.6.orig/libtool.m4 2005-12-27 17:37:57.000000000 +0100 -+++ gdb-6.6/libtool.m4 2007-05-14 10:35:50.000000000 +0200 -@@ -751,6 +751,11 @@ netbsd* | knetbsd*-gnu) - fi - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - newsos6) - [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'] - lt_cv_file_magic_cmd=/usr/bin/file -diff -rNdup gdb-6.6.orig/ltconfig gdb-6.6/ltconfig ---- gdb-6.6.orig/ltconfig 2006-07-04 22:31:03.000000000 +0200 -+++ gdb-6.6/ltconfig 2007-05-14 10:35:50.000000000 +0200 -@@ -602,7 +602,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)- - - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in --linux-gnu*) ;; -+linux-gnu*|linux-uclibc*) ;; - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac - -@@ -1270,6 +1270,24 @@ linux-gnu*) - dynamic_linker='GNU/Linux ld.so' - ;; - -+linux-uclibc*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=no -+ # This implies no fast_install, which is unacceptable. -+ # Some rework will be needed to allow for fast_install -+ # before this can be enabled. -+ # Note: copied from linux-gnu, and may not be appropriate. -+ hardcode_into_libs=yes -+ # Assume using the uClibc dynamic linker. -+ dynamic_linker="uClibc ld.so" -+ ;; -+ - netbsd*) - need_lib_prefix=no - need_version=no -diff -rNdup gdb-6.6.orig/opcodes/configure gdb-6.6/opcodes/configure ---- gdb-6.6.orig/opcodes/configure 2006-10-25 08:49:20.000000000 +0200 -+++ gdb-6.6/opcodes/configure 2007-05-14 10:35:50.000000000 +0200 -@@ -3590,6 +3590,11 @@ netbsd* | knetbsd*-gnu) - fi - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - newsos6) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file diff --git a/toolchain/gdb/6.6/600-fix-compile-flag-mismatch.patch b/toolchain/gdb/6.6/600-fix-compile-flag-mismatch.patch deleted file mode 100644 index 60f0ace..0000000 --- a/toolchain/gdb/6.6/600-fix-compile-flag-mismatch.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff -rduNp gdb-6.6-100/Makefile.in gdb-6.6/Makefile.in ---- gdb-6.6-100/Makefile.in 2006-12-18 08:21:19.000000000 +0100 -+++ gdb-6.6/Makefile.in 2007-05-14 10:54:29.000000000 +0200 -@@ -331,7 +331,7 @@ COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_ - # CFLAGS will be just -g. We want to ensure that TARGET libraries - # (which we know are built with gcc) are built with optimizations so - # prepend -O2 when setting CFLAGS_FOR_TARGET. --CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) -+CFLAGS_FOR_TARGET = $(strip $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)) - SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@ - CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) - LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) -diff -rduNp gdb-6.6-100/Makefile.tpl gdb-6.6/Makefile.tpl ---- gdb-6.6-100/Makefile.tpl 2006-11-15 00:26:39.000000000 +0100 -+++ gdb-6.6/Makefile.tpl 2007-05-14 10:54:29.000000000 +0200 -@@ -334,7 +334,7 @@ COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_ - # CFLAGS will be just -g. We want to ensure that TARGET libraries - # (which we know are built with gcc) are built with optimizations so - # prepend -O2 when setting CFLAGS_FOR_TARGET. --CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) -+CFLAGS_FOR_TARGET = $(strip $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)) - SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@ - CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) - LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) -diff -rduNp gdb-6.6-100/gdb/configure gdb-6.6/gdb/configure ---- gdb-6.6-100/gdb/configure 2006-12-17 16:38:59.000000000 +0100 -+++ gdb-6.6/gdb/configure 2007-05-14 10:55:41.000000000 +0200 -@@ -272,7 +272,7 @@ PACKAGE_STRING= - PACKAGE_BUGREPORT= - - ac_unique_file="main.c" --ac_subdirs_all="$ac_subdirs_all doc testsuite" -+ac_subdirs_all="$ac_subdirs_all doc" - # Factoring default headers for most tests. - ac_includes_default="\ - #include -@@ -3055,7 +3055,7 @@ _ACEOF - - - --subdirs="$subdirs doc testsuite" -+subdirs="$subdirs doc" - - - # Provide defaults for some variables set by the per-host and per-target -diff -rduNp gdb-6.6-100/gdb/gdbserver/configure gdb-6.6/gdb/gdbserver/configure ---- gdb-6.6-100/gdb/gdbserver/configure 2006-11-22 01:10:19.000000000 +0100 -+++ gdb-6.6/gdb/gdbserver/configure 2007-05-14 10:54:29.000000000 +0200 -@@ -1239,7 +1239,7 @@ echo "$as_me: error: \`$ac_var' was not - ac_cache_corrupted=: ;; - ,);; - *) -- if test "x$ac_old_val" != "x$ac_new_val"; then -+ if test "`echo $ac_old_val`" != "`echo $ac_new_val`"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 - echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -diff -rduNp gdb-6.6-100/gdb/testsuite/configure gdb-6.6/gdb/testsuite/configure ---- gdb-6.6-100/gdb/testsuite/configure 2006-06-21 15:57:21.000000000 +0200 -+++ gdb-6.6/gdb/testsuite/configure 2007-05-14 10:54:29.000000000 +0200 -@@ -1248,7 +1248,7 @@ echo "$as_me: error: \`$ac_var' was not - ac_cache_corrupted=: ;; - ,);; - *) -- if test "x$ac_old_val" != "x$ac_new_val"; then -+ if test "`echo $ac_old_val" != "`echo $ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 - echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 diff --git a/toolchain/gdb/6.6/gdb-6.6-bfin-gdbserver.patch b/toolchain/gdb/6.6/gdb-6.6-bfin-gdbserver.patch deleted file mode 100644 index 65c4b90..0000000 --- a/toolchain/gdb/6.6/gdb-6.6-bfin-gdbserver.patch +++ /dev/null @@ -1,238 +0,0 @@ ---- gdb-6.6/gdb/gdbserver/configure.srv -+++ gdb-6.6/gdb/gdbserver/configure.srv -@@ -23,6 +23,11 @@ case "${target}" in - srv_linux_usrregs=yes - srv_linux_thread_db=yes - ;; -+ bfin-*-*) srv_regobj=reg-bfin.o -+ srv_tgtobj="linux-low.o linux-bfin-low.o" -+ srv_linux_usrregs=yes -+ srv_linux_thread_db=yes -+ ;; - crisv32-*-linux*) srv_regobj=reg-crisv32.o - srv_tgtobj="linux-low.o linux-crisv32-low.o" - srv_linux_regsets=yes ---- gdb-6.6/gdb/gdbserver/linux-bfin-low.c -+++ gdb-6.6/gdb/gdbserver/linux-bfin-low.c -@@ -0,0 +1,101 @@ -+/* GNU/Linux/BFIN specific low level interface, for the remote server for GDB. -+ -+ Copyright (C) 2005 Free Software Foundation, Inc. -+ Contributed by Analog Devices. -+ -+ This file is part of GDB. -+ -+ This program is free software; you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program; if not, write to the Free Software -+ Foundation, Inc., 51 Franklin Street, Fifth Floor, -+ Boston, MA 02110-1301, USA. */ -+ -+#include "server.h" -+#include "linux-low.h" -+#include -+ -+static int bfin_regmap[] = -+{ -+ PT_R0, PT_R1, PT_R2, PT_R3, PT_R4, PT_R5, PT_R6, PT_R7, -+ PT_P0, PT_P1, PT_P2, PT_P3, PT_P4, PT_P5, PT_USP, PT_FP, -+ PT_I0, PT_I1, PT_I2, PT_I3, PT_M0, PT_M1, PT_M2, PT_M3, -+ PT_B0, PT_B1, PT_B2, PT_B3, PT_L0, PT_L1, PT_L2, PT_L3, -+ PT_A0X, PT_A0W, PT_A1X, PT_A1W, PT_ASTAT, PT_RETS, -+ PT_LC0, PT_LT0, PT_LB0, PT_LC1, PT_LT1, PT_LB1, -+ -1 /* PT_CYCLES */, -1 /* PT_CYCLES2 */, -+ -1 /* PT_USP */, PT_SEQSTAT, PT_SYSCFG, PT_PC, PT_RETX, PT_RETN, PT_RETE, -+ PT_PC, -1 /* PT_CC */, PT_TEXT_ADDR, PT_TEXT_END_ADDR, PT_DATA_ADDR, -+ PT_FDPIC_EXEC, PT_FDPIC_INTERP, -+ PT_IPEND -+}; -+ -+#define bfin_num_regs (sizeof(bfin_regmap) / sizeof(bfin_regmap[0])) -+ -+static int -+bfin_cannot_store_register (int regno) -+{ -+ return (regno >= bfin_num_regs); -+} -+ -+static int -+bfin_cannot_fetch_register (int regno) -+{ -+ return (regno >= bfin_num_regs); -+} -+ -+static CORE_ADDR -+bfin_get_pc () -+{ -+ unsigned long pc; -+ collect_register_by_name ("pc", &pc); -+ return pc; -+} -+ -+static void -+bfin_set_pc (CORE_ADDR pc) -+{ -+ unsigned long newpc = pc; -+ supply_register_by_name ("pc", &newpc); -+} -+ -+#define bfin_breakpoint_len 2 -+static const unsigned char bfin_breakpoint[bfin_breakpoint_len]={0xa1, 0x00}; -+ -+static int -+bfin_breakpoint_at (CORE_ADDR where) -+{ -+ unsigned char insn[bfin_breakpoint_len]; -+ -+ read_inferior_memory(where, insn, bfin_breakpoint_len); -+ if (insn[0] == bfin_breakpoint[0] -+ && insn[1] == bfin_breakpoint[1]) -+ return 1; -+ -+ /* If necessary, recognize more trap instructions here. GDB only uses the -+ one. */ -+ return 0; -+} -+ -+struct linux_target_ops the_low_target = { -+ bfin_num_regs, -+ bfin_regmap, -+ bfin_cannot_fetch_register, -+ bfin_cannot_store_register, -+ bfin_get_pc, -+ bfin_set_pc, -+ bfin_breakpoint, -+ bfin_breakpoint_len, -+ 0, -+ 2, -+ bfin_breakpoint_at, -+}; ---- gdb-6.6/gdb/gdbserver/linux-low.c -+++ gdb-6.6/gdb/gdbserver/linux-low.c -@@ -1592,6 +1592,10 @@ linux_stopped_data_address (void) - #define PT_TEXT_ADDR 49*4 - #define PT_DATA_ADDR 50*4 - #define PT_TEXT_END_ADDR 51*4 -+#elif defined(BFIN) -+#define PT_TEXT_ADDR 220 -+#define PT_TEXT_END_ADDR 224 -+#define PT_DATA_ADDR 228 - #endif - - /* Under uClinux, programs are loaded at non-zero offsets, which we need ---- gdb-6.6/gdb/gdbserver/Makefile.in -+++ gdb-6.6/gdb/gdbserver/Makefile.in -@@ -119,9 +119,9 @@ SFILES= $(srcdir)/gdbreplay.c $(srcdir)/ - $(srcdir)/mem-break.c $(srcdir)/proc-service.c $(srcdir)/regcache.c \ - $(srcdir)/remote-utils.c $(srcdir)/server.c $(srcdir)/target.c \ - $(srcdir)/thread-db.c $(srcdir)/utils.c \ -- $(srcdir)/linux-arm-low.c $(srcdir)/linux-cris-low.c \ -- $(srcdir)/linux-crisv32-low.c $(srcdir)/linux-i386-low.c \ -- $(srcdir)/i387-fp.c \ -+ $(srcdir)/linux-arm-low.c $(srcdir)/linux-bfin-low.c \ -+ $(srcdir)/linux-cris-low.c $(srcdir)/linux-crisv32-low.c \ -+ $(srcdir)/linux-i386-low.c $(srcdir)/i387-fp.c \ - $(srcdir)/linux-ia64-low.c $(srcdir)/linux-low.c \ - $(srcdir)/linux-m32r-low.c \ - $(srcdir)/linux-m68k-low.c $(srcdir)/linux-mips-low.c \ -@@ -207,6 +207,7 @@ clean: - rm -f reg-arm.c reg-i386.c reg-ia64.c reg-m32r.c reg-m68k.c reg-mips.c - rm -f reg-ppc.c reg-sh.c reg-spu.c reg-x86-64.c reg-i386-linux.c - rm -f reg-cris.c reg-crisv32.c reg-x86-64-linux.c -+ rm -f reg-bfin.c - - maintainer-clean realclean distclean: clean - rm -f nm.h tm.h xm.h config.status config.h stamp-h config.log -@@ -272,6 +273,7 @@ linux-low.o: linux-low.c $(linux_low_h) - - linux-arm-low.o: linux-arm-low.c $(linux_low_h) $(server_h) \ - $(gdb_proc_service_h) -+linux-bfin-low.o: linux-bfin-low.c $(linux_low_h) $(server_h) - linux-cris-low.o: linux-cris-low.c $(linux_low_h) $(server_h) - linux-crisv32-low.o: linux-crisv32-low.c $(linux_low_h) $(server_h) - linux-i386-low.o: linux-i386-low.c $(linux_low_h) $(server_h) \ -@@ -294,6 +297,9 @@ spu-low.o: spu-low.c $(server_h) - reg-arm.o : reg-arm.c $(regdef_h) - reg-arm.c : $(srcdir)/../regformats/reg-arm.dat $(regdat_sh) - sh $(regdat_sh) $(srcdir)/../regformats/reg-arm.dat reg-arm.c -+reg-bfin.o : reg-bfin.c $(regdef_h) -+reg-bfin.c : $(srcdir)/../regformats/reg-bfin.dat $(regdat_sh) -+ sh $(regdat_sh) $(srcdir)/../regformats/reg-bfin.dat reg-bfin.c - reg-cris.o : reg-cris.c $(regdef_h) - reg-cris.c : $(srcdir)/../regformats/reg-cris.dat $(regdat_sh) - sh $(regdat_sh) $(srcdir)/../regformats/reg-cris.dat reg-cris.c ---- gdb-6.6/gdb/regformats/reg-bfin.dat -+++ gdb-6.6/gdb/regformats/reg-bfin.dat -@@ -0,0 +1,63 @@ -+name:bfin -+expedite:pc,sp,fp -+32:r0 -+32:r1 -+32:r2 -+32:r3 -+32:r4 -+32:r5 -+32:r6 -+32:r7 -+32:p0 -+32:p1 -+32:p2 -+32:p3 -+32:p4 -+32:p5 -+32:sp -+32:fp -+32:i0 -+32:i1 -+32:i2 -+32:i3 -+32:m0 -+32:m1 -+32:m2 -+32:m3 -+32:b0 -+32:b1 -+32:b2 -+32:b3 -+32:l0 -+32:l1 -+32:l2 -+32:l3 -+32:a0x -+32:a0w -+32:a1x -+32:a1w -+32:astat -+32:rets -+32:lc0 -+32:lt0 -+32:lb0 -+32:lc1 -+32:lt1 -+32:lb1 -+32:cycles -+32:cycles2 -+32:usp -+32:seqstat -+32:syscfg -+32:reti -+32:retx -+32:retn -+32:rete -+32:pc -+32:cc -+32:text_addr -+32:text_end_addr -+32:data_addr -+32:fdpic_exec -+32:fdpic_interp -+32:ipend diff --git a/toolchain/gdb/6.7.1/600-fix-compile-flag-mismatch.patch b/toolchain/gdb/6.7.1/600-fix-compile-flag-mismatch.patch deleted file mode 100644 index 13b72bb..0000000 --- a/toolchain/gdb/6.7.1/600-fix-compile-flag-mismatch.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/gdb/gdbserver/configure -+++ b/gdb/gdbserver/configure -@@ -1239,7 +1239,7 @@ - ac_cache_corrupted=: ;; - ,);; - *) -- if test "x$ac_old_val" != "x$ac_new_val"; then -+ if test "`echo x$ac_old_val`" != "`echo x$ac_new_val`"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 - echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 ---- a/gdb/configure -+++ b/gdb/configure -@@ -272,7 +272,7 @@ - PACKAGE_BUGREPORT= - - ac_unique_file="main.c" --ac_subdirs_all="$ac_subdirs_all doc testsuite" -+ac_subdirs_all="$ac_subdirs_all doc" - # Factoring default headers for most tests. - ac_includes_default="\ - #include -@@ -3077,7 +3077,7 @@ - - - --subdirs="$subdirs doc testsuite" -+subdirs="$subdirs doc" - - - # Provide defaults for some variables set by the per-host and per-target diff --git a/toolchain/gdb/6.8/600-fix-compile-flag-mismatch.patch b/toolchain/gdb/6.8/600-fix-compile-flag-mismatch.patch deleted file mode 100644 index 13b72bb..0000000 --- a/toolchain/gdb/6.8/600-fix-compile-flag-mismatch.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/gdb/gdbserver/configure -+++ b/gdb/gdbserver/configure -@@ -1239,7 +1239,7 @@ - ac_cache_corrupted=: ;; - ,);; - *) -- if test "x$ac_old_val" != "x$ac_new_val"; then -+ if test "`echo x$ac_old_val`" != "`echo x$ac_new_val`"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 - echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 ---- a/gdb/configure -+++ b/gdb/configure -@@ -272,7 +272,7 @@ - PACKAGE_BUGREPORT= - - ac_unique_file="main.c" --ac_subdirs_all="$ac_subdirs_all doc testsuite" -+ac_subdirs_all="$ac_subdirs_all doc" - # Factoring default headers for most tests. - ac_includes_default="\ - #include -@@ -3077,7 +3077,7 @@ - - - --subdirs="$subdirs doc testsuite" -+subdirs="$subdirs doc" - - - # Provide defaults for some variables set by the per-host and per-target diff --git a/toolchain/kernel-headers/linux-2.6.35.13-scsi-use-__uX-types-for-headers-exported-to-user-space.patch b/toolchain/kernel-headers/linux-2.6.35.13-scsi-use-__uX-types-for-headers-exported-to-user-space.patch deleted file mode 100644 index 1089c71..0000000 --- a/toolchain/kernel-headers/linux-2.6.35.13-scsi-use-__uX-types-for-headers-exported-to-user-space.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 877aa0313e7d22b88d04ebef76392e1688fffff9 Mon Sep 17 00:00:00 2001 -From: Peter Korsgaard -Date: Fri, 27 Nov 2009 11:20:54 +0100 -Subject: [PATCH] scsi: use __uX types for headers exported to user space -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Commit 9e4f5e29 (FC Pass Thru support) exported a number of header files -in include/scsi to user space, but didn't change the uX types to the -userspace-compatible __uX types. Without that you'll get compile errors -when including them - E.G.: - -/tmp/include/scsi/scsi.h:145: error: expected specifier-qualifier-list -before ‘u8’ - -Signed-off-by: Peter Korsgaard ---- - include/scsi/scsi.h | 8 ++++---- - include/scsi/scsi_netlink.h | 4 ++-- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h -index 8b4deca..ec3053e 100644 ---- a/include/scsi/scsi.h -+++ b/include/scsi/scsi.h -@@ -149,10 +149,10 @@ struct scsi_cmnd; - - /* defined in T10 SCSI Primary Commands-2 (SPC2) */ - struct scsi_varlen_cdb_hdr { -- u8 opcode; /* opcode always == VARIABLE_LENGTH_CMD */ -- u8 control; -- u8 misc[5]; -- u8 additional_cdb_length; /* total cdb length - 8 */ -+ __u8 opcode; /* opcode always == VARIABLE_LENGTH_CMD */ -+ __u8 control; -+ __u8 misc[5]; -+ __u8 additional_cdb_length; /* total cdb length - 8 */ - __be16 service_action; - /* service specific data follows */ - }; -diff --git a/include/scsi/scsi_netlink.h b/include/scsi/scsi_netlink.h -index 536752c..58ce8fe 100644 ---- a/include/scsi/scsi_netlink.h -+++ b/include/scsi/scsi_netlink.h -@@ -105,8 +105,8 @@ struct scsi_nl_host_vendor_msg { - * PCI : ID data is the 16 bit PCI Registered Vendor ID - */ - #define SCSI_NL_VID_TYPE_SHIFT 56 --#define SCSI_NL_VID_TYPE_MASK ((u64)0xFF << SCSI_NL_VID_TYPE_SHIFT) --#define SCSI_NL_VID_TYPE_PCI ((u64)0x01 << SCSI_NL_VID_TYPE_SHIFT) -+#define SCSI_NL_VID_TYPE_MASK ((__u64)0xFF << SCSI_NL_VID_TYPE_SHIFT) -+#define SCSI_NL_VID_TYPE_PCI ((__u64)0x01 << SCSI_NL_VID_TYPE_SHIFT) - #define SCSI_NL_VID_ID_MASK (~ SCSI_NL_VID_TYPE_MASK) - - --- -1.7.0 - diff --git a/toolchain/patch-kernel.sh b/toolchain/patch-kernel.sh deleted file mode 100755 index 76cb9f7..0000000 --- a/toolchain/patch-kernel.sh +++ /dev/null @@ -1,66 +0,0 @@ -#! /bin/bash -# A little script I whipped up to make it easy to -# patch source trees and have sane error handling -# -Erik -# -# (c) 2002 Erik Andersen - -# Set directories from arguments, or use defaults. -targetdir=${1-.} -patchdir=${2-../kernel-patches} -shift 2 -patchpattern=${@-*} - -if [ ! -d "${targetdir}" ] ; then - echo "Aborting. '${targetdir}' is not a directory." - exit 1 -fi -if [ ! -d "${patchdir}" ] ; then - echo "Aborting. '${patchdir}' is not a directory." - exit 1 -fi - -for i in `cd ${patchdir}; ls -d ${patchpattern} 2> /dev/null` ; do - apply="patch -p1 -E -d" - uncomp_parm="" - if [ -d "${patchdir}/$i" ] ; then - type="directory overlay" - uncomp="tar cf - --exclude=.svn --no-anchored -C" - uncomp_parm="." - apply="tar xvf - -C" - else case "$i" in - *.gz) - type="gzip"; uncomp="gunzip -dc"; ;; - *.bz) - type="bzip"; uncomp="bunzip -dc"; ;; - *.bz2) - type="bzip2"; uncomp="bunzip2 -dc"; ;; - *.zip) - type="zip"; uncomp="unzip -d"; ;; - *.Z) - type="compress"; uncomp="uncompress -c"; ;; - *.tgz) - type="tar gzip"; uncomp="gunzip -dc"; apply="tar xvf - -C"; ;; - *.tar) - type="tar"; uncomp="cat"; apply="tar xvf - -C"; ;; - *) - type="plaintext"; uncomp="cat"; ;; - esac fi - echo "" - echo "Applying ${i} using ${type}: " - echo ${i} | cat >> ${targetdir}/.applied_patches_list - ${uncomp} ${patchdir}/${i} ${uncomp_parm} | ${apply} ${targetdir} - if [ $? != 0 ] ; then - echo "Patch failed! Please fix $i!" - exit 1 - fi -done - -# Check for rejects... -if [ "`find $targetdir/ '(' -name '*.rej' -o -name '.*.rej' ')' -print`" ] ; then - echo "Aborting. Reject files found." - exit 1 -fi - -# Remove backup files -find $targetdir/ '(' -name '*.orig' -o -name '.*.orig' ')' -exec rm -f {} \; diff --git a/toolchain/toolchain-crosstool-ng/001-no-cvs.patch b/toolchain/toolchain-crosstool-ng/001-no-cvs.patch deleted file mode 100644 index c82d359..0000000 --- a/toolchain/toolchain-crosstool-ng/001-no-cvs.patch +++ /dev/null @@ -1,15 +0,0 @@ -Remove dependency on cvs. - -cvs is used to retrieve newlib, which is not supported -under Buildroot, so cvs is not required. - ---- crosstool-ng-1.8.0/configure.orig 2010-11-27 15:43:52.000000000 +0000 -+++ crosstool-ng-1.8.0/configure 2010-11-27 15:44:10.000000000 +0000 -@@ -359,7 +359,6 @@ - err="'libtool' 1.5.26 or above was not found" - has_or_abort prog=stat - has_or_abort prog="curl wget" --has_or_abort prog=cvs - has_or_abort prog=patch - has_or_abort prog=tar - has_or_abort prog=gzip diff --git a/toolchain/uClibc/uClibc-0.9.29-001-fix-mmap.patch b/toolchain/uClibc/uClibc-0.9.29-001-fix-mmap.patch deleted file mode 100644 index 4775e8c..0000000 --- a/toolchain/uClibc/uClibc-0.9.29-001-fix-mmap.patch +++ /dev/null @@ -1,91 +0,0 @@ ---- uClibc-0.9.29.oorig/test/mmap/mmap2.c (revision 0) -+++ uClibc-0.9.29/test/mmap/mmap2.c (revision 18616) -@@ -0,0 +1,41 @@ -+/* When trying to map /dev/mem with offset 0xFFFFF000 on the ARM platform, mmap -+ * returns -EOVERFLOW. -+ * -+ * Since off_t is defined as a long int and the sign bit is set in the address, -+ * the shift operation shifts in ones instead of zeroes -+ * from the left. This results the offset sent to the kernel function becomes -+ * 0xFFFFFFFF instead of 0x000FFFFF with MMAP2_PAGE_SHIFT set to 12. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#define FATAL do { fprintf(stderr, "Error at line %d, file %s (%d) [%s]\n", \ -+ __LINE__, __FILE__, errno, strerror(errno)); exit(1); } while(0) -+ -+#define MAP_SIZE 4096UL -+#define MAP_MASK (MAP_SIZE - 1) -+ -+int main(int argc, char **argv) { -+ void* map_base = 0; -+ int fd; -+ off_t target = 0xfffff000; -+ if((fd = open("/dev/mem", O_RDWR | O_SYNC)) == -1) FATAL; -+ printf("/dev/mem opened.\n"); -+ fflush(stdout); -+ -+ /* Map one page */ -+ map_base = mmap(0, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, -+ fd, target & ~MAP_MASK); -+ if(map_base == (void *) -1) FATAL; -+ printf("Memory mapped at address %p.\n", map_base); -+ fflush(stdout); -+ if(munmap(map_base, MAP_SIZE) == -1) FATAL; -+ close(fd); -+ return 0; -+} ---- uClibc-0.9.29.oorig/libc/sysdeps/linux/arm/mmap.c (revision 18615) -+++ uClibc-0.9.29/libc/sysdeps/linux/arm/mmap.c (revision 18616) -@@ -27,7 +27,6 @@ __ptr_t mmap(__ptr_t addr, size_t len, i - - #elif defined (__NR_mmap2) - #define __NR__mmap __NR_mmap2 -- - #ifndef MMAP2_PAGE_SHIFT - # define MMAP2_PAGE_SHIFT 12 - #endif -@@ -39,9 +38,17 @@ __ptr_t mmap(__ptr_t addr, size_t len, i - { - /* check if offset is page aligned */ - if (offset & ((1 << MMAP2_PAGE_SHIFT) - 1)) -+ { -+ __set_errno(EINVAL); - return MAP_FAILED; -+ } -+#ifdef __USE_FILE_OFFSET64 -+ return (__ptr_t) _mmap (addr, len, prot, flags, -+ fd,((__u_quad_t) offset >> MMAP2_PAGE_SHIFT)); -+#else - return (__ptr_t) _mmap (addr, len, prot, flags, -- fd,(off_t) (offset >> MMAP2_PAGE_SHIFT)); -+ fd,((__u_long) offset >> MMAP2_PAGE_SHIFT)); -+#endif - } - #elif defined (__NR_mmap) - # define __NR__mmap __NR_mmap ---- uClibc-0.9.29.oorig/libc/sysdeps/linux/common/mmap64.c (revision 18615) -+++ uClibc-0.9.29/libc/sysdeps/linux/common/mmap64.c (revision 18616) -@@ -58,8 +58,13 @@ __ptr_t mmap64(__ptr_t addr, size_t len, - __set_errno(EINVAL); - return MAP_FAILED; - } -- -- return __syscall_mmap2(addr, len, prot, flags, fd, (off_t) (offset >> MMAP2_PAGE_SHIFT)); -+#ifdef __USE_FILE_OFFSET64 -+ return __syscall_mmap2(addr, len, prot, flags, -+ fd,((__u_quad_t)offset >> MMAP2_PAGE_SHIFT)); -+#else -+ return __syscall_mmap2(addr, len, prot, flags, -+ fd,((__u_long)offset >> MMAP2_PAGE_SHIFT)); -+#endif - } - - # endif diff --git a/toolchain/uClibc/uClibc-0.9.29-conditional-sched_affinity.patch b/toolchain/uClibc/uClibc-0.9.29-conditional-sched_affinity.patch deleted file mode 100644 index 509c42a..0000000 --- a/toolchain/uClibc/uClibc-0.9.29-conditional-sched_affinity.patch +++ /dev/null @@ -1,53 +0,0 @@ -diff -ur uClibc-0.9.29/libc/sysdeps/linux/common/sched_getaffinity.c uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_getaffinity.c ---- uClibc-0.9.29/libc/sysdeps/linux/common/sched_getaffinity.c 2007-02-12 16:52:32.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_getaffinity.c 2007-05-09 18:05:09.397411811 -0500 -@@ -29,6 +29,7 @@ - #include - #include - -+#ifdef __NR_sched_getaffinity - libc_hidden_proto(memset) - - #define __NR___syscall_sched_getaffinity __NR_sched_getaffinity -@@ -48,5 +49,15 @@ - } - return res; - } -+#else -+/* -+int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *cpuset) -+{ -+ __set_errno(ENOSYS); -+ return -1; -+} -+*/ - #endif - #endif -+ -+#endif -diff -ur uClibc-0.9.29/libc/sysdeps/linux/common/sched_setaffinity.c uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_setaffinity.c ---- uClibc-0.9.29/libc/sysdeps/linux/common/sched_setaffinity.c 2007-02-12 16:52:32.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_setaffinity.c 2007-05-09 18:05:09.397411811 -0500 -@@ -31,6 +31,7 @@ - #include - #include - -+#ifdef __NR_sched_setaffinity - libc_hidden_proto(getpid) - - #define __NR___syscall_sched_setaffinity __NR_sched_setaffinity -@@ -74,5 +75,14 @@ - - return INLINE_SYSCALL (sched_setaffinity, 3, pid, cpusetsize, cpuset); - } -+#else -+/* -+int sched_setaffinity(pid_t pid, size_t cpusetsize, const cpu_set_t *cpuset) -+{ -+ __set_errno(ENOSYS); -+ return -1; -+} -+*/ -+#endif - #endif - #endif diff --git a/toolchain/uClibc/uClibc-0.9.29-filter-gnu99-from-assembly-flags.patch b/toolchain/uClibc/uClibc-0.9.29-filter-gnu99-from-assembly-flags.patch deleted file mode 100644 index d1a7e3a..0000000 --- a/toolchain/uClibc/uClibc-0.9.29-filter-gnu99-from-assembly-flags.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur uClibc-0.9.29/Makerules uClibc-0.9.29-patched/Makerules ---- uClibc-0.9.29/Makerules 2006-12-10 18:25:23.000000000 -0600 -+++ uClibc-0.9.29-patched/Makerules 2008-01-26 17:04:50.965699518 -0600 -@@ -96,7 +96,7 @@ - disp_ld = $($(DISP)_disp_ld) - - cmd_compile.c = $(CC) -c $< -o $@ $(CFLAGS) $(ARCH_CFLAGS) $(CFLAGS-$(suffix $@)) $(filter-out $(CFLAGS-OMIT-$(notdir $<)),$(CFLAGS-$(notdir $(^D)))) $(CFLAGS-$(subst $(top_srcdir),,$(dir $<))) $(CFLAGS-$(notdir $<)) $(CFLAGS-$(notdir $@)) --cmd_compile.S = $(cmd_compile.c) -D__ASSEMBLER__ $(ASFLAGS) $(ARCH_ASFLAGS) $(ASFLAGS-$(suffix $@)) $(ASFLAGS-$(notdir $<)) $(ASFLAGS-$(notdir $@)) -+cmd_compile.S = $(filter-out -std=gnu99, $(cmd_compile.c)) -D__ASSEMBLER__ $(ASFLAGS) $(ARCH_ASFLAGS) $(ASFLAGS-$(suffix $@)) $(ASFLAGS-$(notdir $<)) $(ASFLAGS-$(notdir $@)) - cmd_compile.m = $(cmd_compile.c) -DL_$(patsubst %$(suffix $(notdir $@)),%,$(notdir $@)) - cmd_compile-m = $(CC) $^ -c -o $@ $(CFLAGS) $(ARCH_CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(notdir $(@D))) $(CFLAGS-$(notdir $@)) - cmd_strip = $(STRIPTOOL) $(STRIP_FLAGS) $^ diff --git a/toolchain/uClibc/uClibc-0.9.29-fix-fget_putc.diff b/toolchain/uClibc/uClibc-0.9.29-fix-fget_putc.diff deleted file mode 100644 index 15d6149..0000000 --- a/toolchain/uClibc/uClibc-0.9.29-fix-fget_putc.diff +++ /dev/null @@ -1,396 +0,0 @@ -diff -ur uClibc-0.9.29/libc/inet/rpc/rcmd.c uClibc-0.9.29-patched/libc/inet/rpc/rcmd.c ---- uClibc-0.9.29/libc/inet/rpc/rcmd.c 2007-01-10 11:46:19.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/inet/rpc/rcmd.c 2007-05-09 18:05:21.638421151 -0500 -@@ -126,7 +126,7 @@ - libc_hidden_proto(listen) - libc_hidden_proto(sigsetmask) - libc_hidden_proto(getc_unlocked) --libc_hidden_proto(__fgetc_unlocked) -+//libc_hidden_proto(fgetc_unlocked) - libc_hidden_proto(fopen) - libc_hidden_proto(fclose) - libc_hidden_proto(fprintf) -diff -ur uClibc-0.9.29/libc/inet/rpc/ruserpass.c uClibc-0.9.29-patched/libc/inet/rpc/ruserpass.c ---- uClibc-0.9.29/libc/inet/rpc/ruserpass.c 2006-03-23 05:14:16.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/inet/rpc/ruserpass.c 2007-05-09 18:05:21.638421151 -0500 -@@ -63,7 +63,7 @@ - libc_hidden_proto(fopen) - libc_hidden_proto(fclose) - libc_hidden_proto(getc_unlocked) --libc_hidden_proto(__fgetc_unlocked) -+//libc_hidden_proto(__fgetc_unlocked) - - #define _(X) (X) - /* #include "ftp_var.h" */ -diff -ur uClibc-0.9.29/libc/misc/error/error.c uClibc-0.9.29-patched/libc/misc/error/error.c ---- uClibc-0.9.29/libc/misc/error/error.c 2006-05-04 09:44:13.000000000 -0500 -+++ uClibc-0.9.29-patched/libc/misc/error/error.c 2007-05-09 18:05:21.646421810 -0500 -@@ -30,11 +30,14 @@ - libc_hidden_proto(strerror) - libc_hidden_proto(fprintf) - libc_hidden_proto(exit) -+//#undef putc - libc_hidden_proto(putc) -+libc_hidden_proto(fputc) - libc_hidden_proto(vfprintf) - libc_hidden_proto(fflush) --libc_hidden_proto(fputc) --libc_hidden_proto(__fputc_unlocked) -+//#ifdef __UCLIBC_HAS_STDIO_PUTC_MACRO__ -+libc_hidden_proto(fputc_unlocked) -+//#endif - - /* This variable is incremented each time `error' is called. */ - unsigned int error_message_count = 0; -diff -ur uClibc-0.9.29/libc/misc/ttyent/getttyent.c uClibc-0.9.29-patched/libc/misc/ttyent/getttyent.c ---- uClibc-0.9.29/libc/misc/ttyent/getttyent.c 2006-12-07 17:24:02.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/misc/ttyent/getttyent.c 2007-05-09 18:05:21.646421810 -0500 -@@ -44,8 +44,10 @@ - libc_hidden_proto(__fsetlocking) - libc_hidden_proto(rewind) - libc_hidden_proto(fgets_unlocked) -+//#undef getc_unlocked - libc_hidden_proto(getc_unlocked) --libc_hidden_proto(__fgetc_unlocked) -+//#undef fgetc_unlocked -+libc_hidden_proto(fgetc_unlocked) - libc_hidden_proto(fopen) - libc_hidden_proto(fclose) - libc_hidden_proto(abort) -diff -ur uClibc-0.9.29/libc/pwd_grp/pwd_grp.c uClibc-0.9.29-patched/libc/pwd_grp/pwd_grp.c ---- uClibc-0.9.29/libc/pwd_grp/pwd_grp.c 2007-04-13 03:32:18.000000000 -0500 -+++ uClibc-0.9.29-patched/libc/pwd_grp/pwd_grp.c 2007-05-09 18:05:21.638421151 -0500 -@@ -43,11 +43,12 @@ - libc_hidden_proto(strtoul) - libc_hidden_proto(rewind) - libc_hidden_proto(fgets_unlocked) --libc_hidden_proto(__fputc_unlocked) - libc_hidden_proto(sprintf) - libc_hidden_proto(fopen) - libc_hidden_proto(fclose) - libc_hidden_proto(fprintf) -+//#undef fputc_unlocked -+libc_hidden_proto(fputc_unlocked) - #ifdef __UCLIBC_HAS_XLOCALE__ - libc_hidden_proto(__ctype_b_loc) - #elif __UCLIBC_HAS_CTYPE_TABLES__ -@@ -801,7 +802,7 @@ - - do { - if (!*m) { -- if (__fputc_unlocked('\n', f) >= 0) { -+ if (fputc_unlocked('\n', f) >= 0) { - rv = 0; - } - break; -@@ -867,7 +868,7 @@ - goto DO_UNLOCK; - } - -- if (__fputc_unlocked('\n', stream) > 0) { -+ if (fputc_unlocked('\n', stream) > 0) { - rv = 0; - } - -diff -ur uClibc-0.9.29/libc/stdio/_scanf.c uClibc-0.9.29-patched/libc/stdio/_scanf.c ---- uClibc-0.9.29/libc/stdio/_scanf.c 2007-01-20 12:32:10.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/stdio/_scanf.c 2007-05-09 18:05:21.642421481 -0500 -@@ -86,7 +86,8 @@ - libc_hidden_proto(vsscanf) - libc_hidden_proto(fclose) - libc_hidden_proto(getc_unlocked) --libc_hidden_proto(__fgetc_unlocked) -+//#undef fgetc_unlocked -+libc_hidden_proto(fgetc_unlocked) - #ifdef __UCLIBC_HAS_WCHAR__ - libc_hidden_proto(wcslen) - libc_hidden_proto(vfwscanf) -diff -ur uClibc-0.9.29/libc/stdio/fgetc.c uClibc-0.9.29-patched/libc/stdio/fgetc.c ---- uClibc-0.9.29/libc/stdio/fgetc.c 2006-01-15 16:41:03.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/stdio/fgetc.c 2007-05-09 18:05:21.642421481 -0500 -@@ -13,13 +13,13 @@ - #undef getc - #undef getc_unlocked - --libc_hidden_proto(__fgetc_unlocked) -+libc_hidden_proto(fgetc_unlocked) - - #ifdef __DO_UNLOCKED - - libc_hidden_proto(fflush_unlocked) - --int __fgetc_unlocked(FILE *stream) -+int fgetc_unlocked(FILE *stream) - { - __STDIO_STREAM_VALIDATE(stream); - -@@ -73,26 +73,22 @@ - - return EOF; - } --libc_hidden_def(__fgetc_unlocked) -- --libc_hidden_proto(fgetc_unlocked) --strong_alias(__fgetc_unlocked,fgetc_unlocked) - libc_hidden_def(fgetc_unlocked) - - //libc_hidden_proto(__getc_unlocked) --//strong_alias(__fgetc_unlocked,__getc_unlocked) -+//strong_alias(fgetc_unlocked,__getc_unlocked) - //libc_hidden_def(__getc_unlocked) - - libc_hidden_proto(getc_unlocked) --strong_alias(__fgetc_unlocked,getc_unlocked) -+strong_alias(fgetc_unlocked,getc_unlocked) - libc_hidden_def(getc_unlocked) - - #ifndef __UCLIBC_HAS_THREADS__ - libc_hidden_proto(fgetc) --strong_alias(__fgetc_unlocked,fgetc) -+strong_alias(fgetc_unlocked,fgetc) - libc_hidden_def(fgetc) - --strong_alias(__fgetc_unlocked,getc) -+strong_alias(fgetc_unlocked,getc) - #endif - - #elif defined __UCLIBC_HAS_THREADS__ -diff -ur uClibc-0.9.29/libc/stdio/fgets.c uClibc-0.9.29-patched/libc/stdio/fgets.c ---- uClibc-0.9.29/libc/stdio/fgets.c 2006-01-15 16:41:03.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/stdio/fgets.c 2007-05-09 18:05:21.638421151 -0500 -@@ -10,8 +10,7 @@ - libc_hidden_proto(fgets_unlocked) - - #ifdef __DO_UNLOCKED -- --libc_hidden_proto(__fgetc_unlocked) -+libc_hidden_proto(fgetc_unlocked) - - char *fgets_unlocked(char *__restrict s, int n, - register FILE * __restrict stream) -@@ -38,7 +37,7 @@ - break; - } - } else { -- if ((c = __fgetc_unlocked(stream)) == EOF) { -+ if ((c = fgetc_unlocked(stream)) == EOF) { - if (__FERROR_UNLOCKED(stream)) { - goto ERROR; - } -diff -ur uClibc-0.9.29/libc/stdio/fputc.c uClibc-0.9.29-patched/libc/stdio/fputc.c ---- uClibc-0.9.29/libc/stdio/fputc.c 2007-04-14 12:03:18.000000000 -0500 -+++ uClibc-0.9.29-patched/libc/stdio/fputc.c 2007-05-09 20:50:51.350629927 -0500 -@@ -16,7 +16,7 @@ - - #ifdef __DO_UNLOCKED - --int __fputc_unlocked(int c, register FILE *stream) -+int fputc_unlocked(int c, register FILE *stream) - { - __STDIO_STREAM_VALIDATE(stream); - -@@ -70,22 +70,22 @@ - BAD: - return EOF; - } --libc_hidden_def(__fputc_unlocked) -+libc_hidden_def(fputc_unlocked) - - /* exposing these would be fundamentally *wrong*! fix you, instead! */ - /* libc_hidden_proto(fputc_unlocked) */ --strong_alias(__fputc_unlocked,fputc_unlocked) -+/* strong_alias(__fputc_unlocked,fputc_unlocked) */ - /* exposing these would be fundamentally *wrong*! fix you, instead! */ - /* libc_hidden_def(fputc_unlocked) */ - - libc_hidden_proto(putc_unlocked) --strong_alias(__fputc_unlocked,putc_unlocked) -+strong_alias(fputc_unlocked,putc_unlocked) - libc_hidden_def(putc_unlocked) - #ifndef __UCLIBC_HAS_THREADS__ --strong_alias(__fputc_unlocked,fputc) -+strong_alias(fputc_unlocked,fputc) - - libc_hidden_proto(putc) --strong_alias(__fputc_unlocked,putc) -+strong_alias(fputc_unlocked,putc) - libc_hidden_def(putc) - #endif - -diff -ur uClibc-0.9.29/libc/stdio/getchar.c uClibc-0.9.29-patched/libc/stdio/getchar.c ---- uClibc-0.9.29/libc/stdio/getchar.c 2006-12-19 22:30:25.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/stdio/getchar.c 2007-05-09 18:05:21.642421481 -0500 -@@ -7,7 +7,8 @@ - - #include "_stdio.h" - --libc_hidden_proto(__fgetc_unlocked) -+//#undef fgetc_unlocked -+libc_hidden_proto(fgetc_unlocked) - - #undef getchar - #ifdef __DO_UNLOCKED -diff -ur uClibc-0.9.29/libc/stdio/getdelim.c uClibc-0.9.29-patched/libc/stdio/getdelim.c ---- uClibc-0.9.29/libc/stdio/getdelim.c 2006-02-13 02:52:46.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/stdio/getdelim.c 2007-05-09 18:05:21.642421481 -0500 -@@ -11,8 +11,8 @@ - #include "_stdio.h" - - libc_hidden_proto(getdelim) -- --libc_hidden_proto(__fgetc_unlocked) -+//#undef fgetc_unlocked -+libc_hidden_proto(fgetc_unlocked) - - /* Note: There is a defect in this function. (size_t vs ssize_t). */ - -diff -ur uClibc-0.9.29/libc/stdio/old_vfprintf.c uClibc-0.9.29-patched/libc/stdio/old_vfprintf.c ---- uClibc-0.9.29/libc/stdio/old_vfprintf.c 2006-01-22 13:35:08.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/stdio/old_vfprintf.c 2007-05-09 18:05:21.642421481 -0500 -@@ -149,7 +149,8 @@ - libc_hidden_proto(strnlen) - libc_hidden_proto(memcpy) - libc_hidden_proto(putc_unlocked) --libc_hidden_proto(__fputc_unlocked) -+//#undef fputc_unlocked -+libc_hidden_proto(fputc_unlocked) - libc_hidden_proto(__glibc_strerror_r) - - /* #undef __UCLIBC_HAS_FLOATS__ */ -diff -ur uClibc-0.9.29/libc/stdio/putchar.c uClibc-0.9.29-patched/libc/stdio/putchar.c ---- uClibc-0.9.29/libc/stdio/putchar.c 2006-01-13 18:58:03.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/stdio/putchar.c 2007-05-09 18:05:21.642421481 -0500 -@@ -7,7 +7,8 @@ - - #include "_stdio.h" - --libc_hidden_proto(__fputc_unlocked) -+//#undef fputc_unlocked -+libc_hidden_proto(fputc_unlocked) - - #undef putchar - #ifdef __DO_UNLOCKED -diff -ur uClibc-0.9.29/libc/stdio/puts.c uClibc-0.9.29-patched/libc/stdio/puts.c ---- uClibc-0.9.29/libc/stdio/puts.c 2006-01-13 18:58:03.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/stdio/puts.c 2007-05-09 18:05:21.642421481 -0500 -@@ -7,7 +7,8 @@ - - #include "_stdio.h" - --libc_hidden_proto(__fputc_unlocked) -+//#undef fputc_unlocked -+libc_hidden_proto(fputc_unlocked) - libc_hidden_proto(fputs_unlocked) - - int puts(register const char * __restrict s) -@@ -25,7 +26,7 @@ - /* Note: Nonportable as fputs need only return nonnegative on success. */ - if ((n = fputs_unlocked(s, stream)) != EOF) { - ++n; -- if (__fputc_unlocked('\n', stream) == EOF) { -+ if (fputc_unlocked('\n', stream) == EOF) { - n = EOF; - } - } -diff -ur uClibc-0.9.29/libc/stdio/putwchar.c uClibc-0.9.29-patched/libc/stdio/putwchar.c ---- uClibc-0.9.29/libc/stdio/putwchar.c 2006-01-14 14:16:19.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/stdio/putwchar.c 2007-05-09 18:05:21.642421481 -0500 -@@ -22,7 +22,8 @@ - - #elif defined __UCLIBC_HAS_THREADS__ - --libc_hidden_proto(__fputc_unlocked) -+//#undef fputc_unlocked -+libc_hidden_proto(fputc_unlocked) - /* psm: should this be fputwc? */ - libc_hidden_proto(fputc) - -diff -ur uClibc-0.9.29/libc/sysdeps/linux/common/bits/uClibc_stdio.h uClibc-0.9.29-patched/libc/sysdeps/linux/common/bits/uClibc_stdio.h ---- uClibc-0.9.29/libc/sysdeps/linux/common/bits/uClibc_stdio.h 2007-01-28 07:16:58.000000000 -0600 -+++ uClibc-0.9.29-patched/libc/sysdeps/linux/common/bits/uClibc_stdio.h 2007-05-09 20:56:02.408110608 -0500 -@@ -381,33 +381,29 @@ - # define __FEOF(__stream) __FEOF_UNLOCKED(__stream) - #endif - --extern int __fgetc_unlocked(FILE *__stream); --extern int __fputc_unlocked(int __c, FILE *__stream); -- - /* First define the default definitions. - They are overridden below as necessary. */ --#define __FGETC_UNLOCKED(__stream) (__fgetc_unlocked)((__stream)) -+#define __FGETC_UNLOCKED(__stream) (fgetc_unlocked)((__stream)) - #define __FGETC(__stream) (fgetc)((__stream)) --#define __GETC_UNLOCKED_MACRO(__stream) (__fgetc_unlocked)((__stream)) --#define __GETC_UNLOCKED(__stream) (__fgetc_unlocked)((__stream)) -+#define __GETC_UNLOCKED_MACRO(__stream) (fgetc_unlocked)((__stream)) -+#define __GETC_UNLOCKED(__stream) (fgetc_unlocked)((__stream)) - #define __GETC(__stream) (fgetc)((__stream)) - --#define __FPUTC_UNLOCKED(__c, __stream) (__fputc_unlocked)((__c),(__stream)) -+#define __FPUTC_UNLOCKED(__c, __stream) (fputc_unlocked)((__c),(__stream)) - #define __FPUTC(__c, __stream) (fputc)((__c),(__stream)) --#define __PUTC_UNLOCKED_MACRO(__c, __stream) (__fputc_unlocked)((__c),(__stream)) --#define __PUTC_UNLOCKED(__c, __stream) (__fputc_unlocked)((__c),(__stream)) -+#define __PUTC_UNLOCKED_MACRO(__c, __stream) (fputc_unlocked)((__c),(__stream)) -+#define __PUTC_UNLOCKED(__c, __stream) (fputc_unlocked)((__c),(__stream)) - #define __PUTC(__c, __stream) (fputc)((__c),(__stream)) - - - #ifdef __STDIO_GETC_MACRO -- - extern FILE *__stdin; /* For getchar() macro. */ - - # undef __GETC_UNLOCKED_MACRO - # define __GETC_UNLOCKED_MACRO(__stream) \ - ( ((__stream)->__bufpos < (__stream)->__bufgetc_u) \ - ? (*(__stream)->__bufpos++) \ -- : __fgetc_unlocked(__stream) ) -+ : fgetc_unlocked(__stream) ) - - # if 0 - /* Classic macro approach. getc{_unlocked} can have side effects. */ -@@ -453,20 +449,17 @@ - # endif - # endif - --#else -- - #endif /* __STDIO_GETC_MACRO */ - - - #ifdef __STDIO_PUTC_MACRO -- - extern FILE *__stdout; /* For putchar() macro. */ - - # undef __PUTC_UNLOCKED_MACRO - # define __PUTC_UNLOCKED_MACRO(__c, __stream) \ - ( ((__stream)->__bufpos < (__stream)->__bufputc_u) \ - ? (*(__stream)->__bufpos++) = (__c) \ -- : __fputc_unlocked((__c),(__stream)) ) -+ : (fputc_unlocked((__c),(__stream)) ) - - # if 0 - /* Classic macro approach. putc{_unlocked} can have side effects.*/ -@@ -489,7 +482,8 @@ - }) ) - - # undef __PUTC_UNLOCKED --# define __PUTC_UNLOCKED(__c, __stream) __FPUTC_UNLOCKED((__c), (__stream)) -+# define __PUTC_UNLOCKED(__c, __stream) \ -+ __FPUTC_UNLOCKED((__c), (__stream)) - - # ifdef __UCLIBC_HAS_THREADS__ - # undef __FPUTC -diff -ur uClibc-0.9.29/libc/unistd/getpass.c uClibc-0.9.29-patched/libc/unistd/getpass.c ---- uClibc-0.9.29/libc/unistd/getpass.c 2006-07-05 05:58:38.000000000 -0500 -+++ uClibc-0.9.29-patched/libc/unistd/getpass.c 2007-05-09 18:05:21.642421481 -0500 -@@ -36,7 +36,8 @@ - libc_hidden_proto(fputs) - libc_hidden_proto(fputc) - libc_hidden_proto(putc) --libc_hidden_proto(__fputc_unlocked) -+//#undef fputc_unlocked -+libc_hidden_proto(fputc_unlocked) - - /* It is desirable to use this bit on systems that have it. - The only bit of terminal state we want to twiddle is echoing, which is diff --git a/toolchain/uClibc/uClibc-0.9.29-fix-gethostent_r-failure-retval.patch b/toolchain/uClibc/uClibc-0.9.29-fix-gethostent_r-failure-retval.patch deleted file mode 100644 index 7b246c1..0000000 --- a/toolchain/uClibc/uClibc-0.9.29-fix-gethostent_r-failure-retval.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur uClibc-0.9.29/libc/inet/resolv.c uClibc-0.9.29-patched/libc/inet/resolv.c ---- uClibc-0.9.29/libc/inet/resolv.c 2007-04-23 12:01:05.000000000 -0500 -+++ uClibc-0.9.29-patched/libc/inet/resolv.c 2007-05-09 18:05:33.563404419 -0500 -@@ -1700,7 +1700,7 @@ - int gethostent_r(struct hostent *result_buf, char *buf, size_t buflen, - struct hostent **result, int *h_errnop) - { -- int ret; -+ int ret = HOST_NOT_FOUND; - - __UCLIBC_MUTEX_LOCK(mylock); - if (__gethostent_fp == NULL) { diff --git a/toolchain/uClibc/uClibc-0.9.29-fix-internal_function-definition.patch b/toolchain/uClibc/uClibc-0.9.29-fix-internal_function-definition.patch deleted file mode 100644 index 9b88d82..0000000 --- a/toolchain/uClibc/uClibc-0.9.29-fix-internal_function-definition.patch +++ /dev/null @@ -1,51 +0,0 @@ -Index: uClibc/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h -=================================================================== ---- uClibc/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h (revision 18898) -+++ uClibc/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h (working copy) -@@ -42,6 +42,8 @@ - /* define if target supports IEEE signed zero floats */ - #define __UCLIBC_HAVE_SIGNED_ZERO__ - -+#if defined _LIBC - #define internal_function __attribute__ ((regparm (3), stdcall)) -+#endif - - #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */ -Index: uClibc/include/libc-symbols.h -=================================================================== ---- uClibc/include/libc-symbols.h (revision 18898) -+++ uClibc/include/libc-symbols.h (working copy) -@@ -22,6 +22,16 @@ - #ifndef _LIBC_SYMBOLS_H - #define _LIBC_SYMBOLS_H 1 - -+/* This is defined for the compilation of all C library code. features.h -+ tests this to avoid inclusion of stubs.h while compiling the library, -+ before stubs.h has been generated. Some library code that is shared -+ with other packages also tests this symbol to see if it is being -+ compiled as part of the C library. We must define this before including -+ config.h, because it makes some definitions conditional on whether libc -+ itself is being compiled, or just some generator program. */ -+#define _LIBC 1 -+ -+ - /* This file's macros are included implicitly in the compilation of every - file in the C library by -imacros. - -@@ -40,16 +50,6 @@ - - #include - -- --/* This is defined for the compilation of all C library code. features.h -- tests this to avoid inclusion of stubs.h while compiling the library, -- before stubs.h has been generated. Some library code that is shared -- with other packages also tests this symbol to see if it is being -- compiled as part of the C library. We must define this before including -- config.h, because it makes some definitions conditional on whether libc -- itself is being compiled, or just some generator program. */ --#define _LIBC 1 -- - /* Enable declarations of GNU extensions, since we are compiling them. */ - #define _GNU_SOURCE 1 - diff --git a/toolchain/uClibc/uClibc-0.9.29-linuxthreads.patch b/toolchain/uClibc/uClibc-0.9.29-linuxthreads.patch deleted file mode 100644 index 8ce2439..0000000 --- a/toolchain/uClibc/uClibc-0.9.29-linuxthreads.patch +++ /dev/null @@ -1,145 +0,0 @@ ---- a/libpthread/linuxthreads.old/attr.c 2006-01-24 12:41:01.000000000 -0500 -+++ b/libpthread/linuxthreads.old/attr.c 2008-02-10 11:35:32.000000000 -0500 -@@ -25,6 +25,14 @@ - #include "pthread.h" - #include "internals.h" - -+#include -+#include -+#include -+#include -+#include -+#include -+ -+ - /* NOTE: With uClibc I don't think we need this versioning stuff. - * Therefore, define the function pthread_attr_init() here using - * a strong symbol. */ -@@ -209,4 +217,94 @@ int __pthread_attr_getstacksize(const pt - *stacksize = attr->__stacksize; - return 0; - } -+ -+ -+extern int *__libc_stack_end; -+ - weak_alias (__pthread_attr_getstacksize, pthread_attr_getstacksize) -+void* pthread_getattr_np(pthread_t thread, pthread_attr_t *attr) -+{ -+ static void *stackBase = 0; -+ static size_t stackSize = 0; -+ int ret = 0; -+ /* Stack size limit. */ -+ struct rlimit rl; -+ -+ /* The safest way to get the top of the stack is to read -+ /proc/self/maps and locate the line into which -+ __libc_stack_end falls. */ -+ FILE *fp = fopen("/proc/self/maps", "rc"); -+ if (fp == NULL) -+ ret = errno; -+ /* We need the limit of the stack in any case. */ -+ else if (getrlimit (RLIMIT_STACK, &rl) != 0) -+ ret = errno; -+ else { -+ /* We need no locking. */ -+ __fsetlocking (fp, FSETLOCKING_BYCALLER); -+ -+ /* Until we found an entry (which should always be the case) -+ mark the result as a failure. */ -+ ret = ENOENT; -+ -+ char *line = NULL; -+ size_t linelen = 0; -+ uintptr_t last_to = 0; -+ -+ while (! feof_unlocked (fp)) { -+ if (getdelim (&line, &linelen, '\n', fp) <= 0) -+ break; -+ -+ uintptr_t from; -+ uintptr_t to; -+ if (sscanf (line, "%x-%x", &from, &to) != 2) -+ continue; -+ if (from <= (uintptr_t) __libc_stack_end -+ && (uintptr_t) __libc_stack_end < to) { -+ /* Found the entry. Now we have the info we need. */ -+ attr->__stacksize = rl.rlim_cur; -+#ifdef _STACK_GROWS_UP -+ /* Don't check to enforce a limit on the __stacksize */ -+ attr->__stackaddr = (void *) from; -+#else -+ attr->__stackaddr = (void *) to; -+ -+ /* The limit might be too high. */ -+ if ((size_t) attr->__stacksize > (size_t) attr->__stackaddr - last_to) -+ attr->__stacksize = (size_t) attr->__stackaddr - last_to; -+#endif -+ -+ /* We succeed and no need to look further. */ -+ ret = 0; -+ break; -+ } -+ last_to = to; -+ } -+ -+ fclose (fp); -+ free (line); -+ } -+#ifndef _STACK_GROWS_UP -+ stackBase = (char *) attr->__stackaddr - attr->__stacksize; -+#else -+ stackBase = attr->__stackaddr; -+#endif -+ stackSize = attr->__stacksize; -+ return (void*)(stackBase + stackSize); -+} -+ -+int __pthread_attr_getstack (const pthread_attr_t *attr, void **stackaddr, -+ size_t *stacksize) -+{ -+ /* XXX This function has a stupid definition. The standard specifies -+ no error value but what is if no stack address was set? We simply -+ return the value we have in the member. */ -+#ifndef _STACK_GROWS_UP -+ *stackaddr = (char *) attr->__stackaddr - attr->__stacksize; -+#else -+ *stackaddr = attr->__stackaddr; -+#endif -+ *stacksize = attr->__stacksize; -+ return 0; -+} -+weak_alias (__pthread_attr_getstack, pthread_attr_getstack) - ---- a/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h 2006-12-07 22:19:36.000000000 -0500 -+++ b/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h 2008-02-10 11:42:35.000000000 -0500 -@@ -288,15 +288,11 @@ extern int pthread_attr_getstacksize (__ - __attr, size_t *__restrict __stacksize) - __THROW; - --#if 0 --/* Not yet implemented in uClibc! */ -- - #ifdef __USE_GNU - /* Initialize thread attribute *ATTR with attributes corresponding to the - already running thread TH. It shall be called on unitialized ATTR - and destroyed with pthread_attr_destroy when no longer needed. */ --extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) __THROW; --#endif -+extern void* pthread_getattr_np(pthread_t thread, pthread_attr_t *attr); - #endif - - /* Functions for scheduling control. */ -@@ -599,6 +595,11 @@ extern int pthread_cancel (pthread_t __c - cancelled. */ - extern void pthread_testcancel (void); - -+/* Return the previously set address for the stack. */ -+extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, -+ void **__restrict __stackaddr, -+ size_t *__restrict __stacksize) __THROW; -+ - - /* Install a cleanup handler: ROUTINE will be called with arguments ARG - when the thread is cancelled or calls pthread_exit. ROUTINE will also - diff --git a/toolchain/uClibc/uClibc-0.9.29-rm-whitespace.patch b/toolchain/uClibc/uClibc-0.9.29-rm-whitespace.patch deleted file mode 100644 index 6004f91..0000000 --- a/toolchain/uClibc/uClibc-0.9.29-rm-whitespace.patch +++ /dev/null @@ -1,86 +0,0 @@ -diff -urN uClibc-0.9.29-0rig/include/assert.h uClibc-0.9.29/include/assert.h ---- uClibc-0.9.29-0rig/include/assert.h 2005-11-03 23:42:46.000000000 +0100 -+++ uClibc-0.9.29/include/assert.h 2007-08-13 19:10:57.000000000 +0200 -@@ -31,7 +31,7 @@ - #define _ASSERT_H 1 - #include - --#if defined __cplusplus && __GNUC_PREREQ (2,95) -+#if defined __cplusplus && __GNUC_PREREQ(2,95) - # define __ASSERT_VOID_CAST static_cast - #else - # define __ASSERT_VOID_CAST (void) -@@ -59,13 +59,17 @@ - (__ASSERT_VOID_CAST ((expr) ? 0 : \ - (__assert (__STRING(expr), __FILE__, __LINE__, \ - __ASSERT_FUNCTION), 0))) -- -+ -+/* Define some temporaries to workaround tinyx makedepend bug */ -+#define __GNUC_PREREQ_2_6 __GNUC_PREREQ(2, 6) -+#define __GNUC_PREREQ_2_4 __GNUC_PREREQ(2, 4) - /* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__' - which contains the name of the function currently being defined. - This is broken in G++ before version 2.6. - C9x has a similar variable called __func__, but prefer the GCC one since - it demangles C++ function names. */ --# if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4) -+ -+# if defined __cplusplus ? __GNUC_PREREQ_2_6 : __GNUC_PREREQ_2_4 - # define __ASSERT_FUNCTION __PRETTY_FUNCTION__ - # else - # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L -diff -urN uClibc-0.9.29-0rig/include/complex.h uClibc-0.9.29/include/complex.h ---- uClibc-0.9.29-0rig/include/complex.h 2002-05-09 10:15:21.000000000 +0200 -+++ uClibc-0.9.29/include/complex.h 2007-08-13 17:55:29.000000000 +0200 -@@ -33,7 +33,7 @@ - /* We might need to add support for more compilers here. But since ISO - C99 is out hopefully all maintained compilers will soon provide the data - types `float complex' and `double complex'. */ --#if __GNUC_PREREQ (2, 7) && !__GNUC_PREREQ (2, 97) -+#if __GNUC_PREREQ(2, 7) && !__GNUC_PREREQ(2, 97) - # define _Complex __complex__ - #endif - -diff -urN uClibc-0.9.29-0rig/include/features.h uClibc-0.9.29/include/features.h ---- uClibc-0.9.29-0rig/include/features.h 2006-11-29 22:10:04.000000000 +0100 -+++ uClibc-0.9.29/include/features.h 2007-08-13 17:55:51.000000000 +0200 -@@ -143,7 +143,7 @@ - - /* Convenience macros to test the versions of glibc and gcc. - Use them like this: -- #if __GNUC_PREREQ (2,8) -+ #if __GNUC_PREREQ(2,8) - ... code requiring gcc 2.8 or later ... - #endif - Note - they won't work for gcc1 or glibc1, since the _MINOR macros -@@ -297,7 +297,7 @@ - /* uClibc does not support _FORTIFY_SOURCE */ - #undef _FORTIFY_SOURCE - #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \ -- && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0 -+ && __GNUC_PREREQ(4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0 - # if _FORTIFY_SOURCE > 1 - # define __USE_FORTIFY_LEVEL 2 - # else -@@ -366,7 +366,7 @@ - #endif /* !ASSEMBLER */ - - /* Decide whether we can define 'extern inline' functions in headers. */ --#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \ -+#if __GNUC_PREREQ(2, 7) && defined __OPTIMIZE__ \ - && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__ - # define __USE_EXTERN_INLINES 1 - #endif -diff -urN uClibc-0.9.29-0rig/include/tgmath.h uClibc-0.9.29/include/tgmath.h ---- uClibc-0.9.29-0rig/include/tgmath.h 2002-05-09 10:15:21.000000000 +0200 -+++ uClibc-0.9.29/include/tgmath.h 2007-08-13 17:56:17.000000000 +0200 -@@ -34,7 +34,7 @@ - do not try this for now and instead concentrate only on GNU CC. Once - we have more information support for other compilers might follow. */ - --#if __GNUC_PREREQ (2, 7) -+#if __GNUC_PREREQ(2, 7) - - # ifdef __NO_LONG_DOUBLE_MATH - # define __tgml(fct) fct diff --git a/toolchain/uClibc/uClibc-0.9.29.config b/toolchain/uClibc/uClibc-0.9.29.config deleted file mode 100644 index 3e43059..0000000 --- a/toolchain/uClibc/uClibc-0.9.29.config +++ /dev/null @@ -1,207 +0,0 @@ -# -# Automatically generated make config: don't edit -# -# TARGET_alpha is not set -# TARGET_arm is not set -# TARGET_avr32 is not set -# TARGET_bfin is not set -# TARGET_cris is not set -# TARGET_e1 is not set -# TARGET_frv is not set -# TARGET_h8300 is not set -# TARGET_hppa is not set -# TARGET_i386 is not set -# TARGET_i960 is not set -# TARGET_ia64 is not set -# TARGET_m68k is not set -# TARGET_microblaze is not set -# TARGET_mips is not set -# TARGET_nios is not set -# TARGET_nios2 is not set -# TARGET_powerpc is not set -# TARGET_sh is not set -# TARGET_sh64 is not set -# TARGET_sparc is not set -# TARGET_v850 is not set -# TARGET_vax is not set -# TARGET_x86_64 is not set - -# -# Target Architecture Features and Options -# -TARGET_ARCH="none" -FORCE_OPTIONS_FOR_ARCH=y -# ARCH_LITTLE_ENDIAN is not set -# ARCH_BIG_ENDIAN is not set -# ARCH_WANTS_LITTLE_ENDIAN is not set -# ARCH_WANTS_BIG_ENDIAN is not set - -# -# Using Little Endian -# -ARCH_HAS_MMU=y -ARCH_USE_MMU=y -UCLIBC_HAS_FLOATS=y -UCLIBC_HAS_FPU=y -DO_C99_MATH=y -KERNEL_SOURCE="/usr/src/linux" -KERNEL_HEADERS="/usr/src/linux/include" -HAVE_DOT_CONFIG=y - -# -# General Library Settings -# -# HAVE_NO_PIC is not set -DOPIC=y -# LINKRELAX is not set -# HAVE_NO_SHARED is not set -# ARCH_HAS_NO_LDSO is not set -BUILD_UCLIBC_LDSO=y -HAVE_SHARED=y -# FORCE_SHAREABLE_TEXT_SEGMENTS is not set -LDSO_LDD_SUPPORT=y -LDSO_CACHE_SUPPORT=y -# LDSO_PRELOAD_FILE_SUPPORT is not set -LDSO_BASE_FILENAME="ld.so" -# UCLIBC_STATIC_LDCONFIG is not set -LDSO_RUNPATH=y -# DL_FINI_CRT_COMPAT is not set -UCLIBC_CTOR_DTOR=y -# HAS_NO_THREADS is not set -UCLIBC_HAS_THREADS=y -# PTHREADS_DEBUG_SUPPORT is not set -LINUXTHREADS_OLD=y -UCLIBC_HAS_LFS=y -# MALLOC is not set -# MALLOC_SIMPLE is not set -MALLOC_STANDARD=y -MALLOC_GLIBC_COMPAT=y -UCLIBC_DYNAMIC_ATEXIT=y -# COMPAT_ATEXIT is not set -HAS_SHADOW=y -# UCLIBC_SUSV3_LEGACY is not set -# UCLIBC_SUSV3_LEGACY_MACROS is not set -UCLIBC_HAS_SHADOW=y -# UCLIBC_HAS_PROGRAM_INVOCATION_NAME is not set -UCLIBC_HAS___PROGNAME=y -# UNIX98PTY_ONLY is not set -ASSUME_DEVPTS=y -UCLIBC_HAS_TM_EXTENSIONS=y -UCLIBC_HAS_TZ_CACHING=y -UCLIBC_HAS_TZ_FILE=y -UCLIBC_HAS_TZ_FILE_READ_MANY=y -UCLIBC_TZ_FILE_PATH="/etc/TZ" - -# -# Advanced Library Settings -# -UCLIBC_PWD_BUFFER_SIZE=256 -UCLIBC_GRP_BUFFER_SIZE=256 - -# -# Networking Support -# -UCLIBC_HAS_IPV6=y -UCLIBC_HAS_RPC=y -UCLIBC_HAS_FULL_RPC=y -UCLIBC_HAS_REENTRANT_RPC=y -# UCLIBC_USE_NETLINK is not set -# UCLIBC_HAS_BSD_RES_CLOSE is not set - -# -# String and Stdio Support -# -UCLIBC_HAS_STRING_GENERIC_OPT=y -UCLIBC_HAS_STRING_ARCH_OPT=y -UCLIBC_HAS_CTYPE_TABLES=y -UCLIBC_HAS_CTYPE_SIGNED=y -# UCLIBC_HAS_CTYPE_UNSAFE is not set -UCLIBC_HAS_CTYPE_CHECKED=y -# UCLIBC_HAS_CTYPE_ENFORCED is not set -# UCLIBC_HAS_WCHAR is not set -# UCLIBC_HAS_LOCALE is not set -UCLIBC_HAS_HEXADECIMAL_FLOATS=y -UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y -# USE_OLD_VFPRINTF is not set -UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9 -UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y -# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set -# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set -# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set -UCLIBC_HAS_STDIO_BUFSIZ_4096=y -# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set -UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y -# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set -# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set -# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set -UCLIBC_HAS_STDIO_GETC_MACRO=y -UCLIBC_HAS_STDIO_PUTC_MACRO=y -UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y -# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set -UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y -UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y -UCLIBC_HAS_PRINTF_M_SPEC=y -UCLIBC_HAS_ERRNO_MESSAGES=y -# UCLIBC_HAS_SYS_ERRLIST is not set -UCLIBC_HAS_SIGNUM_MESSAGES=y -# UCLIBC_HAS_SYS_SIGLIST is not set -UCLIBC_HAS_GNU_GETOPT=y -# UCLIBC_HAS_GETTEXT_AWARENESS is not set -UCLIBC_HAS_GNU_GETSUBOPT=y - -# -# Big and Tall -# -UCLIBC_HAS_REGEX=y -UCLIBC_HAS_REGEX_OLD=y -UCLIBC_HAS_FNMATCH=y -UCLIBC_HAS_FNMATCH_OLD=y -# UCLIBC_HAS_WORDEXP is not set -UCLIBC_HAS_FTW=y -UCLIBC_HAS_GLOB=y -UCLIBC_HAS_GNU_GLOB=y - -# -# Library Installation Options -# -SHARED_LIB_LOADER_PREFIX="/lib" -RUNTIME_PREFIX="/" -DEVEL_PREFIX="/usr/" - -# -# uClibc security related options -# -# UCLIBC_BUILD_PIE is not set -# UCLIBC_HAS_ARC4RANDOM is not set -# HAVE_NO_SSP is not set -UCLIBC_HAS_SSP=y -# UCLIBC_HAS_SSP_COMPAT is not set -# SSP_QUICK_CANARY is not set -PROPOLICE_BLOCK_ABRT=y -# PROPOLICE_BLOCK_SEGV is not set -# UCLIBC_BUILD_SSP is not set -UCLIBC_BUILD_RELRO=y -UCLIBC_BUILD_NOW=y -UCLIBC_BUILD_NOEXECSTACK=y - -# -# uClibc development/debugging options -# -CROSS_COMPILER_PREFIX="" -UCLIBC_EXTRA_CFLAGS="" -# DODEBUG is not set -# DODEBUG_PT is not set -DOSTRIP=y -# DOASSERTS is not set -# SUPPORT_LD_DEBUG is not set -# SUPPORT_LD_DEBUG_EARLY is not set -# UCLIBC_MALLOC_DEBUGGING is not set -WARNINGS="-Wall" -# EXTRA_WARNINGS is not set -# DOMULTI is not set -# UCLIBC_MJN3_ONLY is not set - -# USE_BX is not set - diff --git a/toolchain/uClibc/uClibc-0.9.31-add-bsd-endian-conversions.patch b/toolchain/uClibc/uClibc-0.9.31-add-bsd-endian-conversions.patch deleted file mode 100644 index 652d7c9..0000000 --- a/toolchain/uClibc/uClibc-0.9.31-add-bsd-endian-conversions.patch +++ /dev/null @@ -1,64 +0,0 @@ -From c6d6237819037168a6923ac080e348e54615422c Mon Sep 17 00:00:00 2001 -From: Vladimir Zapolskiy -Date: Tue, 1 Jun 2010 23:22:57 +0400 -Subject: [PATCH] endian.h: add BSD convertions between big/little-endian byte order - -This patch adds support for convertion of values between host and -big-/little-endian byte order. - -Signed-off-by: Vladimir Zapolskiy -Signed-off-by: Bernhard Reutner-Fischer ---- - include/endian.h | 38 ++++++++++++++++++++++++++++++++++++++ - 1 files changed, 38 insertions(+), 0 deletions(-) - -diff --git a/include/endian.h b/include/endian.h -index 2f7bce1..0ba7384 100644 ---- a/include/endian.h -+++ b/include/endian.h -@@ -55,4 +55,42 @@ - # define __LONG_LONG_PAIR(HI, LO) HI, LO - #endif - -+ -+#ifdef __USE_BSD -+/* Conversion interfaces. */ -+# include -+ -+# if __BYTE_ORDER == __LITTLE_ENDIAN -+# define htobe16(x) __bswap_16 (x) -+# define htole16(x) (x) -+# define be16toh(x) __bswap_16 (x) -+# define le16toh(x) (x) -+ -+# define htobe32(x) __bswap_32 (x) -+# define htole32(x) (x) -+# define be32toh(x) __bswap_32 (x) -+# define le32toh(x) (x) -+ -+# define htobe64(x) __bswap_64 (x) -+# define htole64(x) (x) -+# define be64toh(x) __bswap_64 (x) -+# define le64toh(x) (x) -+# else -+# define htobe16(x) (x) -+# define htole16(x) __bswap_16 (x) -+# define be16toh(x) (x) -+# define le16toh(x) __bswap_16 (x) -+ -+# define htobe32(x) (x) -+# define htole32(x) __bswap_32 (x) -+# define be32toh(x) (x) -+# define le32toh(x) __bswap_32 (x) -+ -+# define htobe64(x) (x) -+# define htole64(x) __bswap_64 (x) -+# define be64toh(x) (x) -+# define le64toh(x) __bswap_64 (x) -+# endif -+#endif -+ - #endif /* endian.h */ --- -1.7.3.4 - diff --git a/toolchain/uClibc/uClibc-0.9.31-add-inotify-init1.patch b/toolchain/uClibc/uClibc-0.9.31-add-inotify-init1.patch deleted file mode 100644 index cbec426..0000000 --- a/toolchain/uClibc/uClibc-0.9.31-add-inotify-init1.patch +++ /dev/null @@ -1,64 +0,0 @@ -From a2e5630af426f85fdd8721b2820786d9bd2aa695 Mon Sep 17 00:00:00 2001 -From: Vladimir Zapolskiy -Date: Tue, 1 Jun 2010 20:02:54 +0400 -Subject: [PATCH] inotify: add inotify_init1 system call support - -This patch introduces support for inotify_init1 system call, found -since Linux 2.6.27. - -Signed-off-by: Vladimir Zapolskiy -Signed-off-by: Khem Raj ---- - libc/sysdeps/linux/common/inotify.c | 4 ++++ - libc/sysdeps/linux/common/sys/inotify.h | 13 +++++++++++++ - 2 files changed, 17 insertions(+), 0 deletions(-) - -diff --git a/libc/sysdeps/linux/common/inotify.c b/libc/sysdeps/linux/common/inotify.c -index e5a6120..e35f043 100644 ---- a/libc/sysdeps/linux/common/inotify.c -+++ b/libc/sysdeps/linux/common/inotify.c -@@ -15,6 +15,10 @@ - _syscall0(int, inotify_init) - #endif - -+#ifdef __NR_inotify_init1 -+_syscall1(int, inotify_init1, int, flags) -+#endif -+ - #ifdef __NR_inotify_add_watch - _syscall3(int, inotify_add_watch, int, fd, const char *, path, uint32_t, mask) - #endif -diff --git a/libc/sysdeps/linux/common/sys/inotify.h b/libc/sysdeps/linux/common/sys/inotify.h -index 0131db9..dc4e19d 100644 ---- a/libc/sysdeps/linux/common/sys/inotify.h -+++ b/libc/sysdeps/linux/common/sys/inotify.h -@@ -22,6 +22,16 @@ - #include - - -+/* Flags for the parameter of inotify_init1. */ -+enum -+ { -+ IN_CLOEXEC = 02000000, -+#define IN_CLOEXEC IN_CLOEXEC -+ IN_NONBLOCK = 04000 -+#define IN_NONBLOCK IN_NONBLOCK -+ }; -+ -+ - /* Structure describing an inotify event. */ - struct inotify_event - { -@@ -79,6 +89,9 @@ __BEGIN_DECLS - /* Create and initialize inotify instance. */ - extern int inotify_init (void) __THROW; - -+/* Create and initialize inotify instance. */ -+extern int inotify_init1 (int __flags) __THROW; -+ - /* Add watch of object NAME to inotify instance FD. Notify about - events specified by MASK. */ - extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask) --- -1.7.3.4 - diff --git a/toolchain/uClibc/uClibc-0.9.31-add-sock-cloexec.patch b/toolchain/uClibc/uClibc-0.9.31-add-sock-cloexec.patch deleted file mode 100644 index a7089a9..0000000 --- a/toolchain/uClibc/uClibc-0.9.31-add-sock-cloexec.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 83333e9c873e4eca6b2c945f7770b1f5373b0427 Mon Sep 17 00:00:00 2001 -From: Vladimir Zapolskiy -Date: Tue, 1 Jun 2010 20:02:39 +0400 -Subject: [PATCH] bits/socket.h: add SOCK_CLOEXEC and SOCK_NONBLOCK support - -This patch adds support for SOCK_CLOEXEC and SOCK_NONBLOCK socket -descriptor flags, which are introduced since Linux 2.6.27 - -Signed-off-by: Vladimir Zapolskiy -Signed-off-by: Khem Raj ---- - libc/sysdeps/linux/common/bits/socket.h | 12 +++++++++++- - 1 files changed, 11 insertions(+), 1 deletions(-) - -diff --git a/libc/sysdeps/linux/common/bits/socket.h b/libc/sysdeps/linux/common/bits/socket.h -index ac5a433..11f6e97 100644 ---- a/libc/sysdeps/linux/common/bits/socket.h -+++ b/libc/sysdeps/linux/common/bits/socket.h -@@ -53,10 +53,20 @@ enum __socket_type - SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, - datagrams of fixed maximum length. */ - #define SOCK_SEQPACKET SOCK_SEQPACKET -- SOCK_PACKET = 10 /* Linux specific way of getting packets -+ SOCK_PACKET = 10, /* Linux specific way of getting packets - at the dev level. For writing rarp and - other similar things on the user level. */ - #define SOCK_PACKET SOCK_PACKET -+ -+ /* Flags to be ORed into the type parameter of socket and socketpair and -+ used for the flags parameter of paccept. */ -+ -+ SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the -+ new descriptor(s). */ -+#define SOCK_CLOEXEC SOCK_CLOEXEC -+ SOCK_NONBLOCK = 04000 /* Atomically mark descriptor(s) as -+ non-blocking. */ -+#define SOCK_NONBLOCK SOCK_NONBLOCK - }; - - /* Protocol families. */ --- -1.7.3.4 - diff --git a/toolchain/uClibc/uClibc-0.9.31-dnslookup-use-after-free.patch b/toolchain/uClibc/uClibc-0.9.31-dnslookup-use-after-free.patch deleted file mode 100644 index 9956d59..0000000 --- a/toolchain/uClibc/uClibc-0.9.31-dnslookup-use-after-free.patch +++ /dev/null @@ -1,36 +0,0 @@ -From eb1d8c8289f466ba3ad10b9a88ab2e426b8a9dc7 Mon Sep 17 00:00:00 2001 -From: Gabor Juhos -Date: Tue, 6 Apr 2010 09:55:19 +0200 -Subject: [PATCH] Fix use-after-free bug in __dns_lookup - -If the type of the first answer does not match with the requested type, -then the dotted name was freed. If there are no further answers in -the DNS reply, this pointer was used later on in the same function. -Additionally it is passed to the caller, and caused strange -behaviour. - -Signed-off-by: Gabor Juhos -Signed-off-by: Bernhard Reutner-Fischer ---- - libc/inet/resolv.c | 4 +--- - 1 files changed, 1 insertions(+), 3 deletions(-) - -diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c -index 056539f..9459199 100644 ---- a/libc/inet/resolv.c -+++ b/libc/inet/resolv.c -@@ -1517,10 +1517,8 @@ int attribute_hidden __dns_lookup(const char *name, - memcpy(a, &ma, sizeof(ma)); - if (a->atype != T_SIG && (NULL == a->buf || (type != T_A && type != T_AAAA))) - break; -- if (a->atype != type) { -- free(a->dotted); -+ if (a->atype != type) - continue; -- } - a->add_count = h.ancount - j - 1; - if ((a->rdlength + sizeof(struct in_addr*)) * a->add_count > a->buflen) - break; --- -1.7.0 - diff --git a/toolchain/uClibc/uClibc-0.9.31-fix-error-locale-utf-8.patch b/toolchain/uClibc/uClibc-0.9.31-fix-error-locale-utf-8.patch deleted file mode 100644 index 1305add..0000000 --- a/toolchain/uClibc/uClibc-0.9.31-fix-error-locale-utf-8.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - extra/locale/gen_wc8bit.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: uClibc-0.9.31/extra/locale/gen_wc8bit.c -=================================================================== ---- uClibc-0.9.31.orig/extra/locale/gen_wc8bit.c -+++ uClibc-0.9.31/extra/locale/gen_wc8bit.c -@@ -120,7 +120,7 @@ - } - - locale_failure: -- printf("could not find a UTF8 locale ... please enable en_US.UTF-8\n"); -+ fprintf(stderr, "could not find a UTF8 locale ... please enable en_US.UTF-8\n"); - return EXIT_FAILURE; - locale_success: - pclose(fp); diff --git a/toolchain/uClibc/uClibc-0.9.31-fix-fcntl64-for-64-bit-targets.patch b/toolchain/uClibc/uClibc-0.9.31-fix-fcntl64-for-64-bit-targets.patch deleted file mode 100644 index 763bfd3..0000000 --- a/toolchain/uClibc/uClibc-0.9.31-fix-fcntl64-for-64-bit-targets.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 6f1daaaf2d94c1e6184add44eda38b0781b88cf0 Mon Sep 17 00:00:00 2001 -From: Rob Landley -Date: Sun, 16 May 2010 21:41:36 +0000 -Subject: Fix fcntl64 for 64 bit targets. - -64 bit targets often don't have a separate fcntl64() system call, because they don't need one. - -Signed-off-by: Rob Landley -Signed-off-by: Austin Foxley ---- -diff --git a/include/fcntl.h b/include/fcntl.h -index e37073f..3cfb25f 100644 ---- a/include/fcntl.h -+++ b/include/fcntl.h -@@ -73,7 +73,7 @@ __BEGIN_DECLS - - This function is a cancellation point and therefore not marked with - __THROW. */ --#ifndef __USE_FILE_OFFSET64 -+#if !defined(__USE_FILE_OFFSET64) || defined(__LP64__) - extern int fcntl (int __fd, int __cmd, ...); - libc_hidden_proto(fcntl) - #else -@@ -83,7 +83,7 @@ extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64); - # define fcntl fcntl64 - # endif - #endif --#ifdef __USE_LARGEFILE64 -+#if defined(__USE_LARGEFILE64) && !defined(__LP64__) - extern int fcntl64 (int __fd, int __cmd, ...); - libc_hidden_proto(fcntl64) - #endif --- -cgit v0.8.2.1 diff --git a/toolchain/uClibc/uClibc-0.9.31-linuxthreads-errno-fix.patch b/toolchain/uClibc/uClibc-0.9.31-linuxthreads-errno-fix.patch deleted file mode 100644 index c49821b..0000000 --- a/toolchain/uClibc/uClibc-0.9.31-linuxthreads-errno-fix.patch +++ /dev/null @@ -1,98 +0,0 @@ -From af8b2d71ce37b9d4d24ddbc755cdea68de02949a Mon Sep 17 00:00:00 2001 -From: Peter Korsgaard -Date: Mon, 5 Jul 2010 14:08:17 +0200 -Subject: [PATCH] don't make __errno_location / __h_errno_location hidden - -Closes #2089 (https://bugs.busybox.net/show_bug.cgi?id=2089) - -__errno_location / __h_errno_location access has to go through the PLT -like malloc/free, so the linuxthread variants gets used instead when -compiling with -pthread. - -Based on http://github.com/mat-c/uClibc/commit/328d392c54aa5dc2b8e7f398a419087de497de2b - -Signed-off-by: Peter Korsgaard ---- - include/netdb.h | 1 - - libc/misc/internals/__errno_location.c | 3 --- - libc/misc/internals/__h_errno_location.c | 1 - - libc/misc/internals/__uClibc_main.c | 2 -- - libc/sysdeps/linux/common/bits/errno.h | 1 - - libc/sysdeps/linux/common/bits/uClibc_errno.h | 3 --- - 6 files changed, 0 insertions(+), 11 deletions(-) - -diff --git a/include/netdb.h b/include/netdb.h -index 9d3807d..ac411ab 100644 ---- a/include/netdb.h -+++ b/include/netdb.h -@@ -59,7 +59,6 @@ __BEGIN_DECLS - - /* Function to get address of global `h_errno' variable. */ - extern int *__h_errno_location (void) __THROW __attribute__ ((__const__)); --libc_hidden_proto(__h_errno_location) - - /* Macros for accessing h_errno from inside libc. */ - #ifdef _LIBC -diff --git a/libc/misc/internals/__errno_location.c b/libc/misc/internals/__errno_location.c -index 487a9c2..0620860 100644 ---- a/libc/misc/internals/__errno_location.c -+++ b/libc/misc/internals/__errno_location.c -@@ -11,6 +11,3 @@ int * weak_const_function __errno_location (void) - { - return &errno; - } --#ifdef IS_IN_libc /* not really need, only to keep in sync w/ libc_hidden_proto */ --libc_hidden_weak(__errno_location) --#endif -diff --git a/libc/misc/internals/__h_errno_location.c b/libc/misc/internals/__h_errno_location.c -index 213d398..235df4e 100644 ---- a/libc/misc/internals/__h_errno_location.c -+++ b/libc/misc/internals/__h_errno_location.c -@@ -10,4 +10,3 @@ int * weak_const_function __h_errno_location (void) - { - return &h_errno; - } --libc_hidden_weak(__h_errno_location) -diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c -index 6e520fa..f4a9ebb 100644 ---- a/libc/misc/internals/__uClibc_main.c -+++ b/libc/misc/internals/__uClibc_main.c -@@ -64,9 +64,7 @@ void internal_function _dl_aux_init (ElfW(auxv_t) *av); - * Prototypes. - */ - extern int *weak_const_function __errno_location(void); --libc_hidden_proto(__errno_location) - extern int *weak_const_function __h_errno_location(void); --libc_hidden_proto(__h_errno_location) - - extern void weak_function _stdio_init(void) attribute_hidden; - #ifdef __UCLIBC_HAS_LOCALE__ -diff --git a/libc/sysdeps/linux/common/bits/errno.h b/libc/sysdeps/linux/common/bits/errno.h -index 0bf6354..de9688a 100644 ---- a/libc/sysdeps/linux/common/bits/errno.h -+++ b/libc/sysdeps/linux/common/bits/errno.h -@@ -43,7 +43,6 @@ - # ifndef __ASSEMBLER__ - /* Function to get address of global `errno' variable. */ - extern int *__errno_location (void) __THROW __attribute__ ((__const__)); --libc_hidden_proto(__errno_location) - - # ifdef __UCLIBC_HAS_THREADS__ - /* When using threads, errno is a per-thread value. */ -diff --git a/libc/sysdeps/linux/common/bits/uClibc_errno.h b/libc/sysdeps/linux/common/bits/uClibc_errno.h -index 9c15618..79eb7e6 100644 ---- a/libc/sysdeps/linux/common/bits/uClibc_errno.h -+++ b/libc/sysdeps/linux/common/bits/uClibc_errno.h -@@ -33,9 +33,6 @@ extern int *__errno_location (void) __THROW __attribute__ ((__const__)) - ; - # if defined __UCLIBC_HAS_THREADS__ - # include --# if defined USE___THREAD && USE___THREAD --libc_hidden_proto(__errno_location) --# endif - # endif - - #endif /* !__ASSEMBLER__ */ --- -1.7.1 - diff --git a/toolchain/uClibc/uClibc-0.9.31-more-workarounds-GCC-PR32219.patch b/toolchain/uClibc/uClibc-0.9.31-more-workarounds-GCC-PR32219.patch deleted file mode 100644 index 9e69532..0000000 --- a/toolchain/uClibc/uClibc-0.9.31-more-workarounds-GCC-PR32219.patch +++ /dev/null @@ -1,40 +0,0 @@ -From aa67771881d65373da448ad5f7a8393f3a1d9469 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Timo=20Ter=C3=A4s?= -Date: Wed, 30 Jun 2010 14:46:37 +0300 -Subject: [PATCH] more workarounds for GCC PR32219 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Commit 2e53dd645d5348f207cec7f8595969dc566c5a55 workarounds GCC -bug when accessing _locale_init and _stdio_init. We need the same -fix for __errno_location and __h_errno_location otherwise we crash -calling null with static and non-threaded builds. - -Signed-off-by: Timo Teräs -Signed-off-by: Bernhard Reutner-Fischer ---- - libc/misc/internals/__uClibc_main.c | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c -index 3f09ad2..58f6643 100644 ---- a/libc/misc/internals/__uClibc_main.c -+++ b/libc/misc/internals/__uClibc_main.c -@@ -447,11 +447,11 @@ void __uClibc_main(int (*main)(int, char **, char **), int argc, - * have resulted in errno being set nonzero, so set it to 0 before - * we call main. - */ -- if (likely(__errno_location!=NULL)) -+ if (likely(not_null_ptr(__errno_location))) - *(__errno_location()) = 0; - - /* Set h_errno to 0 as well */ -- if (likely(__h_errno_location!=NULL)) -+ if (likely(not_null_ptr(__h_errno_location))) - *(__h_errno_location()) = 0; - - #if defined HAVE_CLEANUP_JMP_BUF && defined __UCLIBC_HAS_THREADS_NATIVE__ --- -1.7.1 - diff --git a/toolchain/uClibc/uClibc-0.9.31-powerpc-ptrace-fix.patch b/toolchain/uClibc/uClibc-0.9.31-powerpc-ptrace-fix.patch deleted file mode 100644 index a5cceca..0000000 --- a/toolchain/uClibc/uClibc-0.9.31-powerpc-ptrace-fix.patch +++ /dev/null @@ -1,62 +0,0 @@ -[PATCH] powerpc: add PTRACE_EVENT_ defines needed by ltrace - -Equivalent to the common version and kernel headers. - -Signed-off-by: Peter Korsgaard ---- - libc/sysdeps/linux/powerpc/sys/ptrace.h | 41 +++++++++++++++++++++++++++++++- - 1 file changed, 40 insertions(+), 1 deletion(-) - -Index: uClibc-0.9.31/libc/sysdeps/linux/powerpc/sys/ptrace.h -=================================================================== ---- uClibc-0.9.31.orig/libc/sysdeps/linux/powerpc/sys/ptrace.h -+++ uClibc-0.9.31/libc/sysdeps/linux/powerpc/sys/ptrace.h -@@ -79,8 +79,47 @@ enum __ptrace_request - #define PT_DETACH PTRACE_DETACH - - /* Continue and stop at the next (return from) syscall. */ -- PTRACE_SYSCALL = 24 -+ PTRACE_SYSCALL = 24, - #define PT_SYSCALL PTRACE_SYSCALL -+ -+ /* Set ptrace filter options. */ -+ PTRACE_SETOPTIONS = 0x4200, -+#define PT_SETOPTIONS PTRACE_SETOPTIONS -+ -+ /* Get last ptrace message. */ -+ PTRACE_GETEVENTMSG = 0x4201, -+#define PT_GETEVENTMSG PTRACE_GETEVENTMSG -+ -+ /* Get siginfo for process. */ -+ PTRACE_GETSIGINFO = 0x4202, -+#define PT_GETSIGINFO PTRACE_GETSIGINFO -+ -+ /* Set new siginfo for process. */ -+ PTRACE_SETSIGINFO = 0x4203 -+#define PT_SETSIGINFO PTRACE_SETSIGINFO -+}; -+ -+ -+/* Options set using PTRACE_SETOPTIONS. */ -+enum __ptrace_setoptions { -+ PTRACE_O_TRACESYSGOOD = 0x00000001, -+ PTRACE_O_TRACEFORK = 0x00000002, -+ PTRACE_O_TRACEVFORK = 0x00000004, -+ PTRACE_O_TRACECLONE = 0x00000008, -+ PTRACE_O_TRACEEXEC = 0x00000010, -+ PTRACE_O_TRACEVFORKDONE = 0x00000020, -+ PTRACE_O_TRACEEXIT = 0x00000040, -+ PTRACE_O_MASK = 0x0000007f -+}; -+ -+/* Wait extended result codes for the above trace options. */ -+enum __ptrace_eventcodes { -+ PTRACE_EVENT_FORK = 1, -+ PTRACE_EVENT_VFORK = 2, -+ PTRACE_EVENT_CLONE = 3, -+ PTRACE_EVENT_EXEC = 4, -+ PTRACE_EVENT_VFORK_DONE = 5, -+ PTRACE_EVENT_EXIT = 6 - }; - - /* Perform process tracing functions. REQUEST is one of the values diff --git a/toolchain/uClibc/uClibc-0.9.31-quad-routines.patch b/toolchain/uClibc/uClibc-0.9.31-quad-routines.patch deleted file mode 100644 index de37c30..0000000 --- a/toolchain/uClibc/uClibc-0.9.31-quad-routines.patch +++ /dev/null @@ -1,7393 +0,0 @@ -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/Makefile.arch uClibc-0.9.31/libc/sysdeps/linux/sparc/Makefile.arch ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/Makefile.arch 2010-10-14 14:03:46.000000000 +0200 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/Makefile.arch 2010-10-14 14:36:34.000000000 +0200 -@@ -5,8 +5,15 @@ - # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. - # - --CSRC := brk.c __syscall_error.c qp_ops.c sigaction.c -+CSRC := brk.c __syscall_error.c sigaction.c - - SSRC := \ - __longjmp.S fork.S vfork.S clone.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \ - syscall.S urem.S udiv.S umul.S sdiv.S rem.S pipe.S -+ -+CSRC += $(foreach f, \ -+ q_div.c q_fle.c q_mul.c q_qtoll.c q_stoq.c \ -+ mp_clz_tab.c q_dtoq.c q_flt.c q_neg.c q_qtos.c q_sub.c \ -+ q_add.c q_feq.c q_fne.c q_qtod.c q_qtou.c q_ulltoq.c \ -+ q_cmp.c q_fge.c q_itoq.c q_qtoull.c q_util.c \ -+ q_cmpe.c q_fgt.c q_lltoq.c q_qtoi.c q_sqrt.c q_utoq.c, soft-fp/$(f)) -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/double.h uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/double.h ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/double.h 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/double.h 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,264 @@ -+/* Software floating-point emulation. -+ Definitions for IEEE Double Precision -+ Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com), -+ Jakub Jelinek (jj@ultra.linux.cz), -+ David S. Miller (davem@redhat.com) and -+ Peter Maydell (pmaydell@chiark.greenend.org.uk). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ In addition to the permissions in the GNU Lesser General Public -+ License, the Free Software Foundation gives you unlimited -+ permission to link the compiled version of this file into -+ combinations with other programs, and to distribute those -+ combinations without any restriction coming from the use of this -+ file. (The Lesser General Public License restrictions do apply in -+ other respects; for example, they cover modification of the file, -+ and distribution when not linked into a combine executable.) -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, -+ MA 02110-1301, USA. */ -+ -+#if _FP_W_TYPE_SIZE < 32 -+#error "Here's a nickel kid. Go buy yourself a real computer." -+#endif -+ -+#if _FP_W_TYPE_SIZE < 64 -+#define _FP_FRACTBITS_D (2 * _FP_W_TYPE_SIZE) -+#else -+#define _FP_FRACTBITS_D _FP_W_TYPE_SIZE -+#endif -+ -+#define _FP_FRACBITS_D 53 -+#define _FP_FRACXBITS_D (_FP_FRACTBITS_D - _FP_FRACBITS_D) -+#define _FP_WFRACBITS_D (_FP_WORKBITS + _FP_FRACBITS_D) -+#define _FP_WFRACXBITS_D (_FP_FRACTBITS_D - _FP_WFRACBITS_D) -+#define _FP_EXPBITS_D 11 -+#define _FP_EXPBIAS_D 1023 -+#define _FP_EXPMAX_D 2047 -+ -+#define _FP_QNANBIT_D \ -+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_D-2) % _FP_W_TYPE_SIZE) -+#define _FP_QNANBIT_SH_D \ -+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_D-2+_FP_WORKBITS) % _FP_W_TYPE_SIZE) -+#define _FP_IMPLBIT_D \ -+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_D-1) % _FP_W_TYPE_SIZE) -+#define _FP_IMPLBIT_SH_D \ -+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_D-1+_FP_WORKBITS) % _FP_W_TYPE_SIZE) -+#define _FP_OVERFLOW_D \ -+ ((_FP_W_TYPE)1 << _FP_WFRACBITS_D % _FP_W_TYPE_SIZE) -+ -+typedef float DFtype __attribute__((mode(DF))); -+ -+#if _FP_W_TYPE_SIZE < 64 -+ -+union _FP_UNION_D -+{ -+ DFtype flt; -+ struct { -+#if __BYTE_ORDER == __BIG_ENDIAN -+ unsigned sign : 1; -+ unsigned exp : _FP_EXPBITS_D; -+ unsigned frac1 : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0) - _FP_W_TYPE_SIZE; -+ unsigned frac0 : _FP_W_TYPE_SIZE; -+#else -+ unsigned frac0 : _FP_W_TYPE_SIZE; -+ unsigned frac1 : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0) - _FP_W_TYPE_SIZE; -+ unsigned exp : _FP_EXPBITS_D; -+ unsigned sign : 1; -+#endif -+ } bits __attribute__((packed)); -+}; -+ -+#define FP_DECL_D(X) _FP_DECL(2,X) -+#define FP_UNPACK_RAW_D(X,val) _FP_UNPACK_RAW_2(D,X,val) -+#define FP_UNPACK_RAW_DP(X,val) _FP_UNPACK_RAW_2_P(D,X,val) -+#define FP_PACK_RAW_D(val,X) _FP_PACK_RAW_2(D,val,X) -+#define FP_PACK_RAW_DP(val,X) \ -+ do { \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_2_P(D,val,X); \ -+ } while (0) -+ -+#define FP_UNPACK_D(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_2(D,X,val); \ -+ _FP_UNPACK_CANONICAL(D,2,X); \ -+ } while (0) -+ -+#define FP_UNPACK_DP(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_2_P(D,X,val); \ -+ _FP_UNPACK_CANONICAL(D,2,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_D(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_2(D,X,val); \ -+ _FP_UNPACK_SEMIRAW(D,2,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_DP(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_2_P(D,X,val); \ -+ _FP_UNPACK_SEMIRAW(D,2,X); \ -+ } while (0) -+ -+#define FP_PACK_D(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(D,2,X); \ -+ _FP_PACK_RAW_2(D,val,X); \ -+ } while (0) -+ -+#define FP_PACK_DP(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(D,2,X); \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_2_P(D,val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_D(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(D,2,X); \ -+ _FP_PACK_RAW_2(D,val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_DP(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(D,2,X); \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_2_P(D,val,X); \ -+ } while (0) -+ -+#define FP_ISSIGNAN_D(X) _FP_ISSIGNAN(D,2,X) -+#define FP_NEG_D(R,X) _FP_NEG(D,2,R,X) -+#define FP_ADD_D(R,X,Y) _FP_ADD(D,2,R,X,Y) -+#define FP_SUB_D(R,X,Y) _FP_SUB(D,2,R,X,Y) -+#define FP_MUL_D(R,X,Y) _FP_MUL(D,2,R,X,Y) -+#define FP_DIV_D(R,X,Y) _FP_DIV(D,2,R,X,Y) -+#define FP_SQRT_D(R,X) _FP_SQRT(D,2,R,X) -+#define _FP_SQRT_MEAT_D(R,S,T,X,Q) _FP_SQRT_MEAT_2(R,S,T,X,Q) -+ -+#define FP_CMP_D(r,X,Y,un) _FP_CMP(D,2,r,X,Y,un) -+#define FP_CMP_EQ_D(r,X,Y) _FP_CMP_EQ(D,2,r,X,Y) -+#define FP_CMP_UNORD_D(r,X,Y) _FP_CMP_UNORD(D,2,r,X,Y) -+ -+#define FP_TO_INT_D(r,X,rsz,rsg) _FP_TO_INT(D,2,r,X,rsz,rsg) -+#define FP_FROM_INT_D(X,r,rs,rt) _FP_FROM_INT(D,2,X,r,rs,rt) -+ -+#define _FP_FRAC_HIGH_D(X) _FP_FRAC_HIGH_2(X) -+#define _FP_FRAC_HIGH_RAW_D(X) _FP_FRAC_HIGH_2(X) -+ -+#else -+ -+union _FP_UNION_D -+{ -+ DFtype flt; -+ struct { -+#if __BYTE_ORDER == __BIG_ENDIAN -+ unsigned sign : 1; -+ unsigned exp : _FP_EXPBITS_D; -+ _FP_W_TYPE frac : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0); -+#else -+ _FP_W_TYPE frac : _FP_FRACBITS_D - (_FP_IMPLBIT_D != 0); -+ unsigned exp : _FP_EXPBITS_D; -+ unsigned sign : 1; -+#endif -+ } bits __attribute__((packed)); -+}; -+ -+#define FP_DECL_D(X) _FP_DECL(1,X) -+#define FP_UNPACK_RAW_D(X,val) _FP_UNPACK_RAW_1(D,X,val) -+#define FP_UNPACK_RAW_DP(X,val) _FP_UNPACK_RAW_1_P(D,X,val) -+#define FP_PACK_RAW_D(val,X) _FP_PACK_RAW_1(D,val,X) -+#define FP_PACK_RAW_DP(val,X) \ -+ do { \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_1_P(D,val,X); \ -+ } while (0) -+ -+#define FP_UNPACK_D(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_1(D,X,val); \ -+ _FP_UNPACK_CANONICAL(D,1,X); \ -+ } while (0) -+ -+#define FP_UNPACK_DP(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_1_P(D,X,val); \ -+ _FP_UNPACK_CANONICAL(D,1,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_D(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_2(1,X,val); \ -+ _FP_UNPACK_SEMIRAW(D,1,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_DP(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_2_P(1,X,val); \ -+ _FP_UNPACK_SEMIRAW(D,1,X); \ -+ } while (0) -+ -+#define FP_PACK_D(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(D,1,X); \ -+ _FP_PACK_RAW_1(D,val,X); \ -+ } while (0) -+ -+#define FP_PACK_DP(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(D,1,X); \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_1_P(D,val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_D(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(D,1,X); \ -+ _FP_PACK_RAW_1(D,val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_DP(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(D,1,X); \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_1_P(D,val,X); \ -+ } while (0) -+ -+#define FP_ISSIGNAN_D(X) _FP_ISSIGNAN(D,1,X) -+#define FP_NEG_D(R,X) _FP_NEG(D,1,R,X) -+#define FP_ADD_D(R,X,Y) _FP_ADD(D,1,R,X,Y) -+#define FP_SUB_D(R,X,Y) _FP_SUB(D,1,R,X,Y) -+#define FP_MUL_D(R,X,Y) _FP_MUL(D,1,R,X,Y) -+#define FP_DIV_D(R,X,Y) _FP_DIV(D,1,R,X,Y) -+#define FP_SQRT_D(R,X) _FP_SQRT(D,1,R,X) -+#define _FP_SQRT_MEAT_D(R,S,T,X,Q) _FP_SQRT_MEAT_1(R,S,T,X,Q) -+ -+/* The implementation of _FP_MUL_D and _FP_DIV_D should be chosen by -+ the target machine. */ -+ -+#define FP_CMP_D(r,X,Y,un) _FP_CMP(D,1,r,X,Y,un) -+#define FP_CMP_EQ_D(r,X,Y) _FP_CMP_EQ(D,1,r,X,Y) -+#define FP_CMP_UNORD_D(r,X,Y) _FP_CMP_UNORD(D,1,r,X,Y) -+ -+#define FP_TO_INT_D(r,X,rsz,rsg) _FP_TO_INT(D,1,r,X,rsz,rsg) -+#define FP_FROM_INT_D(X,r,rs,rt) _FP_FROM_INT(D,1,X,r,rs,rt) -+ -+#define _FP_FRAC_HIGH_D(X) _FP_FRAC_HIGH_1(X) -+#define _FP_FRAC_HIGH_RAW_D(X) _FP_FRAC_HIGH_1(X) -+ -+#endif /* W_TYPE_SIZE < 64 */ -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/extended.h uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/extended.h ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/extended.h 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/extended.h 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,431 @@ -+/* Software floating-point emulation. -+ Definitions for IEEE Extended Precision. -+ Copyright (C) 1999,2006,2007 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ In addition to the permissions in the GNU Lesser General Public -+ License, the Free Software Foundation gives you unlimited -+ permission to link the compiled version of this file into -+ combinations with other programs, and to distribute those -+ combinations without any restriction coming from the use of this -+ file. (The Lesser General Public License restrictions do apply in -+ other respects; for example, they cover modification of the file, -+ and distribution when not linked into a combine executable.) -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, -+ MA 02110-1301, USA. */ -+ -+#if _FP_W_TYPE_SIZE < 32 -+#error "Here's a nickel, kid. Go buy yourself a real computer." -+#endif -+ -+#if _FP_W_TYPE_SIZE < 64 -+#define _FP_FRACTBITS_E (4*_FP_W_TYPE_SIZE) -+#else -+#define _FP_FRACTBITS_E (2*_FP_W_TYPE_SIZE) -+#endif -+ -+#define _FP_FRACBITS_E 64 -+#define _FP_FRACXBITS_E (_FP_FRACTBITS_E - _FP_FRACBITS_E) -+#define _FP_WFRACBITS_E (_FP_WORKBITS + _FP_FRACBITS_E) -+#define _FP_WFRACXBITS_E (_FP_FRACTBITS_E - _FP_WFRACBITS_E) -+#define _FP_EXPBITS_E 15 -+#define _FP_EXPBIAS_E 16383 -+#define _FP_EXPMAX_E 32767 -+ -+#define _FP_QNANBIT_E \ -+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_E-2) % _FP_W_TYPE_SIZE) -+#define _FP_QNANBIT_SH_E \ -+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_E-2+_FP_WORKBITS) % _FP_W_TYPE_SIZE) -+#define _FP_IMPLBIT_E \ -+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_E-1) % _FP_W_TYPE_SIZE) -+#define _FP_IMPLBIT_SH_E \ -+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_E-1+_FP_WORKBITS) % _FP_W_TYPE_SIZE) -+#define _FP_OVERFLOW_E \ -+ ((_FP_W_TYPE)1 << (_FP_WFRACBITS_E % _FP_W_TYPE_SIZE)) -+ -+typedef float XFtype __attribute__((mode(XF))); -+ -+#if _FP_W_TYPE_SIZE < 64 -+ -+union _FP_UNION_E -+{ -+ XFtype flt; -+ struct -+ { -+#if __BYTE_ORDER == __BIG_ENDIAN -+ unsigned long pad1 : _FP_W_TYPE_SIZE; -+ unsigned long pad2 : (_FP_W_TYPE_SIZE - 1 - _FP_EXPBITS_E); -+ unsigned long sign : 1; -+ unsigned long exp : _FP_EXPBITS_E; -+ unsigned long frac1 : _FP_W_TYPE_SIZE; -+ unsigned long frac0 : _FP_W_TYPE_SIZE; -+#else -+ unsigned long frac0 : _FP_W_TYPE_SIZE; -+ unsigned long frac1 : _FP_W_TYPE_SIZE; -+ unsigned exp : _FP_EXPBITS_E; -+ unsigned sign : 1; -+#endif /* not bigendian */ -+ } bits __attribute__((packed)); -+}; -+ -+ -+#define FP_DECL_E(X) _FP_DECL(4,X) -+ -+#define FP_UNPACK_RAW_E(X, val) \ -+ do { \ -+ union _FP_UNION_E _flo; _flo.flt = (val); \ -+ \ -+ X##_f[2] = 0; X##_f[3] = 0; \ -+ X##_f[0] = _flo.bits.frac0; \ -+ X##_f[1] = _flo.bits.frac1; \ -+ X##_e = _flo.bits.exp; \ -+ X##_s = _flo.bits.sign; \ -+ } while (0) -+ -+#define FP_UNPACK_RAW_EP(X, val) \ -+ do { \ -+ union _FP_UNION_E *_flo = \ -+ (union _FP_UNION_E *)(val); \ -+ \ -+ X##_f[2] = 0; X##_f[3] = 0; \ -+ X##_f[0] = _flo->bits.frac0; \ -+ X##_f[1] = _flo->bits.frac1; \ -+ X##_e = _flo->bits.exp; \ -+ X##_s = _flo->bits.sign; \ -+ } while (0) -+ -+#define FP_PACK_RAW_E(val, X) \ -+ do { \ -+ union _FP_UNION_E _flo; \ -+ \ -+ if (X##_e) X##_f[1] |= _FP_IMPLBIT_E; \ -+ else X##_f[1] &= ~(_FP_IMPLBIT_E); \ -+ _flo.bits.frac0 = X##_f[0]; \ -+ _flo.bits.frac1 = X##_f[1]; \ -+ _flo.bits.exp = X##_e; \ -+ _flo.bits.sign = X##_s; \ -+ \ -+ (val) = _flo.flt; \ -+ } while (0) -+ -+#define FP_PACK_RAW_EP(val, X) \ -+ do { \ -+ if (!FP_INHIBIT_RESULTS) \ -+ { \ -+ union _FP_UNION_E *_flo = \ -+ (union _FP_UNION_E *)(val); \ -+ \ -+ if (X##_e) X##_f[1] |= _FP_IMPLBIT_E; \ -+ else X##_f[1] &= ~(_FP_IMPLBIT_E); \ -+ _flo->bits.frac0 = X##_f[0]; \ -+ _flo->bits.frac1 = X##_f[1]; \ -+ _flo->bits.exp = X##_e; \ -+ _flo->bits.sign = X##_s; \ -+ } \ -+ } while (0) -+ -+#define FP_UNPACK_E(X,val) \ -+ do { \ -+ FP_UNPACK_RAW_E(X,val); \ -+ _FP_UNPACK_CANONICAL(E,4,X); \ -+ } while (0) -+ -+#define FP_UNPACK_EP(X,val) \ -+ do { \ -+ FP_UNPACK_RAW_EP(X,val); \ -+ _FP_UNPACK_CANONICAL(E,4,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_E(X,val) \ -+ do { \ -+ FP_UNPACK_RAW_E(X,val); \ -+ _FP_UNPACK_SEMIRAW(E,4,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_EP(X,val) \ -+ do { \ -+ FP_UNPACK_RAW_EP(X,val); \ -+ _FP_UNPACK_SEMIRAW(E,4,X); \ -+ } while (0) -+ -+#define FP_PACK_E(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(E,4,X); \ -+ FP_PACK_RAW_E(val,X); \ -+ } while (0) -+ -+#define FP_PACK_EP(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(E,4,X); \ -+ FP_PACK_RAW_EP(val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_E(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(E,4,X); \ -+ FP_PACK_RAW_E(val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_EP(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(E,4,X); \ -+ FP_PACK_RAW_EP(val,X); \ -+ } while (0) -+ -+#define FP_ISSIGNAN_E(X) _FP_ISSIGNAN(E,4,X) -+#define FP_NEG_E(R,X) _FP_NEG(E,4,R,X) -+#define FP_ADD_E(R,X,Y) _FP_ADD(E,4,R,X,Y) -+#define FP_SUB_E(R,X,Y) _FP_SUB(E,4,R,X,Y) -+#define FP_MUL_E(R,X,Y) _FP_MUL(E,4,R,X,Y) -+#define FP_DIV_E(R,X,Y) _FP_DIV(E,4,R,X,Y) -+#define FP_SQRT_E(R,X) _FP_SQRT(E,4,R,X) -+ -+/* -+ * Square root algorithms: -+ * We have just one right now, maybe Newton approximation -+ * should be added for those machines where division is fast. -+ * This has special _E version because standard _4 square -+ * root would not work (it has to start normally with the -+ * second word and not the first), but as we have to do it -+ * anyway, we optimize it by doing most of the calculations -+ * in two UWtype registers instead of four. -+ */ -+ -+#define _FP_SQRT_MEAT_E(R, S, T, X, q) \ -+ do { \ -+ q = (_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE - 1); \ -+ _FP_FRAC_SRL_4(X, (_FP_WORKBITS)); \ -+ while (q) \ -+ { \ -+ T##_f[1] = S##_f[1] + q; \ -+ if (T##_f[1] <= X##_f[1]) \ -+ { \ -+ S##_f[1] = T##_f[1] + q; \ -+ X##_f[1] -= T##_f[1]; \ -+ R##_f[1] += q; \ -+ } \ -+ _FP_FRAC_SLL_2(X, 1); \ -+ q >>= 1; \ -+ } \ -+ q = (_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE - 1); \ -+ while (q) \ -+ { \ -+ T##_f[0] = S##_f[0] + q; \ -+ T##_f[1] = S##_f[1]; \ -+ if (T##_f[1] < X##_f[1] || \ -+ (T##_f[1] == X##_f[1] && \ -+ T##_f[0] <= X##_f[0])) \ -+ { \ -+ S##_f[0] = T##_f[0] + q; \ -+ S##_f[1] += (T##_f[0] > S##_f[0]); \ -+ _FP_FRAC_DEC_2(X, T); \ -+ R##_f[0] += q; \ -+ } \ -+ _FP_FRAC_SLL_2(X, 1); \ -+ q >>= 1; \ -+ } \ -+ _FP_FRAC_SLL_4(R, (_FP_WORKBITS)); \ -+ if (X##_f[0] | X##_f[1]) \ -+ { \ -+ if (S##_f[1] < X##_f[1] || \ -+ (S##_f[1] == X##_f[1] && \ -+ S##_f[0] < X##_f[0])) \ -+ R##_f[0] |= _FP_WORK_ROUND; \ -+ R##_f[0] |= _FP_WORK_STICKY; \ -+ } \ -+ } while (0) -+ -+#define FP_CMP_E(r,X,Y,un) _FP_CMP(E,4,r,X,Y,un) -+#define FP_CMP_EQ_E(r,X,Y) _FP_CMP_EQ(E,4,r,X,Y) -+#define FP_CMP_UNORD_E(r,X,Y) _FP_CMP_UNORD(E,4,r,X,Y) -+ -+#define FP_TO_INT_E(r,X,rsz,rsg) _FP_TO_INT(E,4,r,X,rsz,rsg) -+#define FP_FROM_INT_E(X,r,rs,rt) _FP_FROM_INT(E,4,X,r,rs,rt) -+ -+#define _FP_FRAC_HIGH_E(X) (X##_f[2]) -+#define _FP_FRAC_HIGH_RAW_E(X) (X##_f[1]) -+ -+#else /* not _FP_W_TYPE_SIZE < 64 */ -+union _FP_UNION_E -+{ -+ XFtype flt; -+ struct { -+#if __BYTE_ORDER == __BIG_ENDIAN -+ _FP_W_TYPE pad : (_FP_W_TYPE_SIZE - 1 - _FP_EXPBITS_E); -+ unsigned sign : 1; -+ unsigned exp : _FP_EXPBITS_E; -+ _FP_W_TYPE frac : _FP_W_TYPE_SIZE; -+#else -+ _FP_W_TYPE frac : _FP_W_TYPE_SIZE; -+ unsigned exp : _FP_EXPBITS_E; -+ unsigned sign : 1; -+#endif -+ } bits; -+}; -+ -+#define FP_DECL_E(X) _FP_DECL(2,X) -+ -+#define FP_UNPACK_RAW_E(X, val) \ -+ do { \ -+ union _FP_UNION_E _flo; _flo.flt = (val); \ -+ \ -+ X##_f0 = _flo.bits.frac; \ -+ X##_f1 = 0; \ -+ X##_e = _flo.bits.exp; \ -+ X##_s = _flo.bits.sign; \ -+ } while (0) -+ -+#define FP_UNPACK_RAW_EP(X, val) \ -+ do { \ -+ union _FP_UNION_E *_flo = \ -+ (union _FP_UNION_E *)(val); \ -+ \ -+ X##_f0 = _flo->bits.frac; \ -+ X##_f1 = 0; \ -+ X##_e = _flo->bits.exp; \ -+ X##_s = _flo->bits.sign; \ -+ } while (0) -+ -+#define FP_PACK_RAW_E(val, X) \ -+ do { \ -+ union _FP_UNION_E _flo; \ -+ \ -+ if (X##_e) X##_f0 |= _FP_IMPLBIT_E; \ -+ else X##_f0 &= ~(_FP_IMPLBIT_E); \ -+ _flo.bits.frac = X##_f0; \ -+ _flo.bits.exp = X##_e; \ -+ _flo.bits.sign = X##_s; \ -+ \ -+ (val) = _flo.flt; \ -+ } while (0) -+ -+#define FP_PACK_RAW_EP(fs, val, X) \ -+ do { \ -+ if (!FP_INHIBIT_RESULTS) \ -+ { \ -+ union _FP_UNION_E *_flo = \ -+ (union _FP_UNION_E *)(val); \ -+ \ -+ if (X##_e) X##_f0 |= _FP_IMPLBIT_E; \ -+ else X##_f0 &= ~(_FP_IMPLBIT_E); \ -+ _flo->bits.frac = X##_f0; \ -+ _flo->bits.exp = X##_e; \ -+ _flo->bits.sign = X##_s; \ -+ } \ -+ } while (0) -+ -+ -+#define FP_UNPACK_E(X,val) \ -+ do { \ -+ FP_UNPACK_RAW_E(X,val); \ -+ _FP_UNPACK_CANONICAL(E,2,X); \ -+ } while (0) -+ -+#define FP_UNPACK_EP(X,val) \ -+ do { \ -+ FP_UNPACK_RAW_EP(X,val); \ -+ _FP_UNPACK_CANONICAL(E,2,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_E(X,val) \ -+ do { \ -+ FP_UNPACK_RAW_E(X,val); \ -+ _FP_UNPACK_SEMIRAW(E,2,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_EP(X,val) \ -+ do { \ -+ FP_UNPACK_RAW_EP(X,val); \ -+ _FP_UNPACK_SEMIRAW(E,2,X); \ -+ } while (0) -+ -+#define FP_PACK_E(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(E,2,X); \ -+ FP_PACK_RAW_E(val,X); \ -+ } while (0) -+ -+#define FP_PACK_EP(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(E,2,X); \ -+ FP_PACK_RAW_EP(val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_E(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(E,2,X); \ -+ FP_PACK_RAW_E(val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_EP(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(E,2,X); \ -+ FP_PACK_RAW_EP(val,X); \ -+ } while (0) -+ -+#define FP_ISSIGNAN_E(X) _FP_ISSIGNAN(E,2,X) -+#define FP_NEG_E(R,X) _FP_NEG(E,2,R,X) -+#define FP_ADD_E(R,X,Y) _FP_ADD(E,2,R,X,Y) -+#define FP_SUB_E(R,X,Y) _FP_SUB(E,2,R,X,Y) -+#define FP_MUL_E(R,X,Y) _FP_MUL(E,2,R,X,Y) -+#define FP_DIV_E(R,X,Y) _FP_DIV(E,2,R,X,Y) -+#define FP_SQRT_E(R,X) _FP_SQRT(E,2,R,X) -+ -+/* -+ * Square root algorithms: -+ * We have just one right now, maybe Newton approximation -+ * should be added for those machines where division is fast. -+ * We optimize it by doing most of the calculations -+ * in one UWtype registers instead of two, although we don't -+ * have to. -+ */ -+#define _FP_SQRT_MEAT_E(R, S, T, X, q) \ -+ do { \ -+ q = (_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE - 1); \ -+ _FP_FRAC_SRL_2(X, (_FP_WORKBITS)); \ -+ while (q) \ -+ { \ -+ T##_f0 = S##_f0 + q; \ -+ if (T##_f0 <= X##_f0) \ -+ { \ -+ S##_f0 = T##_f0 + q; \ -+ X##_f0 -= T##_f0; \ -+ R##_f0 += q; \ -+ } \ -+ _FP_FRAC_SLL_1(X, 1); \ -+ q >>= 1; \ -+ } \ -+ _FP_FRAC_SLL_2(R, (_FP_WORKBITS)); \ -+ if (X##_f0) \ -+ { \ -+ if (S##_f0 < X##_f0) \ -+ R##_f0 |= _FP_WORK_ROUND; \ -+ R##_f0 |= _FP_WORK_STICKY; \ -+ } \ -+ } while (0) -+ -+#define FP_CMP_E(r,X,Y,un) _FP_CMP(E,2,r,X,Y,un) -+#define FP_CMP_EQ_E(r,X,Y) _FP_CMP_EQ(E,2,r,X,Y) -+#define FP_CMP_UNORD_E(r,X,Y) _FP_CMP_UNORD(E,2,r,X,Y) -+ -+#define FP_TO_INT_E(r,X,rsz,rsg) _FP_TO_INT(E,2,r,X,rsz,rsg) -+#define FP_FROM_INT_E(X,r,rs,rt) _FP_FROM_INT(E,2,X,r,rs,rt) -+ -+#define _FP_FRAC_HIGH_E(X) (X##_f1) -+#define _FP_FRAC_HIGH_RAW_E(X) (X##_f0) -+ -+#endif /* not _FP_W_TYPE_SIZE < 64 */ -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/longlong.h uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/longlong.h ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/longlong.h 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/longlong.h 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,1461 @@ -+/* longlong.h -- definitions for mixed size 32/64 bit arithmetic. -+ Copyright (C) 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -+ 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -+ -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+/* You have to define the following before including this file: -+ -+ UWtype -- An unsigned type, default type for operations (typically a "word") -+ UHWtype -- An unsigned type, at least half the size of UWtype. -+ UDWtype -- An unsigned type, at least twice as large a UWtype -+ W_TYPE_SIZE -- size in bits of UWtype -+ -+ UQItype -- Unsigned 8 bit type. -+ SItype, USItype -- Signed and unsigned 32 bit types. -+ DItype, UDItype -- Signed and unsigned 64 bit types. -+ -+ On a 32 bit machine UWtype should typically be USItype; -+ on a 64 bit machine, UWtype should typically be UDItype. */ -+ -+#define __BITS4 (W_TYPE_SIZE / 4) -+#define __ll_B ((UWtype) 1 << (W_TYPE_SIZE / 2)) -+#define __ll_lowpart(t) ((UWtype) (t) & (__ll_B - 1)) -+#define __ll_highpart(t) ((UWtype) (t) >> (W_TYPE_SIZE / 2)) -+ -+#ifndef W_TYPE_SIZE -+#define W_TYPE_SIZE 32 -+#define UWtype USItype -+#define UHWtype USItype -+#define UDWtype UDItype -+#endif -+ -+extern const UQItype __clz_tab[256] attribute_hidden; -+ -+/* Define auxiliary asm macros. -+ -+ 1) umul_ppmm(high_prod, low_prod, multiplier, multiplicand) multiplies two -+ UWtype integers MULTIPLIER and MULTIPLICAND, and generates a two UWtype -+ word product in HIGH_PROD and LOW_PROD. -+ -+ 2) __umulsidi3(a,b) multiplies two UWtype integers A and B, and returns a -+ UDWtype product. This is just a variant of umul_ppmm. -+ -+ 3) udiv_qrnnd(quotient, remainder, high_numerator, low_numerator, -+ denominator) divides a UDWtype, composed by the UWtype integers -+ HIGH_NUMERATOR and LOW_NUMERATOR, by DENOMINATOR and places the quotient -+ in QUOTIENT and the remainder in REMAINDER. HIGH_NUMERATOR must be less -+ than DENOMINATOR for correct operation. If, in addition, the most -+ significant bit of DENOMINATOR must be 1, then the pre-processor symbol -+ UDIV_NEEDS_NORMALIZATION is defined to 1. -+ -+ 4) sdiv_qrnnd(quotient, remainder, high_numerator, low_numerator, -+ denominator). Like udiv_qrnnd but the numbers are signed. The quotient -+ is rounded towards 0. -+ -+ 5) count_leading_zeros(count, x) counts the number of zero-bits from the -+ msb to the first nonzero bit in the UWtype X. This is the number of -+ steps X needs to be shifted left to set the msb. Undefined for X == 0, -+ unless the symbol COUNT_LEADING_ZEROS_0 is defined to some value. -+ -+ 6) count_trailing_zeros(count, x) like count_leading_zeros, but counts -+ from the least significant end. -+ -+ 7) add_ssaaaa(high_sum, low_sum, high_addend_1, low_addend_1, -+ high_addend_2, low_addend_2) adds two UWtype integers, composed by -+ HIGH_ADDEND_1 and LOW_ADDEND_1, and HIGH_ADDEND_2 and LOW_ADDEND_2 -+ respectively. The result is placed in HIGH_SUM and LOW_SUM. Overflow -+ (i.e. carry out) is not stored anywhere, and is lost. -+ -+ 8) sub_ddmmss(high_difference, low_difference, high_minuend, low_minuend, -+ high_subtrahend, low_subtrahend) subtracts two two-word UWtype integers, -+ composed by HIGH_MINUEND_1 and LOW_MINUEND_1, and HIGH_SUBTRAHEND_2 and -+ LOW_SUBTRAHEND_2 respectively. The result is placed in HIGH_DIFFERENCE -+ and LOW_DIFFERENCE. Overflow (i.e. carry out) is not stored anywhere, -+ and is lost. -+ -+ If any of these macros are left undefined for a particular CPU, -+ C macros are used. */ -+ -+/* The CPUs come in alphabetical order below. -+ -+ Please add support for more CPUs here, or improve the current support -+ for the CPUs below! -+ (E.g. WE32100, IBM360.) */ -+ -+#if defined (__GNUC__) && !defined (NO_ASM) -+ -+/* We sometimes need to clobber "cc" with gcc2, but that would not be -+ understood by gcc1. Use cpp to avoid major code duplication. */ -+#if __GNUC__ < 2 -+#define __CLOBBER_CC -+#define __AND_CLOBBER_CC -+#else /* __GNUC__ >= 2 */ -+#define __CLOBBER_CC : "cc" -+#define __AND_CLOBBER_CC , "cc" -+#endif /* __GNUC__ < 2 */ -+ -+#if defined (__alpha) && W_TYPE_SIZE == 64 -+#define umul_ppmm(ph, pl, m0, m1) \ -+ do { \ -+ UDItype __m0 = (m0), __m1 = (m1); \ -+ (ph) = __builtin_alpha_umulh (__m0, __m1); \ -+ (pl) = __m0 * __m1; \ -+ } while (0) -+#define UMUL_TIME 46 -+#ifndef LONGLONG_STANDALONE -+#define udiv_qrnnd(q, r, n1, n0, d) \ -+ do { UDItype __r; \ -+ (q) = __udiv_qrnnd (&__r, (n1), (n0), (d)); \ -+ (r) = __r; \ -+ } while (0) -+extern UDItype __udiv_qrnnd (UDItype *, UDItype, UDItype, UDItype); -+#define UDIV_TIME 220 -+#endif /* LONGLONG_STANDALONE */ -+#ifdef __alpha_cix__ -+#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clzl (X)) -+#define count_trailing_zeros(COUNT,X) ((COUNT) = __builtin_ctzl (X)) -+#define COUNT_LEADING_ZEROS_0 64 -+#else -+#define count_leading_zeros(COUNT,X) \ -+ do { \ -+ UDItype __xr = (X), __t, __a; \ -+ __t = __builtin_alpha_cmpbge (0, __xr); \ -+ __a = __clz_tab[__t ^ 0xff] - 1; \ -+ __t = __builtin_alpha_extbl (__xr, __a); \ -+ (COUNT) = 64 - (__clz_tab[__t] + __a*8); \ -+ } while (0) -+#define count_trailing_zeros(COUNT,X) \ -+ do { \ -+ UDItype __xr = (X), __t, __a; \ -+ __t = __builtin_alpha_cmpbge (0, __xr); \ -+ __t = ~__t & -~__t; \ -+ __a = ((__t & 0xCC) != 0) * 2; \ -+ __a += ((__t & 0xF0) != 0) * 4; \ -+ __a += ((__t & 0xAA) != 0); \ -+ __t = __builtin_alpha_extbl (__xr, __a); \ -+ __a <<= 3; \ -+ __t &= -__t; \ -+ __a += ((__t & 0xCC) != 0) * 2; \ -+ __a += ((__t & 0xF0) != 0) * 4; \ -+ __a += ((__t & 0xAA) != 0); \ -+ (COUNT) = __a; \ -+ } while (0) -+#endif /* __alpha_cix__ */ -+#endif /* __alpha */ -+ -+#if defined (__arc__) && W_TYPE_SIZE == 32 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("add.f %1, %4, %5\n\tadc %0, %2, %3" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "%r" ((USItype) (ah)), \ -+ "rIJ" ((USItype) (bh)), \ -+ "%r" ((USItype) (al)), \ -+ "rIJ" ((USItype) (bl))) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("sub.f %1, %4, %5\n\tsbc %0, %2, %3" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "r" ((USItype) (ah)), \ -+ "rIJ" ((USItype) (bh)), \ -+ "r" ((USItype) (al)), \ -+ "rIJ" ((USItype) (bl))) -+/* Call libgcc routine. */ -+#define umul_ppmm(w1, w0, u, v) \ -+do { \ -+ DWunion __w; \ -+ __w.ll = __umulsidi3 (u, v); \ -+ w1 = __w.s.high; \ -+ w0 = __w.s.low; \ -+} while (0) -+#define __umulsidi3 __umulsidi3 -+UDItype __umulsidi3 (USItype, USItype); -+#endif -+ -+#if defined (__arm__) && !defined (__thumb__) && W_TYPE_SIZE == 32 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("adds %1, %4, %5\n\tadc %0, %2, %3" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "%r" ((USItype) (ah)), \ -+ "rI" ((USItype) (bh)), \ -+ "%r" ((USItype) (al)), \ -+ "rI" ((USItype) (bl)) __CLOBBER_CC) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("subs %1, %4, %5\n\tsbc %0, %2, %3" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "r" ((USItype) (ah)), \ -+ "rI" ((USItype) (bh)), \ -+ "r" ((USItype) (al)), \ -+ "rI" ((USItype) (bl)) __CLOBBER_CC) -+#define umul_ppmm(xh, xl, a, b) \ -+{register USItype __t0, __t1, __t2; \ -+ __asm__ ("%@ Inlined umul_ppmm\n" \ -+ " mov %2, %5, lsr #16\n" \ -+ " mov %0, %6, lsr #16\n" \ -+ " bic %3, %5, %2, lsl #16\n" \ -+ " bic %4, %6, %0, lsl #16\n" \ -+ " mul %1, %3, %4\n" \ -+ " mul %4, %2, %4\n" \ -+ " mul %3, %0, %3\n" \ -+ " mul %0, %2, %0\n" \ -+ " adds %3, %4, %3\n" \ -+ " addcs %0, %0, #65536\n" \ -+ " adds %1, %1, %3, lsl #16\n" \ -+ " adc %0, %0, %3, lsr #16" \ -+ : "=&r" ((USItype) (xh)), \ -+ "=r" ((USItype) (xl)), \ -+ "=&r" (__t0), "=&r" (__t1), "=r" (__t2) \ -+ : "r" ((USItype) (a)), \ -+ "r" ((USItype) (b)) __CLOBBER_CC );} -+#define UMUL_TIME 20 -+#define UDIV_TIME 100 -+#endif /* __arm__ */ -+ -+#if defined(__arm__) -+/* Let gcc decide how best to implement count_leading_zeros. */ -+#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X)) -+#define COUNT_LEADING_ZEROS_0 32 -+#endif -+ -+#if defined (__CRIS__) && __CRIS_arch_version >= 3 -+#define count_leading_zeros(COUNT, X) ((COUNT) = __builtin_clz (X)) -+#if __CRIS_arch_version >= 8 -+#define count_trailing_zeros(COUNT, X) ((COUNT) = __builtin_ctz (X)) -+#endif -+#endif /* __CRIS__ */ -+ -+#if defined (__hppa) && W_TYPE_SIZE == 32 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("add %4,%5,%1\n\taddc %2,%3,%0" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "%rM" ((USItype) (ah)), \ -+ "rM" ((USItype) (bh)), \ -+ "%rM" ((USItype) (al)), \ -+ "rM" ((USItype) (bl))) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("sub %4,%5,%1\n\tsubb %2,%3,%0" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "rM" ((USItype) (ah)), \ -+ "rM" ((USItype) (bh)), \ -+ "rM" ((USItype) (al)), \ -+ "rM" ((USItype) (bl))) -+#if defined (_PA_RISC1_1) -+#define umul_ppmm(w1, w0, u, v) \ -+ do { \ -+ union \ -+ { \ -+ UDItype __f; \ -+ struct {USItype __w1, __w0;} __w1w0; \ -+ } __t; \ -+ __asm__ ("xmpyu %1,%2,%0" \ -+ : "=x" (__t.__f) \ -+ : "x" ((USItype) (u)), \ -+ "x" ((USItype) (v))); \ -+ (w1) = __t.__w1w0.__w1; \ -+ (w0) = __t.__w1w0.__w0; \ -+ } while (0) -+#define UMUL_TIME 8 -+#else -+#define UMUL_TIME 30 -+#endif -+#define UDIV_TIME 40 -+#define count_leading_zeros(count, x) \ -+ do { \ -+ USItype __tmp; \ -+ __asm__ ( \ -+ "ldi 1,%0\n" \ -+" extru,= %1,15,16,%%r0 ; Bits 31..16 zero?\n" \ -+" extru,tr %1,15,16,%1 ; No. Shift down, skip add.\n"\ -+" ldo 16(%0),%0 ; Yes. Perform add.\n" \ -+" extru,= %1,23,8,%%r0 ; Bits 15..8 zero?\n" \ -+" extru,tr %1,23,8,%1 ; No. Shift down, skip add.\n"\ -+" ldo 8(%0),%0 ; Yes. Perform add.\n" \ -+" extru,= %1,27,4,%%r0 ; Bits 7..4 zero?\n" \ -+" extru,tr %1,27,4,%1 ; No. Shift down, skip add.\n"\ -+" ldo 4(%0),%0 ; Yes. Perform add.\n" \ -+" extru,= %1,29,2,%%r0 ; Bits 3..2 zero?\n" \ -+" extru,tr %1,29,2,%1 ; No. Shift down, skip add.\n"\ -+" ldo 2(%0),%0 ; Yes. Perform add.\n" \ -+" extru %1,30,1,%1 ; Extract bit 1.\n" \ -+" sub %0,%1,%0 ; Subtract it.\n" \ -+ : "=r" (count), "=r" (__tmp) : "1" (x)); \ -+ } while (0) -+#endif -+ -+#if (defined (__i370__) || defined (__s390__) || defined (__mvs__)) && W_TYPE_SIZE == 32 -+#define smul_ppmm(xh, xl, m0, m1) \ -+ do { \ -+ union {DItype __ll; \ -+ struct {USItype __h, __l;} __i; \ -+ } __x; \ -+ __asm__ ("lr %N0,%1\n\tmr %0,%2" \ -+ : "=&r" (__x.__ll) \ -+ : "r" (m0), "r" (m1)); \ -+ (xh) = __x.__i.__h; (xl) = __x.__i.__l; \ -+ } while (0) -+#define sdiv_qrnnd(q, r, n1, n0, d) \ -+ do { \ -+ union {DItype __ll; \ -+ struct {USItype __h, __l;} __i; \ -+ } __x; \ -+ __x.__i.__h = n1; __x.__i.__l = n0; \ -+ __asm__ ("dr %0,%2" \ -+ : "=r" (__x.__ll) \ -+ : "0" (__x.__ll), "r" (d)); \ -+ (q) = __x.__i.__l; (r) = __x.__i.__h; \ -+ } while (0) -+#endif -+ -+#if (defined (__i386__) || defined (__i486__)) && W_TYPE_SIZE == 32 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("add{l} {%5,%1|%1,%5}\n\tadc{l} {%3,%0|%0,%3}" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "%0" ((USItype) (ah)), \ -+ "g" ((USItype) (bh)), \ -+ "%1" ((USItype) (al)), \ -+ "g" ((USItype) (bl))) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("sub{l} {%5,%1|%1,%5}\n\tsbb{l} {%3,%0|%0,%3}" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "0" ((USItype) (ah)), \ -+ "g" ((USItype) (bh)), \ -+ "1" ((USItype) (al)), \ -+ "g" ((USItype) (bl))) -+#define umul_ppmm(w1, w0, u, v) \ -+ __asm__ ("mul{l} %3" \ -+ : "=a" ((USItype) (w0)), \ -+ "=d" ((USItype) (w1)) \ -+ : "%0" ((USItype) (u)), \ -+ "rm" ((USItype) (v))) -+#define udiv_qrnnd(q, r, n1, n0, dv) \ -+ __asm__ ("div{l} %4" \ -+ : "=a" ((USItype) (q)), \ -+ "=d" ((USItype) (r)) \ -+ : "0" ((USItype) (n0)), \ -+ "1" ((USItype) (n1)), \ -+ "rm" ((USItype) (dv))) -+#define count_leading_zeros(count, x) ((count) = __builtin_clz (x)) -+#define count_trailing_zeros(count, x) ((count) = __builtin_ctz (x)) -+#define UMUL_TIME 40 -+#define UDIV_TIME 40 -+#endif /* 80x86 */ -+ -+#if (defined (__x86_64__) || defined (__i386__)) && W_TYPE_SIZE == 64 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("add{q} {%5,%1|%1,%5}\n\tadc{q} {%3,%0|%0,%3}" \ -+ : "=r" ((UDItype) (sh)), \ -+ "=&r" ((UDItype) (sl)) \ -+ : "%0" ((UDItype) (ah)), \ -+ "rme" ((UDItype) (bh)), \ -+ "%1" ((UDItype) (al)), \ -+ "rme" ((UDItype) (bl))) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("sub{q} {%5,%1|%1,%5}\n\tsbb{q} {%3,%0|%0,%3}" \ -+ : "=r" ((UDItype) (sh)), \ -+ "=&r" ((UDItype) (sl)) \ -+ : "0" ((UDItype) (ah)), \ -+ "rme" ((UDItype) (bh)), \ -+ "1" ((UDItype) (al)), \ -+ "rme" ((UDItype) (bl))) -+#define umul_ppmm(w1, w0, u, v) \ -+ __asm__ ("mul{q} %3" \ -+ : "=a" ((UDItype) (w0)), \ -+ "=d" ((UDItype) (w1)) \ -+ : "%0" ((UDItype) (u)), \ -+ "rm" ((UDItype) (v))) -+#define udiv_qrnnd(q, r, n1, n0, dv) \ -+ __asm__ ("div{q} %4" \ -+ : "=a" ((UDItype) (q)), \ -+ "=d" ((UDItype) (r)) \ -+ : "0" ((UDItype) (n0)), \ -+ "1" ((UDItype) (n1)), \ -+ "rm" ((UDItype) (dv))) -+#define count_leading_zeros(count, x) ((count) = __builtin_clzl (x)) -+#define count_trailing_zeros(count, x) ((count) = __builtin_ctzl (x)) -+#define UMUL_TIME 40 -+#define UDIV_TIME 40 -+#endif /* x86_64 */ -+ -+#if defined (__i960__) && W_TYPE_SIZE == 32 -+#define umul_ppmm(w1, w0, u, v) \ -+ ({union {UDItype __ll; \ -+ struct {USItype __l, __h;} __i; \ -+ } __xx; \ -+ __asm__ ("emul %2,%1,%0" \ -+ : "=d" (__xx.__ll) \ -+ : "%dI" ((USItype) (u)), \ -+ "dI" ((USItype) (v))); \ -+ (w1) = __xx.__i.__h; (w0) = __xx.__i.__l;}) -+#define __umulsidi3(u, v) \ -+ ({UDItype __w; \ -+ __asm__ ("emul %2,%1,%0" \ -+ : "=d" (__w) \ -+ : "%dI" ((USItype) (u)), \ -+ "dI" ((USItype) (v))); \ -+ __w; }) -+#endif /* __i960__ */ -+ -+#if defined (__M32R__) && W_TYPE_SIZE == 32 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ /* The cmp clears the condition bit. */ \ -+ __asm__ ("cmp %0,%0\n\taddx %1,%5\n\taddx %0,%3" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "0" ((USItype) (ah)), \ -+ "r" ((USItype) (bh)), \ -+ "1" ((USItype) (al)), \ -+ "r" ((USItype) (bl)) \ -+ : "cbit") -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ /* The cmp clears the condition bit. */ \ -+ __asm__ ("cmp %0,%0\n\tsubx %1,%5\n\tsubx %0,%3" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "0" ((USItype) (ah)), \ -+ "r" ((USItype) (bh)), \ -+ "1" ((USItype) (al)), \ -+ "r" ((USItype) (bl)) \ -+ : "cbit") -+#endif /* __M32R__ */ -+ -+#if defined (__mc68000__) && W_TYPE_SIZE == 32 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("add%.l %5,%1\n\taddx%.l %3,%0" \ -+ : "=d" ((USItype) (sh)), \ -+ "=&d" ((USItype) (sl)) \ -+ : "%0" ((USItype) (ah)), \ -+ "d" ((USItype) (bh)), \ -+ "%1" ((USItype) (al)), \ -+ "g" ((USItype) (bl))) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("sub%.l %5,%1\n\tsubx%.l %3,%0" \ -+ : "=d" ((USItype) (sh)), \ -+ "=&d" ((USItype) (sl)) \ -+ : "0" ((USItype) (ah)), \ -+ "d" ((USItype) (bh)), \ -+ "1" ((USItype) (al)), \ -+ "g" ((USItype) (bl))) -+ -+/* The '020, '030, '040, '060 and CPU32 have 32x32->64 and 64/32->32q-32r. */ -+#if (defined (__mc68020__) && !defined (__mc68060__)) -+#define umul_ppmm(w1, w0, u, v) \ -+ __asm__ ("mulu%.l %3,%1:%0" \ -+ : "=d" ((USItype) (w0)), \ -+ "=d" ((USItype) (w1)) \ -+ : "%0" ((USItype) (u)), \ -+ "dmi" ((USItype) (v))) -+#define UMUL_TIME 45 -+#define udiv_qrnnd(q, r, n1, n0, d) \ -+ __asm__ ("divu%.l %4,%1:%0" \ -+ : "=d" ((USItype) (q)), \ -+ "=d" ((USItype) (r)) \ -+ : "0" ((USItype) (n0)), \ -+ "1" ((USItype) (n1)), \ -+ "dmi" ((USItype) (d))) -+#define UDIV_TIME 90 -+#define sdiv_qrnnd(q, r, n1, n0, d) \ -+ __asm__ ("divs%.l %4,%1:%0" \ -+ : "=d" ((USItype) (q)), \ -+ "=d" ((USItype) (r)) \ -+ : "0" ((USItype) (n0)), \ -+ "1" ((USItype) (n1)), \ -+ "dmi" ((USItype) (d))) -+ -+#elif defined (__mcoldfire__) /* not mc68020 */ -+ -+#define umul_ppmm(xh, xl, a, b) \ -+ __asm__ ("| Inlined umul_ppmm\n" \ -+ " move%.l %2,%/d0\n" \ -+ " move%.l %3,%/d1\n" \ -+ " move%.l %/d0,%/d2\n" \ -+ " swap %/d0\n" \ -+ " move%.l %/d1,%/d3\n" \ -+ " swap %/d1\n" \ -+ " move%.w %/d2,%/d4\n" \ -+ " mulu %/d3,%/d4\n" \ -+ " mulu %/d1,%/d2\n" \ -+ " mulu %/d0,%/d3\n" \ -+ " mulu %/d0,%/d1\n" \ -+ " move%.l %/d4,%/d0\n" \ -+ " clr%.w %/d0\n" \ -+ " swap %/d0\n" \ -+ " add%.l %/d0,%/d2\n" \ -+ " add%.l %/d3,%/d2\n" \ -+ " jcc 1f\n" \ -+ " add%.l %#65536,%/d1\n" \ -+ "1: swap %/d2\n" \ -+ " moveq %#0,%/d0\n" \ -+ " move%.w %/d2,%/d0\n" \ -+ " move%.w %/d4,%/d2\n" \ -+ " move%.l %/d2,%1\n" \ -+ " add%.l %/d1,%/d0\n" \ -+ " move%.l %/d0,%0" \ -+ : "=g" ((USItype) (xh)), \ -+ "=g" ((USItype) (xl)) \ -+ : "g" ((USItype) (a)), \ -+ "g" ((USItype) (b)) \ -+ : "d0", "d1", "d2", "d3", "d4") -+#define UMUL_TIME 100 -+#define UDIV_TIME 400 -+#else /* not ColdFire */ -+/* %/ inserts REGISTER_PREFIX, %# inserts IMMEDIATE_PREFIX. */ -+#define umul_ppmm(xh, xl, a, b) \ -+ __asm__ ("| Inlined umul_ppmm\n" \ -+ " move%.l %2,%/d0\n" \ -+ " move%.l %3,%/d1\n" \ -+ " move%.l %/d0,%/d2\n" \ -+ " swap %/d0\n" \ -+ " move%.l %/d1,%/d3\n" \ -+ " swap %/d1\n" \ -+ " move%.w %/d2,%/d4\n" \ -+ " mulu %/d3,%/d4\n" \ -+ " mulu %/d1,%/d2\n" \ -+ " mulu %/d0,%/d3\n" \ -+ " mulu %/d0,%/d1\n" \ -+ " move%.l %/d4,%/d0\n" \ -+ " eor%.w %/d0,%/d0\n" \ -+ " swap %/d0\n" \ -+ " add%.l %/d0,%/d2\n" \ -+ " add%.l %/d3,%/d2\n" \ -+ " jcc 1f\n" \ -+ " add%.l %#65536,%/d1\n" \ -+ "1: swap %/d2\n" \ -+ " moveq %#0,%/d0\n" \ -+ " move%.w %/d2,%/d0\n" \ -+ " move%.w %/d4,%/d2\n" \ -+ " move%.l %/d2,%1\n" \ -+ " add%.l %/d1,%/d0\n" \ -+ " move%.l %/d0,%0" \ -+ : "=g" ((USItype) (xh)), \ -+ "=g" ((USItype) (xl)) \ -+ : "g" ((USItype) (a)), \ -+ "g" ((USItype) (b)) \ -+ : "d0", "d1", "d2", "d3", "d4") -+#define UMUL_TIME 100 -+#define UDIV_TIME 400 -+ -+#endif /* not mc68020 */ -+ -+/* The '020, '030, '040 and '060 have bitfield insns. -+ cpu32 disguises as a 68020, but lacks them. */ -+#if defined (__mc68020__) && !defined (__mcpu32__) -+#define count_leading_zeros(count, x) \ -+ __asm__ ("bfffo %1{%b2:%b2},%0" \ -+ : "=d" ((USItype) (count)) \ -+ : "od" ((USItype) (x)), "n" (0)) -+/* Some ColdFire architectures have a ff1 instruction supported via -+ __builtin_clz. */ -+#elif defined (__mcfisaaplus__) || defined (__mcfisac__) -+#define count_leading_zeros(count,x) ((count) = __builtin_clz (x)) -+#define COUNT_LEADING_ZEROS_0 32 -+#endif -+#endif /* mc68000 */ -+ -+#if defined (__m88000__) && W_TYPE_SIZE == 32 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("addu.co %1,%r4,%r5\n\taddu.ci %0,%r2,%r3" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "%rJ" ((USItype) (ah)), \ -+ "rJ" ((USItype) (bh)), \ -+ "%rJ" ((USItype) (al)), \ -+ "rJ" ((USItype) (bl))) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("subu.co %1,%r4,%r5\n\tsubu.ci %0,%r2,%r3" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "rJ" ((USItype) (ah)), \ -+ "rJ" ((USItype) (bh)), \ -+ "rJ" ((USItype) (al)), \ -+ "rJ" ((USItype) (bl))) -+#define count_leading_zeros(count, x) \ -+ do { \ -+ USItype __cbtmp; \ -+ __asm__ ("ff1 %0,%1" \ -+ : "=r" (__cbtmp) \ -+ : "r" ((USItype) (x))); \ -+ (count) = __cbtmp ^ 31; \ -+ } while (0) -+#define COUNT_LEADING_ZEROS_0 63 /* sic */ -+#if defined (__mc88110__) -+#define umul_ppmm(wh, wl, u, v) \ -+ do { \ -+ union {UDItype __ll; \ -+ struct {USItype __h, __l;} __i; \ -+ } __xx; \ -+ __asm__ ("mulu.d %0,%1,%2" \ -+ : "=r" (__xx.__ll) \ -+ : "r" ((USItype) (u)), \ -+ "r" ((USItype) (v))); \ -+ (wh) = __xx.__i.__h; \ -+ (wl) = __xx.__i.__l; \ -+ } while (0) -+#define udiv_qrnnd(q, r, n1, n0, d) \ -+ ({union {UDItype __ll; \ -+ struct {USItype __h, __l;} __i; \ -+ } __xx; \ -+ USItype __q; \ -+ __xx.__i.__h = (n1); __xx.__i.__l = (n0); \ -+ __asm__ ("divu.d %0,%1,%2" \ -+ : "=r" (__q) \ -+ : "r" (__xx.__ll), \ -+ "r" ((USItype) (d))); \ -+ (r) = (n0) - __q * (d); (q) = __q; }) -+#define UMUL_TIME 5 -+#define UDIV_TIME 25 -+#else -+#define UMUL_TIME 17 -+#define UDIV_TIME 150 -+#endif /* __mc88110__ */ -+#endif /* __m88000__ */ -+ -+#if defined (__mips__) && W_TYPE_SIZE == 32 -+#define umul_ppmm(w1, w0, u, v) \ -+ do { \ -+ UDItype __x = (UDItype) (USItype) (u) * (USItype) (v); \ -+ (w1) = (USItype) (__x >> 32); \ -+ (w0) = (USItype) (__x); \ -+ } while (0) -+#define UMUL_TIME 10 -+#define UDIV_TIME 100 -+ -+#if (__mips == 32 || __mips == 64) && ! __mips16 -+#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X)) -+#define COUNT_LEADING_ZEROS_0 32 -+#endif -+#endif /* __mips__ */ -+ -+#if defined (__ns32000__) && W_TYPE_SIZE == 32 -+#define umul_ppmm(w1, w0, u, v) \ -+ ({union {UDItype __ll; \ -+ struct {USItype __l, __h;} __i; \ -+ } __xx; \ -+ __asm__ ("meid %2,%0" \ -+ : "=g" (__xx.__ll) \ -+ : "%0" ((USItype) (u)), \ -+ "g" ((USItype) (v))); \ -+ (w1) = __xx.__i.__h; (w0) = __xx.__i.__l;}) -+#define __umulsidi3(u, v) \ -+ ({UDItype __w; \ -+ __asm__ ("meid %2,%0" \ -+ : "=g" (__w) \ -+ : "%0" ((USItype) (u)), \ -+ "g" ((USItype) (v))); \ -+ __w; }) -+#define udiv_qrnnd(q, r, n1, n0, d) \ -+ ({union {UDItype __ll; \ -+ struct {USItype __l, __h;} __i; \ -+ } __xx; \ -+ __xx.__i.__h = (n1); __xx.__i.__l = (n0); \ -+ __asm__ ("deid %2,%0" \ -+ : "=g" (__xx.__ll) \ -+ : "0" (__xx.__ll), \ -+ "g" ((USItype) (d))); \ -+ (r) = __xx.__i.__l; (q) = __xx.__i.__h; }) -+#define count_trailing_zeros(count,x) \ -+ do { \ -+ __asm__ ("ffsd %2,%0" \ -+ : "=r" ((USItype) (count)) \ -+ : "0" ((USItype) 0), \ -+ "r" ((USItype) (x))); \ -+ } while (0) -+#endif /* __ns32000__ */ -+ -+/* FIXME: We should test _IBMR2 here when we add assembly support for the -+ system vendor compilers. -+ FIXME: What's needed for gcc PowerPC VxWorks? __vxworks__ is not good -+ enough, since that hits ARM and m68k too. */ -+#if (defined (_ARCH_PPC) /* AIX */ \ -+ || defined (_ARCH_PWR) /* AIX */ \ -+ || defined (_ARCH_COM) /* AIX */ \ -+ || defined (__powerpc__) /* gcc */ \ -+ || defined (__POWERPC__) /* BEOS */ \ -+ || defined (__ppc__) /* Darwin */ \ -+ || (defined (PPC) && ! defined (CPU_FAMILY)) /* gcc 2.7.x GNU&SysV */ \ -+ || (defined (PPC) && defined (CPU_FAMILY) /* VxWorks */ \ -+ && CPU_FAMILY == PPC) \ -+ ) && W_TYPE_SIZE == 32 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ do { \ -+ if (__builtin_constant_p (bh) && (bh) == 0) \ -+ __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2" \ -+ : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\ -+ else if (__builtin_constant_p (bh) && (bh) == ~(USItype) 0) \ -+ __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2" \ -+ : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\ -+ else \ -+ __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3" \ -+ : "=r" (sh), "=&r" (sl) \ -+ : "%r" (ah), "r" (bh), "%r" (al), "rI" (bl)); \ -+ } while (0) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ do { \ -+ if (__builtin_constant_p (ah) && (ah) == 0) \ -+ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2" \ -+ : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\ -+ else if (__builtin_constant_p (ah) && (ah) == ~(USItype) 0) \ -+ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2" \ -+ : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\ -+ else if (__builtin_constant_p (bh) && (bh) == 0) \ -+ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2" \ -+ : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\ -+ else if (__builtin_constant_p (bh) && (bh) == ~(USItype) 0) \ -+ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2" \ -+ : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\ -+ else \ -+ __asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2" \ -+ : "=r" (sh), "=&r" (sl) \ -+ : "r" (ah), "r" (bh), "rI" (al), "r" (bl)); \ -+ } while (0) -+#define count_leading_zeros(count, x) \ -+ __asm__ ("{cntlz|cntlzw} %0,%1" : "=r" (count) : "r" (x)) -+#define COUNT_LEADING_ZEROS_0 32 -+#if defined (_ARCH_PPC) || defined (__powerpc__) || defined (__POWERPC__) \ -+ || defined (__ppc__) \ -+ || (defined (PPC) && ! defined (CPU_FAMILY)) /* gcc 2.7.x GNU&SysV */ \ -+ || (defined (PPC) && defined (CPU_FAMILY) /* VxWorks */ \ -+ && CPU_FAMILY == PPC) -+#define umul_ppmm(ph, pl, m0, m1) \ -+ do { \ -+ USItype __m0 = (m0), __m1 = (m1); \ -+ __asm__ ("mulhwu %0,%1,%2" : "=r" (ph) : "%r" (m0), "r" (m1)); \ -+ (pl) = __m0 * __m1; \ -+ } while (0) -+#define UMUL_TIME 15 -+#define smul_ppmm(ph, pl, m0, m1) \ -+ do { \ -+ SItype __m0 = (m0), __m1 = (m1); \ -+ __asm__ ("mulhw %0,%1,%2" : "=r" (ph) : "%r" (m0), "r" (m1)); \ -+ (pl) = __m0 * __m1; \ -+ } while (0) -+#define SMUL_TIME 14 -+#define UDIV_TIME 120 -+#elif defined (_ARCH_PWR) -+#define UMUL_TIME 8 -+#define smul_ppmm(xh, xl, m0, m1) \ -+ __asm__ ("mul %0,%2,%3" : "=r" (xh), "=q" (xl) : "r" (m0), "r" (m1)) -+#define SMUL_TIME 4 -+#define sdiv_qrnnd(q, r, nh, nl, d) \ -+ __asm__ ("div %0,%2,%4" : "=r" (q), "=q" (r) : "r" (nh), "1" (nl), "r" (d)) -+#define UDIV_TIME 100 -+#endif -+#endif /* 32-bit POWER architecture variants. */ -+ -+/* We should test _IBMR2 here when we add assembly support for the system -+ vendor compilers. */ -+#if (defined (_ARCH_PPC64) || defined (__powerpc64__)) && W_TYPE_SIZE == 64 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ do { \ -+ if (__builtin_constant_p (bh) && (bh) == 0) \ -+ __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2" \ -+ : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\ -+ else if (__builtin_constant_p (bh) && (bh) == ~(UDItype) 0) \ -+ __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2" \ -+ : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\ -+ else \ -+ __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3" \ -+ : "=r" (sh), "=&r" (sl) \ -+ : "%r" (ah), "r" (bh), "%r" (al), "rI" (bl)); \ -+ } while (0) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ do { \ -+ if (__builtin_constant_p (ah) && (ah) == 0) \ -+ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2" \ -+ : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\ -+ else if (__builtin_constant_p (ah) && (ah) == ~(UDItype) 0) \ -+ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2" \ -+ : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\ -+ else if (__builtin_constant_p (bh) && (bh) == 0) \ -+ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2" \ -+ : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\ -+ else if (__builtin_constant_p (bh) && (bh) == ~(UDItype) 0) \ -+ __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2" \ -+ : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\ -+ else \ -+ __asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2" \ -+ : "=r" (sh), "=&r" (sl) \ -+ : "r" (ah), "r" (bh), "rI" (al), "r" (bl)); \ -+ } while (0) -+#define count_leading_zeros(count, x) \ -+ __asm__ ("cntlzd %0,%1" : "=r" (count) : "r" (x)) -+#define COUNT_LEADING_ZEROS_0 64 -+#define umul_ppmm(ph, pl, m0, m1) \ -+ do { \ -+ UDItype __m0 = (m0), __m1 = (m1); \ -+ __asm__ ("mulhdu %0,%1,%2" : "=r" (ph) : "%r" (m0), "r" (m1)); \ -+ (pl) = __m0 * __m1; \ -+ } while (0) -+#define UMUL_TIME 15 -+#define smul_ppmm(ph, pl, m0, m1) \ -+ do { \ -+ DItype __m0 = (m0), __m1 = (m1); \ -+ __asm__ ("mulhd %0,%1,%2" : "=r" (ph) : "%r" (m0), "r" (m1)); \ -+ (pl) = __m0 * __m1; \ -+ } while (0) -+#define SMUL_TIME 14 /* ??? */ -+#define UDIV_TIME 120 /* ??? */ -+#endif /* 64-bit PowerPC. */ -+ -+#if defined (__ibm032__) /* RT/ROMP */ && W_TYPE_SIZE == 32 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("a %1,%5\n\tae %0,%3" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "%0" ((USItype) (ah)), \ -+ "r" ((USItype) (bh)), \ -+ "%1" ((USItype) (al)), \ -+ "r" ((USItype) (bl))) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("s %1,%5\n\tse %0,%3" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "0" ((USItype) (ah)), \ -+ "r" ((USItype) (bh)), \ -+ "1" ((USItype) (al)), \ -+ "r" ((USItype) (bl))) -+#define umul_ppmm(ph, pl, m0, m1) \ -+ do { \ -+ USItype __m0 = (m0), __m1 = (m1); \ -+ __asm__ ( \ -+ "s r2,r2\n" \ -+" mts r10,%2\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" m r2,%3\n" \ -+" cas %0,r2,r0\n" \ -+" mfs r10,%1" \ -+ : "=r" ((USItype) (ph)), \ -+ "=r" ((USItype) (pl)) \ -+ : "%r" (__m0), \ -+ "r" (__m1) \ -+ : "r2"); \ -+ (ph) += ((((SItype) __m0 >> 31) & __m1) \ -+ + (((SItype) __m1 >> 31) & __m0)); \ -+ } while (0) -+#define UMUL_TIME 20 -+#define UDIV_TIME 200 -+#define count_leading_zeros(count, x) \ -+ do { \ -+ if ((x) >= 0x10000) \ -+ __asm__ ("clz %0,%1" \ -+ : "=r" ((USItype) (count)) \ -+ : "r" ((USItype) (x) >> 16)); \ -+ else \ -+ { \ -+ __asm__ ("clz %0,%1" \ -+ : "=r" ((USItype) (count)) \ -+ : "r" ((USItype) (x))); \ -+ (count) += 16; \ -+ } \ -+ } while (0) -+#endif -+ -+#if defined(__sh__) && !__SHMEDIA__ && W_TYPE_SIZE == 32 -+#ifndef __sh1__ -+#define umul_ppmm(w1, w0, u, v) \ -+ __asm__ ( \ -+ "dmulu.l %2,%3\n\tsts%M1 macl,%1\n\tsts%M0 mach,%0" \ -+ : "=r<" ((USItype)(w1)), \ -+ "=r<" ((USItype)(w0)) \ -+ : "r" ((USItype)(u)), \ -+ "r" ((USItype)(v)) \ -+ : "macl", "mach") -+#define UMUL_TIME 5 -+#endif -+ -+/* This is the same algorithm as __udiv_qrnnd_c. */ -+#define UDIV_NEEDS_NORMALIZATION 1 -+ -+#define udiv_qrnnd(q, r, n1, n0, d) \ -+ do { \ -+ extern UWtype __udiv_qrnnd_16 (UWtype, UWtype) \ -+ __attribute__ ((visibility ("hidden"))); \ -+ /* r0: rn r1: qn */ /* r0: n1 r4: n0 r5: d r6: d1 */ /* r2: __m */ \ -+ __asm__ ( \ -+ "mov%M4 %4,r5\n" \ -+" swap.w %3,r4\n" \ -+" swap.w r5,r6\n" \ -+" jsr @%5\n" \ -+" shll16 r6\n" \ -+" swap.w r4,r4\n" \ -+" jsr @%5\n" \ -+" swap.w r1,%0\n" \ -+" or r1,%0" \ -+ : "=r" (q), "=&z" (r) \ -+ : "1" (n1), "r" (n0), "rm" (d), "r" (&__udiv_qrnnd_16) \ -+ : "r1", "r2", "r4", "r5", "r6", "pr"); \ -+ } while (0) -+ -+#define UDIV_TIME 80 -+ -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("clrt;subc %5,%1; subc %4,%0" \ -+ : "=r" (sh), "=r" (sl) \ -+ : "0" (ah), "1" (al), "r" (bh), "r" (bl)) -+ -+#endif /* __sh__ */ -+ -+#if defined (__SH5__) && __SHMEDIA__ && W_TYPE_SIZE == 32 -+#define __umulsidi3(u,v) ((UDItype)(USItype)u*(USItype)v) -+#define count_leading_zeros(count, x) \ -+ do \ -+ { \ -+ UDItype x_ = (USItype)(x); \ -+ SItype c_; \ -+ \ -+ __asm__ ("nsb %1, %0" : "=r" (c_) : "r" (x_)); \ -+ (count) = c_ - 31; \ -+ } \ -+ while (0) -+#define COUNT_LEADING_ZEROS_0 32 -+#endif -+ -+#if defined (__sparc__) && !defined (__arch64__) && !defined (__sparcv9) \ -+ && W_TYPE_SIZE == 32 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("addcc %r4,%5,%1\n\taddx %r2,%3,%0" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "%rJ" ((USItype) (ah)), \ -+ "rI" ((USItype) (bh)), \ -+ "%rJ" ((USItype) (al)), \ -+ "rI" ((USItype) (bl)) \ -+ __CLOBBER_CC) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("subcc %r4,%5,%1\n\tsubx %r2,%3,%0" \ -+ : "=r" ((USItype) (sh)), \ -+ "=&r" ((USItype) (sl)) \ -+ : "rJ" ((USItype) (ah)), \ -+ "rI" ((USItype) (bh)), \ -+ "rJ" ((USItype) (al)), \ -+ "rI" ((USItype) (bl)) \ -+ __CLOBBER_CC) -+#if defined (__sparc_v8__) -+#define umul_ppmm(w1, w0, u, v) \ -+ __asm__ ("umul %2,%3,%1;rd %%y,%0" \ -+ : "=r" ((USItype) (w1)), \ -+ "=r" ((USItype) (w0)) \ -+ : "r" ((USItype) (u)), \ -+ "r" ((USItype) (v))) -+#define udiv_qrnnd(__q, __r, __n1, __n0, __d) \ -+ __asm__ ("mov %2,%%y;nop;nop;nop;udiv %3,%4,%0;umul %0,%4,%1;sub %3,%1,%1"\ -+ : "=&r" ((USItype) (__q)), \ -+ "=&r" ((USItype) (__r)) \ -+ : "r" ((USItype) (__n1)), \ -+ "r" ((USItype) (__n0)), \ -+ "r" ((USItype) (__d))) -+#else -+#if defined (__sparclite__) -+/* This has hardware multiply but not divide. It also has two additional -+ instructions scan (ffs from high bit) and divscc. */ -+#define umul_ppmm(w1, w0, u, v) \ -+ __asm__ ("umul %2,%3,%1;rd %%y,%0" \ -+ : "=r" ((USItype) (w1)), \ -+ "=r" ((USItype) (w0)) \ -+ : "r" ((USItype) (u)), \ -+ "r" ((USItype) (v))) -+#define udiv_qrnnd(q, r, n1, n0, d) \ -+ __asm__ ("! Inlined udiv_qrnnd\n" \ -+" wr %%g0,%2,%%y ! Not a delayed write for sparclite\n" \ -+" tst %%g0\n" \ -+" divscc %3,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%%g1\n" \ -+" divscc %%g1,%4,%0\n" \ -+" rd %%y,%1\n" \ -+" bl,a 1f\n" \ -+" add %1,%4,%1\n" \ -+"1: ! End of inline udiv_qrnnd" \ -+ : "=r" ((USItype) (q)), \ -+ "=r" ((USItype) (r)) \ -+ : "r" ((USItype) (n1)), \ -+ "r" ((USItype) (n0)), \ -+ "rI" ((USItype) (d)) \ -+ : "g1" __AND_CLOBBER_CC) -+#define UDIV_TIME 37 -+#define count_leading_zeros(count, x) \ -+ do { \ -+ __asm__ ("scan %1,1,%0" \ -+ : "=r" ((USItype) (count)) \ -+ : "r" ((USItype) (x))); \ -+ } while (0) -+/* Early sparclites return 63 for an argument of 0, but they warn that future -+ implementations might change this. Therefore, leave COUNT_LEADING_ZEROS_0 -+ undefined. */ -+#else -+/* SPARC without integer multiplication and divide instructions. -+ (i.e. at least Sun4/20,40,60,65,75,110,260,280,330,360,380,470,490) */ -+#define umul_ppmm(w1, w0, u, v) \ -+ __asm__ ("! Inlined umul_ppmm\n" \ -+" wr %%g0,%2,%%y ! SPARC has 0-3 delay insn after a wr\n"\ -+" sra %3,31,%%o5 ! Don't move this insn\n" \ -+" and %2,%%o5,%%o5 ! Don't move this insn\n" \ -+" andcc %%g0,0,%%g1 ! Don't move this insn\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,%3,%%g1\n" \ -+" mulscc %%g1,0,%%g1\n" \ -+" add %%g1,%%o5,%0\n" \ -+" rd %%y,%1" \ -+ : "=r" ((USItype) (w1)), \ -+ "=r" ((USItype) (w0)) \ -+ : "%rI" ((USItype) (u)), \ -+ "r" ((USItype) (v)) \ -+ : "g1", "o5" __AND_CLOBBER_CC) -+#define UMUL_TIME 39 /* 39 instructions */ -+/* It's quite necessary to add this much assembler for the sparc. -+ The default udiv_qrnnd (in C) is more than 10 times slower! */ -+#define udiv_qrnnd(__q, __r, __n1, __n0, __d) \ -+ __asm__ ("! Inlined udiv_qrnnd\n" \ -+" mov 32,%%g1\n" \ -+" subcc %1,%2,%%g0\n" \ -+"1: bcs 5f\n" \ -+" addxcc %0,%0,%0 ! shift n1n0 and a q-bit in lsb\n" \ -+" sub %1,%2,%1 ! this kills msb of n\n" \ -+" addx %1,%1,%1 ! so this can't give carry\n" \ -+" subcc %%g1,1,%%g1\n" \ -+"2: bne 1b\n" \ -+" subcc %1,%2,%%g0\n" \ -+" bcs 3f\n" \ -+" addxcc %0,%0,%0 ! shift n1n0 and a q-bit in lsb\n" \ -+" b 3f\n" \ -+" sub %1,%2,%1 ! this kills msb of n\n" \ -+"4: sub %1,%2,%1\n" \ -+"5: addxcc %1,%1,%1\n" \ -+" bcc 2b\n" \ -+" subcc %%g1,1,%%g1\n" \ -+"! Got carry from n. Subtract next step to cancel this carry.\n" \ -+" bne 4b\n" \ -+" addcc %0,%0,%0 ! shift n1n0 and a 0-bit in lsb\n" \ -+" sub %1,%2,%1\n" \ -+"3: xnor %0,0,%0\n" \ -+" ! End of inline udiv_qrnnd" \ -+ : "=&r" ((USItype) (__q)), \ -+ "=&r" ((USItype) (__r)) \ -+ : "r" ((USItype) (__d)), \ -+ "1" ((USItype) (__n1)), \ -+ "0" ((USItype) (__n0)) : "g1" __AND_CLOBBER_CC) -+#define UDIV_TIME (3+7*32) /* 7 instructions/iteration. 32 iterations. */ -+#endif /* __sparclite__ */ -+#endif /* __sparc_v8__ */ -+#endif /* sparc32 */ -+ -+#if ((defined (__sparc__) && defined (__arch64__)) || defined (__sparcv9)) \ -+ && W_TYPE_SIZE == 64 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("addcc %r4,%5,%1\n\t" \ -+ "add %r2,%3,%0\n\t" \ -+ "bcs,a,pn %%xcc, 1f\n\t" \ -+ "add %0, 1, %0\n" \ -+ "1:" \ -+ : "=r" ((UDItype)(sh)), \ -+ "=&r" ((UDItype)(sl)) \ -+ : "%rJ" ((UDItype)(ah)), \ -+ "rI" ((UDItype)(bh)), \ -+ "%rJ" ((UDItype)(al)), \ -+ "rI" ((UDItype)(bl)) \ -+ __CLOBBER_CC) -+ -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("subcc %r4,%5,%1\n\t" \ -+ "sub %r2,%3,%0\n\t" \ -+ "bcs,a,pn %%xcc, 1f\n\t" \ -+ "sub %0, 1, %0\n\t" \ -+ "1:" \ -+ : "=r" ((UDItype)(sh)), \ -+ "=&r" ((UDItype)(sl)) \ -+ : "rJ" ((UDItype)(ah)), \ -+ "rI" ((UDItype)(bh)), \ -+ "rJ" ((UDItype)(al)), \ -+ "rI" ((UDItype)(bl)) \ -+ __CLOBBER_CC) -+ -+#define umul_ppmm(wh, wl, u, v) \ -+ do { \ -+ UDItype tmp1, tmp2, tmp3, tmp4; \ -+ __asm__ __volatile__ ( \ -+ "srl %7,0,%3\n\t" \ -+ "mulx %3,%6,%1\n\t" \ -+ "srlx %6,32,%2\n\t" \ -+ "mulx %2,%3,%4\n\t" \ -+ "sllx %4,32,%5\n\t" \ -+ "srl %6,0,%3\n\t" \ -+ "sub %1,%5,%5\n\t" \ -+ "srlx %5,32,%5\n\t" \ -+ "addcc %4,%5,%4\n\t" \ -+ "srlx %7,32,%5\n\t" \ -+ "mulx %3,%5,%3\n\t" \ -+ "mulx %2,%5,%5\n\t" \ -+ "sethi %%hi(0x80000000),%2\n\t" \ -+ "addcc %4,%3,%4\n\t" \ -+ "srlx %4,32,%4\n\t" \ -+ "add %2,%2,%2\n\t" \ -+ "movcc %%xcc,%%g0,%2\n\t" \ -+ "addcc %5,%4,%5\n\t" \ -+ "sllx %3,32,%3\n\t" \ -+ "add %1,%3,%1\n\t" \ -+ "add %5,%2,%0" \ -+ : "=r" ((UDItype)(wh)), \ -+ "=&r" ((UDItype)(wl)), \ -+ "=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3), "=&r" (tmp4) \ -+ : "r" ((UDItype)(u)), \ -+ "r" ((UDItype)(v)) \ -+ __CLOBBER_CC); \ -+ } while (0) -+#define UMUL_TIME 96 -+#define UDIV_TIME 230 -+#endif /* sparc64 */ -+ -+#if defined (__vax__) && W_TYPE_SIZE == 32 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("addl2 %5,%1\n\tadwc %3,%0" \ -+ : "=g" ((USItype) (sh)), \ -+ "=&g" ((USItype) (sl)) \ -+ : "%0" ((USItype) (ah)), \ -+ "g" ((USItype) (bh)), \ -+ "%1" ((USItype) (al)), \ -+ "g" ((USItype) (bl))) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("subl2 %5,%1\n\tsbwc %3,%0" \ -+ : "=g" ((USItype) (sh)), \ -+ "=&g" ((USItype) (sl)) \ -+ : "0" ((USItype) (ah)), \ -+ "g" ((USItype) (bh)), \ -+ "1" ((USItype) (al)), \ -+ "g" ((USItype) (bl))) -+#define umul_ppmm(xh, xl, m0, m1) \ -+ do { \ -+ union { \ -+ UDItype __ll; \ -+ struct {USItype __l, __h;} __i; \ -+ } __xx; \ -+ USItype __m0 = (m0), __m1 = (m1); \ -+ __asm__ ("emul %1,%2,$0,%0" \ -+ : "=r" (__xx.__ll) \ -+ : "g" (__m0), \ -+ "g" (__m1)); \ -+ (xh) = __xx.__i.__h; \ -+ (xl) = __xx.__i.__l; \ -+ (xh) += ((((SItype) __m0 >> 31) & __m1) \ -+ + (((SItype) __m1 >> 31) & __m0)); \ -+ } while (0) -+#define sdiv_qrnnd(q, r, n1, n0, d) \ -+ do { \ -+ union {DItype __ll; \ -+ struct {SItype __l, __h;} __i; \ -+ } __xx; \ -+ __xx.__i.__h = n1; __xx.__i.__l = n0; \ -+ __asm__ ("ediv %3,%2,%0,%1" \ -+ : "=g" (q), "=g" (r) \ -+ : "g" (__xx.__ll), "g" (d)); \ -+ } while (0) -+#endif /* __vax__ */ -+ -+#if defined (__xtensa__) && W_TYPE_SIZE == 32 -+/* This code is not Xtensa-configuration-specific, so rely on the compiler -+ to expand builtin functions depending on what configuration features -+ are available. This avoids library calls when the operation can be -+ performed in-line. */ -+#define umul_ppmm(w1, w0, u, v) \ -+ do { \ -+ DWunion __w; \ -+ __w.ll = __builtin_umulsidi3 (u, v); \ -+ w1 = __w.s.high; \ -+ w0 = __w.s.low; \ -+ } while (0) -+#define __umulsidi3(u, v) __builtin_umulsidi3 (u, v) -+#define count_leading_zeros(COUNT, X) ((COUNT) = __builtin_clz (X)) -+#define count_trailing_zeros(COUNT, X) ((COUNT) = __builtin_ctz (X)) -+#endif /* __xtensa__ */ -+ -+#if defined (__z8000__) && W_TYPE_SIZE == 16 -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("add %H1,%H5\n\tadc %H0,%H3" \ -+ : "=r" ((unsigned int)(sh)), \ -+ "=&r" ((unsigned int)(sl)) \ -+ : "%0" ((unsigned int)(ah)), \ -+ "r" ((unsigned int)(bh)), \ -+ "%1" ((unsigned int)(al)), \ -+ "rQR" ((unsigned int)(bl))) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ __asm__ ("sub %H1,%H5\n\tsbc %H0,%H3" \ -+ : "=r" ((unsigned int)(sh)), \ -+ "=&r" ((unsigned int)(sl)) \ -+ : "0" ((unsigned int)(ah)), \ -+ "r" ((unsigned int)(bh)), \ -+ "1" ((unsigned int)(al)), \ -+ "rQR" ((unsigned int)(bl))) -+#define umul_ppmm(xh, xl, m0, m1) \ -+ do { \ -+ union {long int __ll; \ -+ struct {unsigned int __h, __l;} __i; \ -+ } __xx; \ -+ unsigned int __m0 = (m0), __m1 = (m1); \ -+ __asm__ ("mult %S0,%H3" \ -+ : "=r" (__xx.__i.__h), \ -+ "=r" (__xx.__i.__l) \ -+ : "%1" (__m0), \ -+ "rQR" (__m1)); \ -+ (xh) = __xx.__i.__h; (xl) = __xx.__i.__l; \ -+ (xh) += ((((signed int) __m0 >> 15) & __m1) \ -+ + (((signed int) __m1 >> 15) & __m0)); \ -+ } while (0) -+#endif /* __z8000__ */ -+ -+#endif /* __GNUC__ */ -+ -+/* If this machine has no inline assembler, use C macros. */ -+ -+#if !defined (add_ssaaaa) -+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \ -+ do { \ -+ UWtype __x; \ -+ __x = (al) + (bl); \ -+ (sh) = (ah) + (bh) + (__x < (al)); \ -+ (sl) = __x; \ -+ } while (0) -+#endif -+ -+#if !defined (sub_ddmmss) -+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \ -+ do { \ -+ UWtype __x; \ -+ __x = (al) - (bl); \ -+ (sh) = (ah) - (bh) - (__x > (al)); \ -+ (sl) = __x; \ -+ } while (0) -+#endif -+ -+/* If we lack umul_ppmm but have smul_ppmm, define umul_ppmm in terms of -+ smul_ppmm. */ -+#if !defined (umul_ppmm) && defined (smul_ppmm) -+#define umul_ppmm(w1, w0, u, v) \ -+ do { \ -+ UWtype __w1; \ -+ UWtype __xm0 = (u), __xm1 = (v); \ -+ smul_ppmm (__w1, w0, __xm0, __xm1); \ -+ (w1) = __w1 + (-(__xm0 >> (W_TYPE_SIZE - 1)) & __xm1) \ -+ + (-(__xm1 >> (W_TYPE_SIZE - 1)) & __xm0); \ -+ } while (0) -+#endif -+ -+/* If we still don't have umul_ppmm, define it using plain C. */ -+#if !defined (umul_ppmm) -+#define umul_ppmm(w1, w0, u, v) \ -+ do { \ -+ UWtype __x0, __x1, __x2, __x3; \ -+ UHWtype __ul, __vl, __uh, __vh; \ -+ \ -+ __ul = __ll_lowpart (u); \ -+ __uh = __ll_highpart (u); \ -+ __vl = __ll_lowpart (v); \ -+ __vh = __ll_highpart (v); \ -+ \ -+ __x0 = (UWtype) __ul * __vl; \ -+ __x1 = (UWtype) __ul * __vh; \ -+ __x2 = (UWtype) __uh * __vl; \ -+ __x3 = (UWtype) __uh * __vh; \ -+ \ -+ __x1 += __ll_highpart (__x0);/* this can't give carry */ \ -+ __x1 += __x2; /* but this indeed can */ \ -+ if (__x1 < __x2) /* did we get it? */ \ -+ __x3 += __ll_B; /* yes, add it in the proper pos. */ \ -+ \ -+ (w1) = __x3 + __ll_highpart (__x1); \ -+ (w0) = __ll_lowpart (__x1) * __ll_B + __ll_lowpart (__x0); \ -+ } while (0) -+#endif -+ -+#if !defined (__umulsidi3) -+#define __umulsidi3(u, v) \ -+ ({DWunion __w; \ -+ umul_ppmm (__w.s.high, __w.s.low, u, v); \ -+ __w.ll; }) -+#endif -+ -+/* Define this unconditionally, so it can be used for debugging. */ -+#define __udiv_qrnnd_c(q, r, n1, n0, d) \ -+ do { \ -+ UWtype __d1, __d0, __q1, __q0; \ -+ UWtype __r1, __r0, __m; \ -+ __d1 = __ll_highpart (d); \ -+ __d0 = __ll_lowpart (d); \ -+ \ -+ __r1 = (n1) % __d1; \ -+ __q1 = (n1) / __d1; \ -+ __m = (UWtype) __q1 * __d0; \ -+ __r1 = __r1 * __ll_B | __ll_highpart (n0); \ -+ if (__r1 < __m) \ -+ { \ -+ __q1--, __r1 += (d); \ -+ if (__r1 >= (d)) /* i.e. we didn't get carry when adding to __r1 */\ -+ if (__r1 < __m) \ -+ __q1--, __r1 += (d); \ -+ } \ -+ __r1 -= __m; \ -+ \ -+ __r0 = __r1 % __d1; \ -+ __q0 = __r1 / __d1; \ -+ __m = (UWtype) __q0 * __d0; \ -+ __r0 = __r0 * __ll_B | __ll_lowpart (n0); \ -+ if (__r0 < __m) \ -+ { \ -+ __q0--, __r0 += (d); \ -+ if (__r0 >= (d)) \ -+ if (__r0 < __m) \ -+ __q0--, __r0 += (d); \ -+ } \ -+ __r0 -= __m; \ -+ \ -+ (q) = (UWtype) __q1 * __ll_B | __q0; \ -+ (r) = __r0; \ -+ } while (0) -+ -+/* If the processor has no udiv_qrnnd but sdiv_qrnnd, go through -+ __udiv_w_sdiv (defined in libgcc or elsewhere). */ -+#if !defined (udiv_qrnnd) && defined (sdiv_qrnnd) -+#define udiv_qrnnd(q, r, nh, nl, d) \ -+ do { \ -+ USItype __r; \ -+ (q) = __udiv_w_sdiv (&__r, nh, nl, d); \ -+ (r) = __r; \ -+ } while (0) -+#endif -+ -+/* If udiv_qrnnd was not defined for this processor, use __udiv_qrnnd_c. */ -+#if !defined (udiv_qrnnd) -+#define UDIV_NEEDS_NORMALIZATION 1 -+#define udiv_qrnnd __udiv_qrnnd_c -+#endif -+ -+#if !defined (count_leading_zeros) -+#define count_leading_zeros(count, x) \ -+ do { \ -+ UWtype __xr = (x); \ -+ UWtype __a; \ -+ \ -+ if (W_TYPE_SIZE <= 32) \ -+ { \ -+ __a = __xr < ((UWtype)1<<2*__BITS4) \ -+ ? (__xr < ((UWtype)1<<__BITS4) ? 0 : __BITS4) \ -+ : (__xr < ((UWtype)1<<3*__BITS4) ? 2*__BITS4 : 3*__BITS4); \ -+ } \ -+ else \ -+ { \ -+ for (__a = W_TYPE_SIZE - 8; __a > 0; __a -= 8) \ -+ if (((__xr >> __a) & 0xff) != 0) \ -+ break; \ -+ } \ -+ \ -+ (count) = W_TYPE_SIZE - (__clz_tab[__xr >> __a] + __a); \ -+ } while (0) -+#define COUNT_LEADING_ZEROS_0 W_TYPE_SIZE -+#endif -+ -+#if !defined (count_trailing_zeros) -+/* Define count_trailing_zeros using count_leading_zeros. The latter might be -+ defined in asm, but if it is not, the C version above is good enough. */ -+#define count_trailing_zeros(count, x) \ -+ do { \ -+ UWtype __ctz_x = (x); \ -+ UWtype __ctz_c; \ -+ count_leading_zeros (__ctz_c, __ctz_x & -__ctz_x); \ -+ (count) = W_TYPE_SIZE - 1 - __ctz_c; \ -+ } while (0) -+#endif -+ -+#ifndef UDIV_NEEDS_NORMALIZATION -+#define UDIV_NEEDS_NORMALIZATION 0 -+#endif -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/mp_clz_tab.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/mp_clz_tab.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/mp_clz_tab.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/mp_clz_tab.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,37 @@ -+/* __clz_tab -- support for longlong.h -+ Copyright (C) 1991, 1993, 1994, 1997 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. Its master source is NOT part of -+ the C library, however. The master source lives in the GNU MP Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#if 0 -+#include -+#include "gmp-impl.h" -+#endif -+ -+const -+unsigned char __clz_tab[] = -+{ -+ 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -+ 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, -+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, -+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, -+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -+}; -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/op-1.h uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/op-1.h ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/op-1.h 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/op-1.h 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,302 @@ -+/* Software floating-point emulation. -+ Basic one-word fraction declaration and manipulation. -+ Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com), -+ Jakub Jelinek (jj@ultra.linux.cz), -+ David S. Miller (davem@redhat.com) and -+ Peter Maydell (pmaydell@chiark.greenend.org.uk). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ In addition to the permissions in the GNU Lesser General Public -+ License, the Free Software Foundation gives you unlimited -+ permission to link the compiled version of this file into -+ combinations with other programs, and to distribute those -+ combinations without any restriction coming from the use of this -+ file. (The Lesser General Public License restrictions do apply in -+ other respects; for example, they cover modification of the file, -+ and distribution when not linked into a combine executable.) -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, -+ MA 02110-1301, USA. */ -+ -+#define _FP_FRAC_DECL_1(X) _FP_W_TYPE X##_f -+#define _FP_FRAC_COPY_1(D,S) (D##_f = S##_f) -+#define _FP_FRAC_SET_1(X,I) (X##_f = I) -+#define _FP_FRAC_HIGH_1(X) (X##_f) -+#define _FP_FRAC_LOW_1(X) (X##_f) -+#define _FP_FRAC_WORD_1(X,w) (X##_f) -+ -+#define _FP_FRAC_ADDI_1(X,I) (X##_f += I) -+#define _FP_FRAC_SLL_1(X,N) \ -+ do { \ -+ if (__builtin_constant_p(N) && (N) == 1) \ -+ X##_f += X##_f; \ -+ else \ -+ X##_f <<= (N); \ -+ } while (0) -+#define _FP_FRAC_SRL_1(X,N) (X##_f >>= N) -+ -+/* Right shift with sticky-lsb. */ -+#define _FP_FRAC_SRST_1(X,S,N,sz) __FP_FRAC_SRST_1(X##_f, S, N, sz) -+#define _FP_FRAC_SRS_1(X,N,sz) __FP_FRAC_SRS_1(X##_f, N, sz) -+ -+#define __FP_FRAC_SRST_1(X,S,N,sz) \ -+do { \ -+ S = (__builtin_constant_p(N) && (N) == 1 \ -+ ? X & 1 : (X << (_FP_W_TYPE_SIZE - (N))) != 0); \ -+ X = X >> (N); \ -+} while (0) -+ -+#define __FP_FRAC_SRS_1(X,N,sz) \ -+ (X = (X >> (N) | (__builtin_constant_p(N) && (N) == 1 \ -+ ? X & 1 : (X << (_FP_W_TYPE_SIZE - (N))) != 0))) -+ -+#define _FP_FRAC_ADD_1(R,X,Y) (R##_f = X##_f + Y##_f) -+#define _FP_FRAC_SUB_1(R,X,Y) (R##_f = X##_f - Y##_f) -+#define _FP_FRAC_DEC_1(X,Y) (X##_f -= Y##_f) -+#define _FP_FRAC_CLZ_1(z, X) __FP_CLZ(z, X##_f) -+ -+/* Predicates */ -+#define _FP_FRAC_NEGP_1(X) ((_FP_WS_TYPE)X##_f < 0) -+#define _FP_FRAC_ZEROP_1(X) (X##_f == 0) -+#define _FP_FRAC_OVERP_1(fs,X) (X##_f & _FP_OVERFLOW_##fs) -+#define _FP_FRAC_CLEAR_OVERP_1(fs,X) (X##_f &= ~_FP_OVERFLOW_##fs) -+#define _FP_FRAC_EQ_1(X, Y) (X##_f == Y##_f) -+#define _FP_FRAC_GE_1(X, Y) (X##_f >= Y##_f) -+#define _FP_FRAC_GT_1(X, Y) (X##_f > Y##_f) -+ -+#define _FP_ZEROFRAC_1 0 -+#define _FP_MINFRAC_1 1 -+#define _FP_MAXFRAC_1 (~(_FP_WS_TYPE)0) -+ -+/* -+ * Unpack the raw bits of a native fp value. Do not classify or -+ * normalize the data. -+ */ -+ -+#define _FP_UNPACK_RAW_1(fs, X, val) \ -+ do { \ -+ union _FP_UNION_##fs _flo; _flo.flt = (val); \ -+ \ -+ X##_f = _flo.bits.frac; \ -+ X##_e = _flo.bits.exp; \ -+ X##_s = _flo.bits.sign; \ -+ } while (0) -+ -+#define _FP_UNPACK_RAW_1_P(fs, X, val) \ -+ do { \ -+ union _FP_UNION_##fs *_flo = \ -+ (union _FP_UNION_##fs *)(val); \ -+ \ -+ X##_f = _flo->bits.frac; \ -+ X##_e = _flo->bits.exp; \ -+ X##_s = _flo->bits.sign; \ -+ } while (0) -+ -+/* -+ * Repack the raw bits of a native fp value. -+ */ -+ -+#define _FP_PACK_RAW_1(fs, val, X) \ -+ do { \ -+ union _FP_UNION_##fs _flo; \ -+ \ -+ _flo.bits.frac = X##_f; \ -+ _flo.bits.exp = X##_e; \ -+ _flo.bits.sign = X##_s; \ -+ \ -+ (val) = _flo.flt; \ -+ } while (0) -+ -+#define _FP_PACK_RAW_1_P(fs, val, X) \ -+ do { \ -+ union _FP_UNION_##fs *_flo = \ -+ (union _FP_UNION_##fs *)(val); \ -+ \ -+ _flo->bits.frac = X##_f; \ -+ _flo->bits.exp = X##_e; \ -+ _flo->bits.sign = X##_s; \ -+ } while (0) -+ -+ -+/* -+ * Multiplication algorithms: -+ */ -+ -+/* Basic. Assuming the host word size is >= 2*FRACBITS, we can do the -+ multiplication immediately. */ -+ -+#define _FP_MUL_MEAT_1_imm(wfracbits, R, X, Y) \ -+ do { \ -+ R##_f = X##_f * Y##_f; \ -+ /* Normalize since we know where the msb of the multiplicands \ -+ were (bit B), we know that the msb of the of the product is \ -+ at either 2B or 2B-1. */ \ -+ _FP_FRAC_SRS_1(R, wfracbits-1, 2*wfracbits); \ -+ } while (0) -+ -+/* Given a 1W * 1W => 2W primitive, do the extended multiplication. */ -+ -+#define _FP_MUL_MEAT_1_wide(wfracbits, R, X, Y, doit) \ -+ do { \ -+ _FP_W_TYPE _Z_f0, _Z_f1; \ -+ doit(_Z_f1, _Z_f0, X##_f, Y##_f); \ -+ /* Normalize since we know where the msb of the multiplicands \ -+ were (bit B), we know that the msb of the of the product is \ -+ at either 2B or 2B-1. */ \ -+ _FP_FRAC_SRS_2(_Z, wfracbits-1, 2*wfracbits); \ -+ R##_f = _Z_f0; \ -+ } while (0) -+ -+/* Finally, a simple widening multiply algorithm. What fun! */ -+ -+#define _FP_MUL_MEAT_1_hard(wfracbits, R, X, Y) \ -+ do { \ -+ _FP_W_TYPE _xh, _xl, _yh, _yl, _z_f0, _z_f1, _a_f0, _a_f1; \ -+ \ -+ /* split the words in half */ \ -+ _xh = X##_f >> (_FP_W_TYPE_SIZE/2); \ -+ _xl = X##_f & (((_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE/2)) - 1); \ -+ _yh = Y##_f >> (_FP_W_TYPE_SIZE/2); \ -+ _yl = Y##_f & (((_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE/2)) - 1); \ -+ \ -+ /* multiply the pieces */ \ -+ _z_f0 = _xl * _yl; \ -+ _a_f0 = _xh * _yl; \ -+ _a_f1 = _xl * _yh; \ -+ _z_f1 = _xh * _yh; \ -+ \ -+ /* reassemble into two full words */ \ -+ if ((_a_f0 += _a_f1) < _a_f1) \ -+ _z_f1 += (_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE/2); \ -+ _a_f1 = _a_f0 >> (_FP_W_TYPE_SIZE/2); \ -+ _a_f0 = _a_f0 << (_FP_W_TYPE_SIZE/2); \ -+ _FP_FRAC_ADD_2(_z, _z, _a); \ -+ \ -+ /* normalize */ \ -+ _FP_FRAC_SRS_2(_z, wfracbits - 1, 2*wfracbits); \ -+ R##_f = _z_f0; \ -+ } while (0) -+ -+ -+/* -+ * Division algorithms: -+ */ -+ -+/* Basic. Assuming the host word size is >= 2*FRACBITS, we can do the -+ division immediately. Give this macro either _FP_DIV_HELP_imm for -+ C primitives or _FP_DIV_HELP_ldiv for the ISO function. Which you -+ choose will depend on what the compiler does with divrem4. */ -+ -+#define _FP_DIV_MEAT_1_imm(fs, R, X, Y, doit) \ -+ do { \ -+ _FP_W_TYPE _q, _r; \ -+ X##_f <<= (X##_f < Y##_f \ -+ ? R##_e--, _FP_WFRACBITS_##fs \ -+ : _FP_WFRACBITS_##fs - 1); \ -+ doit(_q, _r, X##_f, Y##_f); \ -+ R##_f = _q | (_r != 0); \ -+ } while (0) -+ -+/* GCC's longlong.h defines a 2W / 1W => (1W,1W) primitive udiv_qrnnd -+ that may be useful in this situation. This first is for a primitive -+ that requires normalization, the second for one that does not. Look -+ for UDIV_NEEDS_NORMALIZATION to tell which your machine needs. */ -+ -+#define _FP_DIV_MEAT_1_udiv_norm(fs, R, X, Y) \ -+ do { \ -+ _FP_W_TYPE _nh, _nl, _q, _r, _y; \ -+ \ -+ /* Normalize Y -- i.e. make the most significant bit set. */ \ -+ _y = Y##_f << _FP_WFRACXBITS_##fs; \ -+ \ -+ /* Shift X op correspondingly high, that is, up one full word. */ \ -+ if (X##_f < Y##_f) \ -+ { \ -+ R##_e--; \ -+ _nl = 0; \ -+ _nh = X##_f; \ -+ } \ -+ else \ -+ { \ -+ _nl = X##_f << (_FP_W_TYPE_SIZE - 1); \ -+ _nh = X##_f >> 1; \ -+ } \ -+ \ -+ udiv_qrnnd(_q, _r, _nh, _nl, _y); \ -+ R##_f = _q | (_r != 0); \ -+ } while (0) -+ -+#define _FP_DIV_MEAT_1_udiv(fs, R, X, Y) \ -+ do { \ -+ _FP_W_TYPE _nh, _nl, _q, _r; \ -+ if (X##_f < Y##_f) \ -+ { \ -+ R##_e--; \ -+ _nl = X##_f << _FP_WFRACBITS_##fs; \ -+ _nh = X##_f >> _FP_WFRACXBITS_##fs; \ -+ } \ -+ else \ -+ { \ -+ _nl = X##_f << (_FP_WFRACBITS_##fs - 1); \ -+ _nh = X##_f >> (_FP_WFRACXBITS_##fs + 1); \ -+ } \ -+ udiv_qrnnd(_q, _r, _nh, _nl, Y##_f); \ -+ R##_f = _q | (_r != 0); \ -+ } while (0) -+ -+ -+/* -+ * Square root algorithms: -+ * We have just one right now, maybe Newton approximation -+ * should be added for those machines where division is fast. -+ */ -+ -+#define _FP_SQRT_MEAT_1(R, S, T, X, q) \ -+ do { \ -+ while (q != _FP_WORK_ROUND) \ -+ { \ -+ T##_f = S##_f + q; \ -+ if (T##_f <= X##_f) \ -+ { \ -+ S##_f = T##_f + q; \ -+ X##_f -= T##_f; \ -+ R##_f += q; \ -+ } \ -+ _FP_FRAC_SLL_1(X, 1); \ -+ q >>= 1; \ -+ } \ -+ if (X##_f) \ -+ { \ -+ if (S##_f < X##_f) \ -+ R##_f |= _FP_WORK_ROUND; \ -+ R##_f |= _FP_WORK_STICKY; \ -+ } \ -+ } while (0) -+ -+/* -+ * Assembly/disassembly for converting to/from integral types. -+ * No shifting or overflow handled here. -+ */ -+ -+#define _FP_FRAC_ASSEMBLE_1(r, X, rsize) (r = X##_f) -+#define _FP_FRAC_DISASSEMBLE_1(X, r, rsize) (X##_f = r) -+ -+ -+/* -+ * Convert FP values between word sizes -+ */ -+ -+#define _FP_FRAC_COPY_1_1(D, S) (D##_f = S##_f) -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/op-2.h uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/op-2.h ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/op-2.h 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/op-2.h 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,617 @@ -+/* Software floating-point emulation. -+ Basic two-word fraction declaration and manipulation. -+ Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com), -+ Jakub Jelinek (jj@ultra.linux.cz), -+ David S. Miller (davem@redhat.com) and -+ Peter Maydell (pmaydell@chiark.greenend.org.uk). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ In addition to the permissions in the GNU Lesser General Public -+ License, the Free Software Foundation gives you unlimited -+ permission to link the compiled version of this file into -+ combinations with other programs, and to distribute those -+ combinations without any restriction coming from the use of this -+ file. (The Lesser General Public License restrictions do apply in -+ other respects; for example, they cover modification of the file, -+ and distribution when not linked into a combine executable.) -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, -+ MA 02110-1301, USA. */ -+ -+#define _FP_FRAC_DECL_2(X) _FP_W_TYPE X##_f0, X##_f1 -+#define _FP_FRAC_COPY_2(D,S) (D##_f0 = S##_f0, D##_f1 = S##_f1) -+#define _FP_FRAC_SET_2(X,I) __FP_FRAC_SET_2(X, I) -+#define _FP_FRAC_HIGH_2(X) (X##_f1) -+#define _FP_FRAC_LOW_2(X) (X##_f0) -+#define _FP_FRAC_WORD_2(X,w) (X##_f##w) -+ -+#define _FP_FRAC_SLL_2(X,N) \ -+(void)(((N) < _FP_W_TYPE_SIZE) \ -+ ? ({ \ -+ if (__builtin_constant_p(N) && (N) == 1) \ -+ { \ -+ X##_f1 = X##_f1 + X##_f1 + (((_FP_WS_TYPE)(X##_f0)) < 0); \ -+ X##_f0 += X##_f0; \ -+ } \ -+ else \ -+ { \ -+ X##_f1 = X##_f1 << (N) | X##_f0 >> (_FP_W_TYPE_SIZE - (N)); \ -+ X##_f0 <<= (N); \ -+ } \ -+ 0; \ -+ }) \ -+ : ({ \ -+ X##_f1 = X##_f0 << ((N) - _FP_W_TYPE_SIZE); \ -+ X##_f0 = 0; \ -+ })) -+ -+ -+#define _FP_FRAC_SRL_2(X,N) \ -+(void)(((N) < _FP_W_TYPE_SIZE) \ -+ ? ({ \ -+ X##_f0 = X##_f0 >> (N) | X##_f1 << (_FP_W_TYPE_SIZE - (N)); \ -+ X##_f1 >>= (N); \ -+ }) \ -+ : ({ \ -+ X##_f0 = X##_f1 >> ((N) - _FP_W_TYPE_SIZE); \ -+ X##_f1 = 0; \ -+ })) -+ -+/* Right shift with sticky-lsb. */ -+#define _FP_FRAC_SRST_2(X,S, N,sz) \ -+(void)(((N) < _FP_W_TYPE_SIZE) \ -+ ? ({ \ -+ S = (__builtin_constant_p(N) && (N) == 1 \ -+ ? X##_f0 & 1 \ -+ : (X##_f0 << (_FP_W_TYPE_SIZE - (N))) != 0); \ -+ X##_f0 = (X##_f1 << (_FP_W_TYPE_SIZE - (N)) | X##_f0 >> (N)); \ -+ X##_f1 >>= (N); \ -+ }) \ -+ : ({ \ -+ S = ((((N) == _FP_W_TYPE_SIZE \ -+ ? 0 \ -+ : (X##_f1 << (2*_FP_W_TYPE_SIZE - (N)))) \ -+ | X##_f0) != 0); \ -+ X##_f0 = (X##_f1 >> ((N) - _FP_W_TYPE_SIZE)); \ -+ X##_f1 = 0; \ -+ })) -+ -+#define _FP_FRAC_SRS_2(X,N,sz) \ -+(void)(((N) < _FP_W_TYPE_SIZE) \ -+ ? ({ \ -+ X##_f0 = (X##_f1 << (_FP_W_TYPE_SIZE - (N)) | X##_f0 >> (N) | \ -+ (__builtin_constant_p(N) && (N) == 1 \ -+ ? X##_f0 & 1 \ -+ : (X##_f0 << (_FP_W_TYPE_SIZE - (N))) != 0)); \ -+ X##_f1 >>= (N); \ -+ }) \ -+ : ({ \ -+ X##_f0 = (X##_f1 >> ((N) - _FP_W_TYPE_SIZE) | \ -+ ((((N) == _FP_W_TYPE_SIZE \ -+ ? 0 \ -+ : (X##_f1 << (2*_FP_W_TYPE_SIZE - (N)))) \ -+ | X##_f0) != 0)); \ -+ X##_f1 = 0; \ -+ })) -+ -+#define _FP_FRAC_ADDI_2(X,I) \ -+ __FP_FRAC_ADDI_2(X##_f1, X##_f0, I) -+ -+#define _FP_FRAC_ADD_2(R,X,Y) \ -+ __FP_FRAC_ADD_2(R##_f1, R##_f0, X##_f1, X##_f0, Y##_f1, Y##_f0) -+ -+#define _FP_FRAC_SUB_2(R,X,Y) \ -+ __FP_FRAC_SUB_2(R##_f1, R##_f0, X##_f1, X##_f0, Y##_f1, Y##_f0) -+ -+#define _FP_FRAC_DEC_2(X,Y) \ -+ __FP_FRAC_DEC_2(X##_f1, X##_f0, Y##_f1, Y##_f0) -+ -+#define _FP_FRAC_CLZ_2(R,X) \ -+ do { \ -+ if (X##_f1) \ -+ __FP_CLZ(R,X##_f1); \ -+ else \ -+ { \ -+ __FP_CLZ(R,X##_f0); \ -+ R += _FP_W_TYPE_SIZE; \ -+ } \ -+ } while(0) -+ -+/* Predicates */ -+#define _FP_FRAC_NEGP_2(X) ((_FP_WS_TYPE)X##_f1 < 0) -+#define _FP_FRAC_ZEROP_2(X) ((X##_f1 | X##_f0) == 0) -+#define _FP_FRAC_OVERP_2(fs,X) (_FP_FRAC_HIGH_##fs(X) & _FP_OVERFLOW_##fs) -+#define _FP_FRAC_CLEAR_OVERP_2(fs,X) (_FP_FRAC_HIGH_##fs(X) &= ~_FP_OVERFLOW_##fs) -+#define _FP_FRAC_EQ_2(X, Y) (X##_f1 == Y##_f1 && X##_f0 == Y##_f0) -+#define _FP_FRAC_GT_2(X, Y) \ -+ (X##_f1 > Y##_f1 || (X##_f1 == Y##_f1 && X##_f0 > Y##_f0)) -+#define _FP_FRAC_GE_2(X, Y) \ -+ (X##_f1 > Y##_f1 || (X##_f1 == Y##_f1 && X##_f0 >= Y##_f0)) -+ -+#define _FP_ZEROFRAC_2 0, 0 -+#define _FP_MINFRAC_2 0, 1 -+#define _FP_MAXFRAC_2 (~(_FP_WS_TYPE)0), (~(_FP_WS_TYPE)0) -+ -+/* -+ * Internals -+ */ -+ -+#define __FP_FRAC_SET_2(X,I1,I0) (X##_f0 = I0, X##_f1 = I1) -+ -+#define __FP_CLZ_2(R, xh, xl) \ -+ do { \ -+ if (xh) \ -+ __FP_CLZ(R,xh); \ -+ else \ -+ { \ -+ __FP_CLZ(R,xl); \ -+ R += _FP_W_TYPE_SIZE; \ -+ } \ -+ } while(0) -+ -+#if 0 -+ -+#ifndef __FP_FRAC_ADDI_2 -+#define __FP_FRAC_ADDI_2(xh, xl, i) \ -+ (xh += ((xl += i) < i)) -+#endif -+#ifndef __FP_FRAC_ADD_2 -+#define __FP_FRAC_ADD_2(rh, rl, xh, xl, yh, yl) \ -+ (rh = xh + yh + ((rl = xl + yl) < xl)) -+#endif -+#ifndef __FP_FRAC_SUB_2 -+#define __FP_FRAC_SUB_2(rh, rl, xh, xl, yh, yl) \ -+ (rh = xh - yh - ((rl = xl - yl) > xl)) -+#endif -+#ifndef __FP_FRAC_DEC_2 -+#define __FP_FRAC_DEC_2(xh, xl, yh, yl) \ -+ do { \ -+ UWtype _t = xl; \ -+ xh -= yh + ((xl -= yl) > _t); \ -+ } while (0) -+#endif -+ -+#else -+ -+#undef __FP_FRAC_ADDI_2 -+#define __FP_FRAC_ADDI_2(xh, xl, i) add_ssaaaa(xh, xl, xh, xl, 0, i) -+#undef __FP_FRAC_ADD_2 -+#define __FP_FRAC_ADD_2 add_ssaaaa -+#undef __FP_FRAC_SUB_2 -+#define __FP_FRAC_SUB_2 sub_ddmmss -+#undef __FP_FRAC_DEC_2 -+#define __FP_FRAC_DEC_2(xh, xl, yh, yl) sub_ddmmss(xh, xl, xh, xl, yh, yl) -+ -+#endif -+ -+/* -+ * Unpack the raw bits of a native fp value. Do not classify or -+ * normalize the data. -+ */ -+ -+#define _FP_UNPACK_RAW_2(fs, X, val) \ -+ do { \ -+ union _FP_UNION_##fs _flo; _flo.flt = (val); \ -+ \ -+ X##_f0 = _flo.bits.frac0; \ -+ X##_f1 = _flo.bits.frac1; \ -+ X##_e = _flo.bits.exp; \ -+ X##_s = _flo.bits.sign; \ -+ } while (0) -+ -+#define _FP_UNPACK_RAW_2_P(fs, X, val) \ -+ do { \ -+ union _FP_UNION_##fs *_flo = \ -+ (union _FP_UNION_##fs *)(val); \ -+ \ -+ X##_f0 = _flo->bits.frac0; \ -+ X##_f1 = _flo->bits.frac1; \ -+ X##_e = _flo->bits.exp; \ -+ X##_s = _flo->bits.sign; \ -+ } while (0) -+ -+ -+/* -+ * Repack the raw bits of a native fp value. -+ */ -+ -+#define _FP_PACK_RAW_2(fs, val, X) \ -+ do { \ -+ union _FP_UNION_##fs _flo; \ -+ \ -+ _flo.bits.frac0 = X##_f0; \ -+ _flo.bits.frac1 = X##_f1; \ -+ _flo.bits.exp = X##_e; \ -+ _flo.bits.sign = X##_s; \ -+ \ -+ (val) = _flo.flt; \ -+ } while (0) -+ -+#define _FP_PACK_RAW_2_P(fs, val, X) \ -+ do { \ -+ union _FP_UNION_##fs *_flo = \ -+ (union _FP_UNION_##fs *)(val); \ -+ \ -+ _flo->bits.frac0 = X##_f0; \ -+ _flo->bits.frac1 = X##_f1; \ -+ _flo->bits.exp = X##_e; \ -+ _flo->bits.sign = X##_s; \ -+ } while (0) -+ -+ -+/* -+ * Multiplication algorithms: -+ */ -+ -+/* Given a 1W * 1W => 2W primitive, do the extended multiplication. */ -+ -+#define _FP_MUL_MEAT_2_wide(wfracbits, R, X, Y, doit) \ -+ do { \ -+ _FP_FRAC_DECL_4(_z); _FP_FRAC_DECL_2(_b); _FP_FRAC_DECL_2(_c); \ -+ \ -+ doit(_FP_FRAC_WORD_4(_z,1), _FP_FRAC_WORD_4(_z,0), X##_f0, Y##_f0); \ -+ doit(_b_f1, _b_f0, X##_f0, Y##_f1); \ -+ doit(_c_f1, _c_f0, X##_f1, Y##_f0); \ -+ doit(_FP_FRAC_WORD_4(_z,3), _FP_FRAC_WORD_4(_z,2), X##_f1, Y##_f1); \ -+ \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \ -+ _FP_FRAC_WORD_4(_z,1), 0, _b_f1, _b_f0, \ -+ _FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \ -+ _FP_FRAC_WORD_4(_z,1)); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \ -+ _FP_FRAC_WORD_4(_z,1), 0, _c_f1, _c_f0, \ -+ _FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \ -+ _FP_FRAC_WORD_4(_z,1)); \ -+ \ -+ /* Normalize since we know where the msb of the multiplicands \ -+ were (bit B), we know that the msb of the of the product is \ -+ at either 2B or 2B-1. */ \ -+ _FP_FRAC_SRS_4(_z, wfracbits-1, 2*wfracbits); \ -+ R##_f0 = _FP_FRAC_WORD_4(_z,0); \ -+ R##_f1 = _FP_FRAC_WORD_4(_z,1); \ -+ } while (0) -+ -+/* Given a 1W * 1W => 2W primitive, do the extended multiplication. -+ Do only 3 multiplications instead of four. This one is for machines -+ where multiplication is much more expensive than subtraction. */ -+ -+#define _FP_MUL_MEAT_2_wide_3mul(wfracbits, R, X, Y, doit) \ -+ do { \ -+ _FP_FRAC_DECL_4(_z); _FP_FRAC_DECL_2(_b); _FP_FRAC_DECL_2(_c); \ -+ _FP_W_TYPE _d; \ -+ int _c1, _c2; \ -+ \ -+ _b_f0 = X##_f0 + X##_f1; \ -+ _c1 = _b_f0 < X##_f0; \ -+ _b_f1 = Y##_f0 + Y##_f1; \ -+ _c2 = _b_f1 < Y##_f0; \ -+ doit(_d, _FP_FRAC_WORD_4(_z,0), X##_f0, Y##_f0); \ -+ doit(_FP_FRAC_WORD_4(_z,2), _FP_FRAC_WORD_4(_z,1), _b_f0, _b_f1); \ -+ doit(_c_f1, _c_f0, X##_f1, Y##_f1); \ -+ \ -+ _b_f0 &= -_c2; \ -+ _b_f1 &= -_c1; \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \ -+ _FP_FRAC_WORD_4(_z,1), (_c1 & _c2), 0, _d, \ -+ 0, _FP_FRAC_WORD_4(_z,2), _FP_FRAC_WORD_4(_z,1)); \ -+ __FP_FRAC_ADDI_2(_FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \ -+ _b_f0); \ -+ __FP_FRAC_ADDI_2(_FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \ -+ _b_f1); \ -+ __FP_FRAC_DEC_3(_FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \ -+ _FP_FRAC_WORD_4(_z,1), \ -+ 0, _d, _FP_FRAC_WORD_4(_z,0)); \ -+ __FP_FRAC_DEC_3(_FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \ -+ _FP_FRAC_WORD_4(_z,1), 0, _c_f1, _c_f0); \ -+ __FP_FRAC_ADD_2(_FP_FRAC_WORD_4(_z,3), _FP_FRAC_WORD_4(_z,2), \ -+ _c_f1, _c_f0, \ -+ _FP_FRAC_WORD_4(_z,3), _FP_FRAC_WORD_4(_z,2)); \ -+ \ -+ /* Normalize since we know where the msb of the multiplicands \ -+ were (bit B), we know that the msb of the of the product is \ -+ at either 2B or 2B-1. */ \ -+ _FP_FRAC_SRS_4(_z, wfracbits-1, 2*wfracbits); \ -+ R##_f0 = _FP_FRAC_WORD_4(_z,0); \ -+ R##_f1 = _FP_FRAC_WORD_4(_z,1); \ -+ } while (0) -+ -+#define _FP_MUL_MEAT_2_gmp(wfracbits, R, X, Y) \ -+ do { \ -+ _FP_FRAC_DECL_4(_z); \ -+ _FP_W_TYPE _x[2], _y[2]; \ -+ _x[0] = X##_f0; _x[1] = X##_f1; \ -+ _y[0] = Y##_f0; _y[1] = Y##_f1; \ -+ \ -+ mpn_mul_n(_z_f, _x, _y, 2); \ -+ \ -+ /* Normalize since we know where the msb of the multiplicands \ -+ were (bit B), we know that the msb of the of the product is \ -+ at either 2B or 2B-1. */ \ -+ _FP_FRAC_SRS_4(_z, wfracbits-1, 2*wfracbits); \ -+ R##_f0 = _z_f[0]; \ -+ R##_f1 = _z_f[1]; \ -+ } while (0) -+ -+/* Do at most 120x120=240 bits multiplication using double floating -+ point multiplication. This is useful if floating point -+ multiplication has much bigger throughput than integer multiply. -+ It is supposed to work for _FP_W_TYPE_SIZE 64 and wfracbits -+ between 106 and 120 only. -+ Caller guarantees that X and Y has (1LLL << (wfracbits - 1)) set. -+ SETFETZ is a macro which will disable all FPU exceptions and set rounding -+ towards zero, RESETFE should optionally reset it back. */ -+ -+#define _FP_MUL_MEAT_2_120_240_double(wfracbits, R, X, Y, setfetz, resetfe) \ -+ do { \ -+ static const double _const[] = { \ -+ /* 2^-24 */ 5.9604644775390625e-08, \ -+ /* 2^-48 */ 3.5527136788005009e-15, \ -+ /* 2^-72 */ 2.1175823681357508e-22, \ -+ /* 2^-96 */ 1.2621774483536189e-29, \ -+ /* 2^28 */ 2.68435456e+08, \ -+ /* 2^4 */ 1.600000e+01, \ -+ /* 2^-20 */ 9.5367431640625e-07, \ -+ /* 2^-44 */ 5.6843418860808015e-14, \ -+ /* 2^-68 */ 3.3881317890172014e-21, \ -+ /* 2^-92 */ 2.0194839173657902e-28, \ -+ /* 2^-116 */ 1.2037062152420224e-35}; \ -+ double _a240, _b240, _c240, _d240, _e240, _f240, \ -+ _g240, _h240, _i240, _j240, _k240; \ -+ union { double d; UDItype i; } _l240, _m240, _n240, _o240, \ -+ _p240, _q240, _r240, _s240; \ -+ UDItype _t240, _u240, _v240, _w240, _x240, _y240 = 0; \ -+ \ -+ if (wfracbits < 106 || wfracbits > 120) \ -+ abort(); \ -+ \ -+ setfetz; \ -+ \ -+ _e240 = (double)(long)(X##_f0 & 0xffffff); \ -+ _j240 = (double)(long)(Y##_f0 & 0xffffff); \ -+ _d240 = (double)(long)((X##_f0 >> 24) & 0xffffff); \ -+ _i240 = (double)(long)((Y##_f0 >> 24) & 0xffffff); \ -+ _c240 = (double)(long)(((X##_f1 << 16) & 0xffffff) | (X##_f0 >> 48)); \ -+ _h240 = (double)(long)(((Y##_f1 << 16) & 0xffffff) | (Y##_f0 >> 48)); \ -+ _b240 = (double)(long)((X##_f1 >> 8) & 0xffffff); \ -+ _g240 = (double)(long)((Y##_f1 >> 8) & 0xffffff); \ -+ _a240 = (double)(long)(X##_f1 >> 32); \ -+ _f240 = (double)(long)(Y##_f1 >> 32); \ -+ _e240 *= _const[3]; \ -+ _j240 *= _const[3]; \ -+ _d240 *= _const[2]; \ -+ _i240 *= _const[2]; \ -+ _c240 *= _const[1]; \ -+ _h240 *= _const[1]; \ -+ _b240 *= _const[0]; \ -+ _g240 *= _const[0]; \ -+ _s240.d = _e240*_j240;\ -+ _r240.d = _d240*_j240 + _e240*_i240;\ -+ _q240.d = _c240*_j240 + _d240*_i240 + _e240*_h240;\ -+ _p240.d = _b240*_j240 + _c240*_i240 + _d240*_h240 + _e240*_g240;\ -+ _o240.d = _a240*_j240 + _b240*_i240 + _c240*_h240 + _d240*_g240 + _e240*_f240;\ -+ _n240.d = _a240*_i240 + _b240*_h240 + _c240*_g240 + _d240*_f240; \ -+ _m240.d = _a240*_h240 + _b240*_g240 + _c240*_f240; \ -+ _l240.d = _a240*_g240 + _b240*_f240; \ -+ _k240 = _a240*_f240; \ -+ _r240.d += _s240.d; \ -+ _q240.d += _r240.d; \ -+ _p240.d += _q240.d; \ -+ _o240.d += _p240.d; \ -+ _n240.d += _o240.d; \ -+ _m240.d += _n240.d; \ -+ _l240.d += _m240.d; \ -+ _k240 += _l240.d; \ -+ _s240.d -= ((_const[10]+_s240.d)-_const[10]); \ -+ _r240.d -= ((_const[9]+_r240.d)-_const[9]); \ -+ _q240.d -= ((_const[8]+_q240.d)-_const[8]); \ -+ _p240.d -= ((_const[7]+_p240.d)-_const[7]); \ -+ _o240.d += _const[7]; \ -+ _n240.d += _const[6]; \ -+ _m240.d += _const[5]; \ -+ _l240.d += _const[4]; \ -+ if (_s240.d != 0.0) _y240 = 1; \ -+ if (_r240.d != 0.0) _y240 = 1; \ -+ if (_q240.d != 0.0) _y240 = 1; \ -+ if (_p240.d != 0.0) _y240 = 1; \ -+ _t240 = (DItype)_k240; \ -+ _u240 = _l240.i; \ -+ _v240 = _m240.i; \ -+ _w240 = _n240.i; \ -+ _x240 = _o240.i; \ -+ R##_f1 = (_t240 << (128 - (wfracbits - 1))) \ -+ | ((_u240 & 0xffffff) >> ((wfracbits - 1) - 104)); \ -+ R##_f0 = ((_u240 & 0xffffff) << (168 - (wfracbits - 1))) \ -+ | ((_v240 & 0xffffff) << (144 - (wfracbits - 1))) \ -+ | ((_w240 & 0xffffff) << (120 - (wfracbits - 1))) \ -+ | ((_x240 & 0xffffff) >> ((wfracbits - 1) - 96)) \ -+ | _y240; \ -+ resetfe; \ -+ } while (0) -+ -+/* -+ * Division algorithms: -+ */ -+ -+#define _FP_DIV_MEAT_2_udiv(fs, R, X, Y) \ -+ do { \ -+ _FP_W_TYPE _n_f2, _n_f1, _n_f0, _r_f1, _r_f0, _m_f1, _m_f0; \ -+ if (_FP_FRAC_GT_2(X, Y)) \ -+ { \ -+ _n_f2 = X##_f1 >> 1; \ -+ _n_f1 = X##_f1 << (_FP_W_TYPE_SIZE - 1) | X##_f0 >> 1; \ -+ _n_f0 = X##_f0 << (_FP_W_TYPE_SIZE - 1); \ -+ } \ -+ else \ -+ { \ -+ R##_e--; \ -+ _n_f2 = X##_f1; \ -+ _n_f1 = X##_f0; \ -+ _n_f0 = 0; \ -+ } \ -+ \ -+ /* Normalize, i.e. make the most significant bit of the \ -+ denominator set. */ \ -+ _FP_FRAC_SLL_2(Y, _FP_WFRACXBITS_##fs); \ -+ \ -+ udiv_qrnnd(R##_f1, _r_f1, _n_f2, _n_f1, Y##_f1); \ -+ umul_ppmm(_m_f1, _m_f0, R##_f1, Y##_f0); \ -+ _r_f0 = _n_f0; \ -+ if (_FP_FRAC_GT_2(_m, _r)) \ -+ { \ -+ R##_f1--; \ -+ _FP_FRAC_ADD_2(_r, Y, _r); \ -+ if (_FP_FRAC_GE_2(_r, Y) && _FP_FRAC_GT_2(_m, _r)) \ -+ { \ -+ R##_f1--; \ -+ _FP_FRAC_ADD_2(_r, Y, _r); \ -+ } \ -+ } \ -+ _FP_FRAC_DEC_2(_r, _m); \ -+ \ -+ if (_r_f1 == Y##_f1) \ -+ { \ -+ /* This is a special case, not an optimization \ -+ (_r/Y##_f1 would not fit into UWtype). \ -+ As _r is guaranteed to be < Y, R##_f0 can be either \ -+ (UWtype)-1 or (UWtype)-2. But as we know what kind \ -+ of bits it is (sticky, guard, round), we don't care. \ -+ We also don't care what the reminder is, because the \ -+ guard bit will be set anyway. -jj */ \ -+ R##_f0 = -1; \ -+ } \ -+ else \ -+ { \ -+ udiv_qrnnd(R##_f0, _r_f1, _r_f1, _r_f0, Y##_f1); \ -+ umul_ppmm(_m_f1, _m_f0, R##_f0, Y##_f0); \ -+ _r_f0 = 0; \ -+ if (_FP_FRAC_GT_2(_m, _r)) \ -+ { \ -+ R##_f0--; \ -+ _FP_FRAC_ADD_2(_r, Y, _r); \ -+ if (_FP_FRAC_GE_2(_r, Y) && _FP_FRAC_GT_2(_m, _r)) \ -+ { \ -+ R##_f0--; \ -+ _FP_FRAC_ADD_2(_r, Y, _r); \ -+ } \ -+ } \ -+ if (!_FP_FRAC_EQ_2(_r, _m)) \ -+ R##_f0 |= _FP_WORK_STICKY; \ -+ } \ -+ } while (0) -+ -+ -+#define _FP_DIV_MEAT_2_gmp(fs, R, X, Y) \ -+ do { \ -+ _FP_W_TYPE _x[4], _y[2], _z[4]; \ -+ _y[0] = Y##_f0; _y[1] = Y##_f1; \ -+ _x[0] = _x[3] = 0; \ -+ if (_FP_FRAC_GT_2(X, Y)) \ -+ { \ -+ R##_e++; \ -+ _x[1] = (X##_f0 << (_FP_WFRACBITS_##fs-1 - _FP_W_TYPE_SIZE) | \ -+ X##_f1 >> (_FP_W_TYPE_SIZE - \ -+ (_FP_WFRACBITS_##fs-1 - _FP_W_TYPE_SIZE))); \ -+ _x[2] = X##_f1 << (_FP_WFRACBITS_##fs-1 - _FP_W_TYPE_SIZE); \ -+ } \ -+ else \ -+ { \ -+ _x[1] = (X##_f0 << (_FP_WFRACBITS_##fs - _FP_W_TYPE_SIZE) | \ -+ X##_f1 >> (_FP_W_TYPE_SIZE - \ -+ (_FP_WFRACBITS_##fs - _FP_W_TYPE_SIZE))); \ -+ _x[2] = X##_f1 << (_FP_WFRACBITS_##fs - _FP_W_TYPE_SIZE); \ -+ } \ -+ \ -+ (void) mpn_divrem (_z, 0, _x, 4, _y, 2); \ -+ R##_f1 = _z[1]; \ -+ R##_f0 = _z[0] | ((_x[0] | _x[1]) != 0); \ -+ } while (0) -+ -+ -+/* -+ * Square root algorithms: -+ * We have just one right now, maybe Newton approximation -+ * should be added for those machines where division is fast. -+ */ -+ -+#define _FP_SQRT_MEAT_2(R, S, T, X, q) \ -+ do { \ -+ while (q) \ -+ { \ -+ T##_f1 = S##_f1 + q; \ -+ if (T##_f1 <= X##_f1) \ -+ { \ -+ S##_f1 = T##_f1 + q; \ -+ X##_f1 -= T##_f1; \ -+ R##_f1 += q; \ -+ } \ -+ _FP_FRAC_SLL_2(X, 1); \ -+ q >>= 1; \ -+ } \ -+ q = (_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE - 1); \ -+ while (q != _FP_WORK_ROUND) \ -+ { \ -+ T##_f0 = S##_f0 + q; \ -+ T##_f1 = S##_f1; \ -+ if (T##_f1 < X##_f1 || \ -+ (T##_f1 == X##_f1 && T##_f0 <= X##_f0)) \ -+ { \ -+ S##_f0 = T##_f0 + q; \ -+ S##_f1 += (T##_f0 > S##_f0); \ -+ _FP_FRAC_DEC_2(X, T); \ -+ R##_f0 += q; \ -+ } \ -+ _FP_FRAC_SLL_2(X, 1); \ -+ q >>= 1; \ -+ } \ -+ if (X##_f0 | X##_f1) \ -+ { \ -+ if (S##_f1 < X##_f1 || \ -+ (S##_f1 == X##_f1 && S##_f0 < X##_f0)) \ -+ R##_f0 |= _FP_WORK_ROUND; \ -+ R##_f0 |= _FP_WORK_STICKY; \ -+ } \ -+ } while (0) -+ -+ -+/* -+ * Assembly/disassembly for converting to/from integral types. -+ * No shifting or overflow handled here. -+ */ -+ -+#define _FP_FRAC_ASSEMBLE_2(r, X, rsize) \ -+(void)((rsize <= _FP_W_TYPE_SIZE) \ -+ ? ({ r = X##_f0; }) \ -+ : ({ \ -+ r = X##_f1; \ -+ r <<= _FP_W_TYPE_SIZE; \ -+ r += X##_f0; \ -+ })) -+ -+#define _FP_FRAC_DISASSEMBLE_2(X, r, rsize) \ -+ do { \ -+ X##_f0 = r; \ -+ X##_f1 = (rsize <= _FP_W_TYPE_SIZE ? 0 : r >> _FP_W_TYPE_SIZE); \ -+ } while (0) -+ -+/* -+ * Convert FP values between word sizes -+ */ -+ -+#define _FP_FRAC_COPY_1_2(D, S) (D##_f = S##_f0) -+ -+#define _FP_FRAC_COPY_2_1(D, S) ((D##_f0 = S##_f), (D##_f1 = 0)) -+ -+#define _FP_FRAC_COPY_2_2(D,S) _FP_FRAC_COPY_2(D,S) -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/op-4.h uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/op-4.h ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/op-4.h 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/op-4.h 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,688 @@ -+/* Software floating-point emulation. -+ Basic four-word fraction declaration and manipulation. -+ Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com), -+ Jakub Jelinek (jj@ultra.linux.cz), -+ David S. Miller (davem@redhat.com) and -+ Peter Maydell (pmaydell@chiark.greenend.org.uk). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ In addition to the permissions in the GNU Lesser General Public -+ License, the Free Software Foundation gives you unlimited -+ permission to link the compiled version of this file into -+ combinations with other programs, and to distribute those -+ combinations without any restriction coming from the use of this -+ file. (The Lesser General Public License restrictions do apply in -+ other respects; for example, they cover modification of the file, -+ and distribution when not linked into a combine executable.) -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, -+ MA 02110-1301, USA. */ -+ -+#define _FP_FRAC_DECL_4(X) _FP_W_TYPE X##_f[4] -+#define _FP_FRAC_COPY_4(D,S) \ -+ (D##_f[0] = S##_f[0], D##_f[1] = S##_f[1], \ -+ D##_f[2] = S##_f[2], D##_f[3] = S##_f[3]) -+#define _FP_FRAC_SET_4(X,I) __FP_FRAC_SET_4(X, I) -+#define _FP_FRAC_HIGH_4(X) (X##_f[3]) -+#define _FP_FRAC_LOW_4(X) (X##_f[0]) -+#define _FP_FRAC_WORD_4(X,w) (X##_f[w]) -+ -+#define _FP_FRAC_SLL_4(X,N) \ -+ do { \ -+ _FP_I_TYPE _up, _down, _skip, _i; \ -+ _skip = (N) / _FP_W_TYPE_SIZE; \ -+ _up = (N) % _FP_W_TYPE_SIZE; \ -+ _down = _FP_W_TYPE_SIZE - _up; \ -+ if (!_up) \ -+ for (_i = 3; _i >= _skip; --_i) \ -+ X##_f[_i] = X##_f[_i-_skip]; \ -+ else \ -+ { \ -+ for (_i = 3; _i > _skip; --_i) \ -+ X##_f[_i] = X##_f[_i-_skip] << _up \ -+ | X##_f[_i-_skip-1] >> _down; \ -+ X##_f[_i--] = X##_f[0] << _up; \ -+ } \ -+ for (; _i >= 0; --_i) \ -+ X##_f[_i] = 0; \ -+ } while (0) -+ -+/* This one was broken too */ -+#define _FP_FRAC_SRL_4(X,N) \ -+ do { \ -+ _FP_I_TYPE _up, _down, _skip, _i; \ -+ _skip = (N) / _FP_W_TYPE_SIZE; \ -+ _down = (N) % _FP_W_TYPE_SIZE; \ -+ _up = _FP_W_TYPE_SIZE - _down; \ -+ if (!_down) \ -+ for (_i = 0; _i <= 3-_skip; ++_i) \ -+ X##_f[_i] = X##_f[_i+_skip]; \ -+ else \ -+ { \ -+ for (_i = 0; _i < 3-_skip; ++_i) \ -+ X##_f[_i] = X##_f[_i+_skip] >> _down \ -+ | X##_f[_i+_skip+1] << _up; \ -+ X##_f[_i++] = X##_f[3] >> _down; \ -+ } \ -+ for (; _i < 4; ++_i) \ -+ X##_f[_i] = 0; \ -+ } while (0) -+ -+ -+/* Right shift with sticky-lsb. -+ * What this actually means is that we do a standard right-shift, -+ * but that if any of the bits that fall off the right hand side -+ * were one then we always set the LSbit. -+ */ -+#define _FP_FRAC_SRST_4(X,S,N,size) \ -+ do { \ -+ _FP_I_TYPE _up, _down, _skip, _i; \ -+ _FP_W_TYPE _s; \ -+ _skip = (N) / _FP_W_TYPE_SIZE; \ -+ _down = (N) % _FP_W_TYPE_SIZE; \ -+ _up = _FP_W_TYPE_SIZE - _down; \ -+ for (_s = _i = 0; _i < _skip; ++_i) \ -+ _s |= X##_f[_i]; \ -+ if (!_down) \ -+ for (_i = 0; _i <= 3-_skip; ++_i) \ -+ X##_f[_i] = X##_f[_i+_skip]; \ -+ else \ -+ { \ -+ _s |= X##_f[_i] << _up; \ -+ for (_i = 0; _i < 3-_skip; ++_i) \ -+ X##_f[_i] = X##_f[_i+_skip] >> _down \ -+ | X##_f[_i+_skip+1] << _up; \ -+ X##_f[_i++] = X##_f[3] >> _down; \ -+ } \ -+ for (; _i < 4; ++_i) \ -+ X##_f[_i] = 0; \ -+ S = (_s != 0); \ -+ } while (0) -+ -+#define _FP_FRAC_SRS_4(X,N,size) \ -+ do { \ -+ int _sticky; \ -+ _FP_FRAC_SRST_4(X, _sticky, N, size); \ -+ X##_f[0] |= _sticky; \ -+ } while (0) -+ -+#define _FP_FRAC_ADD_4(R,X,Y) \ -+ __FP_FRAC_ADD_4(R##_f[3], R##_f[2], R##_f[1], R##_f[0], \ -+ X##_f[3], X##_f[2], X##_f[1], X##_f[0], \ -+ Y##_f[3], Y##_f[2], Y##_f[1], Y##_f[0]) -+ -+#define _FP_FRAC_SUB_4(R,X,Y) \ -+ __FP_FRAC_SUB_4(R##_f[3], R##_f[2], R##_f[1], R##_f[0], \ -+ X##_f[3], X##_f[2], X##_f[1], X##_f[0], \ -+ Y##_f[3], Y##_f[2], Y##_f[1], Y##_f[0]) -+ -+#define _FP_FRAC_DEC_4(X,Y) \ -+ __FP_FRAC_DEC_4(X##_f[3], X##_f[2], X##_f[1], X##_f[0], \ -+ Y##_f[3], Y##_f[2], Y##_f[1], Y##_f[0]) -+ -+#define _FP_FRAC_ADDI_4(X,I) \ -+ __FP_FRAC_ADDI_4(X##_f[3], X##_f[2], X##_f[1], X##_f[0], I) -+ -+#define _FP_ZEROFRAC_4 0,0,0,0 -+#define _FP_MINFRAC_4 0,0,0,1 -+#define _FP_MAXFRAC_4 (~(_FP_WS_TYPE)0), (~(_FP_WS_TYPE)0), (~(_FP_WS_TYPE)0), (~(_FP_WS_TYPE)0) -+ -+#define _FP_FRAC_ZEROP_4(X) ((X##_f[0] | X##_f[1] | X##_f[2] | X##_f[3]) == 0) -+#define _FP_FRAC_NEGP_4(X) ((_FP_WS_TYPE)X##_f[3] < 0) -+#define _FP_FRAC_OVERP_4(fs,X) (_FP_FRAC_HIGH_##fs(X) & _FP_OVERFLOW_##fs) -+#define _FP_FRAC_CLEAR_OVERP_4(fs,X) (_FP_FRAC_HIGH_##fs(X) &= ~_FP_OVERFLOW_##fs) -+ -+#define _FP_FRAC_EQ_4(X,Y) \ -+ (X##_f[0] == Y##_f[0] && X##_f[1] == Y##_f[1] \ -+ && X##_f[2] == Y##_f[2] && X##_f[3] == Y##_f[3]) -+ -+#define _FP_FRAC_GT_4(X,Y) \ -+ (X##_f[3] > Y##_f[3] || \ -+ (X##_f[3] == Y##_f[3] && (X##_f[2] > Y##_f[2] || \ -+ (X##_f[2] == Y##_f[2] && (X##_f[1] > Y##_f[1] || \ -+ (X##_f[1] == Y##_f[1] && X##_f[0] > Y##_f[0]) \ -+ )) \ -+ )) \ -+ ) -+ -+#define _FP_FRAC_GE_4(X,Y) \ -+ (X##_f[3] > Y##_f[3] || \ -+ (X##_f[3] == Y##_f[3] && (X##_f[2] > Y##_f[2] || \ -+ (X##_f[2] == Y##_f[2] && (X##_f[1] > Y##_f[1] || \ -+ (X##_f[1] == Y##_f[1] && X##_f[0] >= Y##_f[0]) \ -+ )) \ -+ )) \ -+ ) -+ -+ -+#define _FP_FRAC_CLZ_4(R,X) \ -+ do { \ -+ if (X##_f[3]) \ -+ { \ -+ __FP_CLZ(R,X##_f[3]); \ -+ } \ -+ else if (X##_f[2]) \ -+ { \ -+ __FP_CLZ(R,X##_f[2]); \ -+ R += _FP_W_TYPE_SIZE; \ -+ } \ -+ else if (X##_f[1]) \ -+ { \ -+ __FP_CLZ(R,X##_f[1]); \ -+ R += _FP_W_TYPE_SIZE*2; \ -+ } \ -+ else \ -+ { \ -+ __FP_CLZ(R,X##_f[0]); \ -+ R += _FP_W_TYPE_SIZE*3; \ -+ } \ -+ } while(0) -+ -+ -+#define _FP_UNPACK_RAW_4(fs, X, val) \ -+ do { \ -+ union _FP_UNION_##fs _flo; _flo.flt = (val); \ -+ X##_f[0] = _flo.bits.frac0; \ -+ X##_f[1] = _flo.bits.frac1; \ -+ X##_f[2] = _flo.bits.frac2; \ -+ X##_f[3] = _flo.bits.frac3; \ -+ X##_e = _flo.bits.exp; \ -+ X##_s = _flo.bits.sign; \ -+ } while (0) -+ -+#define _FP_UNPACK_RAW_4_P(fs, X, val) \ -+ do { \ -+ union _FP_UNION_##fs *_flo = \ -+ (union _FP_UNION_##fs *)(val); \ -+ \ -+ X##_f[0] = _flo->bits.frac0; \ -+ X##_f[1] = _flo->bits.frac1; \ -+ X##_f[2] = _flo->bits.frac2; \ -+ X##_f[3] = _flo->bits.frac3; \ -+ X##_e = _flo->bits.exp; \ -+ X##_s = _flo->bits.sign; \ -+ } while (0) -+ -+#define _FP_PACK_RAW_4(fs, val, X) \ -+ do { \ -+ union _FP_UNION_##fs _flo; \ -+ _flo.bits.frac0 = X##_f[0]; \ -+ _flo.bits.frac1 = X##_f[1]; \ -+ _flo.bits.frac2 = X##_f[2]; \ -+ _flo.bits.frac3 = X##_f[3]; \ -+ _flo.bits.exp = X##_e; \ -+ _flo.bits.sign = X##_s; \ -+ (val) = _flo.flt; \ -+ } while (0) -+ -+#define _FP_PACK_RAW_4_P(fs, val, X) \ -+ do { \ -+ union _FP_UNION_##fs *_flo = \ -+ (union _FP_UNION_##fs *)(val); \ -+ \ -+ _flo->bits.frac0 = X##_f[0]; \ -+ _flo->bits.frac1 = X##_f[1]; \ -+ _flo->bits.frac2 = X##_f[2]; \ -+ _flo->bits.frac3 = X##_f[3]; \ -+ _flo->bits.exp = X##_e; \ -+ _flo->bits.sign = X##_s; \ -+ } while (0) -+ -+/* -+ * Multiplication algorithms: -+ */ -+ -+/* Given a 1W * 1W => 2W primitive, do the extended multiplication. */ -+ -+#define _FP_MUL_MEAT_4_wide(wfracbits, R, X, Y, doit) \ -+ do { \ -+ _FP_FRAC_DECL_8(_z); _FP_FRAC_DECL_2(_b); _FP_FRAC_DECL_2(_c); \ -+ _FP_FRAC_DECL_2(_d); _FP_FRAC_DECL_2(_e); _FP_FRAC_DECL_2(_f); \ -+ \ -+ doit(_FP_FRAC_WORD_8(_z,1), _FP_FRAC_WORD_8(_z,0), X##_f[0], Y##_f[0]); \ -+ doit(_b_f1, _b_f0, X##_f[0], Y##_f[1]); \ -+ doit(_c_f1, _c_f0, X##_f[1], Y##_f[0]); \ -+ doit(_d_f1, _d_f0, X##_f[1], Y##_f[1]); \ -+ doit(_e_f1, _e_f0, X##_f[0], Y##_f[2]); \ -+ doit(_f_f1, _f_f0, X##_f[2], Y##_f[0]); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,3),_FP_FRAC_WORD_8(_z,2), \ -+ _FP_FRAC_WORD_8(_z,1), 0,_b_f1,_b_f0, \ -+ 0,0,_FP_FRAC_WORD_8(_z,1)); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,3),_FP_FRAC_WORD_8(_z,2), \ -+ _FP_FRAC_WORD_8(_z,1), 0,_c_f1,_c_f0, \ -+ _FP_FRAC_WORD_8(_z,3),_FP_FRAC_WORD_8(_z,2), \ -+ _FP_FRAC_WORD_8(_z,1)); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,4),_FP_FRAC_WORD_8(_z,3), \ -+ _FP_FRAC_WORD_8(_z,2), 0,_d_f1,_d_f0, \ -+ 0,_FP_FRAC_WORD_8(_z,3),_FP_FRAC_WORD_8(_z,2)); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,4),_FP_FRAC_WORD_8(_z,3), \ -+ _FP_FRAC_WORD_8(_z,2), 0,_e_f1,_e_f0, \ -+ _FP_FRAC_WORD_8(_z,4),_FP_FRAC_WORD_8(_z,3), \ -+ _FP_FRAC_WORD_8(_z,2)); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,4),_FP_FRAC_WORD_8(_z,3), \ -+ _FP_FRAC_WORD_8(_z,2), 0,_f_f1,_f_f0, \ -+ _FP_FRAC_WORD_8(_z,4),_FP_FRAC_WORD_8(_z,3), \ -+ _FP_FRAC_WORD_8(_z,2)); \ -+ doit(_b_f1, _b_f0, X##_f[0], Y##_f[3]); \ -+ doit(_c_f1, _c_f0, X##_f[3], Y##_f[0]); \ -+ doit(_d_f1, _d_f0, X##_f[1], Y##_f[2]); \ -+ doit(_e_f1, _e_f0, X##_f[2], Y##_f[1]); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,5),_FP_FRAC_WORD_8(_z,4), \ -+ _FP_FRAC_WORD_8(_z,3), 0,_b_f1,_b_f0, \ -+ 0,_FP_FRAC_WORD_8(_z,4),_FP_FRAC_WORD_8(_z,3)); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,5),_FP_FRAC_WORD_8(_z,4), \ -+ _FP_FRAC_WORD_8(_z,3), 0,_c_f1,_c_f0, \ -+ _FP_FRAC_WORD_8(_z,5),_FP_FRAC_WORD_8(_z,4), \ -+ _FP_FRAC_WORD_8(_z,3)); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,5),_FP_FRAC_WORD_8(_z,4), \ -+ _FP_FRAC_WORD_8(_z,3), 0,_d_f1,_d_f0, \ -+ _FP_FRAC_WORD_8(_z,5),_FP_FRAC_WORD_8(_z,4), \ -+ _FP_FRAC_WORD_8(_z,3)); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,5),_FP_FRAC_WORD_8(_z,4), \ -+ _FP_FRAC_WORD_8(_z,3), 0,_e_f1,_e_f0, \ -+ _FP_FRAC_WORD_8(_z,5),_FP_FRAC_WORD_8(_z,4), \ -+ _FP_FRAC_WORD_8(_z,3)); \ -+ doit(_b_f1, _b_f0, X##_f[2], Y##_f[2]); \ -+ doit(_c_f1, _c_f0, X##_f[1], Y##_f[3]); \ -+ doit(_d_f1, _d_f0, X##_f[3], Y##_f[1]); \ -+ doit(_e_f1, _e_f0, X##_f[2], Y##_f[3]); \ -+ doit(_f_f1, _f_f0, X##_f[3], Y##_f[2]); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,6),_FP_FRAC_WORD_8(_z,5), \ -+ _FP_FRAC_WORD_8(_z,4), 0,_b_f1,_b_f0, \ -+ 0,_FP_FRAC_WORD_8(_z,5),_FP_FRAC_WORD_8(_z,4)); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,6),_FP_FRAC_WORD_8(_z,5), \ -+ _FP_FRAC_WORD_8(_z,4), 0,_c_f1,_c_f0, \ -+ _FP_FRAC_WORD_8(_z,6),_FP_FRAC_WORD_8(_z,5), \ -+ _FP_FRAC_WORD_8(_z,4)); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,6),_FP_FRAC_WORD_8(_z,5), \ -+ _FP_FRAC_WORD_8(_z,4), 0,_d_f1,_d_f0, \ -+ _FP_FRAC_WORD_8(_z,6),_FP_FRAC_WORD_8(_z,5), \ -+ _FP_FRAC_WORD_8(_z,4)); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,7),_FP_FRAC_WORD_8(_z,6), \ -+ _FP_FRAC_WORD_8(_z,5), 0,_e_f1,_e_f0, \ -+ 0,_FP_FRAC_WORD_8(_z,6),_FP_FRAC_WORD_8(_z,5)); \ -+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,7),_FP_FRAC_WORD_8(_z,6), \ -+ _FP_FRAC_WORD_8(_z,5), 0,_f_f1,_f_f0, \ -+ _FP_FRAC_WORD_8(_z,7),_FP_FRAC_WORD_8(_z,6), \ -+ _FP_FRAC_WORD_8(_z,5)); \ -+ doit(_b_f1, _b_f0, X##_f[3], Y##_f[3]); \ -+ __FP_FRAC_ADD_2(_FP_FRAC_WORD_8(_z,7),_FP_FRAC_WORD_8(_z,6), \ -+ _b_f1,_b_f0, \ -+ _FP_FRAC_WORD_8(_z,7),_FP_FRAC_WORD_8(_z,6)); \ -+ \ -+ /* Normalize since we know where the msb of the multiplicands \ -+ were (bit B), we know that the msb of the of the product is \ -+ at either 2B or 2B-1. */ \ -+ _FP_FRAC_SRS_8(_z, wfracbits-1, 2*wfracbits); \ -+ __FP_FRAC_SET_4(R, _FP_FRAC_WORD_8(_z,3), _FP_FRAC_WORD_8(_z,2), \ -+ _FP_FRAC_WORD_8(_z,1), _FP_FRAC_WORD_8(_z,0)); \ -+ } while (0) -+ -+#define _FP_MUL_MEAT_4_gmp(wfracbits, R, X, Y) \ -+ do { \ -+ _FP_FRAC_DECL_8(_z); \ -+ \ -+ mpn_mul_n(_z_f, _x_f, _y_f, 4); \ -+ \ -+ /* Normalize since we know where the msb of the multiplicands \ -+ were (bit B), we know that the msb of the of the product is \ -+ at either 2B or 2B-1. */ \ -+ _FP_FRAC_SRS_8(_z, wfracbits-1, 2*wfracbits); \ -+ __FP_FRAC_SET_4(R, _FP_FRAC_WORD_8(_z,3), _FP_FRAC_WORD_8(_z,2), \ -+ _FP_FRAC_WORD_8(_z,1), _FP_FRAC_WORD_8(_z,0)); \ -+ } while (0) -+ -+/* -+ * Helper utility for _FP_DIV_MEAT_4_udiv: -+ * pppp = m * nnn -+ */ -+#define umul_ppppmnnn(p3,p2,p1,p0,m,n2,n1,n0) \ -+ do { \ -+ UWtype _t; \ -+ umul_ppmm(p1,p0,m,n0); \ -+ umul_ppmm(p2,_t,m,n1); \ -+ __FP_FRAC_ADDI_2(p2,p1,_t); \ -+ umul_ppmm(p3,_t,m,n2); \ -+ __FP_FRAC_ADDI_2(p3,p2,_t); \ -+ } while (0) -+ -+/* -+ * Division algorithms: -+ */ -+ -+#define _FP_DIV_MEAT_4_udiv(fs, R, X, Y) \ -+ do { \ -+ int _i; \ -+ _FP_FRAC_DECL_4(_n); _FP_FRAC_DECL_4(_m); \ -+ _FP_FRAC_SET_4(_n, _FP_ZEROFRAC_4); \ -+ if (_FP_FRAC_GT_4(X, Y)) \ -+ { \ -+ _n_f[3] = X##_f[0] << (_FP_W_TYPE_SIZE - 1); \ -+ _FP_FRAC_SRL_4(X, 1); \ -+ } \ -+ else \ -+ R##_e--; \ -+ \ -+ /* Normalize, i.e. make the most significant bit of the \ -+ denominator set. */ \ -+ _FP_FRAC_SLL_4(Y, _FP_WFRACXBITS_##fs); \ -+ \ -+ for (_i = 3; ; _i--) \ -+ { \ -+ if (X##_f[3] == Y##_f[3]) \ -+ { \ -+ /* This is a special case, not an optimization \ -+ (X##_f[3]/Y##_f[3] would not fit into UWtype). \ -+ As X## is guaranteed to be < Y, R##_f[_i] can be either \ -+ (UWtype)-1 or (UWtype)-2. */ \ -+ R##_f[_i] = -1; \ -+ if (!_i) \ -+ break; \ -+ __FP_FRAC_SUB_4(X##_f[3], X##_f[2], X##_f[1], X##_f[0], \ -+ Y##_f[2], Y##_f[1], Y##_f[0], 0, \ -+ X##_f[2], X##_f[1], X##_f[0], _n_f[_i]); \ -+ _FP_FRAC_SUB_4(X, Y, X); \ -+ if (X##_f[3] > Y##_f[3]) \ -+ { \ -+ R##_f[_i] = -2; \ -+ _FP_FRAC_ADD_4(X, Y, X); \ -+ } \ -+ } \ -+ else \ -+ { \ -+ udiv_qrnnd(R##_f[_i], X##_f[3], X##_f[3], X##_f[2], Y##_f[3]); \ -+ umul_ppppmnnn(_m_f[3], _m_f[2], _m_f[1], _m_f[0], \ -+ R##_f[_i], Y##_f[2], Y##_f[1], Y##_f[0]); \ -+ X##_f[2] = X##_f[1]; \ -+ X##_f[1] = X##_f[0]; \ -+ X##_f[0] = _n_f[_i]; \ -+ if (_FP_FRAC_GT_4(_m, X)) \ -+ { \ -+ R##_f[_i]--; \ -+ _FP_FRAC_ADD_4(X, Y, X); \ -+ if (_FP_FRAC_GE_4(X, Y) && _FP_FRAC_GT_4(_m, X)) \ -+ { \ -+ R##_f[_i]--; \ -+ _FP_FRAC_ADD_4(X, Y, X); \ -+ } \ -+ } \ -+ _FP_FRAC_DEC_4(X, _m); \ -+ if (!_i) \ -+ { \ -+ if (!_FP_FRAC_EQ_4(X, _m)) \ -+ R##_f[0] |= _FP_WORK_STICKY; \ -+ break; \ -+ } \ -+ } \ -+ } \ -+ } while (0) -+ -+ -+/* -+ * Square root algorithms: -+ * We have just one right now, maybe Newton approximation -+ * should be added for those machines where division is fast. -+ */ -+ -+#define _FP_SQRT_MEAT_4(R, S, T, X, q) \ -+ do { \ -+ while (q) \ -+ { \ -+ T##_f[3] = S##_f[3] + q; \ -+ if (T##_f[3] <= X##_f[3]) \ -+ { \ -+ S##_f[3] = T##_f[3] + q; \ -+ X##_f[3] -= T##_f[3]; \ -+ R##_f[3] += q; \ -+ } \ -+ _FP_FRAC_SLL_4(X, 1); \ -+ q >>= 1; \ -+ } \ -+ q = (_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE - 1); \ -+ while (q) \ -+ { \ -+ T##_f[2] = S##_f[2] + q; \ -+ T##_f[3] = S##_f[3]; \ -+ if (T##_f[3] < X##_f[3] || \ -+ (T##_f[3] == X##_f[3] && T##_f[2] <= X##_f[2])) \ -+ { \ -+ S##_f[2] = T##_f[2] + q; \ -+ S##_f[3] += (T##_f[2] > S##_f[2]); \ -+ __FP_FRAC_DEC_2(X##_f[3], X##_f[2], \ -+ T##_f[3], T##_f[2]); \ -+ R##_f[2] += q; \ -+ } \ -+ _FP_FRAC_SLL_4(X, 1); \ -+ q >>= 1; \ -+ } \ -+ q = (_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE - 1); \ -+ while (q) \ -+ { \ -+ T##_f[1] = S##_f[1] + q; \ -+ T##_f[2] = S##_f[2]; \ -+ T##_f[3] = S##_f[3]; \ -+ if (T##_f[3] < X##_f[3] || \ -+ (T##_f[3] == X##_f[3] && (T##_f[2] < X##_f[2] || \ -+ (T##_f[2] == X##_f[2] && T##_f[1] <= X##_f[1])))) \ -+ { \ -+ S##_f[1] = T##_f[1] + q; \ -+ S##_f[2] += (T##_f[1] > S##_f[1]); \ -+ S##_f[3] += (T##_f[2] > S##_f[2]); \ -+ __FP_FRAC_DEC_3(X##_f[3], X##_f[2], X##_f[1], \ -+ T##_f[3], T##_f[2], T##_f[1]); \ -+ R##_f[1] += q; \ -+ } \ -+ _FP_FRAC_SLL_4(X, 1); \ -+ q >>= 1; \ -+ } \ -+ q = (_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE - 1); \ -+ while (q != _FP_WORK_ROUND) \ -+ { \ -+ T##_f[0] = S##_f[0] + q; \ -+ T##_f[1] = S##_f[1]; \ -+ T##_f[2] = S##_f[2]; \ -+ T##_f[3] = S##_f[3]; \ -+ if (_FP_FRAC_GE_4(X,T)) \ -+ { \ -+ S##_f[0] = T##_f[0] + q; \ -+ S##_f[1] += (T##_f[0] > S##_f[0]); \ -+ S##_f[2] += (T##_f[1] > S##_f[1]); \ -+ S##_f[3] += (T##_f[2] > S##_f[2]); \ -+ _FP_FRAC_DEC_4(X, T); \ -+ R##_f[0] += q; \ -+ } \ -+ _FP_FRAC_SLL_4(X, 1); \ -+ q >>= 1; \ -+ } \ -+ if (!_FP_FRAC_ZEROP_4(X)) \ -+ { \ -+ if (_FP_FRAC_GT_4(X,S)) \ -+ R##_f[0] |= _FP_WORK_ROUND; \ -+ R##_f[0] |= _FP_WORK_STICKY; \ -+ } \ -+ } while (0) -+ -+ -+/* -+ * Internals -+ */ -+ -+#define __FP_FRAC_SET_4(X,I3,I2,I1,I0) \ -+ (X##_f[3] = I3, X##_f[2] = I2, X##_f[1] = I1, X##_f[0] = I0) -+ -+#ifndef __FP_FRAC_ADD_3 -+#define __FP_FRAC_ADD_3(r2,r1,r0,x2,x1,x0,y2,y1,y0) \ -+ do { \ -+ _FP_W_TYPE _c1, _c2; \ -+ r0 = x0 + y0; \ -+ _c1 = r0 < x0; \ -+ r1 = x1 + y1; \ -+ _c2 = r1 < x1; \ -+ r1 += _c1; \ -+ _c2 |= r1 < _c1; \ -+ r2 = x2 + y2 + _c2; \ -+ } while (0) -+#endif -+ -+#ifndef __FP_FRAC_ADD_4 -+#define __FP_FRAC_ADD_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \ -+ do { \ -+ _FP_W_TYPE _c1, _c2, _c3; \ -+ r0 = x0 + y0; \ -+ _c1 = r0 < x0; \ -+ r1 = x1 + y1; \ -+ _c2 = r1 < x1; \ -+ r1 += _c1; \ -+ _c2 |= r1 < _c1; \ -+ r2 = x2 + y2; \ -+ _c3 = r2 < x2; \ -+ r2 += _c2; \ -+ _c3 |= r2 < _c2; \ -+ r3 = x3 + y3 + _c3; \ -+ } while (0) -+#endif -+ -+#ifndef __FP_FRAC_SUB_3 -+#define __FP_FRAC_SUB_3(r2,r1,r0,x2,x1,x0,y2,y1,y0) \ -+ do { \ -+ _FP_W_TYPE _c1, _c2; \ -+ r0 = x0 - y0; \ -+ _c1 = r0 > x0; \ -+ r1 = x1 - y1; \ -+ _c2 = r1 > x1; \ -+ r1 -= _c1; \ -+ _c2 |= _c1 && (y1 == x1); \ -+ r2 = x2 - y2 - _c2; \ -+ } while (0) -+#endif -+ -+#ifndef __FP_FRAC_SUB_4 -+#define __FP_FRAC_SUB_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \ -+ do { \ -+ _FP_W_TYPE _c1, _c2, _c3; \ -+ r0 = x0 - y0; \ -+ _c1 = r0 > x0; \ -+ r1 = x1 - y1; \ -+ _c2 = r1 > x1; \ -+ r1 -= _c1; \ -+ _c2 |= _c1 && (y1 == x1); \ -+ r2 = x2 - y2; \ -+ _c3 = r2 > x2; \ -+ r2 -= _c2; \ -+ _c3 |= _c2 && (y2 == x2); \ -+ r3 = x3 - y3 - _c3; \ -+ } while (0) -+#endif -+ -+#ifndef __FP_FRAC_DEC_3 -+#define __FP_FRAC_DEC_3(x2,x1,x0,y2,y1,y0) \ -+ do { \ -+ UWtype _t0, _t1, _t2; \ -+ _t0 = x0, _t1 = x1, _t2 = x2; \ -+ __FP_FRAC_SUB_3 (x2, x1, x0, _t2, _t1, _t0, y2, y1, y0); \ -+ } while (0) -+#endif -+ -+#ifndef __FP_FRAC_DEC_4 -+#define __FP_FRAC_DEC_4(x3,x2,x1,x0,y3,y2,y1,y0) \ -+ do { \ -+ UWtype _t0, _t1, _t2, _t3; \ -+ _t0 = x0, _t1 = x1, _t2 = x2, _t3 = x3; \ -+ __FP_FRAC_SUB_4 (x3,x2,x1,x0,_t3,_t2,_t1,_t0, y3,y2,y1,y0); \ -+ } while (0) -+#endif -+ -+#ifndef __FP_FRAC_ADDI_4 -+#define __FP_FRAC_ADDI_4(x3,x2,x1,x0,i) \ -+ do { \ -+ UWtype _t; \ -+ _t = ((x0 += i) < i); \ -+ x1 += _t; _t = (x1 < _t); \ -+ x2 += _t; _t = (x2 < _t); \ -+ x3 += _t; \ -+ } while (0) -+#endif -+ -+/* Convert FP values between word sizes. This appears to be more -+ * complicated than I'd have expected it to be, so these might be -+ * wrong... These macros are in any case somewhat bogus because they -+ * use information about what various FRAC_n variables look like -+ * internally [eg, that 2 word vars are X_f0 and x_f1]. But so do -+ * the ones in op-2.h and op-1.h. -+ */ -+#define _FP_FRAC_COPY_1_4(D, S) (D##_f = S##_f[0]) -+ -+#define _FP_FRAC_COPY_2_4(D, S) \ -+do { \ -+ D##_f0 = S##_f[0]; \ -+ D##_f1 = S##_f[1]; \ -+} while (0) -+ -+/* Assembly/disassembly for converting to/from integral types. -+ * No shifting or overflow handled here. -+ */ -+/* Put the FP value X into r, which is an integer of size rsize. */ -+#define _FP_FRAC_ASSEMBLE_4(r, X, rsize) \ -+ do { \ -+ if (rsize <= _FP_W_TYPE_SIZE) \ -+ r = X##_f[0]; \ -+ else if (rsize <= 2*_FP_W_TYPE_SIZE) \ -+ { \ -+ r = X##_f[1]; \ -+ r <<= _FP_W_TYPE_SIZE; \ -+ r += X##_f[0]; \ -+ } \ -+ else \ -+ { \ -+ /* I'm feeling lazy so we deal with int == 3words (implausible)*/ \ -+ /* and int == 4words as a single case. */ \ -+ r = X##_f[3]; \ -+ r <<= _FP_W_TYPE_SIZE; \ -+ r += X##_f[2]; \ -+ r <<= _FP_W_TYPE_SIZE; \ -+ r += X##_f[1]; \ -+ r <<= _FP_W_TYPE_SIZE; \ -+ r += X##_f[0]; \ -+ } \ -+ } while (0) -+ -+/* "No disassemble Number Five!" */ -+/* move an integer of size rsize into X's fractional part. We rely on -+ * the _f[] array consisting of words of size _FP_W_TYPE_SIZE to avoid -+ * having to mask the values we store into it. -+ */ -+#define _FP_FRAC_DISASSEMBLE_4(X, r, rsize) \ -+ do { \ -+ X##_f[0] = r; \ -+ X##_f[1] = (rsize <= _FP_W_TYPE_SIZE ? 0 : r >> _FP_W_TYPE_SIZE); \ -+ X##_f[2] = (rsize <= 2*_FP_W_TYPE_SIZE ? 0 : r >> 2*_FP_W_TYPE_SIZE); \ -+ X##_f[3] = (rsize <= 3*_FP_W_TYPE_SIZE ? 0 : r >> 3*_FP_W_TYPE_SIZE); \ -+ } while (0); -+ -+#define _FP_FRAC_COPY_4_1(D, S) \ -+do { \ -+ D##_f[0] = S##_f; \ -+ D##_f[1] = D##_f[2] = D##_f[3] = 0; \ -+} while (0) -+ -+#define _FP_FRAC_COPY_4_2(D, S) \ -+do { \ -+ D##_f[0] = S##_f0; \ -+ D##_f[1] = S##_f1; \ -+ D##_f[2] = D##_f[3] = 0; \ -+} while (0) -+ -+#define _FP_FRAC_COPY_4_4(D,S) _FP_FRAC_COPY_4(D,S) -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/op-8.h uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/op-8.h ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/op-8.h 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/op-8.h 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,111 @@ -+/* Software floating-point emulation. -+ Basic eight-word fraction declaration and manipulation. -+ Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com), -+ Jakub Jelinek (jj@ultra.linux.cz) and -+ Peter Maydell (pmaydell@chiark.greenend.org.uk). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ In addition to the permissions in the GNU Lesser General Public -+ License, the Free Software Foundation gives you unlimited -+ permission to link the compiled version of this file into -+ combinations with other programs, and to distribute those -+ combinations without any restriction coming from the use of this -+ file. (The Lesser General Public License restrictions do apply in -+ other respects; for example, they cover modification of the file, -+ and distribution when not linked into a combine executable.) -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, -+ MA 02110-1301, USA. */ -+ -+/* We need just a few things from here for op-4, if we ever need some -+ other macros, they can be added. */ -+#define _FP_FRAC_DECL_8(X) _FP_W_TYPE X##_f[8] -+#define _FP_FRAC_HIGH_8(X) (X##_f[7]) -+#define _FP_FRAC_LOW_8(X) (X##_f[0]) -+#define _FP_FRAC_WORD_8(X,w) (X##_f[w]) -+ -+#define _FP_FRAC_SLL_8(X,N) \ -+ do { \ -+ _FP_I_TYPE _up, _down, _skip, _i; \ -+ _skip = (N) / _FP_W_TYPE_SIZE; \ -+ _up = (N) % _FP_W_TYPE_SIZE; \ -+ _down = _FP_W_TYPE_SIZE - _up; \ -+ if (!_up) \ -+ for (_i = 7; _i >= _skip; --_i) \ -+ X##_f[_i] = X##_f[_i-_skip]; \ -+ else \ -+ { \ -+ for (_i = 7; _i > _skip; --_i) \ -+ X##_f[_i] = X##_f[_i-_skip] << _up \ -+ | X##_f[_i-_skip-1] >> _down; \ -+ X##_f[_i--] = X##_f[0] << _up; \ -+ } \ -+ for (; _i >= 0; --_i) \ -+ X##_f[_i] = 0; \ -+ } while (0) -+ -+#define _FP_FRAC_SRL_8(X,N) \ -+ do { \ -+ _FP_I_TYPE _up, _down, _skip, _i; \ -+ _skip = (N) / _FP_W_TYPE_SIZE; \ -+ _down = (N) % _FP_W_TYPE_SIZE; \ -+ _up = _FP_W_TYPE_SIZE - _down; \ -+ if (!_down) \ -+ for (_i = 0; _i <= 7-_skip; ++_i) \ -+ X##_f[_i] = X##_f[_i+_skip]; \ -+ else \ -+ { \ -+ for (_i = 0; _i < 7-_skip; ++_i) \ -+ X##_f[_i] = X##_f[_i+_skip] >> _down \ -+ | X##_f[_i+_skip+1] << _up; \ -+ X##_f[_i++] = X##_f[7] >> _down; \ -+ } \ -+ for (; _i < 8; ++_i) \ -+ X##_f[_i] = 0; \ -+ } while (0) -+ -+ -+/* Right shift with sticky-lsb. -+ * What this actually means is that we do a standard right-shift, -+ * but that if any of the bits that fall off the right hand side -+ * were one then we always set the LSbit. -+ */ -+#define _FP_FRAC_SRS_8(X,N,size) \ -+ do { \ -+ _FP_I_TYPE _up, _down, _skip, _i; \ -+ _FP_W_TYPE _s; \ -+ _skip = (N) / _FP_W_TYPE_SIZE; \ -+ _down = (N) % _FP_W_TYPE_SIZE; \ -+ _up = _FP_W_TYPE_SIZE - _down; \ -+ for (_s = _i = 0; _i < _skip; ++_i) \ -+ _s |= X##_f[_i]; \ -+ if (!_down) \ -+ for (_i = 0; _i <= 7-_skip; ++_i) \ -+ X##_f[_i] = X##_f[_i+_skip]; \ -+ else \ -+ { \ -+ _s |= X##_f[_i] << _up; \ -+ for (_i = 0; _i < 7-_skip; ++_i) \ -+ X##_f[_i] = X##_f[_i+_skip] >> _down \ -+ | X##_f[_i+_skip+1] << _up; \ -+ X##_f[_i++] = X##_f[7] >> _down; \ -+ } \ -+ for (; _i < 8; ++_i) \ -+ X##_f[_i] = 0; \ -+ /* don't fix the LSB until the very end when we're sure f[0] is stable */ \ -+ X##_f[0] |= (_s != 0); \ -+ } while (0) -+ -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/op-common.h uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/op-common.h ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/op-common.h 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/op-common.h 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,1359 @@ -+/* Software floating-point emulation. Common operations. -+ Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com), -+ Jakub Jelinek (jj@ultra.linux.cz), -+ David S. Miller (davem@redhat.com) and -+ Peter Maydell (pmaydell@chiark.greenend.org.uk). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ In addition to the permissions in the GNU Lesser General Public -+ License, the Free Software Foundation gives you unlimited -+ permission to link the compiled version of this file into -+ combinations with other programs, and to distribute those -+ combinations without any restriction coming from the use of this -+ file. (The Lesser General Public License restrictions do apply in -+ other respects; for example, they cover modification of the file, -+ and distribution when not linked into a combine executable.) -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, -+ MA 02110-1301, USA. */ -+ -+#define _FP_DECL(wc, X) \ -+ _FP_I_TYPE X##_c __attribute__((unused)), X##_s, X##_e; \ -+ _FP_FRAC_DECL_##wc(X) -+ -+/* -+ * Finish truely unpacking a native fp value by classifying the kind -+ * of fp value and normalizing both the exponent and the fraction. -+ */ -+ -+#define _FP_UNPACK_CANONICAL(fs, wc, X) \ -+do { \ -+ switch (X##_e) \ -+ { \ -+ default: \ -+ _FP_FRAC_HIGH_RAW_##fs(X) |= _FP_IMPLBIT_##fs; \ -+ _FP_FRAC_SLL_##wc(X, _FP_WORKBITS); \ -+ X##_e -= _FP_EXPBIAS_##fs; \ -+ X##_c = FP_CLS_NORMAL; \ -+ break; \ -+ \ -+ case 0: \ -+ if (_FP_FRAC_ZEROP_##wc(X)) \ -+ X##_c = FP_CLS_ZERO; \ -+ else \ -+ { \ -+ /* a denormalized number */ \ -+ _FP_I_TYPE _shift; \ -+ _FP_FRAC_CLZ_##wc(_shift, X); \ -+ _shift -= _FP_FRACXBITS_##fs; \ -+ _FP_FRAC_SLL_##wc(X, (_shift+_FP_WORKBITS)); \ -+ X##_e -= _FP_EXPBIAS_##fs - 1 + _shift; \ -+ X##_c = FP_CLS_NORMAL; \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ } \ -+ break; \ -+ \ -+ case _FP_EXPMAX_##fs: \ -+ if (_FP_FRAC_ZEROP_##wc(X)) \ -+ X##_c = FP_CLS_INF; \ -+ else \ -+ { \ -+ X##_c = FP_CLS_NAN; \ -+ /* Check for signaling NaN */ \ -+ if (!(_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs)) \ -+ FP_SET_EXCEPTION(FP_EX_INVALID); \ -+ } \ -+ break; \ -+ } \ -+} while (0) -+ -+/* Finish unpacking an fp value in semi-raw mode: the mantissa is -+ shifted by _FP_WORKBITS but the implicit MSB is not inserted and -+ other classification is not done. */ -+#define _FP_UNPACK_SEMIRAW(fs, wc, X) _FP_FRAC_SLL_##wc(X, _FP_WORKBITS) -+ -+/* A semi-raw value has overflowed to infinity. Adjust the mantissa -+ and exponent appropriately. */ -+#define _FP_OVERFLOW_SEMIRAW(fs, wc, X) \ -+do { \ -+ if (FP_ROUNDMODE == FP_RND_NEAREST \ -+ || (FP_ROUNDMODE == FP_RND_PINF && !X##_s) \ -+ || (FP_ROUNDMODE == FP_RND_MINF && X##_s)) \ -+ { \ -+ X##_e = _FP_EXPMAX_##fs; \ -+ _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \ -+ } \ -+ else \ -+ { \ -+ X##_e = _FP_EXPMAX_##fs - 1; \ -+ _FP_FRAC_SET_##wc(X, _FP_MAXFRAC_##wc); \ -+ } \ -+ FP_SET_EXCEPTION(FP_EX_INEXACT); \ -+ FP_SET_EXCEPTION(FP_EX_OVERFLOW); \ -+} while (0) -+ -+/* Check for a semi-raw value being a signaling NaN and raise the -+ invalid exception if so. */ -+#define _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, X) \ -+do { \ -+ if (X##_e == _FP_EXPMAX_##fs \ -+ && !_FP_FRAC_ZEROP_##wc(X) \ -+ && !(_FP_FRAC_HIGH_##fs(X) & _FP_QNANBIT_SH_##fs)) \ -+ FP_SET_EXCEPTION(FP_EX_INVALID); \ -+} while (0) -+ -+/* Choose a NaN result from an operation on two semi-raw NaN -+ values. */ -+#define _FP_CHOOSENAN_SEMIRAW(fs, wc, R, X, Y, OP) \ -+do { \ -+ /* _FP_CHOOSENAN expects raw values, so shift as required. */ \ -+ _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \ -+ _FP_FRAC_SRL_##wc(Y, _FP_WORKBITS); \ -+ _FP_CHOOSENAN(fs, wc, R, X, Y, OP); \ -+ _FP_FRAC_SLL_##wc(R, _FP_WORKBITS); \ -+} while (0) -+ -+/* Test whether a biased exponent is normal (not zero or maximum). */ -+#define _FP_EXP_NORMAL(fs, wc, X) (((X##_e + 1) & _FP_EXPMAX_##fs) > 1) -+ -+/* Prepare to pack an fp value in semi-raw mode: the mantissa is -+ rounded and shifted right, with the rounding possibly increasing -+ the exponent (including changing a finite value to infinity). */ -+#define _FP_PACK_SEMIRAW(fs, wc, X) \ -+do { \ -+ _FP_ROUND(wc, X); \ -+ if (_FP_FRAC_HIGH_##fs(X) \ -+ & (_FP_OVERFLOW_##fs >> 1)) \ -+ { \ -+ _FP_FRAC_HIGH_##fs(X) &= ~(_FP_OVERFLOW_##fs >> 1); \ -+ X##_e++; \ -+ if (X##_e == _FP_EXPMAX_##fs) \ -+ _FP_OVERFLOW_SEMIRAW(fs, wc, X); \ -+ } \ -+ _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \ -+ if (!_FP_EXP_NORMAL(fs, wc, X) && !_FP_FRAC_ZEROP_##wc(X)) \ -+ { \ -+ if (X##_e == 0) \ -+ FP_SET_EXCEPTION(FP_EX_UNDERFLOW); \ -+ else \ -+ { \ -+ if (!_FP_KEEPNANFRACP) \ -+ { \ -+ _FP_FRAC_SET_##wc(X, _FP_NANFRAC_##fs); \ -+ X##_s = _FP_NANSIGN_##fs; \ -+ } \ -+ else \ -+ _FP_FRAC_HIGH_RAW_##fs(X) |= _FP_QNANBIT_##fs; \ -+ } \ -+ } \ -+} while (0) -+ -+/* -+ * Before packing the bits back into the native fp result, take care -+ * of such mundane things as rounding and overflow. Also, for some -+ * kinds of fp values, the original parts may not have been fully -+ * extracted -- but that is ok, we can regenerate them now. -+ */ -+ -+#define _FP_PACK_CANONICAL(fs, wc, X) \ -+do { \ -+ switch (X##_c) \ -+ { \ -+ case FP_CLS_NORMAL: \ -+ X##_e += _FP_EXPBIAS_##fs; \ -+ if (X##_e > 0) \ -+ { \ -+ _FP_ROUND(wc, X); \ -+ if (_FP_FRAC_OVERP_##wc(fs, X)) \ -+ { \ -+ _FP_FRAC_CLEAR_OVERP_##wc(fs, X); \ -+ X##_e++; \ -+ } \ -+ _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \ -+ if (X##_e >= _FP_EXPMAX_##fs) \ -+ { \ -+ /* overflow */ \ -+ switch (FP_ROUNDMODE) \ -+ { \ -+ case FP_RND_NEAREST: \ -+ X##_c = FP_CLS_INF; \ -+ break; \ -+ case FP_RND_PINF: \ -+ if (!X##_s) X##_c = FP_CLS_INF; \ -+ break; \ -+ case FP_RND_MINF: \ -+ if (X##_s) X##_c = FP_CLS_INF; \ -+ break; \ -+ } \ -+ if (X##_c == FP_CLS_INF) \ -+ { \ -+ /* Overflow to infinity */ \ -+ X##_e = _FP_EXPMAX_##fs; \ -+ _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \ -+ } \ -+ else \ -+ { \ -+ /* Overflow to maximum normal */ \ -+ X##_e = _FP_EXPMAX_##fs - 1; \ -+ _FP_FRAC_SET_##wc(X, _FP_MAXFRAC_##wc); \ -+ } \ -+ FP_SET_EXCEPTION(FP_EX_OVERFLOW); \ -+ FP_SET_EXCEPTION(FP_EX_INEXACT); \ -+ } \ -+ } \ -+ else \ -+ { \ -+ /* we've got a denormalized number */ \ -+ X##_e = -X##_e + 1; \ -+ if (X##_e <= _FP_WFRACBITS_##fs) \ -+ { \ -+ _FP_FRAC_SRS_##wc(X, X##_e, _FP_WFRACBITS_##fs); \ -+ _FP_ROUND(wc, X); \ -+ if (_FP_FRAC_HIGH_##fs(X) \ -+ & (_FP_OVERFLOW_##fs >> 1)) \ -+ { \ -+ X##_e = 1; \ -+ _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \ -+ } \ -+ else \ -+ { \ -+ X##_e = 0; \ -+ _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \ -+ FP_SET_EXCEPTION(FP_EX_UNDERFLOW); \ -+ } \ -+ } \ -+ else \ -+ { \ -+ /* underflow to zero */ \ -+ X##_e = 0; \ -+ if (!_FP_FRAC_ZEROP_##wc(X)) \ -+ { \ -+ _FP_FRAC_SET_##wc(X, _FP_MINFRAC_##wc); \ -+ _FP_ROUND(wc, X); \ -+ _FP_FRAC_LOW_##wc(X) >>= (_FP_WORKBITS); \ -+ } \ -+ FP_SET_EXCEPTION(FP_EX_UNDERFLOW); \ -+ } \ -+ } \ -+ break; \ -+ \ -+ case FP_CLS_ZERO: \ -+ X##_e = 0; \ -+ _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \ -+ break; \ -+ \ -+ case FP_CLS_INF: \ -+ X##_e = _FP_EXPMAX_##fs; \ -+ _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \ -+ break; \ -+ \ -+ case FP_CLS_NAN: \ -+ X##_e = _FP_EXPMAX_##fs; \ -+ if (!_FP_KEEPNANFRACP) \ -+ { \ -+ _FP_FRAC_SET_##wc(X, _FP_NANFRAC_##fs); \ -+ X##_s = _FP_NANSIGN_##fs; \ -+ } \ -+ else \ -+ _FP_FRAC_HIGH_RAW_##fs(X) |= _FP_QNANBIT_##fs; \ -+ break; \ -+ } \ -+} while (0) -+ -+/* This one accepts raw argument and not cooked, returns -+ * 1 if X is a signaling NaN. -+ */ -+#define _FP_ISSIGNAN(fs, wc, X) \ -+({ \ -+ int __ret = 0; \ -+ if (X##_e == _FP_EXPMAX_##fs) \ -+ { \ -+ if (!_FP_FRAC_ZEROP_##wc(X) \ -+ && !(_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs)) \ -+ __ret = 1; \ -+ } \ -+ __ret; \ -+}) -+ -+ -+ -+ -+ -+/* Addition on semi-raw values. */ -+#define _FP_ADD_INTERNAL(fs, wc, R, X, Y, OP) \ -+do { \ -+ if (X##_s == Y##_s) \ -+ { \ -+ /* Addition. */ \ -+ R##_s = X##_s; \ -+ int ediff = X##_e - Y##_e; \ -+ if (ediff > 0) \ -+ { \ -+ R##_e = X##_e; \ -+ if (Y##_e == 0) \ -+ { \ -+ /* Y is zero or denormalized. */ \ -+ if (_FP_FRAC_ZEROP_##wc(Y)) \ -+ { \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, X); \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ goto add_done; \ -+ } \ -+ else \ -+ { \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ ediff--; \ -+ if (ediff == 0) \ -+ { \ -+ _FP_FRAC_ADD_##wc(R, X, Y); \ -+ goto add3; \ -+ } \ -+ if (X##_e == _FP_EXPMAX_##fs) \ -+ { \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, X); \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ goto add_done; \ -+ } \ -+ goto add1; \ -+ } \ -+ } \ -+ else if (X##_e == _FP_EXPMAX_##fs) \ -+ { \ -+ /* X is NaN or Inf, Y is normal. */ \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, X); \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ goto add_done; \ -+ } \ -+ \ -+ /* Insert implicit MSB of Y. */ \ -+ _FP_FRAC_HIGH_##fs(Y) |= _FP_IMPLBIT_SH_##fs; \ -+ \ -+ add1: \ -+ /* Shift the mantissa of Y to the right EDIFF steps; \ -+ remember to account later for the implicit MSB of X. */ \ -+ if (ediff <= _FP_WFRACBITS_##fs) \ -+ _FP_FRAC_SRS_##wc(Y, ediff, _FP_WFRACBITS_##fs); \ -+ else if (!_FP_FRAC_ZEROP_##wc(Y)) \ -+ _FP_FRAC_SET_##wc(Y, _FP_MINFRAC_##wc); \ -+ _FP_FRAC_ADD_##wc(R, X, Y); \ -+ } \ -+ else if (ediff < 0) \ -+ { \ -+ ediff = -ediff; \ -+ R##_e = Y##_e; \ -+ if (X##_e == 0) \ -+ { \ -+ /* X is zero or denormalized. */ \ -+ if (_FP_FRAC_ZEROP_##wc(X)) \ -+ { \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, Y); \ -+ _FP_FRAC_COPY_##wc(R, Y); \ -+ goto add_done; \ -+ } \ -+ else \ -+ { \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ ediff--; \ -+ if (ediff == 0) \ -+ { \ -+ _FP_FRAC_ADD_##wc(R, Y, X); \ -+ goto add3; \ -+ } \ -+ if (Y##_e == _FP_EXPMAX_##fs) \ -+ { \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, Y); \ -+ _FP_FRAC_COPY_##wc(R, Y); \ -+ goto add_done; \ -+ } \ -+ goto add2; \ -+ } \ -+ } \ -+ else if (Y##_e == _FP_EXPMAX_##fs) \ -+ { \ -+ /* Y is NaN or Inf, X is normal. */ \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, Y); \ -+ _FP_FRAC_COPY_##wc(R, Y); \ -+ goto add_done; \ -+ } \ -+ \ -+ /* Insert implicit MSB of X. */ \ -+ _FP_FRAC_HIGH_##fs(X) |= _FP_IMPLBIT_SH_##fs; \ -+ \ -+ add2: \ -+ /* Shift the mantissa of X to the right EDIFF steps; \ -+ remember to account later for the implicit MSB of Y. */ \ -+ if (ediff <= _FP_WFRACBITS_##fs) \ -+ _FP_FRAC_SRS_##wc(X, ediff, _FP_WFRACBITS_##fs); \ -+ else if (!_FP_FRAC_ZEROP_##wc(X)) \ -+ _FP_FRAC_SET_##wc(X, _FP_MINFRAC_##wc); \ -+ _FP_FRAC_ADD_##wc(R, Y, X); \ -+ } \ -+ else \ -+ { \ -+ /* ediff == 0. */ \ -+ if (!_FP_EXP_NORMAL(fs, wc, X)) \ -+ { \ -+ if (X##_e == 0) \ -+ { \ -+ /* X and Y are zero or denormalized. */ \ -+ R##_e = 0; \ -+ if (_FP_FRAC_ZEROP_##wc(X)) \ -+ { \ -+ if (!_FP_FRAC_ZEROP_##wc(Y)) \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ _FP_FRAC_COPY_##wc(R, Y); \ -+ goto add_done; \ -+ } \ -+ else if (_FP_FRAC_ZEROP_##wc(Y)) \ -+ { \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ goto add_done; \ -+ } \ -+ else \ -+ { \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ _FP_FRAC_ADD_##wc(R, X, Y); \ -+ if (_FP_FRAC_HIGH_##fs(R) & _FP_IMPLBIT_SH_##fs) \ -+ { \ -+ /* Normalized result. */ \ -+ _FP_FRAC_HIGH_##fs(R) \ -+ &= ~(_FP_W_TYPE)_FP_IMPLBIT_SH_##fs; \ -+ R##_e = 1; \ -+ } \ -+ goto add_done; \ -+ } \ -+ } \ -+ else \ -+ { \ -+ /* X and Y are NaN or Inf. */ \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, X); \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, Y); \ -+ R##_e = _FP_EXPMAX_##fs; \ -+ if (_FP_FRAC_ZEROP_##wc(X)) \ -+ _FP_FRAC_COPY_##wc(R, Y); \ -+ else if (_FP_FRAC_ZEROP_##wc(Y)) \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ else \ -+ _FP_CHOOSENAN_SEMIRAW(fs, wc, R, X, Y, OP); \ -+ goto add_done; \ -+ } \ -+ } \ -+ /* The exponents of X and Y, both normal, are equal. The \ -+ implicit MSBs will always add to increase the \ -+ exponent. */ \ -+ _FP_FRAC_ADD_##wc(R, X, Y); \ -+ R##_e = X##_e + 1; \ -+ _FP_FRAC_SRS_##wc(R, 1, _FP_WFRACBITS_##fs); \ -+ if (R##_e == _FP_EXPMAX_##fs) \ -+ /* Overflow to infinity (depending on rounding mode). */ \ -+ _FP_OVERFLOW_SEMIRAW(fs, wc, R); \ -+ goto add_done; \ -+ } \ -+ add3: \ -+ if (_FP_FRAC_HIGH_##fs(R) & _FP_IMPLBIT_SH_##fs) \ -+ { \ -+ /* Overflow. */ \ -+ _FP_FRAC_HIGH_##fs(R) &= ~(_FP_W_TYPE)_FP_IMPLBIT_SH_##fs; \ -+ R##_e++; \ -+ _FP_FRAC_SRS_##wc(R, 1, _FP_WFRACBITS_##fs); \ -+ if (R##_e == _FP_EXPMAX_##fs) \ -+ /* Overflow to infinity (depending on rounding mode). */ \ -+ _FP_OVERFLOW_SEMIRAW(fs, wc, R); \ -+ } \ -+ add_done: ; \ -+ } \ -+ else \ -+ { \ -+ /* Subtraction. */ \ -+ int ediff = X##_e - Y##_e; \ -+ if (ediff > 0) \ -+ { \ -+ R##_e = X##_e; \ -+ R##_s = X##_s; \ -+ if (Y##_e == 0) \ -+ { \ -+ /* Y is zero or denormalized. */ \ -+ if (_FP_FRAC_ZEROP_##wc(Y)) \ -+ { \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, X); \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ goto sub_done; \ -+ } \ -+ else \ -+ { \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ ediff--; \ -+ if (ediff == 0) \ -+ { \ -+ _FP_FRAC_SUB_##wc(R, X, Y); \ -+ goto sub3; \ -+ } \ -+ if (X##_e == _FP_EXPMAX_##fs) \ -+ { \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, X); \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ goto sub_done; \ -+ } \ -+ goto sub1; \ -+ } \ -+ } \ -+ else if (X##_e == _FP_EXPMAX_##fs) \ -+ { \ -+ /* X is NaN or Inf, Y is normal. */ \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, X); \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ goto sub_done; \ -+ } \ -+ \ -+ /* Insert implicit MSB of Y. */ \ -+ _FP_FRAC_HIGH_##fs(Y) |= _FP_IMPLBIT_SH_##fs; \ -+ \ -+ sub1: \ -+ /* Shift the mantissa of Y to the right EDIFF steps; \ -+ remember to account later for the implicit MSB of X. */ \ -+ if (ediff <= _FP_WFRACBITS_##fs) \ -+ _FP_FRAC_SRS_##wc(Y, ediff, _FP_WFRACBITS_##fs); \ -+ else if (!_FP_FRAC_ZEROP_##wc(Y)) \ -+ _FP_FRAC_SET_##wc(Y, _FP_MINFRAC_##wc); \ -+ _FP_FRAC_SUB_##wc(R, X, Y); \ -+ } \ -+ else if (ediff < 0) \ -+ { \ -+ ediff = -ediff; \ -+ R##_e = Y##_e; \ -+ R##_s = Y##_s; \ -+ if (X##_e == 0) \ -+ { \ -+ /* X is zero or denormalized. */ \ -+ if (_FP_FRAC_ZEROP_##wc(X)) \ -+ { \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, Y); \ -+ _FP_FRAC_COPY_##wc(R, Y); \ -+ goto sub_done; \ -+ } \ -+ else \ -+ { \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ ediff--; \ -+ if (ediff == 0) \ -+ { \ -+ _FP_FRAC_SUB_##wc(R, Y, X); \ -+ goto sub3; \ -+ } \ -+ if (Y##_e == _FP_EXPMAX_##fs) \ -+ { \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, Y); \ -+ _FP_FRAC_COPY_##wc(R, Y); \ -+ goto sub_done; \ -+ } \ -+ goto sub2; \ -+ } \ -+ } \ -+ else if (Y##_e == _FP_EXPMAX_##fs) \ -+ { \ -+ /* Y is NaN or Inf, X is normal. */ \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, Y); \ -+ _FP_FRAC_COPY_##wc(R, Y); \ -+ goto sub_done; \ -+ } \ -+ \ -+ /* Insert implicit MSB of X. */ \ -+ _FP_FRAC_HIGH_##fs(X) |= _FP_IMPLBIT_SH_##fs; \ -+ \ -+ sub2: \ -+ /* Shift the mantissa of X to the right EDIFF steps; \ -+ remember to account later for the implicit MSB of Y. */ \ -+ if (ediff <= _FP_WFRACBITS_##fs) \ -+ _FP_FRAC_SRS_##wc(X, ediff, _FP_WFRACBITS_##fs); \ -+ else if (!_FP_FRAC_ZEROP_##wc(X)) \ -+ _FP_FRAC_SET_##wc(X, _FP_MINFRAC_##wc); \ -+ _FP_FRAC_SUB_##wc(R, Y, X); \ -+ } \ -+ else \ -+ { \ -+ /* ediff == 0. */ \ -+ if (!_FP_EXP_NORMAL(fs, wc, X)) \ -+ { \ -+ if (X##_e == 0) \ -+ { \ -+ /* X and Y are zero or denormalized. */ \ -+ R##_e = 0; \ -+ if (_FP_FRAC_ZEROP_##wc(X)) \ -+ { \ -+ _FP_FRAC_COPY_##wc(R, Y); \ -+ if (_FP_FRAC_ZEROP_##wc(Y)) \ -+ R##_s = (FP_ROUNDMODE == FP_RND_MINF); \ -+ else \ -+ { \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ R##_s = Y##_s; \ -+ } \ -+ goto sub_done; \ -+ } \ -+ else if (_FP_FRAC_ZEROP_##wc(Y)) \ -+ { \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ R##_s = X##_s; \ -+ goto sub_done; \ -+ } \ -+ else \ -+ { \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ _FP_FRAC_SUB_##wc(R, X, Y); \ -+ R##_s = X##_s; \ -+ if (_FP_FRAC_HIGH_##fs(R) & _FP_IMPLBIT_SH_##fs) \ -+ { \ -+ /* |X| < |Y|, negate result. */ \ -+ _FP_FRAC_SUB_##wc(R, Y, X); \ -+ R##_s = Y##_s; \ -+ } \ -+ else if (_FP_FRAC_ZEROP_##wc(R)) \ -+ R##_s = (FP_ROUNDMODE == FP_RND_MINF); \ -+ goto sub_done; \ -+ } \ -+ } \ -+ else \ -+ { \ -+ /* X and Y are NaN or Inf, of opposite signs. */ \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, X); \ -+ _FP_CHECK_SIGNAN_SEMIRAW(fs, wc, Y); \ -+ R##_e = _FP_EXPMAX_##fs; \ -+ if (_FP_FRAC_ZEROP_##wc(X)) \ -+ { \ -+ if (_FP_FRAC_ZEROP_##wc(Y)) \ -+ { \ -+ /* Inf - Inf. */ \ -+ R##_s = _FP_NANSIGN_##fs; \ -+ _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \ -+ _FP_FRAC_SLL_##wc(R, _FP_WORKBITS); \ -+ FP_SET_EXCEPTION(FP_EX_INVALID); \ -+ } \ -+ else \ -+ { \ -+ /* Inf - NaN. */ \ -+ R##_s = Y##_s; \ -+ _FP_FRAC_COPY_##wc(R, Y); \ -+ } \ -+ } \ -+ else \ -+ { \ -+ if (_FP_FRAC_ZEROP_##wc(Y)) \ -+ { \ -+ /* NaN - Inf. */ \ -+ R##_s = X##_s; \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ } \ -+ else \ -+ { \ -+ /* NaN - NaN. */ \ -+ _FP_CHOOSENAN_SEMIRAW(fs, wc, R, X, Y, OP); \ -+ } \ -+ } \ -+ goto sub_done; \ -+ } \ -+ } \ -+ /* The exponents of X and Y, both normal, are equal. The \ -+ implicit MSBs cancel. */ \ -+ R##_e = X##_e; \ -+ _FP_FRAC_SUB_##wc(R, X, Y); \ -+ R##_s = X##_s; \ -+ if (_FP_FRAC_HIGH_##fs(R) & _FP_IMPLBIT_SH_##fs) \ -+ { \ -+ /* |X| < |Y|, negate result. */ \ -+ _FP_FRAC_SUB_##wc(R, Y, X); \ -+ R##_s = Y##_s; \ -+ } \ -+ else if (_FP_FRAC_ZEROP_##wc(R)) \ -+ { \ -+ R##_e = 0; \ -+ R##_s = (FP_ROUNDMODE == FP_RND_MINF); \ -+ goto sub_done; \ -+ } \ -+ goto norm; \ -+ } \ -+ sub3: \ -+ if (_FP_FRAC_HIGH_##fs(R) & _FP_IMPLBIT_SH_##fs) \ -+ { \ -+ int diff; \ -+ /* Carry into most significant bit of larger one of X and Y, \ -+ canceling it; renormalize. */ \ -+ _FP_FRAC_HIGH_##fs(R) &= _FP_IMPLBIT_SH_##fs - 1; \ -+ norm: \ -+ _FP_FRAC_CLZ_##wc(diff, R); \ -+ diff -= _FP_WFRACXBITS_##fs; \ -+ _FP_FRAC_SLL_##wc(R, diff); \ -+ if (R##_e <= diff) \ -+ { \ -+ /* R is denormalized. */ \ -+ diff = diff - R##_e + 1; \ -+ _FP_FRAC_SRS_##wc(R, diff, _FP_WFRACBITS_##fs); \ -+ R##_e = 0; \ -+ } \ -+ else \ -+ { \ -+ R##_e -= diff; \ -+ _FP_FRAC_HIGH_##fs(R) &= ~(_FP_W_TYPE)_FP_IMPLBIT_SH_##fs; \ -+ } \ -+ } \ -+ sub_done: ; \ -+ } \ -+} while (0) -+ -+#define _FP_ADD(fs, wc, R, X, Y) _FP_ADD_INTERNAL(fs, wc, R, X, Y, '+') -+#define _FP_SUB(fs, wc, R, X, Y) \ -+ do { \ -+ if (!(Y##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(Y))) Y##_s ^= 1; \ -+ _FP_ADD_INTERNAL(fs, wc, R, X, Y, '-'); \ -+ } while (0) -+ -+ -+/* -+ * Main negation routine. FIXME -- when we care about setting exception -+ * bits reliably, this will not do. We should examine all of the fp classes. -+ */ -+ -+#define _FP_NEG(fs, wc, R, X) \ -+ do { \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ R##_c = X##_c; \ -+ R##_e = X##_e; \ -+ R##_s = 1 ^ X##_s; \ -+ } while (0) -+ -+ -+/* -+ * Main multiplication routine. The input values should be cooked. -+ */ -+ -+#define _FP_MUL(fs, wc, R, X, Y) \ -+do { \ -+ R##_s = X##_s ^ Y##_s; \ -+ switch (_FP_CLS_COMBINE(X##_c, Y##_c)) \ -+ { \ -+ case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_NORMAL): \ -+ R##_c = FP_CLS_NORMAL; \ -+ R##_e = X##_e + Y##_e + 1; \ -+ \ -+ _FP_MUL_MEAT_##fs(R,X,Y); \ -+ \ -+ if (_FP_FRAC_OVERP_##wc(fs, R)) \ -+ _FP_FRAC_SRS_##wc(R, 1, _FP_WFRACBITS_##fs); \ -+ else \ -+ R##_e--; \ -+ break; \ -+ \ -+ case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_NAN): \ -+ _FP_CHOOSENAN(fs, wc, R, X, Y, '*'); \ -+ break; \ -+ \ -+ case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_NORMAL): \ -+ case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_INF): \ -+ case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_ZERO): \ -+ R##_s = X##_s; \ -+ \ -+ case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_INF): \ -+ case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_NORMAL): \ -+ case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_NORMAL): \ -+ case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_ZERO): \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ R##_c = X##_c; \ -+ break; \ -+ \ -+ case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_NAN): \ -+ case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_NAN): \ -+ case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_NAN): \ -+ R##_s = Y##_s; \ -+ \ -+ case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_INF): \ -+ case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_ZERO): \ -+ _FP_FRAC_COPY_##wc(R, Y); \ -+ R##_c = Y##_c; \ -+ break; \ -+ \ -+ case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_ZERO): \ -+ case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_INF): \ -+ R##_s = _FP_NANSIGN_##fs; \ -+ R##_c = FP_CLS_NAN; \ -+ _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \ -+ FP_SET_EXCEPTION(FP_EX_INVALID); \ -+ break; \ -+ \ -+ default: \ -+ abort(); \ -+ } \ -+} while (0) -+ -+ -+/* -+ * Main division routine. The input values should be cooked. -+ */ -+ -+#define _FP_DIV(fs, wc, R, X, Y) \ -+do { \ -+ R##_s = X##_s ^ Y##_s; \ -+ switch (_FP_CLS_COMBINE(X##_c, Y##_c)) \ -+ { \ -+ case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_NORMAL): \ -+ R##_c = FP_CLS_NORMAL; \ -+ R##_e = X##_e - Y##_e; \ -+ \ -+ _FP_DIV_MEAT_##fs(R,X,Y); \ -+ break; \ -+ \ -+ case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_NAN): \ -+ _FP_CHOOSENAN(fs, wc, R, X, Y, '/'); \ -+ break; \ -+ \ -+ case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_NORMAL): \ -+ case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_INF): \ -+ case _FP_CLS_COMBINE(FP_CLS_NAN,FP_CLS_ZERO): \ -+ R##_s = X##_s; \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ R##_c = X##_c; \ -+ break; \ -+ \ -+ case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_NAN): \ -+ case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_NAN): \ -+ case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_NAN): \ -+ R##_s = Y##_s; \ -+ _FP_FRAC_COPY_##wc(R, Y); \ -+ R##_c = Y##_c; \ -+ break; \ -+ \ -+ case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_INF): \ -+ case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_INF): \ -+ case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_NORMAL): \ -+ R##_c = FP_CLS_ZERO; \ -+ break; \ -+ \ -+ case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_ZERO): \ -+ FP_SET_EXCEPTION(FP_EX_DIVZERO); \ -+ case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_ZERO): \ -+ case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_NORMAL): \ -+ R##_c = FP_CLS_INF; \ -+ break; \ -+ \ -+ case _FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_INF): \ -+ case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_ZERO): \ -+ R##_s = _FP_NANSIGN_##fs; \ -+ R##_c = FP_CLS_NAN; \ -+ _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \ -+ FP_SET_EXCEPTION(FP_EX_INVALID); \ -+ break; \ -+ \ -+ default: \ -+ abort(); \ -+ } \ -+} while (0) -+ -+ -+/* -+ * Main differential comparison routine. The inputs should be raw not -+ * cooked. The return is -1,0,1 for normal values, 2 otherwise. -+ */ -+ -+#define _FP_CMP(fs, wc, ret, X, Y, un) \ -+ do { \ -+ /* NANs are unordered */ \ -+ if ((X##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(X)) \ -+ || (Y##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(Y))) \ -+ { \ -+ ret = un; \ -+ } \ -+ else \ -+ { \ -+ int __is_zero_x; \ -+ int __is_zero_y; \ -+ \ -+ __is_zero_x = (!X##_e && _FP_FRAC_ZEROP_##wc(X)) ? 1 : 0; \ -+ __is_zero_y = (!Y##_e && _FP_FRAC_ZEROP_##wc(Y)) ? 1 : 0; \ -+ \ -+ if (__is_zero_x && __is_zero_y) \ -+ ret = 0; \ -+ else if (__is_zero_x) \ -+ ret = Y##_s ? 1 : -1; \ -+ else if (__is_zero_y) \ -+ ret = X##_s ? -1 : 1; \ -+ else if (X##_s != Y##_s) \ -+ ret = X##_s ? -1 : 1; \ -+ else if (X##_e > Y##_e) \ -+ ret = X##_s ? -1 : 1; \ -+ else if (X##_e < Y##_e) \ -+ ret = X##_s ? 1 : -1; \ -+ else if (_FP_FRAC_GT_##wc(X, Y)) \ -+ ret = X##_s ? -1 : 1; \ -+ else if (_FP_FRAC_GT_##wc(Y, X)) \ -+ ret = X##_s ? 1 : -1; \ -+ else \ -+ ret = 0; \ -+ } \ -+ } while (0) -+ -+ -+/* Simplification for strict equality. */ -+ -+#define _FP_CMP_EQ(fs, wc, ret, X, Y) \ -+ do { \ -+ /* NANs are unordered */ \ -+ if ((X##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(X)) \ -+ || (Y##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(Y))) \ -+ { \ -+ ret = 1; \ -+ } \ -+ else \ -+ { \ -+ ret = !(X##_e == Y##_e \ -+ && _FP_FRAC_EQ_##wc(X, Y) \ -+ && (X##_s == Y##_s || (!X##_e && _FP_FRAC_ZEROP_##wc(X)))); \ -+ } \ -+ } while (0) -+ -+/* Version to test unordered. */ -+ -+#define _FP_CMP_UNORD(fs, wc, ret, X, Y) \ -+ do { \ -+ ret = ((X##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(X)) \ -+ || (Y##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(Y))); \ -+ } while (0) -+ -+/* -+ * Main square root routine. The input value should be cooked. -+ */ -+ -+#define _FP_SQRT(fs, wc, R, X) \ -+do { \ -+ _FP_FRAC_DECL_##wc(T); _FP_FRAC_DECL_##wc(S); \ -+ _FP_W_TYPE q; \ -+ switch (X##_c) \ -+ { \ -+ case FP_CLS_NAN: \ -+ _FP_FRAC_COPY_##wc(R, X); \ -+ R##_s = X##_s; \ -+ R##_c = FP_CLS_NAN; \ -+ break; \ -+ case FP_CLS_INF: \ -+ if (X##_s) \ -+ { \ -+ R##_s = _FP_NANSIGN_##fs; \ -+ R##_c = FP_CLS_NAN; /* NAN */ \ -+ _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \ -+ FP_SET_EXCEPTION(FP_EX_INVALID); \ -+ } \ -+ else \ -+ { \ -+ R##_s = 0; \ -+ R##_c = FP_CLS_INF; /* sqrt(+inf) = +inf */ \ -+ } \ -+ break; \ -+ case FP_CLS_ZERO: \ -+ R##_s = X##_s; \ -+ R##_c = FP_CLS_ZERO; /* sqrt(+-0) = +-0 */ \ -+ break; \ -+ case FP_CLS_NORMAL: \ -+ R##_s = 0; \ -+ if (X##_s) \ -+ { \ -+ R##_c = FP_CLS_NAN; /* sNAN */ \ -+ R##_s = _FP_NANSIGN_##fs; \ -+ _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \ -+ FP_SET_EXCEPTION(FP_EX_INVALID); \ -+ break; \ -+ } \ -+ R##_c = FP_CLS_NORMAL; \ -+ if (X##_e & 1) \ -+ _FP_FRAC_SLL_##wc(X, 1); \ -+ R##_e = X##_e >> 1; \ -+ _FP_FRAC_SET_##wc(S, _FP_ZEROFRAC_##wc); \ -+ _FP_FRAC_SET_##wc(R, _FP_ZEROFRAC_##wc); \ -+ q = _FP_OVERFLOW_##fs >> 1; \ -+ _FP_SQRT_MEAT_##wc(R, S, T, X, q); \ -+ } \ -+ } while (0) -+ -+/* -+ * Convert from FP to integer. Input is raw. -+ */ -+ -+/* RSIGNED can have following values: -+ * 0: the number is required to be 0..(2^rsize)-1, if not, NV is set plus -+ * the result is either 0 or (2^rsize)-1 depending on the sign in such -+ * case. -+ * 1: the number is required to be -(2^(rsize-1))..(2^(rsize-1))-1, if not, -+ * NV is set plus the result is either -(2^(rsize-1)) or (2^(rsize-1))-1 -+ * depending on the sign in such case. -+ * -1: the number is required to be -(2^(rsize-1))..(2^rsize)-1, if not, NV is -+ * set plus the result is either -(2^(rsize-1)) or (2^(rsize-1))-1 -+ * depending on the sign in such case. -+ */ -+#define _FP_TO_INT(fs, wc, r, X, rsize, rsigned) \ -+do { \ -+ if (X##_e < _FP_EXPBIAS_##fs) \ -+ { \ -+ r = 0; \ -+ if (X##_e == 0) \ -+ { \ -+ if (!_FP_FRAC_ZEROP_##wc(X)) \ -+ { \ -+ FP_SET_EXCEPTION(FP_EX_INEXACT); \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ } \ -+ } \ -+ else \ -+ FP_SET_EXCEPTION(FP_EX_INEXACT); \ -+ } \ -+ else if (X##_e >= _FP_EXPBIAS_##fs + rsize - (rsigned > 0 || X##_s) \ -+ || (!rsigned && X##_s)) \ -+ { \ -+ /* Overflow or converting to the most negative integer. */ \ -+ if (rsigned) \ -+ { \ -+ r = 1; \ -+ r <<= rsize - 1; \ -+ r -= 1 - X##_s; \ -+ } else { \ -+ r = 0; \ -+ if (X##_s) \ -+ r = ~r; \ -+ } \ -+ \ -+ if (rsigned && X##_s && X##_e == _FP_EXPBIAS_##fs + rsize - 1) \ -+ { \ -+ /* Possibly converting to most negative integer; check the \ -+ mantissa. */ \ -+ int inexact = 0; \ -+ (void)((_FP_FRACBITS_##fs > rsize) \ -+ ? ({ _FP_FRAC_SRST_##wc(X, inexact, \ -+ _FP_FRACBITS_##fs - rsize, \ -+ _FP_FRACBITS_##fs); 0; }) \ -+ : 0); \ -+ if (!_FP_FRAC_ZEROP_##wc(X)) \ -+ FP_SET_EXCEPTION(FP_EX_INVALID); \ -+ else if (inexact) \ -+ FP_SET_EXCEPTION(FP_EX_INEXACT); \ -+ } \ -+ else \ -+ FP_SET_EXCEPTION(FP_EX_INVALID); \ -+ } \ -+ else \ -+ { \ -+ _FP_FRAC_HIGH_RAW_##fs(X) |= _FP_IMPLBIT_##fs; \ -+ if (X##_e >= _FP_EXPBIAS_##fs + _FP_FRACBITS_##fs - 1) \ -+ { \ -+ _FP_FRAC_ASSEMBLE_##wc(r, X, rsize); \ -+ r <<= X##_e - _FP_EXPBIAS_##fs - _FP_FRACBITS_##fs + 1; \ -+ } \ -+ else \ -+ { \ -+ int inexact; \ -+ _FP_FRAC_SRST_##wc(X, inexact, \ -+ (_FP_FRACBITS_##fs + _FP_EXPBIAS_##fs - 1 \ -+ - X##_e), \ -+ _FP_FRACBITS_##fs); \ -+ if (inexact) \ -+ FP_SET_EXCEPTION(FP_EX_INEXACT); \ -+ _FP_FRAC_ASSEMBLE_##wc(r, X, rsize); \ -+ } \ -+ if (rsigned && X##_s) \ -+ r = -r; \ -+ } \ -+} while (0) -+ -+/* Convert integer to fp. Output is raw. RTYPE is unsigned even if -+ input is signed. */ -+#define _FP_FROM_INT(fs, wc, X, r, rsize, rtype) \ -+ do { \ -+ if (r) \ -+ { \ -+ rtype ur_; \ -+ \ -+ if ((X##_s = (r < 0))) \ -+ r = -(rtype)r; \ -+ \ -+ ur_ = (rtype) r; \ -+ (void)((rsize <= _FP_W_TYPE_SIZE) \ -+ ? ({ \ -+ int lz_; \ -+ __FP_CLZ(lz_, (_FP_W_TYPE)ur_); \ -+ X##_e = _FP_EXPBIAS_##fs + _FP_W_TYPE_SIZE - 1 - lz_; \ -+ }) \ -+ : ((rsize <= 2 * _FP_W_TYPE_SIZE) \ -+ ? ({ \ -+ int lz_; \ -+ __FP_CLZ_2(lz_, (_FP_W_TYPE)(ur_ >> _FP_W_TYPE_SIZE), \ -+ (_FP_W_TYPE)ur_); \ -+ X##_e = (_FP_EXPBIAS_##fs + 2 * _FP_W_TYPE_SIZE - 1 \ -+ - lz_); \ -+ }) \ -+ : (abort(), 0))); \ -+ \ -+ if (rsize - 1 + _FP_EXPBIAS_##fs >= _FP_EXPMAX_##fs \ -+ && X##_e >= _FP_EXPMAX_##fs) \ -+ { \ -+ /* Exponent too big; overflow to infinity. (May also \ -+ happen after rounding below.) */ \ -+ _FP_OVERFLOW_SEMIRAW(fs, wc, X); \ -+ goto pack_semiraw; \ -+ } \ -+ \ -+ if (rsize <= _FP_FRACBITS_##fs \ -+ || X##_e < _FP_EXPBIAS_##fs + _FP_FRACBITS_##fs) \ -+ { \ -+ /* Exactly representable; shift left. */ \ -+ _FP_FRAC_DISASSEMBLE_##wc(X, ur_, rsize); \ -+ _FP_FRAC_SLL_##wc(X, (_FP_EXPBIAS_##fs \ -+ + _FP_FRACBITS_##fs - 1 - X##_e)); \ -+ } \ -+ else \ -+ { \ -+ /* More bits in integer than in floating type; need to \ -+ round. */ \ -+ if (_FP_EXPBIAS_##fs + _FP_WFRACBITS_##fs - 1 < X##_e) \ -+ ur_ = ((ur_ >> (X##_e - _FP_EXPBIAS_##fs \ -+ - _FP_WFRACBITS_##fs + 1)) \ -+ | ((ur_ << (rsize - (X##_e - _FP_EXPBIAS_##fs \ -+ - _FP_WFRACBITS_##fs + 1))) \ -+ != 0)); \ -+ _FP_FRAC_DISASSEMBLE_##wc(X, ur_, rsize); \ -+ if ((_FP_EXPBIAS_##fs + _FP_WFRACBITS_##fs - 1 - X##_e) > 0) \ -+ _FP_FRAC_SLL_##wc(X, (_FP_EXPBIAS_##fs \ -+ + _FP_WFRACBITS_##fs - 1 - X##_e)); \ -+ _FP_FRAC_HIGH_##fs(X) &= ~(_FP_W_TYPE)_FP_IMPLBIT_SH_##fs; \ -+ pack_semiraw: \ -+ _FP_PACK_SEMIRAW(fs, wc, X); \ -+ } \ -+ } \ -+ else \ -+ { \ -+ X##_s = 0; \ -+ X##_e = 0; \ -+ _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \ -+ } \ -+ } while (0) -+ -+ -+/* Extend from a narrower floating-point format to a wider one. Input -+ and output are raw. */ -+#define FP_EXTEND(dfs,sfs,dwc,swc,D,S) \ -+do { \ -+ if (_FP_FRACBITS_##dfs < _FP_FRACBITS_##sfs \ -+ || (_FP_EXPMAX_##dfs - _FP_EXPBIAS_##dfs \ -+ < _FP_EXPMAX_##sfs - _FP_EXPBIAS_##sfs) \ -+ || (_FP_EXPBIAS_##dfs < _FP_EXPBIAS_##sfs + _FP_FRACBITS_##sfs - 1 \ -+ && _FP_EXPBIAS_##dfs != _FP_EXPBIAS_##sfs)) \ -+ abort(); \ -+ D##_s = S##_s; \ -+ _FP_FRAC_COPY_##dwc##_##swc(D, S); \ -+ if (_FP_EXP_NORMAL(sfs, swc, S)) \ -+ { \ -+ D##_e = S##_e + _FP_EXPBIAS_##dfs - _FP_EXPBIAS_##sfs; \ -+ _FP_FRAC_SLL_##dwc(D, (_FP_FRACBITS_##dfs - _FP_FRACBITS_##sfs)); \ -+ } \ -+ else \ -+ { \ -+ if (S##_e == 0) \ -+ { \ -+ if (_FP_FRAC_ZEROP_##swc(S)) \ -+ D##_e = 0; \ -+ else if (_FP_EXPBIAS_##dfs \ -+ < _FP_EXPBIAS_##sfs + _FP_FRACBITS_##sfs - 1) \ -+ { \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ _FP_FRAC_SLL_##dwc(D, (_FP_FRACBITS_##dfs \ -+ - _FP_FRACBITS_##sfs)); \ -+ D##_e = 0; \ -+ } \ -+ else \ -+ { \ -+ int _lz; \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ _FP_FRAC_CLZ_##swc(_lz, S); \ -+ _FP_FRAC_SLL_##dwc(D, \ -+ _lz + _FP_FRACBITS_##dfs \ -+ - _FP_FRACTBITS_##sfs); \ -+ D##_e = (_FP_EXPBIAS_##dfs - _FP_EXPBIAS_##sfs + 1 \ -+ + _FP_FRACXBITS_##sfs - _lz); \ -+ } \ -+ } \ -+ else \ -+ { \ -+ D##_e = _FP_EXPMAX_##dfs; \ -+ if (!_FP_FRAC_ZEROP_##swc(S)) \ -+ { \ -+ if (!(_FP_FRAC_HIGH_RAW_##sfs(S) & _FP_QNANBIT_##sfs)) \ -+ FP_SET_EXCEPTION(FP_EX_INVALID); \ -+ _FP_FRAC_SLL_##dwc(D, (_FP_FRACBITS_##dfs \ -+ - _FP_FRACBITS_##sfs)); \ -+ } \ -+ } \ -+ } \ -+} while (0) -+ -+/* Truncate from a wider floating-point format to a narrower one. -+ Input and output are semi-raw. */ -+#define FP_TRUNC(dfs,sfs,dwc,swc,D,S) \ -+do { \ -+ if (_FP_FRACBITS_##sfs < _FP_FRACBITS_##dfs \ -+ || (_FP_EXPBIAS_##sfs < _FP_EXPBIAS_##dfs + _FP_FRACBITS_##dfs - 1 \ -+ && _FP_EXPBIAS_##sfs != _FP_EXPBIAS_##dfs)) \ -+ abort(); \ -+ D##_s = S##_s; \ -+ if (_FP_EXP_NORMAL(sfs, swc, S)) \ -+ { \ -+ D##_e = S##_e + _FP_EXPBIAS_##dfs - _FP_EXPBIAS_##sfs; \ -+ if (D##_e >= _FP_EXPMAX_##dfs) \ -+ _FP_OVERFLOW_SEMIRAW(dfs, dwc, D); \ -+ else \ -+ { \ -+ if (D##_e <= 0) \ -+ { \ -+ if (D##_e < 1 - _FP_FRACBITS_##dfs) \ -+ { \ -+ _FP_FRAC_SET_##swc(S, _FP_ZEROFRAC_##swc); \ -+ _FP_FRAC_LOW_##swc(S) |= 1; \ -+ } \ -+ else \ -+ { \ -+ _FP_FRAC_HIGH_##sfs(S) |= _FP_IMPLBIT_SH_##sfs; \ -+ _FP_FRAC_SRS_##swc(S, (_FP_WFRACBITS_##sfs \ -+ - _FP_WFRACBITS_##dfs + 1 - D##_e), \ -+ _FP_WFRACBITS_##sfs); \ -+ } \ -+ D##_e = 0; \ -+ } \ -+ else \ -+ _FP_FRAC_SRS_##swc(S, (_FP_WFRACBITS_##sfs \ -+ - _FP_WFRACBITS_##dfs), \ -+ _FP_WFRACBITS_##sfs); \ -+ _FP_FRAC_COPY_##dwc##_##swc(D, S); \ -+ } \ -+ } \ -+ else \ -+ { \ -+ if (S##_e == 0) \ -+ { \ -+ D##_e = 0; \ -+ if (_FP_FRAC_ZEROP_##swc(S)) \ -+ _FP_FRAC_SET_##dwc(D, _FP_ZEROFRAC_##dwc); \ -+ else \ -+ { \ -+ FP_SET_EXCEPTION(FP_EX_DENORM); \ -+ if (_FP_EXPBIAS_##sfs \ -+ < _FP_EXPBIAS_##dfs + _FP_FRACBITS_##dfs - 1) \ -+ { \ -+ _FP_FRAC_SRS_##swc(S, (_FP_WFRACBITS_##sfs \ -+ - _FP_WFRACBITS_##dfs), \ -+ _FP_WFRACBITS_##sfs); \ -+ _FP_FRAC_COPY_##dwc##_##swc(D, S); \ -+ } \ -+ else \ -+ { \ -+ _FP_FRAC_SET_##dwc(D, _FP_ZEROFRAC_##dwc); \ -+ _FP_FRAC_LOW_##dwc(D) |= 1; \ -+ } \ -+ } \ -+ } \ -+ else \ -+ { \ -+ D##_e = _FP_EXPMAX_##dfs; \ -+ if (_FP_FRAC_ZEROP_##swc(S)) \ -+ _FP_FRAC_SET_##dwc(D, _FP_ZEROFRAC_##dwc); \ -+ else \ -+ { \ -+ _FP_CHECK_SIGNAN_SEMIRAW(sfs, swc, S); \ -+ _FP_FRAC_SRL_##swc(S, (_FP_WFRACBITS_##sfs \ -+ - _FP_WFRACBITS_##dfs)); \ -+ _FP_FRAC_COPY_##dwc##_##swc(D, S); \ -+ /* Semi-raw NaN must have all workbits cleared. */ \ -+ _FP_FRAC_LOW_##dwc(D) \ -+ &= ~(_FP_W_TYPE) ((1 << _FP_WORKBITS) - 1); \ -+ _FP_FRAC_HIGH_##dfs(D) |= _FP_QNANBIT_SH_##dfs; \ -+ } \ -+ } \ -+ } \ -+} while (0) -+ -+/* -+ * Helper primitives. -+ */ -+ -+/* Count leading zeros in a word. */ -+ -+#ifndef __FP_CLZ -+/* GCC 3.4 and later provide the builtins for us. */ -+#define __FP_CLZ(r, x) \ -+ do { \ -+ if (sizeof (_FP_W_TYPE) == sizeof (unsigned int)) \ -+ r = __builtin_clz (x); \ -+ else if (sizeof (_FP_W_TYPE) == sizeof (unsigned long)) \ -+ r = __builtin_clzl (x); \ -+ else if (sizeof (_FP_W_TYPE) == sizeof (unsigned long long)) \ -+ r = __builtin_clzll (x); \ -+ else \ -+ abort (); \ -+ } while (0) -+#endif /* ndef __FP_CLZ */ -+ -+#define _FP_DIV_HELP_imm(q, r, n, d) \ -+ do { \ -+ q = n / d, r = n % d; \ -+ } while (0) -+ -+ -+/* A restoring bit-by-bit division primitive. */ -+ -+#define _FP_DIV_MEAT_N_loop(fs, wc, R, X, Y) \ -+ do { \ -+ int count = _FP_WFRACBITS_##fs; \ -+ _FP_FRAC_DECL_##wc (u); \ -+ _FP_FRAC_DECL_##wc (v); \ -+ _FP_FRAC_COPY_##wc (u, X); \ -+ _FP_FRAC_COPY_##wc (v, Y); \ -+ _FP_FRAC_SET_##wc (R, _FP_ZEROFRAC_##wc); \ -+ /* Normalize U and V. */ \ -+ _FP_FRAC_SLL_##wc (u, _FP_WFRACXBITS_##fs); \ -+ _FP_FRAC_SLL_##wc (v, _FP_WFRACXBITS_##fs); \ -+ /* First round. Since the operands are normalized, either the \ -+ first or second bit will be set in the fraction. Produce a \ -+ normalized result by checking which and adjusting the loop \ -+ count and exponent accordingly. */ \ -+ if (_FP_FRAC_GE_1 (u, v)) \ -+ { \ -+ _FP_FRAC_SUB_##wc (u, u, v); \ -+ _FP_FRAC_LOW_##wc (R) |= 1; \ -+ count--; \ -+ } \ -+ else \ -+ R##_e--; \ -+ /* Subsequent rounds. */ \ -+ do { \ -+ int msb = (_FP_WS_TYPE) _FP_FRAC_HIGH_##wc (u) < 0; \ -+ _FP_FRAC_SLL_##wc (u, 1); \ -+ _FP_FRAC_SLL_##wc (R, 1); \ -+ if (msb || _FP_FRAC_GE_1 (u, v)) \ -+ { \ -+ _FP_FRAC_SUB_##wc (u, u, v); \ -+ _FP_FRAC_LOW_##wc (R) |= 1; \ -+ } \ -+ } while (--count > 0); \ -+ /* If there's anything left in U, the result is inexact. */ \ -+ _FP_FRAC_LOW_##wc (R) |= !_FP_FRAC_ZEROP_##wc (u); \ -+ } while (0) -+ -+#define _FP_DIV_MEAT_1_loop(fs, R, X, Y) _FP_DIV_MEAT_N_loop (fs, 1, R, X, Y) -+#define _FP_DIV_MEAT_2_loop(fs, R, X, Y) _FP_DIV_MEAT_N_loop (fs, 2, R, X, Y) -+#define _FP_DIV_MEAT_4_loop(fs, R, X, Y) _FP_DIV_MEAT_N_loop (fs, 4, R, X, Y) -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_add.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_add.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_add.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_add.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,39 @@ -+/* Software floating-point emulation. -+ Return a + b -+ Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+long double _Q_add(const long double a, const long double b) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(C); -+ long double c; -+ -+ FP_INIT_ROUNDMODE; -+ FP_UNPACK_SEMIRAW_Q(A, a); -+ FP_UNPACK_SEMIRAW_Q(B, b); -+ FP_ADD_Q(C, A, B); -+ FP_PACK_SEMIRAW_Q(c, C); -+ FP_HANDLE_EXCEPTIONS; -+ return c; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_cmp.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_cmp.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_cmp.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_cmp.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,41 @@ -+/* Software floating-point emulation. -+ Compare a and b, return float condition code. -+ Copyright (C) 1997,1999 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+int _Q_cmp(const long double a, const long double b) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(B); -+ int r; -+ -+ FP_UNPACK_RAW_Q(A, a); -+ FP_UNPACK_RAW_Q(B, b); -+ FP_CMP_Q(r, B, A, 3); -+ if (r == -1) r = 2; -+ if (r == 3 && (FP_ISSIGNAN_Q(A) || FP_ISSIGNAN_Q(B))) -+ FP_SET_EXCEPTION(FP_EX_INVALID); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return r; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_cmpe.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_cmpe.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_cmpe.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_cmpe.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,42 @@ -+/* Software floating-point emulation. -+ Compare a and b, return float condition code. -+ Signal exception (unless masked) if unordered. -+ Copyright (C) 1997,1999 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+int _Q_cmpe(const long double a, const long double b) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(B); -+ int r; -+ -+ FP_UNPACK_RAW_Q(A, a); -+ FP_UNPACK_RAW_Q(B, b); -+ FP_CMP_Q(r, B, A, 3); -+ if (r == -1) r = 2; -+ if (r == 3) -+ FP_SET_EXCEPTION(FP_EX_INVALID); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return r; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_div.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_div.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_div.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_div.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,39 @@ -+/* Software floating-point emulation. -+ Return a / b -+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+long double _Q_div(const long double a, const long double b) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(C); -+ long double c; -+ -+ FP_INIT_ROUNDMODE; -+ FP_UNPACK_Q(A, a); -+ FP_UNPACK_Q(B, b); -+ FP_DIV_Q(C, A, B); -+ FP_PACK_Q(c, C); -+ FP_HANDLE_EXCEPTIONS; -+ return c; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_dtoq.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_dtoq.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_dtoq.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_dtoq.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,44 @@ -+/* Software floating-point emulation. -+ Return (long double)(a) -+ Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "double.h" -+#include "quad.h" -+ -+long double _Q_dtoq(const double a) -+{ -+ FP_DECL_EX; -+ FP_DECL_D(A); -+ FP_DECL_Q(C); -+ long double c; -+ -+ FP_INIT_ROUNDMODE; -+ FP_UNPACK_RAW_D(A, a); -+#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q -+ FP_EXTEND(Q,D,4,2,C,A); -+#else -+ FP_EXTEND(Q,D,2,1,C,A); -+#endif -+ FP_PACK_RAW_Q(c, C); -+ FP_HANDLE_EXCEPTIONS; -+ return c; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_feq.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_feq.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_feq.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_feq.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,40 @@ -+/* Software floating-point emulation. -+ Return 1 if a == b -+ Copyright (C) 1997,1999 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+int _Q_feq(const long double a, const long double b) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(B); -+ int r; -+ -+ FP_UNPACK_RAW_Q(A, a); -+ FP_UNPACK_RAW_Q(B, b); -+ FP_CMP_EQ_Q(r, A, B); -+ if (r && (FP_ISSIGNAN_Q(A) || FP_ISSIGNAN_Q(B))) -+ FP_SET_EXCEPTION(FP_EX_INVALID); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return !r; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_fge.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_fge.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_fge.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_fge.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,40 @@ -+/* Software floating-point emulation. -+ Return 1 if a >= b -+ Copyright (C) 1997,1999 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+int _Q_fge(const long double a, const long double b) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(B); -+ int r; -+ -+ FP_UNPACK_RAW_Q(A, a); -+ FP_UNPACK_RAW_Q(B, b); -+ FP_CMP_Q(r, B, A, 3); -+ if (r == 3) -+ FP_SET_EXCEPTION(FP_EX_INVALID); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return (r <= 0); -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_fgt.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_fgt.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_fgt.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_fgt.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,40 @@ -+/* Software floating-point emulation. -+ Return 1 if a > b -+ Copyright (C) 1997,1999 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+int _Q_fgt(const long double a, const long double b) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(B); -+ int r; -+ -+ FP_UNPACK_RAW_Q(A, a); -+ FP_UNPACK_RAW_Q(B, b); -+ FP_CMP_Q(r, B, A, 3); -+ if (r == 3) -+ FP_SET_EXCEPTION(FP_EX_INVALID); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return (r == -1); -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_fle.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_fle.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_fle.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_fle.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,40 @@ -+/* Software floating-point emulation. -+ Return 1 if a <= b -+ Copyright (C) 1997,1999 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+int _Q_fle(const long double a, const long double b) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(B); -+ int r; -+ -+ FP_UNPACK_RAW_Q(A, a); -+ FP_UNPACK_RAW_Q(B, b); -+ FP_CMP_Q(r, B, A, -2); -+ if (r == -2) -+ FP_SET_EXCEPTION(FP_EX_INVALID); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return (r >= 0); -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_flt.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_flt.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_flt.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_flt.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,40 @@ -+/* Software floating-point emulation. -+ Return 1 if a < b -+ Copyright (C) 1997,1999 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+int _Q_flt(const long double a, const long double b) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(B); -+ int r; -+ -+ FP_UNPACK_RAW_Q(A, a); -+ FP_UNPACK_RAW_Q(B, b); -+ FP_CMP_Q(r, B, A, 3); -+ if (r == 3) -+ FP_SET_EXCEPTION(FP_EX_INVALID); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return (r == 1); -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_fne.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_fne.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_fne.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_fne.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,40 @@ -+/* Software floating-point emulation. -+ Return 1 if a != b -+ Copyright (C) 1997,1999 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+int _Q_fne(const long double a, const long double b) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(B); -+ int r; -+ -+ FP_UNPACK_RAW_Q(A, a); -+ FP_UNPACK_RAW_Q(B, b); -+ FP_CMP_EQ_Q(r, A, B); -+ if (r && (FP_ISSIGNAN_Q(A) || FP_ISSIGNAN_Q(B))) -+ FP_SET_EXCEPTION(FP_EX_INVALID); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return r; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_itoq.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_itoq.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_itoq.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_itoq.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,38 @@ -+/* Software floating-point emulation. -+ Return (long double)(a) -+ Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+long double _Q_itoq(const int a) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(C); -+ int b = a; -+ long double c; -+ -+ FP_FROM_INT_Q(C, b, 32, unsigned int); -+ FP_PACK_RAW_Q(c, C); -+ FP_CLEAR_EXCEPTIONS; -+ FP_HANDLE_EXCEPTIONS; -+ return c; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_lltoq.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_lltoq.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_lltoq.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_lltoq.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,38 @@ -+/* Software floating-point emulation. -+ Return (long double)a -+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+long double _Q_lltoq(const long long a) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(C); -+ long double c; -+ long long b = a; -+ -+ FP_FROM_INT_Q(C, b, 64, unsigned long long); -+ FP_PACK_RAW_Q(c, C); -+ FP_CLEAR_EXCEPTIONS; -+ FP_HANDLE_EXCEPTIONS; -+ return c; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_mul.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_mul.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_mul.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_mul.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,39 @@ -+/* Software floating-point emulation. -+ Return a * b -+ Copyright (C) 1997,1999 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+long double _Q_mul(const long double a, const long double b) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(C); -+ long double c; -+ -+ FP_INIT_ROUNDMODE; -+ FP_UNPACK_Q(A, a); -+ FP_UNPACK_Q(B, b); -+ FP_MUL_Q(C, A, B); -+ FP_PACK_Q(c, C); -+ FP_HANDLE_EXCEPTIONS; -+ return c; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_neg.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_neg.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_neg.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_neg.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,47 @@ -+/* Software floating-point emulation. -+ Return !a -+ Copyright (C) 1997,1999 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+long double _Q_neg(const long double a) -+{ -+ FP_DECL_EX; -+ long double c = a; -+ -+#if (__BYTE_ORDER == __BIG_ENDIAN) -+ ((UWtype *)&c)[0] ^= (((UWtype)1) << (W_TYPE_SIZE - 1)); -+#elif (__BYTE_ORDER == __LITTLE_ENDIAN) && (W_TYPE_SIZE == 64) -+ ((UWtype *)&c)[1] ^= (((UWtype)1) << (W_TYPE_SIZE - 1)); -+#elif (__BYTE_ORDER == __LITTLE_ENDIAN) && (W_TYPE_SIZE == 32) -+ ((UWtype *)&c)[3] ^= (((UWtype)1) << (W_TYPE_SIZE - 1)); -+#else -+ FP_DECL_Q(A); FP_DECL_Q(C); -+ -+ FP_UNPACK_Q(A, a); -+ FP_NEG_Q(C, A); -+ FP_PACK_Q(c, C); -+#endif -+ FP_CLEAR_EXCEPTIONS; -+ FP_HANDLE_EXCEPTIONS; -+ return c; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_qtod.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_qtod.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_qtod.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_qtod.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,45 @@ -+/* Software floating-point emulation. -+ Return (double)a -+ Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "double.h" -+#include "quad.h" -+ -+double _Q_qtod(const long double a) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); -+ FP_DECL_D(R); -+ double r; -+ -+ FP_INIT_ROUNDMODE; -+ FP_UNPACK_SEMIRAW_Q(A, a); -+#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q -+ FP_TRUNC(D,Q,2,4,R,A); -+#else -+ FP_TRUNC(D,Q,1,2,R,A); -+#endif -+ FP_PACK_SEMIRAW_D(r, R); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return r; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_qtoi.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_qtoi.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_qtoi.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_qtoi.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,38 @@ -+/* Software floating-point emulation. -+ Return (int)a -+ Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#define FP_ROUNDMODE FP_RND_ZERO -+#include "soft-fp.h" -+#include "quad.h" -+ -+int _Q_qtoi(const long double a) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); -+ unsigned int r; -+ -+ FP_UNPACK_RAW_Q(A, a); -+ FP_TO_INT_Q(r, A, 32, 1); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return r; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_qtoll.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_qtoll.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_qtoll.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_qtoll.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,38 @@ -+/* Software floating-point emulation. -+ Return (long long)a -+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#define FP_ROUNDMODE FP_RND_ZERO -+#include "soft-fp.h" -+#include "quad.h" -+ -+long long _Q_qtoll(const long double a) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); -+ unsigned long long r; -+ -+ FP_UNPACK_RAW_Q(A, a); -+ FP_TO_INT_Q(r, A, 64, 1); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return r; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_qtos.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_qtos.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_qtos.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_qtos.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,45 @@ -+/* Software floating-point emulation. -+ Return (float)a -+ Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "single.h" -+#include "quad.h" -+ -+float _Q_qtos(const long double a) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); -+ FP_DECL_S(R); -+ float r; -+ -+ FP_INIT_ROUNDMODE; -+ FP_UNPACK_SEMIRAW_Q(A, a); -+#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q -+ FP_TRUNC(S,Q,1,4,R,A); -+#else -+ FP_TRUNC(S,Q,1,2,R,A); -+#endif -+ FP_PACK_SEMIRAW_S(r, R); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return r; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_qtou.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_qtou.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_qtou.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_qtou.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,38 @@ -+/* Software floating-point emulation. -+ Return (unsigned int)a -+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#define FP_ROUNDMODE FP_RND_ZERO -+#include "soft-fp.h" -+#include "quad.h" -+ -+unsigned int _Q_qtou(const long double a) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); -+ unsigned int r; -+ -+ FP_UNPACK_RAW_Q(A, a); -+ FP_TO_INT_Q(r, A, 32, -1); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return r; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_qtoull.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_qtoull.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_qtoull.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_qtoull.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,38 @@ -+/* Software floating-point emulation. -+ Return (unsigned long long)a -+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#define FP_ROUNDMODE FP_RND_ZERO -+#include "soft-fp.h" -+#include "quad.h" -+ -+unsigned long long _Q_qtoull(const long double a) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); -+ unsigned long long r; -+ -+ FP_UNPACK_RAW_Q(A, a); -+ FP_TO_INT_Q(r, A, 64, -1); -+ FP_HANDLE_EXCEPTIONS; -+ -+ return r; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_sqrt.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_sqrt.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_sqrt.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_sqrt.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,39 @@ -+/* Software floating-point emulation. -+ Return sqrtl(a) -+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+long double _Q_sqrt(const long double a) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(C); -+ long double c; -+ -+ FP_INIT_ROUNDMODE; -+ FP_UNPACK_Q(A, a); -+ FP_SQRT_Q(C, A); -+ FP_PACK_Q(c, C); -+ FP_HANDLE_EXCEPTIONS; -+ return c; -+} -+strong_alias (_Q_sqrt, __ieee754_sqrtl); -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_stoq.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_stoq.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_stoq.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_stoq.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,43 @@ -+/* Software floating-point emulation. -+ c = (long double)(a) -+ Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "single.h" -+#include "quad.h" -+ -+long double _Q_stoq(const float a) -+{ -+ FP_DECL_EX; -+ FP_DECL_S(A); -+ FP_DECL_Q(C); -+ long double c; -+ -+ FP_UNPACK_RAW_S(A, a); -+#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q -+ FP_EXTEND(Q,S,4,1,C,A); -+#else -+ FP_EXTEND(Q,S,2,1,C,A); -+#endif -+ FP_PACK_RAW_Q(c, C); -+ FP_HANDLE_EXCEPTIONS; -+ return c; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_sub.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_sub.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_sub.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_sub.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,39 @@ -+/* Software floating-point emulation. -+ c = a - b -+ Copyright (C) 1997,1999,2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+long double _Q_sub(const long double a, const long double b) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(C); -+ long double c; -+ -+ FP_INIT_ROUNDMODE; -+ FP_UNPACK_SEMIRAW_Q(A, a); -+ FP_UNPACK_SEMIRAW_Q(B, b); -+ FP_SUB_Q(C, A, B); -+ FP_PACK_SEMIRAW_Q(c, C); -+ FP_HANDLE_EXCEPTIONS; -+ return c; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_ulltoq.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_ulltoq.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_ulltoq.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_ulltoq.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,38 @@ -+/* Software floating-point emulation. -+ Return (long double)(a) -+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+long double _Q_ulltoq(const unsigned long long a) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(C); -+ long double c; -+ unsigned long long b = a; -+ -+ FP_FROM_INT_Q(C, b, 64, unsigned long long); -+ FP_PACK_RAW_Q(c, C); -+ FP_CLEAR_EXCEPTIONS; -+ FP_HANDLE_EXCEPTIONS; -+ return c; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_util.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_util.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_util.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_util.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,57 @@ -+/* Software floating-point emulation. -+ Helper routine for _Q_* routines. -+ Simulate exceptions using double arithmetics. -+ Copyright (C) 1999 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+ -+unsigned long long ___Q_numbers [] = { -+0x0000000000000000ULL, /* Zero */ -+0x0010100000000000ULL, /* Very tiny number */ -+0x0010000000000000ULL, /* Minimum normalized number */ -+0x7fef000000000000ULL, /* A huge double number */ -+}; -+ -+double ___Q_simulate_exceptions(int exceptions) -+{ -+ double d, *p = (double *)___Q_numbers; -+ if (exceptions & FP_EX_INVALID) -+ d = p[0]/p[0]; -+ if (exceptions & FP_EX_OVERFLOW) -+ { -+ d = p[3] + p[3]; -+ exceptions &= ~FP_EX_INEXACT; -+ } -+ if (exceptions & FP_EX_UNDERFLOW) -+ { -+ if (exceptions & FP_EX_INEXACT) -+ { -+ d = p[2] * p[2]; -+ exceptions &= ~FP_EX_INEXACT; -+ } -+ else -+ d = p[1] - p[2]; -+ } -+ if (exceptions & FP_EX_DIVZERO) -+ d = 1.0/p[0]; -+ if (exceptions & FP_EX_INEXACT) -+ d = p[3] - p[2]; -+ return d; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_utoq.c uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_utoq.c ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/q_utoq.c 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/q_utoq.c 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,38 @@ -+/* Software floating-point emulation. -+ c = (long double)(a) -+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com) and -+ Jakub Jelinek (jj@ultra.linux.cz). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include "soft-fp.h" -+#include "quad.h" -+ -+long double _Q_utoq(const unsigned int a) -+{ -+ FP_DECL_EX; -+ FP_DECL_Q(C); -+ long double c; -+ unsigned int b = a; -+ -+ FP_FROM_INT_Q(C, b, 32, unsigned int); -+ FP_PACK_RAW_Q(c, C); -+ FP_CLEAR_EXCEPTIONS; -+ FP_HANDLE_EXCEPTIONS; -+ return c; -+} -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/quad.h uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/quad.h ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/quad.h 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/quad.h 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,271 @@ -+/* Software floating-point emulation. -+ Definitions for IEEE Quad Precision. -+ Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com), -+ Jakub Jelinek (jj@ultra.linux.cz), -+ David S. Miller (davem@redhat.com) and -+ Peter Maydell (pmaydell@chiark.greenend.org.uk). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ In addition to the permissions in the GNU Lesser General Public -+ License, the Free Software Foundation gives you unlimited -+ permission to link the compiled version of this file into -+ combinations with other programs, and to distribute those -+ combinations without any restriction coming from the use of this -+ file. (The Lesser General Public License restrictions do apply in -+ other respects; for example, they cover modification of the file, -+ and distribution when not linked into a combine executable.) -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, -+ MA 02110-1301, USA. */ -+ -+#if _FP_W_TYPE_SIZE < 32 -+#error "Here's a nickel, kid. Go buy yourself a real computer." -+#endif -+ -+#if _FP_W_TYPE_SIZE < 64 -+#define _FP_FRACTBITS_Q (4*_FP_W_TYPE_SIZE) -+#else -+#define _FP_FRACTBITS_Q (2*_FP_W_TYPE_SIZE) -+#endif -+ -+#define _FP_FRACBITS_Q 113 -+#define _FP_FRACXBITS_Q (_FP_FRACTBITS_Q - _FP_FRACBITS_Q) -+#define _FP_WFRACBITS_Q (_FP_WORKBITS + _FP_FRACBITS_Q) -+#define _FP_WFRACXBITS_Q (_FP_FRACTBITS_Q - _FP_WFRACBITS_Q) -+#define _FP_EXPBITS_Q 15 -+#define _FP_EXPBIAS_Q 16383 -+#define _FP_EXPMAX_Q 32767 -+ -+#define _FP_QNANBIT_Q \ -+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_Q-2) % _FP_W_TYPE_SIZE) -+#define _FP_QNANBIT_SH_Q \ -+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_Q-2+_FP_WORKBITS) % _FP_W_TYPE_SIZE) -+#define _FP_IMPLBIT_Q \ -+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_Q-1) % _FP_W_TYPE_SIZE) -+#define _FP_IMPLBIT_SH_Q \ -+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_Q-1+_FP_WORKBITS) % _FP_W_TYPE_SIZE) -+#define _FP_OVERFLOW_Q \ -+ ((_FP_W_TYPE)1 << (_FP_WFRACBITS_Q % _FP_W_TYPE_SIZE)) -+ -+typedef float TFtype __attribute__((mode(TF))); -+ -+#if _FP_W_TYPE_SIZE < 64 -+ -+union _FP_UNION_Q -+{ -+ TFtype flt; -+ struct -+ { -+#if __BYTE_ORDER == __BIG_ENDIAN -+ unsigned sign : 1; -+ unsigned exp : _FP_EXPBITS_Q; -+ unsigned long frac3 : _FP_FRACBITS_Q - (_FP_IMPLBIT_Q != 0)-(_FP_W_TYPE_SIZE * 3); -+ unsigned long frac2 : _FP_W_TYPE_SIZE; -+ unsigned long frac1 : _FP_W_TYPE_SIZE; -+ unsigned long frac0 : _FP_W_TYPE_SIZE; -+#else -+ unsigned long frac0 : _FP_W_TYPE_SIZE; -+ unsigned long frac1 : _FP_W_TYPE_SIZE; -+ unsigned long frac2 : _FP_W_TYPE_SIZE; -+ unsigned long frac3 : _FP_FRACBITS_Q - (_FP_IMPLBIT_Q != 0)-(_FP_W_TYPE_SIZE * 3); -+ unsigned exp : _FP_EXPBITS_Q; -+ unsigned sign : 1; -+#endif /* not bigendian */ -+ } bits __attribute__((packed)); -+}; -+ -+ -+#define FP_DECL_Q(X) _FP_DECL(4,X) -+#define FP_UNPACK_RAW_Q(X,val) _FP_UNPACK_RAW_4(Q,X,val) -+#define FP_UNPACK_RAW_QP(X,val) _FP_UNPACK_RAW_4_P(Q,X,val) -+#define FP_PACK_RAW_Q(val,X) _FP_PACK_RAW_4(Q,val,X) -+#define FP_PACK_RAW_QP(val,X) \ -+ do { \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_4_P(Q,val,X); \ -+ } while (0) -+ -+#define FP_UNPACK_Q(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_4(Q,X,val); \ -+ _FP_UNPACK_CANONICAL(Q,4,X); \ -+ } while (0) -+ -+#define FP_UNPACK_QP(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_4_P(Q,X,val); \ -+ _FP_UNPACK_CANONICAL(Q,4,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_Q(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_4(Q,X,val); \ -+ _FP_UNPACK_SEMIRAW(Q,4,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_QP(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_4_P(Q,X,val); \ -+ _FP_UNPACK_SEMIRAW(Q,4,X); \ -+ } while (0) -+ -+#define FP_PACK_Q(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(Q,4,X); \ -+ _FP_PACK_RAW_4(Q,val,X); \ -+ } while (0) -+ -+#define FP_PACK_QP(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(Q,4,X); \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_4_P(Q,val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_Q(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(Q,4,X); \ -+ _FP_PACK_RAW_4(Q,val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_QP(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(Q,4,X); \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_4_P(Q,val,X); \ -+ } while (0) -+ -+#define FP_ISSIGNAN_Q(X) _FP_ISSIGNAN(Q,4,X) -+#define FP_NEG_Q(R,X) _FP_NEG(Q,4,R,X) -+#define FP_ADD_Q(R,X,Y) _FP_ADD(Q,4,R,X,Y) -+#define FP_SUB_Q(R,X,Y) _FP_SUB(Q,4,R,X,Y) -+#define FP_MUL_Q(R,X,Y) _FP_MUL(Q,4,R,X,Y) -+#define FP_DIV_Q(R,X,Y) _FP_DIV(Q,4,R,X,Y) -+#define FP_SQRT_Q(R,X) _FP_SQRT(Q,4,R,X) -+#define _FP_SQRT_MEAT_Q(R,S,T,X,Q) _FP_SQRT_MEAT_4(R,S,T,X,Q) -+ -+#define FP_CMP_Q(r,X,Y,un) _FP_CMP(Q,4,r,X,Y,un) -+#define FP_CMP_EQ_Q(r,X,Y) _FP_CMP_EQ(Q,4,r,X,Y) -+#define FP_CMP_UNORD_Q(r,X,Y) _FP_CMP_UNORD(Q,4,r,X,Y) -+ -+#define FP_TO_INT_Q(r,X,rsz,rsg) _FP_TO_INT(Q,4,r,X,rsz,rsg) -+#define FP_FROM_INT_Q(X,r,rs,rt) _FP_FROM_INT(Q,4,X,r,rs,rt) -+ -+#define _FP_FRAC_HIGH_Q(X) _FP_FRAC_HIGH_4(X) -+#define _FP_FRAC_HIGH_RAW_Q(X) _FP_FRAC_HIGH_4(X) -+ -+#else /* not _FP_W_TYPE_SIZE < 64 */ -+union _FP_UNION_Q -+{ -+ TFtype flt /* __attribute__((mode(TF))) */ ; -+ struct { -+ _FP_W_TYPE a, b; -+ } longs; -+ struct { -+#if __BYTE_ORDER == __BIG_ENDIAN -+ unsigned sign : 1; -+ unsigned exp : _FP_EXPBITS_Q; -+ _FP_W_TYPE frac1 : _FP_FRACBITS_Q - (_FP_IMPLBIT_Q != 0) - _FP_W_TYPE_SIZE; -+ _FP_W_TYPE frac0 : _FP_W_TYPE_SIZE; -+#else -+ _FP_W_TYPE frac0 : _FP_W_TYPE_SIZE; -+ _FP_W_TYPE frac1 : _FP_FRACBITS_Q - (_FP_IMPLBIT_Q != 0) - _FP_W_TYPE_SIZE; -+ unsigned exp : _FP_EXPBITS_Q; -+ unsigned sign : 1; -+#endif -+ } bits; -+}; -+ -+#define FP_DECL_Q(X) _FP_DECL(2,X) -+#define FP_UNPACK_RAW_Q(X,val) _FP_UNPACK_RAW_2(Q,X,val) -+#define FP_UNPACK_RAW_QP(X,val) _FP_UNPACK_RAW_2_P(Q,X,val) -+#define FP_PACK_RAW_Q(val,X) _FP_PACK_RAW_2(Q,val,X) -+#define FP_PACK_RAW_QP(val,X) \ -+ do { \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_2_P(Q,val,X); \ -+ } while (0) -+ -+#define FP_UNPACK_Q(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_2(Q,X,val); \ -+ _FP_UNPACK_CANONICAL(Q,2,X); \ -+ } while (0) -+ -+#define FP_UNPACK_QP(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_2_P(Q,X,val); \ -+ _FP_UNPACK_CANONICAL(Q,2,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_Q(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_2(Q,X,val); \ -+ _FP_UNPACK_SEMIRAW(Q,2,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_QP(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_2_P(Q,X,val); \ -+ _FP_UNPACK_SEMIRAW(Q,2,X); \ -+ } while (0) -+ -+#define FP_PACK_Q(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(Q,2,X); \ -+ _FP_PACK_RAW_2(Q,val,X); \ -+ } while (0) -+ -+#define FP_PACK_QP(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(Q,2,X); \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_2_P(Q,val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_Q(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(Q,2,X); \ -+ _FP_PACK_RAW_2(Q,val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_QP(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(Q,2,X); \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_2_P(Q,val,X); \ -+ } while (0) -+ -+#define FP_ISSIGNAN_Q(X) _FP_ISSIGNAN(Q,2,X) -+#define FP_NEG_Q(R,X) _FP_NEG(Q,2,R,X) -+#define FP_ADD_Q(R,X,Y) _FP_ADD(Q,2,R,X,Y) -+#define FP_SUB_Q(R,X,Y) _FP_SUB(Q,2,R,X,Y) -+#define FP_MUL_Q(R,X,Y) _FP_MUL(Q,2,R,X,Y) -+#define FP_DIV_Q(R,X,Y) _FP_DIV(Q,2,R,X,Y) -+#define FP_SQRT_Q(R,X) _FP_SQRT(Q,2,R,X) -+#define _FP_SQRT_MEAT_Q(R,S,T,X,Q) _FP_SQRT_MEAT_2(R,S,T,X,Q) -+ -+#define FP_CMP_Q(r,X,Y,un) _FP_CMP(Q,2,r,X,Y,un) -+#define FP_CMP_EQ_Q(r,X,Y) _FP_CMP_EQ(Q,2,r,X,Y) -+#define FP_CMP_UNORD_Q(r,X,Y) _FP_CMP_UNORD(Q,2,r,X,Y) -+ -+#define FP_TO_INT_Q(r,X,rsz,rsg) _FP_TO_INT(Q,2,r,X,rsz,rsg) -+#define FP_FROM_INT_Q(X,r,rs,rt) _FP_FROM_INT(Q,2,X,r,rs,rt) -+ -+#define _FP_FRAC_HIGH_Q(X) _FP_FRAC_HIGH_2(X) -+#define _FP_FRAC_HIGH_RAW_Q(X) _FP_FRAC_HIGH_2(X) -+ -+#endif /* not _FP_W_TYPE_SIZE < 64 */ -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/sfp-machine.h uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/sfp-machine.h ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/sfp-machine.h 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/sfp-machine.h 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,213 @@ -+/* Machine-dependent software floating-point definitions. -+ Sparc userland (_Q_*) version. -+ Copyright (C) 1997,1998,1999, 2002, 2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com), -+ Jakub Jelinek (jj@ultra.linux.cz) and -+ David S. Miller (davem@redhat.com). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+ -+#define _FP_W_TYPE_SIZE 32 -+#define _FP_W_TYPE unsigned long -+#define _FP_WS_TYPE signed long -+#define _FP_I_TYPE long -+ -+#define _FP_MUL_MEAT_S(R,X,Y) \ -+ _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm) -+#define _FP_MUL_MEAT_D(R,X,Y) \ -+ _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm) -+#define _FP_MUL_MEAT_Q(R,X,Y) \ -+ _FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm) -+ -+#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_udiv(S,R,X,Y) -+#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_2_udiv(D,R,X,Y) -+#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_4_udiv(Q,R,X,Y) -+ -+#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1) -+#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1), -1 -+#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1 -+#define _FP_NANSIGN_S 0 -+#define _FP_NANSIGN_D 0 -+#define _FP_NANSIGN_Q 0 -+ -+#define _FP_KEEPNANFRACP 1 -+ -+/* If one NaN is signaling and the other is not, -+ * we choose that one, otherwise we choose X. -+ */ -+/* For _Qp_* and _Q_*, this should prefer X, for -+ * CPU instruction emulation this should prefer Y. -+ * (see SPAMv9 B.2.2 section). -+ */ -+#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \ -+ do { \ -+ if ((_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs) \ -+ && !(_FP_FRAC_HIGH_RAW_##fs(Y) & _FP_QNANBIT_##fs)) \ -+ { \ -+ R##_s = Y##_s; \ -+ _FP_FRAC_COPY_##wc(R,Y); \ -+ } \ -+ else \ -+ { \ -+ R##_s = X##_s; \ -+ _FP_FRAC_COPY_##wc(R,X); \ -+ } \ -+ R##_c = FP_CLS_NAN; \ -+ } while (0) -+ -+/* Some assembly to speed things up. */ -+#define __FP_FRAC_ADD_3(r2,r1,r0,x2,x1,x0,y2,y1,y0) \ -+ __asm__ ("addcc %r7,%8,%2\n\ -+ addxcc %r5,%6,%1\n\ -+ addx %r3,%4,%0" \ -+ : "=r" ((USItype)(r2)), \ -+ "=&r" ((USItype)(r1)), \ -+ "=&r" ((USItype)(r0)) \ -+ : "%rJ" ((USItype)(x2)), \ -+ "rI" ((USItype)(y2)), \ -+ "%rJ" ((USItype)(x1)), \ -+ "rI" ((USItype)(y1)), \ -+ "%rJ" ((USItype)(x0)), \ -+ "rI" ((USItype)(y0)) \ -+ : "cc") -+ -+#define __FP_FRAC_SUB_3(r2,r1,r0,x2,x1,x0,y2,y1,y0) \ -+ __asm__ ("subcc %r7,%8,%2\n\ -+ subxcc %r5,%6,%1\n\ -+ subx %r3,%4,%0" \ -+ : "=r" ((USItype)(r2)), \ -+ "=&r" ((USItype)(r1)), \ -+ "=&r" ((USItype)(r0)) \ -+ : "%rJ" ((USItype)(x2)), \ -+ "rI" ((USItype)(y2)), \ -+ "%rJ" ((USItype)(x1)), \ -+ "rI" ((USItype)(y1)), \ -+ "%rJ" ((USItype)(x0)), \ -+ "rI" ((USItype)(y0)) \ -+ : "cc") -+ -+#define __FP_FRAC_ADD_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \ -+ do { \ -+ /* We need to fool gcc, as we need to pass more than 10 \ -+ input/outputs. */ \ -+ register USItype _t1 __asm__ ("g1"), _t2 __asm__ ("g2"); \ -+ __asm__ __volatile__ ("\ -+ addcc %r8,%9,%1\n\ -+ addxcc %r6,%7,%0\n\ -+ addxcc %r4,%5,%%g2\n\ -+ addx %r2,%3,%%g1" \ -+ : "=&r" ((USItype)(r1)), \ -+ "=&r" ((USItype)(r0)) \ -+ : "%rJ" ((USItype)(x3)), \ -+ "rI" ((USItype)(y3)), \ -+ "%rJ" ((USItype)(x2)), \ -+ "rI" ((USItype)(y2)), \ -+ "%rJ" ((USItype)(x1)), \ -+ "rI" ((USItype)(y1)), \ -+ "%rJ" ((USItype)(x0)), \ -+ "rI" ((USItype)(y0)) \ -+ : "cc", "g1", "g2"); \ -+ __asm__ __volatile__ ("" : "=r" (_t1), "=r" (_t2)); \ -+ r3 = _t1; r2 = _t2; \ -+ } while (0) -+ -+#define __FP_FRAC_SUB_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \ -+ do { \ -+ /* We need to fool gcc, as we need to pass more than 10 \ -+ input/outputs. */ \ -+ register USItype _t1 __asm__ ("g1"), _t2 __asm__ ("g2"); \ -+ __asm__ __volatile__ ("\ -+ subcc %r8,%9,%1\n\ -+ subxcc %r6,%7,%0\n\ -+ subxcc %r4,%5,%%g2\n\ -+ subx %r2,%3,%%g1" \ -+ : "=&r" ((USItype)(r1)), \ -+ "=&r" ((USItype)(r0)) \ -+ : "%rJ" ((USItype)(x3)), \ -+ "rI" ((USItype)(y3)), \ -+ "%rJ" ((USItype)(x2)), \ -+ "rI" ((USItype)(y2)), \ -+ "%rJ" ((USItype)(x1)), \ -+ "rI" ((USItype)(y1)), \ -+ "%rJ" ((USItype)(x0)), \ -+ "rI" ((USItype)(y0)) \ -+ : "cc", "g1", "g2"); \ -+ __asm__ __volatile__ ("" : "=r" (_t1), "=r" (_t2)); \ -+ r3 = _t1; r2 = _t2; \ -+ } while (0) -+ -+#define __FP_FRAC_DEC_3(x2,x1,x0,y2,y1,y0) __FP_FRAC_SUB_3(x2,x1,x0,x2,x1,x0,y2,y1,y0) -+ -+#define __FP_FRAC_DEC_4(x3,x2,x1,x0,y3,y2,y1,y0) __FP_FRAC_SUB_4(x3,x2,x1,x0,x3,x2,x1,x0,y3,y2,y1,y0) -+ -+#define __FP_FRAC_ADDI_4(x3,x2,x1,x0,i) \ -+ __asm__ ("addcc %3,%4,%3\n\ -+ addxcc %2,%%g0,%2\n\ -+ addxcc %1,%%g0,%1\n\ -+ addx %0,%%g0,%0" \ -+ : "=&r" ((USItype)(x3)), \ -+ "=&r" ((USItype)(x2)), \ -+ "=&r" ((USItype)(x1)), \ -+ "=&r" ((USItype)(x0)) \ -+ : "rI" ((USItype)(i)), \ -+ "0" ((USItype)(x3)), \ -+ "1" ((USItype)(x2)), \ -+ "2" ((USItype)(x1)), \ -+ "3" ((USItype)(x0)) \ -+ : "cc") -+ -+/* Obtain the current rounding mode. */ -+#ifndef FP_ROUNDMODE -+#define FP_ROUNDMODE ((_fcw >> 30) & 0x3) -+#endif -+ -+/* Exception flags. */ -+#define FP_EX_INVALID (1 << 4) -+#define FP_EX_OVERFLOW (1 << 3) -+#define FP_EX_UNDERFLOW (1 << 2) -+#define FP_EX_DIVZERO (1 << 1) -+#define FP_EX_INEXACT (1 << 0) -+ -+#define _FP_DECL_EX fpu_control_t _fcw -+ -+#define FP_INIT_ROUNDMODE \ -+do { \ -+ _FPU_GETCW(_fcw); \ -+} while (0) -+ -+/* Simulate exceptions using double arithmetics. */ -+extern double ___Q_simulate_exceptions(int exc); -+ -+#define FP_HANDLE_EXCEPTIONS \ -+do { \ -+ if (!_fex) \ -+ { \ -+ /* This is the common case, so we do it inline. \ -+ * We need to clear cexc bits if any. \ -+ */ \ -+ extern unsigned long long ___Q_numbers[]; \ -+ __asm__ __volatile__("\ -+ ldd [%0], %%f30\n\ -+ faddd %%f30, %%f30, %%f30\ -+ " : : "r" (___Q_numbers) : "f30"); \ -+ } \ -+ else \ -+ ___Q_simulate_exceptions (_fex); \ -+} while (0) -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/single.h uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/single.h ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/single.h 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/single.h 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,151 @@ -+/* Software floating-point emulation. -+ Definitions for IEEE Single Precision. -+ Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com), -+ Jakub Jelinek (jj@ultra.linux.cz), -+ David S. Miller (davem@redhat.com) and -+ Peter Maydell (pmaydell@chiark.greenend.org.uk). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ In addition to the permissions in the GNU Lesser General Public -+ License, the Free Software Foundation gives you unlimited -+ permission to link the compiled version of this file into -+ combinations with other programs, and to distribute those -+ combinations without any restriction coming from the use of this -+ file. (The Lesser General Public License restrictions do apply in -+ other respects; for example, they cover modification of the file, -+ and distribution when not linked into a combine executable.) -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, -+ MA 02110-1301, USA. */ -+ -+#if _FP_W_TYPE_SIZE < 32 -+#error "Here's a nickel kid. Go buy yourself a real computer." -+#endif -+ -+#define _FP_FRACTBITS_S _FP_W_TYPE_SIZE -+ -+#define _FP_FRACBITS_S 24 -+#define _FP_FRACXBITS_S (_FP_FRACTBITS_S - _FP_FRACBITS_S) -+#define _FP_WFRACBITS_S (_FP_WORKBITS + _FP_FRACBITS_S) -+#define _FP_WFRACXBITS_S (_FP_FRACTBITS_S - _FP_WFRACBITS_S) -+#define _FP_EXPBITS_S 8 -+#define _FP_EXPBIAS_S 127 -+#define _FP_EXPMAX_S 255 -+#define _FP_QNANBIT_S ((_FP_W_TYPE)1 << (_FP_FRACBITS_S-2)) -+#define _FP_QNANBIT_SH_S ((_FP_W_TYPE)1 << (_FP_FRACBITS_S-2+_FP_WORKBITS)) -+#define _FP_IMPLBIT_S ((_FP_W_TYPE)1 << (_FP_FRACBITS_S-1)) -+#define _FP_IMPLBIT_SH_S ((_FP_W_TYPE)1 << (_FP_FRACBITS_S-1+_FP_WORKBITS)) -+#define _FP_OVERFLOW_S ((_FP_W_TYPE)1 << (_FP_WFRACBITS_S)) -+ -+/* The implementation of _FP_MUL_MEAT_S and _FP_DIV_MEAT_S should be -+ chosen by the target machine. */ -+ -+typedef float SFtype __attribute__((mode(SF))); -+ -+union _FP_UNION_S -+{ -+ SFtype flt; -+ struct { -+#if __BYTE_ORDER == __BIG_ENDIAN -+ unsigned sign : 1; -+ unsigned exp : _FP_EXPBITS_S; -+ unsigned frac : _FP_FRACBITS_S - (_FP_IMPLBIT_S != 0); -+#else -+ unsigned frac : _FP_FRACBITS_S - (_FP_IMPLBIT_S != 0); -+ unsigned exp : _FP_EXPBITS_S; -+ unsigned sign : 1; -+#endif -+ } bits __attribute__((packed)); -+}; -+ -+#define FP_DECL_S(X) _FP_DECL(1,X) -+#define FP_UNPACK_RAW_S(X,val) _FP_UNPACK_RAW_1(S,X,val) -+#define FP_UNPACK_RAW_SP(X,val) _FP_UNPACK_RAW_1_P(S,X,val) -+#define FP_PACK_RAW_S(val,X) _FP_PACK_RAW_1(S,val,X) -+#define FP_PACK_RAW_SP(val,X) \ -+ do { \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_1_P(S,val,X); \ -+ } while (0) -+ -+#define FP_UNPACK_S(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_1(S,X,val); \ -+ _FP_UNPACK_CANONICAL(S,1,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SP(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_1_P(S,X,val); \ -+ _FP_UNPACK_CANONICAL(S,1,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_S(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_1(S,X,val); \ -+ _FP_UNPACK_SEMIRAW(S,1,X); \ -+ } while (0) -+ -+#define FP_UNPACK_SEMIRAW_SP(X,val) \ -+ do { \ -+ _FP_UNPACK_RAW_1_P(S,X,val); \ -+ _FP_UNPACK_SEMIRAW(S,1,X); \ -+ } while (0) -+ -+#define FP_PACK_S(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(S,1,X); \ -+ _FP_PACK_RAW_1(S,val,X); \ -+ } while (0) -+ -+#define FP_PACK_SP(val,X) \ -+ do { \ -+ _FP_PACK_CANONICAL(S,1,X); \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_1_P(S,val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_S(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(S,1,X); \ -+ _FP_PACK_RAW_1(S,val,X); \ -+ } while (0) -+ -+#define FP_PACK_SEMIRAW_SP(val,X) \ -+ do { \ -+ _FP_PACK_SEMIRAW(S,1,X); \ -+ if (!FP_INHIBIT_RESULTS) \ -+ _FP_PACK_RAW_1_P(S,val,X); \ -+ } while (0) -+ -+#define FP_ISSIGNAN_S(X) _FP_ISSIGNAN(S,1,X) -+#define FP_NEG_S(R,X) _FP_NEG(S,1,R,X) -+#define FP_ADD_S(R,X,Y) _FP_ADD(S,1,R,X,Y) -+#define FP_SUB_S(R,X,Y) _FP_SUB(S,1,R,X,Y) -+#define FP_MUL_S(R,X,Y) _FP_MUL(S,1,R,X,Y) -+#define FP_DIV_S(R,X,Y) _FP_DIV(S,1,R,X,Y) -+#define FP_SQRT_S(R,X) _FP_SQRT(S,1,R,X) -+#define _FP_SQRT_MEAT_S(R,S,T,X,Q) _FP_SQRT_MEAT_1(R,S,T,X,Q) -+ -+#define FP_CMP_S(r,X,Y,un) _FP_CMP(S,1,r,X,Y,un) -+#define FP_CMP_EQ_S(r,X,Y) _FP_CMP_EQ(S,1,r,X,Y) -+#define FP_CMP_UNORD_S(r,X,Y) _FP_CMP_UNORD(S,1,r,X,Y) -+ -+#define FP_TO_INT_S(r,X,rsz,rsg) _FP_TO_INT(S,1,r,X,rsz,rsg) -+#define FP_FROM_INT_S(X,r,rs,rt) _FP_FROM_INT(S,1,X,r,rs,rt) -+ -+#define _FP_FRAC_HIGH_S(X) _FP_FRAC_HIGH_1(X) -+#define _FP_FRAC_HIGH_RAW_S(X) _FP_FRAC_HIGH_1(X) -diff -Naur uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/soft-fp.h uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/soft-fp.h ---- uClibc-0.9.31.ori/libc/sysdeps/linux/sparc/soft-fp/soft-fp.h 1970-01-01 01:00:00.000000000 +0100 -+++ uClibc-0.9.31/libc/sysdeps/linux/sparc/soft-fp/soft-fp.h 2010-10-14 14:05:37.000000000 +0200 -@@ -0,0 +1,205 @@ -+/* Software floating-point emulation. -+ Copyright (C) 1997,1998,1999,2000,2002,2003,2005,2006,2007 -+ Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ Contributed by Richard Henderson (rth@cygnus.com), -+ Jakub Jelinek (jj@ultra.linux.cz), -+ David S. Miller (davem@redhat.com) and -+ Peter Maydell (pmaydell@chiark.greenend.org.uk). -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ In addition to the permissions in the GNU Lesser General Public -+ License, the Free Software Foundation gives you unlimited -+ permission to link the compiled version of this file into -+ combinations with other programs, and to distribute those -+ combinations without any restriction coming from the use of this -+ file. (The Lesser General Public License restrictions do apply in -+ other respects; for example, they cover modification of the file, -+ and distribution when not linked into a combine executable.) -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, -+ MA 02110-1301, USA. */ -+ -+#ifndef SOFT_FP_H -+#define SOFT_FP_H -+ -+#include "sfp-machine.h" -+ -+/* Allow sfp-machine to have its own byte order definitions. */ -+#ifndef __BYTE_ORDER -+#ifdef _LIBC -+#include -+#else -+#error "endianness not defined by sfp-machine.h" -+#endif -+#endif -+ -+#define _FP_WORKBITS 3 -+#define _FP_WORK_LSB ((_FP_W_TYPE)1 << 3) -+#define _FP_WORK_ROUND ((_FP_W_TYPE)1 << 2) -+#define _FP_WORK_GUARD ((_FP_W_TYPE)1 << 1) -+#define _FP_WORK_STICKY ((_FP_W_TYPE)1 << 0) -+ -+#ifndef FP_RND_NEAREST -+# define FP_RND_NEAREST 0 -+# define FP_RND_ZERO 1 -+# define FP_RND_PINF 2 -+# define FP_RND_MINF 3 -+#endif -+#ifndef FP_ROUNDMODE -+# define FP_ROUNDMODE FP_RND_NEAREST -+#endif -+ -+/* By default don't care about exceptions. */ -+#ifndef FP_EX_INVALID -+#define FP_EX_INVALID 0 -+#endif -+#ifndef FP_EX_OVERFLOW -+#define FP_EX_OVERFLOW 0 -+#endif -+#ifndef FP_EX_UNDERFLOW -+#define FP_EX_UNDERFLOW 0 -+#endif -+#ifndef FP_EX_DIVZERO -+#define FP_EX_DIVZERO 0 -+#endif -+#ifndef FP_EX_INEXACT -+#define FP_EX_INEXACT 0 -+#endif -+#ifndef FP_EX_DENORM -+#define FP_EX_DENORM 0 -+#endif -+ -+#ifdef _FP_DECL_EX -+#define FP_DECL_EX \ -+ int _fex = 0; \ -+ _FP_DECL_EX -+#else -+#define FP_DECL_EX int _fex = 0 -+#endif -+ -+#ifndef FP_INIT_ROUNDMODE -+#define FP_INIT_ROUNDMODE do {} while (0) -+#endif -+ -+#ifndef FP_HANDLE_EXCEPTIONS -+#define FP_HANDLE_EXCEPTIONS do {} while (0) -+#endif -+ -+#ifndef FP_INHIBIT_RESULTS -+/* By default we write the results always. -+ * sfp-machine may override this and e.g. -+ * check if some exceptions are unmasked -+ * and inhibit it in such a case. -+ */ -+#define FP_INHIBIT_RESULTS 0 -+#endif -+ -+#define FP_SET_EXCEPTION(ex) \ -+ _fex |= (ex) -+ -+#define FP_UNSET_EXCEPTION(ex) \ -+ _fex &= ~(ex) -+ -+#define FP_CLEAR_EXCEPTIONS \ -+ _fex = 0 -+ -+#define _FP_ROUND_NEAREST(wc, X) \ -+do { \ -+ if ((_FP_FRAC_LOW_##wc(X) & 15) != _FP_WORK_ROUND) \ -+ _FP_FRAC_ADDI_##wc(X, _FP_WORK_ROUND); \ -+} while (0) -+ -+#define _FP_ROUND_ZERO(wc, X) (void)0 -+ -+#define _FP_ROUND_PINF(wc, X) \ -+do { \ -+ if (!X##_s && (_FP_FRAC_LOW_##wc(X) & 7)) \ -+ _FP_FRAC_ADDI_##wc(X, _FP_WORK_LSB); \ -+} while (0) -+ -+#define _FP_ROUND_MINF(wc, X) \ -+do { \ -+ if (X##_s && (_FP_FRAC_LOW_##wc(X) & 7)) \ -+ _FP_FRAC_ADDI_##wc(X, _FP_WORK_LSB); \ -+} while (0) -+ -+#define _FP_ROUND(wc, X) \ -+do { \ -+ if (_FP_FRAC_LOW_##wc(X) & 7) \ -+ FP_SET_EXCEPTION(FP_EX_INEXACT); \ -+ switch (FP_ROUNDMODE) \ -+ { \ -+ case FP_RND_NEAREST: \ -+ _FP_ROUND_NEAREST(wc,X); \ -+ break; \ -+ case FP_RND_ZERO: \ -+ _FP_ROUND_ZERO(wc,X); \ -+ break; \ -+ case FP_RND_PINF: \ -+ _FP_ROUND_PINF(wc,X); \ -+ break; \ -+ case FP_RND_MINF: \ -+ _FP_ROUND_MINF(wc,X); \ -+ break; \ -+ } \ -+} while (0) -+ -+#define FP_CLS_NORMAL 0 -+#define FP_CLS_ZERO 1 -+#define FP_CLS_INF 2 -+#define FP_CLS_NAN 3 -+ -+#define _FP_CLS_COMBINE(x,y) (((x) << 2) | (y)) -+ -+#include "op-1.h" -+#include "op-2.h" -+#include "op-4.h" -+#include "op-8.h" -+#include "op-common.h" -+ -+/* Sigh. Silly things longlong.h needs. */ -+#define UWtype _FP_W_TYPE -+#define W_TYPE_SIZE _FP_W_TYPE_SIZE -+ -+typedef int QItype __attribute__((mode(QI))); -+typedef int SItype __attribute__((mode(SI))); -+typedef int DItype __attribute__((mode(DI))); -+typedef unsigned int UQItype __attribute__((mode(QI))); -+typedef unsigned int USItype __attribute__((mode(SI))); -+typedef unsigned int UDItype __attribute__((mode(DI))); -+#if _FP_W_TYPE_SIZE == 32 -+typedef unsigned int UHWtype __attribute__((mode(HI))); -+#elif _FP_W_TYPE_SIZE == 64 -+typedef USItype UHWtype; -+#endif -+ -+#ifndef CMPtype -+#define CMPtype int -+#endif -+ -+#define SI_BITS (__CHAR_BIT__ * (int)sizeof(SItype)) -+#define DI_BITS (__CHAR_BIT__ * (int)sizeof(DItype)) -+ -+#ifndef umul_ppmm -+#include "longlong.h" -+#endif -+ -+#ifdef _LIBC -+#include -+#else -+extern void abort (void); -+#endif -+ -+#endif diff --git a/toolchain/uClibc/uClibc-0.9.31-workaround-GCC-PR32219.patch b/toolchain/uClibc/uClibc-0.9.31-workaround-GCC-PR32219.patch deleted file mode 100644 index 242a526..0000000 --- a/toolchain/uClibc/uClibc-0.9.31-workaround-GCC-PR32219.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 2e53dd645d5348f207cec7f8595969dc566c5a55 Mon Sep 17 00:00:00 2001 -From: Denys Vlasenko -Date: Mon, 17 May 2010 15:56:19 +0200 -Subject: [PATCH] workaround GCC PR32219 - -we ended up calling 0 -Fixes bug #1033 - -Signed-off-by: Denys Vlasenko -Signed-off-by: Bernhard Reutner-Fischer ---- - libc/misc/internals/__uClibc_main.c | 15 +++++++++++++-- - 1 files changed, 13 insertions(+), 2 deletions(-) - -diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c -index f9e1244..4ee4443 100644 ---- a/libc/misc/internals/__uClibc_main.c -+++ b/libc/misc/internals/__uClibc_main.c -@@ -105,6 +105,17 @@ _pthread_cleanup_pop_restore(struct _pthread_cleanup_buffer *__buffer, - - #endif /* !SHARED */ - -+/* Defeat compiler optimization which assumes function addresses are never NULL */ -+static __always_inline int not_null_ptr(const void *p) -+{ -+ const void *q; -+ __asm__ ("" -+ : "=r" (q) /* output */ -+ : "0" (p) /* input */ -+ ); -+ return q != 0; -+} -+ - /* - * Prototypes. - */ -@@ -254,7 +265,7 @@ void __uClibc_init(void) - - #ifdef __UCLIBC_HAS_LOCALE__ - /* Initialize the global locale structure. */ -- if (likely(_locale_init!=NULL)) -+ if (likely(not_null_ptr(_locale_init))) - _locale_init(); - #endif - -@@ -264,7 +275,7 @@ void __uClibc_init(void) - * Thus we get a nice size savings because the stdio functions - * won't be pulled into the final static binary unless used. - */ -- if (likely(_stdio_init != NULL)) -+ if (likely(not_null_ptr(_stdio_init))) - _stdio_init(); - - } --- -1.7.1 - diff --git a/toolchain/uClibc/uClibc-0.9.32-rc3-linuxthreads-errno-fix.patch b/toolchain/uClibc/uClibc-0.9.32-rc3-linuxthreads-errno-fix.patch deleted file mode 100644 index 7335173..0000000 --- a/toolchain/uClibc/uClibc-0.9.32-rc3-linuxthreads-errno-fix.patch +++ /dev/null @@ -1,70 +0,0 @@ -From af8b2d71ce37b9d4d24ddbc755cdea68de02949a Mon Sep 17 00:00:00 2001 -From: Peter Korsgaard -Date: Mon, 5 Jul 2010 14:08:17 +0200 -Subject: [PATCH] don't make __errno_location / __h_errno_location hidden - -Closes #2089 (https://bugs.busybox.net/show_bug.cgi?id=2089) - -__errno_location / __h_errno_location access has to go through the PLT -like malloc/free, so the linuxthread variants gets used instead when -compiling with -pthread. - -Based on http://github.com/mat-c/uClibc/commit/328d392c54aa5dc2b8e7f398a419087de497de2b - -Signed-off-by: Peter Korsgaard ---- - include/netdb.h | 1 - - libc/misc/internals/__errno_location.c | 3 --- - libc/misc/internals/__h_errno_location.c | 1 - - libc/sysdeps/linux/common/bits/errno.h | 1 - - 6 files changed, 0 insertions(+), 11 deletions(-) - -diff --git a/include/netdb.h b/include/netdb.h -index 9d3807d..ac411ab 100644 ---- a/include/netdb.h -+++ b/include/netdb.h -@@ -59,7 +59,6 @@ __BEGIN_DECLS - - /* Function to get address of global `h_errno' variable. */ - extern int *__h_errno_location (void) __THROW __attribute__ ((__const__)); --libc_hidden_proto(__h_errno_location) - - /* Macros for accessing h_errno from inside libc. */ - #ifdef _LIBC -diff --git a/libc/misc/internals/__errno_location.c b/libc/misc/internals/__errno_location.c -index 487a9c2..0620860 100644 ---- a/libc/misc/internals/__errno_location.c -+++ b/libc/misc/internals/__errno_location.c -@@ -15,6 +15,3 @@ int * weak_const_function __errno_location (void) - { - return &errno; - } --#ifdef IS_IN_libc /* not really need, only to keep in sync w/ libc_hidden_proto */ --libc_hidden_weak(__errno_location) --#endif -diff --git a/libc/misc/internals/__h_errno_location.c b/libc/misc/internals/__h_errno_location.c -index 213d398..235df4e 100644 ---- a/libc/misc/internals/__h_errno_location.c -+++ b/libc/misc/internals/__h_errno_location.c -@@ -10,4 +10,3 @@ int * weak_const_function __h_errno_location (void) - { - return &h_errno; - } --libc_hidden_weak(__h_errno_location) -diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c -index 6e520fa..f4a9ebb 100644 ---- a/libc/sysdeps/linux/common/bits/errno.h -+++ b/libc/sysdeps/linux/common/bits/errno.h -@@ -43,7 +43,6 @@ - # ifndef __ASSEMBLER__ - /* Function to get address of global `errno' variable. */ - extern int *__errno_location (void) __THROW __attribute__ ((__const__)); --libc_hidden_proto(__errno_location) - - # ifdef __UCLIBC_HAS_THREADS__ - /* When using threads, errno is a per-thread value. */ -diff --git a/libc/sysdeps/linux/common/bits/uClibc_errno.h b/libc/sysdeps/linux/common/bits/uClibc_errno.h -index 9c15618..79eb7e6 100644 --- -1.7.1 -