+2000-12-14 Tor Lillqvist <tml@iki.fi>
+
+ * giowin32.c (g_io_win32_dispatch): Warn if no callback. Call
+ callback correctly.
+ (g_io_win32_create_watch): Fix typo.
+ (g_io_win32_fd_create_watch): Ditto.
+ (g_io_channel_unix_new): If it is a file descriptor (i.e., a Unix
+ fd lookalike provided by the C library), call
+ g_io_channel_win32_new_fd(). If it is a socket (from WinSock),
+ call g_io_cahnnel_win32_new_stream_socket(). Hopefully sockets and
+ fds don't overlap. TODO: Implement also datagram sockets.
+ (g_io_channel_win32_poll): Call g_main_context_get_poll_func().
+
+ * gcompletion.h: Include <unistd.h> only on Unix. Is this
+ inclusion really needed here? OTOH, do include <stddef.h>, for
+ size_t.
+
+ * gmessages.c: (Win32) Don't define a function called "write" that
+ might clash with the prototype from <io.h>, use a #define.
+
+ * glib.def: Update.
+
+ * gmain.c (g_source_add_poll): Don't return a value from void
+ function.
+ (g_main_context_get_poll_func): Compile also for non-Win32, as
+ presumably was intended. The result var is a GPollFunc, not a
+ GPollFunc*. Return the result!
+
2000-12-13 Havoc Pennington <hp@redhat.com>
* gconvert.c (open_converter): make static
+2000-12-14 Tor Lillqvist <tml@iki.fi>
+
+ * giowin32.c (g_io_win32_dispatch): Warn if no callback. Call
+ callback correctly.
+ (g_io_win32_create_watch): Fix typo.
+ (g_io_win32_fd_create_watch): Ditto.
+ (g_io_channel_unix_new): If it is a file descriptor (i.e., a Unix
+ fd lookalike provided by the C library), call
+ g_io_channel_win32_new_fd(). If it is a socket (from WinSock),
+ call g_io_cahnnel_win32_new_stream_socket(). Hopefully sockets and
+ fds don't overlap. TODO: Implement also datagram sockets.
+ (g_io_channel_win32_poll): Call g_main_context_get_poll_func().
+
+ * gcompletion.h: Include <unistd.h> only on Unix. Is this
+ inclusion really needed here? OTOH, do include <stddef.h>, for
+ size_t.
+
+ * gmessages.c: (Win32) Don't define a function called "write" that
+ might clash with the prototype from <io.h>, use a #define.
+
+ * glib.def: Update.
+
+ * gmain.c (g_source_add_poll): Don't return a value from void
+ function.
+ (g_main_context_get_poll_func): Compile also for non-Win32, as
+ presumably was intended. The result var is a GPollFunc, not a
+ GPollFunc*. Return the result!
+
2000-12-13 Havoc Pennington <hp@redhat.com>
* gconvert.c (open_converter): make static
+2000-12-14 Tor Lillqvist <tml@iki.fi>
+
+ * giowin32.c (g_io_win32_dispatch): Warn if no callback. Call
+ callback correctly.
+ (g_io_win32_create_watch): Fix typo.
+ (g_io_win32_fd_create_watch): Ditto.
+ (g_io_channel_unix_new): If it is a file descriptor (i.e., a Unix
+ fd lookalike provided by the C library), call
+ g_io_channel_win32_new_fd(). If it is a socket (from WinSock),
+ call g_io_cahnnel_win32_new_stream_socket(). Hopefully sockets and
+ fds don't overlap. TODO: Implement also datagram sockets.
+ (g_io_channel_win32_poll): Call g_main_context_get_poll_func().
+
+ * gcompletion.h: Include <unistd.h> only on Unix. Is this
+ inclusion really needed here? OTOH, do include <stddef.h>, for
+ size_t.
+
+ * gmessages.c: (Win32) Don't define a function called "write" that
+ might clash with the prototype from <io.h>, use a #define.
+
+ * glib.def: Update.
+
+ * gmain.c (g_source_add_poll): Don't return a value from void
+ function.
+ (g_main_context_get_poll_func): Compile also for non-Win32, as
+ presumably was intended. The result var is a GPollFunc, not a
+ GPollFunc*. Return the result!
+
2000-12-13 Havoc Pennington <hp@redhat.com>
* gconvert.c (open_converter): make static
+2000-12-14 Tor Lillqvist <tml@iki.fi>
+
+ * giowin32.c (g_io_win32_dispatch): Warn if no callback. Call
+ callback correctly.
+ (g_io_win32_create_watch): Fix typo.
+ (g_io_win32_fd_create_watch): Ditto.
+ (g_io_channel_unix_new): If it is a file descriptor (i.e., a Unix
+ fd lookalike provided by the C library), call
+ g_io_channel_win32_new_fd(). If it is a socket (from WinSock),
+ call g_io_cahnnel_win32_new_stream_socket(). Hopefully sockets and
+ fds don't overlap. TODO: Implement also datagram sockets.
+ (g_io_channel_win32_poll): Call g_main_context_get_poll_func().
+
+ * gcompletion.h: Include <unistd.h> only on Unix. Is this
+ inclusion really needed here? OTOH, do include <stddef.h>, for
+ size_t.
+
+ * gmessages.c: (Win32) Don't define a function called "write" that
+ might clash with the prototype from <io.h>, use a #define.
+
+ * glib.def: Update.
+
+ * gmain.c (g_source_add_poll): Don't return a value from void
+ function.
+ (g_main_context_get_poll_func): Compile also for non-Win32, as
+ presumably was intended. The result var is a GPollFunc, not a
+ GPollFunc*. Return the result!
+
2000-12-13 Havoc Pennington <hp@redhat.com>
* gconvert.c (open_converter): make static
+2000-12-14 Tor Lillqvist <tml@iki.fi>
+
+ * giowin32.c (g_io_win32_dispatch): Warn if no callback. Call
+ callback correctly.
+ (g_io_win32_create_watch): Fix typo.
+ (g_io_win32_fd_create_watch): Ditto.
+ (g_io_channel_unix_new): If it is a file descriptor (i.e., a Unix
+ fd lookalike provided by the C library), call
+ g_io_channel_win32_new_fd(). If it is a socket (from WinSock),
+ call g_io_cahnnel_win32_new_stream_socket(). Hopefully sockets and
+ fds don't overlap. TODO: Implement also datagram sockets.
+ (g_io_channel_win32_poll): Call g_main_context_get_poll_func().
+
+ * gcompletion.h: Include <unistd.h> only on Unix. Is this
+ inclusion really needed here? OTOH, do include <stddef.h>, for
+ size_t.
+
+ * gmessages.c: (Win32) Don't define a function called "write" that
+ might clash with the prototype from <io.h>, use a #define.
+
+ * glib.def: Update.
+
+ * gmain.c (g_source_add_poll): Don't return a value from void
+ function.
+ (g_main_context_get_poll_func): Compile also for non-Win32, as
+ presumably was intended. The result var is a GPollFunc, not a
+ GPollFunc*. Return the result!
+
2000-12-13 Havoc Pennington <hp@redhat.com>
* gconvert.c (open_converter): make static
+2000-12-14 Tor Lillqvist <tml@iki.fi>
+
+ * giowin32.c (g_io_win32_dispatch): Warn if no callback. Call
+ callback correctly.
+ (g_io_win32_create_watch): Fix typo.
+ (g_io_win32_fd_create_watch): Ditto.
+ (g_io_channel_unix_new): If it is a file descriptor (i.e., a Unix
+ fd lookalike provided by the C library), call
+ g_io_channel_win32_new_fd(). If it is a socket (from WinSock),
+ call g_io_cahnnel_win32_new_stream_socket(). Hopefully sockets and
+ fds don't overlap. TODO: Implement also datagram sockets.
+ (g_io_channel_win32_poll): Call g_main_context_get_poll_func().
+
+ * gcompletion.h: Include <unistd.h> only on Unix. Is this
+ inclusion really needed here? OTOH, do include <stddef.h>, for
+ size_t.
+
+ * gmessages.c: (Win32) Don't define a function called "write" that
+ might clash with the prototype from <io.h>, use a #define.
+
+ * glib.def: Update.
+
+ * gmain.c (g_source_add_poll): Don't return a value from void
+ function.
+ (g_main_context_get_poll_func): Compile also for non-Win32, as
+ presumably was intended. The result var is a GPollFunc, not a
+ GPollFunc*. Return the result!
+
2000-12-13 Havoc Pennington <hp@redhat.com>
* gconvert.c (open_converter): make static
+2000-12-14 Tor Lillqvist <tml@iki.fi>
+
+ * giowin32.c (g_io_win32_dispatch): Warn if no callback. Call
+ callback correctly.
+ (g_io_win32_create_watch): Fix typo.
+ (g_io_win32_fd_create_watch): Ditto.
+ (g_io_channel_unix_new): If it is a file descriptor (i.e., a Unix
+ fd lookalike provided by the C library), call
+ g_io_channel_win32_new_fd(). If it is a socket (from WinSock),
+ call g_io_cahnnel_win32_new_stream_socket(). Hopefully sockets and
+ fds don't overlap. TODO: Implement also datagram sockets.
+ (g_io_channel_win32_poll): Call g_main_context_get_poll_func().
+
+ * gcompletion.h: Include <unistd.h> only on Unix. Is this
+ inclusion really needed here? OTOH, do include <stddef.h>, for
+ size_t.
+
+ * gmessages.c: (Win32) Don't define a function called "write" that
+ might clash with the prototype from <io.h>, use a #define.
+
+ * glib.def: Update.
+
+ * gmain.c (g_source_add_poll): Don't return a value from void
+ function.
+ (g_main_context_get_poll_func): Compile also for non-Win32, as
+ presumably was intended. The result var is a GPollFunc, not a
+ GPollFunc*. Return the result!
+
2000-12-13 Havoc Pennington <hp@redhat.com>
* gconvert.c (open_converter): make static
+2000-12-14 Tor Lillqvist <tml@iki.fi>
+
+ * giowin32.c (g_io_win32_dispatch): Warn if no callback. Call
+ callback correctly.
+ (g_io_win32_create_watch): Fix typo.
+ (g_io_win32_fd_create_watch): Ditto.
+ (g_io_channel_unix_new): If it is a file descriptor (i.e., a Unix
+ fd lookalike provided by the C library), call
+ g_io_channel_win32_new_fd(). If it is a socket (from WinSock),
+ call g_io_cahnnel_win32_new_stream_socket(). Hopefully sockets and
+ fds don't overlap. TODO: Implement also datagram sockets.
+ (g_io_channel_win32_poll): Call g_main_context_get_poll_func().
+
+ * gcompletion.h: Include <unistd.h> only on Unix. Is this
+ inclusion really needed here? OTOH, do include <stddef.h>, for
+ size_t.
+
+ * gmessages.c: (Win32) Don't define a function called "write" that
+ might clash with the prototype from <io.h>, use a #define.
+
+ * glib.def: Update.
+
+ * gmain.c (g_source_add_poll): Don't return a value from void
+ function.
+ (g_main_context_get_poll_func): Compile also for non-Win32, as
+ presumably was intended. The result var is a GPollFunc, not a
+ GPollFunc*. Return the result!
+
2000-12-13 Havoc Pennington <hp@redhat.com>
* gconvert.c (open_converter): make static
#define __G_COMPLETION_H__
#include <glist.h>
+#include <stddef.h> /* For size_t */
+#ifdef G_OS_UNIX
#include <unistd.h>
+#endif
G_BEGIN_DECLS
GSourceFunc callback,
gpointer user_data)
{
+ GIOFunc func = (GIOFunc)callback;
GIOWin32Watch *watch = (GIOWin32Watch *)source;
- return (*callback) (watch->channel,
- watch->pollfd.revents & watch->condition,
- user_data);
+ if (!func)
+ {
+ g_warning ("GIOWin32Watch dispatched without callback\n"
+ "You must call g_source_connect().");
+ return FALSE;
+ }
+
+ return (*func) (watch->channel,
+ watch->pollfd.revents & watch->condition,
+ user_data);
}
static void
static GSource *
g_io_win32_create_watch (GIOChannel *channel,
GIOCondition condition,
- int (*reader) (int, guchar *, int)))
+ int (*reader) (int, guchar *, int))
{
GIOWin32Channel *win32_channel = (GIOWin32Channel *) channel;
GIOWin32Watch *watch;
g_io_win32_sock_create_watch (GIOChannel *channel,
GIOCondition condition)
{
- return g_io_win32_add_watch (channel, condition, sock_reader);
+ return g_io_win32_create_watch (channel, condition, sock_reader);
}
static GIOFuncs win32_channel_msg_funcs = {
GIOChannel *
g_io_channel_unix_new (gint fd)
{
- return g_io_channel_win32_new_fd (fd);
+ struct stat st;
+
+ if (fstat (fd, &st) == 0)
+ return g_io_channel_win32_new_fd (fd);
+
+ if (getsockopt (fd, SOL_SOCKET, SO_TYPE, NULL, NULL) != SO_ERROR)
+ return g_io_channel_win32_new_stream_socket(fd);
+
+ g_warning ("%d isn't a file descriptor or a socket", fd);
+ return NULL;
}
gint
g_return_val_if_fail (n_fds >= 0, 0);
- result = (*g_main_win32_get_poll_func ()) (fds, n_fds, timeout);
+ result = (*g_main_context_get_poll_func (NULL)) (fds, n_fds, timeout);
return result;
}
g_idle_add
g_idle_add_full
g_idle_remove_by_data
+ g_idle_source_new
g_int_equal
g_int_hash
g_io_add_watch
g_log_set_fatal_mask
g_log_set_handler
g_logv
- g_main_add_poll
- g_main_destroy
- g_main_is_running
- g_main_iteration
- g_main_new
- g_main_pending
- g_main_quit
- g_main_remove_poll
- g_main_run
- g_main_set_poll_func
- g_main_win32_get_poll_func
+ g_main_context_add_poll
+ g_main_context_check
+ g_main_context_default
+ g_main_context_dispatch
+ g_main_context_find_source_by_funcs_user_data
+ g_main_context_find_source_by_id
+ g_main_context_find_source_by_user_data
+ g_main_context_get
+ g_main_context_get_poll_func
+ g_main_context_iteration
+ g_main_context_pending
+ g_main_context_prepare
+ g_main_context_query
+ g_main_context_remove_poll
+ g_main_context_set_poll_func
+ g_main_loop_destroy
+ g_main_loop_is_running
+ g_main_loop_new
+ g_main_loop_quit
+ g_main_loop_run
g_malloc
g_malloc0
g_markup_error_quark
g_slist_sort
g_slist_sort_with_data
g_snprintf
- g_source_add
+ g_source_add_poll
+ g_source_attach
+ g_source_destroy
+ g_source_get_can_recurse
+ g_source_get_context
+ g_source_get_current_time
+ g_source_get_id
+ g_source_get_priority
+ g_source_new
+ g_source_ref
g_source_remove
- g_source_remove_by_source_data
+ g_source_remove_by_funcs_user_data
g_source_remove_by_user_data
+ g_source_set_callback
+ g_source_set_callback_indirect
+ g_source_set_can_recurse
+ g_source_set_priority
+ g_source_unref
g_spaced_primes_closest
g_spawn_async
g_spawn_async_with_pipes
g_strdelimit
g_strdown
g_strdup
+ g_strdupv
g_strdup_printf
g_strdup_vprintf
g_strerror
g_threads_got_initialized
g_timeout_add
g_timeout_add_full
+ g_timeout_source_new
g_timer_destroy
g_timer_elapsed
g_timer_new
#define __G_COMPLETION_H__
#include <glist.h>
+#include <stddef.h> /* For size_t */
+#ifdef G_OS_UNIX
#include <unistd.h>
+#endif
G_BEGIN_DECLS
GSourceFunc callback,
gpointer user_data)
{
+ GIOFunc func = (GIOFunc)callback;
GIOWin32Watch *watch = (GIOWin32Watch *)source;
- return (*callback) (watch->channel,
- watch->pollfd.revents & watch->condition,
- user_data);
+ if (!func)
+ {
+ g_warning ("GIOWin32Watch dispatched without callback\n"
+ "You must call g_source_connect().");
+ return FALSE;
+ }
+
+ return (*func) (watch->channel,
+ watch->pollfd.revents & watch->condition,
+ user_data);
}
static void
static GSource *
g_io_win32_create_watch (GIOChannel *channel,
GIOCondition condition,
- int (*reader) (int, guchar *, int)))
+ int (*reader) (int, guchar *, int))
{
GIOWin32Channel *win32_channel = (GIOWin32Channel *) channel;
GIOWin32Watch *watch;
g_io_win32_sock_create_watch (GIOChannel *channel,
GIOCondition condition)
{
- return g_io_win32_add_watch (channel, condition, sock_reader);
+ return g_io_win32_create_watch (channel, condition, sock_reader);
}
static GIOFuncs win32_channel_msg_funcs = {
GIOChannel *
g_io_channel_unix_new (gint fd)
{
- return g_io_channel_win32_new_fd (fd);
+ struct stat st;
+
+ if (fstat (fd, &st) == 0)
+ return g_io_channel_win32_new_fd (fd);
+
+ if (getsockopt (fd, SOL_SOCKET, SO_TYPE, NULL, NULL) != SO_ERROR)
+ return g_io_channel_win32_new_stream_socket(fd);
+
+ g_warning ("%d isn't a file descriptor or a socket", fd);
+ return NULL;
}
gint
g_return_val_if_fail (n_fds >= 0, 0);
- result = (*g_main_win32_get_poll_func ()) (fds, n_fds, timeout);
+ result = (*g_main_context_get_poll_func (NULL)) (fds, n_fds, timeout);
return result;
}
g_idle_add
g_idle_add_full
g_idle_remove_by_data
+ g_idle_source_new
g_int_equal
g_int_hash
g_io_add_watch
g_log_set_fatal_mask
g_log_set_handler
g_logv
- g_main_add_poll
- g_main_destroy
- g_main_is_running
- g_main_iteration
- g_main_new
- g_main_pending
- g_main_quit
- g_main_remove_poll
- g_main_run
- g_main_set_poll_func
- g_main_win32_get_poll_func
+ g_main_context_add_poll
+ g_main_context_check
+ g_main_context_default
+ g_main_context_dispatch
+ g_main_context_find_source_by_funcs_user_data
+ g_main_context_find_source_by_id
+ g_main_context_find_source_by_user_data
+ g_main_context_get
+ g_main_context_get_poll_func
+ g_main_context_iteration
+ g_main_context_pending
+ g_main_context_prepare
+ g_main_context_query
+ g_main_context_remove_poll
+ g_main_context_set_poll_func
+ g_main_loop_destroy
+ g_main_loop_is_running
+ g_main_loop_new
+ g_main_loop_quit
+ g_main_loop_run
g_malloc
g_malloc0
g_markup_error_quark
g_slist_sort
g_slist_sort_with_data
g_snprintf
- g_source_add
+ g_source_add_poll
+ g_source_attach
+ g_source_destroy
+ g_source_get_can_recurse
+ g_source_get_context
+ g_source_get_current_time
+ g_source_get_id
+ g_source_get_priority
+ g_source_new
+ g_source_ref
g_source_remove
- g_source_remove_by_source_data
+ g_source_remove_by_funcs_user_data
g_source_remove_by_user_data
+ g_source_set_callback
+ g_source_set_callback_indirect
+ g_source_set_can_recurse
+ g_source_set_priority
+ g_source_unref
g_spaced_primes_closest
g_spawn_async
g_spawn_async_with_pipes
g_strdelimit
g_strdown
g_strdup
+ g_strdupv
g_strdup_printf
g_strdup_vprintf
g_strerror
g_threads_got_initialized
g_timeout_add
g_timeout_add_full
+ g_timeout_source_new
g_timer_destroy
g_timer_elapsed
g_timer_new
g_return_if_fail (source != NULL);
g_return_if_fail (fd != NULL);
- g_return_val_if_fail (!SOURCE_DESTROYED (source), 0);
+ g_return_if_fail (!SOURCE_DESTROYED (source));
context = source->context;
UNLOCK_CONTEXT (context);
}
-#ifdef G_OS_WIN32
-
/**
* g_main_context_get_poll_func:
* @context: a #GMainContext
GPollFunc
g_main_context_get_poll_func (GMainContext *context)
{
- GPollFunc *result;
+ GPollFunc result;
if (!context)
context = g_main_context_default ();
LOCK_CONTEXT (context);
result = context->poll_func;
UNLOCK_CONTEXT (context);
-}
-#endif
+ return result;
+}
/* HOLDS: context's lock */
/* Wake the main loop up from a poll() */
#ifndef G_OS_WIN32
write (context->wake_up_pipe[1], "A", 1);
#else
- ReleaseSemaphore (context->context->wake_up_semaphore, 1, NULL);
+ ReleaseSemaphore (context->wake_up_semaphore, 1, NULL);
#endif
}
#endif
/* Just use stdio. If we're out of memory, we're hosed anyway. */
#undef write
static inline int
-write (FILE *fd,
- const char *buf,
- int len)
+dowrite (FILE *fd,
+ const void *buf,
+ unsigned int len)
{
fwrite (buf, len, 1, fd);
fflush (fd);
return len;
}
+
+#define write(fd, buf, len) dowrite(fd, buf, len)
+
static void
ensure_stdout_valid (void)
{
g_return_if_fail (source != NULL);
g_return_if_fail (fd != NULL);
- g_return_val_if_fail (!SOURCE_DESTROYED (source), 0);
+ g_return_if_fail (!SOURCE_DESTROYED (source));
context = source->context;
UNLOCK_CONTEXT (context);
}
-#ifdef G_OS_WIN32
-
/**
* g_main_context_get_poll_func:
* @context: a #GMainContext
GPollFunc
g_main_context_get_poll_func (GMainContext *context)
{
- GPollFunc *result;
+ GPollFunc result;
if (!context)
context = g_main_context_default ();
LOCK_CONTEXT (context);
result = context->poll_func;
UNLOCK_CONTEXT (context);
-}
-#endif
+ return result;
+}
/* HOLDS: context's lock */
/* Wake the main loop up from a poll() */
#ifndef G_OS_WIN32
write (context->wake_up_pipe[1], "A", 1);
#else
- ReleaseSemaphore (context->context->wake_up_semaphore, 1, NULL);
+ ReleaseSemaphore (context->wake_up_semaphore, 1, NULL);
#endif
}
#endif
/* Just use stdio. If we're out of memory, we're hosed anyway. */
#undef write
static inline int
-write (FILE *fd,
- const char *buf,
- int len)
+dowrite (FILE *fd,
+ const void *buf,
+ unsigned int len)
{
fwrite (buf, len, 1, fd);
fflush (fd);
return len;
}
+
+#define write(fd, buf, len) dowrite(fd, buf, len)
+
static void
ensure_stdout_valid (void)
{
+2000-12-14 Tor Lillqvist <tml@iki.fi>
+
+ * makefile.mingw.in: Update, include parts from Makefile.am to
+ build gmarshal.[ch]. Some day, we won't need these separate
+ makefiles for Win32 compilation. I hope.
+
+ * makefile.msc.in: Update. No use trying to build gmarshal.[ch]
+ here, it would require Unixish tools. MSVC users building from CVS
+ sources are out of luck.
+
+ * gobject.def: Update.
+
Wed Dec 13 09:31:26 2000 Tim Janik <timj@gtk.org>
* gparamspecs.[hc]: add G_TYPE_PARAM_BOXED implementation.
g_flags_get_value_by_name
g_flags_get_value_by_nick
g_flags_register_static
- g_object_class_find_param_spec
- g_object_class_install_param
g_object_get
g_object_get_data
- g_object_get_param
g_object_get_qdata
g_object_get_valist
g_object_new
g_object_new_valist
- g_object_queue_param_changed
g_object_ref
g_object_set
g_object_set_data
g_object_set_data_full
- g_object_set_param
g_object_set_qdata
g_object_set_qdata_full
g_object_set_valist
g_param_value_validate
g_param_values_cmp
g_signal_connect_closure_by_id
+ g_signal_connect_object
g_signal_emitv
g_signal_handler_block
g_signal_handler_disconnect
g_signal_handlers_unblock_matched
g_signal_lookup
g_signal_name
+ g_signal_new
g_signal_newv
g_signal_query
g_signal_stop_emission
- g_signal_type_closure_new
g_type_add_interface_dynamic
g_type_add_interface_static
g_type_check_class_cast
g_type_class_peek_parent
g_type_class_ref
g_type_class_unref
- g_type_conforms_to
g_type_create_instance
g_type_free_instance
g_type_from_name
g_type_get_plugin
g_type_get_qdata
g_type_init
- g_type_instance_conforms_to
g_type_interface_peek
g_type_interfaces
g_type_is_a
INCLUDES = -I .. -I .
DEFINES = -DHAVE_CONFIG_H -DGOBJECT_COMPILATION -DG_LOG_DOMAIN=g_log_domain_gruntime
+srcdir=.
+
BUILD_DLL = ../build-dll
all : \
makefile.mingw: makefile.mingw.in
sed -e 's,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@,' \
- -e 's,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@,' <$< >$@
+ -e 's,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@,' \
+ -e 's,@RE[B]UILD@,,' <$< >$@
gobject_OBJECTS = \
gboxed.o \
$(BUILD_DLL) gobject $(GLIB_VER) gobject.def $(gobject_OBJECTS) -L .. -lglib-$(GLIB_VER)
glib-genmarshal.exe : glib-genmarshal.c
- $(CC) -o $@ $(CFLAGS) -UGOBJECT_COMPILATION -DG_LOG_DOMAIN=\"glib-genmarshal\" $< -L .. -lglib-$(GLIB_VER) -L . -lgobject-$(GLIB_VER)
+ $(CC) -o $@ $(CFLAGS) -UGOBJECT_COMPILATION $< -L .. -lglib-$(GLIB_VER) -L . -lgobject-$(GLIB_VER)
+
+# Copied from Makefile.am:
+# initial creation of the real stamp-* files
+gmarshal.h: # never add deps here
+ test -f "$(srcdir)/$@" || touch $(srcdir)/$@
+# normal autogeneration rules
+# all autogenerated files need to be generated in the srcdir,
+# so old versions get remade and are not confused with newer
+# versions in the build dir. thus a development setup requires
+# srcdir to be writable, passing --disable-rebuilds to
+# ../configure will supress all autogeneration rules.
+$(srcdir)/stamp-gmarshal.h: @REBUILD@ gmarshal.list gmarshal.h glib-genmarshal.exe
+ echo "#ifndef __G_MARSHAL_H__" > xgen-gmh \
+ && echo "#define __G_MARSHAL_H__" >> xgen-gmh \
+ && ./glib-genmarshal --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --header >> xgen-gmh \
+ && echo "#endif /* __G_MARSHAL_H__ */" >> xgen-gmh \
+ && (cmp -s xgen-gmh $(srcdir)/gmarshal.h || cp xgen-gmh $(srcdir)/gmarshal.h) \
+ && rm -f xgen-gmh xgen-gmh~ \
+ && echo timestamp > $@
+$(srcdir)/gmarshal.c: @REBUILD@ $(srcdir)/stamp-gmarshal.h
+ ./glib-genmarshal --nostdinc --prefix=g_cclosure_marshal $(srcdir)/gmarshal.list --body >> xgen-gmc \
+ && cp xgen-gmc $(srcdir)/gmarshal.c \
+ && rm -f xgen-gmc xgen-gmc~
+$(srcdir)/gmarshal.strings: @REBUILD@ $(srcdir)/gmarshal.list
+ grep '^[A-Z]' $(srcdir)/gmarshal.list \
+ | sed -e 's/^/"g_cclosure_marshal_/' -e 's/:/__/' -e 's/,/_/g' -e 's/$$/",/' > xgen-gms \
+ && cp xgen-gms $(srcdir)/gmarshal.strings \
+ && rm -f xgen-gms xgen-gms~
+glib-genmarshal.o: gmarshal.strings
gbsearcharray.obj \
gclosure.obj \
genums.obj \
+ gmarshal.obj \
gobject.obj \
gparam.obj \
gparamspecs.obj \
$(CC) $(CFLAGS) -LD -Fegobject-$(GLIB_VER).dll $(gobject_OBJECTS) ..\glib-$(GLIB_VER).lib $(LDFLAGS) /def:gobject.def
glib-genmarshal.exe : glib-genmarshal.c
- $(CC) -Fe$@ $(CFLAGS) -UGOBJECT_COMPILATION -DG_LOG_DOMAIN=\"glib-genmarshal\" glib-genmarshal.c ..\glib-$(GLIB_VER).lib gobject-$(GLIB_VER).lib
+ $(CC) -Fe$@ $(CFLAGS) -UGOBJECT_COMPILATION glib-genmarshal.c ..\glib-$(GLIB_VER).lib gobject-$(GLIB_VER).lib