[PATCH] Removed NGX_COMPAT_BEGIN and NGX_COMPAT_END macros

Maxim Dounin mdounin at mdounin.ru
Thu Feb 5 12:39:32 UTC 2026


# HG changeset patch
# User Maxim Dounin <mdounin at mdounin.ru>
# Date 1770127023 -10800
#      Tue Feb 03 16:57:03 2026 +0300
# Node ID 1fef7bf265f0cd00046d684d9f503f8394051c3b
# Parent  d6723d4c4b8136b96cd42481bb33a165ddb87a05
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.

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