Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] Fix ./configure script for less error-forgiving compilers

Maxim Dounin
March 15, 2012 02:06PM
Hello!

On Tue, Mar 06, 2012 at 12:45:03PM +0400, Ruslan Ermilov wrote:

> On Mon, Mar 05, 2012 at 10:37:31PM +0100, Piotr Sikora wrote:
> > --- auto/types/uintptr_t.orig Sun Jul 29 18:24:53 2007
> > +++ auto/types/uintptr_t Tue Aug 24 19:38:17 2010
> > @@ -14,7 +14,8 @@
> > $NGX_INTTYPES_H
> >
> > int main() {
> > - uintptr_t i = 0;
> > + uintptr_t i;
> > + i = 0;
> > return 0;
> > }
>
> The way this script is written, -Wall -Werror were not passed
> to the compiler. I've fixed this, and it made your change
> obviously required.

Another obvious test is to use CFLAGS="-Wall -Werror" ./configure.

> > --- auto/unix.orig Thu Aug 12 04:33:51 2010
> > +++ auto/unix Thu Aug 12 04:34:20 2010
> > @@ -82,7 +82,7 @@
> > ngx_feature="setproctitle()"
> > ngx_feature_name="NGX_HAVE_SETPROCTITLE"
> > ngx_feature_run=no
> > -ngx_feature_incs=
> > +ngx_feature_incs="#include <stdlib.h>"
> > ngx_feature_path=
> > ngx_feature_libs=$NGX_SETPROCTITLE_LIB
> > ngx_feature_test="setproctitle(\"test\");"
>
> setproctitle() is in <unistd.h> on FreeBSD, and the latter
> is always included when available. This change isn't needed.

As already clarified by Piotr, this is needed for OpenBSD /
NetBSD.

> I've also fixed configure errors on Linux when configured
> with --with-cc=gcc --with-cc-opt="-Wall -Werror".

I don't really think we support --with-cc-opt="-Wall -Werror", it
will fail on compilation anyway as we really need
"-Wno-unused-parameter".

But it doesn't hurt to keep configure clean, please restore
Piotr's setproctitle() change and commit.

[...]

> @@ -585,7 +585,8 @@
> ngx_feature="memalign()"
> ngx_feature_name="NGX_HAVE_MEMALIGN"
> ngx_feature_run=no
> -ngx_feature_incs="#include <stdlib.h>"
> +ngx_feature_incs="#include <stdlib.h>
> + #include <malloc.h>"
> ngx_feature_path=
> ngx_feature_libs=
> ngx_feature_test="void *p; p = memalign(4096, 4096)"

Just a side note: this probably should be run only if
posix_memalign() isn't found. The same applies to gcc variadic
macros test, which is redundant in case of C99 variadic macros
found.

Maxim Dounin

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Fix ./configure script for less error-forgiving compilers Attachments

Piotr Sikora 1991 August 16, 2010 12:02AM

Re: [PATCH] Fix ./configure script for less error-forgiving compilers Attachments

Piotr Sikora 772 August 24, 2010 02:16PM

Re: [PATCH] Fix ./configure script for less error-forgiving compilers

Maxim Dounin 619 November 11, 2010 09:34AM

Re: [PATCH] Fix ./configure script for less error-forgiving compilers Attachments

Piotr Sikora 782 November 11, 2010 04:54PM

Re: [PATCH] Fix ./configure script for less error-forgiving compilers

Piotr Sikora 351 March 05, 2012 04:28PM

Re: [PATCH] Fix ./configure script for less error-forgiving compilers Attachments

Piotr Sikora 432 March 05, 2012 04:40PM

Re: [PATCH] Fix ./configure script for less error-forgiving compilers

Ruslan Ermilov 443 March 06, 2012 03:46AM

Re: [PATCH] Fix ./configure script for less error-forgiving compilers

Piotr Sikora 403 March 06, 2012 09:52AM

Re: [PATCH] Fix ./configure script for less error-forgiving compilers

Maxim Dounin 476 March 15, 2012 02:06PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 218
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready