Temporarily commented out thread-safe version of zts_gethostbyname(), added -fpermissive to Makefile for MinGW Windows build

This commit is contained in:
Joseph Henry
2017-10-10 14:59:55 -07:00
parent d7b3b20696
commit 0e0cf22aa3
2 changed files with 3 additions and 5 deletions

View File

@@ -43,7 +43,7 @@ ARTOOL=ar
ARFLAGS=rcs
CC=gcc
CXX=g++
CXXFLAGS+=-Wno-unknown-pragmas -Wno-pointer-arith -Wno-deprecated-declarations -Wno-conversion-null
CXXFLAGS+=-fpermissive -Wno-unknown-pragmas -Wno-pointer-arith -Wno-deprecated-declarations -Wno-conversion-null
WINDEFS=-lws2_32 -lshlwapi -liphlpapi -static -static-libgcc -static-libstdc++
LWIPARCHINCLUDE=$(LWIPCONTRIBDIR)/ports/win32/include
endif

View File

@@ -270,14 +270,14 @@ int zts_sethostname(const char *name, size_t len)
struct hostent *zts_gethostbyname(const char *name)
{
#if defined(STACK_LWIP)
// TODO:
// TODO: Test thread safety
/*
char buf[256];
int buflen = 256;
int h_err = 0;
struct hostent hret;
struct hostent **result = NULL;
int err = 0;
/*
if ((err = lwip_gethostbyname_r(name, &hret, buf, buflen, result, &h_err)) != 0) {
DEBUG_ERROR("err = %d", err);
DEBUG_ERROR("h_err = %d", h_err);
@@ -287,8 +287,6 @@ struct hostent *zts_gethostbyname(const char *name)
return *result;
*/
return lwip_gethostbyname(name);
#endif
#if defined(STCK_PICO)
#endif