annotate src/misc/ngx_cpp_test_module.cpp @ 5041:7a6fbac9f3e3 stable-1.2

Merge of r4961: configure: better check for PCRE JIT. On Mac OS X system toolchain by default prefers include files from /usr/local/include, but libraries from /usr/lib. This might result in various problems, in particular the one outlined below. If the PCRE library is installed into /usr/local/, this results in pcre.h being used from /usr/local/include (with PCRE_CONFIG_JIT defined), but libpcre from /usr/lib (as shipped with the OS, without pcre_free_study() symbol). As a result build fails as we use pcre_free_study() function if we try to compile with PCRE JIT support. Obvious workaround to the root cause is to ask compiler to prefer library from /usr/local/lib via ./configure --with-ld-opt="-L/usr/local/lib". On the other hand, in any case it would be good to check if the function we are going to use is available, hence the change. See thread here for details: http://mailman.nginx.org/pipermail/nginx-devel/2012-December/003074.html Prodded by Piotr Sikora.
author Maxim Dounin <mdounin@mdounin.ru>
date Sun, 10 Feb 2013 03:18:08 +0000
parents 29928279ec9f
children 1d693deab8ae
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2157
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
1
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
2 // stub module to test header files' C++ compatibilty
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
3
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
4 extern "C" {
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
5 #include <ngx_config.h>
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
6 #include <ngx_core.h>
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
7 #include <ngx_event.h>
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
8 #include <ngx_event_connect.h>
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
9 #include <ngx_event_pipe.h>
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
10
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
11 #include <ngx_http.h>
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
12
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
13 #include <ngx_mail.h>
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
14 #include <ngx_mail_pop3_module.h>
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
15 #include <ngx_mail_imap_module.h>
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
16 #include <ngx_mail_smtp_module.h>
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
17 }
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
18
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
19 // nginx header files should go before other, because they define 64-bit off_t
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
20 // #include <string>
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
21
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
22
4798
29928279ec9f Merge of r4760, r4761: -Wmissing-prototypes.
Maxim Dounin <mdounin@mdounin.ru>
parents: 2157
diff changeset
23 void ngx_cpp_test_handler(void *data);
29928279ec9f Merge of r4760, r4761: -Wmissing-prototypes.
Maxim Dounin <mdounin@mdounin.ru>
parents: 2157
diff changeset
24
2157
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
25 void
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
26 ngx_cpp_test_handler(void *data)
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
27 {
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
28 return;
69ef10ad7011 ngx_cpp_test_module
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
29 }