summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-07-14 22:15:29 +0200
committerSven Gothel <[email protected]>2015-07-14 22:15:29 +0200
commitf746c6cfb251478c10fa5d2df2d92f8855cb7cdc (patch)
tree399efe2e7bfc16c2ab29621a38a73ef77e7f4573 /test
parent50d216f8a721a5f7fb25b42113e8da1ca04ba8a0 (diff)
Use GlueGen's JNI header for native compilation (java.includes.dir, java.includes.dir.platform)
Using the same cross-platform JNI header for native compilation as for GlueGen code generation allows using a more determined (well defined) and simplified environment.
Diffstat (limited to 'test')
-rw-r--r--test/native/sizeof_dump.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/native/sizeof_dump.c b/test/native/sizeof_dump.c
new file mode 100644
index 0000000..2d79aa7
--- /dev/null
+++ b/test/native/sizeof_dump.c
@@ -0,0 +1,18 @@
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+
+int main(int argc, const char ** argv) {
+ printf("sizeof int: %lu\n", sizeof(int));
+ printf("sizeof long: %lu\n", sizeof(long));
+ printf("sizeof long long: %lu\n", sizeof(long long));
+ printf("sizeof intptr_t: %lu\n", sizeof(intptr_t));
+ printf("sizeof uintptr_t: %lu\n", sizeof(uintptr_t));
+ printf("sizeof ptrdiff_t: %lu\n", sizeof(ptrdiff_t));
+ printf("sizeof size_t: %lu\n", sizeof(size_t));
+ printf("sizeof float: %lu\n", sizeof(float));
+ printf("sizeof double: %lu\n", sizeof(double));
+ printf("sizeof long double: %lu\n", sizeof(long double));
+
+ return 0;
+}