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

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to