[PATCH] Fix ./configure script for less error-forgiving compilers
Maxim Dounin
mdounin at mdounin.ru
Thu Nov 11 17:33:28 MSK 2010
Hello!
On Mon, Aug 16, 2010 at 06:01:27AM +0200, Piotr Sikora wrote:
> Hi Igor,
> attached patch fixes ./configure script for less error-forgiving
> compilers (like LLVM/clang) when they are used with -Werror option.
>
> auto/types/sizeof:
> - printf() is defined in missing <stdio.h> header,
> - sizeof() returns size_t type, which has different signedness on
> different operating systems (hence %z).
POSIX mandates size_t to be unsigned[1]:
% size_t
% Unsigned integer type of the result of the sizeof operator.
[1] http://www.opengroup.org/onlinepubs/9699919799/basedefs/stddef.h.html
And C does the same:
% 7.17 Common definitions <stddef.h>
...
% size_t
% which is the unsigned integer type of the result of the sizeof
% operator;
I belive this should be changed to "%zu" (instead of "%zd" in your
patch).
Otherwise looks good.
Maxim Dounin
More information about the nginx-devel
mailing list