On 5/25/2016 11:14 AM, William A Rowe Jr wrote:
Your comment doesn't match the code, and I think you have the condition
inverted, _setargv() worked for decades, and only was broken in the more
recent MSVC's.

Typo, should be 1800 in log, I'll change it. I may revert it now that I dug & found $(VCINSTALLDIR) . If that's in VC6 then it's usable all the way up the line and the setargv.obj can just be added to the dsp/mak files.

My thought is to unilaterally change this to the unicode implementation,
because 1. ANSI-only are dead Windows OS's, and 2. Getting the utf-8
thing right in this app is becoming a big headache.

Thoughts?

If it deals with this then why not!
Apachemonitor itself could use another way of figuring out what it's running on also as GetVersionExA is gone and the code in VC > 11 making it work won't last forever I'd suspect. I've been looking into that and MS gives an nice example at https://msdn.microsoft.com/en-us/library/windows/desktop/ms725491%28v=vs.85%29.aspx


On Wed, May 25, 2016 at 11:29 AM,<gsm...@apache.org>  wrote:

Author: gsmith
Date: Wed May 25 16:29:59 2016
New Revision: 1745517

URL: http://svn.apache.org/viewvc?rev=1745517&view=rev
Log:
backport r1745516
_setargv will not compile on _MSC_VER<  1700
MS documentation's example simply does not work.
Disabe for now, Apachemonitor still works.

Modified:
     httpd/httpd/branches/2.4.x/support/win32/ApacheMonitor.c

Modified: httpd/httpd/branches/2.4.x/support/win32/ApacheMonitor.c
URL:
http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/support/win32/ApacheMonitor.c?rev=1745517&r1=1745516&r2=1745517&view=diff

==============================================================================
--- httpd/httpd/branches/2.4.x/support/win32/ApacheMonitor.c (original)
+++ httpd/httpd/branches/2.4.x/support/win32/ApacheMonitor.c Wed May 25
16:29:59 2016
@@ -1586,8 +1586,10 @@ int WINAPI WinMain(HINSTANCE hInstance,
  #ifdef UNICODE
      __wargv = CommandLineToArgvW(GetCommandLineW(),&__argc);
  #else
+#if defined(_MSC_VER)&&  _MSC_VER<  1800
      _setargv();
  #endif
+#endif

      if ((__argc == 2)&&  (_tcscmp(__targv[1], _T("--kill")) == 0))
      {




Reply via email to