This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

WinMain() not getting cl with 20060403 snapshot


WinMain() in a program compiled with cygwin1.dll is no longer
getting passed the command-line from bash correctly with the
20060403 snapshot. It works fine with the 20060329 snapshot.

This is the same problem mentioned in
<http://cygwin.com/ml/cygwin/2005-09/msg00298.html>.

The same test case is attached here again (winCmdLine.c). I compile
it with "gcc -o winCmdLine winCmdLine.c" (note no -mno-cygwin).

With the 20060403 snapshot, I get:

% uname -a
CYGWIN_NT-5.1 tela 1.5.20s(0.155/4/2) 20060403 13:33:45 i686 Cygwin
% ./winCmdLine arg1 arg2
"

With the 20060329 snapshot, I get:

% uname -a
CYGWIN_NT-5.1 tela 1.5.20s(0.155/4/2) 20060329 23:02:10 i686 Cygwin
% ./winCmdLine arg1 arg2
 arg1 arg2

Of course, this problem goes away when using -mno-cygwin. The
program also works fine when invoked directly from a cmd.exe shell
instead of bash.

The problem appeared in winclient.exe, part of the XEmacs
distribution. I can easily work around the problem, but wanted to
mention it anyway because it is a regression.

-- 
David Rothenberger                spammer? -> spam@daveroth.dyndns.org
GPG/PGP: 0x92D68FD8, DB7C 5146 1AB0 483A 9D27 DFBA FBB9 E328 92D6 8FD8

Likewise, the national appetizer, brine-cured herring with raw onions,
wins few friends, Germans excepted.
                -- Darwin Porter "Scandinavia On $50 A Day"
#include <windows.h>
#include <stdio.h>

int WINAPI
WinMain (HINSTANCE hInst,
	 HINSTANCE hPrev,
	 LPSTR     lpCmdLine,
	 int       nCmdShow)
{
  printf("%s\n", (const char*) lpCmdLine);
  return 0;
}

Attachment: cygcheck.out
Description: Text document

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]