winsock.h problem
Alexandre Julliard
julliard at winehq.com
Thu Apr 3 21:20:37 CST 2003
"Dimitrie O. Paun" <dpaun at rogers.com> writes:
> I get this when trying to compile putty:
>
> winegcc -mno-cygwin -Wall -O2 -D_WINDOWS -DDEBUG -DWIN32S_COMPAT -DNO_SECURITY -D_NO_OLDNAMES -DNO_MULTIMON -I. -c winnet.c
> In file included from /usr/local/include/wine/windows/windows.h:62,
> from /usr/local/include/wine/windows/winsock.h:114,
> from winnet.c:46:
> /usr/local/include/wine/windows/winsock2.h:401: warning: type defaults to `int' in declaration of `SOCKET'
> /usr/local/include/wine/windows/winsock2.h:401: warning: `__stdcall__' attribute only applies to function types
> /usr/local/include/wine/windows/winsock2.h:401: parse error before "WSAAccept"
Does this help? (this stuff is starting to be really ugly...)
Index: include/winsock.h
===================================================================
RCS file: /opt/cvs-commit/wine/include/winsock.h,v
retrieving revision 1.53
diff -u -r1.53 winsock.h
--- include/winsock.h 2 Apr 2003 01:38:42 -0000 1.53
+++ include/winsock.h 4 Apr 2003 03:17:56 -0000
@@ -26,22 +26,8 @@
# endif
#endif
-#ifndef _WINSOCKAPI_
-#define _WINSOCKAPI_
-
-/*
- * Setup phase
- */
-
-#ifdef USE_WS_PREFIX
-# define WS(x) WS_##x
-#else
-# define WS(x) x
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* defined(__cplusplus) */
+#ifndef __WINE_WINSOCKAPI_STDLIB_H
+#define __WINE_WINSOCKAPI_STDLIB_H
/*
* This section defines the items that conflict with the Unix headers.
@@ -110,12 +96,17 @@
# include <stdlib.h>
#endif /* !USE_WS_PREFIX */
+#endif /* __WINE_WINSOCKAPI_STDLIB_H */
+
#ifndef __WINESRC__
# include "windows.h"
#else
# include "windef.h"
#endif
+#ifndef _WINSOCKAPI_
+#define _WINSOCKAPI_
+
#if defined(__MINGW_H) && !defined(MSVCRT_BSD_TYPES_DEFINED)
/* MinGW doesn't define the u_xxx types */
typedef unsigned char u_char;
@@ -123,6 +114,16 @@
typedef unsigned int u_int;
typedef unsigned long u_long;
#endif
+
+#ifdef USE_WS_PREFIX
+# define WS(x) WS_##x
+#else
+# define WS(x) x
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* defined(__cplusplus) */
/* proper 4-byte packing */
#include "pshpack4.h"
--
Alexandre Julliard
julliard at winehq.com
More information about the wine-devel
mailing list