Fix some problems found while compiling and linking Wine under Cygwin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Changelog:
    Dmitry Timoshkov <dmitry@codeweavers.com>
    Fix some problems found while compiling and linking Wine under Cygwin.

diff -up cvs/hq/wine/configure.ac wine/configure.ac
--- cvs/hq/wine/configure.ac	Sat Oct 11 12:11:46 2003
+++ wine/configure.ac	Sun Oct 12 10:54:02 2003
@@ -969,6 +969,7 @@ AC_CHECK_FUNCS(\
 	popen \
 	pread \
 	pwrite \
+	res_init \
 	rfork \
 	select \
 	sendmsg \
@@ -1020,6 +1021,7 @@ AC_CHECK_HEADERS(\
 	netinet/tcp.h \
 	netinet/tcp_fsm.h \
 	openssl/ssl.h \
+	process.h \
 	pty.h \
 	pwd.h \
 	regex.h \
@@ -1148,7 +1150,7 @@ dnl **** Check for types ****
 
 AC_C_CONST
 AC_C_INLINE
-AC_CHECK_TYPES([mode_t, off_t, pid_t, size_t, ssize_t])
+AC_CHECK_TYPES([mode_t, off_t, pid_t, size_t, ssize_t, struct __res_state])
 AC_CHECK_SIZEOF(long long,0)
 
 AC_CACHE_CHECK([whether linux/input.h is for real],
diff -up cvs/hq/wine/dlls/gdi/Makefile.in wine/dlls/gdi/Makefile.in
--- cvs/hq/wine/dlls/gdi/Makefile.in	Sat Oct 11 12:11:48 2003
+++ wine/dlls/gdi/Makefile.in	Sun Oct 12 09:00:00 2003
@@ -4,7 +4,7 @@ TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 MODULE    = gdi32.dll
-IMPORTS   = advapi32 kernel32
+IMPORTS   = advapi32 kernel32 ntdll
 ALTNAMES  = gdi.exe dispdib.dll wing.dll
 EXTRAINCL = @FREETYPEINCL@
 EXTRALIBS = $(LIBUNICODE) @ICULIBS@
diff -up cvs/hq/wine/dlls/iphlpapi/ifenum.c wine/dlls/iphlpapi/ifenum.c
--- cvs/hq/wine/dlls/iphlpapi/ifenum.c	Sat Sep 06 03:24:44 2003
+++ wine/dlls/iphlpapi/ifenum.c	Sun Oct 12 09:38:16 2003
@@ -565,34 +565,48 @@ DWORD getInterfacePhysicalByName(const c
 
       switch (ifr.ifr_hwaddr.sa_family)
       {
+#ifdef ARPHRD_LOOPBACK
         case ARPHRD_LOOPBACK:
           addrLen = 0;
           *type = MIB_IF_TYPE_LOOPBACK;
           break;
+#endif
+#ifdef ARPHRD_ETHER
         case ARPHRD_ETHER:
           addrLen = ETH_ALEN;
           *type = MIB_IF_TYPE_ETHERNET;
           break;
+#endif
+#ifdef ARPHRD_FDDI
         case ARPHRD_FDDI:
           addrLen = ETH_ALEN;
           *type = MIB_IF_TYPE_FDDI;
           break;
+#endif
+#ifdef ARPHRD_IEEE802
         case ARPHRD_IEEE802: /* 802.2 Ethernet && Token Ring, guess TR? */
           addrLen = ETH_ALEN;
           *type = MIB_IF_TYPE_TOKENRING;
           break;
+#endif
+#ifdef ARPHRD_IEEE802_TR
         case ARPHRD_IEEE802_TR: /* also Token Ring? */
           addrLen = ETH_ALEN;
           *type = MIB_IF_TYPE_TOKENRING;
           break;
+#endif
+#ifdef ARPHRD_SLIP
         case ARPHRD_SLIP:
           addrLen = 0;
           *type = MIB_IF_TYPE_SLIP;
           break;
+#endif
+#ifdef ARPHRD_PPP
         case ARPHRD_PPP:
           addrLen = 0;
           *type = MIB_IF_TYPE_PPP;
           break;
+#endif
         default:
           addrLen = min(MAX_INTERFACE_PHYSADDR, sizeof(ifr.ifr_hwaddr.sa_data));
           *type = MIB_IF_TYPE_OTHER;
diff -up cvs/hq/wine/dlls/iphlpapi/iphlpapi_main.c wine/dlls/iphlpapi/iphlpapi_main.c
--- cvs/hq/wine/dlls/iphlpapi/iphlpapi_main.c	Tue Sep 09 01:19:58 2003
+++ wine/dlls/iphlpapi/iphlpapi_main.c	Sun Oct 12 09:40:02 2003
@@ -1192,6 +1192,7 @@ DWORD WINAPI GetNetworkParams(PFIXED_INF
   if (!pOutBufLen)
     return ERROR_INVALID_PARAMETER;
 
+#ifdef HAVE_RES_INIT
   res_init();
   size = sizeof(FIXED_INFO) + (_res.nscount > 0 ? (_res.nscount  - 1) *
    sizeof(IP_ADDR_STRING) : 0);
@@ -1231,6 +1232,7 @@ DWORD WINAPI GetNetworkParams(PFIXED_INF
     RegQueryValueExA(hKey, "ScopeID", NULL, NULL, pFixedInfo->ScopeId, &size);
     RegCloseKey(hKey);
   }
+#endif
 
   /* FIXME: can check whether routing's enabled in /proc/sys/net/ipv4/ip_forward
      I suppose could also check for a listener on port 53 to set EnableDns */
diff -up cvs/hq/wine/dlls/iphlpapi/ipstats.c wine/dlls/iphlpapi/ipstats.c
--- cvs/hq/wine/dlls/iphlpapi/ipstats.c	Tue Sep 30 01:29:24 2003
+++ wine/dlls/iphlpapi/ipstats.c	Sun Oct 12 10:10:28 2003
@@ -53,37 +53,37 @@
 #include "ifenum.h"
 #include "ipstats.h"
 
-#ifndef TCPS_ESTABLISHED
+#if !defined TCPS_ESTABLISHED && defined TCP_ESTABLISHED
 # define TCPS_ESTABLISHED TCP_ESTABLISHED
 #endif
-#ifndef TCPS_SYN_SENT
+#if !defined TCPS_SYN_SENT && defined TCP_SYN_SENT
 # define TCPS_SYN_SENT TCP_SYN_SENT
 #endif
-#ifndef TCPS_SYN_RECEIVED
+#if !defined TCPS_SYN_RECEIVED && defined TCP_SYN_RECV
 # define TCPS_SYN_RECEIVED TCP_SYN_RECV
 #endif
-#ifndef TCPS_FIN_WAIT_1
+#if !defined TCPS_FIN_WAIT_1 && defined TCP_FIN_WAIT1
 # define TCPS_FIN_WAIT_1 TCP_FIN_WAIT1
 #endif
-#ifndef TCPS_FIN_WAIT_2
+#if !defined TCPS_FIN_WAIT_2 && defined TCP_FIN_WAIT2
 # define TCPS_FIN_WAIT_2 TCP_FIN_WAIT2
 #endif
-#ifndef TCPS_TIME_WAIT
+#if !defined TCPS_TIME_WAIT && defined TCP_TIME_WAIT
 # define TCPS_TIME_WAIT TCP_TIME_WAIT
 #endif
-#ifndef TCPS_CLOSED
+#if !defined TCPS_CLOSED && defined TCP_CLOSE
 # define TCPS_CLOSED TCP_CLOSE
 #endif
-#ifndef TCPS_CLOSE_WAIT
+#if !defined TCPS_CLOSE_WAIT && defined TCP_CLOSE_WAIT
 # define TCPS_CLOSE_WAIT TCP_CLOSE_WAIT
 #endif
-#ifndef TCPS_LAST_ACK
+#if !defined TCPS_LAST_ACK && defined TCP_LAST_ACK
 # define TCPS_LAST_ACK TCP_LAST_ACK
 #endif
-#ifndef TCPS_LISTEN
+#if !defined TCPS_LISTEN && defined TCP_LISTEN
 # define TCPS_LISTEN TCP_LISTEN
 #endif
-#ifndef TCPS_CLOSING
+#if !defined TCPS_CLOSING && defined TCP_CLOSING
 # define TCPS_CLOSING TCP_CLOSING
 #endif
 
@@ -686,11 +686,16 @@ PMIB_IPNETTABLE getArpTable(void)
           if (ptr && *ptr) {
             DWORD flags = strtoul(ptr, &endPtr, 16);
 
+#ifdef ATF_COM
             if (flags & ATF_COM)
               ret->table[ret->dwNumEntries].dwType = MIB_IPNET_TYPE_DYNAMIC;
-            else if (flags & ATF_PERM)
+            else
+#endif
+#ifdef ATF_PERM
+            if (flags & ATF_PERM)
               ret->table[ret->dwNumEntries].dwType = MIB_IPNET_TYPE_STATIC;
             else
+#endif
               ret->table[ret->dwNumEntries].dwType = MIB_IPNET_TYPE_OTHER;
 
             ptr = endPtr;
@@ -831,40 +836,62 @@ PMIB_TCPTABLE getTcpTable(void)
 
             switch (state)
             {
+#ifdef TCPS_ESTABLISHED
               case TCPS_ESTABLISHED:
                 ret->table[ret->dwNumEntries].dwState = MIB_TCP_STATE_ESTAB;
                 break;
+#endif
+#ifdef TCPS_SYN_SENT
               case TCPS_SYN_SENT:
                 ret->table[ret->dwNumEntries].dwState = MIB_TCP_STATE_SYN_SENT;
                 break;
+#endif
+#ifdef TCPS_SYN_RECEIVED
               case TCPS_SYN_RECEIVED:
                 ret->table[ret->dwNumEntries].dwState = MIB_TCP_STATE_SYN_RCVD;
                 break;
+#endif
+#ifdef TCPS_FIN_WAIT_1
               case TCPS_FIN_WAIT_1:
                 ret->table[ret->dwNumEntries].dwState = MIB_TCP_STATE_FIN_WAIT1;
                 break;
+#endif
+#ifdef TCPS_FIN_WAIT_2
               case TCPS_FIN_WAIT_2:
                 ret->table[ret->dwNumEntries].dwState = MIB_TCP_STATE_FIN_WAIT2;
                 break;
+#endif
+#ifdef TCPS_TIME_WAIT
               case TCPS_TIME_WAIT:
                 ret->table[ret->dwNumEntries].dwState = MIB_TCP_STATE_TIME_WAIT;
                 break;
+#endif
+#ifdef TCPS_CLOSED
               case TCPS_CLOSED:
                 ret->table[ret->dwNumEntries].dwState = MIB_TCP_STATE_CLOSED;
                 break;
+#endif
+#ifdef TCPS_CLOSE_WAIT
               case TCPS_CLOSE_WAIT:
                 ret->table[ret->dwNumEntries].dwState =
                  MIB_TCP_STATE_CLOSE_WAIT;
                 break;
+#endif
+#ifdef TCPS_LAST_ACK
               case TCPS_LAST_ACK:
                 ret->table[ret->dwNumEntries].dwState = MIB_TCP_STATE_LAST_ACK;
                 break;
+#endif
+#ifdef TCPS_LISTEN
               case TCPS_LISTEN:
                 ret->table[ret->dwNumEntries].dwState = MIB_TCP_STATE_LISTEN;
                 break;
+#endif
+#ifdef TCPS_CLOSING
               case TCPS_CLOSING:
                 ret->table[ret->dwNumEntries].dwState = MIB_TCP_STATE_CLOSING;
                 break;
+#endif
             }
             ptr = endPtr;
           }
diff -up cvs/hq/wine/dlls/mshtml/mshtml.spec wine/dlls/mshtml/mshtml.spec
--- cvs/hq/wine/dlls/mshtml/mshtml.spec	Mon Sep 08 19:32:14 2003
+++ wine/dlls/mshtml/mshtml.spec	Sun Oct 12 10:24:28 2003
@@ -10,7 +10,7 @@
 9 stub DllUnregisterServer
 10 stub MatchExactGetIDsOfNames
 11 stub RNIGetCompatibleVersion
-12 stdcall RunHTMLApplication()
+12 stdcall RunHTMLApplication(long long str long)
 13 stub ShowHTMLDialog
 14 stub ShowModalDialog
 15 stub ShowModelessHTMLDialog
diff -up cvs/hq/wine/dlls/msi/msi.spec wine/dlls/msi/msi.spec
--- cvs/hq/wine/dlls/msi/msi.spec	Fri Oct 03 11:15:28 2003
+++ wine/dlls/msi/msi.spec	Sun Oct 12 10:29:28 2003
@@ -28,13 +28,13 @@
 28 stdcall MsiDatabaseImportW(wstr wstr)
 29 stub MsiDatabaseMergeA
 30 stub MsiDatabaseMergeW
-31 stdcall MsiDatabaseOpenViewA(str ptr)
-32 stdcall MsiDatabaseOpenViewW(wstr ptr)
+31 stdcall MsiDatabaseOpenViewA(long str ptr)
+32 stdcall MsiDatabaseOpenViewW(long wstr ptr)
 33 stdcall MsiDoActionA(long str)
 34 stdcall MsiDoActionW(long wstr)
 35 stub MsiEnableUIPreview
-36 stdcall MsiEnumClientsA(long ptr)
-37 stdcall MsiEnumClientsW(long ptr)
+36 stdcall MsiEnumClientsA(str long ptr)
+37 stdcall MsiEnumClientsW(wstr long ptr)
 38 stdcall MsiEnumComponentQualifiersA(str long str ptr str ptr)
 39 stdcall MsiEnumComponentQualifiersW(wstr long wstr ptr wstr ptr)
 40 stdcall MsiEnumComponentsA(long ptr)
@@ -74,8 +74,8 @@
 74 stub MsiGetPropertyW
 75 stub MsiGetSourcePathA
 76 stub MsiGetSourcePathW
-77 stdcall MsiGetSummaryInformationA(str long ptr)
-78 stdcall MsiGetSummaryInformationW(wstr long ptr)
+77 stdcall MsiGetSummaryInformationA(long str long ptr)
+78 stdcall MsiGetSummaryInformationW(long wstr long ptr)
 79 stub MsiGetTargetPathA
 80 stub MsiGetTargetPathW
 81 stub MsiGetUserInfoA
diff -up cvs/hq/wine/dlls/rpcrt4/Makefile.in wine/dlls/rpcrt4/Makefile.in
--- cvs/hq/wine/dlls/rpcrt4/Makefile.in	Sat Oct 11 12:11:50 2003
+++ wine/dlls/rpcrt4/Makefile.in	Sun Oct 12 10:34:38 2003
@@ -4,7 +4,7 @@ TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 MODULE    = rpcrt4.dll
-IMPORTS   = advapi32 kernel32
+IMPORTS   = advapi32 kernel32 ntdll
 EXTRALIBS = $(LIBUUID)
 
 C_SRCS = \
diff -up cvs/hq/wine/dlls/wininet/internet.h wine/dlls/wininet/internet.h
--- cvs/hq/wine/dlls/wininet/internet.h	Thu Sep 25 22:47:58 2003
+++ wine/dlls/wininet/internet.h	Sun Oct 12 10:43:10 2003
@@ -36,6 +36,9 @@
 # include <openssl/ssl.h>
 #undef DSA
 #endif
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
 
 /* used for netconnection.c stuff */
 typedef struct
diff -up cvs/hq/wine/dlls/wininet/Makefile.in wine/dlls/wininet/Makefile.in
--- cvs/hq/wine/dlls/wininet/Makefile.in	Sat Oct 11 12:11:50 2003
+++ wine/dlls/wininet/Makefile.in	Sun Oct 12 10:41:58 2003
@@ -4,7 +4,7 @@ TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 MODULE    = wininet.dll
-IMPORTS   = mpr shlwapi shell32 user32 advapi32 kernel32
+IMPORTS   = mpr shlwapi shell32 user32 advapi32 kernel32 ntdll
 EXTRALIBS = $(LIBUNICODE)
 
 C_SRCS = \
diff -up cvs/hq/wine/dlls/winsock/socket.c wine/dlls/winsock/socket.c
--- cvs/hq/wine/dlls/winsock/socket.c	Tue Sep 30 01:29:30 2003
+++ wine/dlls/winsock/socket.c	Sun Oct 12 09:27:56 2003
@@ -283,7 +283,9 @@ static const int ws_ip_map[][2] =
     MAP_OPTION( IP_ADD_MEMBERSHIP ),
     MAP_OPTION( IP_DROP_MEMBERSHIP ),
     MAP_OPTION( IP_OPTIONS ),
+#ifdef IP_HDRINCL
     MAP_OPTION( IP_HDRINCL ),
+#endif
     MAP_OPTION( IP_TOS ),
     MAP_OPTION( IP_TTL ),
     { 0, 0 }
@@ -2032,8 +2034,10 @@ INT WINAPI WSAIoctl (SOCKET s,
                            intArray->iiFlags = 0;
                            if (ifInfo.ifr_flags & IFF_BROADCAST)
                               intArray->iiFlags |= WS_IFF_BROADCAST;
+#ifdef IFF_POINTOPOINT
                            if (ifInfo.ifr_flags & IFF_POINTOPOINT)
                               intArray->iiFlags |= WS_IFF_POINTTOPOINT;
+#endif
                            if (ifInfo.ifr_flags & IFF_LOOPBACK)
                               intArray->iiFlags |= WS_IFF_LOOPBACK;
                            if (ifInfo.ifr_flags & IFF_UP)
diff -up cvs/hq/wine/include/config.h.in wine/include/config.h.in
--- cvs/hq/wine/include/config.h.in	Wed Oct 08 01:45:40 2003
+++ wine/include/config.h.in	Sun Oct 12 11:02:16 2003
@@ -395,6 +395,9 @@
 /* Define to 1 if you have the `pread' function. */
 #undef HAVE_PREAD
 
+/* Define to 1 if you have the <process.h> header file. */
+#undef HAVE_PROCESS_H
+
 /* Define to 1 if the system has the type `pthread_rwlockattr_t'. */
 #undef HAVE_PTHREAD_RWLOCKATTR_T
 
@@ -419,8 +422,14 @@
 /* Define to 1 if you have the <resolv.h> header file. */
 #undef HAVE_RESOLV_H
 
+/* Define to 1 if you have the `res_init' function. */
+#undef HAVE_RES_INIT
+
 /* Define to 1 if you have the `rfork' function. */
 #undef HAVE_RFORK
+
+/* Define to 1 if the system has the type `struct __res_state'. */
+#undef HAVE___RES_STATE
 
 /* Define if we have SANE development environment */
 #undef HAVE_SANE
diff -up cvs/hq/wine/include/wine/port.h wine/include/wine/port.h
--- cvs/hq/wine/include/wine/port.h	Thu Sep 25 02:55:26 2003
+++ wine/include/wine/port.h	Sun Oct 12 08:52:44 2003
@@ -36,6 +36,9 @@
 #ifdef HAVE_IO_H
 # include <io.h>
 #endif
+#ifdef HAVE_PROCESS_H
+# include <process.h>
+#endif
 #include <string.h>
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
diff -up cvs/hq/wine/libs/wine/wine.def wine/libs/wine/wine.def
--- cvs/hq/wine/libs/wine/wine.def	Fri May 02 01:28:12 2003
+++ wine/libs/wine/wine.def	Sun Oct 12 08:43:54 2003
@@ -11,6 +11,7 @@ EXPORTS
     __wine_dll_register
     __wine_main_argc
     __wine_main_argv
+    __wine_main_environ
     __wine_main_wargv
     wine_anon_mmap
     wine_dbg_add_option
@@ -29,6 +30,7 @@ EXPORTS
     wine_dll_unload
     wine_dlopen
     wine_dlsym
+    wine_get_argv0_path
     wine_get_config_dir
     wine_get_cs
     wine_get_ds
@@ -50,5 +52,8 @@ EXPORTS
     wine_ldt_init_locking
     wine_ldt_realloc_entries
     wine_ldt_set_entry
+    wine_pthread_init_process
+    wine_pthread_init_thread
     wine_set_fs
     wine_set_gs
+    wine_switch_to_stack
diff -up cvs/hq/wine/scheduler/pthread.c wine/scheduler/pthread.c
--- cvs/hq/wine/scheduler/pthread.c	Fri Oct 03 11:15:46 2003
+++ wine/scheduler/pthread.c	Sun Oct 12 11:43:32 2003
@@ -76,7 +76,9 @@ struct pthread_descr_struct
     int                thread_h_errno;
     int                cancel_state;
     int                cancel_type;
+#ifdef HAVE___RES_STATE
     struct __res_state res_state;
+#endif
     const void        *key_data[MAX_KEYS];  /* for normal pthread keys */
     const void        *tsd_data[MAX_TSD];   /* for libc internal tsd variables */
 };
@@ -123,11 +125,13 @@ int *__h_errno_location(void)
     return &descr->thread_h_errno;
 }
 
+#ifdef HAVE___RES_STATE
 struct __res_state *__res_state(void)
 {
     pthread_descr descr = __pthread_thread_self();
     return &descr->res_state;
 }
+#endif
 
 static inline void writejump( const char *symbol, void *dest )
 {
@@ -161,7 +165,9 @@ void wine_pthread_init_process( const st
     initial_descr.cancel_type  = PTHREAD_CANCEL_ASYNCHRONOUS;
     writejump( "__errno_location", __errno_location );
     writejump( "__h_errno_location", __h_errno_location );
+#ifdef HAVE___RES_STATE
     writejump( "__res_state", __res_state );
+#endif
     if (libc_uselocale) libc_uselocale( -1 /*LC_GLOBAL_LOCALE*/ );
 }
 
diff -up cvs/hq/wine/tools/winegcc/utils.c wine/tools/winegcc/utils.c
--- cvs/hq/wine/tools/winegcc/utils.c	Thu Sep 11 22:16:34 2003
+++ wine/tools/winegcc/utils.c	Sun Oct 12 09:17:22 2003
@@ -27,6 +27,9 @@
 #include <stdarg.h>
 #include <stdlib.h>
 #include <errno.h>
+#ifdef HAVE_PROCESS_H
+# include <process.h>
+#endif
 
 #include "utils.h"
 





[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux