bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: windres and cmd.exe command line limit


From: Jonathan Liu
Subject: Re: windres and cmd.exe command line limit
Date: Sat, 22 Sep 2012 13:22:56 +1000
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:10.0) Gecko/20120206 Thunderbird/10.0

On 8/05/2012 7:17 PM, Joe Burmeister wrote:
I've been doing some QT work with MinGW and run up against that
windres.exe uses popen, which on Windows calls cmd.exe, which only has a
8192 character limit.

Building something in QT (which sometimes has masses of defines) in
Windows with MinGW, was failing with "command line is too long".
I felt the correct thing was that windres.exe didn't have this limit on
Windows, so I've implemented an alternative popen for Windows with a
larger character limit of 32768.

Include the attached file in your build and in resrc.c change:


/*#if defined (_WIN32) && ! defined (__CYGWIN__)
#define popen _popen* *
#define pclose _pclose
#endif*/

to:

*/#if defined (_WIN32) && ! defined (__CYGWIN__)
extern FILE *win_popen_biglimit(const char *command,const char *mode );
extern int win_pclose_biglimit(FILE *stream);
#define popen win_popen_biglimit
#define pclose win_pclose_biglimit
#endif/
*

Of course solve this how ever you want, but this is the direction I
think it should go. This can "just work" better than it is. It would be
better if cmd.exe didn't have this low limit, but it does and I doubt MS
are going to fix it anytime soon and even if they did, it wouldn't help
the people running or targeting the existing version of Windows.

Could you open a bug report for this issue on Bugzilla and attach a complete patch there?

Regards,
Jonathan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]