Fix windows build

reviewable/pr7771/r3
Yuchen Zeng 8 years ago
parent 3cc6a02a55
commit e882e39224
  1. 3
      BUILD
  2. 2
      CMakeLists.txt
  3. 2
      Makefile
  4. 1
      binding.gyp
  5. 1
      build.yaml
  6. 1
      config.m4
  7. 1
      gRPC-Core.podspec
  8. 1
      grpc.gemspec
  9. 1
      package.xml
  10. 5
      src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver.h
  11. 23
      src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_fallback.c
  12. 4
      src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c
  13. 1
      src/python/grpcio/grpc_core_dependencies.py
  14. 1
      tools/doxygen/Doxyfile.core.internal
  15. 1
      tools/run_tests/sources_and_headers.json
  16. 2
      vsprojects/vcxproj/grpc/grpc.vcxproj
  17. 3
      vsprojects/vcxproj/grpc/grpc.vcxproj.filters
  18. 2
      vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
  19. 3
      vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters

@ -521,6 +521,7 @@ cc_library(
"src/core/ext/lb_policy/pick_first/pick_first.c",
"src/core/ext/lb_policy/round_robin/round_robin.c",
"src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c",
"src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_fallback.c",
"src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c",
"src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c",
"src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c",
@ -1273,6 +1274,7 @@ cc_library(
"src/core/ext/client_channel/subchannel_index.c",
"src/core/ext/client_channel/uri_parser.c",
"src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c",
"src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_fallback.c",
"src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c",
"src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c",
"src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c",
@ -2195,6 +2197,7 @@ objc_library(
"src/core/ext/lb_policy/pick_first/pick_first.c",
"src/core/ext/lb_policy/round_robin/round_robin.c",
"src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c",
"src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_fallback.c",
"src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c",
"src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c",
"src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c",

@ -505,6 +505,7 @@ add_library(grpc
src/core/ext/lb_policy/pick_first/pick_first.c
src/core/ext/lb_policy/round_robin/round_robin.c
src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c
src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_fallback.c
src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c
src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c
src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c
@ -993,6 +994,7 @@ add_library(grpc_unsecure
src/core/ext/client_channel/subchannel_index.c
src/core/ext/client_channel/uri_parser.c
src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c
src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_fallback.c
src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c
src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c
src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c

@ -2823,6 +2823,7 @@ LIBGRPC_SRC = \
src/core/ext/lb_policy/pick_first/pick_first.c \
src/core/ext/lb_policy/round_robin/round_robin.c \
src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c \
src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_fallback.c \
src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c \
src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c \
src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c \
@ -3571,6 +3572,7 @@ LIBGRPC_UNSECURE_SRC = \
src/core/ext/client_channel/subchannel_index.c \
src/core/ext/client_channel/uri_parser.c \
src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c \
src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_fallback.c \
src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c \
src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c \
src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c \

@ -761,6 +761,7 @@
'src/core/ext/lb_policy/pick_first/pick_first.c',
'src/core/ext/lb_policy/round_robin/round_robin.c',
'src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c',
'src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_fallback.c',
'src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c',
'src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c',
'src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c',

@ -465,6 +465,7 @@ filegroups:
- src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h
src:
- src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c
- src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_fallback.c
- src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c
- src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c
- src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c

@ -273,6 +273,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/lb_policy/pick_first/pick_first.c \
src/core/ext/lb_policy/round_robin/round_robin.c \
src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c \
src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_fallback.c \
src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c \
src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c \
src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c \

@ -616,6 +616,7 @@ Pod::Spec.new do |s|
'src/core/ext/lb_policy/pick_first/pick_first.c',
'src/core/ext/lb_policy/round_robin/round_robin.c',
'src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c',
'src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_fallback.c',
'src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c',
'src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c',
'src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c',

@ -535,6 +535,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/lb_policy/pick_first/pick_first.c )
s.files += %w( src/core/ext/lb_policy/round_robin/round_robin.c )
s.files += %w( src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c )
s.files += %w( src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_fallback.c )
s.files += %w( src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c )
s.files += %w( src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c )
s.files += %w( src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c )

@ -542,6 +542,7 @@
<file baseinstalldir="/" name="src/core/ext/lb_policy/pick_first/pick_first.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/lb_policy/round_robin/round_robin.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_fallback.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c" role="src" />

@ -34,9 +34,6 @@
#ifndef GRPC_CORE_EXT_RESOLVER_DNS_C_ARES_GRPC_ARES_EV_DRIVER_H
#define GRPC_CORE_EXT_RESOLVER_DNS_C_ARES_GRPC_ARES_EV_DRIVER_H
#include <grpc/support/port_platform.h>
#ifndef GRPC_NATIVE_ADDRESS_RESOLVE
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/pollset_set.h"
@ -64,6 +61,4 @@ grpc_error *grpc_ares_ev_driver_create(grpc_ares_ev_driver **ev_driver,
void grpc_ares_ev_driver_destroy(grpc_exec_ctx *exec_ctx,
grpc_ares_ev_driver *ev_driver);
#endif /* GRPC_NATIVE_ADDRESS_RESOLVE */
#endif /* GRPC_CORE_EXT_RESOLVER_DNS_C_ARES_GRPC_ARES_EV_DRIVER_H */

@ -30,8 +30,27 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include <grpc/support/port_platform.h>
#ifdef GPR_WINSOCK_SOCKET
#ifdef GRPC_NATIVE_ADDRESS_RESOLVE
#include "src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver.h"
#endif /* GPR_WINSOCK_SOCKET */
struct grpc_ares_ev_driver {};
void grpc_ares_ev_driver_start(grpc_exec_ctx *exec_ctx,
grpc_ares_ev_driver *ev_driver) {}
void *grpc_ares_ev_driver_get_channel(grpc_ares_ev_driver *ev_driver) {
return NULL;
}
grpc_error *grpc_ares_ev_driver_create(grpc_ares_ev_driver **ev_driver,
grpc_pollset_set *pollset_set) {
return GRPC_ERROR_NONE;
}
void grpc_ares_ev_driver_destroy(grpc_exec_ctx *exec_ctx,
grpc_ares_ev_driver *ev_driver) {}
#endif /* GRPC_NATIVE_ADDRESS_RESOLVE */

@ -40,7 +40,7 @@
void grpc_resolve_address_ares_impl(grpc_exec_ctx *exec_ctx, const char *name,
const char *default_port,
grpc_pollset_set *pollset_set,
grpc_ares_ev_driver *ev_driver,
grpc_closure *on_done,
grpc_resolved_addresses **addrs) {
grpc_resolve_address(exec_ctx, name, default_port, on_done, addrs);
@ -48,7 +48,7 @@ void grpc_resolve_address_ares_impl(grpc_exec_ctx *exec_ctx, const char *name,
void (*grpc_resolve_address_ares)(
grpc_exec_ctx *exec_ctx, const char *name, const char *default_port,
grpc_pollset_set *pollset_set, grpc_closure *on_done,
grpc_ares_ev_driver *ev_driver, grpc_closure *on_done,
grpc_resolved_addresses **addrs) = grpc_resolve_address_ares_impl;
grpc_error *grpc_ares_init(void) { return GRPC_ERROR_NONE; }

@ -267,6 +267,7 @@ CORE_SOURCE_FILES = [
'src/core/ext/lb_policy/pick_first/pick_first.c',
'src/core/ext/lb_policy/round_robin/round_robin.c',
'src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c',
'src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_fallback.c',
'src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c',
'src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c',
'src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c',

@ -1152,6 +1152,7 @@ third_party/nanopb/pb_encode.c \
src/core/ext/lb_policy/pick_first/pick_first.c \
src/core/ext/lb_policy/round_robin/round_robin.c \
src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c \
src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_fallback.c \
src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c \
src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c \
src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c \

@ -7087,6 +7087,7 @@
"src": [
"src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c",
"src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver.h",
"src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_fallback.c",
"src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c",
"src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c",
"src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h",

@ -853,6 +853,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\dns_resolver_ares.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_ev_driver_fallback.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_ev_driver_posix.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_wrapper.c">

@ -571,6 +571,9 @@
<ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\dns_resolver_ares.c">
<Filter>src\core\ext\resolver\dns\c_ares</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_ev_driver_fallback.c">
<Filter>src\core\ext\resolver\dns\c_ares</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_ev_driver_posix.c">
<Filter>src\core\ext\resolver\dns\c_ares</Filter>
</ClCompile>

@ -747,6 +747,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\dns_resolver_ares.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_ev_driver_fallback.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_ev_driver_posix.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_wrapper.c">

@ -463,6 +463,9 @@
<ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\dns_resolver_ares.c">
<Filter>src\core\ext\resolver\dns\c_ares</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_ev_driver_fallback.c">
<Filter>src\core\ext\resolver\dns\c_ares</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_ev_driver_posix.c">
<Filter>src\core\ext\resolver\dns\c_ares</Filter>
</ClCompile>

Loading…
Cancel
Save