Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
[DllImport(Libraries.Libc, EntryPoint = "free", CallingConvention = CallingConvention.Cdecl)]
internal static extern int Free(IntPtr ptr);
+ [DllImport(Libraries.Libc, EntryPoint = "getenv")]
+ internal static extern IntPtr GetEnvironmentVariable(string name);
+
[NativeStruct("struct timespec", Include = "time.h")]
[StructLayout(LayoutKind.Sequential)]
internal struct TimeStamp
internal static string GetDefaultLocale()
{
- IntPtr stringPtr = IntPtr.Zero;
- if (Interop.BaseUtilsi18n.GetDefault(out stringPtr) != 0)
- {
- return string.Empty;
- }
-
+ IntPtr stringPtr = Interop.Libc.GetEnvironmentVariable("LANG");
if (stringPtr == IntPtr.Zero)
{
return string.Empty;