Welcome! Log In Create A New Profile

Advanced

API inconsistencies

Nick Kew
November 26, 2013 11:39AM
Is there a prescribed way for a module to deal with API changes
to support both older and newer versions?

I can use constructs like:

/* Get the remote address */
#if OLDVERSION
len = ngx_sock_ntop(conn->sockaddr, ...
#else
len = ngx_sock_ntop(conn->sockaddr, conn->socklen, …
#endif

But that's just passing the buck to users to figure out why my
module doesn't compile with their nginx or tengine. I want
a test like Apache's MMN that will automatically detect the
API version to use. Is there a way to do that?

(FWIW, the above API changed in
http://hg.nginx.org/nginx/rev/05ba5bce31e0 ).

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

API inconsistencies

Nick Kew 570 November 26, 2013 11:39AM



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

Online Users

Guests: 139
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready