Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 454646

Summary: media-libs/freetype: installs ftconfig.h with ABI-specific content (and fragile integer types)
Product: Gentoo Linux Reporter: Michał Górny <mgorny>
Component: Current packagesAssignee: Gentoo Fonts Team <fonts>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 455114    
Bug Blocks: 454644, 455070    

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-01-30 11:41:38 UTC
/usr/include/freetype2/freetype/config/ftconfig.h:

  #define SIZEOF_INT 4
  #define SIZEOF_LONG 8
  #define FT_SIZEOF_INT  SIZEOF_INT
  #define FT_SIZEOF_LONG SIZEOF_LONG

  // ...

  #if FT_SIZEOF_INT == 4

    typedef signed int      FT_Int32;
    typedef unsigned int    FT_UInt32;

  #elif FT_SIZEOF_LONG == 4

    typedef signed long     FT_Int32;
    typedef unsigned long   FT_UInt32;

  #else
  #error "no 32bit type found -- please check your configuration files"
  #endif

This thing should really use stdint.h...
Comment 1 Rafał Mużyło 2013-01-30 12:55:21 UTC
Did you notice /usr/lib/glib-2.0/include/glibconfig.h ?
While stdint.h indeed is c99, the part of the answer lies probably here: http://stackoverflow.com/questions/126279/c99-stdint-h-header-and-ms-visual-studio.
Comment 2 Rafał Mużyło 2013-01-30 13:00:26 UTC
Note, that I would enjoy wine on amd64 without emul-linux-x86 packages, but I doubt getting there would be so simple.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-01-30 21:11:46 UTC
(In reply to comment #1)
> Did you notice /usr/lib/glib-2.0/include/glibconfig.h ?

Well, that's something that would work since the file is in libdir.

> While stdint.h indeed is c99, the part of the answer lies probably here:
> http://stackoverflow.com/questions/126279/c99-stdint-h-header-and-ms-visual-
> studio.

I know the usual reasons for not relying on stdint.h. But that doesn't mean people should completely ignore its existence, and it is not really relevant to Gentoo.

Not that actually preferring the header will solve the issue already but it's a step in the good direction. But as far as I'm concerned, a solution which solves the issue for Gentoo is good enough.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-01-31 10:44:46 UTC
For the multilib tests, I have just added:

  --includedir="${EPREFIX}"/usr/$(get_libdir)/freetype2/include
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-04-01 09:22:47 UTC
Well, we handled that some time ago since the relevant part of file was never used.