From 9e2d89278ff9946d170c119fae7a4625603765d8 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Tue, 1 Aug 2000 01:34:18 +0000 Subject: [PATCH] Use the ANSI offsetof() macro instead of something home-brewn. --- include/freetype/internal/ftstream.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/freetype/internal/ftstream.h b/include/freetype/internal/ftstream.h index 49543fea2..7b35a53b8 100644 --- a/include/freetype/internal/ftstream.h +++ b/include/freetype/internal/ftstream.h @@ -20,6 +20,7 @@ #define FTSTREAM_H #include +#include /* for offsetof() macro */ #ifdef __cplusplus @@ -95,7 +96,7 @@ #define FT_FIELD_SIZE_DELTA( f ) \ (FT_Byte)sizeof ( ((FT_STRUCTURE*)0)->f[0] ) #define FT_FIELD_OFFSET( f ) \ - (FT_UShort)( (char*)&(((FT_STRUCTURE*)0)->f) - (char*)0 ) + (FT_UShort)( offsetof( FT_STRUCTURE, f ) ) #define FT_FRAME_FIELD( frame_op, field ) \ { \