1. 14 Feb, 2003 1 commit
    • Sebastian Wilhelmi's avatar
      Fixes for #101264 and #99372: · 8e91cf9e
      Sebastian Wilhelmi authored
      
      2003-02-14  Sebastian Wilhelmi  <seppi@seppi.de>
      
      	Fixes for #101264 and #99372:
      
      	* glib/gconvert.h, glib/gmain.c, glib/gmem.c, glib/gmessages.c,
      	glib/grand.c: Include gthreadinit.h and rename the thread
      	initialization functions a bit and let them start with _, so that
      	later we can stop exporting them.
      
      	* glib/gmem.c, glib/gmessages.c: Move the g_private_new() calls to
      	new functions. They have to be called after setting
      	g_threads_got_initialized to TRUE (see #101264).
      
      	* glib/gthread.c: Include gthreadinit.h. Renamed g_mutex_init() to
      	g_thread_init_glib(). Call the thread initialization functions
      	(which are not allowed to call g_private_new), then set
      	g_threads_got_initialized to TRUE, then call the other thread
      	initialization functions (which must not call anything but
      	g_private_new()).
      
      	* glib/gthreadinit.h: New private header to cleanly declare all
      	thread initialization functions.
      
      	* gthread/gthread-impl.c: Include gthreadinit.h. In
      	g_thread_init() just call g_thread_init_glib(), which in turn calls the
      	other functions (see #99372).
      
      	* glib/Makefile.am: Added gthreadinit.h.
      8e91cf9e
  2. 01 Jan, 2003 3 commits
    • Tor Lillqvist's avatar
      Check the C stdout and stderr streams for validity, instead of what · 1377e3d1
      Tor Lillqvist authored
      2003-01-01  Tor Lillqvist  <tml@iki.fi>
      
      	* glib/gmessages.c (ensure_stdout_valid, ensure_stderr_valid):
      	Check the C stdout and stderr streams for validity, instead of
      	what GetStdHandle() returns.
      1377e3d1
    • Tor Lillqvist's avatar
      Move the alloc_console_called static flag inside these two functions. · ac17691a
      Tor Lillqvist authored
      2003-01-01  Tor Lillqvist  <tml@iki.fi>
      
      	* glib/gmessages.c (ensure_stderr_valid, ensure_stdout_valid): Move the
      	alloc_console_called static flag inside these two functions.
      ac17691a
    • Tor Lillqvist's avatar
      New function, parallel to ensure_stdout_valid(). #defined as empty on · 1b68ce70
      Tor Lillqvist authored
      2003-01-01  Tor Lillqvist  <tml@iki.fi>
      
      	* glib/gmessages.c (ensure_stderr_valid): New function, parallel
      	to ensure_stdout_valid(). #defined as empty on Unix.
      	(mklevel_prefix): Do use either stderr or stdout on Windows,
      	too. Otherwise g_warning() messages (that are just warnings, by
      	definition) will get mixed with proper stdout output. Noticed in
      	GIMP's gimpconfig-dump.
      	(strdup_convert, mklevel_prefix, g_printerr): Call
      	ensure_stderr_valid() before trying to use stderr.
      	(g_logv): [Win32] Convert message to current codepage before
      	display with MessageBox().
      1b68ce70
  3. 04 Dec, 2002 1 commit
  4. 21 Nov, 2002 1 commit
    • Matthias Clasen's avatar
      Include a printf implementation supporting C99 snprintf and SUS · bc54ea6e
      Matthias Clasen authored
      	positional parameters:  (#79488)
      
      	* glib/gstrfuncs.c:
      	* glib/gspawn-win32.c:
      	* glib/gscanner.c:
      	* glib/gconvert.c:
      	* glib/gbacktrace.c: Use _g_printf wrappers.
      
      	* glib/gutils.c (g_vsnprintf): Simplify, since we can assume C99
      	snprintf semantics now.
      
      	* glib/gmessages.c (printf_string_upper_bound): No longer needed,
      	since we can assume C99 snprintf semantics now.
      	(g_logv): Simplify.
      
      	* acinclude.m4 (AC_FUNC_PRINTF_UNIX98): New macro to check wether
      	printf supports SUS positional parameters.
      
      	* configure.in: New option --enable-included-printf to force
      	compilation of trio; otherwise trio is compiled if the system
      	printf misses either C99 snprintf semantics of SUS positional
      	parameters.
      
      	* glib/Makefile.am (SUBDIRS): Conditionally compile trio.
      	(libglib_2_0_la_SOURCES): Add gprintf.c and gprintfint.h.
      	(glibsubinclude_HEADERS): Add gprintf.h.
      
      	* glib/gprintfint.h: New private wrapping either system printf
      	or trio printf variants in _g_printf wrappers for use inside glib.
      
      	* glib/gprintf.h: New public header declaring g_printf variants.
      	* glib/gprintf.c: Corresponding implementations.
      
      	* glib/trio/*: New directory, containing the trio-1.9 sources.
      
      	* glib/tmpl/string_utils.sgml: Add note on including gprintf.h,
      	move some docs inline.
      
      	* glib/glib-sections.txt: Add g_printf, g_vprintf, g_fprintf,
      	g_vfprintf, g_sprintf, g_vsprintf.
      bc54ea6e
  5. 13 May, 2002 1 commit
    • Owen Taylor's avatar
      Update from libcharset CVS. Includes additional encodings for Solaris · 893b73e2
      Owen Taylor authored
      Mon May 13 11:42:23 2002  Owen Taylor  <otaylor@redhat.com>
      
            		* glib/libcharset/*: Update from libcharset CVS.
              Includes additional encodings for Solaris (#80396,
              Qingjiang Yuan)
      
              * configure.in: Add getc_unlocked to CHECK_FUNCS().
      
              * glib/gmessages.c (strdup_convert): If
              g_convert_with_fallback() fails, print the error
              message to stderr the first time, then return
              the original string. (#78197)
      893b73e2
  6. 28 Mar, 2002 2 commits
    • Owen Taylor's avatar
      Remove warning about g_print, etc, encoding. · 90d93042
      Owen Taylor authored
      Thu Mar 28 18:22:53 2002  Owen Taylor  <otaylor@redhat.com>
      
              * README: Remove warning about g_print, etc, encoding.
      
              * NEWS: Updates.
      
              * glib/gmessages.c (g_log_default_handler): Use %lu
              (plus a cast) when printing out pid_t arguments.
              (#76770, Morten Welinder)
      
              * glib/gstrfuncs.c (g_strdup_vprintf): Check the
              result of vasprintf(), return NULL on failure.
              (#76802, Akira Tagoh)
      
              * tests/testglib.c (TEST): Supress a warning with
              some GCC versions.
      90d93042
    • Tim Janik's avatar
      convert prtinf() strings to local charset when writing them to stdout or · f4040896
      Tim Janik authored
      Thu Mar 28 20:31:51 2002  Tim Janik  <timj@gtk.org>
      
              * glib/gmessages.c:
              (g_print):
              (g_printerr): convert prtinf() strings to local charset
              when writing them to stdout or stderr.
      f4040896
  7. 27 Mar, 2002 1 commit
    • Tim Janik's avatar
      major cleanups. introduced _g_log_fallback_handler() to handle recursive · f4d7817b
      Tim Janik authored
      Wed Mar 27 18:42:22 2002  Tim Janik  <timj@gtk.org>
      
              * gmessages.[hc]:
              major cleanups. introduced _g_log_fallback_handler() to handle
              recursive messages which really doesn't call any GLib functions.
              this allowes the default handler to use normal GLib functions and
              also fixes user supplied log level handlers.
              fixed locking issues, based on a patch from Sebastian Willhelmi,
              attached to #74356. translate log messages from UTF-8, based
              on the same patch. save fatal and recursion flags across flag
              loop. use new integer format code from above patch.
              move GLib functions out of locked mutex state to avoid deadlocks.
              move the level prefix and filedescriptor logic into mklevel_prefix().
              move _g_debug_init() into a place where we can figure and handle
              recursion.
      f4d7817b
  8. 14 Mar, 2002 1 commit
    • Sebastian Wilhelmi's avatar
      Fixed threading issues brought up by #74577. Make g_log_find_domain, · 148a8466
      Sebastian Wilhelmi authored
      
      2002-03-14  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
      
      	* glib/gmessages.c: Fixed threading issues brought up by
      	#74577. Make g_log_find_domain, g_log_domain_new,
      	g_log_domain_check_free and g_log_domain_get_handler require being
      	called with g_messages_lock held and remove all internal locking
      	in them. Then added proper locking to g_log_set_handler,
      	g_log_remove_handler and g_logv. Problem spotted by Miroslaw
      	Dobrzanski-Neumann <mne@mosaic-ag.com>. (#74577)
      148a8466
  9. 21 Feb, 2002 1 commit
    • Matthias Clasen's avatar
      New header containing GTK_DEBUG-style debugging support for GLib. · 642897a7
      Matthias Clasen authored
      	* glib/gdebug.h: New header containing GTK_DEBUG-style debugging
      	support for GLib. Currently only the fatal_warnings debug option exists.
      
      	* glib/gmessages.c (g_log_msg_prefix_init): New one-shot function
      	for parsing G_MESSAGES_PREFIXED.
      	(_g_debug_init): New one-shot function for parsing G_DEBUG.
      	(g_log_write_prefix): Use g_log_msg_prefix_init().
      	(g_messages_init): Use g_log_msg_prefix_init() and _g_debug_init().
      
      	* glib/Makefile.am (libglib_1_3_la_SOURCES): Add gdebug.h.
      
      
      	* glib/Makefile.am (IGNORE_HFILES): Add gdebug.h.
      
      	* glib/running.sgml: Document the G_DEBUG environment variable.
      
      	* glib/tmpl/threads.sgml: Replace g_thread_wait() by
      	g_thread_join() in two places.
      642897a7
  10. 14 Feb, 2002 1 commit
  11. 23 Jan, 2002 1 commit
  12. 28 Dec, 2001 1 commit
  13. 06 Dec, 2001 1 commit
    • Matthias Clasen's avatar
      The following patch corrects some function attributes. (#61780) · 39e4c5af
      Matthias Clasen authored
      
              The following patch corrects some function attributes. (#61780)
      
              * glib/ghash.h (g_int_equal, g_int_hash): These are not const.
      
              * glib/glibintl.h (_glib_gettext): Add G_GNUC_FORMAT(1).
      
              * glib/gmacros.h: Use reserved symbols in function attribute macros.
      
              The following patch avoids manual printf()-format parsing
              if a C99-conforming vsnprintf() is available. (#55106)
      
              * acinclude.m4 (AC_FUNC_VSNPRINTF_C99): New macro to test for a
              C99 conforming vsnprintf.
      
              * configure.in: Use AC_FUNC_VSNPRINTF_C99.
      
              * glib/gmessages.c (g_printf_string_upper_bound): Use C99 vsnprintf().
      39e4c5af
  14. 17 Nov, 2001 1 commit
  15. 29 Oct, 2001 1 commit
    • Daniel Egger's avatar
      Fix non-Intel/-Alpha version of the G_BREAKPOINT macro to include · 062ecaf1
      Daniel Egger authored
      2001-10-29  Daniel Egger  <degger@fhm.edu>
      
      	* glib/gbacktrace.h: Fix non-Intel/-Alpha version of the
      	G_BREAKPOINT macro to include <signal.h> and use SIGTRAP.
      
      	* glib/gmessages.c: Conditionalise definition of args2
      	depending on the definition of HAVE_VSNPRINTF to avoid
      	compiler warning.
      
      	* gobject/testgruntime.c
      	* tests/patterntest.c: Include <string.h> to avoid warnings.
      062ecaf1
  16. 11 Oct, 2001 1 commit
  17. 19 Sep, 2001 1 commit
    • Owen Taylor's avatar
      Patch from Matthias Clasen (#59806) · 5c12c0ac
      Owen Taylor authored
      Wed Sep 19 14:17:31 2001  Owen Taylor  <otaylor@redhat.com>
      
      	Patch from Matthias Clasen (#59806)
      
      	* configure.in: Check for vasprintf().
      
      	* glib/gmem.[ch]: Add g_mem_vtable_is_set() to be used
      	for efficiency hacks to avoid extra copies when not
      	needed.
      
      	* glib/gstrfuncs.c: Use vasprintf() to implement
      	g_strdup_printf() when available.
      
      	* glib/gmessages.c (g_logv): Avoid using
      	printf_string_upper_bound() when we have have vsnprintf.
      
      	* glib/gmessages.c (printf_string_upper_bound): Don't
      	segfault when warning about positional parameters.
      5c12c0ac
  18. 10 Sep, 2001 1 commit
    • Tim Janik's avatar
      got rid of g_set_error_handler(), g_set_warning_handler(), · dc0b74d4
      Tim Janik authored
      Mon Sep 10 17:13:36 2001  Tim Janik  <timj@gtk.org>
      
              * glib/gmessages.h: got rid of g_set_error_handler(),
              g_set_warning_handler(), g_set_message_handler().
      
      Wed Sep  5 05:24:07 2001  Tim Janik  <timj@gtk.org>
      
              * gobject/tmpl/gboxed.sgml: documented some functions.
      
              * gobject/tmpl/objects.sgml: some fixups.
      
      Mon Sep 10 19:27:47 2001  Tim Janik  <timj@gtk.org>
      
              * gtype.[hc]:
              g_type_add_interface*(): implement the ability to add an interface to
              a type whose parents already conform to this interface.
              such "overriding" interfaces, when initialized, are not just initialized
              with 0, but with a copy of the interface they override.
              g_type_interface_peek_parent(): new function, return the interface
              that this interface "overrides", if any.
      
              * testgruntime.c: test new interface stuff.
      dc0b74d4
  19. 12 Jul, 2001 1 commit
  20. 10 Jul, 2001 1 commit
    • Tim Janik's avatar
      fix negative exponent handling (numbers<0). · 11b0d06e
      Tim Janik authored
      Fri Jul  6 00:02:41 2001  Tim Janik  <timj@gtk.org>
      
              * glib/gmessages.c (printf_string_upper_bound): fix negative exponent
              handling (numbers<0).
      
              * glib/gutils.h (g_bit_storage): take a gulong as argument.
              same for g_bit_nth_lsf() and g_bit_nth_msf() as mask.
      
      Tue Jul 10 18:50:16 2001  Tim Janik  <timj@gtk.org>
      
              * gsignal.h (struct _GSignalQuery): fix misplaced comment.
      11b0d06e
  21. 23 Jun, 2001 2 commits
    • Tim Janik's avatar
      use G_BREAKPOINT() instead of raise(5). · 0646fe7c
      Tim Janik authored
      Sat Jun 23 17:34:38 2001  Tim Janik  <timj@gtk.org>
      
              * gmessages.c (g_logv): use G_BREAKPOINT() instead of raise(5).
      0646fe7c
    • Owen Taylor's avatar
      Changes for 64-bit cleanliness, loosely based on patch from Mark Murnane. · f5c28ce4
      Owen Taylor authored
      Wed Jun 20 12:00:54 2001  Owen Taylor  <otaylor@redhat.com>
      
              Changes for 64-bit cleanliness, loosely based on patch
      	from Mark Murnane.
      
      	* gconvert.c (g_convert/g_convert_with_fallback): Remove
      	workarounds for since-fixed GNU libc bugs. Minor
      	doc fix.
      
      	* gconvert.[ch]: Change gint to gsize/gssize as
      	appropriate.
      
      	* gconvert.c (g_locale/filename_to/from_utf8): Fix incorrect
      	computation of bytes_read / bytes_written.
      
      	* gfileutils.[ch] (g_file_get_contents): Make length
      	out parameter 'gsize *len'.
      
      	* ghook.c (g_hook_compare_ids): Don't compare a
      	and b as 'a - b'.
      
      	* gmacros.h (GSIZE_TO_POINTER): Add GPOINTER_TO_SIZE,
      	GSIZE_TO_POINTER.
      
      	* gmain.c (g_timeout_prepare): Rewrite to avoid
      	overflows. (Fixes bug when system clock skews
      	backwards more than 24 days.)
      
      	* gmarkup.[ch]: Make lengths passed to callbacks
      	gsize, length for g_markup_parse-context_parse(),
      	g_markup_escape_text() gssize.
      
      	* gmessages.[ch] (g_printf_string_upper_bound): Change
      	return value to gsize.
      
      	* gmessages.c (printf_string_upper_bound): Remove
      	a ridiculous use of 'inline' on a 300 line function.
      
      	* gstring.[ch]: Represent size of string as a gsize,
      	not gint. Make parameters to functions take gsize,
      	or gssize where -1 is allowed.
      
      	* gstring.c (g_string_erase): Make
      	g_string_erase (string, pos, -1) a synonym for
      	g_string_truncate for consistency with other G*
      	APIs.
      
      	* gstrfuncs.[ch]: Make all functions taking a string
      	length, take a gsize, or gssize if -1 is allowed.
      	(g_strstr_len, g_strrstr_len). Also fix some boundary
      	conditions in g_str[r]str[_len].
      
      	* gutf8.c tests/unicode-encoding.c: Make parameters that
      	are byte lengths gsize, gssize as appropriate. Make
      	character offsets, other counts, glong.
      
      	* gasyncqueue.c gcompletion.c
                timeloop.c timeloop-basic.c gutils.c gspawn.c.
      	Small 64 bit cleanliness fixups.
      
      	* glist.c (g_list_sort2, g_list_sort_real): Fix functions
      	that should have been static.
      
      	* gdate.c (g_date_fill_parse_tokens): Fix extra
      	declaration that was shadowing another.
      
      	* tests/module-test.c: Include string.h
      
      Mon Jun 18 15:43:29 2001  Owen Taylor  <otaylor@redhat.com>
      
      	* gutf8.c (g_get_charset): Make argument
      	G_CONST_RETURN char **.
      f5c28ce4
  22. 22 May, 2001 1 commit
    • Sebastian Wilhelmi's avatar
      g_thread_create renamed to g_thread_create_full. · e2b7bedb
      Sebastian Wilhelmi authored
      
      2001-05-22  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
      
      	* glib.def: g_thread_create renamed to g_thread_create_full.
      
      	* gthread.c: memcpy is not necessary here. We can simply use
      	struct assignment.
      
      	* gmessages.c: Fix compilation error on win32. Added
      	GFileDescriptor, wich is gint on Unix and FILE* on win32.
      e2b7bedb
  23. 14 May, 2001 1 commit
    • Owen Taylor's avatar
      Avoid using stderr to be as robust as possible in out-of-memory. · ac0bbb76
      Owen Taylor authored
      Thu May 10 23:21:30 2001  Owen Taylor  <otaylor@redhat.com>
      
      	* gmessages.c (g_log_write_prefix): Avoid using stderr
      	to be as robust as possible in out-of-memory.
      
      	* gmessages.c (g_log_default_handler): Remove some dead
      	code.
      
      	* gutils.c (g_parse_debug_string): Fix to avoid mallocs.
      ac0bbb76
  24. 11 May, 2001 1 commit
  25. 09 May, 2001 1 commit
    • Havoc Pennington's avatar
      Get rid of --enable-msg-prefix · ea05dba9
      Havoc Pennington authored
      2001-04-26  Havoc Pennington  <hp@redhat.com>
      
      	* configure.in: Get rid of --enable-msg-prefix
      
      	* gmessages.c: make whether to prefix the messages with
      	appname/pid a runtime setting, not a compile-time setting.  Change
      	default to include prefix for debug/warning/error type messages.
      ea05dba9
  26. 09 Mar, 2001 1 commit
    • Tor Lillqvist's avatar
      Cygwin support contributed by Stefan Ondrejicka <ondrej@idata.sk>. · 31c5b189
      Tor Lillqvist authored
      2001-02-21  Tor Lillqvist  <tml@iki.fi>
      
      	Cygwin support contributed by Stefan Ondrejicka
      	<ondrej@idata.sk>. Hopefully I got it all in while simultaneously
      	adding support for auto*/libtool for mingw.
      
      	* Makefile.am: Changes for auto* support on Cygwin and Win32. Do
      	still distribute the hand-written makefiles and *.win32.in files,
      	though. Use GIO, GSPAWN and PLATFORMDEP macros set by configure.
      	Use -no-undefined. Pass -export-symbols glib.def to libtool.
      
      	* configure.in: Define G_PLATFORM_WIN32 on both pure Win32 (mingw)
      	and Cygwin. Add AC_CYGWIN, AC_EXEEXT and AC_LIBTOOL_WIN32_DLL
      	calls for Cygwin and mingw support.  Check for %I64u guint64
      	format (in MS C library). Set G_MODULE_IMPL on mingw and
      	Cygwin. Use ac_object and ac_exeext.  Set GIO, GSPAWN, PLATFORMDEP
      	and G_LIBS_EXTRA. Compile timeloop only on Unix. Define OS_WIN32
      	automake conditional on Win32.
      
      	* glib.h: Include gwin32.h also on Cygwin.
      
      	* gfileutils.c (get_contents_posix): Use O_BINARY (defined as 0 on
      	Unix) for Cygwin's sake.
      
      	* gtimer.c (GETTIME): Reduce #ifdefs, use a macro GETTIME().
      
      	* gconvert.c
      	* gthread.c
      	* gutf8.c
      	* gutils.c: For code needed both on Cygwin and native Win32,
      	test for G_PLATFORM_WIN32.
      
      	* gmarkup.h: Use G_BEGIN_DECLS and G_END_DECLS.
      
      	* gtypes.h: Refine GLIB_VAR definition. Also check for DLL_EXPORT
      	in case compiling a static library on Win32 or Cygwin.
      
      	* gwin32.c: No <direct.h> on Cygwin. No need for ftruncate() or
      	dirent emulation on Cygwin.
      	(get_package_directory_from_module) Convert return value from
      	GetModuleFileName() to POSIX path on Cygwin.
      
      	* tests/Makefile.am (progs_LDADD): Link with libglib, libgthread
      	and libgmodule as appropriate. Use -no-undefined.
      
      	* gbacktrace.c: Move #ifdefs around a bit on Win32.
      
      	* gshell.c (unquote_string_inplace): Make static.
      31c5b189
  27. 19 Feb, 2001 1 commit
  28. 17 Feb, 2001 1 commit
    • Havoc Pennington's avatar
      include string.h · 1c391cc6
      Havoc Pennington authored
      2001-02-17  Havoc Pennington  <hp@pobox.com>
      
      	* gthread.c: include string.h
      
              Applied patch from Soeren Sandmann:
      
      	* testglib.c: const fixes
      
      	* gwin32.h: format cleanups
      
      	* gutils.c (g_atexit): constify a variable
      	(g_find_program_in_path): constification
      	(g_basename): G_CONST_RETURN
      	(g_path_skip_root): G_CONST_RETURN
      	(g_getenv): G_CONST_RETURN
      	(g_get_user_name): G_CONST_RETURN
      	(g_get_real_name): G_CONST_RETURN
      	(g_get_home_dir): G_CONST_RETURN
      	(g_get_tmp_dir): G_CONST_RETURN
      	(g_get_prgname): G_CONST_RETURN
      	(_glib_gettext): G_CONST_RETURN
      
      	* gunicode.h: formatting cleanups
      
      	* gstrfuncs.c (g_strerror): G_CONST_RETURN
      	(g_strsignal): G_CONST_RETURN
      
      	* gspawn.c (g_execute): const on variables
      
      	* gmessages.c (printf_string_upper_bound): fix const on a variable
      
      	* gmem.c (g_mem_chunk_new): make the "name" arg const
      	(struct _GRealMemChunk): make the "name" field const
      
      	* gfileutils.c (g_file_open_tmp): store const return in a const
      	gchar* variable
      
      	* gdataset.c (g_quark_to_string): G_CONST_RETURN
      
      2001-02-17  Havoc Pennington  <hp@pobox.com>
      
              Applied patch from Soeren Sandmann:
      
      	* gvaluetypes.c (g_value_get_string): G_CONST_RETURN
      
      	* gtype.c (g_type_name): G_CONST_RETURN
      
      	* gsignal.c (g_signal_name): G_CONST_RETURN
      
      	* gobject-query.c (main): const fix
      
      2001-02-17  Havoc Pennington  <hp@pobox.com>
      
              Applied patch from Soeren Sandmann:
      
      	* gmodule.c (g_module_error): G_CONST_RETURN
      	(g_module_name): G_CONST_RETURN
      1c391cc6
  29. 25 Dec, 2000 1 commit
  30. 14 Dec, 2000 1 commit
    • Tor Lillqvist's avatar
      Warn if no callback. Call callback correctly. (g_io_win32_create_watch): · b74e7d2f
      Tor Lillqvist authored
      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!
      
      gobject:
      
       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.
      b74e7d2f
  31. 25 Oct, 2000 1 commit
    • Tim Janik's avatar
      added newly added gobject/ headers. · ee23c09e
      Tim Janik authored
      Tue Oct 24 22:09:14 2000  Tim Janik  <timj@gtk.org>
      
              * glib-object.h: added newly added gobject/ headers.
      
              * gmesage.c: print g_message() output to stderr instead of stdout.
      
      Wed Oct 25 20:27:02 2000  Tim Janik  <timj@gtk.org>
      
              * gtype.c (g_type_free_instance): for the moment, freeing object
              structures will fill their memory portion with 0xAA. there's a
              FIXME there, remove this line at a later point.
      
      Tue Oct 24 23:10:26 2000  Tim Janik  <timj@gtk.org>
      
              * glib-genmarshal.1:
              * glib-genmarshal.c: added publically installed marshaller generator.
      
              * gtype.h: added G_TYPE_INSTANCE_GET_INTERFACE() to retrive a certain
              interface VTable from instances.
      
      Mon Oct 23 08:28:15 2000  Tim Janik  <timj@gtk.org>
      
              * gobject.[hc]: new functions for closure maintenance:
              (g_object_watch_closure): maintain validity of the object and
              the closure for objects that are used as data part of a closure.
              (g_cclosure_new_object): convenience function to create C closures
              that have an object as data argument.
              (g_closure_new_object): convenience function to create closures
              that have an object as data argument.
      
              * gclosure.[hc]: implementation of GClosure mechanism.
              a closure is basically an encapsulation of a callback function
              and its environment. ideally, most places supporting callback
              functions will simply take a GClosure* pointer and thus unify
              callback environments wrg destroy notification etc.
              GClosure provides destroy notifiers for arbitrary data pointers,
              reference counting, invalidation notification (it can be invalidated
              which is merely a deactivate state) and a marshallinbg abstraction.
              GCClosure is also provided in these files, they present a specialized
              GClosure implementation for C language callbacks.
      
              * genum.c: macro cleanups.
      
              * gboxed.[hc]: new files, for boxed type abstraction.
              (g_boxed_copy): copy a boxed structure
              (g_boxed_free): free a boxed structure
              (g_value_set_boxed):
              (g_value_get_boxed): standard GValue functions for boxed types
              (g_boxed_type_register_static): convenience function for easy
              introduction of new G_TYPE_BOXED derivatives.
      
              * gparam.[hc]: introduced g_param_type_register_static(), a short hand
              for creation of new GParamSpec derived types.
      
              * gtype.[hc]: many fixes, introduced ability to flag individual
              type nodes as ABSTRACT upon registration, added value_peek_pointer()
              to the value table to peek at GValue contents as a pointer for types
              that support this. fixed up GValue checks.
      
              * gvalue.[hc]: added g_value_fits_pointer() and g_value_get_as_pointer()
              to peek at the value contents as pointer.
      
              * *.[hc]: adaptions to type macro fixes and changes in the type
              registration API.
      
              * many const corrections over the place.
      
      Sat Oct 21 02:49:56 2000  Tim Janik  <timj@gtk.org>
      
              * gtype.c (g_type_conforms_to): this function basically behaves like
              and is_a check, except that it _additionally_ features interfaces
              for instantiatable types. enforce this in the second branch as well
              (`type' conforms_to `type') even if `type' is not an interface type.
      
      Fri Oct 20 15:31:04 2000  Tim Janik  <timj@gtk.org>
      
              * gvaluetypes.[hc]: added G_TYPE_POINTER implementation from jrb.
      
              * gtype.[hc]:
              * gobject.c:
              * gvaluetypes.c: added GTypeValueTable.value_peek_pointer and
              suitable implementations of this for G_TYPE_STRING, G_TYPE_OBJECT
              and G_TYPE_POINTER.
      
      Mon Aug 21 04:13:37 2000  Tim Janik  <timj@gtk.org>
      
              * gbsearcharray.[hc]: long standing needed generic implementation
              of a binary searchable, sorted and dynamically sized array.
      ee23c09e
  32. 06 Aug, 2000 1 commit
    • Tim Janik's avatar
      keep *last updated while running through the domain list, so we don't · 042179da
      Tim Janik authored
      Sun Aug  6 20:06:02 2000  Tim Janik  <timj@gtk.org>
      
              * gmessages.c (g_log_domain_check_free): keep *last updated while
              running through the domain list, so we don't screw up the removal,
              patch provided by Gady Kozma <gadykozma@hotmail.com>.
      
      Sun Aug  6 20:03:41 2000  Tim Janik  <timj@gtk.org>
      
              * gmessages.c (g_log_remove_handler): keep *last updated while running
              through the handler list, so we don't screw up the removal.
      042179da
  33. 26 Jul, 2000 1 commit
  34. 31 Oct, 1999 1 commit
    • Tor Lillqvist's avatar
      Don't crash if removing a nonexistent value. · 30cc3ed1
      Tor Lillqvist authored
      1999-10-31  Tor Lillqvist  <tml@iki.fi>
      
      * gcache.c (g_cache_remove): Don't crash if removing a nonexistent
      value.
      
      * gutils.c (gwin_getlocale): New Win32-specific function, returns
      a Unixish current locale string (en, zh_TW etc).
      
      * glib.h: Declare it.
      
      * glib.def: Export it.
      
      * testglib.c: Test it.
      
      * gmessages.c (Win32: ensure_stdout_valid): Some improvements,
      make sure we don't call AllocConsole several times, which I think
      has happened.
      30cc3ed1
  35. 12 Oct, 1999 1 commit
    • Tim Janik's avatar
      completly new implementation for printf string upper bounds calculation. · 30a1e1ad
      Tim Janik authored
      Tue Oct 12 12:16:12 1999  Tim Janik  <timj@gtk.org>
      
              * gmessages.c (g_printf_string_upper_bound): completly new implementation
              for printf string upper bounds calculation.
              we handle all glibc 2.1 format specifiers now, except for positional
              parameters (%nn$...) and wide char strings, plus some obscure upper
              case variants of the standard conversions. this fixes a lot of
              bugs in the old code, i.e.
              - NULL format strings
              - floats with exponents >+24
              - %G
              - precision specifications in general
              - negative field widths
              - %p for SIZEOF_VOID_P > 4 platforms
              we now issue warnigns in places where the old code would have
              caused buffer overruns anyways. warnings are suppressed when invoked
              from glogv(), to avoid infinite recursions if someone passes a log
              message that comes with really obscure format specifications.
      
      Tue Oct 12 11:49:00 1999  Tim Janik  <timj@gtk.org>
      
              * gstrfuncs.c: nuked old g_printf_string_upper_bound() version.
      
      Tue Oct 12 03:34:40 1999  Tim Janik  <timj@gtk.org>
      
              * glib.h: added GFloatIEEE754 and GDoubleIEEE754 unions to access sign,
              mantissa and exponent of IEEE floats and doubles (required by the new
              version of g_printf_string_upper_bound). the unions are endian specific,
              we handle G_LITTLE_ENDIAN and G_BIG_ENDIAN as of currently. ieee floats
              and doubles are supported (used for storage) by at least intel, ppc and
              sparc, reference:
              http://twister.ou.edu/workshop.docs/common-tools/numerical_comp_guide/ncg_math.doc.html
      
      Mon Oct 11 18:01:49 1999  Tim Janik  <timj@gtk.org>
      
              * configure.in: added additional checks to figure sizes of size_t,
              ptrdiff_t and intmax_t (required by g_printf_string_upper_bound).
      30a1e1ad
  36. 04 Oct, 1999 1 commit