diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-12-01 16:57:30 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-12-01 16:57:30 +0300 |
commit | 40eb1f8b9b2a76d76ef6a4a094bf8192a44cbe41 (patch) | |
tree | f8e1b7f97762d6c36deeadca1b503dc91aa3ce12 /src/go/unit/nxt_go_lib.c | |
parent | ffb1c68609620824a88e0573e13f91ce0e810bf2 (diff) | |
download | unit-40eb1f8b9b2a76d76ef6a4a094bf8192a44cbe41.tar.gz unit-40eb1f8b9b2a76d76ef6a4a094bf8192a44cbe41.tar.bz2 |
Making Go package source distributable and renaming to 'nginx/unit'.
All header files are copied to Go package sources. As the result,
package can be (re-)build when required.
This closes #23 issue on GitHub.
Diffstat (limited to 'src/go/unit/nxt_go_lib.c')
-rw-r--r-- | src/go/unit/nxt_go_lib.c | 56 |
1 files changed, 2 insertions, 54 deletions
diff --git a/src/go/unit/nxt_go_lib.c b/src/go/unit/nxt_go_lib.c index 71940461..691688ab 100644 --- a/src/go/unit/nxt_go_lib.c +++ b/src/go/unit/nxt_go_lib.c @@ -4,62 +4,13 @@ * Copyright (C) NGINX, Inc. */ -#ifdef NXT_CONFIGURE - -#include <stdio.h> -#include "nxt_go_lib.h" - -// Stubs to compile during configure process. -int -nxt_go_response_write(nxt_go_request_t r, void *buf, size_t len) -{ - return -1; -} - -int -nxt_go_request_read(nxt_go_request_t r, void *dst, size_t dst_len) -{ - return -1; -} - -int -nxt_go_request_read_from(nxt_go_request_t r, void *dst, size_t dst_len, - void *src, size_t src_len) -{ - return -1; -} - -int -nxt_go_request_close(nxt_go_request_t r) -{ - return -1; -} - -int -nxt_go_request_done(nxt_go_request_t r) -{ - return -1; -} - -void -nxt_go_ready() -{ -} - -nxt_go_request_t -nxt_go_process_port_msg(void *buf, size_t buf_len, void *oob, size_t oob_len) -{ - return 0; -} - -#else - #include "nxt_go_run_ctx.h" #include "nxt_go_log.h" #include "nxt_go_port.h" +#include "_cgo_export.h" + #include <nxt_main.h> -#include <nxt_go_gen.h> int nxt_go_response_write(nxt_go_request_t r, void *buf, size_t len) @@ -190,6 +141,3 @@ nxt_go_process_port_msg(void *buf, size_t buf_len, void *oob, size_t oob_len) { return nxt_go_port_on_read(buf, buf_len, oob, oob_len); } - - -#endif /* NXT_CONFIGURE */ |