* Windows API extension
*/
-#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
-# define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)
-#elif defined(__GNUC__)
-# define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)
-#else
-/* FIXME: Not sure if is possible to do without compiler extension */
-#endif
-
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
# define _TYPE_ALIGNMENT(type) __alignof(type)
#elif defined(__GNUC__)
# define _TYPE_ALIGNMENT(type) __alignof__(type)
#else
/*
- * FIXME: Not sure if is possible to do without compiler extension
- * (if type is not just a name that is, if so the normal)
+ * FIXME: May not be possible without a compiler extension
+ * (if type is not just a name that is, otherwise the normal
* TYPE_ALIGNMENT can be used)
*/
#endif
#ifdef FIELD_ALIGNMENT
# define TEST_FIELD_ALIGNMENT(type, field, align) \
- ok(FIELD_ALIGNMENT(type, field) == align, \
+ ok(_TYPE_ALIGNMENT(((type*)0)->field) == align, \
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
- (int)FIELD_ALIGNMENT(type, field))
+ (int)_TYPE_ALIGNMENT(((type*)0)->field))
#else
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
#endif
* Windows API extension
*/
-#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
-# define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)
-#elif defined(__GNUC__)
-# define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)
-#else
-/* FIXME: Not sure if is possible to do without compiler extension */
-#endif
-
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
# define _TYPE_ALIGNMENT(type) __alignof(type)
#elif defined(__GNUC__)
# define _TYPE_ALIGNMENT(type) __alignof__(type)
#else
/*
- * FIXME: Not sure if is possible to do without compiler extension
- * (if type is not just a name that is, if so the normal)
+ * FIXME: May not be possible without a compiler extension
+ * (if type is not just a name that is, otherwise the normal
* TYPE_ALIGNMENT can be used)
*/
#endif
#ifdef FIELD_ALIGNMENT
# define TEST_FIELD_ALIGNMENT(type, field, align) \
- ok(FIELD_ALIGNMENT(type, field) == align, \
+ ok(_TYPE_ALIGNMENT(((type*)0)->field) == align, \
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
- (int)FIELD_ALIGNMENT(type, field))
+ (int)_TYPE_ALIGNMENT(((type*)0)->field))
#else
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
#endif
* Windows API extension
*/
-#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
-# define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)
-#elif defined(__GNUC__)
-# define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)
-#else
-/* FIXME: Not sure if is possible to do without compiler extension */
-#endif
-
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
# define _TYPE_ALIGNMENT(type) __alignof(type)
#elif defined(__GNUC__)
# define _TYPE_ALIGNMENT(type) __alignof__(type)
#else
/*
- * FIXME: Not sure if is possible to do without compiler extension
- * (if type is not just a name that is, if so the normal)
+ * FIXME: May not be possible without a compiler extension
+ * (if type is not just a name that is, otherwise the normal
* TYPE_ALIGNMENT can be used)
*/
#endif
#ifdef FIELD_ALIGNMENT
# define TEST_FIELD_ALIGNMENT(type, field, align) \
- ok(FIELD_ALIGNMENT(type, field) == align, \
+ ok(_TYPE_ALIGNMENT(((type*)0)->field) == align, \
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
- (int)FIELD_ALIGNMENT(type, field))
+ (int)_TYPE_ALIGNMENT(((type*)0)->field))
#else
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
#endif
* Windows API extension
*/
-#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
-# define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)
-#elif defined(__GNUC__)
-# define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)
-#else
-/* FIXME: Not sure if is possible to do without compiler extension */
-#endif
-
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
# define _TYPE_ALIGNMENT(type) __alignof(type)
#elif defined(__GNUC__)
# define _TYPE_ALIGNMENT(type) __alignof__(type)
#else
/*
- * FIXME: Not sure if is possible to do without compiler extension
- * (if type is not just a name that is, if so the normal)
+ * FIXME: May not be possible without a compiler extension
+ * (if type is not just a name that is, otherwise the normal
* TYPE_ALIGNMENT can be used)
*/
#endif
#ifdef FIELD_ALIGNMENT
# define TEST_FIELD_ALIGNMENT(type, field, align) \
- ok(FIELD_ALIGNMENT(type, field) == align, \
+ ok(_TYPE_ALIGNMENT(((type*)0)->field) == align, \
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
- (int)FIELD_ALIGNMENT(type, field))
+ (int)_TYPE_ALIGNMENT(((type*)0)->field))
#else
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
#endif
* Windows API extension
*/
-#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
-# define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)
-#elif defined(__GNUC__)
-# define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)
-#else
-/* FIXME: Not sure if is possible to do without compiler extension */
-#endif
-
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
# define _TYPE_ALIGNMENT(type) __alignof(type)
#elif defined(__GNUC__)
# define _TYPE_ALIGNMENT(type) __alignof__(type)
#else
/*
- * FIXME: Not sure if is possible to do without compiler extension
- * (if type is not just a name that is, if so the normal)
+ * FIXME: May not be possible without a compiler extension
+ * (if type is not just a name that is, otherwise the normal
* TYPE_ALIGNMENT can be used)
*/
#endif
#ifdef FIELD_ALIGNMENT
# define TEST_FIELD_ALIGNMENT(type, field, align) \
- ok(FIELD_ALIGNMENT(type, field) == align, \
+ ok(_TYPE_ALIGNMENT(((type*)0)->field) == align, \
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
- (int)FIELD_ALIGNMENT(type, field))
+ (int)_TYPE_ALIGNMENT(((type*)0)->field))
#else
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
#endif
* Windows API extension
*/
-#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
-# define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)
-#elif defined(__GNUC__)
-# define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)
-#else
-/* FIXME: Not sure if is possible to do without compiler extension */
-#endif
-
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
# define _TYPE_ALIGNMENT(type) __alignof(type)
#elif defined(__GNUC__)
# define _TYPE_ALIGNMENT(type) __alignof__(type)
#else
/*
- * FIXME: Not sure if is possible to do without compiler extension
- * (if type is not just a name that is, if so the normal)
+ * FIXME: May not be possible without a compiler extension
+ * (if type is not just a name that is, otherwise the normal
* TYPE_ALIGNMENT can be used)
*/
#endif
#ifdef FIELD_ALIGNMENT
# define TEST_FIELD_ALIGNMENT(type, field, align) \
- ok(FIELD_ALIGNMENT(type, field) == align, \
+ ok(_TYPE_ALIGNMENT(((type*)0)->field) == align, \
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
- (int)FIELD_ALIGNMENT(type, field))
+ (int)_TYPE_ALIGNMENT(((type*)0)->field))
#else
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
#endif
* Windows API extension
*/
-#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
-# define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)
-#elif defined(__GNUC__)
-# define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)
-#else
-/* FIXME: Not sure if is possible to do without compiler extension */
-#endif
-
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
# define _TYPE_ALIGNMENT(type) __alignof(type)
#elif defined(__GNUC__)
# define _TYPE_ALIGNMENT(type) __alignof__(type)
#else
/*
- * FIXME: Not sure if is possible to do without compiler extension
- * (if type is not just a name that is, if so the normal)
+ * FIXME: May not be possible without a compiler extension
+ * (if type is not just a name that is, otherwise the normal
* TYPE_ALIGNMENT can be used)
*/
#endif
#ifdef FIELD_ALIGNMENT
# define TEST_FIELD_ALIGNMENT(type, field, align) \
- ok(FIELD_ALIGNMENT(type, field) == align, \
+ ok(_TYPE_ALIGNMENT(((type*)0)->field) == align, \
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
- (int)FIELD_ALIGNMENT(type, field))
+ (int)_TYPE_ALIGNMENT(((type*)0)->field))
#else
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
#endif
* Windows API extension
*/
-#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
-# define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)
-#elif defined(__GNUC__)
-# define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)
-#else
-/* FIXME: Not sure if is possible to do without compiler extension */
-#endif
-
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
# define _TYPE_ALIGNMENT(type) __alignof(type)
#elif defined(__GNUC__)
# define _TYPE_ALIGNMENT(type) __alignof__(type)
#else
/*
- * FIXME: Not sure if is possible to do without compiler extension
- * (if type is not just a name that is, if so the normal)
+ * FIXME: May not be possible without a compiler extension
+ * (if type is not just a name that is, otherwise the normal
* TYPE_ALIGNMENT can be used)
*/
#endif
#ifdef FIELD_ALIGNMENT
# define TEST_FIELD_ALIGNMENT(type, field, align) \
- ok(FIELD_ALIGNMENT(type, field) == align, \
+ ok(_TYPE_ALIGNMENT(((type*)0)->field) == align, \
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
- (int)FIELD_ALIGNMENT(type, field))
+ (int)_TYPE_ALIGNMENT(((type*)0)->field))
#else
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
#endif
* Windows API extension
*/
-#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
-# define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)
-#elif defined(__GNUC__)
-# define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)
-#else
-/* FIXME: Not sure if is possible to do without compiler extension */
-#endif
-
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
# define _TYPE_ALIGNMENT(type) __alignof(type)
#elif defined(__GNUC__)
# define _TYPE_ALIGNMENT(type) __alignof__(type)
#else
/*
- * FIXME: Not sure if is possible to do without compiler extension
- * (if type is not just a name that is, if so the normal)
+ * FIXME: May not be possible without a compiler extension
+ * (if type is not just a name that is, otherwise the normal
* TYPE_ALIGNMENT can be used)
*/
#endif
#ifdef FIELD_ALIGNMENT
# define TEST_FIELD_ALIGNMENT(type, field, align) \
- ok(FIELD_ALIGNMENT(type, field) == align, \
+ ok(_TYPE_ALIGNMENT(((type*)0)->field) == align, \
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
- (int)FIELD_ALIGNMENT(type, field))
+ (int)_TYPE_ALIGNMENT(((type*)0)->field))
#else
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
#endif
print OUT " */\n";
print OUT "\n";
print OUT "#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)\n";
- print OUT "# define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)\n";
- print OUT "#elif defined(__GNUC__)\n";
- print OUT "# define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)\n";
- print OUT "#else\n";
- print OUT "/* FIXME: Not sure if is possible to do without compiler extension */\n";
- print OUT "#endif\n";
- print OUT "\n";
- print OUT "#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)\n";
print OUT "# define _TYPE_ALIGNMENT(type) __alignof(type)\n";
print OUT "#elif defined(__GNUC__)\n";
print OUT "# define _TYPE_ALIGNMENT(type) __alignof__(type)\n";
print OUT "#else\n";
print OUT "/*\n";
- print OUT " * FIXME: Not sure if is possible to do without compiler extension\n";
- print OUT " * (if type is not just a name that is, if so the normal)\n";
+ print OUT " * FIXME: May not be possible without a compiler extension\n";
+ print OUT " * (if type is not just a name that is, otherwise the normal\n";
print OUT " * TYPE_ALIGNMENT can be used)\n";
print OUT " */\n";
print OUT "#endif\n";
print OUT "\n";
print OUT "#ifdef FIELD_ALIGNMENT\n";
print OUT "# define TEST_FIELD_ALIGNMENT(type, field, align) \\\n";
- print OUT " ok(FIELD_ALIGNMENT(type, field) == align, \\\n";
+ print OUT " ok(_TYPE_ALIGNMENT(((type*)0)->field) == align, \\\n";
print OUT " \"FIELD_ALIGNMENT(\" #type \", \" #field \") == %d (expected \" #align \")\\n\", \\\n";
- print OUT " (int)FIELD_ALIGNMENT(type, field))\n";
+ print OUT " (int)_TYPE_ALIGNMENT(((type*)0)->field))\n";
print OUT "#else\n";
print OUT "# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)\n";
print OUT "#endif\n";