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 1024


NAME_MAX

#    define NAME_MAX 255


pid_t

typedef int pid_t;


pipe()

#define pipe(phandles)	_pipe (phandles, 4096, _O_BINARY)

phandles : 


ftruncate()

#    define ftruncate(fd, size)	g_win32_ftruncate (fd, size)

fd : 
size : 


opendir

#    define opendir		g_win32_opendir


readdir

#    define readdir		g_win32_readdir


rewinddir

#    define rewinddir		g_win32_rewinddir


closedir

#    define closedir		g_win32_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 : 


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 :