Commit Graph

1865 Commits

Author SHA1 Message Date
Tor Lillqvist
6add23f1b9 Add bug number. 2005-02-02 23:55:04 +00:00
Tor Lillqvist
67221dc03b Remove unnecessary MSVC-only typedef for pid_t. GLib does not pretend to
2005-02-02  Tor Lillqvist  <tml@novell.com>

	* glib/gwin32.h: Remove unnecessary MSVC-only typedef for
	pid_t. GLib does not pretend to be a POSIX emulation library.
2005-02-02 23:52:31 +00:00
Tor Lillqvist
031ebdd193 Don't use potentially incorrect errno in several places. (#165951)
2005-02-02  Tor Lillqvist  <tml@novell.com>

	* glib/gfileutils.c: Don't use potentially incorrect errno in
	several places. (#165951)
	(g_mkstemp): Set errno appropriately.
2005-02-02 23:28:18 +00:00
Tor Lillqvist
92c4eebc05 In the Win32 part of all functions, handle invalid UTF-8 more robustly.
2005-02-02  Tor Lillqvist  <tml@novell.com>

	* glib/gstdio.c: In the Win32 part of all functions, handle
	invalid UTF-8 more robustly. Don't pass the resulting NULL
	wide-char or codepage strings on to C library functions, but bail
	out early. (#166084)
2005-02-02 23:12:38 +00:00
Matthias Clasen
5a866843df Move doc comments inline.
2005-02-02  Matthias Clasen  <mclasen@redhat.com>

	* glib/gutils.c: Move doc comments inline.

	* glib/ghash.h: Adjust some argument names.

	* configure.in: Give meaningful names to g_memmove()
	arguments.
2005-02-02 06:07:14 +00:00
Matthias Clasen
4a2773ee7b Add test case for key removal.
2005-02-01  Matthias Clasen  <mclasen@redhat.com>

	* tests/keyfile-test.c (test_key_remove): Add test case for
	key removal.

	* glib/gkeyfile.c (g_key_file_remove_key): Actually remove
	the key from the list of pairs.  (#165980, David Hoover)
2005-02-02 03:25:00 +00:00
Matthias Clasen
afb83c6f3b Doc clarifications. (#165907, Vincent Untz)
2005-02-01  Matthias Clasen  <mclasen@redhat.com>

	* glib/gkeyfile.c: Doc clarifications.  (#165907, Vincent Untz)
2005-02-01 14:17:25 +00:00
Matthias Clasen
df59e8e19b Add test case for group removal.
2005-02-01  Matthias Clasen  <mclasen@redhat.com>

	* tests/keyfile-test.c (test_group_remove): Add test case for
	group removal.

	* glib/gkeyfile.c (g_key_file_remove_group): Don't segfault
	if the group doesn't exist.  (#165887, Mathias Hasselmann)
2005-02-01 14:10:46 +00:00
Matthias Clasen
396253b84d Some more unit tests.
2005-01-30  Matthias Clasen  <mclasen@redhat.com>

	* tests/keyfile-test.c: Some more unit tests.
2005-01-30 06:33:10 +00:00
Christian Rose
638ff5498d Added "tl" to ALL_LINGUAS. Added Tagalog translation by Eric Pareja
2005-01-28  Christian Rose  <menthos@menthos.com>

	* configure.in: Added "tl" to ALL_LINGUAS.
	* po/tl.po: Added Tagalog translation by
	Eric Pareja <xenos@upm.edu.ph>.
2005-01-28 18:43:34 +00:00
Matthias Clasen
5d549e5bdb Let $srcdir default to .
2005-01-24  Matthias Clasen  <mclasen@redhat.com>

	* tests/run-markup-tests.sh: Let $srcdir default to .
2005-01-24 17:35:44 +00:00
Matthias Clasen
39a681995c Add a test with a long entity name.
2005-01-24  Matthias Clasen  <mclasen@redhat.com>

	* tests/markups/fail-40.gmarkup: Add a test with a long entity
	name.

	* glib/gmarkup.c (unescape_text_state_inside_entity_name): Don't
	copy the entity name into a short buffer of fixed length. Instead,
	compare it in place with strncmp(), and do a full strdup() in the
	error path.  (#165100, Simon Budig)
2005-01-24 17:25:37 +00:00
Tor Lillqvist
76d763485b Don't g_assert that localtime() returns non-NULL. It does return NULL at
2005-01-22  Tor Lillqvist  <tml@novell.com>

	* glib/gdate.c (g_date_set_time): Don't g_assert that localtime()
	returns non-NULL. It does return NULL at least on Win32 if you
	pass it a negative time_t, which although wrong, shouldn't cause
	an application to abort. Instead return 2000-01-01 as a default
	date. Print a warning unless G_DISABLE_CHECKS. (#164622)
2005-01-22 22:10:45 +00:00
Matthias Clasen
3db329a613 Don't interpret leading zeros as octal. The specification requires %f
2005-01-20  Matthias Clasen  <mclasen@redhat.com>

	* glib/gkeyfile.c (g_key_file_parse_value_as_integer): Don't
	interpret leading zeros as octal. The specification requires
	%f parsing, and %f doesn't allow octal.

	* tests/keyfile-test.c: Add some more tests.
2005-01-20 17:16:47 +00:00
Matthias Clasen
9775edea89 Add some more tests.
2005-01-20  Matthias Clasen  <mclasen@redhat.com>

	* tests/keyfile-test.c: Add some more tests.

	* glib/gkeyfile.c (g_key_file_get_keys): Return keys in
	the order found in the file, rather than the opposite.
	(g_key_file_parse_value_as_string): Fix error reporting.
2005-01-20 15:31:55 +00:00
Matthias Clasen
92a710ba28 Accept \r\n as line end. (#163030, Bastian Nocera)
2005-01-19  Matthias Clasen  <mclasen@redhat.com>

	* glib/gkeyfile.c (g_key_file_parse_data): Accept \r\n as
	line end.  (#163030, Bastian Nocera)
	(g_key_file_load_from_data): Make -1 work as a size.

	* tests/keyfile-test.c: Some unit tests for the keyfile
	parser.

	* tests/Makefile.am (test_programs): Add keyfile-test.
2005-01-19 14:14:27 +00:00
Tor Lillqvist
b45420bca8 Nah, don't use FatalAppExit(). abort() is better. 2005-01-19 02:27:37 +00:00
Tor Lillqvist
a4bfec4f1d On Win32 call G_BREAKPOINT() if being debugged.
2005-01-19  Tor Lillqvist  <tml@novell.com>

	* glib/gbacktrace.c (g_on_error_stack_trace): On Win32 call
	G_BREAKPOINT() if being debugged.

	* glib/gmessages.c (g_logv): For fatal messages on Win32, use
	G_BREAKPOINT() also without G_ENABLE_DEBUG, but only if being
	debugged. Suggestion by Ulf Lamping. Otherwise use FatalAppExit().
2005-01-19 01:55:40 +00:00
Matthias Clasen
4b95bf234b Don't include alloca.h. It is not needed, and does not exist on win32.
2005-01-18  Matthias Clasen  <mclasen@redhat.com>

	* glib/gqsort.c: Don't include alloca.h. It is not needed,
	and does not exist on win32.  (#164468, Kazuki IWAMOTO)
2005-01-18 13:41:57 +00:00
Matthias Clasen
c8a9a239ca Fix a sparse warning. (#164467, Kjartan Maraas)
2005-01-18  Matthias Clasen  <mclasen@redhat.com>

	* glib/gkeyfile.c (g_key_file_get_boolean_list): Fix a
	sparse warning.  (#164467, Kjartan Maraas)
2005-01-18 13:19:02 +00:00
Matthias Clasen
b403b41e15 Don't crash if G_FILENAME_ENCODING is empty. (#164330, Pawel Sakowski)
2005-01-17  Matthias Clasen  <mclasen@redhat.com>

	* glib/gconvert.c (g_get_filename_charsets): Don't crash
	if G_FILENAME_ENCODING is empty.  (#164330, Pawel Sakowski)
2005-01-17 15:28:59 +00:00
Tor Lillqvist
68bf100001 sh portability fix. Use "test" and not [. (#163144, Robert Ögren)
2005-01-15  Tor Lillqvist  <tml@iki.fi>

	* configure.in: sh portability fix. Use "test" and not [.
	(#163144, Robert Ögren)
2005-01-15 22:40:16 +00:00
Matthias Clasen
158f95a4bd Sync to glibc. (#133994, Morten Welinder, patch by Kjartan Maraas)
2005-01-13  Matthias Clasen  <mclasen@redhat.com>

	* glib/gqsort.c: Sync to glibc.  (#133994, Morten Welinder,
	patch by Kjartan Maraas)
2005-01-13 18:04:18 +00:00
Owen Taylor
de67d93121 Add gmodule-export-2.0.pc to AC_CONFIG_FILES.
2005-01-11  Owen Taylor <otaylor@redhat.com>

        * configure.in: Add gmodule-export-2.0.pc to AC_CONFIG_FILES.

        * glib/Makefile.am gobject/Makefile.am gthread/Makefile.am:
        Use grep | head -n 1 instead of grep -m 1 which doesn't work
        with slightly older versions of GNU grep in
        install-libtool-import-lib rule.
2005-01-11 20:39:00 +00:00
Matthias Clasen
bb2a51ab7b Typo fix. 2005-01-11 15:46:19 +00:00
Owen Taylor
5a18db1986 Add missing ChangeLog.pre*
2005-01-10  Owen Taylor  <otaylor@redhat.com>

        * Makefile.am (EXTRA_DIST): Add missing ChangeLog.pre*
2005-01-10 16:08:48 +00:00
Owen Taylor
65f0a6104c Split ChangeLog for 2.6 2005-01-10 15:52:23 +00:00
Tor Lillqvist
0bf59d828d Include also wchar.h for wcslen on Cygwin. (#163133, Roger Leigh)
2005-01-09  Tor Lillqvist  <tlillqvist@novell.com>

	* glib/gwin32.c: Include also wchar.h for wcslen on
	Cygwin. (#163133, Roger Leigh)
2005-01-09 22:55:52 +00:00
Hans Breuer
c21df964da make it compile with mvc6 default sdk, (#define INVALID_FILE_ATTRIBUTES,
2005-01-09  Hans Breuer  <hans@breuer.org>

	* glib/gfileutils.c : make it compile with mvc6 default sdk,
	(#define INVALID_FILE_ATTRIBUTES, FILE_ATTRIBUTE_DEVICE)
2005-01-09 21:43:40 +00:00
Tor Lillqvist
c844b548f3 Fix cast. (#163133, Roger Leigh)
2005-01-09  Tor Lillqvist  <tlillqvist@novell.com>

	* glib/gwin32.c (g_win32_error_message): Fix cast. (#163133, Roger
	Leigh)
2005-01-09 19:11:40 +00:00
Tor Lillqvist
f45d2ee724 Include <io.h> on Windows for prototypes. (#163390, Kazuki Iwamoto)
2005-01-09  Tor Lillqvist  <tlillqvist@novell.com>

	* glib/gfileutils.c: Include <io.h> on Windows for
	prototypes. (#163390, Kazuki Iwamoto)
2005-01-09 01:18:32 +00:00
Matthias Clasen
c80d4559d6 Typo fixes.
2005-01-07  Matthias Clasen  <mclasen@redhat.com>

	* NEWS: Typo fixes.
2005-01-07 17:42:19 +00:00
Matthias Clasen
1fd8041920 Bump version
2005-01-07  Matthias Clasen  <mclasen@redhat.com>

	* configure.in: Bump version
2005-01-07 17:39:54 +00:00
Matthias Clasen
3d1e4844bb 2.6.1 2005-01-07 16:58:16 +00:00
Matthias Clasen
117ae23f5d Generate and distribute gmodule-export-2.0.pc, which is currently just a
2005-01-07  Matthias Clasen  <mclasen@redhat.com>

	* configure.in:
	* Makefile.am: Generate and distribute gmodule-export-2.0.pc,
	which is currently just a copy of gmodule-2.0.pc, but makes
	it explicit that it adds --export-dynamic.

	* gmodule-export-2.0.pc.in: Copy of gmodule-2.0.pc.in.
2005-01-07 15:20:15 +00:00
Tor Lillqvist
bd77b4b4a9 configure.in glib/Makefile.am Win32 cross-compilation fixes. (#163144, J.
2005-01-06  Tor Lillqvist  <tml@iki.fi>

	* configure.in
	* glib/Makefile.am
	* gobject/Makefile.am: Win32 cross-compilation fixes. (#163144,
	J. Ali Harlow)
2005-01-06 19:15:49 +00:00
Tor Lillqvist
b687214a7c glib/Makefile.am glib.def and gobject.def are generated, not in $(srcdir).
2005-01-06  Tor Lillqvist  <tml@iki.fi>

	* glib/Makefile.am
	* gobject/Makefile.am: glib.def and gobject.def are generated, not
	in $(srcdir). (#163143, J. Ali Harlow)
2005-01-06 17:18:12 +00:00
Matthias Clasen
0bf9bc065c Simplify the inlining magic to make it work at Oh zero. (#162990, Kalpesh
2005-01-05  Matthias Clasen  <mclasen@redhat.com>

	* glib/gutils.h: Simplify the inlining magic to make it
	work at Oh zero.  (#162990, Kalpesh Shah)
2005-01-05 20:10:57 +00:00
Tor Lillqvist
b7de9fc3b6 Use g_win32_getlocale() instead of setlocale() on Windows. setlocale()
2005-01-04  Tor Lillqvist  <tml@iki.fi>

	* glib/guniprop.c (get_locale_type): Use g_win32_getlocale()
	instead of setlocale() on Windows. setlocale() returns strings
	like "Turkish_Turkey".
2005-01-04 21:21:07 +00:00
Matthias Clasen
44fea2aa61 Fix the inlining magic. (#157536, Jens Hatlak, and #149907, Morten
2005-01-04  Matthias Clasen  <mclasen@redhat.com>

	Fix the inlining magic.  (#157536, Jens Hatlak, and
	#149907, Morten Welinder)

	* configure.in: Define G_CAN_INLINE in glibconfig.h

	* glib/gutils.h: Streamline the inlining magic a bit,
	don't use extern when implementing the non-inlined
	version.
2005-01-04 05:31:44 +00:00
Matthias Clasen
f0630a9106 Don't return directories. (#160738, Tommi Komulainen)
2005-01-03  Matthias Clasen  <mclasen@redhat.com>

	* glib/gutils.c (g_find_program_in_path): Don't return
	directories.  (#160738, Tommi Komulainen)
2005-01-03 19:57:20 +00:00
Matthias Clasen
30425906b5 Clarify the documentation. (#162251, Mariano Suárez-Alvarez)
2005-01-03  Matthias Clasen  <mclasen@redhat.com>

	* glib/gfileutils.c (g_file_get_contents): Clarify the
	documentation.  (#162251, Mariano Suárez-Alvarez)
2005-01-03 18:56:20 +00:00
Matthias Clasen
59e5059f05 Clarify the docs. (#162747, Crispin Flowerday)
2005-01-02  Matthias Clasen  <mclasen@redhat.com>

	* glib/gutils.c (g_setenv, g_unsetenv): Clarify the
	docs.  (#162747, Crispin Flowerday)
2005-01-03 04:21:24 +00:00
J. Ali Harlow
572e8b2756 Don't use AC_TRY_RUN to test for long long format when using the
2005-01-01  J. Ali Harlow  <ali@juiblex.co.uk>

	* configure.in: Don't use AC_TRY_RUN to test for long long format
	when using the MSVCRT.DLL runtime since we know the answer anyway
	and it causes some mild inconvience when cross compiling.

	* README.win32: Add a reference to the cross compiling section
	of the reference manual.

	* docs/reference/glib/cross.sgml: MinGW uses MSVCRT.DLL which
	requires %I64i instead of %lli. (#161306)
2005-01-03 00:20:47 +00:00
Tor Lillqvist
66f109711a Make the g_getenv() ABI backward compatibility wrapper more robust.
2005-01-01  Tor Lillqvist  <tml@iki.fi>

	* glib/gutils.c: Make the g_getenv() ABI backward compatibility
	wrapper more robust.
2005-01-01 16:55:10 +00:00
Tor Lillqvist
714887d0fa glib/glib.symbols glib/gutils.h Make also g_getenv(), g_setenv(),
2005-01-01  Tor Lillqvist  <tml@iki.fi>

	* glib/glib.symbols
	* glib/gutils.h
	* glib/gutils.c: Make also g_getenv(), g_setenv(), g_unsetenv()
	and g_find_program_in_path() take and return UTF-8 strings on
	Win32. Implement DLL ABI backward compatility for them, too. Move
	all the DLL ABI stability wrappers to the end of the file. Use
	wide character API when available in inner_find_program_in_path().

	* glib/gfileutils.c: With the UTF-8ness of g_getenv() above, just
	use g_getenv() to get PATHEXT. (Yeah, it's probably overdoing it
	to consider somebody actually having anything else than ASCII
	in PATHEXT, but...)
2005-01-01 02:09:51 +00:00
Tor Lillqvist
7e6be89c62 Rewrite the Win32 version to use GetFileAttributes() instead of stat().
2004-12-31  Tor Lillqvist  <tml@iki.fi>

	* glib/gfileutils.c (g_file_test): Rewrite the Win32 version to
	use GetFileAttributes() instead of stat(). stat() is unreliable
	for corner cases like '\\server\share' or '.\'. Part of fixing
	#161797. When testing for executability, in addition to the fixed
	set of executable file name extensions also check the PATHEXT
	environment variable.
2004-12-31 01:15:15 +00:00
Tor Lillqvist
ae9d96865d Use GetCurrentDirectory() directly for simpler buffer length management. I
2004-12-30  Tor Lillqvist  <tml@iki.fi>

	* glib/gutils.c (g_get_current_dir): Use GetCurrentDirectory()
	directly for simpler buffer length management. I don't trust
	getcwd() getting it right all the time.
2004-12-30 17:48:23 +00:00
Matthias Clasen
647aba60aa Typo fix. 2004-12-30 05:18:56 +00:00
Tor Lillqvist
b76a6afcb8 Require UNC paths to start with exactly two slashes. (g_get_current_dir):
2004-12-30  Tor Lillqvist  <tml@iki.fi>

	* glib/gutils.c (g_path_skip_root): Require UNC paths to start
	with exactly two slashes.
	(g_get_current_dir): Use wide character API when available.
	(g_path_get_dirname): Handle UNC paths better. Part of fix for
	#161797.
2004-12-30 02:00:49 +00:00