Revision: 4897
          http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4897&view=rev
Author:   ossman_
Date:     2012-04-25 14:54:04 +0000 (Wed, 25 Apr 2012)
Log Message:
-----------
Use the gcc way of creating shared segments in DLLs. The previous way
only works with MSVC.

Modified Paths:
--------------
    trunk/win/wm_hooks/CMakeLists.txt
    trunk/win/wm_hooks/wm_hooks.cxx

Removed Paths:
-------------
    trunk/win/wm_hooks/wm_hooks.def

Modified: trunk/win/wm_hooks/CMakeLists.txt
===================================================================
--- trunk/win/wm_hooks/CMakeLists.txt   2012-04-25 14:35:46 UTC (rev 4896)
+++ trunk/win/wm_hooks/CMakeLists.txt   2012-04-25 14:54:04 UTC (rev 4897)
@@ -2,7 +2,6 @@
 
 add_library(wm_hooks SHARED
   ../wm_hooks/wm_hooks.cxx
-  ../wm_hooks/wm_hooks.def
   ../wm_hooks/wm_hooks.rc)
 
 # We want the DLL to be named wm_hooks.dll rather than libwm_hooks.dll

Modified: trunk/win/wm_hooks/wm_hooks.cxx
===================================================================
--- trunk/win/wm_hooks/wm_hooks.cxx     2012-04-25 14:35:46 UTC (rev 4896)
+++ trunk/win/wm_hooks/wm_hooks.cxx     2012-04-25 14:54:04 UTC (rev 4897)
@@ -25,6 +25,8 @@
 #include <wm_hooks/wm_hooks.h>
 #include <os/os.h>
 
+#define SHARED __attribute__((section ("shared"), shared))
+
 UINT WM_HK_PingThread = RegisterWindowMessage(_T("RFB.WM_Hooks.PingThread"));
 
 UINT WM_HK_WindowChanged = 
RegisterWindowMessage(_T("RFB.WM_Hooks.WindowChanged"));
@@ -86,20 +88,18 @@
 // -=- Display update hooks
 //
 
-#pragma data_seg(".WM_Hooks_Shared")
-DWORD hook_owner = 0;
-DWORD hook_target = 0;
-HHOOK hook_CallWndProc = 0;
-HHOOK hook_CallWndProcRet = 0;
-HHOOK hook_GetMessage = 0;
-HHOOK hook_DialogMessage = 0;
-BOOL enable_cursor_shape = FALSE;
-HCURSOR cursor = 0;
+DWORD hook_owner SHARED = 0;
+DWORD hook_target SHARED = 0;
+HHOOK hook_CallWndProc SHARED = 0;
+HHOOK hook_CallWndProcRet SHARED = 0;
+HHOOK hook_GetMessage SHARED = 0;
+HHOOK hook_DialogMessage SHARED = 0;
+BOOL enable_cursor_shape SHARED = FALSE;
+HCURSOR cursor SHARED = 0;
 #ifdef _DEBUG
-UINT diagnostic_min=1;
-UINT diagnostic_max=0;
+UINT diagnostic_min SHARED =1;
+UINT diagnostic_max SHARED =0;
 #endif
-#pragma data_seg()
 
 #ifdef _DEBUG
 DLLEXPORT void WM_Hooks_SetDiagnosticRange(UINT min, UINT max) {
@@ -374,14 +374,12 @@
 // -=- User input hooks
 //
 
-#pragma data_seg(".WM_Hooks_Shared")
-HHOOK hook_keyboard = 0;
-HHOOK hook_pointer = 0;
-bool enable_real_ptr = true;
-bool enable_synth_ptr = true;
-bool enable_real_kbd = true;
-bool enable_synth_kbd = true;
-#pragma data_seg()
+HHOOK hook_keyboard SHARED = 0;
+HHOOK hook_pointer SHARED = 0;
+bool enable_real_ptr SHARED = true;
+bool enable_synth_ptr SHARED = true;
+bool enable_real_kbd SHARED = true;
+bool enable_synth_kbd SHARED = true;
 
 #ifdef WH_KEYBOARD_LL
 LRESULT CALLBACK HookKeyboardHook(int nCode, WPARAM wParam, LPARAM lParam) {

Deleted: trunk/win/wm_hooks/wm_hooks.def
===================================================================
--- trunk/win/wm_hooks/wm_hooks.def     2012-04-25 14:35:46 UTC (rev 4896)
+++ trunk/win/wm_hooks/wm_hooks.def     2012-04-25 14:54:04 UTC (rev 4897)
@@ -1,5 +0,0 @@
-LIBRARY      "wm_hooks"
-; DESCRIPTION  'Window Message Hooks Dynamic Link Library'
-
-SECTIONS
-       .WM_Hooks_Shared read write shared

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Tigervnc-commits mailing list
Tigervnc-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits

Reply via email to