Rob Shearman : include: Add a stub implementation of gai_strerror{A, W}.

Alexandre Julliard julliard at winehq.org
Tue Mar 31 12:19:23 CDT 2009


Module: wine
Branch: master
Commit: fc10ba8fc75c89f11c716201c86f49f4ae00d1d5
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=fc10ba8fc75c89f11c716201c86f49f4ae00d1d5

Author: Rob Shearman <robertshearman at gmail.com>
Date:   Tue Mar 31 13:38:04 2009 +0100

include: Add a stub implementation of gai_strerror{A,W}.

---

 include/ws2tcpip.h |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/include/ws2tcpip.h b/include/ws2tcpip.h
index 07b357b..8084170 100644
--- a/include/ws2tcpip.h
+++ b/include/ws2tcpip.h
@@ -112,6 +112,38 @@ typedef ADDRINFOA ADDRINFO, *LPADDRINFO;
 extern "C" {
 #endif
 
+#define GAI_STRERROR_BUFFER_SIZE        1024
+
+static inline char *gai_strerrorA(int errcode)
+{
+    static char buffer[GAI_STRERROR_BUFFER_SIZE + 1];
+
+    /* FIXME: should format message from system, ignoring inserts in neutral
+     * language */
+    buffer[0] = '\0';
+
+    return buffer;
+}
+
+static inline WCHAR *gai_strerrorW(int errcode)
+{
+    static WCHAR buffer[GAI_STRERROR_BUFFER_SIZE + 1];
+
+    /* FIXME: should format message from system, ignoring inserts in neutral
+     * language */
+    buffer[0] = '\0';
+
+    return buffer;
+}
+
+#ifdef USE_WS_PREFIX
+# define WS_gai_strerror WINELIB_NAME_AW(gai_strerror)
+#elif defined(WINE_NO_UNICODE_MACROS)
+# define gai_strerror gai_strerrorA
+#else
+# define gai_strerror WINELIB_NAME_AW(gai_strerror)
+#endif
+
 void WINAPI WS(freeaddrinfo)(LPADDRINFO);
 #define     FreeAddrInfoA WS(freeaddrinfo)
 void WINAPI FreeAddrInfoW(PADDRINFOW);




More information about the wine-cvs mailing list