On 7/1/08 10:19 PM, Werner LEMBERG said:

>> Can freetype use C99 features?
>
>Not in general, but I don't object to put it into proper
>#ifdef...#endif blocks -- AFAIK, C99 can be checked by a preprocessor
>macro, right?

Yes.  __STDC_VERSION__ is defined as 199901L.  See for example:
<http://lists.debian.org/debian-mentors/2002/10/msg00216.html>

Currently freetype has things like:

#if FT_SIZEOF_INT == (32 / FT_CHAR_BIT)

  typedef signed int      FT_Int32;
  typedef unsigned int    FT_UInt32;

#elif FT_SIZEOF_LONG == (32 / FT_CHAR_BIT)

  typedef signed long     FT_Int32;
  typedef unsigned long   FT_UInt32;

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

In C99 this could simply be:

  typedef int32_t     FT_Int32;
  typedef uint32_t    FT_UInt32;

No size testing required.  No problems with cross compilation nor
universal binaries.

--
____________________________________________________________
Sean McBride, B. Eng                 [EMAIL PROTECTED]
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada




_______________________________________________
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to