Commit Graph

6 Commits

Author SHA1 Message Date
Tor Lillqvist
754d8ddad8 Cygwin support contributed by Stefan Ondrejicka <ondrej@idata.sk>.
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.

	* testglib.c: Make some vars static. Add Cygwin path tests.
2001-03-09 21:31:21 +00:00
Havoc Pennington
1c391cc698 include string.h
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
2001-02-17 23:30:48 +00:00
Tor Lillqvist
69dbd6eb03 Add doc comments. (g_win32_get_package_installation_directory): Add one
2001-01-17  Tor Lillqvist  <tml@iki.fi>

	* gwin32.c (g_win32_getlocale, g_win32_error_message): Add doc
	comments.
	(g_win32_get_package_installation_directory): Add one parameter,
	the name of a DLL in the package. Add possibility to use that to
	deduce the installation directory if not entered into the
	Registry. Make the return value dynamically allocated.
	(g_win32_get_package_installation_subdirectory): New convenience
	function.

	* gutils.c (GLIB_LOCALE_DIR)
	* gwin32.h: Adapt accordingly.

	* testglib.c (main): Adapt tests accordingly.
2001-01-17 21:37:32 +00:00
Tor Lillqvist
a9d05d4cc4 Define ENABLE_NLS and GETTEXT_PACKAGE.
2001-01-17  Tor Lillqvist  <tml@iki.fi>

	* config.h.win32.in: Define ENABLE_NLS and GETTEXT_PACKAGE.

	* makefile.mingw.in
	* makefile.msc.in: Use the GNU intl library.

	* gwin32.c (g_win32_get_package_installation_directory): New
	function. To be used by various GLib-using packages to get their
	installation directory, which should be stored in the Registry by
	some installer.

	* gwin32.h: Declare it.

	* testglib.c (main): Test it.

	* gutils.c: On Win32, define GLIB_LOCALE_DIR using
	g_win32_get_package_installation_directory().

	* glib.def: Update.
2001-01-16 22:06:23 +00:00
Tor Lillqvist
835b593a6f Make #endif comment match #ifdef.
2000-11-14  Tor Lillqvist  <tml@iki.fi>

	* gwin32.h: Make #endif comment match #ifdef.
2000-11-14 21:40:28 +00:00
Tor Lillqvist
4905022b8e Pass -DGSPAWN_HELPER when building it. Link with user32.lib.
2000-10-19  Tor Lillqvist  <tml@iki.fi>

	* makefile.msc.in: Pass -DGSPAWN_HELPER when building it. Link
	with user32.lib.

	* gspawn-win32.c
	* gfileutils.c: Make them compile with picky MSVC.

	* gwin32.h: New file. Move Win32-only stuff that isn't related to
	GIOChannels here from giochannel.h.

	* Makefile.am: Add it here.

	* giochannel.h: Move stuff to gwin32.h.

	* glib.h: On Win32, include gwin32.h.
2000-10-19 17:52:12 +00:00