[runtime] Export API functions to get arch/os/wordsize strings.
authorAlex Rønne Petersen <alexrp@xamarin.com>
Wed, 31 Aug 2016 19:09:56 +0000 (21:09 +0200)
committerAlex Rønne Petersen <alexrp@xamarin.com>
Wed, 31 Aug 2016 22:34:25 +0000 (00:34 +0200)
mono/metadata/mono-config.c
mono/metadata/mono-config.h

index 42f36d36854a771c3b1a7c1915cbfe1cf81038dd..2bedf12cd8fa713149e7ee88a43ad09cd2912988 100644 (file)
 #endif
 #endif
 
+/**
+ * mono_config_get_os:
+ *
+ * Returns the operating system that Mono is running on, as used for dllmap entries.
+ */
+const char *
+mono_config_get_os (void)
+{
+       return CONFIG_OS;
+}
+
+/**
+ * mono_config_get_cpu:
+ *
+ * Returns the architecture that Mono is running on, as used for dllmap entries.
+ */
+const char *
+mono_config_get_cpu (void)
+{
+       return CONFIG_CPU;
+}
+
+/**
+ * mono_config_get_wordsize:
+ *
+ * Returns the word size that Mono is running on, as used for dllmap entries.
+ */
+const char *
+mono_config_get_wordsize (void)
+{
+       return CONFIG_WORDSIZE;
+}
+
 static void start_element (GMarkupParseContext *context, 
                            const gchar         *element_name,
                           const gchar        **attribute_names,
index 4e68b8a15d82762bdbc9c0be57aedfe2fd84c135..b9695c14ba296122fa8444d0c942074e2e389997 100644 (file)
 
 MONO_BEGIN_DECLS
 
+MONO_API const char *mono_config_get_os (void);
+MONO_API const char *mono_config_get_cpu (void);
+MONO_API const char *mono_config_get_wordsize (void);
+
 MONO_API const char* mono_get_config_dir (void);
 MONO_API void        mono_set_config_dir (const char *dir);