summaryrefslogtreecommitdiff
path: root/glib
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2000-05-13 19:30:58 +0000
committerTor Lillqvist <tml@src.gnome.org>2000-05-13 19:30:58 +0000
commit77866eaf9bff4e40223e326e99c40d0077a935b5 (patch)
treed8c774d845d50086c532770756c9fb317b2d9790 /glib
parentc74c6c91a6e0424d00ac0b71992555ce4f461117 (diff)
downloadglib-77866eaf9bff4e40223e326e99c40d0077a935b5.tar.gz
makefile.mingw.in tests/makefile.mingw.in Rename makefile.cygwin(.in) to
2000-05-13 Tor Lillqvist <tml@iki.fi> * makefile.mingw.in * tests/makefile.mingw.in * build-dll: Rename makefile.cygwin(.in) to makefile.mingw(.in), which better describes what it is. Move the build of gmodule, gthread and gobject DLLs to makefiles in those directories. Move resource file handling and build number bump to build-dll, where it sits much cleaner. * README.win32 * Makefile.am (EXTRA_DIST): Update accordingly. * glib.h: Add G_PI, G_PI_2, G_PI_4, G_E, G_LN2, G_LN10 and G_SQRT2. M_PI etc aren't necessarily in <math.h> in strict ISO C implementations. * glib.def: Add g_strcanon. * gtree.c (g_tree_node_rotate_left): Remove unused variables. * gwin32.c (g_win32_opendir): Remove unneeded statement. gmodule: * makefile.mingw.in: New file, with gmodule stuff moved from ../makefile.mingw.in. * Makefile.am: Add to EXTRA_DIST, and add rule to make makefile.mingw. gobject: * makefile.mingw.in * gobject.def * gobject.rc.in: New files, for Win32 (mingw) build. * Makefile.am: Add to EXTRA_DIST. Add rules to produce the corresponding non-*.in files. * gtype.h: (Win32:) Mark _g_type_fundamental_last for export/import from DLL. gthread: * makefile.mingw.in: New file, with gthread stuff moved from ../makefile.mingw.in. * Makefile.am: Add to EXTRA_DIST, add rule to build makefile.mingw.
Diffstat (limited to 'glib')
-rw-r--r--glib/Makefile.am6
-rw-r--r--glib/glib.def1
-rw-r--r--glib/glib.h11
-rw-r--r--glib/gtree.c2
-rw-r--r--glib/gwin32.c1
-rw-r--r--glib/makefile.mingw.in120
6 files changed, 135 insertions, 6 deletions
diff --git a/glib/Makefile.am b/glib/Makefile.am
index f66c3a25a..b3c4d7970 100644
--- a/glib/Makefile.am
+++ b/glib/Makefile.am
@@ -19,8 +19,8 @@ EXTRA_DIST = \
glib.def \
makefile.msc \
makefile.msc.in \
- makefile.cygwin \
- makefile.cygwin.in \
+ makefile.mingw \
+ makefile.mingw.in \
giowin32.c \
glibconfig.h.win32 \
glibconfig.h.win32.in \
@@ -107,7 +107,7 @@ config.h.win32: $(top_builddir)/config.status $(top_srcdir)/config.h.win32.in
makefile.msc: $(top_builddir)/config.status $(top_srcdir)/makefile.msc.in
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-makefile.cygwin: $(top_builddir)/config.status $(top_srcdir)/makefile.cygwin.in
+makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/makefile.mingw.in
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
glib.rc: $(top_builddir)/config.status $(top_srcdir)/glib.rc.in
diff --git a/glib/glib.def b/glib/glib.def
index 20f83b759..c7ea6ffe9 100644
--- a/glib/glib.def
+++ b/glib/glib.def
@@ -370,6 +370,7 @@ EXPORTS
g_static_rw_lock_writer_unlock
g_str_equal
g_str_hash
+ g_strcanon
g_strcasecmp
g_strchomp
g_strchug
diff --git a/glib/glib.h b/glib/glib.h
index b05f2bf8f..23aa72cc3 100644
--- a/glib/glib.h
+++ b/glib/glib.h
@@ -74,6 +74,17 @@
*/
#include <glibconfig.h>
+/* Define some mathematical constants that aren't available
+ * symbolically in some strict ISO C implementations.
+ */
+#define G_E 2.7182818284590452354E0
+#define G_LN2 6.9314718055994530942E-1
+#define G_LN10 2.3025850929940456840E0
+#define G_PI 3.14159265358979323846E0
+#define G_PI_2 1.57079632679489661923E0
+#define G_PI_4 0.78539816339744830962E0
+#define G_SQRT2 1.4142135623730950488E0
+
/* include varargs functions for assertment macros
*/
#include <stdarg.h>
diff --git a/glib/gtree.c b/glib/gtree.c
index 1f29951b0..fa40b77e2 100644
--- a/glib/gtree.c
+++ b/glib/gtree.c
@@ -657,12 +657,10 @@ g_tree_node_height (GTreeNode *node)
static GTreeNode*
g_tree_node_rotate_left (GTreeNode *node)
{
- GTreeNode *left;
GTreeNode *right;
gint a_bal;
gint b_bal;
- left = node->left;
right = node->right;
node->right = right->left;
diff --git a/glib/gwin32.c b/glib/gwin32.c
index bd4ae6554..b5e2d8007 100644
--- a/glib/gwin32.c
+++ b/glib/gwin32.c
@@ -101,7 +101,6 @@ g_win32_opendir (const char *dirname)
if (k && result->dir_name[k - 1] == '\\')
{
result->dir_name[k - 1] = '\0';
- k--;
}
mask = g_strdup_printf ("%s\\*", result->dir_name);
diff --git a/glib/makefile.mingw.in b/glib/makefile.mingw.in
new file mode 100644
index 000000000..717478148
--- /dev/null
+++ b/glib/makefile.mingw.in
@@ -0,0 +1,120 @@
+## Makefile for building the GLib DLL with gcc for mingw. The build
+## uses tools running on cygwin, however.
+
+## Use: make -f makefile.mingw
+
+# Change this to wherever you want to install the DLLs. This directory
+# should be in your PATH.
+BIN = /bin
+
+GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
+
+TOP = ..
+
+include $(TOP)/build/win32/make.mingw
+
+################################################################
+
+# Nothing much configurable below
+
+INCLUDES = -I .
+DEFINES = -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib
+
+DLLS_TO_BUILD = \
+ glib-$(GLIB_VER).dll \
+ gmodule/gmodule-$(GLIB_VER).dll \
+ gthread/gthread-$(GLIB_VER).dll \
+ gobject/gobject-$(GLIB_VER).dll \
+
+
+all : \
+ config.h \
+ glibconfig.h \
+ $(DLLS_TO_BUILD) \
+ testglib.exe \
+ testgdate.exe \
+ testgdateparser.exe
+
+install : all
+ $(INSTALL) $(DLLS_TO_BUILD) $(BIN)
+
+glib_OBJECTS = \
+ garray.o \
+ gasyncqueue.o \
+ gcache.o \
+ gcompletion.o \
+ gdataset.o \
+ gdate.o \
+ gerror.o \
+ ghook.o \
+ ghash.o \
+ giochannel.o \
+ giowin32.o \
+ glist.o \
+ gmain.o \
+ gmem.o \
+ gmessages.o \
+ gnode.o \
+ gprimes.o \
+ gqueue.o \
+ grand.o \
+ gslist.o \
+ gthread.o \
+ gthreadpool.o \
+ gtimer.o \
+ gtree.o \
+ grel.o \
+ gstring.o \
+ gstrfuncs.o \
+ gscanner.o \
+ gutils.o \
+ gwin32.o
+
+glibconfig.h: glibconfig.h.win32
+ cp $< $@
+
+config.h: config.h.win32
+ cp $< $@
+
+makefile.mingw: makefile.mingw.in
+ sed -e 's,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@,' \
+ -e 's,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@,' <$< >$@
+
+################ glib
+
+glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
+ ./build-dll glib $(GLIB_VER) glib.def $(glib_OBJECTS) -luser32 -lwsock32
+
+################ subdirectories
+
+gmodule/gmodule-$(GLIB_VER).dll : glib-$(GLIB_VER).dll
+ cd gmodule && $(MAKE) -f makefile.mingw all
+
+gthread/gthread-$(GLIB_VER).dll : glib-$(GLIB_VER).dll
+ cd gthread && $(MAKE) -f makefile.mingw all
+
+gobject/gobject-$(GLIB_VER).dll : glib-$(GLIB_VER).dll
+ cd gobject && $(MAKE) -f makefile.mingw all
+
+################ test progs
+
+testglib.exe : glib-$(GLIB_VER).dll testglib.o
+ $(CC) $(CFLAGS) -o testglib testglib.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
+
+testgdate.exe : glib-$(GLIB_VER).dll testgdate.o
+ $(CC) $(CFLAGS) -o testgdate.exe testgdate.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
+
+testgdate.o : testgdate.c
+ $(CC) -c $(CFLAGS) testgdate.c
+
+testgdateparser.exe : glib-$(GLIB_VER).dll testgdateparser.o
+ $(CC) $(CFLAGS) -o testgdateparser.exe testgdateparser.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
+
+testgdateparser.o : testgdateparser.c
+ $(CC) -c $(CFLAGS) testgdateparser.c
+
+
+################ other stuff
+
+clean::
+ -rm config.h glibconfig.h gmodule/gmoduleconf.h