commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bogi (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DAEMON-76) [daemon] Errors when compiling procrun for 64 bit windows systems
Date Mon, 10 Sep 2007 05:41:29 GMT

    [ https://issues.apache.org/jira/browse/DAEMON-76?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12526063
] 

Bogi commented on DAEMON-76:
----------------------------

Thanks to Adam there is a work around given at  http://issues.apache.org/bugzilla/show_bug.cgi?id=39327.
Although it doesn't resolve the problem and it might hide impact of this issue on the end
users.
Since windows x64 has been with us for some time and the work around is known for *over a
year* it would be very nice if this problem could be addressed. Part of the work has been
already done by Adam so why not to finally implement it into Tomcat.

Cheers

> [daemon] Errors when compiling procrun for 64 bit windows systems
> -----------------------------------------------------------------
>
>                 Key: DAEMON-76
>                 URL: https://issues.apache.org/jira/browse/DAEMON-76
>             Project: Commons Daemon
>          Issue Type: Improvement
>         Environment: Operating System: Windows Server 2003
> Platform: PC
>            Reporter: Adam Etheredge
>            Priority: Minor
>         Attachments: ProcRun64BitPatch.diff
>
>
> When compiling procrun for 64 bit windows systems (x64, amd64, itanium) errors
> and warnings are received.  I suggest the following patch:
> Index: apps/apsvcmgr/apsvcmgr.c
> ===================================================================
> --- apps/apsvcmgr/apsvcmgr.c	(revision 393026)
> +++ apps/apsvcmgr/apsvcmgr.c	(working copy)
> @@ -610,10 +610,10 @@
>  #endif 
>      hWndListHdr = ListView_GetHeader(hWndList);
>      /* Sub-class */
> -    ListViewWinMain = (WNDPROC)((SIZE_T)SetWindowLong(hWndList, GWL_WNDPROC, 
> +    ListViewWinMain = (WNDPROC)((SIZE_T)SetWindowLongPtr(hWndList, GWLP_WNDPROC, 
>                                                       
> (LONG)((SIZE_T)ListViewMainSubclass))); 
>  
> -    ListViewWinHead = (WNDPROC)((SIZE_T)SetWindowLong(hWndListHdr, GWL_WNDPROC, 
> +    ListViewWinHead = (WNDPROC)((SIZE_T)SetWindowLongPtr(hWndListHdr,
> GWLP_WNDPROC, 
>                                                       
> (LONG)((SIZE_T)ListViewHeadSubclass))); 
>  
>  
> @@ -869,7 +869,7 @@
>                      }
>                      else {
>                          SET_BIT_FLAG(_propertyChanged, 1);
> -                        SetWindowLong(hDlg, DWL_MSGRESULT,
> +                        SetWindowLongPtr(hDlg, DWLP_MSGRESULT,
>                                        PSNRET_INVALID_NOCHANGEPAGE);
>                          return TRUE;                        
>                      }
> @@ -1019,7 +1019,7 @@
>                          PropSheet_UnChanged(GetParent(hDlg), hDlg); 
>                      else {
>                          SET_BIT_FLAG(_propertyChanged, 2);
> -                        SetWindowLong(hDlg, DWL_MSGRESULT,
> +                        SetWindowLongPtr(hDlg, DWLP_MSGRESULT,
>                                        PSNRET_INVALID_NOCHANGEPAGE);
>                          return TRUE;                        
>                      }
> Index: apps/prunmgr/prunmgr.c
> ===================================================================
> --- apps/prunmgr/prunmgr.c	(revision 393026)
> +++ apps/prunmgr/prunmgr.c	(working copy)
> @@ -647,7 +647,7 @@
>                      }
>                      else {
>                          SET_BIT_FLAG(_propertyChanged, 1);
> -                        SetWindowLong(hDlg, DWL_MSGRESULT,
> +                        SetWindowLongPtr(hDlg, DWLP_MSGRESULT,
>                                        PSNRET_INVALID_NOCHANGEPAGE);
>                          return TRUE;                        
>                      }
> @@ -802,7 +802,7 @@
>                          PropSheet_UnChanged(GetParent(hDlg), hDlg); 
>                      else {
>                          SET_BIT_FLAG(_propertyChanged, 2);
> -                        SetWindowLong(hDlg, DWL_MSGRESULT,
> +                        SetWindowLongPtr(hDlg, DWLP_MSGRESULT,
>                                        PSNRET_INVALID_NOCHANGEPAGE);
>                          return TRUE;                        
>                      }
> @@ -942,7 +942,7 @@
>                          PropSheet_UnChanged(GetParent(hDlg), hDlg); 
>                      else {
>                          SET_BIT_FLAG(_propertyChanged, 3);
> -                        SetWindowLong(hDlg, DWL_MSGRESULT,
> +                        SetWindowLongPtr(hDlg, DWLP_MSGRESULT,
>                                        PSNRET_INVALID_NOCHANGEPAGE);
>                          return TRUE;                        
>                      }
> @@ -1075,7 +1075,7 @@
>                          PropSheet_UnChanged(GetParent(hDlg), hDlg); 
>                      else {
>                          SET_BIT_FLAG(_propertyChanged, 4);
> -                        SetWindowLong(hDlg, DWL_MSGRESULT,
> +                        SetWindowLongPtr(hDlg, DWLP_MSGRESULT,
>                                        PSNRET_INVALID_NOCHANGEPAGE);
>                          return TRUE;                        
>                      }
> @@ -1213,7 +1213,7 @@
>                          PropSheet_UnChanged(GetParent(hDlg), hDlg); 
>                      else {
>                          SET_BIT_FLAG(_propertyChanged, 5);
> -                        SetWindowLong(hDlg, DWL_MSGRESULT,
> +                        SetWindowLongPtr(hDlg, DWLP_MSGRESULT,
>                                        PSNRET_INVALID_NOCHANGEPAGE);
>                          return TRUE;                        
>                      }
> @@ -1360,7 +1360,7 @@
>                          PropSheet_UnChanged(GetParent(hDlg), hDlg); 
>                      else {
>                          SET_BIT_FLAG(_propertyChanged, 6);
> -                        SetWindowLong(hDlg, DWL_MSGRESULT,
> +                        SetWindowLongPtr(hDlg, DWLP_MSGRESULT,
>                                        PSNRET_INVALID_NOCHANGEPAGE);
>                          return TRUE;                        
>                      }
> Index: samples/cchild.c
> ===================================================================
> --- samples/cchild.c	(revision 393026)
> +++ samples/cchild.c	(working copy)
> @@ -50,7 +50,7 @@
>        break;
>  
>     }
> -   putch('\n');
> +   _putch('\n');
>     return FALSE;
>  }
>  
> @@ -96,20 +96,20 @@
>      fflush(stdout);
>      fprintf(stderr, "Simple stderr message\n");
>      fflush(stderr);
> -    write(STDOUT_FILENO, STDO_MESSAGE, sizeof(STDO_MESSAGE) - 1);
> -    write(STDERR_FILENO, STDE_MESSAGE, sizeof(STDE_MESSAGE) - 1);
> +    _write(STDOUT_FILENO, STDO_MESSAGE, sizeof(STDO_MESSAGE) - 1);
> +    _write(STDERR_FILENO, STDE_MESSAGE, sizeof(STDE_MESSAGE) - 1);
>      
>      if (conio) {
> -        cputs("Type 'Y' when finished typing keys...");
> +        _cputs("Type 'Y' when finished typing keys...");
>          do {
> -            i = getch();
> +            i = _getch();
>              i = toupper(i);
>          } while (i != 'Y');
> -        putch('\n');
> +        _putch('\n');
>      }
>      if (do_echo) {
> -        cputs("Going to echo loop...\n");
> -        while ((i = read(STDIN_FILENO, buf, 256)) > 0) {
> +        _cputs("Going to echo loop...\n");
> +        while ((i = _read(STDIN_FILENO, buf, 256)) > 0) {
>              buf[i] = '\0';
>              fputs(buf, stdout);
>              if (strcmp(buf, "quit\n") == 0)
> Index: src/gui.c
> ===================================================================
> --- src/gui.c	(revision 393026)
> +++ src/gui.c	(working copy)
> @@ -530,7 +530,8 @@
>  LPSTR apxBrowseForFolderA(HWND hWnd, LPCSTR szTitle, LPCSTR szName)
>  {
>      BROWSEINFOA  bi;
> -    ITEMIDLIST   *il, *ir;
> +    ITEMIDLIST   *il;
> +	LPITEMIDLIST ir;
>      LPMALLOC     pMalloc;
>      CHAR         szPath[MAX_PATH+1];
>      LPSTR        rv = NULL;
> @@ -545,11 +546,12 @@
>      bi.lParam         = 0;
>      bi.iImage         = 0;
>      bi.pidlRoot       = il;
> -    
> +
>      if ((ir = SHBrowseForFolderA(&bi)) != NULL) {
>          if (SHGetPathFromIDListA(ir, szPath))
>              rv = apxStrdupA(szPath);
>      }
> +
>      if (SHGetMalloc(&pMalloc)) {
>          pMalloc->lpVtbl->Free(pMalloc, il);
>          pMalloc->lpVtbl->Release(pMalloc);
> @@ -561,7 +563,8 @@
>  LPWSTR apxBrowseForFolderW(HWND hWnd, LPCWSTR szTitle, LPCWSTR szName)
>  {
>      BROWSEINFOW  bi;
> -    ITEMIDLIST   *il, *ir;
> +    ITEMIDLIST   *il;
> +	LPITEMIDLIST ir;
>      LPMALLOC     pMalloc;
>      WCHAR        szPath[MAX_PATH+1];
>      LPWSTR       rv = NULL;
> @@ -786,7 +789,7 @@
>      DeleteObject(hBmp);
>  
>      ListView_SetImageList(hList, _st_sel_users_il, LVSIL_SMALL);
> -    _st_sel_users_lvm = (WNDPROC)((SIZE_T)SetWindowLong(hList, GWL_WNDPROC, 
> +    _st_sel_users_lvm = (WNDPROC)((SIZE_T)SetWindowLongPtr(hList, GWLP_WNDPROC, 
>                                                         
> (LONG)((SIZE_T)__apxSelectUserCreateLvSubclass))); 
>  
>  }
> @@ -894,7 +897,7 @@
>      switch (uMsg) {
>          case WM_INITDIALOG:
>              /* Set the application icon */
> -            SetClassLong(hDlg, GCL_HICON,
> +            SetClassLongPtr(hDlg, GCLP_HICON,
>                           (LONG)(SIZE_T)LoadIcon(_st_sys_gui.hInstance,
>                                          MAKEINTRESOURCE(IDI_MAINICON))); 
>              apxCenterWindow(hDlg, _st_sys_gui.hMainWnd);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message