diff notes.txt @ 5921:68639fb08af8 cygwin

no obvious 64 vs. 32 pblms in compilation, but still crashing in event-msw
author Henry Thompson <ht@markup.co.uk>
date Wed, 23 Apr 2014 22:22:37 +0100
parents 0f2338afbabf
children 518bf1108435
line wrap: on
line diff
--- a/notes.txt	Mon Apr 21 11:42:50 2014 +0100
+++ b/notes.txt	Wed Apr 23 22:22:37 2014 +0100
@@ -61,3 +61,191 @@
 but xemacs as such does not:
  > ./xemacs
   Fatal error: assertion failed, file event-msw.c, line 4149, !NILP (Vmswindows_frame_being_created)
+--------------
+console-msw.c:116:3: warning: format '%ld' expects argument of type
+'long int', but argument 3 has type 'DWORD' [-Wformat=]
+ resolution: cast the DWORDs to long
+----
+event-msw.c: In function 'mswindows_wnd_proc':
+event-msw.c:2741:6: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
+     ((LCID) GetKeyboardLayout (0) & 0xFFFF),
+            cast to intptr_t first
+
+event-msw.c:2825:50: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
+       virtual_key = qxeMapVirtualKeyEx (scan, 1, (HKL) lcid);
+                                                     cast to intptr_t first
+                                                  ^
+event-msw.c:2839:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
+      (HKL) lcid);
+     ^    ditto
+
+event-msw.c:2861:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
+       (HKL) lcid);
+       ^   ditto
+
+[I _really_ don't understand the size hacking going on between LCIDs
+  and HKLs here!]
+event-msw.c: In function 'emacs_mswindows_remove_timeout':
+event-msw.c:4200:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
+      (void *) id, MECR_DEALLOCATE_EVENT);
+      ^
+  This is a hack!!! Use intptr_t instead, still a hack.
+
+
+frame-msw.c: In function ‘mswindows_init_frame_1’:
+frame-msw.c:274:41: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
+  qxeSetWindowLong (hwnd, XWL_FRAMEOBJ, (LONG)STORE_LISP_IN_VOID (frame_obj));
+                                          intptr_t
+
+frame-msw.c: In function ‘mswindows_get_mouse_position’:
+frame-msw.c:554:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
+   *frame = GET_LISP_FROM_VOID ((void *) qxeGetWindowLong (hwnd, XWL_FRAMEOBJ));
+                                         qxeGetWindowLongPtr (hwnd, XWL_FRAMEOBJ
+
+frame-msw.c: In function ‘mswindows_get_frame_parent’:
+frame-msw.c:822:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
+       parent = GET_LISP_FROM_VOID ((void *) qxeGetWindowLong (hwnd, XWL_FRAMEOBJ));
+             ditto
+
+glyphs-msw.c: In function 'mswindows_widget_instantiate':
+glyphs-msw.c:2261:8: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
+        (HMENU)id,       /* No menu */
+  intptr_t id = -1;
+
+menubar-msw.c: In function 'empty_menu':
+menubar-msw.c:98:24: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
+ #define EMPTY_ITEM_ID ((UINT)STORE_LISP_IN_VOID (Qunbound))
+menubar-msw.c:181:49: note: in expansion of macro 'EMPTY_ITEM_ID'
+     qxeAppendMenu (menu, MF_STRING | MF_GRAYED, EMPTY_ITEM_ID,
+ resolved:#define EMPTY_ITEM_ID ((UINT)STORE_LISP_IN_VOID (Qunbound))
+                                intptr_t
+
+dialog-msw.c:764:9: warning: passing argument 4 of 'qxeCreateDialogIndirectParam' from incompatible pointer type [enabled by default]
+         (LPARAM) STORE_LISP_IN_VOID (obj));
+         ^
+          intptr_t
+
+toolbar-msw.c: In function 'mswindows_clear_toolbar':
+toolbar-msw.c:100:55: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
+       qxeSendMessage (toolbarwnd, TB_GETIMAGELIST, 0, (LONG) &ilist);
+                                                       ^
+                                                       intptr_t
+toolbar-msw.c: In function 'mswindows_output_toolbar':
+toolbar-msw.c:370:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
+          (HMENU)(TOOLBAR_ID_BIAS + pos),
+          ^
+                 (intptr_t)
+In file included from mule-coding.c:32:0:
+mule-coding.c: In function 'parse_charset_conversion_specs':
+
+win32.c: In function 'mswindows_lisp_error_1':
+win32.c:259:9: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'DWORD' [-Wformat=]
+         errnum, GetLastError ());
+         ^
+                (long)
+win32.c: In function 'Fmswindows_shell_execute':
+win32.c:352:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
+     ret = (int) qxeShellExecute (NULL, opext, doc, parmext, path,
+           ^
+           intptr-t
+win32.c: In function 'setitimer_helper':
+win32.c:847:7: warning: passing argument 3 of 'timeSetEvent' from incompatible pointer type [enabled by default]
+       event_type);
+       ^
+ resoluion: pblm is elsewhere?
+  setitimer_helper_proc (UINT UNUSED (uID), UINT UNUSED (uMsg), DWORD[_PTR] dwUser,
+		       DWORD[_PTR] UNUSED (dw1), DWORD[_PTR] UNUSED (dw2))
+
+> make clean, try again
+
+/usr/local/src/xemacs-21.5-64bit/lib-src/winclient.c: In function 'doFile':
+/usr/local/src/xemacs-21.5-64bit/lib-src/winclient.c:299:4: warning: pointer targ
+ets in passing argument 1 of 'DdeClientTransaction' differ in signedness [-Wpoint
+er-sign]
+    0, XTYP_EXECUTE, TRANSACTION_TIMEOUT, NULL);
+    ^
+In file included from /usr/local/src/xemacs-21.5-64bit/lib-src/winclient.c:27:0:
+/usr/include/w32api/ddeml.h:208:19: note: expected 'LPBYTE' but argument is of ty
+pe 'char *'
+   HDDEDATA WINAPI DdeClientTransaction(LPBYTE pData,DWORD cbData,HCONV hConv,HSZ
+ hszItem,UINT wFmt,UINT wType,DWORD dwTimeout,LPDWORD pdwResult);
+                   ^
+ [note it's arg1 that's the problem, cast to LPBYTE]
+
+event-msw.c:4200:6: warning: passing argument 4 of 'map_event_chain_remove' makes pointer from integer without a cast [enabled by default]
+      (intptr_t)id, MECR_DEALLOCATE_EVENT);
+      ^
+In file included from event-msw.c:72:0:
+events.h:956:5: note: expected 'void *' but argument is of type 'long int'
+ int map_event_chain_remove (int (*fn) (Lisp_Object ev, void *user_data),
+ resolution: hack, but cast _again_, i.e. (void *)(intptr_t)
+
+dialog-msw.c:764:9: warning: passing argument 4 of 'qxeCreateDialogIndirectParam' from incompatible pointer type [enabled by default]
+         (intptr_t) STORE_LISP_IN_VOID (obj));
+         ^
+In file included from syswindows.h:642:0,
+                 from console-msw.h:39,
+                 from console-msw-impl.h:37,
+                 from dialog-msw.c:37:
+intl-auto-encap-win32.h:627:6: note: expected 'DLGPROC' but argument is of type 'BOOL (*)(struct HWND__ *, UINT,  WPARAM,  LPARAM)'
+ HWND qxeCreateDialogIndirectParam (HINSTANCE hInstance, LPCDLGTEMPLATEW lpTemplate, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam);
+ resolved by adding a cast: (DLGPROC)dialog_proc, but not at all sure
+that's right
+
+> make clean, try again
+
+intl-win32.c:1509:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
+     TranslateCharsetInfo ((DWORD *) (DWORD) old_logfont.lfCharSet, &info,
+                           ^
+ resolution: do nothing -- I think this is necessary because of
+             extremely aggressive argument overloading by MS
+
+intl-auto-encap-win32.c:126:5: warning: passing argument 1 of 'ShellExecuteExA' from incompatible pointer type [enabled by default]
+     return ShellExecuteExA (pExecInfo);
+     ^
+In file included from syswindows.h:220:0,
+                 from intl-auto-encap-win32.c:12:
+/usr/include/w32api/shellapi.h:345:22: note: expected 'struct SHELLEXECUTEINFOA *' but argument is of type 'struct SHELLEXECUTEINFOW *'
+   SHSTDAPI_(WINBOOL) ShellExecuteExA (SHELLEXECUTEINFOA *pExecInfo);
+                      ^
+ resolution: ignored, never used, removed from intl-encap-win32.c
+
+intl-auto-encap-win32.c: In function 'qxeFreeEnvironmentStrings':
+intl-auto-encap-win32.c:1771:5: warning: passing argument 1 of 'FreeEnvironmentStringsA' from incompatible pointer type [enabled by default]
+     return FreeEnvironmentStringsA (penv);
+     ^
+In file included from /usr/include/w32api/winbase.h:28:0,
+                 from /usr/include/w32api/windows.h:70,
+                 from syswindows.h:204,
+                 from intl-auto-encap-win32.c:12:
+/usr/include/w32api/processenv.h:29:29: note: expected 'LPCH' but argument is of type 'LPWCH'
+   WINBASEAPI WINBOOL WINAPI FreeEnvironmentStringsA (LPCH penv);
+                             ^
+intl-encap-win32.c: In function 'qxeUpdateICMRegKey':
+intl-encap-win32.c:1426:36: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
+     return UpdateICMRegKeyW (arg1, (DWORD) arg2, (LPWSTR) arg3, arg4);
+                                    ^
+intl-encap-win32.c:1426:5: warning: passing argument 2 of 'UpdateICMRegKeyW' makes pointer from integer without a cast [enabled by default]
+     return UpdateICMRegKeyW (arg1, (DWORD) arg2, (LPWSTR) arg3, arg4);
+     ^
+In file included from /usr/include/w32api/windows.h:71:0,
+                 from syswindows.h:204,
+                 from console-msw.h:39,
+                 from intl-encap-win32.c:44:
+/usr/include/w32api/wingdi.h:3425:28: note: expected 'LPWSTR' but argument is of type 'unsigned int'
+   WINGDIAPI WINBOOL WINAPI UpdateICMRegKeyW(DWORD reserved,LPWSTR lpszCMID,LPWSTR lpszFileName,UINT command);
+ resolution: nothing, known problem
+
+Similarly wrt qxeEnumResourceTypes, qxeEnumResourceNames,
+qxeEnumResourceLanguages, qxeImmSetCompositionString
+
+---------
+make clean, recompile, all looks OK, try to track down the problem --
+the error in event-msw.c inside mswindow_find_frame, inside
+intercepted_wnd_proc (a signal handler?),
+where we have a
+window with no frame saved, appears to happen when the main thread is
+in mswindows_init_frame_1 at frame-msw.c:139
+   at recompute_all_cached_specifiers_in_frame at specifier.c:3483
+   at recompute_one_cached_specifier_in_frame at specifier.c:3444
+    around the sixth one