sha1_file.c: introduce get_max_fd_limit() helper
commita0788266d310dd3f6343c7ee754106784aa1e2af
authorJoachim Schmitz <jojo@schmitz-digital.de>
Fri, 24 Aug 2012 09:52:22 +0000 (24 11:52 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 24 Aug 2012 16:46:01 +0000 (24 09:46 -0700)
tree39439e8905b977aff60f7be8b0f4c7092cb96f2a
parentfab4b04e4be5ccfdf93e21e7260040bd9e7faedd
sha1_file.c: introduce get_max_fd_limit() helper

Not all platforms have getrlimit(), but there are other ways to see
the maximum number of files that a process can have open.  If
getrlimit() is unavailable, fall back to sysconf(_SC_OPEN_MAX) if
available, and use OPEN_MAX from <limits.h>.

Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_file.c