Welcome! Log In Create A New Profile

Advanced

[nginx] Configure: added -Wno-deprecated-declarations on OS X.

Maxim Dounin
May 28, 2014 09:46AM
details: http://hg.nginx.org/nginx/rev/80bd391c90d1
branches:
changeset: 5714:80bd391c90d1
user: Maxim Dounin <mdounin@mdounin.ru>
date: Wed May 28 17:41:44 2014 +0400
description:
Configure: added -Wno-deprecated-declarations on OS X.

Previous workaround to avoid warnings on OS X due to deprecated system
OpenSSL library (introduced in a3870ea96ccd) no longer works, as
the MAC_OS_X_VERSION_MIN_REQUIRED macro is ignored on OS X 10.9
if a compiler used supports __attribute__(availability).

diffstat:

auto/cc/clang | 5 +++++
auto/cc/gcc | 5 +++++
src/os/unix/ngx_darwin_config.h | 3 ---
3 files changed, 10 insertions(+), 3 deletions(-)

diffs (43 lines):

diff --git a/auto/cc/clang b/auto/cc/clang
--- a/auto/cc/clang
+++ b/auto/cc/clang
@@ -88,6 +88,11 @@ CFLAGS="$CFLAGS -Wconditional-uninitiali
# we have a lot of unused function arguments
CFLAGS="$CFLAGS -Wno-unused-parameter"

+# deprecated system OpenSSL library on OS X
+if [ "$NGX_SYSTEM" = "Darwin" ]; then
+ CFLAGS="$CFLAGS -Wno-deprecated-declarations"
+fi
+
# stop on warning
CFLAGS="$CFLAGS -Werror"

diff --git a/auto/cc/gcc b/auto/cc/gcc
--- a/auto/cc/gcc
+++ b/auto/cc/gcc
@@ -158,6 +158,11 @@ case "$NGX_GCC_VER" in
CFLAGS="$CFLAGS -Wno-unused-parameter"
# 4.2.1 shows the warning in wrong places
#CFLAGS="$CFLAGS -Wunreachable-code"
+
+ # deprecated system OpenSSL library on OS X
+ if [ "$NGX_SYSTEM" = "Darwin" ]; then
+ CFLAGS="$CFLAGS -Wno-deprecated-declarations"
+ fi
;;

*)
diff --git a/src/os/unix/ngx_darwin_config.h b/src/os/unix/ngx_darwin_config.h
--- a/src/os/unix/ngx_darwin_config.h
+++ b/src/os/unix/ngx_darwin_config.h
@@ -9,9 +9,6 @@
#define _NGX_DARWIN_CONFIG_H_INCLUDED_


-#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_0
-
-
#include <sys/types.h>
#include <sys/time.h>
#include <unistd.h>

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

[nginx] Configure: added -Wno-deprecated-declarations on OS X.

Maxim Dounin 1409 May 28, 2014 09:46AM



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

Online Users

Guests: 199
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