winapi_test: FIELD_ALIGNMENT() is redundant so remove it.
authorFrancois Gouget <fgouget@free.fr>
Wed, 7 Jan 2009 23:18:48 +0000 (00:18 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 8 Jan 2009 11:43:15 +0000 (12:43 +0100)
dlls/gdi32/tests/generated.c
dlls/kernel32/tests/generated.c
dlls/ntdll/tests/generated.c
dlls/rpcrt4/tests/generated.c
dlls/shell32/tests/generated.c
dlls/shlwapi/tests/generated.c
dlls/urlmon/tests/generated.c
dlls/user32/tests/generated.c
dlls/wininet/tests/generated.c
tools/winapi/winapi_test

index 632d6420b06215b09ac4de9b6bb572564ba4cd10..758851dbd7c5b3ccfd6f4e2ccd874bfef6051a7c 100644 (file)
  * 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
@@ -61,9 +53,9 @@
 
 #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
index fe1c6c8a6d0935dcafd490b0ce3f6ff4f19c19dd..a5a84c4e78e5be2753462348a3acea8096f61469 100644 (file)
  * 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
@@ -61,9 +53,9 @@
 
 #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
index c854d5b4daf0a4387fb331cbaa8b8bdeae0cd2c6..08195222c15d2ed2e999afc44430859ddb87cf59 100644 (file)
  * 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
@@ -61,9 +53,9 @@
 
 #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
index c5b69a86f0da8da633be66142c3b6d9e2cdeb248..7296970cfb12d796acd93556f62af471121e6d47 100644 (file)
  * 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
@@ -66,9 +58,9 @@
 
 #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
index 21520215471ee448ca349288e381ad6bed8e4dd7..a3c9727f5b92ffb93aa3fa4670dd8f77673e7760 100644 (file)
  * 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
@@ -68,9 +60,9 @@
 
 #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
index 1ac8811a889b996b2d214a2a2a85bf08ed769578..0b52d65fb157de47f72dc173ac67b50b4955c43d 100644 (file)
  * 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
@@ -66,9 +58,9 @@
 
 #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
index a02720508469f766c2a3fdeb904a54d1b7da3b64..61233cd124718dcf837ad5609bf7bef5823f0eb7 100644 (file)
  * 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
@@ -64,9 +56,9 @@
 
 #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
index 423bc08cd665c42da57bfc61e97eef6538ee6003..be1796f387dee37ee268810a110be21e55baac4a 100644 (file)
  * 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
@@ -61,9 +53,9 @@
 
 #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
index dea2d05e9e2686b3111c172ae9f94fab95d8a14f..3fd7be4163238cf11d19c80462c8468a54b065c3 100644 (file)
  * 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
@@ -65,9 +57,9 @@
 
 #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
index f973928c5e522693e158c344f919053a22ef24cf..36ddfa90515f9c10cd8f3a7a3b5cbb58aa04e82c 100755 (executable)
@@ -512,21 +512,13 @@ sub output_header($$$) {
     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";
@@ -546,9 +538,9 @@ sub output_header($$$) {
     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";