Get len using strlen() if arg is negative in the Win32 code, too.

2001-01-06  Tor Lillqvist  <tml@iki.fi>

	* gconvert.c (g_locale_to_utf8, g_locale_from_utf8): Get len using
	strlen() if arg is negative in the Win32 code, too.

	* giowin32.c: Changes necessary to be able to run
	mainloop-test. We can't close the fd that our (internal) reader
	thread is sitting doing a blocking read() from. We must terminate
	the thread first. Keep track of thread handle, and close it when
	thread is dying. Start reader thread with the lower-level
	CreateThread() instead of _beginthreadex() from the C runtime, in
	order to be able to use TerminateThread(). Hopefuly this isn't
	harmful.

	* glib.def: Update.

	* tests/makefile.{mingw,msc}.in (TESTS): Add mainloop-test and
	unicode-encoding.

	* tests/mainloop-test.c: Portability: <unistd.h>, need <fcntl.h>
	on Win32.

	* tests/unicode-encoding.c (process): Add missing "line" argument
	to fail(). On Win32, convert UTF-16LE, as libiconv'c ivonf always
	converts to UTF-16BE if we ask for unspecific UTF-16.
	(main) Handle also '\r'.
This commit is contained in:
Tor Lillqvist
2001-01-06 03:09:46 +00:00
committed by Tor Lillqvist
parent 956f00ed96
commit deb68e1592
18 changed files with 393 additions and 29 deletions

View File

@@ -22,6 +22,7 @@ TESTS = \
gio-test.exe \
hash-test.exe \
list-test.exe \
mainloop-test.exe\
markup-test.exe \
node-test.exe \
queue-test.exe \
@@ -35,7 +36,8 @@ TESTS = \
thread-test.exe \
threadpool-test.exe\
tree-test.exe \
type-test.exe
type-test.exe \
unicode-encoding.exe
all: $(TESTS)