mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
deb68e1592
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'.
55 lines
1.2 KiB
Plaintext
55 lines
1.2 KiB
Plaintext
## Makefile for building the GLib test programs with Microsoft C
|
|
## Use: nmake -f makefile.msc check
|
|
|
|
TOP = ..\..
|
|
|
|
!INCLUDE ..\build\win32\make.msc
|
|
|
|
# Possibly override GLib version in build\win32\module.defs
|
|
GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
|
|
|
|
################################################################
|
|
|
|
# Nothing much configurable below
|
|
|
|
INCLUDES = -I..
|
|
DEFINES = -DHAVE_CONFIG_H
|
|
|
|
TESTS = \
|
|
array-test.exe \
|
|
date-test.exe \
|
|
dirname-test.exe\
|
|
gio-test.exe \
|
|
hash-test.exe \
|
|
list-test.exe \
|
|
mainloop-test.exe\
|
|
markup-test.exe \
|
|
node-test.exe \
|
|
queue-test.exe \
|
|
rand-test.exe \
|
|
relation-test.exe\
|
|
shell-test.exe \
|
|
slist-test.exe \
|
|
spawn-test.exe \
|
|
# strfunc-test doesn't compile with MSVC
|
|
# strfunc-test.exe\
|
|
string-test.exe \
|
|
thread-test.exe \
|
|
threadpool-test.exe\
|
|
tree-test.exe \
|
|
type-test.exe \
|
|
unicode-encoding.exe
|
|
|
|
all : $(TESTS)
|
|
|
|
makefile.msc: makefile.msc.in
|
|
$(SED) -e s,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@, \
|
|
-e s,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@, <makefile.msc.in >$@
|
|
|
|
.c.exe :
|
|
$(CC) $(CFLAGS) -c $<
|
|
$(CC) $(CFLAGS) -Fe$@ $< ..\glib-$(GLIB_VER).lib ..\gmodule\gmodule-$(GLIB_VER).lib ..\gthread\gthread-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console
|
|
|
|
check: all
|
|
for %p in ($(TESTS)) do %p
|