summaryrefslogtreecommitdiff
path: root/include/wntgccx
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-06-06 11:38:05 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2013-06-06 11:38:36 +0200
commit057891e7a2721cdd204e1eef4051b2021d2c5c6b (patch)
tree472ee377d12b4458a6d1c37a60f141069504db73 /include/wntgccx
parent52e0ff83639809b8f2e92a9899ed5ed795f3d780 (diff)
Some more movement to mingw64 port
Change-Id: I6af3cb1ac205dae20feb5a35481071bc4232680b
Diffstat (limited to 'include/wntgccx')
-rw-r--r--include/wntgccx/jni_md.h35
-rw-r--r--include/wntgccx/sehandler.hxx46
2 files changed, 81 insertions, 0 deletions
diff --git a/include/wntgccx/jni_md.h b/include/wntgccx/jni_md.h
new file mode 100644
index 000000000000..e77438d75e6b
--- /dev/null
+++ b/include/wntgccx/jni_md.h
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+/* Fake jni_md.h for use when cross-compiling to Windows */
+
+#ifndef JNI_MD_H_INCLUDED
+#define JNI_MD_H_INCLUDED
+
+#define JNIEXPORT __declspec (dllexport)
+#define JNIIMPORT __declspec (dllimport)
+#define JNICALL __stdcall
+
+typedef long jint;
+typedef __int64 jlong;
+typedef char jbyte;
+
+#endif /* JNI_MD_H_INCLUDED */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/wntgccx/sehandler.hxx b/include/wntgccx/sehandler.hxx
new file mode 100644
index 000000000000..49bd0f21eb50
--- /dev/null
+++ b/include/wntgccx/sehandler.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* From mingw-w64 excpt.h */
+
+#ifndef _SEHANDLER_HXX
+#define _SEHANDLER_HXX
+
+#if !defined( __MINGW32__ ) || !defined ( _WIN64 )
+#error This file should be included only in a 64-bit MinGW compilation
+#endif
+
+#ifdef __try
+#undef __try
+#endif
+
+#if 0
+#define __try \
+ __asm__ __volatile__ ("\t.l_startw:\n" \
+ );
+#else
+#define __try \
+ if (true)
+#endif
+
+#ifdef __except
+#undef __except
+#endif
+
+#if 0
+#define __except(exvalue) \
+ __asm__ __volatile__ ("\tnop\n" \
+ "\t.seh_handler __C_specific_handler, @except\n" \
+ "\t.seh_handlerdata\n" \
+ "\t.long 1\n" \
+ "\t.rva .l_startw, .l_endw, " __MINGW64_STRINGIFY(exvalue) " ,.l_endw\n" \
+ "\t.text\n" \
+ "\t.l_endw: nop\n" \
+ );
+#else
+#define __except(exvalue) \
+ if (false)
+#endif
+
+
+#endif // _SEHANDLER_HXX
+