1. 04 Feb, 2010 1 commit
  2. 01 Feb, 2010 1 commit
  3. 04 Nov, 2009 1 commit
    • Tor Lillqvist's avatar
      Don't call WSAEventSelect() on -1 · 3c57a6c7
      Tor Lillqvist authored
      If g_io_win32_sock_close() has been called on a socket channel, don't
      later in g_io_win32_free() call WSAEventSelect() on its fd which has
      been set to -1.
      3c57a6c7
  4. 30 May, 2009 1 commit
  5. 23 Sep, 2008 1 commit
  6. 27 Aug, 2008 1 commit
    • Tor Lillqvist's avatar
      Stylistic changes. Plug an unlikely memory leak that occurred in · 2c5de8ed
      Tor Lillqvist authored
      2008-08-27  Tor Lillqvist  <tml@novell.com>
      
      	* glib/giowin32.c: Stylistic changes. Plug an unlikely memory leak
      	that occurred in create_thread() if closing the thread handle
      	failed. Add more error messages to g_io_win32_free() that are
      	printed only when debugging. Plug handle leak, a socket channel's
      	event was never closed.
      
      
      svn path=/trunk/; revision=7405
      2c5de8ed
  7. 21 Aug, 2008 4 commits
    • Tor Lillqvist's avatar
      Drop #if 0 code. · 755400be
      Tor Lillqvist authored
      2008-08-21  Tor Lillqvist  <tml@novell.com>
      
      	* glib/giowin32.c: Drop #if 0 code.
      
      
      svn path=/trunk/; revision=7385
      755400be
    • Tor Lillqvist's avatar
      Don't bother compiling the binary compatibility · 54d62aa3
      Tor Lillqvist authored
      2008-08-21  Tor Lillqvist  <tml@novell.com>
      
      	* glib/giowin32.c: Don't bother compiling the binary
      	compatibility g_io_channel_win32_new_stream_socket()
      	function that has not been mentioned in any header since 2.0 on
      	Win64.
      
      	* glib/glib.symbols: Mark it, too, private, and don't export it on
      	Win64.
      
      
      svn path=/trunk/; revision=7384
      54d62aa3
    • Tor Lillqvist's avatar
      Improve run-time warning messages. Drop some #if 0 code. · 5becc45b
      Tor Lillqvist authored
      2008-08-21  Tor Lillqvist  <tml@novell.com>
      
      	* glib/giowin32.c: Improve run-time warning messages. Drop
      	some #if 0 code.
      
      
      svn path=/trunk/; revision=7383
      5becc45b
    • Tor Lillqvist's avatar
      Minor comment improvements. · 2da8893a
      Tor Lillqvist authored
      2008-08-21  Tor Lillqvist  <tml@novell.com>
      
      	* glib/giowin32.c: Minor comment improvements.
      
      
      svn path=/trunk/; revision=7382
      2da8893a
  8. 20 Aug, 2008 1 commit
    • Tor Lillqvist's avatar
      Bug 500246 - Bug fixes for giowin32 · 971ab2b5
      Tor Lillqvist authored
      2008-08-20  Tor Lillqvist  <tml@novell.com>
      
      	Bug 500246 - Bug fixes for giowin32
      
      	* glib/giowin32.c (read_thread) (write_thread): Change the nbytes
      	variables to signed.
      	(g_io_channel_win32_make_pollfd): Fix an obvious error in the file
      	descriptor case leftover after the patch from bug #333098 on
      	2006-03-02. Thanks to Marcus Brinkmann.
      
      
      svn path=/trunk/; revision=7373
      971ab2b5
  9. 19 Aug, 2008 1 commit
    • Tor Lillqvist's avatar
      Bug 324234 - Using g_io_add_watch_full() to wait for connect() to return · f7f48d5c
      Tor Lillqvist authored
      2008-08-20  Tor Lillqvist  <tml@novell.com>
      
      	Bug 324234 - Using g_io_add_watch_full() to wait for connect() to
      	return on a non-blocking socket returns prematurely
      
      	Bug 548278 - Async GETs connections are always terminated
      	unexpectedly on Windows
      
      	* glib/giowin32.c: Add one more state variable to the
      	GIOWin32Channel struct, ever_writable. Initialise it to FALSE, set
      	to TRUE when the WSAEventSelect() indicates FD_WRITE, and never
      	reset to FALSE.
      
      	Don't do the WSASetEvent() in g_io_win32_prepare() unless
      	ever_writable is TRUE. Don't automatically indicate G_IO_OUT in
      	g_io_win32_check() unless ever_writable is TRUE.
      
      	This fixes the behaviour of the test case program in bug #548278,
      	and the "Testcase for the spurious OUT event bug" in bug
      	#324234. It also doesn't seem to break anything. Not that there is
      	any exhaustive test suite...
      
      	Add a comment with a list of bugs that are related to the code in
      	this file.
      
      
      svn path=/trunk/; revision=7372
      f7f48d5c
  10. 04 Aug, 2008 1 commit
    • Tor Lillqvist's avatar
      glib/giowin32.c glib/gmain.c glib/gspawn-win32.c Change gssize casts · 0e2384fa
      Tor Lillqvist authored
      2008-08-04  Tor Lillqvist  <tml@novell.com>
      
      	* glib/giowin32.c
      	* glib/gmain.c
      	* glib/gspawn-win32.c
      	* glib/gspawn-win32-helper.c: Change gssize casts introduced on
      	2008-07-28 to gintptr casts now that we have that. gssize is as
      	such the same as gintptr on both 32- and 64-bit Windows, but the
      	gintptr name indicates that it is used to hold pointers, i.e. also
      	HANDLEs.
      
      
      svn path=/trunk/; revision=7306
      0e2384fa
  11. 28 Jul, 2008 1 commit
    • Tor Lillqvist's avatar
      Fix problems on 64-bit Windows. Avoid warnings, some of which indicated · a3fa7485
      Tor Lillqvist authored
      2008-07-28  Tor Lillqvist  <tml@novell.com>
      
      	Fix problems on 64-bit Windows. Avoid warnings, some of which
      	indicated actual problems, some which were just annoyances. 
      
      	Where casts to an integer type are needed for pointers, use
      	gssize. Technically intptr_t would be the more proper type, but we
      	still want to be compilable with MSVS6 and 7 which don't have
      	intptr_t. MSVS8 and 9 do have intptr_t, but in <crtdefs.h>, not
      	<stdint.h>.
      
      	Use %p to print out handles. Use gssize casts when assigning
      	GPollFD::fd fields.
      
      	Use G_GSIZE_FORMAT when printing size_t values.
      	
      	* configure.in: Define automake conditional G_OS_WIN32_X64 which
      	is true on Win64.
      
      	* glib/giochannel.h: Use slightly different prototype for
      	g_io_channel_win32_new_messages() on Win64 with gsize instead of
      	guint.
      
      	* glib/giowin32.c
      	* glib/gmain.c
      	* glib/gspawn-win32.c
      	* tests/testglib.c: Generic changes as described above.
      
      	* glib/gmain.h: Don't bother mentioning GIMP in comment.
      
      	* glib/grel.c (tuple_hash_2): Use all bits of pointer.
      
      	* glib/gspawn-win32.c
      	* glib/gspawn-win32-helper.c: Use gssize types in the
      	communication between parent and helper process, so that we can
      	pass process handles, which are pointers, also on Win64.
      
      	* glib/gtimer.c (g_time_val_to_iso8601): time_t is 64 bits on
      	Win64 so we can't pass the address of a GTimeVal::tv_sec which is
      	a long directly to gmtime(). On the other hand, changing
      	GTimeVal::tv_sec to be a gint64 on Win64 is not really feasible
      	either, as that would then require changes in much code that uses
      	GTimeVals.
      
      	* glib/gspawn-win32.c
      	* glib/Makefile.am: Call the helper programs
      	gspawn-win64-helper.exe and gspawn-win64-helper-console.exe on
      	Win64, to avoid potential risk of running a 32-bit version of the
      	helper.
      
      
      svn path=/trunk/; revision=7260
      a3fa7485
  12. 27 Jul, 2008 1 commit
    • Tor Lillqvist's avatar
      glib/glib.symbols glib/gconvert.c glib/gdir.c glib/gfileutils.c · 80ecc308
      Tor Lillqvist authored
      2008-07-27  Tor Lillqvist  <tml@novell.com>
      
      	* glib/glib.symbols
      	* glib/gconvert.c
      	* glib/gdir.c
      	* glib/gfileutils.c
      	* glib/giowin32.c
      	* glib/gspawn-win32.c
      	* glib/gutils.c
      	* glib/gwin32.c: Bypass the Windows "ABI compatibility" symbols on
      	_WIN64. As there hasn't been any widely deployed 64-bit Windows
      	builds of the really old GLib (pre-2.8.1) versions those refer to,
      	there is no need to have the "ABI compatibility" versions in the
      	DLL.
      
      	* glib/makegalias.pl: Handle #ifndef _WIN64: Just output it, too.
      
      
      svn path=/trunk/; revision=7257
      80ecc308
  13. 20 Jul, 2008 1 commit
    • Tor Lillqvist's avatar
      Patch from Yu Kuan that makes watched sockets behave much better. See · 55790836
      Tor Lillqvist authored
      2008-07-20  Tor Lillqvist  <tml@novell.com>
      
      	* glib/giowin32.c (g_io_win32_prepare): Patch from Yu Kuan that
      	makes watched sockets behave much better. See gtk-devel-list
      	archives from May for the (unfortunately rather meager)
      	discussion. This patch fixes the presented simple test program,
      	which reasonably could be expected to work.
      
      
      svn path=/trunk/; revision=7220
      55790836
  14. 16 Jun, 2008 1 commit
  15. 11 Jun, 2008 1 commit
  16. 17 May, 2008 1 commit
  17. 06 Jul, 2007 1 commit
    • Tor Lillqvist's avatar
      When WSAEnumNetworkEvents() signals FD_CONNECT that means that the · 09d61979
      Tor Lillqvist authored
      2007-07-06  Tor Lillqvist  <tml@novell.com>
      
      	* glib/giowin32.c (g_io_win32_check): When WSAEnumNetworkEvents()
      	signals FD_CONNECT that means that the connection attempt
      	finished, either successfully or failed. Test explicitly whether
      	the connnection succeeded and set either G_IO_OUT if it did,
      	G_IO_ERR|G_IO_HUP if it failed.
      
      	Make sure we never set both G_IO_OUT and G_IO_HUP simultaneously
      	because in Unix poll(2) POLLOUT and POLLHUP are mutually
      	exclusive.
      
      	Ignore whether the caller wants to watch G_IO_HUP or not. Always
      	select for FD_CLOSE because Unix poll(2) also ignores whether
      	POLLHUP in set the requested events bitmask or not.
      
      
      svn path=/trunk/; revision=5600
      09d61979
  18. 07 Jan, 2007 1 commit
    • Tor Lillqvist's avatar
      Handle GIOChannels for file descriptors connected to the console · e5ef7559
      Tor Lillqvist authored
      2007-01-07  Tor Lillqvist  <tml@novell.com>
      
      	* glib/giowin32.c: Handle GIOChannels for file descriptors
      	connected to the console separately. This would typically be the
      	fd 0, 1, or 2 (if not redirected) in a console application. For
      	such fds we don't need a separate thread, as console HANDLEs are
      	waitable objects. (#359202, Michiel de Hoon)
      
      
      svn path=/trunk/; revision=5222
      e5ef7559
  19. 12 May, 2006 1 commit
  20. 11 Mar, 2006 1 commit
    • Marcus Brinkmann's avatar
      Implement watches for GIOChannels for write file descriptors on Win32 · 6f0ef1ba
      Marcus Brinkmann authored
      2006-03-02  Marcus Brinkmann  <mb@g10code.de>
      
      	Implement watches for GIOChannels for write file descriptors on
      	Win32 (#333098).
      
      	* glib/giowin32.c (GIOWin32Channel): Add a new direction field.
      	(read_thread): Initialize direction.
      	(write_thread): New function.
      	(buffer_write): New function.
      	(g_io_win32_prepare): Handle the G_IO_WIN32_FILE_DESC case for the
      	write direction.
      	(g_io_win32_fd_write): Call buffer_write() if there is a writer
      	thread.
      	(g_io_win32_fd_close): Set space_avail_event for writer threads.
      	(g_io_win32_fd_create_watch): Create the writer thread if
      	condition is G_IO_OUT.
      	(g_io_channel_win32_make_pollfd): Likewise here.
      6f0ef1ba
  21. 08 Nov, 2005 1 commit
  22. 08 Jul, 2005 1 commit
  23. 30 Mar, 2005 1 commit
  24. 14 Mar, 2005 1 commit
    • Matthias Clasen's avatar
      Make PLT-reduction work with gcc4, and don't include everything in · 608a31b9
      Matthias Clasen authored
      2005-03-13  Matthias Clasen  <mclasen@redhat.com>
      
      	Make PLT-reduction work with gcc4, and don't include
      	everything in galias.h:
      
      	* glib/glib.symbols: Group symbols by header and source file.
      	* glib/makegalias.pl: Protect definitions by the same
      	preprocessor symbols used to guard the headers. Move
      	the alias declarations to a separate file which is
      	produced when calling makegalias.pl -def
      	* glib/Makefile.am (galiasdef.c): Add a rule to generate this
      	file.
      	* glib/*.c: Include galias.h after the other GLib headers,
      	include galiasdef.c at the bottom.
      608a31b9
  25. 11 Feb, 2005 1 commit
  26. 05 Feb, 2005 1 commit
    • Tor Lillqvist's avatar
      configure.in (G_LIBS_EXTRA) I think we can include <winsock2.h> and link · 02ef59ae
      Tor Lillqvist authored
      2005-02-05  Tor Lillqvist  <tml@novell.com>
      
      	* configure.in (G_LIBS_EXTRA)
      	* glib/giowin32.c: I think we can include <winsock2.h> and link
      	with -lws2_32. Only Windows 95 originally didn't have Winsock 2,
      	and it's available as an update for it. Not that we use any actual
      	Winsock 2 -only features, but still, simpler to link directly with
      	ws2_32.dll instead of going through wsock32.dll.
      02ef59ae
  27. 06 Dec, 2004 1 commit
  28. 27 Oct, 2004 1 commit
    • Matthias Clasen's avatar
      Introduce the idea of a filename encoding, which is *literally* the · 8a7eecd7
      Matthias Clasen authored
      2004-10-27  Matthias Clasen  <mclasen@redhat.com>
      
      	Introduce the idea of a filename encoding, which is
      	*literally* the filename encoding on Unix. On windows,
      	use the Unicode name converted to UTF-8. (#156325,
      	Tor Lillqvist, Owen Taylor)
      
      	* glib/gdir.[hc]:
      	* glib/gconvert.[hc]:
      	* glib/gfileutils.[hc]:
      	* glib/gutils.[hc]:
      	* glib/giowin32.c: On Windows, keep old ABI versions
      	of GLib pathname api for DLL ABI stability. Use different
      	names for the new-style UTF-8 versions. Hide this through
      	a #define.
      
      	* glib/gstdio.[hc]: New files containing wrappers for
      	POSIX pathname api.
      
      	* glib/glib.symbols: Add new symbols.
      
      	* glib/makegalias.pl: Drop Win32 specific .def syntax,
      	include gstdio.h
      8a7eecd7
  29. 16 Sep, 2004 1 commit
  30. 21 Aug, 2004 1 commit
  31. 01 Jul, 2004 1 commit
  32. 09 May, 2004 1 commit
  33. 10 Apr, 2004 1 commit
    • Tor Lillqvist's avatar
      glib/giowin32.c glib/gmain.c glib/gstrfuncs.c Decorating variable · 9b408061
      Tor Lillqvist authored
      2004-04-10  Tor Lillqvist  <tml@iki.fi>
      
      	* glib/giowin32.c
      	* glib/gmain.c
      	* glib/gstrfuncs.c
      	* glib/gthread.c: Decorating variable definitions with
      	__declspec(dllexport) causes problems on Cygwin build, and isn't
      	really needed for a native Win32 build with mingw or MSVC, so
      	remove. (#138402, Roger Leigh)
      
      	* glib/libcharset/localcharset.c: Use Win32-specific code also on
      	Cygwin.
      	* tests/uri-test.c: Don't assume that local filenames are in UTF-8
      	on Cygwin, either. (#138412, Roger Leigh)
      9b408061
  34. 22 Nov, 2003 1 commit
  35. 25 Aug, 2003 1 commit
  36. 25 Jun, 2003 1 commit
    • Tor Lillqvist's avatar
      Pass real &optval and &optlen to getsockopt() instead of NULL. Don't · 98ba2b5e
      Tor Lillqvist authored
      2003-06-25  Tor Lillqvist  <tml@iki.fi>
      
      	* glib/giowin32.c (g_io_channel_unix_new): Pass real &optval and
      	&optlen to getsockopt() instead of NULL. Don't remember why I
      	thought that NULL could be used (as we don't actually use the
      	returned value for anything), the Platform SDK documentation
      	doesn't imply so.
      98ba2b5e
  37. 08 Jun, 2003 1 commit