From 41fa75473e0f106977fb2f344679921e13ae8c77 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 4 Mar 2010 22:59:27 +0000 Subject: Don't use -fvisibility=hidden for cygwin. Make tkTestWinProcs const --- ChangeLog | 6 ++++++ unix/configure | 2 +- unix/tcl.m4 | 2 +- win/tkWinTest.c | 60 +++++++++++++++++++++++---------------------------------- 4 files changed, 32 insertions(+), 38 deletions(-) diff --git a/ChangeLog b/ChangeLog index 57e23a0..caa68da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-02-23 Jan Nijtmans + + * unix/configure.in: Don't use -fvisibility=hidden + * unix/tcl.m4: for cygwin. + * win/tkWinTest.c Make tkTestWinProcs const + 2010-03-04 Donal K. Fellows * doc/clipboard.n: Added note about STRING vs. UTF8_STRING types. diff --git a/unix/configure b/unix/configure index 382c284..1d76799 100755 --- a/unix/configure +++ b/unix/configure @@ -4315,7 +4315,7 @@ if test "${tcl_cv_cc_visibility_hidden+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fvisibility=hidden" + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fvisibility=hidden -Werror" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF diff --git a/unix/tcl.m4 b/unix/tcl.m4 index c5045c7..d6769af 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1052,7 +1052,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ AC_CACHE_CHECK([if compiler supports visibility "hidden"], tcl_cv_cc_visibility_hidden, [ - hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fvisibility=hidden" + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fvisibility=hidden -Werror" AC_TRY_COMPILE(,, tcl_cv_cc_visibility_hidden=yes, tcl_cv_cc_visibility_hidden=no) CFLAGS=$hold_cflags]) diff --git a/win/tkWinTest.c b/win/tkWinTest.c index b71fefa..70ab646 100644 --- a/win/tkWinTest.c +++ b/win/tkWinTest.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinTest.c,v 1.30 2010/01/22 14:17:53 nijtmans Exp $ + * RCS: @(#) $Id: tkWinTest.c,v 1.31 2010/03/04 22:59:28 nijtmans Exp $ */ #ifndef USE_TCL_STUBS @@ -45,47 +45,35 @@ static int TestwinlocaleObjCmd(ClientData clientData, static Tk_GetSelProc SetSelectionResult; -static TkWinProcs asciiProcs = { +static const TkWinProcs asciiProcs = { 0, - - (LRESULT (WINAPI *)(WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg, - WPARAM wParam, LPARAM lParam)) CallWindowProcA, - (LRESULT (WINAPI *)(HWND hWnd, UINT Msg, WPARAM wParam, - LPARAM lParam)) DefWindowProcA, - (ATOM (WINAPI *)(const WNDCLASS *lpWndClass)) RegisterClassA, - (BOOL (WINAPI *)(HWND hWnd, LPCTSTR lpString)) SetWindowTextA, - (HWND (WINAPI *)(DWORD dwExStyle, LPCTSTR lpClassName, - LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, - int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, - HINSTANCE hInstance, LPVOID lpParam)) CreateWindowExA, - (BOOL (WINAPI *)(HMENU hMenu, UINT uPosition, UINT uFlags, - UINT uIDNewItem, LPCTSTR lpNewItem)) InsertMenuA, - (int (WINAPI *)(HWND hWnd, LPCTSTR lpString, int nMaxCount)) GetWindowTextA, - (HWND (WINAPI *)(LPCTSTR lpClassName, LPCTSTR lpWindowName)) FindWindowA, - (int (WINAPI *)(HWND hwnd, LPTSTR lpClassName, int nMaxCount)) GetClassNameA, + (LRESULT (WINAPI *)(WNDPROC, HWND, UINT, WPARAM, LPARAM)) CallWindowProcA, + (LRESULT (WINAPI *)(HWND, UINT, WPARAM, LPARAM)) DefWindowProcA, + (ATOM (WINAPI *)(const WNDCLASS *)) RegisterClassA, + (BOOL (WINAPI *)(HWND, LPCTSTR)) SetWindowTextA, + (HWND (WINAPI *)(DWORD, LPCTSTR, LPCTSTR, DWORD, int, int, int, int, + HWND, HMENU, HINSTANCE, LPVOID)) CreateWindowExA, + (BOOL (WINAPI *)(HMENU, UINT, UINT, UINT, LPCTSTR)) InsertMenuA, + (int (WINAPI *)(HWND, LPCTSTR, int)) GetWindowTextA, + (HWND (WINAPI *)(LPCTSTR, LPCTSTR)) FindWindowA, + (int (WINAPI *)(HWND, LPTSTR, int)) GetClassNameA, }; -static TkWinProcs unicodeProcs = { +static const TkWinProcs unicodeProcs = { 1, - - (LRESULT (WINAPI *)(WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg, - WPARAM wParam, LPARAM lParam)) CallWindowProcW, - (LRESULT (WINAPI *)(HWND hWnd, UINT Msg, WPARAM wParam, - LPARAM lParam)) DefWindowProcW, - (ATOM (WINAPI *)(const WNDCLASS *lpWndClass)) RegisterClassW, - (BOOL (WINAPI *)(HWND hWnd, LPCTSTR lpString)) SetWindowTextW, - (HWND (WINAPI *)(DWORD dwExStyle, LPCTSTR lpClassName, - LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, - int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, - HINSTANCE hInstance, LPVOID lpParam)) CreateWindowExW, - (BOOL (WINAPI *)(HMENU hMenu, UINT uPosition, UINT uFlags, - UINT uIDNewItem, LPCTSTR lpNewItem)) InsertMenuW, - (int (WINAPI *)(HWND hWnd, LPCTSTR lpString, int nMaxCount)) GetWindowTextW, - (HWND (WINAPI *)(LPCTSTR lpClassName, LPCTSTR lpWindowName)) FindWindowW, - (int (WINAPI *)(HWND hwnd, LPTSTR lpClassName, int nMaxCount)) GetClassNameW, + (LRESULT (WINAPI *)(WNDPROC, HWND, UINT, WPARAM, LPARAM)) CallWindowProcW, + (LRESULT (WINAPI *)(HWND, UINT, WPARAM, LPARAM)) DefWindowProcW, + (ATOM (WINAPI *)(const WNDCLASS *)) RegisterClassW, + (BOOL (WINAPI *)(HWND, LPCTSTR)) SetWindowTextW, + (HWND (WINAPI *)(DWORD, LPCTSTR, LPCTSTR, DWORD, int, int, int, int, + HWND, HMENU, HINSTANCE, LPVOID)) CreateWindowExW, + (BOOL (WINAPI *)(HMENU, UINT, UINT, UINT, LPCTSTR)) InsertMenuW, + (int (WINAPI *)(HWND, LPCTSTR, int)) GetWindowTextW, + (HWND (WINAPI *)(LPCTSTR, LPCTSTR)) FindWindowW, + (int (WINAPI *)(HWND, LPTSTR, int)) GetClassNameW, }; -static TkWinProcs *tkTestWinProcs = &asciiProcs; +static const TkWinProcs *tkTestWinProcs = &asciiProcs; /* -- cgit v0.12