summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTor Lillqvist <tml@src.gnome.org>1999-04-24 13:52:51 +0000
committerTor Lillqvist <tml@src.gnome.org>1999-04-24 13:52:51 +0000
commit2aa1277d60f63d283a955d40cc681f1d30a067e8 (patch)
tree536d4653239139bc39cc6dff0505f13297ab5e35 /tests
parent0269749a67899057d1e861d9b0beebd8e84ae067 (diff)
downloadglib-2aa1277d60f63d283a955d40cc681f1d30a067e8.tar.gz
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/makefile.cygwin50
-rw-r--r--tests/makefile.msc3
-rw-r--r--tests/string-test.c4
-rw-r--r--tests/testglib.c4
4 files changed, 55 insertions, 6 deletions
diff --git a/tests/makefile.cygwin b/tests/makefile.cygwin
new file mode 100644
index 000000000..62c4b290c
--- /dev/null
+++ b/tests/makefile.cygwin
@@ -0,0 +1,50 @@
+## Makefile for building the GLib test programs with egcs on cygwin.
+## Use: make -f makefile.cygwin check
+
+################################################################
+
+# Nothing much configurable below
+
+# cl -? described the options
+CC = gcc -mno-cygwin -mpentium
+
+# No general LDFLAGS needes
+LDFLAGS = /link
+
+GLIB_VER = 1.3
+
+CFLAGS = -I.. -DHAVE_CONFIG_H
+
+TESTS = \
+ array-test.exe \
+ date-test.exe \
+ dirname-test.exe\
+ hash-test.exe \
+ list-test.exe \
+ node-test.exe \
+ queue-test.exe \
+ rand-test.exe \
+ relation-test.exe\
+ slist-test.exe \
+ stack-test.exe \
+ string-test.exe \
+ strfunc-test.exe\
+ tree-test.exe \
+ type-test.exe
+
+all : $(TESTS)
+
+.SUFFIXES: .c .exe
+
+.c.exe :
+ $(CC) $(CFLAGS) -c $<
+ $(CC) $(CFLAGS) -o $@ $< -L.. -lglib-$(GLIB_VER) -lmsvcrt
+
+check: all
+ @for P in $(TESTS) ; do echo $$P; ./$$P; done
+
+clean:
+ rm *.exe
+ rm *.o
+ rm *.dll
+ rm *.exp
diff --git a/tests/makefile.msc b/tests/makefile.msc
index 56a9210de..ff484e10e 100644
--- a/tests/makefile.msc
+++ b/tests/makefile.msc
@@ -1,5 +1,5 @@
## Makefile for building the GLib test programs with Microsoft C
-## Use: nmake -f makefile.msc all
+## Use: nmake -f makefile.msc check
################################################################
@@ -10,7 +10,6 @@ CC = cl -G5 -GF -Ox -W3 -MD -nologo
# No general LDFLAGS needes
LDFLAGS = /link
-INSTALL = copy
GLIB_VER = 1.3
diff --git a/tests/string-test.c b/tests/string-test.c
index bc5b7dbca..b2c7c1d1e 100644
--- a/tests/string-test.c
+++ b/tests/string-test.c
@@ -103,8 +103,8 @@ main (int argc,
g_assert((strlen("hi pete!") + 10000) == string1->len);
g_assert((strlen("hi pete!") + 10000) == strlen(string1->str));
-#if !(defined (_MSC_VER) || defined (__LCC__))
- /* MSVC and LCC use the same run-time C library, which doesn't like
+#ifndef NATIVE_WIN32
+ /* MSVC and mingw32 use the same run-time C library, which doesn't like
the %10000.10000f format... */
g_string_sprintf (string2, "%s|%0100d|%s|%s|%0*d|%*.*f|%10000.10000f",
"this pete guy sure is a wuss, like he's the number ",
diff --git a/tests/testglib.c b/tests/testglib.c
index 843b49ede..54d621406 100644
--- a/tests/testglib.c
+++ b/tests/testglib.c
@@ -699,8 +699,8 @@ main (int argc,
for (i = 0; i < 10000; i++)
g_string_append_c (string1, 'a'+(i%26));
-#if !(defined (_MSC_VER) || defined (__LCC__))
- /* MSVC and LCC use the same run-time C library, which doesn't like
+#ifndef NATIVE_WIN32
+ /* MSVC, mingw32 and LCC use the same run-time C library, which doesn't like
the %10000.10000f format... */
g_string_sprintf (string2, "%s|%0100d|%s|%s|%0*d|%*.*f|%10000.10000f",
"this pete guy sure is a wuss, like he's the number ",