Pull up following revision(s) (requested by joerg in ticket #1247):
lib/libc/gen/glob.c: revision 1.36
Bump the glob limits to 512KB for total string size and 64K path
entries. The old limits were too small for some important FTP use cases
like a pkgsrc repository.

Pull up following revision(s) (requested by joerg in ticket #1404):
lib/libc/gen/glob.c: revision 1.36
Bump the glob limits to 512KB for total string size and 64K path
entries. The old limits were too small for some important FTP use cases
like a pkgsrc repository.

Pull up following revision(s) (requested by joerg in ticket #1247):
lib/libc/gen/glob.c: revision 1.36
Bump the glob limits to 512KB for total string size and 64K path
entries. The old limits were too small for some important FTP use cases
like a pkgsrc repository.

sync with head.
for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")

Pull up following revision(s) (requested by christos in ticket #1399):
lib/libc/gen/glob.c: patch
lib/libc/gen/glob.3: revision 1.37 via patch
crypto/dist/ssh/sftp.c: patch
crypto/dist/ssh/sftp-glob.c: patch
Add GLOB_LIMIT to the glob calls to prevent DoS attacks.
Apply more limits to GLOB_LIMIT, number of stat(2) calls from me and number
of readdir(3) calls from Maksymilian Arciemowicz. Also reduce the memory
used by matches strings from Maksymilian Arciemowicz.

Pull up following revision(s) (requested by christos in ticket #1399):
lib/libc/gen/glob.c: patch
lib/libc/gen/glob.3: revision 1.37 via patch
crypto/dist/ssh/sftp.c: patch
crypto/dist/ssh/sftp-glob.c: patch
Add GLOB_LIMIT to the glob calls to prevent DoS attacks.
Apply more limits to GLOB_LIMIT, number of stat(2) calls from me and number
of readdir(3) calls from Maksymilian Arciemowicz. Also reduce the memory
used by matches strings from Maksymilian Arciemowicz.

Pull up following revision(s) (requested by christos in ticket #1430):
lib/libc/gen/glob.c: revision 1.25
lib/libc/gen/glob.c: revision 1.26
lib/libc/gen/glob.3: revision 1.37
crypto/dist/ssh/sftp.c: patch
crypto/dist/ssh/sftp-glob.c: patch
Add GLOB_LIMIT to the glob calls to prevent DoS attacks.
Apply more limits to GLOB_LIMIT, number of stat(2) calls from me and number
of readdir(3) calls from Maksymilian Arciemowicz. Also reduce the memory
used by matches strings from Maksymilian Arciemowicz.
Avoid DoS attacks for patterns that have braces. Noted by Maksymilian
Arciemowicz.
XXX: Pullup to 5.x

Pull up following revision(s) (requested by christos in ticket #1430):
lib/libc/gen/glob.c: revision 1.25
lib/libc/gen/glob.c: revision 1.26
lib/libc/gen/glob.3: revision 1.37
crypto/dist/ssh/sftp.c: patch
crypto/dist/ssh/sftp-glob.c: patch
Add GLOB_LIMIT to the glob calls to prevent DoS attacks.
Apply more limits to GLOB_LIMIT, number of stat(2) calls from me and number
of readdir(3) calls from Maksymilian Arciemowicz. Also reduce the memory
used by matches strings from Maksymilian Arciemowicz.
Avoid DoS attacks for patterns that have braces. Noted by Maksymilian
Arciemowicz.
XXX: Pullup to 5.x

Apply more limits to GLOB_LIMIT, number of stat(2) calls from me and number
of readdir(3) calls from Maksymilian Arciemowicz. Also reduce the memory
used by matches strings from Maksymilian Arciemowicz.

Pull up from trunk:
New hacks to make libc work painlessly without bumping the major number:
use type func(arg1s) asm("emitted_name") gcc mechanism.
Suggested by Bill Sommerfeld.
Allow the old-name functions to be compiled from the same source file as
the renamed functions, and add some #error directives to force the
issue with weak symbols for renamed functions when we support weak
symbols in the C library.

Allow the old-name functions to be compiled from the same source file as
the renamed functions, and add some #error directives to force the
issue with weak symbols for renamed functions when we support weak
symbols in the C library.

If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore. The library will use those
names internally. Weak aliases are used to provide the original names
to the API.
This is only the first part of this change. It is most of the functions
which are implemented in C for all NetBSD ports. Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.