[FFmpeg-cvslog] libavutil: drop offsetof() fallback definition

Mans Rullgard git at videolan.org
Fri Aug 10 16:31:43 CEST 2012


ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Wed Aug  8 20:09:33 2012 +0100| [1c4ab37c38e4ede6bbdf95221ad6cbf1bbcb7e9d] | committer: Mans Rullgard

libavutil: drop offsetof() fallback definition

The only compiler I have that does not define the standard
offsetof() macro is "Bruce's C Compiler", a simple compiler
for producing 8/16-bit 8086 code, usually for use in early
stages of PC booting.

Signed-off-by: Mans Rullgard <mans at mansr.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1c4ab37c38e4ede6bbdf95221ad6cbf1bbcb7e9d
---

 libavutil/internal.h |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/libavutil/internal.h b/libavutil/internal.h
index 58e5568..aa56c05 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -56,10 +56,6 @@ struct AVDictionary {
 #    define INT_BIT (CHAR_BIT * sizeof(int))
 #endif
 
-#ifndef offsetof
-#    define offsetof(T, F) ((unsigned int)((char *)&((T *)0)->F))
-#endif
-
 /* debug stuff */
 
 #define av_abort()      do { av_log(NULL, AV_LOG_ERROR, "Abort at %s:%d\n", __FILE__, __LINE__); abort(); } while (0)



More information about the ffmpeg-cvslog mailing list