mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-30 02:46:37 +02:00
Support added for building using a GNU toolchain on Win32,
i.e. gcc -mno-cygwin on cygwin (a.k.a. mingw32, using egcs-1.1.2). * README.win32: Updated. * build-dll makefile.cygwin tests/makefile.cygwin: New files. * glib.h glib.def glibconfig.h.win32 makefile.msc: Slight updates. * gmain.c: No need to include <fcntl.h> and <io.h> on Win32. * gmain.c gutils.c testglib.c tests/string-test.c: Test for NATIVE_WIN32, not _MSC_VER. * gmutex.c: Must declare g_thread_functions_for_glib_use as exported (using the GUTILS_C_VAR macro). * gutils.c gmodule/libgplugin_[ab].c: LibMain not needed. * gmodule/gmoduleconf.h.win32: Need underscore with gcc. * gthread/gthread.c: With gcc on Win32, must use memcpy to assign value of g_thread_functions_for_glib_use (?). * makefile.msc tests/makefile.msc: Cosmetics.
This commit is contained in:
@@ -2750,8 +2750,10 @@ GIOChannel *g_io_channel_win32_new_stream_socket (int socket);
|
||||
*/
|
||||
#ifdef NATIVE_WIN32
|
||||
# define MAXPATHLEN 1024
|
||||
# ifdef _MSC_VER
|
||||
|
||||
#ifdef _MSC_VER
|
||||
typedef int pid_t;
|
||||
#endif
|
||||
|
||||
/* These POSIXish functions are available in the Microsoft C library
|
||||
* prefixed with underscore (which of course technically speaking is
|
||||
@@ -2768,6 +2770,9 @@ typedef int pid_t;
|
||||
# define getcwd _getcwd
|
||||
# define getpid _getpid
|
||||
# define access _access
|
||||
#ifdef __GNUC__
|
||||
# define stat _stat
|
||||
#endif
|
||||
# define open _open
|
||||
# define read _read
|
||||
# define write _write
|
||||
@@ -2802,7 +2807,6 @@ DIR* gwin_opendir (const gchar *dirname);
|
||||
struct dirent* gwin_readdir (DIR *dir);
|
||||
void gwin_rewinddir (DIR *dir);
|
||||
gint gwin_closedir (DIR *dir);
|
||||
# endif /* _MSC_VER */
|
||||
#endif /* NATIVE_WIN32 */
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user