[nginx] Removed NGX_COMPAT_BEGIN and NGX_COMPAT_END macros.
Maxim Dounin
mdounin at mdounin.ru
Sun Feb 8 13:14:26 UTC 2026
details: http://freenginx.org/hg/nginx/rev/1fef7bf265f0
branches:
changeset: 9463:1fef7bf265f0
user: Maxim Dounin <mdounin at mdounin.ru>
date: Tue Feb 03 16:57:03 2026 +0300
description:
Removed NGX_COMPAT_BEGIN and NGX_COMPAT_END macros.
These are only needed for compatibility with legacy code in closed-source
NGINX Plus, and now there are no reasons to keep these compatibility shims.
diffstat:
src/core/ngx_config.h | 13 -------------
src/event/ngx_event_connect.h | 3 ---
src/http/ngx_http_upstream.h | 6 ------
src/http/ngx_http_upstream_round_robin.h | 3 ---
src/stream/ngx_stream_upstream.h | 3 ---
src/stream/ngx_stream_upstream_round_robin.h | 3 ---
6 files changed, 0 insertions(+), 31 deletions(-)
diffs (96 lines):
diff --git a/src/core/ngx_config.h b/src/core/ngx_config.h
--- a/src/core/ngx_config.h
+++ b/src/core/ngx_config.h
@@ -129,17 +129,4 @@ typedef intptr_t ngx_flag_t;
#define NGX_MAX_INT32_VALUE (uint32_t) 0x7fffffff
-#if (NGX_COMPAT)
-
-#define NGX_COMPAT_BEGIN(slots) uint64_t spare[slots];
-#define NGX_COMPAT_END
-
-#else
-
-#define NGX_COMPAT_BEGIN(slots)
-#define NGX_COMPAT_END
-
-#endif
-
-
#endif /* _NGX_CONFIG_H_INCLUDED_ */
diff --git a/src/event/ngx_event_connect.h b/src/event/ngx_event_connect.h
--- a/src/event/ngx_event_connect.h
+++ b/src/event/ngx_event_connect.h
@@ -67,9 +67,6 @@ struct ngx_peer_connection_s {
/* ngx_connection_log_error_e */
unsigned log_error:2;
-
- NGX_COMPAT_BEGIN(2)
- NGX_COMPAT_END
};
diff --git a/src/http/ngx_http_upstream.h b/src/http/ngx_http_upstream.h
--- a/src/http/ngx_http_upstream.h
+++ b/src/http/ngx_http_upstream.h
@@ -104,9 +104,6 @@ typedef struct {
ngx_uint_t down;
unsigned backup:1;
-
- NGX_COMPAT_BEGIN(6)
- NGX_COMPAT_END
} ngx_http_upstream_server_t;
@@ -243,9 +240,6 @@ typedef struct {
#endif
ngx_str_t module;
-
- NGX_COMPAT_BEGIN(2)
- NGX_COMPAT_END
} ngx_http_upstream_conf_t;
diff --git a/src/http/ngx_http_upstream_round_robin.h b/src/http/ngx_http_upstream_round_robin.h
--- a/src/http/ngx_http_upstream_round_robin.h
+++ b/src/http/ngx_http_upstream_round_robin.h
@@ -50,9 +50,6 @@ struct ngx_http_upstream_rr_peer_s {
#endif
ngx_http_upstream_rr_peer_t *next;
-
- NGX_COMPAT_BEGIN(32)
- NGX_COMPAT_END
};
diff --git a/src/stream/ngx_stream_upstream.h b/src/stream/ngx_stream_upstream.h
--- a/src/stream/ngx_stream_upstream.h
+++ b/src/stream/ngx_stream_upstream.h
@@ -61,9 +61,6 @@ typedef struct {
ngx_uint_t down;
unsigned backup:1;
-
- NGX_COMPAT_BEGIN(4)
- NGX_COMPAT_END
} ngx_stream_upstream_server_t;
diff --git a/src/stream/ngx_stream_upstream_round_robin.h b/src/stream/ngx_stream_upstream_round_robin.h
--- a/src/stream/ngx_stream_upstream_round_robin.h
+++ b/src/stream/ngx_stream_upstream_round_robin.h
@@ -48,9 +48,6 @@ struct ngx_stream_upstream_rr_peer_s {
#endif
ngx_stream_upstream_rr_peer_t *next;
-
- NGX_COMPAT_BEGIN(25)
- NGX_COMPAT_END
};
More information about the nginx-devel
mailing list