Commented: (MODPYTHON78) No support for Apache 2.2 yet

[
http://issues.apache.org/jira/browse/MODPYTHON-78?page=comments#action_12364729
]

Jim Gallacher commented on MODPYTHON-78:
----------------------------------------

Running mod_python 3.2.6 and earlier with Apache 2.2 fails with the following
error:

httpd: Syntax error on line 414 of /usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/mod_python.so into server:
   /usr/local/apache2/modules/mod_python.so:
      undefined symbol: APR_STATUS_IS_SUCCESS

Apache 2.2 now uses apr 1.x (Apache 2.0 used 0.9x) from which
APR_STATUS_IS_SUCCESS.

This was discussed by Greg Stein and Ryan Bloom on the httpd dev mailing list
http://www.mail-archive.com/dev@httpd.apache.org/msg21757.html.

The macro was eliminated from apr/trunk in revision 65292.

The suggested fix is to replace the APR_STATUS_IS_SUCCESS(s) test with (s ==
APR_SUCCESS), but there is a possible unresolved Win32 issue that was left
hanging. Roughly speaking the relevant lines of code in the old apr_errno.h
look like this:

#if defined(OS2) && !defined(DOXYGEN)
#define APR_STATUS_IS_SUCCESS(s)           ((s) == APR_SUCCESS \
                || (s) == APR_OS_START_SYSERR + NO_ERROR)

#elif defined(WIN32) && !defined(DOXYGEN) /* !defined(OS2) */
#define APR_STATUS_IS_SUCCESS(s)           ((s) == APR_SUCCESS \
                || (s) == APR_OS_START_SYSERR + ERROR_SUCCESS)

#elif defined(NETWARE) && !defined(DOXYGEN) /* !defined(OS2) && !defined(WIN32) */
#define APR_STATUS_IS_SUCCESS(s)           ((s) == APR_SUCCESS)

#else /* !defined(NETWARE) && !defined(OS2) && !defined(WIN32) */
#define APR_STATUS_IS_SUCCESS(s)        ((s) == APR_SUCCESS)
#endif

结论:如果用的是Linux,将APR_STATUS_IS_SUCCESS(s) 改成 s == APR_SUCCESS
原文地址:https://www.cnblogs.com/huqingyu/p/686721.html