Windows Compatability Functions

Name

Windows Compatability Functions -- 

Synopsis


#include <glib.h>


#define     MAXPATHLEN
#define     NAME_MAX
typedef     pid_t;
#define     pipe                            (phandles)
#define     ftruncate                       (fd, size)
#define     opendir
#define     readdir
#define     rewinddir
#define     closedir
gchar*      g_win32_error_message           (gint error);
gchar*      g_win32_getlocale               (void);

Description

Details

MAXPATHLEN

#define     MAXPATHLEN


NAME_MAX

#define     NAME_MAX


pid_t


pipe()

#define     pipe(phandles)

phandles : 


ftruncate()

#define     ftruncate(fd, size)

fd : 
size : 


opendir

#define     opendir


readdir

#define     readdir


rewinddir

#define     rewinddir


closedir

#define     closedir


g_win32_error_message ()

gchar*      g_win32_error_message           (gint error);

Translate a Win32 error code (as returned by GetLastError()) into the corresponding message. The message is either language neutral, or in the thread's language, or the user's language, the system's langauge, or US English (see docs for FormatMessage). The returned string should be deallocated with g_free().

error : error code
Returns : allocated error message


g_win32_getlocale ()

gchar*      g_win32_getlocale               (void);

The setlocale in the Microsoft C library uses locale names of the form "English_United States.1252" etc. We want the Unixish standard form "en", "zh_TW" etc. This function gets the current thread locale from Windows and returns it as a string of the above form for use in forming file names etc. The returned string should be deallocated with g_free().

Returns : allocated locale name