4
* depends on gtypes.inc
9
{ Windows emulation stubs for common Unix functions
20
{ For some POSIX functions that are not provided by the MS runtime,
21
we provide emulators in glib, which are prefixed with g_win32_.
23
function ftruncate(f:gint; size:guint):gint;cdecl;external gliblib name 'g_win32_ftruncate';
25
function g_win32_ftruncate(f:gint; size:guint):gint;cdecl;external gliblib name 'g_win32_ftruncate';
27
{ The MS setlocale uses locale names of the form "English_United
28
States.1252" etc. We want the Unixish standard form "en", "zh_TW"
29
etc. This function gets the current thread locale from Windows and
30
returns it as a string of the above form for use in forming file
31
names etc. The returned string should be deallocated with g_free().
34
function g_win32_getlocale:Pgchar;cdecl;external gliblib name 'g_win32_getlocale';
36
{ Translate a Win32 error code (as returned by GetLastError()) into
37
the corresponding message. The returned string should be deallocated
40
function g_win32_error_message(error:gint):Pgchar;cdecl;external gliblib name 'g_win32_error_message';
42
function g_win32_get_package_installation_directory(package:Pgchar; dll_name:Pgchar):Pgchar;cdecl;external gliblib name 'g_win32_get_package_installation_directory';
44
function g_win32_get_package_installation_subdirectory(package:Pgchar; dll_name:Pgchar; subdir:Pgchar):Pgchar;cdecl;external gliblib name 'g_win32_get_package_installation_subdirectory';