You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2020/09/05 05:20:59 UTC
svn commit: r1881477 - /httpd/httpd/trunk/modules/lua/mod_lua.c
Author: wrowe
Date: Sat Sep 5 05:20:59 2020
New Revision: 1881477
URL: http://svn.apache.org/viewvc?rev=1881477&view=rev
Log:
Restore broken win32 build, include apr/std headers before httpd headers
- In httpd we override exit() to trap the true exit code (see os/win32/os.h)
- process.h was redefining exit() which picked up the macro instead of the
original exit() declaration
- Cleaner style pulls in apr, then standard C headers, and finally sets down
the httpd includes on top of these, resolving the windows build regression
Modified:
httpd/httpd/trunk/modules/lua/mod_lua.c
Modified: httpd/httpd/trunk/modules/lua/mod_lua.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/mod_lua.c?rev=1881477&r1=1881476&r2=1881477&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/lua/mod_lua.c (original)
+++ httpd/httpd/trunk/modules/lua/mod_lua.c Sat Sep 5 05:20:59 2020
@@ -15,37 +15,36 @@
* limitations under the License.
*/
-#include "mod_lua.h"
+#include "apr_thread_mutex.h"
+#include "apr_pools.h"
+#include "apr_optional.h"
+
+/* getpid for *NIX vs Windows */
+#if APR_HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if APR_HAVE_PROCESS_H
+#include <process.h>
+#endif
+#if APR_HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
-#include <apr_thread_mutex.h>
-#include <apr_pools.h>
+
+#include "mod_lua.h"
#include "lua_apr.h"
#include "lua_config.h"
-#include "apr_optional.h"
#include "mod_ssl.h"
#include "mod_auth.h"
#include "util_mutex.h"
-
#ifdef APR_HAS_THREADS
#include "apr_thread_proc.h"
#endif
-/* getpid for *NIX */
-#if APR_HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if APR_HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-/* getpid for Windows */
-#if APR_HAVE_PROCESS_H
-#include <process.h>
-#endif
-
APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ap_lua, AP_LUA, int, lua_open,
(lua_State *L, apr_pool_t *p),
(L, p), OK, DECLINED)