aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/android/portdefs.h
diff options
context:
space:
mode:
authorThanasis Antoniou2019-11-12 20:01:43 +0200
committerThanasis Antoniou2019-11-12 20:01:43 +0200
commit3e9504856f9b4f07b2befa0845fe500fbdfba9f9 (patch)
treebf9bf01aff8b91c9d88d2173cb6333d288f1ed29 /backends/platform/android/portdefs.h
parentfe296f1c4737ecdb28b96ed98e07ce602ecae699 (diff)
downloadscummvm-rg350-3e9504856f9b4f07b2befa0845fe500fbdfba9f9.tar.gz
scummvm-rg350-3e9504856f9b4f07b2befa0845fe500fbdfba9f9.tar.bz2
scummvm-rg350-3e9504856f9b4f07b2befa0845fe500fbdfba9f9.zip
ANDROID: Override UTF-8 compliant definition of vsn_printf
This sets Android as a non-standard port in configure in order to override the definition for vsn_printf The vsn_printf implementation is taken from https://github.com/weiss/c99-snprintf
Diffstat (limited to 'backends/platform/android/portdefs.h')
-rw-r--r--backends/platform/android/portdefs.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/backends/platform/android/portdefs.h b/backends/platform/android/portdefs.h
new file mode 100644
index 0000000000..dda6a29c2d
--- /dev/null
+++ b/backends/platform/android/portdefs.h
@@ -0,0 +1,48 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef _PORTDEFS_H_
+#define _PORTDEFS_H_
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include <ctype.h>
+#include <assert.h>
+#include <new>
+
+#define _USE_MATH_DEFINES
+#include <math.h>
+
+// This is defined in snprintf.c
+#ifdef __cplusplus
+extern "C" {
+#endif
+int rpl_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap);
+#ifdef __cplusplus
+}
+#endif
+
+#define vsnprintf rpl_vsnprintf
+
+#endif // _PORTDEFS_H_