how to patch native pacakge

Farkas Levente lfarkas at lfarkas.org
Fri May 22 22:36:49 UTC 2009


Kevin Kofler wrote:
> Farkas Levente wrote:
>> ok we rtfm:-) so we fix it.
> 
> This suffers from the "different ABI depending on which header is included
> first" (i.e. "first included wins") issue.
> 
> But I don't think there's a real solution as the ABI which is currently used
> uses different type definitions than the rpcndr.h ones.

ok. os what to do now? facts:
- the current mingw32-libjpeg is unusable
- there is no abi compatible solution with unix
- try to be consistent ie. don't choose solution which depend on the
include file order.
- imho try to be compatible with previous windows libs (ie. Tor
Lillqvist's libs) it use:
---------------------------
#ifdef _WIN32
# include <windows.h>
/* Define "boolean" as unsigned char, not int, per Windows custom */
# if !defined __RPCNDR_H__ || defined __MINGW32__    /* don't conflict
if rpcndr.h already read */
#  ifndef boolean     /* don't conflict if rpcndr.h already read */
    typedef unsigned char boolean;
#  endif /* boolean */
# endif /* __RPCNDR_H__ */
# define HAVE_BOOLEAN     /* prevent jmorecfg.h from redefining it */
# define USE_WINDOWS_MESSAGEBOX 1
#endif /* _WIN32 */
---------------------------

for INT32:
---------------------------
/* INT32 must hold at least signed 32-bit values. */
#if !defined(XMD_H) && !defined(_WIN32)                 /* X11/xmd.h
correctly defines INT32 */
typedef long INT32;
#endif
---------------------------

so how we patch?


-- 
  Levente                               "Si vis pacem para bellum!"



More information about the mingw mailing list