Vladimir 'phcoder' Serbinenko
275568816c
* grub-core/lib/posix_wrap/wchar.h (mbrtowc): Set pwc to zero to avoid
...
uninited variable.
2012-02-09 14:24:55 +01:00
Vladimir 'phcoder' Serbinenko
9079d3ed4e
* grub-core/lib/posix_wrap/string.h (memchr): New function.
2012-01-29 23:58:42 +01:00
Vladimir 'phcoder' Serbinenko
ecbf8cd1b7
* grub-core/lib/posix_wrap/assert.h (assert_real): Replace grub_fatal
...
with grub_printf to avoid unnecessary fatal failure.
2012-01-29 23:48:35 +01:00
Vladimir 'phcoder' Serbinenko
0b3b3b38bd
* grub-core/lib/posix_wrap/limits.h (SHRT_MAX): New define.
...
(INT_MAX): Likewise.
* grub-core/lib/posix_wrap/stdio.h (snprintf): New function.
* grub-core/lib/posix_wrap/stdlib.h (abs): Likewise.
* grub-core/lib/posix_wrap/string.h (memcmp): Likewise.
(strcpy): Likewise.
(strstr): Likewise.
(strchr): Likewise.
(strncpy): Likewise.
(strcat): Likewise.
(strncat): Likewise.
(strcoll): Likewise.
* include/grub/types.h (GRUB_SHRT_MAX): New define.
(GRUB_INT_MAX): Likewise.
2012-01-29 23:27:31 +01:00
Vladimir 'phcoder' Serbinenko
db7337a3d3
* grub-core/gnulib/regcomp.c (regerror): Don't use abort on
...
unexpected error.
(optimize_utf8): Likewise.
* grub-core/lib/posix_wrap/stdlib.h (abort): Removed.
2012-01-29 23:22:57 +01:00
Vladimir 'phcoder' Serbinenko
e6da146746
* grub-core/lib/posix_wrap/wctype.h (CHARCLASS_NAME_MAX): New define.
2012-01-14 11:53:29 +01:00
Vladimir 'phcoder' Serbinenko
b4bf7c3b20
* grub-core/lib/posix_wrap/stdlib.h (MB_CUR_MAX): Moved from here ...
...
* grub-core/lib/posix_wrap/wchar.h (MB_CUR_MAX): ... here. Value fixed.
2012-01-14 11:48:56 +01:00
Vladimir 'phcoder' Serbinenko
c029da8a89
Various squash4 fixes and LZO and XZ support.
...
* Makefile.util.def (libgrubmods.a): Add xzembed directory to cppflags.
Add xzembed source files.
* grub-core/Makefile.core.def (squash4): Add xzembed and minilzo flags.
* grub-core/fs/squash4.c (grub_squash_super): New field compression.
(grub_squash_inode): New subtype long_dir.
(SQUASH_TYPE_LONG_DIR): New inode type.
(COMPRESSION): New enum.
(XZBUFSIZ): New const.
(grub_squash_data): New fields blksz, decompress, xzdec, xzbuf.
(read_chunk): Use data->decompress.
(zlib_decompress): New function.
(lzo_decompress): Likewise.
(xz_decompress): Likewise.
(squash_mount): Set new data fields.
(grub_squash_iterate_dir): Handle long dir.
(squash_unmount): Free xzdec and xzbuf.
(grub_squash_open): Check ino type.
(direct_read): Stylistic fixes. Use data->decompress.
(grub_squash_read_data): Likewise.
* grub-core/io/gzio.c (grub_gzio): Remove disk_input.
(get_byte): Likewise.
(grub_zlib_disk_read): Removed.
* grub-core/lib/posix_wrap/sys/types.h (ssize_t): New type.
(GRUB_POSIX_BOOL_DEFINED): New define.
* grub-core/lib/posix_wrap/unistd.h: Include sys/types.h.
* grub-core/lib/xzembed/xz.h: Addmissing includes.
[!GRUB_POSIX_BOOL_DEFINED]: Define bool.
* include/grub/deflate.h (grub_zlib_disk_read): Removed.
2011-12-26 13:18:01 +01:00
Vladimir 'phcoder' Serbinenko
02a2bf8384
Add noreturn attributes and remove unreachable code.
...
* grub-core/bus/cs5536.c (grub_cs5536_smbus_wait): Remove unreachable
code.
* grub-core/commands/halt.c (grub_cmd_halt): Remove unreachable
code. Mark as noreturn.
* grub-core/commands/minicmd.c (grub_mini_cmd_exit): Likewise.
* grub-core/commands/reboot.c (grub_cmd_reboot): Likewise.
* grub-core/disk/efi/efidisk.c (grub_efidisk_get_device_name): Remove
unreachable code.
* grub-core/kern/main.c (grub_main): Mark as noreturn.
* grub-core/kern/rescue_reader.c (grub_rescue_run): Likewise.
* grub-core/lib/posix_wrap/stdlib.h (abort): Likewise.
* grub-core/normal/menu.c (run_menu): Remove unreachable code.
* include/grub/kernel.h (grub_main): Mark as noreturn.
* include/grub/reader.h (grub_rescue_run): Likewise.
2011-12-13 15:13:51 +01:00
Vladimir 'phcoder' Serbinenko
c5fc563aff
Enable UTF8 in gnulib regexp.
...
* config.h.in (RE_ENABLE_I18N) [!GRUB_UTIL]: New define.
* grub-core/lib/posix_wrap/ctype.h (islower): Use grub_islower.
(isupper): Use grub_isupper.
(isascii): New inline function.
* grub-core/lib/posix_wrap/wchar.h: Replace dummy with real contents.
* grub-core/lib/posix_wrap/wctype.h: Likewise.
* grub-core/normal/charset.c (grub_utf8_process): New function.
(grub_utf8_to_utf16): Use grub_utf8_process.
(grub_encode_utf8_character): New function.
(grub_ucs4_to_utf8): Use grub_encode_utf8_character.
* include/grub/charset.h (grub_utf8_process): New declaration.
(grub_encode_utf8_character): Likewise.
* include/grub/misc.h (grub_islower): New inline function.
(grub_isupper): Likewise.
(grub_strchrsub): Moved down to fix the definitions.
2011-12-13 00:50:49 +01:00
Vladimir 'phcoder' Serbinenko
bf3a385792
Add missing const qualifiers.
...
* grub-core/commands/i386/pc/sendkey.c (keysym): Add missing const.
* grub-core/commands/lspci.c (grub_pci_classname): Likewise.
* grub-core/commands/menuentry.c (hotkey_aliases): Likewise.
* grub-core/disk/lvm.c (grub_lvm_getvalue): Likewise.
(grub_lvm_check_flag): Likewise.
* grub-core/efiemu/i386/coredetect.c
(grub_efiemu_get_default_core_name): Likewise
* grub-core/efiemu/main.c (grub_efiemu_autocore): Likewise.
* grub-core/fs/hfsplus.c (grub_hfsplus_catkey_internal): Likewise.
* grub-core/fs/ntfs.c (fixup): Likewise.
* grub-core/fs/xfs.c (grub_xfs_iterate_dir): Likewise.
* grub-core/fs/zfs/zfs.c (decomp_entry): Likewise.
(fzap_lookup): Likewise.
(zap_lookup): Likewise.
* grub-core/gnulib/regcomp.c (init_dfa): Likewise.
* grub-core/lib/legacy_parse.c (check_option): Likewise.
* grub-core/lib/posix_wrap/langinfo.h (nl_langinfo): Likewise.
* grub-core/loader/i386/bsd.c (grub_bsd_add_meta): Likewise.
(grub_freebsd_add_meta_module): Likewise.
(grub_cmd_freebsd_module): Likewise.
* grub-core/loader/i386/xnu.c (tbl_alias): Likewise.
* grub-core/loader/xnu.c (grub_xnu_register_memory): Likewise.
(grub_xnu_writetree_get_size): Likewise.
(grub_xnu_writetree_toheap_real): Likewise.
(grub_xnu_find_key): Likewise.
(grub_xnu_create_key): Likewise.
(grub_xnu_create_value): Likewise.
(grub_xnu_register_memory): Likewise.
(grub_xnu_check_os_bundle_required): Likewise.
(grub_xnu_scan_dir_for_kexts): Likewise.
(grub_xnu_load_kext_from_dir): Likewise.
* grub-core/normal/color.c (color_list): Likewise.
* grub-core/normal/completion.c (current_word): Likewise.
* grub-core/normal/menu_entry.c (insert_string): Likewise.
* grub-core/term/serial.c (grub_serial_find): Likewise.
* grub-core/term/tparm.c (grub_terminfo_tparm): Likewise.
* include/grub/efiemu/efiemu.h (grub_efiemu_get_default_core_name):
Likewise.
* include/grub/i386/bsd.h (grub_bsd_add_meta): Likewise.
(grub_freebsd_add_meta_module): Likewise.
* include/grub/lib/arg.h (grub_arg_option): Likewise.
* include/grub/net.h (grub_net_card_driver): Likewise.
(grub_net_card): Likewise.
(grub_net_app_protocol): Likewise.
* include/grub/parttool.h (grub_parttool_argdesc): Likewise.
* include/grub/serial.h (grub_serial_find): Likewise.
* include/grub/tparm.h (grub_terminfo_tparm): Likewise.
* include/grub/xnu.h (grub_xnu_create_key): Likewise.
(grub_xnu_create_value): Likewise.
(grub_xnu_find_key): Likewise.
(grub_xnu_scan_dir_for_kexts): Likewise.
(grub_xnu_load_kext_from_dir): Likewise.
* include/grub/zfs/zio_checksum.h (zio_checksum_t): Moved from here ...
* grub-core/fs/zfs/zfs.c (zio_checksum_t): ...here.
* include/grub/zfs/zio_checksum.h (zio_checksum_info):
Moved from here ...
* grub-core/fs/zfs/zfs.c (zio_checksum_info): ... here. Added missing const.
2011-11-30 16:20:13 +01:00
Vladimir 'phcoder' Serbinenko
4defb8d59b
* grub-core/lib/posix_wrap/string.h (memcpy) [GRUB_UTIL]:
...
New inline function.
* grub-core/lib/libgcrypt_wrap/cipher_wrap.h (memcpy) [GRUB_UTIL]:
Likewise.
(memset) [GRUB_UTIL]: Likewise.
(memcmp) [GRUB_UTIL]: Likewise.
2011-10-23 23:28:23 +02:00
Vladimir 'phcoder' Serbinenko
0eb8ffb1f5
* grub-core/lib/posix_wrap/ctype.h (isxdigit): Use grub_isxdigit.
...
* include/grub/misc.h (grub_isxdigit): New function.
* grub-core/video/colors.c (my_isxdigit): Removed. All users
switched to grub_isxdigit.
* grub-core/term/serial.c (grub_serial_find): Fix in case of port
number starting with a letter.
2011-10-14 19:16:37 +02:00
Szymon Janc
1f1a380be9
Import minilzo library for LZO decompression support.
...
* grub-core/lib/minilzo/lzoconf.h: New file.
* grub-core/lib/minilzo/lzodefs.h: Likewise.
* grub-core/lib/minilzo/minilzo.c: Likewise.
* grub-core/lib/minilzo/minilzo.h: Likewise.
* include/grub/types.h (GRUB_UCHAR_MAX): New define.
(GRUB_USHRT_MAX): Likewise.
(GRUB_UINT_MAX): Likewise.
* grub-core/lib/posix_wrap/limits.h (USHRT_MAX): New define.
(UINT_MAX): Likewise.
(CHAR_BIT): Likewise.
* grub-core/lib/posix_wrap/sys/types.h (ULONG_MAX): Moved to
grub-core/lib/posix_wrap/limits.h
(UCHAR_MAX): Likewise.
2011-08-14 11:39:31 +02:00
Vladimir 'phcoder' Serbinenko
0fd48e357f
Satisfy some bison versions need for inttypes.h.
...
* grub-core/lib/posix_wrap/inttypes.h: New file.
* grub-core/lib/posix_wrap/sys/types.h (int8_t): New type.
(int16_t): Likewise.
(int32_t): Likewise.
(int64_t): Likewise.
Reported and tested by: Alain Greppin.
2011-01-08 00:34:23 +01:00
Vladimir 'phcoder' Serbinenko
de1a024fff
Properly define WORDS_BIGENDIAN in wrapped environments.
...
* grub-core/lib/libgcrypt_wrap/cipher_wrap.h (WORDS_BIGENDIAN): New
definition.
* grub-core/lib/posix_wrap/sys/types.h (WORDS_BIGENDIAN): Likewise.
Reported by: Manoel Rebelo Abranches.
Tested by: Manoel Rebelo Abranches.
2010-11-14 13:37:59 +01:00
Yves Blusseau
15c6926126
Use gnulib-tool to create gnulib source files.
...
* Add gnulib files generated by gnulib-tool in build-aux, m4 and
grub-core/gnulib directories
* .bzignore: Add **/.deps and autogenerated gnulib files
* configure.ac: Assign auxiliary directory to build-aux, add invocation
of gnulib macros, add grub-core/gnulib/Makefile
* Makefile.am: Add gnulib directory in SUBDIRS (removing unnecessary .),
include m4 directory to aclocal.
* Makefile.util.def: Remove direct compilation of gnulib source files
and use the new grub-core/gnulib/libgnu.a.
* build-aux/config.rpath: move config.rpath from top directory to
build-aux
* conf/Makefile.common: Remove the macro _GL_UNUSED already defined
in gnulib headers
* conf/Makefile.extra-dist: Add m4/gnulib-cache.m4
* grub-core/Makefile.core.def: Remove unnecessary extra_dist
* grub-core/lib/posix_wrap/localcharset.h (locale_charset): Update
header.
* grub-core/lib/posix_wrap/langinfo.h (nl_langinfo): Return static
string.
2010-09-20 12:35:33 +02:00
Szymon Janc
a17792c324
* grub-core/lib/posix_wrap/sys/types.h (bool): Transform into an enum.
...
(uint8_t): New type.
(uint16_t): Likewise.
(uint32_t): Likewise.
(uint64_t): Likewise.
2010-09-05 14:24:39 +02:00
BVK Chaitanya
8c41176882
automake commit without merge history
2010-05-06 11:34:04 +05:30