Klaus Demo nginx / 8a444aa
check nginx.pm version Igor Sysoev 15 years ago
6 changed file(s) with 21 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
00
1 VER= $(shell grep NGINX_VER src/core/nginx.h \
2 | sed -e 's%^.*\"nginx/\(.*\)\"%\1%')
1 VER= $(shell grep 'define NGINX_VERSION' src/core/nginx.h \
2 | sed -e 's/^.*\"\(.*\)\"/\1/')
33 NGINX= nginx-$(VER)
44 TEMP= tmp
55 CP= $(HOME)/java
00
1 VER= $(shell grep NGINX_VER src/core/nginx.h \
2 | sed -e 's%^.*\"nginx/\(.*\)\"%\1%')
1 VER= $(shell grep 'define NGINX_VERSION' src/core/nginx.h \
2 | sed -e 's/^.*\"\(.*\)\"/\1/')
33 NGINX= nginx-$(VER)
44 TEMP= tmp
55
77 #define _NGINX_H_INCLUDED_
88
99
10 #define NGINX_VER "nginx/0.4.9"
10 #define NGINX_VERSION "0.4.9"
11 #define NGINX_VER "nginx/" NGINX_VERSION
1112
1213 #define NGINX_VAR "NGINX"
1314 #define NGX_OLDPID_EXT ".oldbin"
1616 HTTP_SERVER_ERROR
1717 );
1818
19 our $VERSION = '0.4.0';
19 our $VERSION = '0.4.9';
2020
2121 require XSLoader;
2222 XSLoader::load('nginx', $VERSION);
564564 ngx_log_t *log)
565565 {
566566 int n;
567 char *embedding[6];
567 STRLEN len;
568 SV *sv;
569 char *ver, *embedding[6];
568570 PerlInterpreter *perl;
569571
570572 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, log, 0, "create perl interpreter");
630632
631633 if (n != 0) {
632634 ngx_log_error(NGX_LOG_ALERT, log, 0, "perl_parse() failed: %d", n);
635 goto fail;
636 }
637
638 sv = get_sv("nginx::VERSION", FALSE);
639 ver = SvPV(sv, len);
640
641 if (ngx_strcmp(ver, NGINX_VERSION) != 0) {
642 ngx_log_error(NGX_LOG_ALERT, log, 0,
643 "version " NGINX_VERSION " of nginx.pm is required, "
644 "but %s was found", ver);
633645 goto fail;
634646 }
635647
1010 #include <ngx_config.h>
1111 #include <ngx_core.h>
1212 #include <ngx_http.h>
13 #include <nginx.h>
1314
1415 #include <EXTERN.h>
1516 #include <perl.h>