Fixes from Miroslaw Dobrzanski-Neumann (#71963)
* glib/giounix.c (g_io_channel_new_file): Fix trailing comma
in enum.
* configure.in: Check for unsetenv.
* test/uri-test.c: Fall back to trying putenv(VARNAME) if
unsetenv isn't present.
2002-02-20 Daniel Elstner <daniel.elstner@gmx.net>
* glib/gstring.[ch] (g_string_erase): Use gssize instead of gsize as type of the pos and len arguments. (#71964)
2002-02-19 Tor Lillqvist <tml@iki.fi>
* glib/gspawn-win32.c: Include <config.h> first here, too. Use
g_io_channel_read_chars() instead of (deprecated)
g_io_channel_read(). Set encoding to NULL for the channels used
for the pipes from the child.
* glib/giowin32.c (buffer_read): Do return G_IO_STATUS_EOF when
EOF has been reached. Otherwise, with the above change to
gspawn-win32.c, spawn-test hangs.
Mon Feb 18 20:18:23 2002 Owen Taylor <otaylor@redhat.com>
* glib/libcharset/Makefile.am (EXTRA_DIST): Remove
charset.alias from EXTRA_DIST; we don't want the
charset.alias from the make distcheck machine
on the target system!. (#70974, reported by
Ryan Lovett)
Mon Feb 18 12:40:36 2002 Owen Taylor <otaylor@redhat.com>
* configure.in: Turn off ISO varargs support for gcc-2.95
since it causes problems with ANSI and we we have GNUC
varargs. (#70024, reported by Morten Welinder, fix from
James Henstridge)
Sun Feb 17 11:37:06 2002 Owen Taylor <otaylor@redhat.com>
* 1.3.14
* glib/glibintl.h: Error out of config.h wasn't included
rather than including it, since config.h must be the
first thing included.
* glib/gconvert.c glib/gmarkup.c glib/gshell.c glib/gspawn.c
glib/gunibreak.c glib/gunidecomp.c glib/guniprop.c:
Include config.h as the first thing. (#71704, Morten
Welinder)
Fri Feb 15 10:41:51 2002 Owen Taylor <otaylor@redhat.com>
* NEWS: Updated.
* configure.in: Require autoconf-2.52, run AC_SYS_LARGEFILE.
(#71410, Sven Neumann)
* glib/giounix.c glib/giowin32.c glib/giochannel.[ch]:
Change offset type for g_io_channel_seek[_position] to
gint64.
2002-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* tests/thread-test.c: Do not assume, that after
g_usleep(G_USEC_PER_SEC) the newly started thread began
running. Spotted by Miroslaw Dobrzanski-Neumann
<mne@mosaic-ag.com>. Make the test_g_static_rw_lock_thread threads
wait a random time. Make the test_g_static_rw_lock test run 5
seconds, not 1.
2002-02-14 Tor Lillqvist <tml@iki.fi>
* glib/gmessages.c (g_logv): Use the #if branch with
G_BREAKPOINT() also on Win32. Remove the separate __asm int 3 for
MSVC, G_BREAKPOINT() does exactly that.
2002-02-14 James Henstridge <james@daa.com.au>
* m4macros/glib-gettext.m4: add third argument to the AC_DEFINE
calls, so users of the macro don't need to add entries to
acconfig.h in their package.
2002-02-13 Havoc Pennington <hp@redhat.com>
* glib/gmain.c (g_main_context_check): never dispatch sources of
mixed priority, because while iterating over the dispatch array a
new source with more priority may be added, while a source with
less priority remains in the dispatch array
* glib/gmessages.h: Use "if (expr) { } else" as I meant to in the
first place. The other form can trigger warnings in some compilers
that suspect a ";" after "if (expr)" is an error.
* tests/markups/valid-4.gmarkup: Test attribute value delimiters.
* glib/gmarkup.c (g_markup_parse_context_parse): Support
' and " as attribute value delimiters. (#70677)
2002-02-09 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: Make --disable-threads work again. (#71034)
* gthread-impl.c: Only compile most of this file, if
G_THREAD_ENABLED is set.
Fri Feb 8 23:52:27 2002 Owen Taylor <otaylor@redhat.com>
* gobject/gvaluetransform.c: Register transformations for
gint64, guint64. (#70780, patch from Andy Wingo)
* configure.in: Handle missing G_GINT64_FORMAT,
G_GUINT64_FORMAT ... harder to require GNU libc than GCC.
* NEWS: Some cleanups that I had setting around.
* glib/gconvert.h: Make hostname parameter const char *.
* glib/gconvert.c: (g_unescape_uri_string): Added a new
"ASCII must not be escaped" feature, and some missing error
checking.
(is_escalphanum): New.
(is_escalpha): New.
(hostname_validate): New.
(g_filename_from_uri): Don't allow hostnames to include
escaped ASCII, validate hostnames with the new
hostname_validate.
(g_filename_to_uri): Validate hostnames with the new
hostname_validate.
* tests/uri-test.c: Updated tests to reflect the hostname
validation changes above.
* glib/gdate.c: (g_date_fill_parse_tokens): Remove the
<ctype.h> include and do isdigit -> g_ascii_isdigit.
Fri Feb 8 12:32:14 2002 Owen Taylor <otaylor@redhat.com>
* tests/hash-test.c (second_hash_test): Fix access to
freed memory in test case (Miroslaw Dobrzanski-Neumann).
Re-enable and debug some commented out code.
2002-02-08 Michael Natterer <mitch@gimp.org>
* glib/gdir.c: g_dir_open: added g_return_val_if_fail() to prevent
us from calling opendir(NULL) (which simply crashes).
2002-02-07 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/gfileutils.c (g_file_test): Do not follow symbolic links
for G_FILE_TEST_SYMLINK. Also fixed the correct "OR"-behaviour for
G_FILE_TEST_IS_EXECUTABLE and G_FILE_TEST_EXISTS. (#60048)
Wed Feb 6 14:44:18 2002 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c (g_main_context_prepare): Handle
NULL entries (already dispatched) in pending_dispatches array
(pointed out by Manish Singh)
2002-02-04 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/gthread.c (g_thread_create_full): Delay allocation until
after all g_return_val_if_fail ().
* glib/gthread.h: Make depth member guint for cosmetic reasons.
* glib/gthread.c: (g_static_rec_mutex_unlock_full): depth should
be unsigned. All that spotted by Jrgen Viksell
<jorgen.viksell@telia.com>
2002-01-21 Jeffrey Stedfast <fejj@ximian.com>
* glib/gconvert.c (open_converter): Rewritten to cache iconv
conversion descriptors. On at least some Unix systems like
Solaris, iconv_open() must dlopen the necessary charset modules in
order to setup the descriptor. This can take a major toll on
performace if you are constantly opening and closing conversion
descriptors for the same charset conversions over and over.
(g_convert_with_fallback): Use close_converter() rather than
g_iconv_close() since open_converter() now caches iconv
descriptors.
Tue Jan 29 11:18:44 2002 Owen Taylor <otaylor@redhat.com>
* 1.3.13
* NEWS: Updated.
* configure.in: Micro == 13, binary age, interface age 0.
[ binary breakage was return type of g_signal_connect_object(),
probably could have used binary age == 0, but a little safer not to.]
* configure.in: Remove configure warning.
2002-01-28 Havoc Pennington <hp@pobox.com>
* glib/gmarkup.c (add_attribute): NULL-terminate
context->attr_values so g_strfreev() is safe.
Would previously crash if parsing was ended prior
to ending the start tag.
(g_markup_parse_context_parse): add a couple assertions
Mon Jan 28 17:56:10 2002 Owen Taylor <otaylor@redhat.com>
* glib/gmacros.h: Only use __FUNCTION__, __PRETTY_FUNCTION__ for
G_GNUC_FUNCTION, G_GNUC_PRETTY_FUNCTION, G_STRLOC when __GNUC__ <
3, since in 3.0.3 the semantics of these functions were changed in
an incompatible way. (#69097)
2002-01-23 Laszlo Peter <laca@ireland.sun.com>
* glib/gmessages.c (g_printf_string_upper_bound): return 1 more
for the trailing \0 when using vsnprintf. (#69474)
2002-01-23 Tor Lillqvist <tml@iki.fi>
* glib/gconvert.c: (strdup_len): Not used on Windows, don't even
compile it then.
(acceptable): Improve comments for the _acceptable_ table: put
each ASCII char above the hex number for it.
(g_escape_file_uri): On Windows, turn backslashes in the file name
into plain ("forward") slashes.
(g_filename_from_uri): On Windows, don't return the hostname
"localhost", because we can not be 100% sure it will be recognized
in all cases anyway, so simpler to turn it into a null
hostname.
Change slashes in the filename into backslashes, as that is the
more canonical separator.
Recognize drive letters (either followed by a colon or a vertical
bar, as used by some browsers), and if the filename part starts
with a such, don't include any (back)slash.
Don't drop any extra leading slash in the filename on Unix.
(g_filename_to_uri): On Windows, if the hostname is "localhost",
don't use it, for consistency with g_filename_from_uri().
tests/uri-test.c: Change accordingly, so that all tests pass on
Windows. Unix, too, I hope, though I couldn't check that now.
(main): Unset the G_BROKEN_FILENAMES environment variable on Unix,
as some tests require that filenames are in UTF-8. Is unsetenv()
portable?
These changes should fix bugs #59387, #59652, #59657 and #59658.
2002-01-21 Jeffrey Stedfast <fejj@ximian.com>
* glib/gconvert.c (g_convert_with_fallback): If g_convert fails,
set bytes_written to 0 and close the iconv descriptor that was
opened a few lines above. On a successful return, calculate
bytes_written to be outp - dest instead of outp - str.
2002-01-16 Sven Neumann <sven@gimp.org>
* acinclude.m4
* m4macros/glib-gettext.m4: removed the --disable-nls option. You
can't disable Native Language Support since we rely on it.
* configure.in: nicer --help output.
2002-01-05 Hans Breuer <hans@breuer.org>
* glibconfig.h.win32.in
msvc_recommended_pragmas.h (new file) : moved warning to
error pragmas to their own file to not force 'good practice'
programming in downstream libs and apps. Instead the new header
will be used by -FImsvc_recommended_pragmas.h in gnome/cvs
makefile.msc
* */makefile.msc.in : use -FImsvc_recommended_pragmas.h
* makefile.am : add msvc_recommended_pragmas.h to EXTRA_DIST
2001-12-21 Tor Lillqvist <tml@iki.fi>
* config.h.win32.in: Add (undefined) HAVE_C99_VSNPRINTF.
* glibconfig.h.win32.in: Add definition of G_HAVE_GROWING_STACK.
* tests/Makefile.am: Rename the progs_LDADD, thread_LDADD and
module_LDADD Make macros to progs_ldadd, thread_ldadd and
module_ldadd. Newer automakes reserve macros named *_LDADD for
the use as LDADDs for targets it knows.
* glib/giowin32.c: (struct _GIOWin32Watch): 'callback' wasn't used
here, either.
2001-12-21 Tor Lillqvist <tml@iki.fi>
* gobject.def: Add g_signal_get_invocation_hint.
* glib/gshell.c, glib/gspawn.c, glib/gspawn-win32.c, glib/gerror.c,
glib/gfileutils.c, glib/ghash.c, glib/gmain.c, glib/gasyncqueue.c,
glib/gtree.c: Minor markup fixes.
* glib/tmpl/caches.sgml: GCs are cached by GTK, not by GDK.
2001-12-14 Havoc Pennington <hp@pobox.com>
* glib/gshell.c (g_shell_parse_argv): note on how to free returned
vector
2001-12-08 Havoc Pennington <hp@pobox.com>
* glib/gspawn.c (fork_exec_with_pipes): include argv[0] in error
message about failure to exec
2001-12-10 Sven Neumann <sven@gimp.org>
* gobject/gvalue.c (g_value_register_transform_func): perform an exact
match on the two types instead of using transform_func_lookup().
2001-12-09 Christopher Blizzard <blizzard@redhat.com>
* glib/gmessages.h: Add pragma that will prevent warnings when you
are not using -std=99 and newer gcc compilers. Patch from Red
Hat's gtk+ 1.2 rpm.
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().
2001-11-29 Havoc Pennington <hp@redhat.com>
* glib/gtree.c (g_tree_foreach):
* glib/ghash.c (g_hash_table_foreach):
Add notes about how you shouldn't modify these data structures as
you iterate over them.
Wed Nov 28 18:34:22 2001 Owen Taylor <otaylor@redhat.com>
* glib/gmain.[ch]: Rename (private) GSource.id and
id parameter to g_main_context_find_source_by_id()
to avoid problems with Objective C where 'id' is
a keyword. (#65616)
2001-11-28 Daniel Elstner <daniel.elstner@gmx.net>
* glib/gutf8.c (utf8_skip_data): In order to avoid infinite loops on invalid UTF-8 strings, change the skip count for 0xfe and 0xff from 0 to 1.
* configure.in (G_MODULE_LDFLAGS): Set this from libtool rather
than hardcoding values for certain platforms.
* glib/libcharset/config.charset: Add a rule for NetBSD.
* glib/libcharset/localcharset.c (_g_locale_get_charset_aliases):
If LIBCHARSET_ALIAS_DIR is set, look for charset.aliases there.
* tests/Makefile.am (TESTS_ENVIRONMENT): set LIBCHARSET_ALIAS_DIR
so we don't depend on charset.aliases having been installed
2001-11-23 Hans Breuer <hans@breuer.org>
* glib/makefile.msc.in : added -Zm400 to DEPCFLAGS to avoid :
gunidecomp.h(5846) : fatal error C1076: compiler limit :
internal heap limit reached; use /Zm to specify a higher limit
* glibconfig.h.win32.in : added recommended pragma list for
msvc again. They are an invaluable help of letting the
compiler catch bugs.
Thu Nov 22 13:14:18 2001 Owen Taylor <otaylor@redhat.com>
* configure.in (GLIB_MICRO_VERSION): Version 11,
interface, binary age 0.
* NEWS: Updated.
* tests/Makefile.am (libmoduletestplugin_[ab]_la_LDFLAGS):
Add dummy -rpath argument. On some (but not all) platforms,
libtool will only build a convenience library without this.
(#63486, Dan Winship)
* Makefile.am (EXTRA_DIST): Add README.in, INSTALL.in -
autoconf-2.5x checks for 'make dist' in the tarball
when you make distcheck.
* glib/Makefile.am (EXTRA_DIST): Distribute
makefile.msc/mingw.in, glib.rc.in.
* tests/patterntest.c: Include string.h.
* glib/gpattern.c (g_utf8_reverse): doc parsing fix.
Thu Nov 22 03:30:57 2001 Tim Janik <timj@gtk.org>
* gvalue.h (G_TYPE_IS_VALUE): use g_type_check_is_value_type()
instead of g_type_value_table_peek().
* gtype.[hc] (type_check_is_value_type_U): speed up check
LOCK-less by caching lookups in node->mutatable_has_value_table.
* gtype.[hc]: removed locks where possible. partly based on
patches from owen and alex.
2001-11-21 Tor Lillqvist <tml@iki.fi>
* glib/makefile.mingw.in (DEFINES): Set G_LOG_DOMAIN as in
Makefile.am.
gobject:
2001-11-22 Tor Lillqvist <tml@iki.fi>
* makefile.mingw.in (DEFINES): Set G_LOG_DOMAIN as in Makefile.am.
* gparamspecs.h (GOBJECT_VAR): Can't use GLIB_VAR here, as that
makes sense only when building libglib. GOBJECT_VAR is similar for
libgobject.
* gobject.def: Add g_param_spec_types, remove
g_type_fundamental_branch_last.
Tue Nov 20 20:54:25 2001 Owen Taylor <otaylor@redhat.com>
* glib/gunidecomp.[ch] glib/gen-unicode-tables.pl: Patch
from Andrew Taylor to optimize the decomposition table
to eliminate relocations and save space. (#64982)
Sat Nov 17 14:10:35 2001 Owen Taylor <otaylor@redhat.com>
* glib/gbsearcharray.h: Include gtypes.h not gobject/gtype.h
* glib/glib-object.h gobject/*.h: Prevent headers from
being included directly except when compiling GObject.
* gobject/gvaluecollector.h: Include glib-object.h so that
this file can be included directly, since we don't
include it _from_ glib-object.h.
* gobject/gtype.c: Remove struct _GValue hack since we
now include glib/gvaluecollector.h which simply pulls in
glib-object.h.
Wed Nov 14 07:34:24 2001 Tim Janik <timj@gtk.org>
* glib/galloca.h (g_newa): provide g_newa(ctype, count) on top of
g_alloca() like we provide g_new() on top of g_malloc().
Tue Nov 13 21:25:35 2001 Owen Taylor <otaylor@redhat.com>
* glib/{gen-unicode-tables.pl,gunibreak.c,gunibreak.h,
gunichartables.h, gunicomp.h, gunidecomp.[ch],
guniprop.c}: Patch from Andrew Taylor to improve
tables and reduce relocations by using indices
rather than pointers. (#64433)
* tests/unicode-normalize.c (main): Fix for changes
to g_strsplit().
2001-11-09 Tor Lillqvist <tml@iki.fi>
* glib/gwin32.c (g_win32_getlocale): Add a couple of languages
that have LANG_* codes in newest headers, just for completeness.
2001-11-08 Tor Lillqvist <tml@iki.fi>
* glib/gwin32.c: Don't define LANG_AZERI etc in case those aren't
defined in the headers (MSVC 5.0).
(g_win32_getlocale): Instead, surround uses of those with
#ifdef. Those MSVC 5.0 users that want to build a GLib that
recognizes those languages should download the Platform SDK and
use the headers from it.
2001-11-07 Peter Williams <peterw@ximian.com>
* glib/gdir.c (g_dir_read_name): Return NULL when done reading.
2001-11-05 Tor Lillqvist <tml@iki.fi>
* README.win32: Minor edits.
* glib-zip.in: Build separate runtime and developer packages.
* glib/libcharset/config.charset (os): Don't need to match mingw
after all, the charset.alias file isn't even used on Win32... (see
localcharset.c).
* glib/makefile.mingw.in: Add gdir.
* glib/glib.def: Add g_dir_* entry points.
Sun Nov 4 20:45:21 2001 Owen Taylor <otaylor@redhat.com>
* configure.in (CFLAGS): Add check for dirent.h
* glib/glib.h glib/Makefile.am: Add gdir.
* glib/gdir.c (g_dir_close): Couple of small tweaks
now that it is actually compiling...
Sun Nov 4 20:29:31 2001 Owen Taylor <otaylor@redhat.com>
* glib/gdir.[ch]: Indentation fixes, some rewriting of docs to
conform to gtk-doc standard.
* glib/gdir.[ch] (g_dir_close): Remove the boolean
return value. What would you do if closing failed?
What would the user do if you printed a warning
message "closing directory %d failed"?
2001-11-04 Hans Breuer <hans@breuer.org>
* glib/gdir.[hc] : (new files) simplified wrapper around dirent
functions to improve portability of downstream libs/apps
* glib/makefile.msc.in : use them
* glib/glib.def : export them
* config.h.win32.in : needing HAVE_DIRENT_H defined
2001-11-04 Tor Lillqvist <tml@iki.fi>
* tests/Makefile.am: On Win32, create separate .exp file for
module-test.o and link with that. Otherwise the GNU linker doesn't
export the g_clash_func.
Thu Nov 1 21:48:43 2001 Owen Taylor <otaylor@redhat.com>
* tests/mainloop-test.c (recurser_idle): Recurse
with may_block = FALSE, so we don't get into
the pathology where the recurser_idle recurses
for 10 iterations, and the only thing that is
running is the recurser idle, which adds
another recursion for each of those 10 iterations
and....
* tests/mainloop-test.c (create_crawler): Fix race
condition where a crawler source could be destroyed
before it was added to the crawler array.
* test/Makefile.am: Add mainloop-test back.
2001-10-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* configure.in: Make --with-threads=none mean, that we want thread
support, but no default thread implementation. This also was the
original intention, but disapeared around 1998... So it doesn't
seem to be the most requested feature, but we went far to make it
possible in the code, so I resurrected this feature.
* INSTALL.in: Describe the --enable-gc-friendly, --disable-threads
and --with-threads options of configure.
2001-10-31 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/gmain.c (g_main_context_acquire, g_main_context_release,
g_main_context_wait): Use the right conditional (G_THREADS_ENABLED
instead of G_THREAD_ENABLED). Also remove wrong
return-statement. Unfortunately mainloop-test still does fail. Many
thanks to Andrea Fazekas <fazek@ludens.elte.hu> for spotting
this. (#63455)
2001-10-30 Tor Lillqvist <tml@iki.fi>
* glib-zip.in: New file, used to build distribution packages for
Windows.
* configure.in: Expand it.
* Makefile.am: Distribute it.
* config.h.win32.in: Update to match currently produced config.h
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.
Mon Oct 29 11:29:37 2001 Owen Taylor <otaylor@redhat.com>
* m4macros/glib-2.0.m4: Don't try to use PKG_CONFIG
when we didn't find it. (#62944, Eric Lemings)
* m4macros/glib-2.0.m4: Fix problem with spaces around =
sign in assignment. (#63209, Arkadiusz Miskiewicz)
Mon Oct 29 11:05:15 2001 Owen Taylor <otaylor@redhat.com>
* glib-mkenums.in: Generate glib-mkenums from glib-mkenums.in,
substituting in path to perl. (#63093, Dan Winship)
* Makefile.am (bin_SCRIPTS): Remove hack to copy glib-mkenums
from srcdir.
Mon Oct 29 10:59:36 2001 Owen Taylor <otaylor@redhat.com>
* configure.in: Check for path to Perl, add gobject/glib-mkenums
2001-10-28 Tor Lillqvist <tml@iki.fi>
* glib/glib.def: Add missing g_pattern_match_simple and
g_pattern_spec_equal.
* glib/gwin32.c (g_win32_get_package_installation_subdirectory):
Set separator correctly.
* glib/libcharset/config.charset (os): Match also mingw*.
* tests/testglib.c (main): (Win32): Print the lib/locale
subdirectory, as that is what actually gets used.
Fri Oct 26 11:42:50 2001 Owen Taylor <otaylor@redhat.com>
* */Makefile.am: Remove $(srcdir)/html before building
HTML to prevent stale files. Dist all files in html/
2001-10-26 Tor Lillqvist <tml@iki.fi>
* configure.in: Don't default to win32 thread implementation on
Cygwin. The gthread-win32 implementation really is for Win32 with
MS runtime only. Let configure find pthreads when configuring for
Cygwin.
2001-10-26 Tor Lillqvist <tml@iki.fi>
* glib/glib.def: Update.
* tests/makefile.{mingw,msc}.in: Add ../* to PATH before running
tests to find DLLs. Separate the interactive tests, don't run them
in the check target.
* */makefile.msc.in: Include make.msc from GLib's build directory.
Wed Oct 24 11:10:54 2001 Owen Taylor <otaylor@redhat.com>
* configure.in: Version 1.3.10, interface age, binary age = 0.
* NEWS: Updates
Thu Oct 25 12:01:41 2001 Owen Taylor <otaylor@redhat.com>
* tests/Makefile.am: Temporarily remove mainloop-test, since it
prevents distcheck.
2001-10-23 Tor Lillqvist <tml@iki.fi>
* glib/gutils.h: Remove G_HARDCODED_PATH_WRAPPER, Owen didn't like
it.
* glib/gutils.c: Instead, expand it on Win32 as
_glib_get_locale_dir(), and #define GLIB_LOCALE_DIR as a call to
it.
2001-10-23 Tor Lillqvist <tml@iki.fi>
* glib/gutils.h: Add macros G_WIN32_DLLMAIN_FOR_DLL_NAME and
G_HARDCODED_PATH_WRAPPER. These are used to avoid hardcoding path
names into Windows DLLs.
* glib/gutils.c: Use them for GLIB_LOCALEDIR.
* glib/gwin32.c (get_package_directory_from_module): Plug a small
memory leak. Minor code reordering.
(g_win32_get_package_installation_subdirectory): Allow empty subdir.
2001-10-23 Tor Lillqvist <tml@iki.fi>
* {glib,gmodule,gobject,gthread}/Makefile.am: (Win32): If we
have built the MSVC import library, install it. Install the
gcc import library. Also support uninstall.
2001-10-19 Tor Lillqvist <tml@iki.fi>
* configure.in: Fix test for lib.exe. Can't set ms_librarian
before calling AC_CHECK_PROG, as it doesn't actually check
anything if the result variable has been preset...
2001-10-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/gutils.c (g_set_prgname, g_get_prgname): Use another LOCK
for g_prgname to avoid deadlocking. (#62606)
Fri Oct 12 18:24:02 2001 Tim Janik <timj@gtk.org>
* glib/gpattern.[hc]: make struct _GPatternSpec and GMatchType
private.
(g_pattern_equal): new function to return equality of two patterns
(required because GPatternSpec is private now).
(g_pattern_spec_new): fix bug wrg wildcard counting which produced
incorrect pattern specs (discovered by Matthias Clasen).
optimized code so we just keep one compiled pattern string now.
correctly canonicalize patterns. reduce string walks, optimize
decision about MATCH_ALL vs. MATCH_ALL_TAIL.
(g_pattern_match_string): call just g_pattern_match() with NULL
reversed string.
(g_pattern_match): allow NULL reversed strings now, reverse_dup
strings on demand.
* tests/patterntest.c (test_compilation): added an extended testcase
for pattern matching from Matthias Clasen <matthiasc@poet.de>.
Sat Oct 13 06:58:23 2001 Tim Janik <timj@gtk.org>
* glib/tmpl/patterns.sgml: amended documentation.
2001-10-03 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (Win32) (DllMain): New function (DLL entry point)
to tuck away actual DLL name.
(GLIB_LOCALE_DIR) Use actual DLL name, instead of assuming one
naming convention for DLLs.
* glib/glib.def: g_string_append_printf.
2001-10-02 Sven Neumann <sven@gimp.org>
* glib/gstring.h (g_string_sprintfa): let the compatibility definition
point to the new name g_string_append_printf().
* glib/gscanner.h (GScannerMsgFunc): make third argument a gboolean.
(g_scanner_add_symbol, g_scanner_remove_symbol,
g_scanner_foreach_symbol): mark these
G__DISABLE_DEPRECATED. (#61469)
* glib/gscanner.c (g_scanner_msg_handler): make third argument gboolean. (#61468)
2001-09-30 Tor Lillqvist <tml@iki.fi>
* glib/gwin32.c
* glib/gwin32.h
* glib/glib.def: Remove own implementation of dirent
functions. Instead, gcc (mingw) users should go ahead and use the
<dirent.h> included with the mingw gcc, and the dirent functions
included in libmingw32, while MSVC users can use the same (public
domain) code, extracted from mingw-runtime sources and placed in
build/win32/dirent.[ch].
* glib/gwin32.c (get_package_directory_from_module,
g_win32_get_package_installation_directory): Use static lock to
protect static hash table.
Sat Sep 29 02:33:14 2001 George Lebl <jirka@5z.com>
* tests/testglib.c (main): cast the string size to gulong and use %lu
for printing to avoid 64bit issues
* glib/gstrfuncs.[ch] (g_ascii_strncasecmp): Change the 'n' argument
to gsize instead guint.
Fri Sep 28 19:41:32 2001 Owen Taylor <otaylor@redhat.com>
* glib/libcharset/* configure.in: Fix macros from libcharset
to work with autoconf-2.5x. (From Laszlo Peter.)
2001-09-24 Bruno Haible <haible@clisp.cons.org>
* glib/gwin32.c (g_win32_getlocale): When the sublangid is
SUBLANG_DEFAULT, return the locale of the language's main country,
not a country-neutral locale. E.g. "en_US" instead of "en". Add
handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
(China == CN, CH == Switzerland). Ignore empty environment
variable values.
2001-09-28 Tor Lillqvist <tml@iki.fi>
* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
source file from libcharset and compile in this directory.
* glib/giochannel.c: Mark rest of g_set_error strings for
translation, too.
* glib/giowin32.c: Add some debugging output functions, call them
when debugging.
(create_events, g_io_win32_msg_write): Free message fetched with
g_win32_error_message ().
(g_io_win32_check): Indentation fixes.
(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
like on Unix. This helps making the test programs run
successfully.
* glib/gmain.c (g_poll): Return the code ifdeffed out with
TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
seem to work as previously with the code in place. Especially
spawn-test didn't work with the code ifdeffed out (Bug#61067).
* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
on Unix.
* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
accidentally left in.
gthread:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* gthread-win32.c: Use an extra level of indirection for GMutex.
It is now a pointer either to a pointer to a CRITICAL_SECTION
struct, or to a mutex HANDLE. This is needed in case the user
defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
the size of *GMutex, but this used to vary depending on whether we
at run-time chose to use CRITICAL_SECTIONs or mutexes.
(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
DeleteCriticalSection() when done with it.
* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
g_thread_impl_init() before accessing
g_thread_functions_for_glib_use_default, as the
g_thread_impl_init() function might modify it.
po:
2001-09-28 Tor Lillqvist <tml@iki.fi>
* POTFILES.in: Add iochannel.c and giowin32.c.
* sv.po: Remove a bogus fuzziness indicator.
Thu Sep 27 14:26:57 2001 Owen Taylor <otaylor@redhat.com>
* glib/gstrfuncs.c (g_ascii_strup/down): Use gssize to
match the header. (Reported by Elliot Lee.)
Wed Sep 26 22:34:12 2001 Owen Taylor <otaylor@redhat.com>
Fixes for #58195, based on some ideas from Hidetosh Tajima.
* aclibcharset.m4 glib/libcharset: Add Bruno Haible's
portable-current charset detection code from libiconv.
* glib/gutf8.c (g_utf8_get_charset_internal): Rewrite
to use _g_locale_charset().
* glib/gutf8.c (_g_charset_get_aliases): Private functions
to get aliases from libcharset for a particular canonical
name.
* glib/gconvert.c: If loading a charset fails, try
aliases to look for fallbacks.
2001-09-26 Tor Lillqvist <tml@iki.fi>
* configure.in: Retract my change earlier today. Don't preset
autoconf variables in a try to match both mingw and MSVC. Instead,
he who packages a prebuilt GLib developer distribution for Win32
runs configure twice: once for mingw, once for MSVC, and then uses
diff -D on the glibconfig.h files to generate a suitably ifdeffed
glibconfig.h for distribution that suits both compilers. (Ditto
for config.h, although that file wouldn't be distributed in a
developer package, but in a source package for Win32 users who
want to build GLib but can't use configure.)
* glibconfig.h.win32.in
* config.h.win32.in: Generated by using diff -D as described above.
* tests/makefile.mingw.in (.c.exe): Correct name of gthread (import)
library.
gthread:
2001-09-26 Tor Lillqvist <tml@iki.fi>
* makefile.mingw.in: Fix couple of typos.
* gthread.def: Add g_thread_init_with_errorcheck_mutexes.
Wed Sep 26 15:33:37 2001 Owen Taylor <otaylor@redhat.com>
* Makefile.am po/Makefile.in.in: Fix distclean to
remove some extra files. #60993, Ben Gertzfield
Wed Sep 26 14:37:52 2001 Owen Taylor <otaylor@redhat.com>
* glib/gen-unicode-tables.pl glib/guniprop.c
glib/{gunibreak,gunichartables,gunidecomp}.h:
Patch from Andrew Taylor to make much of the unicode
table data const so that it can be made read-only
and shared.
Wed Sep 26 12:41:05 2001 Owen Taylor <otaylor@redhat.com>
* glib/gstrfuncs.c (g_strdup_vprintf): Copy if
!g_mem_is_system_malloc, not the other way around.
(Found by James Antill.)
Wed Sep 26 11:00:31 2001 Owen Taylor <otaylor@redhat.com>
* glib/gstrfuncs.c (g_strnfill): Use memset; might be
faster if someone used this for a biiig string.
(Suggestion from Jakub Jelinek)
2001-09-26 Tor Lillqvist <tml@iki.fi>
* configure.in: (Win32:) Move the Win32 check closer to the start,
after the BeOS checks. Preset some autoconf variables so that
configure won't find those few headers and functions that gcc
(mingw) pretends to implement (even if the actual C library
doesn't), but MSVC doesn't. This because I want the same config.h
and glibconfig.h to be usable both from gcc and MSVC (as they use
the same C library). Some other minor hackery for this purpose.
* glibconfig.h.win32.in
* config.h.win32.in: Use versions generated by configure (and
hand-edited slightly).
Tue Sep 25 11:34:22 2001 Owen Taylor <otaylor@redhat.com>
* configure.in: Version 1.3.9 (binary, interface == 0)
* glib/gstrfuncs.c (g_ascii_strdown): Change g_ascii_strup/strdown
to take a 'len' argument to match g_utf8_strup/strdown. This
hopefully will also make it more obvious that they duplicate
the string rather than acting like g_strup/strdown.
(Suggestion from Matthias Clasen, #59550)
2001-09-25 Tor Lillqvist <tml@iki.fi>
* configure.in: More Win32 automake macros. For .def files:
GLIB_DEF, GMODULE_DEF, GOBJECT_DEF and GTHREAD_DEF. For .exp
files: TESTGMODULE_EXP (for programs that need to export symbols,
just testgmodule here). A new conditional, MS_LIB_AVAILABLE to
test whether the Microsoft librarian ("ar") is available to build
MS import libraries.
* glib/Makefile.am
* gmodule/Makefile.am: Use above. New rule to build MS import
library.
* glib/makefile.msc.in
* tests/makefile.msc.in
* tests/makefile.mingw.in: Use same DLL and import library names as
libtool.
gmodule:
2001-09-25 Tor Lillqvist <tml@iki.fi>
* makefile.mingw.in: Fix missing end @ in @LT_CURRENT@.
* makefile.msc.in: Use same DLL and import library names as
libtool.
gobject:
2001-09-25 Tor Lillqvist <tml@iki.fi>
* Makefile.am: Use new macros for .def file, and check for
MS_LIB_AVAILABLE, new rule to build MS import library.
* makefile.msc.in: Use same DLL and import library names as
libtool.
gthread:
2001-09-25 Tor Lillqvist <tml@iki.fi>
* Makefile.am: Use new macros for .def file, and check for
MS_LIB_AVAILABLE, new rule to build MS import library.
* makefile.msc.in: Use same DLL and import library names as
libtool.
2001-09-22 Hans Breuer <hans@breuer.org>
* glib/giowin32.c : simply setting is_readable and is_writeable
to TRUE does make Gimp plug-ins work again. Still no API known
to request this info on Win32 (see #57690)
2001-09-20 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_path_is_absolute): (Win32:) Accept also forward
slashes. (But still don't accept them in the other functions
here. This is a thorny issue. Windows in fact does treat / like \
on input (at least as local directory separators, dunno about
server/share separators). But GLib only has the one
G_DIR_SEPARATOR value, that apps should scan for, and use when
building pathnames. To properly fix this would require totally
abstracting pathnames, and don't having any path name scanning and
building in applications at all. Fat chance.)
(GLIB_LOCALE_DIR): Redefine only on "pure" Win32, not Cygwin. Use
subdirectory "share\locale", as on Unix.
* glib/gwin32.c: Don't need to define those langiage and
sublanguage constants here, current mingw (w32api) headers have
them.
* glib/glib.def: Add a few missing entry points.
* tests/testglib.c (main): Use same name for DLL as libtool does.
Use G_DIR_SEPARATOR in g_path_get_basename tests.
Wed Sep 19 16:35:22 2001 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c (g_main_context_find_source_by[_funcs]_user_data):
Fix handling of user data when locating sources.
(#60414, Katsuhiro Okuno)
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.
Wed Sep 19 14:05:27 2001 Owen Taylor <otaylor@redhat.com>
* glib/{gcache.c,gmem.c,grel.c,gstring.c,gtimer.c,gtree}:
Patch from Darin Adler to remove GReal* structures in
favor of simple opaque typedefs in cases where there
were no non-private members. (#59693)
Wed Sep 19 12:49:11 2001 Owen Taylor <otaylor@redhat.com>
* glib/gutils.c (g_get_any_init): Handle failure of
sysconf and pick a fixed size buffer. (Happens on Cygwin
#60242)
2001-09-19 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/gthread.h (GThreadFunctions): Add thread_equal function to
allow for platform defined function to compare two threads.
* glib/gthread.c: Use g_thread_functions_for_glib_use.thread_equal
when non-NULL instead of ==.
* gthread/gthread-posix.c: Add g_thread_equal_posix_impl and
add to the function vector g_thread_functions_for_glib_use_default.
* gthread/gthread-solaris.c, gthread/gthread-win32.c: Add NULL
as equal function, as on those two platforms you don't need an
equal function.