msys-lndir: add build recipe for lndir 1.0.3

This version includes a fix for the st_nlink bug [1].

[1] http://cgit.freedesktop.org/xorg/util/lndir/commit/lndir.c?id=23bacbd6c71ec815f394f0a7bbc9e684b3e05438

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
msys-core: Remove the old text files that explain skipped patches

In the same run, rename the patch files in use to be numbered
consecutively.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
msys-core: increment build number to prevent name clash

Using the exact same name as the original MSYS package prevents rebuilding,
because the 'package' step overwrites the downloaded source package.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
msys-core: stat/lstat: drop sub-directory counting for directories

Add a patch that removes extra counting of sub-directories in [l]stat.
This fixes stat.st_nlink for directories (always 1) and improves [l]stat
performance by at least factor 2 (for empty dirs, factor 10 for dirs with
~500 entries).

Note: programs that _rely_ on st_nlink being the number of sub-dirs + 2
need to be fixed.

Signed-off-by: Karsten Blees <blees@dcon.de>
msys-core: fix parallel make (MinGW bug #1950 [1])

[1] http://sourceforge.net/p/mingw/bugs/1950

Signed-off-by: Karsten Blees <blees@dcon.de>
msys-core: add basic Unicode support

Use UTF-8 encoding for:
 * file names
 * environment
 * command line arguments
 * console output

In particular, this fixes the "HOME directory doesn't exist" bug if HOME
contains non-ASCII characters (issue 108 in the old Goole issue tracker,
caused by GetEnvironmentStringsA returning OEM-encoded strings which MSYS
reinterpreted as beeing ANSI-encoded).

Patch 0014 fixes a long standing bug in Find*File that affects recursive
directory copying in MSYS' symlink() emulation (and would have affected
sub-directory counting if this hadn't been dropped in patch 0011 :-).

Signed-off-by: Karsten Blees <blees@dcon.de>
msys-core: Unicode console input

Change console input to UTF-8 encoding and enable ALT+NUMPAD to enter
special characters.

Signed-off-by: Karsten Blees <blees@dcon.de>
msys-core: backport multibyte support from newlib 1.20

Add multibyte functions (e.g. wctomb, mbtowc) to msys.dll so that other
msys programs (e.g. bash) can be compiled with multibyte support.

Picked from msysgit's msys branch, with these changes to compile on 1.0.18:
 * newlib/libc/include/sys/_types.h: always "typedef long _ssize_t"
 * winsup/cygwin/include/wchar.h: copied from newlib/libc/include/wchar.h

Signed-off-by: Karsten Blees <blees@dcon.de>
msys-bash: add build recipe for bash with Unicode support

Build bash with multibyte support so that we can type non-ASCII characters
in the console (if 8-bit input is enabled in inputrc).

Note: the unicode-enabled msys-core-%-dev package must be installed first,
otherwise 'configure' will silently disable multibyte support due to
missing conversion functions.

Signed-off-by: Karsten Blees <blees@dcon.de>