mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
ngx_cpp_test_module
This commit is contained in:
parent
36876c3d6c
commit
e24b57ad9f
@ -392,6 +392,11 @@ if [ $NGX_GOOGLE_PERFTOOLS = YES ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [ $NGX_CPP_TEST_MODULE = YES ]; then
|
||||||
|
NGX_MISC_SRCS="$NGX_MISC_SRCS $NGX_CPP_TEST_SRCS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
cat << END > $NGX_MODULES_C
|
cat << END > $NGX_MODULES_C
|
||||||
|
|
||||||
#include <ngx_config.h>
|
#include <ngx_config.h>
|
||||||
|
@ -119,6 +119,7 @@ NGX_PERL=perl
|
|||||||
USE_LIBXSLT=NO
|
USE_LIBXSLT=NO
|
||||||
|
|
||||||
NGX_GOOGLE_PERFTOOLS=NO
|
NGX_GOOGLE_PERFTOOLS=NO
|
||||||
|
NGX_CPP_TEST=NO
|
||||||
|
|
||||||
NGX_CPU_CACHE_LINE=
|
NGX_CPU_CACHE_LINE=
|
||||||
|
|
||||||
@ -208,6 +209,7 @@ do
|
|||||||
--without-mail_smtp_module) MAIL_SMTP=NO ;;
|
--without-mail_smtp_module) MAIL_SMTP=NO ;;
|
||||||
|
|
||||||
--with-google_perftools_module) NGX_GOOGLE_PERFTOOLS=YES ;;
|
--with-google_perftools_module) NGX_GOOGLE_PERFTOOLS=YES ;;
|
||||||
|
--with-cpp_test_module) NGX_CPP_TEST_MODULE=YES ;;
|
||||||
|
|
||||||
--add-module=*) NGX_ADDONS="$NGX_ADDONS $value" ;;
|
--add-module=*) NGX_ADDONS="$NGX_ADDONS $value" ;;
|
||||||
|
|
||||||
@ -327,6 +329,7 @@ cat << END
|
|||||||
--without-mail_smtp_module disable ngx_mail_smtp_module
|
--without-mail_smtp_module disable ngx_mail_smtp_module
|
||||||
|
|
||||||
--with-google_perftools_module enable ngx_google_perftools_module
|
--with-google_perftools_module enable ngx_google_perftools_module
|
||||||
|
--with-cpp_test_module enable ngx_cpp_test_module
|
||||||
|
|
||||||
--add-module=PATH enable an external module
|
--add-module=PATH enable an external module
|
||||||
|
|
||||||
|
@ -474,3 +474,4 @@ MAIL_PROXY_SRCS="src/mail/ngx_mail_proxy_module.c"
|
|||||||
NGX_GOOGLE_PERFTOOLS_MODULE=ngx_google_perftools_module
|
NGX_GOOGLE_PERFTOOLS_MODULE=ngx_google_perftools_module
|
||||||
NGX_GOOGLE_PERFTOOLS_SRCS=src/misc/ngx_google_perftools_module.c
|
NGX_GOOGLE_PERFTOOLS_SRCS=src/misc/ngx_google_perftools_module.c
|
||||||
|
|
||||||
|
NGX_CPP_TEST_SRCS=src/misc/ngx_cpp_test_module.cpp
|
||||||
|
27
src/misc/ngx_cpp_test_module.cpp
Normal file
27
src/misc/ngx_cpp_test_module.cpp
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
|
||||||
|
// stub module to test header files' C++ compatibilty
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
#include <ngx_config.h>
|
||||||
|
#include <ngx_core.h>
|
||||||
|
#include <ngx_event.h>
|
||||||
|
#include <ngx_event_connect.h>
|
||||||
|
#include <ngx_event_pipe.h>
|
||||||
|
|
||||||
|
#include <ngx_http.h>
|
||||||
|
|
||||||
|
#include <ngx_mail.h>
|
||||||
|
#include <ngx_mail_pop3_module.h>
|
||||||
|
#include <ngx_mail_imap_module.h>
|
||||||
|
#include <ngx_mail_smtp_module.h>
|
||||||
|
}
|
||||||
|
|
||||||
|
// nginx header files should go before other, because they define 64-bit off_t
|
||||||
|
// #include <string>
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
ngx_cpp_test_handler(void *data)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user