Overview
Comment: | Support getaddrinfo() checks on Windows |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
f61852edde1b8208546bc06efb66a1f5 |
User & Date: | rkeene on 2019-01-23 07:36:52 |
Other Links: | manifest | tags |
Context
2019-01-23
| ||
07:59 | Better handling of UDP sockets without a header (?!?) check-in: aa6814c5e7 user: rkeene tags: trunk | |
07:36 | Support getaddrinfo() checks on Windows check-in: f61852edde user: rkeene tags: trunk | |
07:21 | Use the SQLite3 way to generate a temporary DB check-in: 2b25880b82 user: rkeene tags: trunk | |
Changes
Modified configure.ac from [61d8a5ac92] to [39b7173c74].
︙ | ︙ | |||
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | ], [ nanotcl_cv_func_CryptGenRandom='no' ]) LIBS="${save_LIBS}" ]) if test "x$nanotcl_cv_func_CryptGenRandom" = 'xyes'; then LIBS="${LIBS} -ladvapi32" AC_DEFINE(HAVE_CRYPTGENRANDOM, [1], [Define if we have CryptGenRandom]) fi ]) ]) dnl Check for name resolution capabilities AC_CHECK_FUNCS(getaddrinfo, [ AC_CHECK_FUNCS(getnameinfo, [ AC_CHECK_HEADERS(sys/types.h sys/socket.h netdb.h) ]) ]) dnl Handle specifying where TCLLIB is, for testing AC_SUBST(TCLLIB_PATH) TCLLIB_PATH='/dev/null' AC_ARG_WITH([tcllib-path], AS_HELP_STRING([--with-tcllib-path], [Specify a path to Tcllib for the test suite]), [ if test "$withval" != "no" -a "$withval" != "yes"; then | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | ], [ nanotcl_cv_func_CryptGenRandom='no' ]) LIBS="${save_LIBS}" ]) if test "x$nanotcl_cv_func_CryptGenRandom" = 'xyes'; then LIBS="${LIBS} -ladvapi32" AC_DEFINE(HAVE_WINDOWS_H, [1], [Define if we have <windows.h>]) AC_DEFINE(HAVE_WINCRYPT_H, [1], [Define if we have <wincrypt.h>]) AC_DEFINE(HAVE_CRYPTGENRANDOM, [1], [Define if we have CryptGenRandom]) fi ]) ]) dnl Check for name resolution capabilities AC_CHECK_FUNCS(getaddrinfo, [ AC_CHECK_FUNCS(getnameinfo, [ AC_CHECK_HEADERS(sys/types.h sys/socket.h netdb.h) ]) ], [ AC_CACHE_CHECK([for getaddrinfo on Windows], nanotcl_cv_func_getaddrinfo, [ save_LIBS="${LIBS}" LIBS="${save_LIBS} -lws2_32" AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <ws2tcpip.h> #include <windows.h> ]], [[ int gai_ret; gai_ret = getaddrinfo(NULL, NULL, NULL, NULL); if (gai_ret == 0) { return(1); } else { return(0); } ]])], [ nanotcl_cv_func_getaddrinfo='yes' ], [ nanotcl_cv_func_getaddrinfo='no' ]) LIBS="${save_LIBS}" ]) if test "x$nanotcl_cv_func_getaddrinfo" = 'xyes'; then LIBS="${LIBS} -lws2_32" AC_DEFINE(HAVE_GETADDRINFO, [1], [Define if we have getaddrinfo]) AC_DEFINE(HAVE_GETNAMEINFO, [1], [Define if we have getnameinfo]) AC_DEFINE(HAVE_WINDOWS_H, [1], [Define if we have <windows.h>]) AC_DEFINE(HAVE_WS2TCPIP_H, [1], [Define if we have <ws2tcpip.h>]) fi ]) dnl Handle specifying where TCLLIB is, for testing AC_SUBST(TCLLIB_PATH) TCLLIB_PATH='/dev/null' AC_ARG_WITH([tcllib-path], AS_HELP_STRING([--with-tcllib-path], [Specify a path to Tcllib for the test suite]), [ if test "$withval" != "no" -a "$withval" != "yes"; then |
︙ | ︙ |
Modified nano.c from [df4af05b56] to [3c4ff0173f].
1 2 3 4 5 6 7 8 9 | /* XXX:TODO: OpenMP support is currently incomplete */ #undef NANO_TCL_HAVE_OPENMP #include <stdint.h> #include <limits.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <tcl.h> | > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | /* XXX:TODO: OpenMP support is currently incomplete */ #undef NANO_TCL_HAVE_OPENMP #ifdef HAVE_WS2TCPIP_H # include <ws2tcpip.h> #endif #ifdef HAVE_WINDOWS_H # include <windows.h> #endif #include <stdint.h> #include <limits.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <tcl.h> |
︙ | ︙ |