revised patch for glib compilation on cygwin with POSIX runtime
- From: Stefan Ondrejicka <ondrej idata sk>
- To: Tor Lillqvist <tml iki fi>
- Cc: gimpwin-dev yahoogroups com, gtk-devel-list gnome org
- Subject: revised patch for glib compilation on cygwin with POSIX runtime
- Date: Tue, 6 Feb 2001 17:59:14 +0100 (CET)
Hello Tor,
I have bit corrected the patch I sent you yesterday. There was quite
broken compilation of gobject library. Now it works properly. The attached
diff is made again glib cvs chackout from janury 29. I will appreciate any
commenets.
I have today also made changes to compile pkg-config on cygwin and started
some work on pango compilation on cygwin.
Best regards,
Stevo.
--
Stefan Ondrejicka <ondrej idata sk>
Beethovenova 11, 917 08 Trnava, Slovakia
http://www.idata.sk/~ondrej/
diff -ruN glib-cvs29012001/Makefile.am glib/Makefile.am
--- glib-cvs29012001/Makefile.am Mon Jan 29 11:24:08 2001
+++ glib/Makefile.am Tue Feb 6 18:57:46 2001
@@ -14,10 +14,12 @@
acglib.m4 \
sanity_check \
README.win32 \
+ README.cygwin \
TODO.xml \
glib.def \
makefile.msc.in \
makefile.mingw.in \
+ makefile.cygwin.in \
giowin32.c \
glibconfig.h.win32.in \
gwin32.c \
diff -ruN glib-cvs29012001/README.cygwin glib/README.cygwin
--- glib-cvs29012001/README.cygwin Thu Jan 1 01:00:00 1970
+++ glib/README.cygwin Mon Feb 5 19:18:56 2001
@@ -0,0 +1,62 @@
+Glib compilation in cygwin environment
+--------------------------------------
+
+** Intro
+
+This file expain a bit way how to compile glib package on cygwin for
+use *with* cygwin POSIX runtime.
+ As the libtool package is not able build without problems DLLs on
+win32 there is need for compilation method which differ a bit from
+standard compilation on UNIX platforms.
+ In each source directory is located makefile.cygwin.in file which
+is template for makefile.cygwin files generated by configure script.
+This makefiles contain rules for building static libraries, import
+libraries and DLL libraries. There was choosed different name for DLL
+libraries each prefixed with "cyg" to avoid confusion with DLLs which
+are compiled for MSVC or Mingw runtime.
+
+
+** Requirements:
+
+ * installed libiconv
+ * optionaly gettexts libintl
+ * building with pthreads is currently not supported on cygwin
+
+** Installation
+
+Here is commadlist used to build glib :
+
+ ./configure --with-threads=none
+ make -f makefile.cygwin
+
+
+This two commands will build following files:
+
+cygglib-1.3.dll - glib DLL library for dynamic linking
+libglib-1.3.dll.a - glib import library for previous DLL
+libglib-1.3.a - glib static library
+gmodule/cyggmodule-1.3.dll - gmodule DLL library for dynamic linking
+gmodule/libgmodule-1.3.dll.a - gmodule import library for previous DLL
+gmodule/libgmodule-1.3.a - gmodule static library
+gthread/cyggthread-1.3.dll - gthread DLL library for dynamic linking
+gthread/libgthread-1.3.dll.a - gthread import library for previous DLL
+gthread/libgthread-1.3.a - gthread static library
+gobject/cyggobject-1.3.dll - gobject DLL library for dynamic linking
+gobject/libgobject-1.3.dll.a - gobject import library for previous DLL
+gobject/libgobject-1.3.a - gobject static library
+gobject/glib_genmarshal.exe - signal marshaler generator
+
+You can install compiled files and header files manualy to location of your
+choice or you use following command:
+
+ make -f makefile.cygwin install
+
+** Warning
+
+!!! When you want link against static libraries, you must compile files
+!!! which include glib headers with defined GLIB_STATIC_COMPILATION
+!!! (-DGLIB_STATIC_COMPILATION) otherwise the linking stage of your
+!!! programs will fail.
+
+-- Stefan Ondrejicka <ondrej idata sk>
+
diff -ruN glib-cvs29012001/configure.in glib/configure.in
--- glib-cvs29012001/configure.in Mon Jan 29 11:24:12 2001
+++ glib/configure.in Mon Feb 5 18:17:24 2001
@@ -161,6 +161,9 @@
fi
fi
+AC_CYGWIN
+AC_EXEEXT
+
# define a MAINT-like variable REBUILD which is set if Perl
# and awk are found, so autogenerated sources can be rebuilt
AC_PROG_AWK
@@ -619,6 +622,12 @@
dnl G_MODULE_IMPL= don't reset, so cmd-line can override
G_MODULE_NEED_USCORE=0
G_MODULE_HAVE_DLERROR=0
+dnl *** force native WIN32 shared lib loader
+if test -z "$G_MODULE_IMPL"; then
+ if test "x$ac_cv_cygwin" = xyes; then
+ G_MODULE_IMPL=G_MODULE_IMPL_WIN32
+ fi
+fi
dnl *** dlopen() and dlsym() in system libraries
if test -z "$G_MODULE_IMPL"; then
AC_CHECK_FUNC(dlopen,
@@ -1798,6 +1807,10 @@
gmodule/Makefile
gobject/Makefile
gthread/Makefile
+makefile.cygwin
+gmodule/makefile.cygwin
+gthread/makefile.cygwin
+gobject/makefile.cygwin
po/Makefile.in
docs/Makefile
docs/glib-config.1
diff -ruN glib-cvs29012001/cygglib.def glib/cygglib.def
--- glib-cvs29012001/cygglib.def Thu Jan 1 01:00:00 1970
+++ glib/cygglib.def Mon Feb 5 13:33:46 2001
@@ -0,0 +1,586 @@
+EXPORTS
+ g_allocator_free
+ g_allocator_new
+ g_array_append_vals
+ g_array_free
+ g_array_insert_vals
+ g_array_new
+ g_array_prepend_vals
+ g_array_remove_index
+ g_array_remove_index_fast
+ g_array_set_size
+ g_array_sized_new
+ g_array_sort
+ g_array_sort_with_data
+ g_atexit
+ g_basename
+ g_bit_nth_lsf
+ g_bit_nth_msf
+ g_bit_storage
+ g_blow_chunks
+ g_byte_array_append
+ g_byte_array_free
+ g_byte_array_new
+ g_byte_array_prepend
+ g_byte_array_remove_index
+ g_byte_array_remove_index_fast
+ g_byte_array_set_size
+ g_byte_array_sized_new
+ g_byte_array_sort
+ g_byte_array_sort_with_data
+ g_cache_destroy
+ g_cache_insert
+ g_cache_key_foreach
+ g_cache_new
+ g_cache_remove
+ g_cache_value_foreach
+ g_clear_error
+ g_completion_add_items
+ g_completion_clear_items
+ g_completion_complete
+ g_completion_free
+ g_completion_new
+ g_completion_remove_items
+ g_convert
+ g_convert_error_quark
+ g_convert_with_fallback
+ g_datalist_clear
+ g_datalist_foreach
+ g_datalist_id_get_data
+ g_datalist_id_remove_no_notify
+ g_datalist_id_set_data_full
+ g_datalist_init
+ g_dataset_destroy
+ g_dataset_foreach
+ g_dataset_id_get_data
+ g_dataset_id_remove_no_notify
+ g_dataset_id_set_data_full
+ g_date_add_days
+ g_date_add_months
+ g_date_add_years
+ g_date_clear
+ g_date_compare
+ g_date_free
+ g_date_get_day
+ g_date_get_day_of_year
+ g_date_get_days_in_month
+ g_date_get_julian
+ g_date_get_monday_week_of_year
+ g_date_get_monday_weeks_in_year
+ g_date_get_month
+ g_date_get_sunday_week_of_year
+ g_date_get_sunday_weeks_in_year
+ g_date_get_weekday
+ g_date_get_year
+ g_date_is_first_of_month
+ g_date_is_last_of_month
+ g_date_is_leap_year
+ g_date_new
+ g_date_new_dmy
+ g_date_new_julian
+ g_date_set_day
+ g_date_set_dmy
+ g_date_set_julian
+ g_date_set_month
+ g_date_set_parse
+ g_date_set_time
+ g_date_set_year
+ g_date_strftime
+ g_date_subtract_days
+ g_date_subtract_months
+ g_date_subtract_years
+ g_date_to_struct_tm
+ g_date_valid
+ g_date_valid_day
+ g_date_valid_dmy
+ g_date_valid_julian
+ g_date_valid_month
+ g_date_valid_weekday
+ g_date_valid_year
+ g_direct_equal
+ g_direct_hash
+ g_dirname
+ g_error_copy
+ g_error_free
+ g_error_matches
+ g_error_new
+ g_error_new_literal
+ g_file_error_from_errno
+ g_file_error_quark
+ g_file_get_contents
+ g_file_open_tmp
+ g_file_test
+ g_filename_from_utf8
+ g_filename_to_utf8
+ g_free
+ g_get_charset
+ g_get_codeset
+ g_get_current_dir
+ g_get_current_time
+ g_get_home_dir
+ g_get_prgname
+ g_get_real_name
+ g_get_tmp_dir
+ g_get_user_name
+ g_getenv
+ g_hash_table_destroy
+ g_hash_table_foreach
+ g_hash_table_foreach_remove
+ g_hash_table_freeze
+ g_hash_table_insert
+ g_hash_table_lookup
+ g_hash_table_lookup_extended
+ g_hash_table_new
+ g_hash_table_remove
+ g_hash_table_size
+ g_hash_table_thaw
+ g_hook_alloc
+ g_hook_compare_ids
+ g_hook_destroy
+ g_hook_destroy_link
+ g_hook_find
+ g_hook_find_data
+ g_hook_find_func
+ g_hook_find_func_data
+ g_hook_first_valid
+ g_hook_free
+ g_hook_get
+ g_hook_insert_before
+ g_hook_insert_sorted
+ g_hook_list_clear
+ g_hook_list_init
+ g_hook_list_invoke
+ g_hook_list_invoke_check
+ g_hook_list_marshal
+ g_hook_list_marshal_check
+ g_hook_next_valid
+ g_hook_prepend
+ g_hook_ref
+ g_hook_unref
+ g_iconv
+ g_iconv_close
+ g_iconv_open
+ 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_io_add_watch_full
+ g_io_channel_close
+ g_io_channel_init
+ g_io_channel_read
+ g_io_channel_ref
+ g_io_channel_seek
+ g_io_channel_unix_get_fd
+ g_io_channel_unix_new
+ g_io_channel_unref
+ g_io_channel_write
+ g_io_create_watch
+ g_list_alloc
+ g_list_append
+ g_list_concat
+ g_list_copy
+ g_list_delete_link
+ g_list_find
+ g_list_find_custom
+ g_list_first
+ g_list_foreach
+ g_list_free
+ g_list_free_1
+ g_list_index
+ g_list_insert
+ g_list_insert_sorted
+ g_list_last
+ g_list_length
+ g_list_nth
+ g_list_nth_data
+ g_list_position
+ g_list_prepend
+ g_list_remove
+ g_list_remove_link
+ g_list_reverse
+ g_list_sort
+ g_list_sort_with_data
+ g_locale_from_utf8
+ g_locale_to_utf8
+ g_log
+ g_log_default_handler
+ g_log_remove_handler
+ g_log_set_always_fatal
+ g_log_set_fatal_mask
+ g_log_set_handler
+ g_logv
+ 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_is_running
+ g_main_loop_new
+ g_main_loop_quit
+ g_main_loop_ref
+ g_main_loop_run
+ g_main_loop_unref
+ g_malloc
+ g_malloc0
+ g_markup_error_quark
+ g_markup_escape_text
+ g_markup_parse_context_end_parse
+ g_markup_parse_context_free
+ g_markup_parse_context_get_position
+ g_markup_parse_context_new
+ g_markup_parse_context_parse
+ g_mem_chunk_alloc
+ g_mem_chunk_alloc0
+ g_mem_chunk_clean
+ g_mem_chunk_destroy
+ g_mem_chunk_free
+ g_mem_chunk_info
+ g_mem_chunk_new
+ g_mem_chunk_print
+ g_mem_chunk_reset
+ g_mem_init
+ g_mem_profile
+ g_mem_set_vtable
+ g_memdup
+ g_messages_init
+ g_mkstemp
+ g_mutex_init
+ g_node_child_index
+ g_node_child_position
+ g_node_children_foreach
+ g_node_copy
+ g_node_depth
+ g_node_destroy
+ g_node_find
+ g_node_find_child
+ g_node_first_sibling
+ g_node_get_root
+ g_node_insert
+ g_node_insert_after
+ g_node_insert_before
+ g_node_is_ancestor
+ g_node_last_child
+ g_node_last_sibling
+ g_node_max_height
+ g_node_n_children
+ g_node_n_nodes
+ g_node_new
+ g_node_nth_child
+ g_node_prepend
+ g_node_reverse_children
+ g_node_traverse
+ g_node_unlink
+ g_on_error_query
+ g_on_error_stack_trace
+ g_parse_debug_string
+ g_path_get_basename
+ g_path_get_dirname
+ g_path_is_absolute
+ g_path_skip_root
+ g_print
+ g_printerr
+ g_printf_string_upper_bound
+ g_propagate_error
+ g_ptr_array_add
+ g_ptr_array_free
+ g_ptr_array_new
+ g_ptr_array_remove
+ g_ptr_array_remove_fast
+ g_ptr_array_remove_index
+ g_ptr_array_remove_index_fast
+ g_ptr_array_set_size
+ g_ptr_array_sized_new
+ g_ptr_array_sort
+ g_ptr_array_sort_with_data
+ g_qsort_with_data
+ g_quark_from_static_string
+ g_quark_from_string
+ g_quark_to_string
+ g_quark_try_string
+ g_queue_free
+ g_queue_is_empty
+ g_queue_new
+ g_queue_peek_head
+ g_queue_peek_tail
+ g_queue_pop_head
+ g_queue_pop_head_link
+ g_queue_pop_tail
+ g_queue_pop_tail_link
+ g_queue_push_head
+ g_queue_push_head_link
+ g_queue_push_tail
+ g_queue_push_tail_link
+ g_rand_double
+ g_rand_double_range
+ g_rand_free
+ g_rand_int
+ g_rand_int_range
+ g_rand_new
+ g_rand_new_with_seed
+ g_rand_set_seed
+ g_random_double
+ g_random_double_range
+ g_random_int
+ g_random_int_range
+ g_random_set_seed
+ g_realloc
+ g_relation_count
+ g_relation_delete
+ g_relation_destroy
+ g_relation_exists
+ g_relation_index
+ g_relation_insert
+ g_relation_new
+ g_relation_print
+ g_relation_select
+ g_scanner_cur_line
+ g_scanner_cur_position
+ g_scanner_cur_token
+ g_scanner_cur_value
+ g_scanner_destroy
+ g_scanner_eof
+ g_scanner_error
+ g_scanner_freeze_symbol_table
+ g_scanner_get_next_token
+ g_scanner_input_file
+ g_scanner_input_text
+ g_scanner_lookup_symbol
+ g_scanner_new
+ g_scanner_peek_next_token
+ g_scanner_scope_add_symbol
+ g_scanner_scope_foreach_symbol
+ g_scanner_scope_lookup_symbol
+ g_scanner_scope_remove_symbol
+ g_scanner_set_scope
+ g_scanner_stat_mode
+ g_scanner_sync_file_offset
+ g_scanner_thaw_symbol_table
+ g_scanner_unexp_token
+ g_scanner_warn
+ g_set_error
+ g_set_error_handler
+ g_set_message_handler
+ g_set_prgname
+ g_set_print_handler
+ g_set_printerr_handler
+ g_set_warning_handler
+ g_shell_parse_argv
+ g_shell_quote
+ g_shell_unquote
+ g_slist_alloc
+ g_slist_append
+ g_slist_concat
+ g_slist_copy
+ g_slist_delete_link
+ g_slist_find
+ g_slist_find_custom
+ g_slist_foreach
+ g_slist_free
+ g_slist_free_1
+ g_slist_index
+ g_slist_insert
+ g_slist_insert_sorted
+ g_slist_last
+ g_slist_length
+ g_slist_nth
+ g_slist_nth_data
+ g_slist_position
+ g_slist_prepend
+ g_slist_remove
+ g_slist_remove_link
+ g_slist_reverse
+ g_slist_sort
+ g_slist_sort_with_data
+ g_snprintf
+ 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_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_spawn_command_line_async
+ g_spawn_command_line_sync
+ g_spawn_error_quark
+ g_spawn_sync
+ g_static_mutex_get_mutex_impl
+ g_static_private_get
+ g_static_private_set
+ g_static_rec_mutex_lock
+ g_static_rec_mutex_trylock
+ g_static_rec_mutex_unlock
+ g_static_rw_lock_free
+ g_static_rw_lock_reader_lock
+ g_static_rw_lock_reader_trylock
+ g_static_rw_lock_reader_unlock
+ g_static_rw_lock_writer_lock
+ g_static_rw_lock_writer_trylock
+ g_static_rw_lock_writer_unlock
+ g_str_equal
+ g_str_hash
+ g_strcanon
+ g_strcasecmp
+ g_strchomp
+ g_strchug
+ g_strcompress
+ g_strconcat
+ g_strdelimit
+ g_strdown
+ g_strdup
+ g_strdup_printf
+ g_strdup_vprintf
+ g_strdupv
+ g_strerror
+ g_strescape
+ g_strfreev
+ g_string_append
+ g_string_append_c
+ g_string_append_len
+ g_string_assign
+ g_string_chunk_free
+ g_string_chunk_insert
+ g_string_chunk_insert_const
+ g_string_chunk_new
+ g_string_down
+ g_string_equal
+ g_string_erase
+ g_string_free
+ g_string_insert
+ g_string_insert_c
+ g_string_insert_len
+ g_string_new
+ g_string_prepend
+ g_string_prepend_c
+ g_string_prepend_len
+ g_string_sized_new
+ g_string_sprintf
+ g_string_sprintfa
+ g_string_truncate
+ g_string_up
+ g_strjoin
+ g_strjoinv
+ g_strlcat
+ g_strlcpy
+ g_strncasecmp
+ g_strndup
+ g_strnfill
+ g_strreverse
+ g_strsignal
+ g_strsplit
+ g_strtod
+ g_strup
+ g_thread_create
+ g_thread_error_quark
+ g_thread_functions_for_glib_use
+ g_thread_join
+ g_thread_pool_free
+ g_thread_pool_new
+ g_thread_pool_push
+ g_thread_self
+ g_thread_set_priority
+ g_thread_use_default_impl
+ 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_timer_reset
+ g_timer_start
+ g_timer_stop
+ g_trash_stack_height
+ g_trash_stack_peek
+ g_trash_stack_pop
+ g_trash_stack_push
+ g_tree_destroy
+ g_tree_height
+ g_tree_insert
+ g_tree_lookup
+ g_tree_new
+ g_tree_nnodes
+ g_tree_remove
+ g_tree_search
+ g_tree_traverse
+ g_tuples_destroy
+ g_tuples_index
+ g_ucs4_to_utf16
+ g_ucs4_to_utf8
+ g_unichar_break_type
+ g_unichar_digit_value
+ g_unichar_isalnum
+ g_unichar_isalpha
+ g_unichar_iscntrl
+ g_unichar_isdefined
+ g_unichar_isdigit
+ g_unichar_isgraph
+ g_unichar_islower
+ g_unichar_isprint
+ g_unichar_ispunct
+ g_unichar_isspace
+ g_unichar_istitle
+ g_unichar_isupper
+ g_unichar_iswide
+ g_unichar_isxdigit
+ g_unichar_to_utf8
+ g_unichar_tolower
+ g_unichar_totitle
+ g_unichar_toupper
+ g_unichar_type
+ g_unichar_xdigit_value
+ g_unicode_canonical_decomposition
+ g_unicode_canonical_ordering
+ g_usleep
+ g_utf16_to_ucs4
+ g_utf16_to_utf8
+ g_utf8_find_next_char
+ g_utf8_find_prev_char
+ g_utf8_get_char
+ g_utf8_offset_to_pointer
+ g_utf8_pointer_to_offset
+ g_utf8_prev_char
+ g_utf8_skip
+ g_utf8_strchr
+ g_utf8_strlen
+ g_utf8_strncpy
+ g_utf8_to_ucs4
+ g_utf8_to_ucs4_fast
+ g_utf8_to_utf16
+ g_utf8_validate
+ g_vsnprintf
+ g_win32_error_message
+ g_win32_get_package_installation_directory
+ g_win32_get_package_installation_subdirectory
+ g_win32_getlocale
+ glib_binary_age
+ glib_interface_age
+ glib_major_version
+ glib_micro_version
+ glib_minor_version
diff -ruN glib-cvs29012001/gconvert.c glib/gconvert.c
--- glib-cvs29012001/gconvert.c Mon Jan 29 11:24:13 2001
+++ glib/gconvert.c Sun Feb 4 21:20:46 2001
@@ -28,7 +28,7 @@
#include "glib.h"
#include "config.h"
-#ifdef G_OS_WIN32
+#if defined(G_OS_WIN32) || defined(G_WITH_CYGWIN)
#include <windows.h>
#endif
@@ -516,7 +516,7 @@
gint *bytes_written,
GError **error)
{
-#ifdef G_OS_WIN32
+#if defined(G_OS_WIN32) || defined(G_WITH_CYGWIN)
gint i, clen, total_len, wclen, first;
wchar_t *wcs, wc;
@@ -612,7 +612,7 @@
return result;
-#else
+#else /* !G_OS_WIN32 && !G_WITH_CYGWIN */
char *charset, *str;
@@ -623,7 +623,7 @@
"UTF-8", charset, bytes_read, bytes_written, error);
return str;
-#endif
+#endif /* !G_OS_WIN32 && !G_WITH_CYGWIN */
}
/**
@@ -657,7 +657,7 @@
gint *bytes_written,
GError **error)
{
-#ifdef G_OS_WIN32
+#if defined(G_OS_WIN32) || defined(G_WITH_CYGWIN)
gint i, mask, clen, mblen;
wchar_t *wcs, *wcp;
@@ -759,7 +759,7 @@
return result;
-#else
+#else /* !G_OS_WIN32 && !G_WITH_CYGWIN */
gchar *charset, *str;
@@ -771,7 +771,7 @@
return str;
-#endif
+#endif /* !G_OS_WIN32 && !G_WITH_CYGWIN */
}
/**
@@ -804,11 +804,11 @@
gint *bytes_written,
GError **error)
{
-#ifdef G_OS_WIN32
+#if defined(G_OS_WIN32) || defined(G_WITH_CYGWIN)
return g_locale_to_utf8 (opsysstring, len,
bytes_read, bytes_written,
error);
-#else
+#else /* !G_OS_WIN32 && !G_WITH_CYGWIN */
if (getenv ("G_BROKEN_FILENAMES"))
return g_locale_to_utf8 (opsysstring, len,
bytes_read, bytes_written,
@@ -828,7 +828,7 @@
return g_strdup (opsysstring);
else
return g_strndup (opsysstring, len);
-#endif
+#endif /* !G_OS_WIN32 && !G_WITH_CYGWIN */
}
/**
@@ -860,11 +860,11 @@
gint *bytes_written,
GError **error)
{
-#ifdef G_OS_WIN32
+#if defined(G_OS_WIN32) || defined(G_WITH_CYGWIN)
return g_locale_from_utf8 (utf8string, len,
bytes_read, bytes_written,
error);
-#else
+#else /* !G_OS_WIN32 && !G_WITH_CYGWIN */
if (getenv ("G_BROKEN_FILENAMES"))
return g_locale_from_utf8 (utf8string, len,
bytes_read, bytes_written,
@@ -884,7 +884,7 @@
return g_strdup (utf8string);
else
return g_strndup (utf8string, len);
-#endif
+#endif /* !G_OS_WIN32 && !G_WITH_CYGWIN */
}
diff -ruN glib-cvs29012001/gfileutils.c glib/gfileutils.c
--- glib-cvs29012001/gfileutils.c Mon Jan 29 11:24:14 2001
+++ glib/gfileutils.c Sun Feb 4 21:20:46 2001
@@ -378,7 +378,7 @@
struct stat stat_buf;
gint fd;
- fd = open (filename, O_RDONLY);
+ fd = open (filename, O_RDONLY | O_BINARY);
if (fd < 0)
{
diff -ruN glib-cvs29012001/glib.h glib/glib.h
--- glib-cvs29012001/glib.h Thu Jan 25 18:42:11 2001
+++ glib/glib.h Sun Feb 4 21:20:46 2001
@@ -68,7 +68,7 @@
#include <gtypes.h>
#include <gunicode.h>
#include <gutils.h>
-#ifdef G_OS_WIN32
+#if defined(G_OS_WIN32) || defined(G_WITH_CYGWIN)
#include <gwin32.h>
#endif
diff -ruN glib-cvs29012001/gmessages.h glib/gmessages.h
--- glib-cvs29012001/gmessages.h Thu Jan 25 18:42:21 2001
+++ glib/gmessages.h Mon Feb 5 14:26:30 2001
@@ -71,7 +71,7 @@
/* Logging mechanism
*/
-extern const gchar *g_log_domain_glib;
+GLIB_VAR const gchar *g_log_domain_glib;
guint g_log_set_handler (const gchar *log_domain,
GLogLevelFlags log_levels,
GLogFunc log_func,
diff -ruN glib-cvs29012001/gmodule/Makefile.am glib/gmodule/Makefile.am
--- glib-cvs29012001/gmodule/Makefile.am Thu Jan 25 19:37:02 2001
+++ glib/gmodule/Makefile.am Tue Feb 6 18:58:08 2001
@@ -6,6 +6,7 @@
EXTRA_DIST = \
makefile.mingw.in \
makefile.msc.in \
+ makefile.cygwin.in \
gmoduleconf.h.in \
gmodule.def \
gmodule-dl.c \
diff -ruN glib-cvs29012001/gmodule/gmodule-win32.c glib/gmodule/gmodule-win32.c
--- glib-cvs29012001/gmodule/gmodule-win32.c Thu Jan 25 19:37:03 2001
+++ glib/gmodule/gmodule-win32.c Mon Feb 5 18:12:30 2001
@@ -38,6 +38,10 @@
#include <tlhelp32.h>
#else
+#ifdef G_WITH_CYGWIN
+#include <sys/cygwin.h>
+#endif
+
/* The w32api headers supplied with the mingw gcc don't have
* tlhelp32.h. We really only need the MODULEENTRY32 struct and the
* TH32CS_SNAPMODULE value, so provide them here.
@@ -77,6 +81,12 @@
gboolean bind_lazy)
{
HINSTANCE handle;
+#ifdef G_WITH_CYGWIN
+ gchar tmp[MAX_PATH];
+
+ cygwin_conv_to_win32_path(file_name, tmp);
+ file_name = tmp;
+#endif
handle = LoadLibrary (file_name);
if (!handle)
diff -ruN glib-cvs29012001/gmodule/gmodule.h glib/gmodule/gmodule.h
--- glib-cvs29012001/gmodule/gmodule.h Thu Jan 25 19:37:04 2001
+++ glib/gmodule/gmodule.h Sun Feb 4 21:20:48 2001
@@ -38,11 +38,11 @@
* to feature Windows dll stubs.
*/
#define G_MODULE_IMPORT extern
-#if defined (G_OS_WIN32)
+#if defined(G_OS_WIN32) || defined(G_WITH_CYGWIN)
# define G_MODULE_EXPORT __declspec(dllexport)
-#else /* !G_OS_WIN32 */
+#else /* !G_OS_WIN32 && !G_WITH_CYGWIN */
# define G_MODULE_EXPORT
-#endif /* !G_OS_WIN32 */
+#endif /* !G_OS_WIN32 && !G_WITH_CYGWIN */
typedef enum
{
diff -ruN glib-cvs29012001/gmodule/makefile.cygwin.in glib/gmodule/makefile.cygwin.in
--- glib-cvs29012001/gmodule/makefile.cygwin.in Thu Jan 1 01:00:00 1970
+++ glib/gmodule/makefile.cygwin.in Mon Feb 5 19:05:38 2001
@@ -0,0 +1,98 @@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+libdir = @libdir@
+includedir = @includedir@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+MKINSTALLDIRS = ../@MKINSTALLDIRS@
+
+CC = @CC@
+RANLIB = @RANLIB@
+
+EXEEXT = @EXEEXT@
+
+GLIB_MAJOR_VERSION = @GLIB_MAJOR_VERSION@
+GLIB_MICRO_VERSION = @GLIB_MICRO_VERSION@
+GLIB_MINOR_VERSION = @GLIB_MINOR_VERSION@
+#GLIB_VERSION = @GLIB_VERSION@
+GLIB_VERSION = $(GLIB_MAJOR_VERSION).$(GLIB_MINOR_VERSION)
+
+CPPFLAGS = @CPPFLAGS@
+CFLAGS = @CFLAGS@
+DEFS = @DEFS@ -DGLIB_COMPILATION -I. -I..
+INCLUDES = -DG_LOG_DOMAIN=g_log_domain_gmodule @GLIB_DEBUG_FLAGS@ -DG_DISABLE_COMPAT_H
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
+
+gmodule_PUBLIC_HEADERS = gmoduleconf.h \
+ gmodule.h
+
+gmodule_OBJECTS = gmodule.o
+
+gmodule_STATIC_OBJECTS = gmodule.sto
+
+all: cyggmodule-$(GLIB_VERSION).dll \
+ libgmodule-$(GLIB_VERSION).a
+
+#### DLL
+cyggmodule-$(GLIB_VERSION).dll: $(gmodule_PUBLIC_HEADERS) \
+ $(gmodule_OBJECTS) \
+ gmodule.def
+ $(CC) -Wl,--enable-auto-image -Wl,--out-implib,libgmodule-$(GLIB_VERSION).dll.a -shared $(gmodule_OBJECTS) gmodule.def ../libglib-$(GLIB_VERSION).dll.a $(INTL_LIBS) -o $@
+
+libgmodule-$(GLIB_VERSION).a: $(gmodule_PUBLIC_HEADERS) \
+ $(gmodule_STATIC_OBJECTS)
+ $(AR) cru $@ $(gmodule_STATIC_OBJECTS)
+ $(RANLIB) $@
+
+#### rules
+%.o: %.c
+ @echo '$(COMPILE) -c $<'; \
+ $(COMPILE) -c $<
+
+#### static compilation
+%.sto: %.c
+ @echo '$(COMPILE) -o $@ -DGLIB_STATIC_COMPILATION -c $<'; \
+ $(COMPILE) -o $@ -DGLIB_STATIC_COMPILATION -c $<
+
+#### misc
+install: all install-headers install-libs
+
+install-headers:
+ $(MKINSTALLDIRS) $(includedir)/glib-2.0; \
+ list='$(gmodule_PUBLIC_HEADERS)'; for p in $$list; do \
+ echo " $(INSTALL_DATA) $$p $(includedir)/glib-2.0/$$p"; \
+ $(INSTALL_DATA) $$p $(includedir)/glib-2.0/$$p; \
+ done
+
+install-libs:
+ $(MKINSTALLDIRS) $(bindir); \
+ $(INSTALL) cyggmodule-$(GLIB_VERSION).dll $(bindir); \
+ $(MKINSTALLDIRS) $(libdir); \
+ $(INSTALL) libgmodule-$(GLIB_VERSION).dll.a $(libdir); \
+ $(INSTALL) libgmodule-$(GLIB_VERSION).a $(libdir);
+
+clean:
+ rm -f cyggmodule-$(GLIB_VERSION).dll libgmodule-$(GLIB_VERSION).dll.a libgmodule-$(GLIB_VERSION).a ; \
+ rm -f $(gmodule_STATIC_OBJECTS) $(gmodule_OBJECTS) ; \
+ rm -f testgmodule.o libgplugin_a.o libplugin_b.o ; \
+ rm -f testgmodule$(EXEEXT) libgplugin_a.dll libgplugin_b.dll
+
+#### tests
+tests: all testgmodule$(EXEEXT) libgplugin_a.dll libgplugin_b.dll
+
+testgmodule$(EXEEXT): cyggmodule-$(GLIB_VERSION).dll testgmodule.o
+ $(CC) -o $@ testgmodule.o ../libglib-$(GLIB_VERSION).dll.a ./libgmodule-$(GLIB_VERSION).dll.a
+
+libgplugin_a.dll: libgplugin_a.o
+ $(CC) -Wl,--enable-auto-image -shared libgplugin_a.o ../libglib-$(GLIB_VERSION).dll.a ./libgmodule-$(GLIB_VERSION).dll.a -o $@
+
+libgplugin_b.dll: libgplugin_b.o
+ $(CC) -Wl,--enable-auto-image -shared libgplugin_b.o ../libglib-$(GLIB_VERSION).dll.a ./libgmodule-$(GLIB_VERSION).dll.a -o $@
+
diff -ruN glib-cvs29012001/gobject/Makefile.am glib/gobject/Makefile.am
--- glib-cvs29012001/gobject/Makefile.am Thu Jan 25 19:37:07 2001
+++ glib/gobject/Makefile.am Tue Feb 6 18:59:02 2001
@@ -160,6 +160,7 @@
#
EXTRA_DIST += \
makefile.mingw.in \
+ makefile.cygwin.in \
makefile.msc.in \
gobject.def \
gobject.rc.in \
diff -ruN glib-cvs29012001/gobject/makefile.cygwin.in glib/gobject/makefile.cygwin.in
--- glib-cvs29012001/gobject/makefile.cygwin.in Thu Jan 1 01:00:00 1970
+++ glib/gobject/makefile.cygwin.in Tue Feb 6 17:44:07 2001
@@ -0,0 +1,211 @@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+libdir = @libdir@
+includedir = @includedir@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+MKINSTALLDIRS = ../@MKINSTALLDIRS@
+
+CC = @CC@
+RANLIB = @RANLIB@
+
+EXEEXT = @EXEEXT@
+
+GLIB_MAJOR_VERSION = @GLIB_MAJOR_VERSION@
+GLIB_MICRO_VERSION = @GLIB_MICRO_VERSION@
+GLIB_MINOR_VERSION = @GLIB_MINOR_VERSION@
+#GLIB_VERSION = @GLIB_VERSION@
+GLIB_VERSION = $(GLIB_MAJOR_VERSION).$(GLIB_MINOR_VERSION)
+
+CPPFLAGS = @CPPFLAGS@
+CFLAGS = @CFLAGS@
+DEFS = @DEFS@ -DGLIB_COMPILATION -I. -I..
+INCLUDES = -DG_LOG_DOMAIN=g_log_domain_gruntime @GLIB_DEBUG_FLAGS@ -DG_DISABLE_COMPAT_H
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
+
+gobject_PUBLIC_HEADERS = \
+ gboxed.h \
+ gbsearcharray.h \
+ gclosure.h \
+ genums.h \
+ gobject.h \
+ gparam.h \
+ gparamspecs.h \
+ gsignal.h \
+ gtype.h \
+ gtypemodule.h \
+ gtypeplugin.h \
+ gvalue.h \
+ gvaluecollector.h \
+ gvaluetypes.h
+
+gobject_OBJECTS = \
+ gboxed.o \
+ gbsearcharray.o \
+ gclosure.o \
+ genums.o \
+ gobject.o \
+ gparam.o \
+ gparamspecs.o \
+ gsignal.o \
+ gtype.o \
+ gtypemodule.o \
+ gtypeplugin.o \
+ gvalue.o \
+ gvaluetypes.o
+
+gobject_STATIC_OBJECTS = \
+ gboxed.sto \
+ gbsearcharray.sto \
+ gclosure.sto \
+ genums.sto \
+ gobject.sto \
+ gparam.sto \
+ gparamspecs.sto \
+ gsignal.sto \
+ gtype.sto \
+ gtypemodule.sto \
+ gtypeplugin.sto \
+ gvalue.sto \
+ gvaluetypes.sto
+
+
+
+all: glib-genmarshal$(EXEEXT) \
+ gmarshal.c \
+ gmarshal.h \
+ cyggobject-$(GLIB_VERSION).dll \
+ libgobject-$(GLIB_VERSION).a \
+ gobject-query$(EXEEXT)
+
+#### DLL
+cyggobject-$(GLIB_VERSION).dll: $(gobject_PUBLIC_HEADERS) \
+ $(gobject_OBJECTS) \
+ gobject.def
+ $(CC) -Wl,--enable-auto-image -Wl,--out-implib,libgobject-$(GLIB_VERSION).dll.a -shared $(gobject_OBJECTS) gobject.def -luser32 -lwsock32 -lkernel32 ../libglib-$(GLIB_VERSION).dll.a -o $@
+
+libgobject-$(GLIB_VERSION).a: $(gobject_PUBLIC_HEADERS) \
+ $(gobject_STATIC_OBJECTS)
+ $(AR) cru $@ $(gobject_STATIC_OBJECTS)
+ $(RANLIB) $@
+
+#### Programs
+glib-genmarshal$(EXEEXT): glib-genmarshal.o
+ $(CC) -o $@ glib-genmarshal.o ../libglib-$(GLIB_VERSION).dll.a
+
+gobject-query$(EXEEXT): gobject-query.o
+ $(CC) -o $@ gobject-query.o ../libglib-$(GLIB_VERSION).dll.a ./libgobject-$(GLIB_VERSION).dll.a
+
+#### rules
+%.o: %.c
+ @echo '$(COMPILE) -c $<'; \
+ $(COMPILE) -c $<
+
+#### static compilation
+%.sto: %.c
+ @echo '$(COMPILE) -o $@ -DGLIB_STATIC_COMPILATION -c $<'; \
+ $(COMPILE) -o $@ -DGLIB_STATIC_COMPILATION -c $<
+
+#### misc
+install: all install-headers install-libs install-progs
+
+install-headers:
+ $(MKINSTALLDIRS) $(includedir)/glib-2.0; \
+ list='$(gobject_PUBLIC_HEADERS)'; for p in $$list; do \
+ echo " $(INSTALL_DATA) $$p $(includedir)/glib-2.0/$$p"; \
+ $(INSTALL_DATA) $$p $(includedir)/glib-2.0/$$p; \
+ done
+
+install-libs:
+ $(MKINSTALLDIRS) $(bindir); \
+ $(INSTALL) cyggobject-$(GLIB_VERSION).dll $(bindir); \
+ $(MKINSTALLDIRS) $(libdir); \
+ $(INSTALL) libgobject-$(GLIB_VERSION).dll.a $(libdir); \
+ $(INSTALL) libgobject-$(GLIB_VERSION).a $(libdir);
+
+install-progs:
+ $(MKINSTALLDIRS) $(bindir); \
+ $(INSTALL_PROGRAM) glib_genmarshal$(EXEEXT) $(bindir)
+ $(INSTALL_PROGRAM) gobject-query$(EXEEXT) $(bindir)
+
+clean:
+ rm -f cyggobject-$(GLIB_VERSION).dll libgobject-$(GLIB_VERSION).dll.a libgobject-$(GLIB_VERSION).a glib-genmarshal$(EXEEXT) gobject-query$(EXEEXT); \
+ rm -rf $(gobject_STATIC_OBJECTS) $(gobject_OBJECTS) glib-genmarshal.o gobject-query.o ; \
+ rm -f gmarshal.strings gmarshal.c gmarshal.h
+
+
+#### Everything below this line is taken from Makefile.am and bit adjusted
+#### if something will screw, compare with the Makefile.am
+
+# we use our own built_sources variable rules to avoid automake's
+# BUILT_SOURCES oddities
+# we generate frequently rebuild files piggyback on a stamp file, so sources
+# depending on them only get rebuild when the built source actually changed
+# content
+
+# built sources that get installed with the header files
+gruntime_built_public_sources = gmarshal.h
+
+# built sources that don't get installed
+gruntime_built_sources = \
+ stamp-gmarshal.h \
+ gmarshal.c \
+ ${gruntime_built_public_sources}
+
+# non-header sources (headers should be specified in the above variables)
+# that don't serve as direct make target sources, i.e. they don't have
+# their own .lo rules and don't get publically installed
+gruntime_extra_sources = \
+ gmarshal.list \
+ gmarshal.strings \
+
+#
+# rules to generate built sources
+#
+# setup autogeneration dependancies
+gen_sources = xgen-gmh xgen-gmc xgen-gms
+CLEANFILES += $(gen_sources)
+# Makefile: oldest-source-stamp # oh boy, does automake SUCK!
+oldest-source-stamp: $(gruntime_built_sources)
+
+$(OBJECTS): oldest-source-stamp ${gruntime_built_public_sources} # this is our oldest file, used for implicit auto-generation deps
+
+# initial creation of the real stamp-* files
+gmarshal.h: # never add deps here
+ test -f "$@" || touch $@
+
+# 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.
+stamp-gmarshal.h: gmarshal.list gmarshal.h glib-genmarshal$(EXEEXT)
+ echo "#ifndef __G_MARSHAL_H__" > xgen-gmh \
+ && echo "#define __G_MARSHAL_H__" >> xgen-gmh \
+ && ./glib-genmarshal$(EXEEXT) --nostdinc --prefix=g_cclosure_marshal gmarshal.list --header >> xgen-gmh \
+ && echo "#endif /* __G_MARSHAL_H__ */" >> xgen-gmh \
+ && (cmp -s xgen-gmh gmarshal.h || cp xgen-gmh gmarshal.h) \
+ && rm -f xgen-gmh xgen-gmh~ \
+ && echo timestamp > $@
+
+gmarshal.c: stamp-gmarshal.h
+ ./glib-genmarshal --nostdinc --prefix=g_cclosure_marshal gmarshal.list --body >> xgen-gmc \
+ && cp xgen-gmc gmarshal.c \
+ && rm -f xgen-gmc xgen-gmc~
+
+gmarshal.strings: gmarshal.list
+ grep '^[A-Z]' gmarshal.list \
+ | sed -e 's/^/"g_cclosure_marshal_/' -e 's/:/__/' -e 's/,/_/g' -e 's/$$/",/' > xgen-gms \
+ && cp xgen-gms gmarshal.strings \
+ && rm -f xgen-gms xgen-gms~
+
+glib-genmarshal.o: gmarshal.strings
+
diff -ruN glib-cvs29012001/gobject/stamp-gmarshal.h glib/gobject/stamp-gmarshal.h
--- glib-cvs29012001/gobject/stamp-gmarshal.h Thu Jan 1 01:00:00 1970
+++ glib/gobject/stamp-gmarshal.h Tue Feb 6 18:33:30 2001
@@ -0,0 +1 @@
+timestamp
diff -ruN glib-cvs29012001/gstrfuncs.c glib/gstrfuncs.c
--- glib-cvs29012001/gstrfuncs.c Thu Jan 25 19:36:10 2001
+++ glib/gstrfuncs.c Sun Feb 4 21:20:47 2001
@@ -678,10 +678,10 @@
#ifdef HAVE_STRSIGNAL
#ifdef G_OS_BEOS
extern const char * strsignal(int);
-#else /* !G_OS_BEOS */
+#elif !defined(G_WITH_CYGWIN)
/* this is declared differently (const) in string.h on BeOS */
extern char *strsignal (int sig);
-#endif /* !G_OS_BEOS */
+#endif /* !G_OS_BEOS && !G_WITH_CYGWIN */
return strsignal (signum);
#elif NO_SYS_SIGLIST
switch (signum)
diff -ruN glib-cvs29012001/gthread/Makefile.am glib/gthread/Makefile.am
--- glib-cvs29012001/gthread/Makefile.am Thu Jan 25 19:37:24 2001
+++ glib/gthread/Makefile.am Tue Feb 6 18:59:08 2001
@@ -6,6 +6,7 @@
EXTRA_DIST = \
makefile.mingw.in \
+ makefile.cygwin.in \
makefile.msc.in \
gthread-posix.c \
gthread-solaris.c \
diff -ruN glib-cvs29012001/gthread/gthread-impl.c glib/gthread/gthread-impl.c
--- glib-cvs29012001/gthread/gthread-impl.c Thu Jan 25 19:37:24 2001
+++ glib/gthread/gthread-impl.c Sun Feb 4 21:20:49 2001
@@ -296,7 +296,7 @@
else
g_thread_use_default_impl = FALSE;
-#if defined (G_OS_WIN32) && defined (__GNUC__)
+#if defined (G_OS_WIN32) && defined (__GNUC__) || defined (G_WITH_CYGWIN)
memcpy(&g_thread_functions_for_glib_use, init, sizeof (*init));
#else
g_thread_functions_for_glib_use = *init;
diff -ruN glib-cvs29012001/gthread/makefile.cygwin.in glib/gthread/makefile.cygwin.in
--- glib-cvs29012001/gthread/makefile.cygwin.in Thu Jan 1 01:00:00 1970
+++ glib/gthread/makefile.cygwin.in Mon Feb 5 19:05:58 2001
@@ -0,0 +1,85 @@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+libdir = @libdir@
+includedir = @includedir@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+MKINSTALLDIRS = ../@MKINSTALLDIRS@
+
+CC = @CC@
+RANLIB = @RANLIB@
+
+EXEEXT = @EXEEXT@
+
+GLIB_MAJOR_VERSION = @GLIB_MAJOR_VERSION@
+GLIB_MICRO_VERSION = @GLIB_MICRO_VERSION@
+GLIB_MINOR_VERSION = @GLIB_MINOR_VERSION@
+#GLIB_VERSION = @GLIB_VERSION@
+GLIB_VERSION = $(GLIB_MAJOR_VERSION).$(GLIB_MINOR_VERSION)
+
+CPPFLAGS = @CPPFLAGS@
+CFLAGS = @CFLAGS@
+DEFS = @DEFS@ -DGLIB_COMPILATION -I. -I.. @GTHREAD_COMPILE_IMPL_DEFINES@
+INCLUDES = -DG_LOG_DOMAIN=\"GThread\" @GLIB_DEBUG_FLAGS@ -DG_DISABLE_COMPAT_H
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+
+PTHREAD_LIBS = @G_THREAD_LIBS_EXTRA@ @G_THREAD_LIBS@
+
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
+
+gthread_PUBLIC_HEADERS =
+
+gthread_OBJECTS = gthread-impl.o
+
+gthread_STATIC_OBJECTS = gthread-impl.sto
+
+all: cyggthread-$(GLIB_VERSION).dll \
+ libgthread-$(GLIB_VERSION).a
+
+#### DLL
+cyggthread-$(GLIB_VERSION).dll: $(gthread_PUBLIC_HEADERS) \
+ $(gthread_OBJECTS) \
+ gthread.def
+ $(CC) -Wl,--enable-auto-image -Wl,--out-implib,libgthread-$(GLIB_VERSION).dll.a -shared $(gthread_OBJECTS) gthread.def -luser32 -lwsock32 -lkernel32 $(PTHREAD_LIBS) ../libglib-$(GLIB_VERSION).dll.a -o $@
+
+libgthread-$(GLIB_VERSION).a: $(gthread_PUBLIC_HEADERS) \
+ $(gthread_STATIC_OBJECTS)
+ $(AR) cru $@ $(gthread_STATIC_OBJECTS)
+ $(RANLIB) $@
+
+#### rules
+%.o: %.c
+ @echo '$(COMPILE) -c $<'; \
+ $(COMPILE) -c $<
+
+#### static compilation
+%.sto: %.c
+ @echo '$(COMPILE) -o $@ -DGLIB_STATIC_COMPILATION -c $<'; \
+ $(COMPILE) -o $@ -DGLIB_STATIC_COMPILATION -c $<
+
+#### misc
+install: all install-headers install-libs
+
+install-headers:
+ $(MKINSTALLDIRS) $(includedir)/glib-2.0; \
+ list='$(gthread_PUBLIC_HEADERS)'; for p in $$list; do \
+ echo " $(INSTALL_DATA) $$p $(includedir)/glib-2.0/$$p"; \
+ $(INSTALL_DATA) $$p $(includedir)/glib-2.0/$$p; \
+ done
+
+install-libs:
+ $(MKINSTALLDIRS) $(bindir); \
+ $(INSTALL) cyggthread-$(GLIB_VERSION).dll $(bindir); \
+ $(MKINSTALLDIRS) $(libdir); \
+ $(INSTALL) libgthread-$(GLIB_VERSION).dll.a $(libdir); \
+ $(INSTALL) libgthread-$(GLIB_VERSION).a $(libdir);
+
+clean:
+ rm -f cyggthread-$(GLIB_VERSION).dll libgthread-$(GLIB_VERSION).dll.a libgthread-$(GLIB_VERSION).a
+ rm -f $(gthread_STATIC_OBJECTS) $(gthread_OBJECTS)
+
diff -ruN glib-cvs29012001/gthread.c glib/gthread.c
--- glib-cvs29012001/gthread.c Thu Jan 25 19:36:11 2001
+++ glib/gthread.c Mon Feb 5 15:24:54 2001
@@ -86,8 +86,10 @@
gboolean g_thread_use_default_impl = TRUE;
gboolean g_threads_got_initialized = FALSE;
-#if defined(G_OS_WIN32) && defined(__GNUC__)
+#ifndef GLIB_STATIC_COMPILATION
+#if defined(G_OS_WIN32) && defined(__GNUC__) || defined(G_WITH_CYGWIN)
__declspec(dllexport)
+#endif
#endif
GThreadFunctions g_thread_functions_for_glib_use = {
(GMutex*(*)())g_thread_fail, /* mutex_new */
diff -ruN glib-cvs29012001/gthread.h glib/gthread.h
--- glib-cvs29012001/gthread.h Thu Jan 25 19:36:12 2001
+++ glib/gthread.h Mon Feb 5 13:36:32 2001
@@ -28,20 +28,9 @@
#define __G_THREAD_H__
#include <gerror.h>
+#include <gtypes.h>
G_BEGIN_DECLS
-
-#ifndef GLIB_VAR
-# ifdef G_OS_WIN32
-# ifdef GLIB_COMPILATION
-# define GLIB_VAR __declspec(dllexport)
-# else /* !GLIB_COMPILATION */
-# define GLIB_VAR extern __declspec(dllimport)
-# endif /* !GLIB_COMPILATION */
-# else /* !G_OS_WIN32 */
-# define GLIB_VAR extern
-# endif /* !G_OS_WIN32 */
-#endif /* GLIB_VAR */
/* GLib Thread support
*/
diff -ruN glib-cvs29012001/gtimer.c glib/gtimer.c
--- glib-cvs29012001/gtimer.c Thu Jan 25 19:36:13 2001
+++ glib/gtimer.c Sun Feb 4 21:20:47 2001
@@ -59,6 +59,14 @@
guint active : 1;
};
+#ifdef G_OS_WIN32
+# define G_GET_TIME(v) \
+ v = GetTickCount ()
+#else /* !G_OS_WIN32 */
+# define G_GET_TIME(v) \
+ gettimeofday (&v, NULL)
+#endif /* !G_OS_WIN32 */
+
GTimer*
g_timer_new (void)
{
@@ -67,11 +75,7 @@
timer = g_new (GRealTimer, 1);
timer->active = TRUE;
-#ifdef G_OS_WIN32
- timer->start = GetTickCount ();
-#else /* !G_OS_WIN32 */
- gettimeofday (&timer->start, NULL);
-#endif /* !G_OS_WIN32 */
+ G_GET_TIME (timer->start);
return ((GTimer*) timer);
}
@@ -94,11 +98,7 @@
rtimer = (GRealTimer*) timer;
rtimer->active = TRUE;
-#ifdef G_OS_WIN32
- rtimer->start = GetTickCount ();
-#else /* !G_OS_WIN32 */
- gettimeofday (&rtimer->start, NULL);
-#endif /* !G_OS_WIN32 */
+ G_GET_TIME (rtimer->start);
}
void
@@ -111,11 +111,7 @@
rtimer = (GRealTimer*) timer;
rtimer->active = FALSE;
-#ifdef G_OS_WIN32
- rtimer->end = GetTickCount ();
-#else /* !G_OS_WIN32 */
- gettimeofday (&rtimer->end, NULL);
-#endif /* !G_OS_WIN32 */
+ G_GET_TIME(rtimer->end);
}
void
@@ -127,11 +123,7 @@
rtimer = (GRealTimer*) timer;
-#ifdef G_OS_WIN32
- rtimer->start = GetTickCount ();
-#else /* !G_OS_WIN32 */
- gettimeofday (&rtimer->start, NULL);
-#endif /* !G_OS_WIN32 */
+ G_GET_TIME (rtimer->start);
}
gdouble
diff -ruN glib-cvs29012001/gtypes.h glib/gtypes.h
--- glib-cvs29012001/gtypes.h Thu Jan 25 19:36:16 2001
+++ glib/gtypes.h Mon Feb 5 15:18:14 2001
@@ -322,6 +322,22 @@
glong tv_usec;
};
+#ifndef GLIB_VAR
+# if defined(G_OS_WIN32) || defined(G_WITH_CYGWIN)
+# ifdef GLIB_STATIC_COMPILATION
+# define GLIB_VAR extern
+# else /* !GLIB_STATIC_COMPILATION */
+# ifdef GLIB_COMPILATION
+# define GLIB_VAR __declspec(dllexport)
+# else /* !GLIB_COMPILATION */
+# define GLIB_VAR extern __declspec(dllimport)
+# endif /* !GLIB_COMPILATION */
+# endif /* !GLIB_STATIC_COMPILATION */
+# else /* !G_OS_WIN32 && !G_WITH_CYGWIN */
+# define GLIB_VAR extern
+# endif /* !G_OS_WIN32 && !G_WITH_CYGWIN */
+#endif /* GLIB_VAR */
+
G_END_DECLS
#endif /* __G_TYPES_H__ */
diff -ruN glib-cvs29012001/gunicode.h glib/gunicode.h
--- glib-cvs29012001/gunicode.h Thu Jan 25 19:36:18 2001
+++ glib/gunicode.h Mon Feb 5 13:33:28 2001
@@ -163,17 +163,6 @@
* We prefix variable declarations so they can
* properly get exported in windows dlls.
*/
-#ifndef GLIB_VAR
-# ifdef G_OS_WIN32
-# ifdef GLIB_COMPILATION
-# define GLIB_VAR __declspec(dllexport)
-# else /* !GLIB_COMPILATION */
-# define GLIB_VAR extern __declspec(dllimport)
-# endif /* !GLIB_COMPILATION */
-# else /* !G_OS_WIN32 */
-# define GLIB_VAR extern
-# endif /* !G_OS_WIN32 */
-#endif /* !GLIB_VAR */
GLIB_VAR char g_utf8_skip[256];
diff -ruN glib-cvs29012001/gutf8.c glib/gutf8.c
--- glib-cvs29012001/gutf8.c Mon Jan 29 11:25:09 2001
+++ glib/gutf8.c Sun Feb 4 21:20:47 2001
@@ -29,7 +29,7 @@
#include "glib.h"
-#ifdef G_OS_WIN32
+#if defined(G_OS_WIN32) || defined(G_WITH_CYGWIN)
#include <stdio.h>
#define STRICT
#include <windows.h>
@@ -341,7 +341,7 @@
}
#endif
-#ifdef G_OS_WIN32
+#if defined(G_OS_WIN32) || defined(G_WITH_CYGWIN)
if (a && ! *a)
{
static char codepage[10];
diff -ruN glib-cvs29012001/gutils.c glib/gutils.c
--- glib-cvs29012001/gutils.c Mon Jan 29 11:25:13 2001
+++ glib/gutils.c Sun Feb 4 21:20:47 2001
@@ -64,9 +64,11 @@
#define G_PATH_LENGTH 2048
#endif
-#ifdef G_OS_WIN32
+#if defined(G_OS_WIN32) || defined(G_WITH_CYGWIN)
# define STRICT /* Strict typing, please */
# include <windows.h>
+#endif
+#ifdef G_OS_WIN32
# include <ctype.h>
# include <direct.h>
#endif /* G_OS_WIN32 */
@@ -470,8 +472,9 @@
{
g_return_val_if_fail (file_name != NULL, NULL);
-#ifdef G_OS_WIN32
- /* Skip \\server\share */
+#if defined(G_OS_WIN32) || defined(G_WITH_CYGWIN)
+ /* G_OS_WIN32 - Skip \\server\share */
+ /* G_WITH_CYGWIN - Skip //server/share */
if (file_name[0] == G_DIR_SEPARATOR &&
file_name[1] == G_DIR_SEPARATOR &&
file_name[2])
@@ -988,12 +991,12 @@
char *result = nl_langinfo (CODESET);
return g_strdup (result);
#else
-#ifndef G_OS_WIN32
+#if defined(G_OS_WIN32) || defined (G_WITH_CYGWIN)
+ return g_strdup_printf ("CP%d", GetACP ());
+#else
/* FIXME: Do something more intelligent based on setlocale (LC_CTYPE, NULL)
*/
return g_strdup ("ISO-8859-1");
-#else
- return g_strdup_printf ("CP%d", GetACP ());
#endif
#endif
}
@@ -1002,8 +1005,8 @@
#include <libintl.h>
-
-#ifdef G_OS_WIN32
+#ifndef GLIB_LOCALE_DIR
+# if defined(G_OS_WIN32) || defined(G_WITH_CYGWIN)
#define GLIB_LOCALE_DIR \
g_win32_get_package_installation_subdirectory \
@@ -1012,7 +1015,8 @@
GLIB_MINOR_VERSION), \
"locale")
-#endif /* G_OS_WIN32 */
+# endif /* G_OS_WIN32 || G_WITH_CYGWIN */
+#endif /* !GLIB_LOCALE_DIR */
gchar *
_glib_gettext (const gchar *str)
diff -ruN glib-cvs29012001/gutils.h glib/gutils.h
--- glib-cvs29012001/gutils.h Thu Jan 25 19:36:24 2001
+++ glib/gutils.h Mon Feb 5 13:32:50 2001
@@ -305,15 +305,6 @@
* we prefix variable declarations so they can
* properly get exported in windows dlls.
*/
-#ifdef G_OS_WIN32
-# ifdef GLIB_COMPILATION
-# define GLIB_VAR __declspec(dllexport)
-# else /* !GLIB_COMPILATION */
-# define GLIB_VAR extern __declspec(dllimport)
-# endif /* !GLIB_COMPILATION */
-#else /* !G_OS_WIN32 */
-# define GLIB_VAR extern
-#endif /* !G_OS_WIN32 */
GLIB_VAR const guint glib_major_version;
GLIB_VAR const guint glib_minor_version;
diff -ruN glib-cvs29012001/gwin32.c glib/gwin32.c
--- glib-cvs29012001/gwin32.c Mon Jan 29 11:25:15 2001
+++ glib/gwin32.c Mon Feb 5 18:11:16 2001
@@ -42,7 +42,9 @@
#define STRICT /* Strict typing, please */
#include <windows.h>
+#ifndef G_WITH_CYGWIN
#include <direct.h>
+#endif
#include <errno.h>
#include <ctype.h>
#ifdef _MSC_VER
@@ -51,6 +53,12 @@
#include "glib.h"
+#ifdef G_WITH_CYGWIN
+#include <sys/cygwin.h>
+#endif
+
+#ifndef G_WITH_CYGWIN
+
int
g_win32_ftruncate (gint fd,
guint size)
@@ -214,6 +222,7 @@
return 0;
}
+#endif
/* Mingw32 headers don't have latest language and sublanguage codes */
#ifndef LANG_AFRIKAANS
@@ -871,18 +880,28 @@
if (!GetModuleFileName (hmodule, fn, sizeof (fn)))
return NULL;
- if ((p = strrchr (fn, '\\')) != NULL)
+#ifdef G_WITH_CYGWIN
+ /* in cygwin we need to have Posix paths not Win32 */
+ {
+ gchar tmp[MAX_PATH];
+
+ cygwin_conv_to_posix_path(fn, tmp);
+ strcpy(fn, tmp);
+ }
+#endif
+
+ if ((p = strrchr (fn, G_DIR_SEPARATOR)) != NULL)
*p = '\0';
if (module_name)
{
- p = strrchr (fn, '\\');
+ p = strrchr (fn, G_DIR_SEPARATOR);
if (p && (g_strcasecmp (p + 1, "bin") == 0 ||
g_strcasecmp (p + 1, "lib") == 0))
*p = '\0';
}
- g_hash_table_insert (module_dirs, module_name ? module_name : "", fn);
+ g_hash_table_insert (module_dirs, module_name ? module_name : "", g_strdup(fn));
return g_strdup (fn);
}
@@ -999,7 +1018,7 @@
prefix = g_win32_get_package_installation_directory (package, dll_name);
- sep = (prefix[strlen (prefix) - 1] == '\\' ? "" : "\\");
+ sep = (prefix[strlen (prefix) - 1] == G_DIR_SEPARATOR ? "" : G_DIR_SEPARATOR_S);
return g_strconcat (prefix, sep, subdir, NULL);
}
diff -ruN glib-cvs29012001/gwin32.h glib/gwin32.h
--- glib-cvs29012001/gwin32.h Mon Jan 29 11:25:18 2001
+++ glib/gwin32.h Sun Feb 4 21:20:47 2001
@@ -29,19 +29,23 @@
#include <gtypes.h>
-#ifdef G_OS_WIN32
+#if defined(G_OS_WIN32) || defined (G_WITH_CYGWIN)
/* Windows emulation stubs for common Unix functions
*/
G_BEGIN_DECLS
+#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
+#endif
#ifdef _MSC_VER
typedef int pid_t;
#endif
+#ifdef G_OS_WIN32
+
/*
* To get prototypes for the following POSIXish functions, you have to
* include the indicated non-POSIX headers. The functions are defined
@@ -95,6 +99,8 @@
struct dirent* g_win32_readdir (DIR *dir);
void g_win32_rewinddir (DIR *dir);
gint g_win32_closedir (DIR *dir);
+
+#endif /* G_OS_WIN32 */
/* The MS setlocale uses locale names of the form "English_United
* States.1252" etc. We want the Unixish standard form "en", "zh_TW"
diff -ruN glib-cvs29012001/makefile.cygwin.in glib/makefile.cygwin.in
--- glib-cvs29012001/makefile.cygwin.in Thu Jan 1 01:00:00 1970
+++ glib/makefile.cygwin.in Mon Feb 5 18:54:18 2001
@@ -0,0 +1,286 @@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+libdir = @libdir@
+includedir = @includedir@
+datadir = @datadir@
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgconfigdir = $(libdir)/pkgconfig
+
+m4datadir = $(datadir)/aclocal
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+
+CC = @CC@
+RANLIB = @RANLIB@
+DLLTOOL = @DLLTOOL@
+
+EXEEXT = @EXEEXT@
+
+#### libintl
+INTL_LIBS = @INTLLIBS@
+
+#### iconv library
+ICONV_LIBS = @ICONV_LIBS@
+
+GLIB_MAJOR_VERSION = @GLIB_MAJOR_VERSION@
+GLIB_MICRO_VERSION = @GLIB_MICRO_VERSION@
+GLIB_MINOR_VERSION = @GLIB_MINOR_VERSION@
+#GLIB_VERSION = @GLIB_VERSION@
+GLIB_VERSION = $(GLIB_MAJOR_VERSION).$(GLIB_MINOR_VERSION)
+
+CPPFLAGS = @CPPFLAGS@
+CFLAGS = @CFLAGS@
+DEFS = @DEFS@ -DGLIB_COMPILATION -I.
+INCLUDES = -DG_LOG_DOMAIN=g_log_domain_glib @GLIB_DEBUG_FLAGS@ -DG_DISABLE_COMPAT_H
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
+
+pkgconfig_DATA = glib-2.0.pc gobject-2.0.pc gmodule-2.0.pc gthread-2.0.pc
+m4data_DATA = glib-2.0.m4
+
+glib_PUBLIC_HEADERS = \
+ galloca.h \
+ garray.h \
+ gasyncqueue.h \
+ gbacktrace.h \
+ gcache.h \
+ gcompat.h \
+ gcompletion.h \
+ glibconfig.h \
+ gconvert.h \
+ gdataset.h \
+ gdate.h \
+ gerror.h \
+ gfileutils.h \
+ ghash.h \
+ ghook.h \
+ giochannel.h \
+ glib.h \
+ glib-object.h \
+ glist.h \
+ gmacros.h \
+ gmain.h \
+ gmarkup.h \
+ gmem.h \
+ gmessages.h \
+ gnode.h \
+ gprimes.h \
+ gqsort.h \
+ gquark.h \
+ gqueue.h \
+ grand.h \
+ grel.h \
+ gscanner.h \
+ gshell.h \
+ gslist.h \
+ gspawn.h \
+ gstrfuncs.h \
+ gstring.h \
+ gthread.h \
+ gthreadpool.h \
+ gtimer.h \
+ gtree.h \
+ gtypes.h \
+ gunicode.h \
+ gutils.h \
+ gwin32.h
+
+glib_PRIVATE_HEADERS = \
+ glibintl.h \
+ gunibreak.h \
+ gunichartables.h \
+ gunidecomp.h
+
+glib_OBJECTS = \
+ garray.o \
+ gasyncqueue.o \
+ gbacktrace.o \
+ gcache.o \
+ gcompletion.o \
+ gconvert.o \
+ gdataset.o \
+ gdate.o \
+ gerror.o \
+ gfileutils.o \
+ ghash.o \
+ ghook.o \
+ giochannel.o \
+ giounix.o \
+ glist.o \
+ gmain.o \
+ gmarkup.o \
+ gmem.o \
+ gmessages.o \
+ gnode.o \
+ gprimes.o \
+ gqsort.o \
+ gqueue.o \
+ grel.o \
+ grand.o \
+ gscanner.o \
+ gshell.o \
+ gslist.o \
+ gspawn.o \
+ gstrfuncs.o \
+ gstring.o \
+ gthread.o \
+ gthreadpool.o \
+ gtimer.o \
+ gtree.o \
+ guniprop.o \
+ gutf8.o \
+ gunibreak.o \
+ gunidecomp.o \
+ gutils.o \
+ gwin32.o
+
+glib_STATIC_OBJECTS = \
+ garray.sto \
+ gasyncqueue.sto \
+ gbacktrace.sto \
+ gcache.sto \
+ gcompletion.sto \
+ gconvert.sto \
+ gdataset.sto \
+ gdate.sto \
+ gerror.sto \
+ gfileutils.sto \
+ ghash.sto \
+ ghook.sto \
+ giochannel.sto \
+ giounix.sto \
+ glist.sto \
+ gmain.sto \
+ gmarkup.sto \
+ gmem.sto \
+ gmessages.sto \
+ gnode.sto \
+ gprimes.sto \
+ gqsort.sto \
+ gqueue.sto \
+ grel.sto \
+ grand.sto \
+ gscanner.sto \
+ gshell.sto \
+ gslist.sto \
+ gspawn.sto \
+ gstrfuncs.sto \
+ gstring.sto \
+ gthread.sto \
+ gthreadpool.sto \
+ gtimer.sto \
+ gtree.sto \
+ guniprop.sto \
+ gutf8.sto \
+ gunibreak.sto \
+ gunidecomp.sto \
+ gutils.sto \
+ gwin32.sto
+
+
+SUBDIRS = gmodule gthread gobject
+
+all: \
+ cygglib-$(GLIB_VERSION).dll \
+ libglib-$(GLIB_VERSION).a \
+ subdir-all
+
+#### DLL
+cygglib-$(GLIB_VERSION).dll: $(glib_PRIVATE_HEADERS) \
+ $(glib_PUBLIC_HEADERS) \
+ $(glib_OBJECTS) \
+ cygglib.def
+ $(CC) -Wl,--enable-auto-image -Wl,--out-implib,libglib-$(GLIB_VERSION).dll.a -shared $(glib_OBJECTS) cygglib.def -luser32 -lwsock32 -lkernel32 $(ICONV_LIBS) $(INTL_LIBS) -o $@
+
+libglib-$(GLIB_VERSION).a: $(glib_PRIVATE_HEADERS) \
+ $(glib_PUBLIC_HEADERS) \
+ $(glib_STATIC_OBJECTS)
+ $(AR) cru $@ $(glib_STATIC_OBJECTS); \
+ $(RANLIB) $@
+
+#### subdirectories
+subdir-all:
+ @list='$(SUBDIRS)'; for subdir in $$list; do \
+ ( cd $$subdir && $(MAKE) -f makefile.cygwin all ) ; \
+ done
+
+#### rules
+%.o: %.c
+ @echo '$(COMPILE) -c $<'; \
+ $(COMPILE) -c $<
+
+#### static compilation
+%.sto: %.c
+ @echo '$(COMPILE) -o $@ -DGLIB_STATIC_COMPILATION -c $<'; \
+ $(COMPILE) -o $@ -DGLIB_STATIC_COMPILATION -c $<
+
+#### rebuild makefile
+makefile.cygwin.in:
+
+makefile.cygwin: makefile.cygwin.in
+ CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+#### misc
+install: all install-headers install-libs install-data install-sub
+
+install-headers:
+ $(MKINSTALLDIRS) $(includedir)/glib-2.0; \
+ list='$(glib_PUBLIC_HEADERS)'; for p in $$list; do \
+ echo " $(INSTALL_DATA) $$p $(includedir)/glib-2.0/$$p"; \
+ $(INSTALL_DATA) $$p $(includedir)/glib-2.0/$$p; \
+ done
+
+install-libs: all
+ $(MKINSTALLDIRS) $(bindir); \
+ $(INSTALL) cygglib-$(GLIB_VERSION).dll $(bindir); \
+ $(MKINSTALLDIRS) $(libdir); \
+ $(INSTALL) libglib-$(GLIB_VERSION).dll.a $(libdir); \
+ $(INSTALL) libglib-$(GLIB_VERSION).a $(libdir);
+
+install-data:
+ $(MKINSTALLDIRS) $(pkgconfigdir); \
+ list='$(pkgconfig_DATA)'; for p in $$list; do \
+ echo " $(INSTALL_DATA) $$p $(pkgconfigdir)/$$p"; \
+ $(INSTALL_DATA) $$p $(pkgconfigdir)/$$p; \
+ done; \
+ $(MKINSTALLDIRS) $(pkgdatadir); \
+ echo " $(INSTALL_DATA) $$p $(pkgdatadir)/$$p"; \
+ $(INSTALL_DATA) $(m4data_DATA) $(pkgdatadir)/$$p;
+
+install-sub:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ ( cd $$subdir && $(MAKE) -f makefile.cygwin install ) ; \
+ done
+
+clean:
+ rm -f cygglib-$(GLIB_VERSION).dll libglib-$(GLIB_VERSION).dll.a libglib-$(GLIB_VERSION).a; \
+ rm -f $(glib_STATIC_OBJECTS) $(glib_OBJECTS) ; \
+ rm -f testglib.o testgdate.o testgdateparser.o timeloop.o ; \
+ rm -f testglib$(EXEEXT) testgdate$(EXEEXT) testgdateparser$(EXEEXT) timeloop$(EXEEXT) ; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ ( cd $$subdir && $(MAKE) -f makefile.cygwin clean ) ; \
+ done ;
+
+#### tests
+tests: testglib($EXEEXT) testgdate$(EXEEXT) testgdateparser$(EXEEXT) timeloop$(EXEEXT)
+
+testglib($EXEEXT): cygglib-$(GLIB_VERSION).dll testglib.o
+ $(CC) -g -Wall -o $@ testglib.o -L. ./libglib-$(GLIB_VERSION).dll.a
+
+testgdate$(EXEEXT): cygglib-$(GLIB_VERSION).dll testgdate.o
+ $(CC) -g -Wall -o $@ testgdate.o -L. ./libglib-$(GLIB_VERSION).dll.a
+
+testgdateparser$(EXEEXT): cygglib-$(GLIB_VERSION).dll testgdateparser.o
+ $(CC) -g -Wall -o $@ testgdateparser.o -L. ./libglib-$(GLIB_VERSION).dll.a
+
+timeloop$(EXEEXT): cygglib-$(GLIB_VERSION).dll timeloop.o
+ $(CC) -g -Wall -o $@ timeloop.o -L. ./libglib-$(GLIB_VERSION).dll.a
+
diff -ruN glib-cvs29012001/testglib.c glib/testglib.c
--- glib-cvs29012001/testglib.c Mon Jan 29 11:25:24 2001
+++ glib/testglib.c Mon Feb 5 15:54:38 2001
@@ -347,6 +347,9 @@
{ "a\\b\\", "a\\b" },
{ "c\\\\\\", "c" },
#endif
+#ifdef G_WITH_CYGWIN
+ { "//server/share///x", "//server/share" },
+#endif
{ ".", "." },
{ "..", "." },
{ "", "." },
@@ -370,6 +373,9 @@
{ "\\\\server\\foo\\bar", "bar" },
{ "a\\b", NULL },
#endif
+#ifdef G_WITH_CYGWIN
+ { "//server/share///x", "x" },
+#endif
{ ".", NULL },
{ "", NULL },
};
@@ -393,6 +399,11 @@
GLIB_MAJOR_VERSION,
GLIB_MINOR_VERSION);
#endif
+#ifdef G_WITH_CYGWIN
+ gchar *glib_dll = g_strdup_printf ("cygglib-%d.%d.dll",
+ GLIB_MAJOR_VERSION,
+ GLIB_MINOR_VERSION);
+#endif
g_print ("TestGLib v%u.%u.%u (i:%u b:%u)\n",
glib_major_version,
@@ -1147,7 +1158,7 @@
g_print ("ok\n");
-#ifdef G_OS_WIN32
+#if defined(G_OS_WIN32) || defined(G_WITH_CYGWIN)
g_print ("current locale: %s\n", g_win32_getlocale ());
g_print ("GLib installation directory, from Registry entry for %s if available: %s\n",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]