Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/mingw/samples/dlltest/dll.c')
-rw-r--r--winsup/mingw/samples/dlltest/dll.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/winsup/mingw/samples/dlltest/dll.c b/winsup/mingw/samples/dlltest/dll.c
new file mode 100644
index 000000000..ba00fab3e
--- /dev/null
+++ b/winsup/mingw/samples/dlltest/dll.c
@@ -0,0 +1,22 @@
+/*
+ * Source code of the functions inside our test DLL. Note that DllMain is
+ * not required (it will be provided by the stub in libmingw32.a).
+ */
+
+#if 0
+#include <windows.h>
+#endif
+
+int Add (int x, int y)
+{
+ printf ("In add!\nx = %d\ny = %d\n", x, y);
+ return (x + y);
+}
+
+
+double __attribute__((stdcall)) Sub (double x, double y)
+{
+ printf ("In sub!\nx = %f\ny = %f\n", x, y);
+ return (x - y);
+}
+