diff -r 000000000000 -r 6474c204b198 media/libnestegg/src/macros.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/media/libnestegg/src/macros.h Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2004-2010 Alex Pankratov. All rights reserved. + * + * Hierarchical memory allocator, 1.2.1 + * http://swapped.cc/halloc + */ + +/* + * The program is distributed under terms of BSD license. + * You can obtain the copy of the license by visiting: + * + * http://www.opensource.org/licenses/bsd-license.php + */ + +#ifndef _LIBP_MACROS_H_ +#define _LIBP_MACROS_H_ + +#include /* offsetof */ + +/* + restore pointer to the structure by a pointer to its field + */ +#define structof(p,t,f) ((t*)(- (ptrdiff_t) offsetof(t,f) + (char*)(p))) + +/* + * redefine for the target compiler + */ +#ifdef _WIN32 +#define static_inline static __inline +#else +#define static_inline static __inline__ +#endif + + +#endif +