Differences From Artifact [8a3ffcdad49f7276]:
- File
src/win32/ws2tcpip.d
- 2015-04-21 10:46:55 - part of checkin [4e2933c620] on branch trunk - Rebased to the latest verson dmd 2.067. Not yet verified the outcome. (user: kinaba) [annotate]
To Artifact [cfbc35c30c15b219]:
- File
src/win32/ws2tcpip.d
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
The problem was __gshared. Replacing it with TLS fixed the issue. Remaining problem is that "hack.d"'s CloseHandle hack is not working anymore.
(user: kinaba) [annotate]
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
219 size_t ai_addrlen; 219 size_t ai_addrlen;
220 char* ai_canonname; 220 char* ai_canonname;
221 SOCKADDR* ai_addr; 221 SOCKADDR* ai_addr;
222 addrinfo* ai_next; 222 addrinfo* ai_next;
223 } 223 }
224 224
225 extern(Windows) { 225 extern(Windows) {
226 static if (_WIN32_WINNT >= 0x0501) { | 226 static if (_WIN32_WINNT >= 0x501) {
227 void freeaddrinfo(addrinfo*); 227 void freeaddrinfo(addrinfo*);
228 int getaddrinfo (CPtr!(char), CPtr!(char), CPtr!(addrinfo), addr | 228 int getaddrinfo (const(char)*, const(char)*, const(addrinfo)*, a
229 int getnameinfo(CPtr!(SOCKADDR), socklen_t, char*, DWORD, char*, | 229 int getnameinfo(const(SOCKADDR)*, socklen_t, char*, DWORD, char*
230 } 230 }
231 } 231 }
232 232
233 /+ TODO 233 /+ TODO
234 static __inline char* 234 static __inline char*
235 gai_strerrorA(int ecode) 235 gai_strerrorA(int ecode)
236 { 236 {
237 static char message[1024+1]; | 237 static char[1024+1] message;
238 DWORD dwFlags = FORMAT_MESSAGE_FROM_SYSTEM 238 DWORD dwFlags = FORMAT_MESSAGE_FROM_SYSTEM
239 | FORMAT_MESSAGE_IGNORE_INSERTS 239 | FORMAT_MESSAGE_IGNORE_INSERTS
240 | FORMAT_MESSAGE_MAX_WIDTH_MASK; 240 | FORMAT_MESSAGE_MAX_WIDTH_MASK;
241 DWORD dwLanguageId = MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT); 241 DWORD dwLanguageId = MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT);
242 FormatMessageA(dwFlags, NULL, ecode, dwLanguageId, (LPSTR)message, 1024, 242 FormatMessageA(dwFlags, NULL, ecode, dwLanguageId, (LPSTR)message, 1024,
243 return message; 243 return message;
244 } 244 }
245 static __inline WCHAR* 245 static __inline WCHAR*
246 gai_strerrorW(int ecode) 246 gai_strerrorW(int ecode)
247 { 247 {
248 static WCHAR message[1024+1]; | 248 static WCHAR[1024+1] message;
249 DWORD dwFlags = FORMAT_MESSAGE_FROM_SYSTEM 249 DWORD dwFlags = FORMAT_MESSAGE_FROM_SYSTEM
250 | FORMAT_MESSAGE_IGNORE_INSERTS 250 | FORMAT_MESSAGE_IGNORE_INSERTS
251 | FORMAT_MESSAGE_MAX_WIDTH_MASK; 251 | FORMAT_MESSAGE_MAX_WIDTH_MASK;
252 DWORD dwLanguageId = MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT); 252 DWORD dwLanguageId = MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT);
253 FormatMessageW(dwFlags, NULL, ecode, dwLanguageId, (LPWSTR)message, 1024 253 FormatMessageW(dwFlags, NULL, ecode, dwLanguageId, (LPWSTR)message, 1024
254 return message; 254 return message;
255 } 255 }
................................................................................................................................................................................
261 +/ 261 +/
262 262
263 extern(Windows) { 263 extern(Windows) {
264 INT getnameinfo(SOCKADDR* pSockaddr, socklen_t SockaddrLength, 264 INT getnameinfo(SOCKADDR* pSockaddr, socklen_t SockaddrLength,
265 PCHAR pNodeBuffer, DWORD NodeBufferSize, PCHAR pServiceBuffer, 265 PCHAR pNodeBuffer, DWORD NodeBufferSize, PCHAR pServiceBuffer,
266 DWORD ServiceBufferSize, INT Flags); 266 DWORD ServiceBufferSize, INT Flags);
267 267
268 static if (_WIN32_WINNT >= 0x0502) { | 268 static if (_WIN32_WINNT >= 0x502) {
269 INT GetNameInfoW(SOCKADDR* pSockaddr, socklen_t SockaddrLength, 269 INT GetNameInfoW(SOCKADDR* pSockaddr, socklen_t SockaddrLength,
270 PWCHAR pNodeBuffer, DWORD NodeBufferSize, PWCHAR pServic 270 PWCHAR pNodeBuffer, DWORD NodeBufferSize, PWCHAR pServic
271 DWORD ServiceBufferSize, INT Flags); 271 DWORD ServiceBufferSize, INT Flags);
272 272
273 alias getnameinfo GetNameInfoA; 273 alias getnameinfo GetNameInfoA;
274 274
275 version(Unicode) { 275 version(Unicode) {
276 alias GetNameInfoW GetNameInfo; 276 alias GetNameInfoW GetNameInfo;
277 } else { 277 } else {
278 alias GetNameInfoA GetNameInfo; 278 alias GetNameInfoA GetNameInfo;
279 } 279 }
280 } 280 }
281 } 281 }