Hi all,

I have been working on updating VTK (www.vtk.org) from freetype 2.1.9 to
the 2.3.2.  It has gone pretty smoothly, thanks in part to the detailed
changelogs you guys keep, thank you!

There are a few changes the VTK people and I made and I am submitting a
patch to this email for your consideration.  The patch is against today's CVS.

1) builds/unix/ftconfig.in
 - minor Mac fix, test against __LP64__ not __ppc64__.  There are also
64 bit Intel CPUs.

2) builds/unix/ftsystem.c
 - fix compiler warning about 64 to 32 bit conversion.  Also make sure
file is not so big that the cast to 32 bit will lose data.  A better fix
would be to make 'stat_buf.st_size' a ssize_t, I didn't try that because
it may have wider implications.  But this patch is better than nothing.

3) include/freetype/config/ftstdlib.h
 - fix compiler warning

It would be great if these could be added to 2.3.3.

Thanks,

--
____________________________________________________________
Sean McBride, B. Eng                 [EMAIL PROTECTED]
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada
Index: builds/unix/ftconfig.in
===================================================================
RCS file: /sources/freetype/freetype2/builds/unix/ftconfig.in,v
retrieving revision 1.19
diff -r1.19 ftconfig.in
103c103
< #if defined( __ppc64__ ) /* no Carbon for ppc64 */
---
> #if defined( __LP64__ ) && ( __LP64__ != 0 ) /* no Carbon in 64bit on 10.4 */
Index: builds/unix/ftsystem.c
===================================================================
RCS file: /sources/freetype/freetype2/builds/unix/ftsystem.c,v
retrieving revision 1.33
diff -r1.33 ftsystem.c
269c269,280
<     stream->size = stat_buf.st_size;
---
>       /* stat_buf.st_size and stream->size are not the same  */
>       /* type.  On some platforms, the former is 64 bit and  */
>       /* the latter is 32 bit.  So do a test.                */
>       /* Ideally, stream->size should be ssize_t also.       */
>     if ( stat_buf.st_size > ULONG_MAX )
>     {
>       FT_ERROR(( "FT_Stream_Open: file is too big" ));
>       goto Fail_Map;
>     }
> 
>     /* This cast potentially truncates a 64 bit to 32 bit! */
>     stream->size = (unsigned long)stat_buf.st_size;
318c329
<       } while ( (unsigned long)total_read_count != stream->size );
---
>       } while ( total_read_count != (ssize_t)stream->size );
Index: include/freetype/config/ftstdlib.h
===================================================================
RCS file: /sources/freetype/freetype2/include/freetype/config/ftstdlib.h,v
retrieving revision 1.18
diff -r1.18 ftstdlib.h
169a170,175
>   /* Fix compiler warning with sgi compiler */
> #if defined(__sgi) && !defined(__GNUC__)
> #  if   (_COMPILER_VERSION >= 730)
> #  pragma set woff 3505
> #  endif
> #endif
_______________________________________________
Freetype-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to