[PATCH] fix warnings and build issue on mingw

Developer discussion and patch submissions only!
Forum rules
This forum is for developer discussion and patch submission only.
golgol7777
Posts: 12
Joined: Thu Jun 04, 2009 1:20 pm

[PATCH] fix warnings and build issue on mingw

Postby golgol7777 » Fri Apr 09, 2010 10:07 pm

Hi, this patch fix some compiler warnings and build issues on mingw.
http://handbrake.fr/pastebin/pastebin.php?show=1327

Patch details:
1. fix warning about implicit declaration for pthreads-w32 routine
2. fix warning about unknown %lld/%llu format strings for printf family
  (replace all occurences of these format strings by corresponding inttypes.h macros)
3. fix warning about implicit activation of auto-import which yields runtime 0x00000005 error when built hb.dll is loaded.
  This is mingw port gcc-4.5 (and later) specific issue and occurs when hb.dll is linked against shared libstdc++ runtime.
  Please see the known issue section in this release notes. This issue is not fixed in current gcc-4.5 branch.

I also change pthreads-w32 related ifdef guard to SYS_MINGW & PTW32_STATIC_LIB.
I think this is more appropriate because pthreads-w32 won't be used in other platforms and the non-portable call for
pthreads-w32 isn't needed for shared pthreads-w32(although, HandBrake doesn't use shared pthreads-w32 by default).

The third one is a forgotten hunk at r3200 check-in. If this is not, the change at r3200 is overwritten and takes no effect.
I'm sorry for missing it when I pointed it on IRC because I had already made the same change locally so the warning didn't appear.

Thanks in advance.

EDIT: replace code block to pastbin link and reformat post

Return to “Development”

cron