author | Junio C Hamano <gitster@pobox.com> | |
Thu, 26 May 2011 16:25:47 +0000 (09:25 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 26 May 2011 16:25:47 +0000 (09:25 -0700) | ||
commit | a02cf90144293f4d7885be7f1d10240576aa161b | |
tree | ecc837d01c6363656745b04aa00826cfc095474e | tree | snapshot |
parent | 5cfe4256d98af22a570c78c5e3048391a90f5f98 | commit | diff |
compat/fnmatch/fnmatch.c: give a fall-back definition for NULL
Somebody tried to compile fnmatch.c compatibility file on Interix and got
an error because no header included in the file on that platform defined
NULL. It usually comes from stddef.h and indirectly from other headers
like string.h, unistd.h, stdio.h, stdlib.h, etc., but with the way we
compile this file from our Makefile, inclusion of the header files that
are expected to define NULL in fnmatch.c do not happen because they are
protected with "#ifdef STDC_HEADERS", etc. which we do not pass.
As the least-impact workaround, give a fall-back definition when none of
the headers define NULL.
Noticed-by: Markus Duft <mduft@gentoo.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Somebody tried to compile fnmatch.c compatibility file on Interix and got
an error because no header included in the file on that platform defined
NULL. It usually comes from stddef.h and indirectly from other headers
like string.h, unistd.h, stdio.h, stdlib.h, etc., but with the way we
compile this file from our Makefile, inclusion of the header files that
are expected to define NULL in fnmatch.c do not happen because they are
protected with "#ifdef STDC_HEADERS", etc. which we do not pass.
As the least-impact workaround, give a fall-back definition when none of
the headers define NULL.
Noticed-by: Markus Duft <mduft@gentoo.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/fnmatch/fnmatch.c | diff | blob | history |