summaryrefslogtreecommitdiff
path: root/Tests/Plugin/src/example_mod_1.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-04-19 11:32:43 -0400
committerBrad King <brad.king@kitware.com>2007-04-19 11:32:43 -0400
commit03dfb39bd0b0fa8e958f0fed00cdf44133d936d1 (patch)
tree2a868286b21664aa33cb2a91146212da949d2cf2 /Tests/Plugin/src/example_mod_1.c
parent16be80b7b49ee02019eeaf8710028d90be8d368e (diff)
downloadcmake-03dfb39bd0b0fa8e958f0fed00cdf44133d936d1.tar.gz
ENH: Added function call argument to module function to make sure calling convention matches on lookup. Fixed for Watcom.
Diffstat (limited to 'Tests/Plugin/src/example_mod_1.c')
-rw-r--r--Tests/Plugin/src/example_mod_1.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/Tests/Plugin/src/example_mod_1.c b/Tests/Plugin/src/example_mod_1.c
index f96ba2955f..1fc7338451 100644
--- a/Tests/Plugin/src/example_mod_1.c
+++ b/Tests/Plugin/src/example_mod_1.c
@@ -8,9 +8,15 @@
# define MODULE_EXPORT
#endif
-MODULE_EXPORT int example_mod_1_function()
+#ifdef __WATCOMC__
+# define MODULE_CCONV __cdecl
+#else
+# define MODULE_CCONV
+#endif
+
+MODULE_EXPORT int MODULE_CCONV example_mod_1_function(int n)
{
- int result = example_exe_function() + 456;
+ int result = example_exe_function() + n;
printf("world\n");
return result;
}