# # Patch managed by http://www.holgerschurig.de/patcher.html # --- glib-2.4.6/glib/garray.h~visibility.patch +++ glib-2.4.6/glib/garray.h @@ -63,102 +63,102 @@ #define g_array_insert_val(a,i,v) g_array_insert_vals (a, i, &(v), 1) #define g_array_index(a,t,i) (((t*) (a)->data) [(i)]) -GArray* g_array_new (gboolean zero_terminated, +GLIB_FUNC GArray* g_array_new (gboolean zero_terminated, gboolean clear_, - guint element_size); -GArray* g_array_sized_new (gboolean zero_terminated, + guint element_size);; +GLIB_FUNC GArray* g_array_sized_new (gboolean zero_terminated, gboolean clear_, guint element_size, - guint reserved_size); -gchar* g_array_free (GArray *array, - gboolean free_segment); -GArray* g_array_append_vals (GArray *array, + guint reserved_size);; +GLIB_FUNC gchar* g_array_free (GArray *array, + gboolean free_segment);; +GLIB_FUNC GArray* g_array_append_vals (GArray *array, gconstpointer data, - guint len); -GArray* g_array_prepend_vals (GArray *array, + guint len);; +GLIB_FUNC GArray* g_array_prepend_vals (GArray *array, gconstpointer data, - guint len); -GArray* g_array_insert_vals (GArray *array, + guint len);; +GLIB_FUNC GArray* g_array_insert_vals (GArray *array, guint index_, gconstpointer data, - guint len); -GArray* g_array_set_size (GArray *array, - guint length); -GArray* g_array_remove_index (GArray *array, - guint index_); -GArray* g_array_remove_index_fast (GArray *array, - guint index_); -GArray* g_array_remove_range (GArray *array, + guint len);; +GLIB_FUNC GArray* g_array_set_size (GArray *array, + guint length);; +GLIB_FUNC GArray* g_array_remove_index (GArray *array, + guint index_);; +GLIB_FUNC GArray* g_array_remove_index_fast (GArray *array, + guint index_);; +GLIB_FUNC GArray* g_array_remove_range (GArray *array, guint index_, - guint length); -void g_array_sort (GArray *array, - GCompareFunc compare_func); -void g_array_sort_with_data (GArray *array, + guint length);; +GLIB_FUNC void g_array_sort (GArray *array, + GCompareFunc compare_func);; +GLIB_FUNC void g_array_sort_with_data (GArray *array, GCompareDataFunc compare_func, - gpointer user_data); + gpointer user_data);; /* Resizable pointer array. This interface is much less complicated * than the above. Add appends a pointer. Remove fills any cleared * spot and shortens the array. remove_fast will again distort order. */ #define g_ptr_array_index(array,index_) ((array)->pdata)[index_] -GPtrArray* g_ptr_array_new (void); -GPtrArray* g_ptr_array_sized_new (guint reserved_size); -gpointer* g_ptr_array_free (GPtrArray *array, - gboolean free_seg); -void g_ptr_array_set_size (GPtrArray *array, - gint length); -gpointer g_ptr_array_remove_index (GPtrArray *array, - guint index_); -gpointer g_ptr_array_remove_index_fast (GPtrArray *array, - guint index_); -gboolean g_ptr_array_remove (GPtrArray *array, - gpointer data); -gboolean g_ptr_array_remove_fast (GPtrArray *array, - gpointer data); -void g_ptr_array_remove_range (GPtrArray *array, +GLIB_FUNC GPtrArray* g_ptr_array_new (void); +GLIB_FUNC GPtrArray* g_ptr_array_sized_new (guint reserved_size); +GLIB_FUNC gpointer* g_ptr_array_free (GPtrArray *array, + gboolean free_seg);; +GLIB_FUNC void g_ptr_array_set_size (GPtrArray *array, + gint length);; +GLIB_FUNC gpointer g_ptr_array_remove_index (GPtrArray *array, + guint index_);; +GLIB_FUNC gpointer g_ptr_array_remove_index_fast (GPtrArray *array, + guint index_);; +GLIB_FUNC gboolean g_ptr_array_remove (GPtrArray *array, + gpointer data);; +GLIB_FUNC gboolean g_ptr_array_remove_fast (GPtrArray *array, + gpointer data);; +GLIB_FUNC void g_ptr_array_remove_range (GPtrArray *array, guint index_, - guint length); -void g_ptr_array_add (GPtrArray *array, - gpointer data); -void g_ptr_array_sort (GPtrArray *array, - GCompareFunc compare_func); -void g_ptr_array_sort_with_data (GPtrArray *array, + guint length);; +GLIB_FUNC void g_ptr_array_add (GPtrArray *array, + gpointer data);; +GLIB_FUNC void g_ptr_array_sort (GPtrArray *array, + GCompareFunc compare_func);; +GLIB_FUNC void g_ptr_array_sort_with_data (GPtrArray *array, GCompareDataFunc compare_func, - gpointer user_data); -void g_ptr_array_foreach (GPtrArray *array, + gpointer user_data);; +GLIB_FUNC void g_ptr_array_foreach (GPtrArray *array, GFunc func, - gpointer user_data); + gpointer user_data);; /* Byte arrays, an array of guint8. Implemented as a GArray, * but type-safe. */ -GByteArray* g_byte_array_new (void); -GByteArray* g_byte_array_sized_new (guint reserved_size); -guint8* g_byte_array_free (GByteArray *array, - gboolean free_segment); -GByteArray* g_byte_array_append (GByteArray *array, +GLIB_FUNC GByteArray* g_byte_array_new (void); +GLIB_FUNC GByteArray* g_byte_array_sized_new (guint reserved_size); +GLIB_FUNC guint8* g_byte_array_free (GByteArray *array, + gboolean free_segment);; +GLIB_FUNC GByteArray* g_byte_array_append (GByteArray *array, const guint8 *data, - guint len); -GByteArray* g_byte_array_prepend (GByteArray *array, + guint len);; +GLIB_FUNC GByteArray* g_byte_array_prepend (GByteArray *array, const guint8 *data, - guint len); -GByteArray* g_byte_array_set_size (GByteArray *array, - guint length); -GByteArray* g_byte_array_remove_index (GByteArray *array, - guint index_); -GByteArray* g_byte_array_remove_index_fast (GByteArray *array, - guint index_); -GByteArray* g_byte_array_remove_range (GByteArray *array, + guint len);; +GLIB_FUNC GByteArray* g_byte_array_set_size (GByteArray *array, + guint length);; +GLIB_FUNC GByteArray* g_byte_array_remove_index (GByteArray *array, + guint index_);; +GLIB_FUNC GByteArray* g_byte_array_remove_index_fast (GByteArray *array, + guint index_);; +GLIB_FUNC GByteArray* g_byte_array_remove_range (GByteArray *array, guint index_, - guint length); -void g_byte_array_sort (GByteArray *array, - GCompareFunc compare_func); -void g_byte_array_sort_with_data (GByteArray *array, + guint length);; +GLIB_FUNC void g_byte_array_sort (GByteArray *array, + GCompareFunc compare_func);; +GLIB_FUNC void g_byte_array_sort_with_data (GByteArray *array, GCompareDataFunc compare_func, - gpointer user_data); + gpointer user_data);; G_END_DECLS --- glib-2.4.6/glib/gasyncqueue.h~visibility.patch +++ glib-2.4.6/glib/gasyncqueue.h @@ -37,45 +37,45 @@ */ /* Get a new GAsyncQueue with the ref_count 1 */ -GAsyncQueue* g_async_queue_new (void); +GLIB_FUNC GAsyncQueue* g_async_queue_new (void); /* Lock and unlock a GAsyncQueue. All functions lock the queue for * themselves, but in certain cirumstances you want to hold the lock longer, * thus you lock the queue, call the *_unlocked functions and unlock it again. */ -void g_async_queue_lock (GAsyncQueue *queue); -void g_async_queue_unlock (GAsyncQueue *queue); +GLIB_FUNC void g_async_queue_lock (GAsyncQueue *queue); +GLIB_FUNC void g_async_queue_unlock (GAsyncQueue *queue); /* Ref and unref the GAsyncQueue. */ -void g_async_queue_ref (GAsyncQueue *queue); -void g_async_queue_unref (GAsyncQueue *queue); +GLIB_FUNC void g_async_queue_ref (GAsyncQueue *queue); +GLIB_FUNC void g_async_queue_unref (GAsyncQueue *queue); #ifndef G_DISABLE_DEPRECATED /* You don't have to hold the lock for calling *_ref and *_unref anymore. */ -void g_async_queue_ref_unlocked (GAsyncQueue *queue); -void g_async_queue_unref_and_unlock (GAsyncQueue *queue); +GLIB_FUNC void g_async_queue_ref_unlocked (GAsyncQueue *queue); +GLIB_FUNC void g_async_queue_unref_and_unlock (GAsyncQueue *queue); #endif /* !G_DISABLE_DEPRECATED */ /* Push data into the async queue. Must not be NULL. */ -void g_async_queue_push (GAsyncQueue *queue, - gpointer data); -void g_async_queue_push_unlocked (GAsyncQueue *queue, - gpointer data); +GLIB_FUNC void g_async_queue_push (GAsyncQueue *queue, + gpointer data);; +GLIB_FUNC void g_async_queue_push_unlocked (GAsyncQueue *queue, + gpointer data);; /* Pop data from the async queue. When no data is there, the thread is blocked * until data arrives. */ -gpointer g_async_queue_pop (GAsyncQueue *queue); -gpointer g_async_queue_pop_unlocked (GAsyncQueue *queue); +GLIB_FUNC gpointer g_async_queue_pop (GAsyncQueue *queue); +GLIB_FUNC gpointer g_async_queue_pop_unlocked (GAsyncQueue *queue); /* Try to pop data. NULL is returned in case of empty queue. */ -gpointer g_async_queue_try_pop (GAsyncQueue *queue); -gpointer g_async_queue_try_pop_unlocked (GAsyncQueue *queue); +GLIB_FUNC gpointer g_async_queue_try_pop (GAsyncQueue *queue); +GLIB_FUNC gpointer g_async_queue_try_pop_unlocked (GAsyncQueue *queue); /* Wait for data until at maximum until end_time is reached. NULL is returned * in case of empty queue. */ -gpointer g_async_queue_timed_pop (GAsyncQueue *queue, - GTimeVal *end_time); -gpointer g_async_queue_timed_pop_unlocked (GAsyncQueue *queue, - GTimeVal *end_time); +GLIB_FUNC gpointer g_async_queue_timed_pop (GAsyncQueue *queue, + GTimeVal *end_time);; +GLIB_FUNC gpointer g_async_queue_timed_pop_unlocked (GAsyncQueue *queue, + GTimeVal *end_time);; /* Return the length of the queue. Negative values mean that threads * are waiting, positve values mean that there are entries in the @@ -83,8 +83,8 @@ * the number of waiting threads, g_async_queue_length == 0 could also * mean 'n' entries in the queue and 'n' thread waiting. Such can * happen due to locking of the queue or due to scheduling. */ -gint g_async_queue_length (GAsyncQueue *queue); -gint g_async_queue_length_unlocked (GAsyncQueue *queue); +GLIB_FUNC gint g_async_queue_length (GAsyncQueue *queue); +GLIB_FUNC gint g_async_queue_length_unlocked (GAsyncQueue *queue); G_END_DECLS --- glib-2.4.6/glib/gatomic.h~visibility.patch +++ glib-2.4.6/glib/gatomic.h @@ -34,20 +34,20 @@ G_BEGIN_DECLS -gint g_atomic_int_exchange_and_add (gint *atomic, - gint val); -void g_atomic_int_add (gint *atomic, - gint val); -gboolean g_atomic_int_compare_and_exchange (gint *atomic, +GLIB_FUNC gint g_atomic_int_exchange_and_add (gint *atomic, + gint val);; +GLIB_FUNC void g_atomic_int_add (gint *atomic, + gint val);; +GLIB_FUNC gboolean g_atomic_int_compare_and_exchange (gint *atomic, gint oldval, - gint newval); -gboolean g_atomic_pointer_compare_and_exchange (gpointer *atomic, + gint newval);; +GLIB_FUNC gboolean g_atomic_pointer_compare_and_exchange (gpointer *atomic, gpointer oldval, - gpointer newval); + gpointer newval);; #ifdef G_ATOMIC_OP_MEMORY_BARRIER_NEEDED -gint g_atomic_int_get (gint *atomic); -gpointer g_atomic_pointer_get (gpointer *atomic); +GLIB_FUNC gint g_atomic_int_get (gint *atomic); +GLIB_FUNC gpointer g_atomic_pointer_get (gpointer *atomic); #else /* !G_ATOMIC_OP_MEMORY_BARRIER_NEEDED */ # define g_atomic_int_get(atomic) (*(atomic)) # define g_atomic_pointer_get(atomic) (*(atomic)) --- glib-2.4.6/glib/gbacktrace.h~visibility.patch +++ glib-2.4.6/glib/gbacktrace.h @@ -40,8 +40,8 @@ * The prg_name arg is required by gdb to find the executable, if it is * passed as NULL, g_on_error_query() will try g_get_prgname(). */ -void g_on_error_query (const gchar *prg_name); -void g_on_error_stack_trace (const gchar *prg_name); +GLIB_FUNC void g_on_error_query (const gchar *prg_name); +GLIB_FUNC void g_on_error_stack_trace (const gchar *prg_name); /* Hacker macro to place breakpoints for selected machines. * Actual use is strongly discouraged of course ;) --- glib-2.4.6/glib/gcache.h~visibility.patch +++ glib-2.4.6/glib/gcache.h @@ -39,24 +39,24 @@ /* Caches */ -GCache* g_cache_new (GCacheNewFunc value_new_func, +GLIB_FUNC GCache* g_cache_new (GCacheNewFunc value_new_func, GCacheDestroyFunc value_destroy_func, GCacheDupFunc key_dup_func, GCacheDestroyFunc key_destroy_func, GHashFunc hash_key_func, GHashFunc hash_value_func, - GEqualFunc key_equal_func); -void g_cache_destroy (GCache *cache); -gpointer g_cache_insert (GCache *cache, - gpointer key); -void g_cache_remove (GCache *cache, - gconstpointer value); -void g_cache_key_foreach (GCache *cache, + GEqualFunc key_equal_func);; +GLIB_FUNC void g_cache_destroy (GCache *cache); +GLIB_FUNC gpointer g_cache_insert (GCache *cache, + gpointer key);; +GLIB_FUNC void g_cache_remove (GCache *cache, + gconstpointer value);; +GLIB_FUNC void g_cache_key_foreach (GCache *cache, GHFunc func, - gpointer user_data); -void g_cache_value_foreach (GCache *cache, + gpointer user_data);; +GLIB_FUNC void g_cache_value_foreach (GCache *cache, GHFunc func, - gpointer user_data); + gpointer user_data);; G_END_DECLS --- glib-2.4.6/glib/gcompletion.h~visibility.patch +++ glib-2.4.6/glib/gcompletion.h @@ -52,21 +52,21 @@ GCompletionStrncmpFunc strncmp_func; }; -GCompletion* g_completion_new (GCompletionFunc func); -void g_completion_add_items (GCompletion* cmp, - GList* items); -void g_completion_remove_items (GCompletion* cmp, - GList* items); -void g_completion_clear_items (GCompletion* cmp); -GList* g_completion_complete (GCompletion* cmp, +GLIB_FUNC GCompletion* g_completion_new (GCompletionFunc func); +GLIB_FUNC void g_completion_add_items (GCompletion* cmp, + GList* items);; +GLIB_FUNC void g_completion_remove_items (GCompletion* cmp, + GList* items);; +GLIB_FUNC void g_completion_clear_items (GCompletion* cmp); +GLIB_FUNC GList* g_completion_complete (GCompletion* cmp, const gchar* prefix, - gchar** new_prefix); -GList* g_completion_complete_utf8 (GCompletion *cmp, + gchar** new_prefix);; +GLIB_FUNC GList* g_completion_complete_utf8 (GCompletion *cmp, const gchar* prefix, - gchar** new_prefix); -void g_completion_set_compare (GCompletion *cmp, - GCompletionStrncmpFunc strncmp_func); -void g_completion_free (GCompletion* cmp); + gchar** new_prefix);; +GLIB_FUNC void g_completion_set_compare (GCompletion *cmp, + GCompletionStrncmpFunc strncmp_func);; +GLIB_FUNC void g_completion_free (GCompletion* cmp); G_END_DECLS --- glib-2.4.6/glib/gconvert.h~visibility.patch +++ glib-2.4.6/glib/gconvert.h @@ -43,79 +43,79 @@ } GConvertError; #define G_CONVERT_ERROR g_convert_error_quark() -GQuark g_convert_error_quark (void); +GLIB_FUNC GQuark g_convert_error_quark (void); /* Thin wrappers around iconv */ typedef struct _GIConv *GIConv; -GIConv g_iconv_open (const gchar *to_codeset, - const gchar *from_codeset); -size_t g_iconv (GIConv converter, +GLIB_FUNC GIConv g_iconv_open (const gchar *to_codeset, + const gchar *from_codeset);; +GLIB_FUNC size_t g_iconv (GIConv converter, gchar **inbuf, gsize *inbytes_left, gchar **outbuf, - gsize *outbytes_left); -gint g_iconv_close (GIConv converter); + gsize *outbytes_left);; +GLIB_FUNC gint g_iconv_close (GIConv converter); -gchar* g_convert (const gchar *str, +GLIB_FUNC gchar* g_convert (const gchar *str, gssize len, const gchar *to_codeset, const gchar *from_codeset, gsize *bytes_read, gsize *bytes_written, - GError **error); -gchar* g_convert_with_iconv (const gchar *str, + GError **error);; +GLIB_FUNC gchar* g_convert_with_iconv (const gchar *str, gssize len, GIConv converter, gsize *bytes_read, gsize *bytes_written, - GError **error); -gchar* g_convert_with_fallback (const gchar *str, + GError **error);; +GLIB_FUNC gchar* g_convert_with_fallback (const gchar *str, gssize len, const gchar *to_codeset, const gchar *from_codeset, gchar *fallback, gsize *bytes_read, gsize *bytes_written, - GError **error); + GError **error);; /* Convert between libc's idea of strings and UTF-8. */ -gchar* g_locale_to_utf8 (const gchar *opsysstring, +GLIB_FUNC gchar* g_locale_to_utf8 (const gchar *opsysstring, gssize len, gsize *bytes_read, gsize *bytes_written, - GError **error); -gchar* g_locale_from_utf8 (const gchar *utf8string, + GError **error);; +GLIB_FUNC gchar* g_locale_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read, gsize *bytes_written, - GError **error); + GError **error);; /* Convert between the operating system (or C runtime) * representation of file names and UTF-8. */ -gchar* g_filename_to_utf8 (const gchar *opsysstring, +GLIB_FUNC gchar* g_filename_to_utf8 (const gchar *opsysstring, gssize len, gsize *bytes_read, gsize *bytes_written, - GError **error); -gchar* g_filename_from_utf8 (const gchar *utf8string, + GError **error);; +GLIB_FUNC gchar* g_filename_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read, gsize *bytes_written, - GError **error); + GError **error);; -gchar *g_filename_from_uri (const gchar *uri, +GLIB_FUNC gchar *g_filename_from_uri (const gchar *uri, gchar **hostname, - GError **error); + GError **error);; -gchar *g_filename_to_uri (const gchar *filename, +GLIB_FUNC gchar *g_filename_to_uri (const gchar *filename, const gchar *hostname, - GError **error); + GError **error);; G_END_DECLS --- glib-2.4.6/glib/gdataset.h~visibility.patch +++ glib-2.4.6/glib/gdataset.h @@ -39,19 +39,19 @@ /* Keyed Data List */ -void g_datalist_init (GData **datalist); -void g_datalist_clear (GData **datalist); -gpointer g_datalist_id_get_data (GData **datalist, - GQuark key_id); -void g_datalist_id_set_data_full (GData **datalist, +GLIB_FUNC void g_datalist_init (GData **datalist); +GLIB_FUNC void g_datalist_clear (GData **datalist); +GLIB_FUNC gpointer g_datalist_id_get_data (GData **datalist, + GQuark key_id);; +GLIB_FUNC void g_datalist_id_set_data_full (GData **datalist, GQuark key_id, gpointer data, - GDestroyNotify destroy_func); -gpointer g_datalist_id_remove_no_notify (GData **datalist, - GQuark key_id); -void g_datalist_foreach (GData **datalist, + GDestroyNotify destroy_func);; +GLIB_FUNC gpointer g_datalist_id_remove_no_notify (GData **datalist, + GQuark key_id);; +GLIB_FUNC void g_datalist_foreach (GData **datalist, GDataForeachFunc func, - gpointer user_data); + gpointer user_data);; #define g_datalist_id_set_data(dl, q, d) \ g_datalist_id_set_data_full ((dl), (q), (d), NULL) #define g_datalist_id_remove_data(dl, q) \ @@ -70,18 +70,18 @@ /* Location Associated Keyed Data */ -void g_dataset_destroy (gconstpointer dataset_location); -gpointer g_dataset_id_get_data (gconstpointer dataset_location, - GQuark key_id); -void g_dataset_id_set_data_full (gconstpointer dataset_location, +GLIB_FUNC void g_dataset_destroy (gconstpointer dataset_location); +GLIB_FUNC gpointer g_dataset_id_get_data (gconstpointer dataset_location, + GQuark key_id);; +GLIB_FUNC void g_dataset_id_set_data_full (gconstpointer dataset_location, GQuark key_id, gpointer data, - GDestroyNotify destroy_func); -gpointer g_dataset_id_remove_no_notify (gconstpointer dataset_location, - GQuark key_id); -void g_dataset_foreach (gconstpointer dataset_location, + GDestroyNotify destroy_func);; +GLIB_FUNC gpointer g_dataset_id_remove_no_notify (gconstpointer dataset_location, + GQuark key_id);; +GLIB_FUNC void g_dataset_foreach (gconstpointer dataset_location, GDataForeachFunc func, - gpointer user_data); + gpointer user_data);; #define g_dataset_id_set_data(l, k, d) \ g_dataset_id_set_data_full ((l), (k), (d), NULL) #define g_dataset_id_remove_data(l, k) \ --- glib-2.4.6/glib/gdate.h~visibility.patch +++ glib-2.4.6/glib/gdate.h @@ -114,121 +114,121 @@ * to get a usable object. You can also allocate a GDate statically, * then call g_date_clear() to initialize. */ -GDate* g_date_new (void); -GDate* g_date_new_dmy (GDateDay day, +GLIB_FUNC GDate* g_date_new (void); +GLIB_FUNC GDate* g_date_new_dmy (GDateDay day, GDateMonth month, - GDateYear year); -GDate* g_date_new_julian (guint32 julian_day); -void g_date_free (GDate *date); + GDateYear year);; +GLIB_FUNC GDate* g_date_new_julian (guint32 julian_day); +GLIB_FUNC void g_date_free (GDate *date); /* check g_date_valid() after doing an operation that might fail, like * _parse. Almost all g_date operations are undefined on invalid * dates (the exceptions are the mutators, since you need those to * return to validity). */ -gboolean g_date_valid (const GDate *date); -gboolean g_date_valid_day (GDateDay day) G_GNUC_CONST; -gboolean g_date_valid_month (GDateMonth month) G_GNUC_CONST; -gboolean g_date_valid_year (GDateYear year) G_GNUC_CONST; -gboolean g_date_valid_weekday (GDateWeekday weekday) G_GNUC_CONST; -gboolean g_date_valid_julian (guint32 julian_date) G_GNUC_CONST; -gboolean g_date_valid_dmy (GDateDay day, +GLIB_FUNC gboolean g_date_valid (const GDate *date); +GLIB_FUNC gboolean g_date_valid_day (GDateDay day) G_GNUC_CONST;; +GLIB_FUNC gboolean g_date_valid_month (GDateMonth month) G_GNUC_CONST;; +GLIB_FUNC gboolean g_date_valid_year (GDateYear year) G_GNUC_CONST;; +GLIB_FUNC gboolean g_date_valid_weekday (GDateWeekday weekday) G_GNUC_CONST;; +GLIB_FUNC gboolean g_date_valid_julian (guint32 julian_date) G_GNUC_CONST;; +GLIB_FUNC gboolean g_date_valid_dmy (GDateDay day, GDateMonth month, - GDateYear year) G_GNUC_CONST; + GDateYear year) G_GNUC_CONST;; -GDateWeekday g_date_get_weekday (const GDate *date); -GDateMonth g_date_get_month (const GDate *date); -GDateYear g_date_get_year (const GDate *date); -GDateDay g_date_get_day (const GDate *date); -guint32 g_date_get_julian (const GDate *date); -guint g_date_get_day_of_year (const GDate *date); +GLIB_FUNC GDateWeekday g_date_get_weekday (const GDate *date); +GLIB_FUNC GDateMonth g_date_get_month (const GDate *date); +GLIB_FUNC GDateYear g_date_get_year (const GDate *date); +GLIB_FUNC GDateDay g_date_get_day (const GDate *date); +GLIB_FUNC guint32 g_date_get_julian (const GDate *date); +GLIB_FUNC guint g_date_get_day_of_year (const GDate *date); /* First monday/sunday is the start of week 1; if we haven't reached * that day, return 0. These are not ISO weeks of the year; that * routine needs to be added. * these functions return the number of weeks, starting on the * corrsponding day */ -guint g_date_get_monday_week_of_year (const GDate *date); -guint g_date_get_sunday_week_of_year (const GDate *date); +GLIB_FUNC guint g_date_get_monday_week_of_year (const GDate *date); +GLIB_FUNC guint g_date_get_sunday_week_of_year (const GDate *date); /* If you create a static date struct you need to clear it to get it * in a sane state before use. You can clear a whole array at * once with the ndates argument. */ -void g_date_clear (GDate *date, - guint n_dates); +GLIB_FUNC void g_date_clear (GDate *date, + guint n_dates);; /* The parse routine is meant for dates typed in by a user, so it * permits many formats but tries to catch common typos. If your data * needs to be strictly validated, it is not an appropriate function. */ -void g_date_set_parse (GDate *date, - const gchar *str); -void g_date_set_time (GDate *date, - GTime time_); -void g_date_set_month (GDate *date, - GDateMonth month); -void g_date_set_day (GDate *date, - GDateDay day); -void g_date_set_year (GDate *date, - GDateYear year); -void g_date_set_dmy (GDate *date, +GLIB_FUNC void g_date_set_parse (GDate *date, + const gchar *str);; +GLIB_FUNC void g_date_set_time (GDate *date, + GTime time_);; +GLIB_FUNC void g_date_set_month (GDate *date, + GDateMonth month);; +GLIB_FUNC void g_date_set_day (GDate *date, + GDateDay day);; +GLIB_FUNC void g_date_set_year (GDate *date, + GDateYear year);; +GLIB_FUNC void g_date_set_dmy (GDate *date, GDateDay day, GDateMonth month, - GDateYear y); -void g_date_set_julian (GDate *date, - guint32 julian_date); -gboolean g_date_is_first_of_month (const GDate *date); -gboolean g_date_is_last_of_month (const GDate *date); + GDateYear y);; +GLIB_FUNC void g_date_set_julian (GDate *date, + guint32 julian_date);; +GLIB_FUNC gboolean g_date_is_first_of_month (const GDate *date); +GLIB_FUNC gboolean g_date_is_last_of_month (const GDate *date); /* To go forward by some number of weeks just go forward weeks*7 days */ -void g_date_add_days (GDate *date, - guint n_days); -void g_date_subtract_days (GDate *date, - guint n_days); +GLIB_FUNC void g_date_add_days (GDate *date, + guint n_days);; +GLIB_FUNC void g_date_subtract_days (GDate *date, + guint n_days);; /* If you add/sub months while day > 28, the day might change */ -void g_date_add_months (GDate *date, - guint n_months); -void g_date_subtract_months (GDate *date, - guint n_months); +GLIB_FUNC void g_date_add_months (GDate *date, + guint n_months);; +GLIB_FUNC void g_date_subtract_months (GDate *date, + guint n_months);; /* If it's feb 29, changing years can move you to the 28th */ -void g_date_add_years (GDate *date, - guint n_years); -void g_date_subtract_years (GDate *date, - guint n_years); -gboolean g_date_is_leap_year (GDateYear year) G_GNUC_CONST; -guint8 g_date_get_days_in_month (GDateMonth month, - GDateYear year) G_GNUC_CONST; -guint8 g_date_get_monday_weeks_in_year (GDateYear year) G_GNUC_CONST; -guint8 g_date_get_sunday_weeks_in_year (GDateYear year) G_GNUC_CONST; +GLIB_FUNC void g_date_add_years (GDate *date, + guint n_years);; +GLIB_FUNC void g_date_subtract_years (GDate *date, + guint n_years);; +GLIB_FUNC gboolean g_date_is_leap_year (GDateYear year) G_GNUC_CONST;; +GLIB_FUNC guint8 g_date_get_days_in_month (GDateMonth month, + GDateYear year) G_GNUC_CONST;; +GLIB_FUNC guint8 g_date_get_monday_weeks_in_year (GDateYear year) G_GNUC_CONST;; +GLIB_FUNC guint8 g_date_get_sunday_weeks_in_year (GDateYear year) G_GNUC_CONST;; /* Returns the number of days between the two dates. If date2 comes before date1, a negative value is return. */ -gint g_date_days_between (const GDate *date1, - const GDate *date2); +GLIB_FUNC gint g_date_days_between (const GDate *date1, + const GDate *date2);; /* qsort-friendly (with a cast...) */ -gint g_date_compare (const GDate *lhs, - const GDate *rhs); -void g_date_to_struct_tm (const GDate *date, - struct tm *tm); +GLIB_FUNC gint g_date_compare (const GDate *lhs, + const GDate *rhs);; +GLIB_FUNC void g_date_to_struct_tm (const GDate *date, + struct tm *tm);; -void g_date_clamp (GDate *date, +GLIB_FUNC void g_date_clamp (GDate *date, const GDate *min_date, - const GDate *max_date); + const GDate *max_date);; /* Swap date1 and date2's values if date1 > date2. */ -void g_date_order (GDate *date1, GDate *date2); +GLIB_FUNC void g_date_order (GDate *date1, GDate *date2); /* Just like strftime() except you can only use date-related formats. * Using a time format is undefined. */ -gsize g_date_strftime (gchar *s, +GLIB_FUNC gsize g_date_strftime (gchar *s, gsize slen, const gchar *format, - const GDate *date); + const GDate *date);; #ifndef G_DISABLE_DEPRECATED --- glib-2.4.6/glib/gdir.h~visibility.patch +++ glib-2.4.6/glib/gdir.h @@ -29,12 +29,12 @@ typedef struct _GDir GDir; -GDir * g_dir_open (const gchar *path, +GLIB_FUNC GDir * g_dir_open (const gchar *path, guint flags, - GError **error); -G_CONST_RETURN gchar *g_dir_read_name (GDir *dir); -void g_dir_rewind (GDir *dir); -void g_dir_close (GDir *dir); + GError **error);; +GLIB_FUNC G_CONST_RETURN gchar *g_dir_read_name (GDir *dir); +GLIB_FUNC void g_dir_rewind (GDir *dir); +GLIB_FUNC void g_dir_close (GDir *dir); G_END_DECLS --- glib-2.4.6/glib/gerror.h~visibility.patch +++ glib-2.4.6/glib/gerror.h @@ -34,38 +34,38 @@ gchar *message; }; -GError* g_error_new (GQuark domain, +GLIB_FUNC GError* g_error_new (GQuark domain, gint code, const gchar *format, - ...) G_GNUC_PRINTF (3, 4); + ...) G_GNUC_PRINTF (3, 4);; -GError* g_error_new_literal (GQuark domain, +GLIB_FUNC GError* g_error_new_literal (GQuark domain, gint code, - const gchar *message); + const gchar *message);; -void g_error_free (GError *error); -GError* g_error_copy (const GError *error); +GLIB_FUNC void g_error_free (GError *error); +GLIB_FUNC GError* g_error_copy (const GError *error); -gboolean g_error_matches (const GError *error, +GLIB_FUNC gboolean g_error_matches (const GError *error, GQuark domain, - gint code); + gint code);; /* if (err) *err = g_error_new(domain, code, format, ...), also has * some sanity checks. */ -void g_set_error (GError **err, +GLIB_FUNC void g_set_error (GError **err, GQuark domain, gint code, const gchar *format, - ...) G_GNUC_PRINTF (4, 5); + ...) G_GNUC_PRINTF (4, 5);; /* if (dest) *dest = src; also has some sanity checks. */ -void g_propagate_error (GError **dest, - GError *src); +GLIB_FUNC void g_propagate_error (GError **dest, + GError *src);; /* if (err && *err) { g_error_free(*err); *err = NULL; } */ -void g_clear_error (GError **err); +GLIB_FUNC void g_clear_error (GError **err); G_END_DECLS --- glib-2.4.6/glib/gfileutils.h~visibility.patch +++ glib-2.4.6/glib/gfileutils.h @@ -68,32 +68,32 @@ G_FILE_TEST_EXISTS = 1 << 4 } GFileTest; -GQuark g_file_error_quark (void); +GLIB_FUNC GQuark g_file_error_quark (void); /* So other code can generate a GFileError */ -GFileError g_file_error_from_errno (gint err_no); +GLIB_FUNC GFileError g_file_error_from_errno (gint err_no); -gboolean g_file_test (const gchar *filename, - GFileTest test); -gboolean g_file_get_contents (const gchar *filename, +GLIB_FUNC gboolean g_file_test (const gchar *filename, + GFileTest test);; +GLIB_FUNC gboolean g_file_get_contents (const gchar *filename, gchar **contents, gsize *length, - GError **error); -gchar *g_file_read_link (const gchar *filename, - GError **error); + GError **error);; +GLIB_FUNC gchar *g_file_read_link (const gchar *filename, + GError **error);; /* Wrapper / workalike for mkstemp() */ -gint g_mkstemp (gchar *tmpl); +GLIB_FUNC gint g_mkstemp (gchar *tmpl); /* Wrapper for g_mkstemp */ -gint g_file_open_tmp (const gchar *tmpl, +GLIB_FUNC gint g_file_open_tmp (const gchar *tmpl, gchar **name_used, - GError **error); + GError **error);; -gchar *g_build_path (const gchar *separator, +GLIB_FUNC gchar *g_build_path (const gchar *separator, const gchar *first_element, - ...); -gchar *g_build_filename (const gchar *first_element, - ...); + ...);; +GLIB_FUNC gchar *g_build_filename (const gchar *first_element, + ...);; G_END_DECLS --- glib-2.4.6/glib/ghash.h~visibility.patch +++ glib-2.4.6/glib/ghash.h @@ -39,42 +39,42 @@ /* Hash tables */ -GHashTable* g_hash_table_new (GHashFunc hash_func, - GEqualFunc key_equal_func); -GHashTable* g_hash_table_new_full (GHashFunc hash_func, +GLIB_FUNC GHashTable* g_hash_table_new (GHashFunc hash_func, + GEqualFunc key_equal_func);; +GLIB_FUNC GHashTable* g_hash_table_new_full (GHashFunc hash_func, GEqualFunc key_equal_func, GDestroyNotify key_destroy_func, - GDestroyNotify value_destroy_func); -void g_hash_table_destroy (GHashTable *hash_table); -void g_hash_table_insert (GHashTable *hash_table, + GDestroyNotify value_destroy_func);; +GLIB_FUNC void g_hash_table_destroy (GHashTable *hash_table); +GLIB_FUNC void g_hash_table_insert (GHashTable *hash_table, gpointer key, - gpointer value); -void g_hash_table_replace (GHashTable *hash_table, + gpointer value);; +GLIB_FUNC void g_hash_table_replace (GHashTable *hash_table, gpointer key, - gpointer value); -gboolean g_hash_table_remove (GHashTable *hash_table, - gconstpointer key); -gboolean g_hash_table_steal (GHashTable *hash_table, - gconstpointer key); -gpointer g_hash_table_lookup (GHashTable *hash_table, - gconstpointer key); -gboolean g_hash_table_lookup_extended (GHashTable *hash_table, + gpointer value);; +GLIB_FUNC gboolean g_hash_table_remove (GHashTable *hash_table, + gconstpointer key);; +GLIB_FUNC gboolean g_hash_table_steal (GHashTable *hash_table, + gconstpointer key);; +GLIB_FUNC gpointer g_hash_table_lookup (GHashTable *hash_table, + gconstpointer key);; +GLIB_FUNC gboolean g_hash_table_lookup_extended (GHashTable *hash_table, gconstpointer lookup_key, gpointer *orig_key, - gpointer *value); -void g_hash_table_foreach (GHashTable *hash_table, + gpointer *value);; +GLIB_FUNC void g_hash_table_foreach (GHashTable *hash_table, GHFunc func, - gpointer user_data); -gpointer g_hash_table_find (GHashTable *hash_table, + gpointer user_data);; +GLIB_FUNC gpointer g_hash_table_find (GHashTable *hash_table, GHRFunc predicate, - gpointer user_data); -guint g_hash_table_foreach_remove (GHashTable *hash_table, + gpointer user_data);; +GLIB_FUNC guint g_hash_table_foreach_remove (GHashTable *hash_table, GHRFunc func, - gpointer user_data); -guint g_hash_table_foreach_steal (GHashTable *hash_table, + gpointer user_data);; +GLIB_FUNC guint g_hash_table_foreach_steal (GHashTable *hash_table, GHRFunc func, - gpointer user_data); -guint g_hash_table_size (GHashTable *hash_table); + gpointer user_data);; +GLIB_FUNC guint g_hash_table_size (GHashTable *hash_table); #ifndef G_DISABLE_DEPRECATED @@ -87,13 +87,13 @@ /* Hash Functions */ -gboolean g_str_equal (gconstpointer v, - gconstpointer v2); -guint g_str_hash (gconstpointer v); +GLIB_FUNC gboolean g_str_equal (gconstpointer v, + gconstpointer v2);; +GLIB_FUNC guint g_str_hash (gconstpointer v); -gboolean g_int_equal (gconstpointer v, - gconstpointer v2); -guint g_int_hash (gconstpointer v); +GLIB_FUNC gboolean g_int_equal (gconstpointer v, + gconstpointer v2);; +GLIB_FUNC guint g_int_hash (gconstpointer v); /* This "hash" function will just return the key's address as an * unsigned integer. Useful for hashing on plain addresses or @@ -101,8 +101,8 @@ * Passing NULL into g_hash_table_new() as GHashFunc has the * same effect as passing g_direct_hash(). */ -guint g_direct_hash (gconstpointer v) G_GNUC_CONST; -gboolean g_direct_equal (gconstpointer v, +GLIB_FUNC guint g_direct_hash (gconstpointer v) G_GNUC_CONST; +GLIB_FUNC gboolean g_direct_equal (gconstpointer v, gconstpointer v2) G_GNUC_CONST; G_END_DECLS --- glib-2.4.6/glib/ghook.h~visibility.patch +++ glib-2.4.6/glib/ghook.h @@ -99,78 +99,78 @@ /* --- prototypes --- */ /* callback maintenance functions */ -void g_hook_list_init (GHookList *hook_list, - guint hook_size); -void g_hook_list_clear (GHookList *hook_list); -GHook* g_hook_alloc (GHookList *hook_list); -void g_hook_free (GHookList *hook_list, - GHook *hook); -void g_hook_ref (GHookList *hook_list, - GHook *hook); -void g_hook_unref (GHookList *hook_list, - GHook *hook); -gboolean g_hook_destroy (GHookList *hook_list, - gulong hook_id); -void g_hook_destroy_link (GHookList *hook_list, - GHook *hook); -void g_hook_prepend (GHookList *hook_list, - GHook *hook); -void g_hook_insert_before (GHookList *hook_list, +GLIB_FUNC void g_hook_list_init (GHookList *hook_list, + guint hook_size);; +GLIB_FUNC void g_hook_list_clear (GHookList *hook_list); +GLIB_FUNC GHook* g_hook_alloc (GHookList *hook_list); +GLIB_FUNC void g_hook_free (GHookList *hook_list, + GHook *hook);; +GLIB_FUNC void g_hook_ref (GHookList *hook_list, + GHook *hook);; +GLIB_FUNC void g_hook_unref (GHookList *hook_list, + GHook *hook);; +GLIB_FUNC gboolean g_hook_destroy (GHookList *hook_list, + gulong hook_id);; +GLIB_FUNC void g_hook_destroy_link (GHookList *hook_list, + GHook *hook);; +GLIB_FUNC void g_hook_prepend (GHookList *hook_list, + GHook *hook);; +GLIB_FUNC void g_hook_insert_before (GHookList *hook_list, GHook *sibling, - GHook *hook); -void g_hook_insert_sorted (GHookList *hook_list, + GHook *hook);; +GLIB_FUNC void g_hook_insert_sorted (GHookList *hook_list, GHook *hook, - GHookCompareFunc func); -GHook* g_hook_get (GHookList *hook_list, - gulong hook_id); -GHook* g_hook_find (GHookList *hook_list, + GHookCompareFunc func);; +GLIB_FUNC GHook* g_hook_get (GHookList *hook_list, + gulong hook_id);; +GLIB_FUNC GHook* g_hook_find (GHookList *hook_list, gboolean need_valids, GHookFindFunc func, - gpointer data); -GHook* g_hook_find_data (GHookList *hook_list, + gpointer data);; +GLIB_FUNC GHook* g_hook_find_data (GHookList *hook_list, gboolean need_valids, - gpointer data); -GHook* g_hook_find_func (GHookList *hook_list, + gpointer data);; +GLIB_FUNC GHook* g_hook_find_func (GHookList *hook_list, gboolean need_valids, - gpointer func); -GHook* g_hook_find_func_data (GHookList *hook_list, + gpointer func);; +GLIB_FUNC GHook* g_hook_find_func_data (GHookList *hook_list, gboolean need_valids, gpointer func, - gpointer data); + gpointer data);; /* return the first valid hook, and increment its reference count */ -GHook* g_hook_first_valid (GHookList *hook_list, - gboolean may_be_in_call); +GLIB_FUNC GHook* g_hook_first_valid (GHookList *hook_list, + gboolean may_be_in_call);; /* return the next valid hook with incremented reference count, and * decrement the reference count of the original hook */ -GHook* g_hook_next_valid (GHookList *hook_list, +GLIB_FUNC GHook* g_hook_next_valid (GHookList *hook_list, GHook *hook, - gboolean may_be_in_call); + gboolean may_be_in_call);; /* GHookCompareFunc implementation to insert hooks sorted by their id */ -gint g_hook_compare_ids (GHook *new_hook, - GHook *sibling); +GLIB_FUNC gint g_hook_compare_ids (GHook *new_hook, + GHook *sibling);; /* convenience macros */ #define g_hook_append( hook_list, hook ) \ g_hook_insert_before ((hook_list), NULL, (hook)) /* invoke all valid hooks with the (*GHookFunc) signature. */ -void g_hook_list_invoke (GHookList *hook_list, - gboolean may_recurse); +GLIB_FUNC void g_hook_list_invoke (GHookList *hook_list, + gboolean may_recurse);; /* invoke all valid hooks with the (*GHookCheckFunc) signature, * and destroy the hook if FALSE is returned. */ -void g_hook_list_invoke_check (GHookList *hook_list, - gboolean may_recurse); +GLIB_FUNC void g_hook_list_invoke_check (GHookList *hook_list, + gboolean may_recurse);; /* invoke a marshaller on all valid hooks. */ -void g_hook_list_marshal (GHookList *hook_list, +GLIB_FUNC void g_hook_list_marshal (GHookList *hook_list, gboolean may_recurse, GHookMarshaller marshaller, - gpointer marshal_data); -void g_hook_list_marshal_check (GHookList *hook_list, + gpointer marshal_data);; +GLIB_FUNC void g_hook_list_marshal_check (GHookList *hook_list, gboolean may_recurse, GHookCheckMarshaller marshaller, - gpointer marshal_data); + gpointer marshal_data);; G_END_DECLS --- glib-2.4.6/glib/giochannel.h~visibility.patch +++ glib-2.4.6/glib/giochannel.h @@ -162,112 +162,112 @@ GIOFlags (*io_get_flags) (GIOChannel *channel); }; -void g_io_channel_init (GIOChannel *channel); -void g_io_channel_ref (GIOChannel *channel); -void g_io_channel_unref (GIOChannel *channel); +GLIB_FUNC void g_io_channel_init (GIOChannel *channel); +GLIB_FUNC void g_io_channel_ref (GIOChannel *channel); +GLIB_FUNC void g_io_channel_unref (GIOChannel *channel); #ifndef G_DISABLE_DEPRECATED -GIOError g_io_channel_read (GIOChannel *channel, +GLIB_FUNC GIOError g_io_channel_read (GIOChannel *channel, gchar *buf, gsize count, - gsize *bytes_read); -GIOError g_io_channel_write (GIOChannel *channel, + gsize *bytes_read);; +GLIB_FUNC GIOError g_io_channel_write (GIOChannel *channel, const gchar *buf, gsize count, - gsize *bytes_written); -GIOError g_io_channel_seek (GIOChannel *channel, + gsize *bytes_written);; +GLIB_FUNC GIOError g_io_channel_seek (GIOChannel *channel, gint64 offset, - GSeekType type); -void g_io_channel_close (GIOChannel *channel); + GSeekType type);; +GLIB_FUNC void g_io_channel_close (GIOChannel *channel); #endif /* G_DISABLE_DEPRECATED */ -GIOStatus g_io_channel_shutdown (GIOChannel *channel, +GLIB_FUNC GIOStatus g_io_channel_shutdown (GIOChannel *channel, gboolean flush, - GError **err); -guint g_io_add_watch_full (GIOChannel *channel, + GError **err);; +GLIB_FUNC guint g_io_add_watch_full (GIOChannel *channel, gint priority, GIOCondition condition, GIOFunc func, gpointer user_data, - GDestroyNotify notify); -GSource * g_io_create_watch (GIOChannel *channel, - GIOCondition condition); -guint g_io_add_watch (GIOChannel *channel, + GDestroyNotify notify);; +GLIB_FUNC GSource * g_io_create_watch (GIOChannel *channel, + GIOCondition condition);; +GLIB_FUNC guint g_io_add_watch (GIOChannel *channel, GIOCondition condition, GIOFunc func, - gpointer user_data); + gpointer user_data);; /* character encoding conversion involved functions. */ -void g_io_channel_set_buffer_size (GIOChannel *channel, - gsize size); -gsize g_io_channel_get_buffer_size (GIOChannel *channel); -GIOCondition g_io_channel_get_buffer_condition (GIOChannel *channel); -GIOStatus g_io_channel_set_flags (GIOChannel *channel, +GLIB_FUNC void g_io_channel_set_buffer_size (GIOChannel *channel, + gsize size);; +GLIB_FUNC gsize g_io_channel_get_buffer_size (GIOChannel *channel); +GLIB_FUNC GIOCondition g_io_channel_get_buffer_condition (GIOChannel *channel); +GLIB_FUNC GIOStatus g_io_channel_set_flags (GIOChannel *channel, GIOFlags flags, - GError **error); -GIOFlags g_io_channel_get_flags (GIOChannel *channel); -void g_io_channel_set_line_term (GIOChannel *channel, + GError **error);; +GLIB_FUNC GIOFlags g_io_channel_get_flags (GIOChannel *channel); +GLIB_FUNC void g_io_channel_set_line_term (GIOChannel *channel, const gchar *line_term, - gint length); -G_CONST_RETURN gchar* g_io_channel_get_line_term (GIOChannel *channel, - gint *length); -void g_io_channel_set_buffered (GIOChannel *channel, - gboolean buffered); -gboolean g_io_channel_get_buffered (GIOChannel *channel); -GIOStatus g_io_channel_set_encoding (GIOChannel *channel, + gint length);; +GLIB_FUNC G_CONST_RETURN gchar* g_io_channel_get_line_term (GIOChannel *channel, + gint *length);; +GLIB_FUNC void g_io_channel_set_buffered (GIOChannel *channel, + gboolean buffered);; +GLIB_FUNC gboolean g_io_channel_get_buffered (GIOChannel *channel); +GLIB_FUNC GIOStatus g_io_channel_set_encoding (GIOChannel *channel, const gchar *encoding, - GError **error); -G_CONST_RETURN gchar* g_io_channel_get_encoding (GIOChannel *channel); -void g_io_channel_set_close_on_unref (GIOChannel *channel, - gboolean do_close); -gboolean g_io_channel_get_close_on_unref (GIOChannel *channel); + GError **error);; +GLIB_FUNC G_CONST_RETURN gchar* g_io_channel_get_encoding (GIOChannel *channel); +GLIB_FUNC void g_io_channel_set_close_on_unref (GIOChannel *channel, + gboolean do_close);; +GLIB_FUNC gboolean g_io_channel_get_close_on_unref (GIOChannel *channel); -GIOStatus g_io_channel_flush (GIOChannel *channel, - GError **error); -GIOStatus g_io_channel_read_line (GIOChannel *channel, +GLIB_FUNC GIOStatus g_io_channel_flush (GIOChannel *channel, + GError **error);; +GLIB_FUNC GIOStatus g_io_channel_read_line (GIOChannel *channel, gchar **str_return, gsize *length, gsize *terminator_pos, - GError **error); -GIOStatus g_io_channel_read_line_string (GIOChannel *channel, + GError **error);; +GLIB_FUNC GIOStatus g_io_channel_read_line_string (GIOChannel *channel, GString *buffer, gsize *terminator_pos, - GError **error); -GIOStatus g_io_channel_read_to_end (GIOChannel *channel, + GError **error);; +GLIB_FUNC GIOStatus g_io_channel_read_to_end (GIOChannel *channel, gchar **str_return, gsize *length, - GError **error); -GIOStatus g_io_channel_read_chars (GIOChannel *channel, + GError **error);; +GLIB_FUNC GIOStatus g_io_channel_read_chars (GIOChannel *channel, gchar *buf, gsize count, gsize *bytes_read, - GError **error); -GIOStatus g_io_channel_read_unichar (GIOChannel *channel, + GError **error);; +GLIB_FUNC GIOStatus g_io_channel_read_unichar (GIOChannel *channel, gunichar *thechar, - GError **error); -GIOStatus g_io_channel_write_chars (GIOChannel *channel, + GError **error);; +GLIB_FUNC GIOStatus g_io_channel_write_chars (GIOChannel *channel, const gchar *buf, gssize count, gsize *bytes_written, - GError **error); -GIOStatus g_io_channel_write_unichar (GIOChannel *channel, + GError **error);; +GLIB_FUNC GIOStatus g_io_channel_write_unichar (GIOChannel *channel, gunichar thechar, - GError **error); -GIOStatus g_io_channel_seek_position (GIOChannel *channel, + GError **error);; +GLIB_FUNC GIOStatus g_io_channel_seek_position (GIOChannel *channel, gint64 offset, GSeekType type, - GError **error); -GIOChannel* g_io_channel_new_file (const gchar *filename, + GError **error);; +GLIB_FUNC GIOChannel* g_io_channel_new_file (const gchar *filename, const gchar *mode, - GError **error); + GError **error);; /* Error handling */ -GQuark g_io_channel_error_quark (void); -GIOChannelError g_io_channel_error_from_errno (gint en); +GLIB_FUNC GQuark g_io_channel_error_quark (void); +GLIB_FUNC GIOChannelError g_io_channel_error_from_errno (gint en); /* On Unix, IO channels created with this function for any file * descriptor or socket. @@ -287,8 +287,8 @@ * corresponding concept is file HANDLE. There isn't as of yet a way to * get GIOChannels for Win32 file HANDLEs. */ -GIOChannel* g_io_channel_unix_new (int fd); -gint g_io_channel_unix_get_fd (GIOChannel *channel); +GLIB_FUNC GIOChannel* g_io_channel_unix_new (int fd); +GLIB_FUNC gint g_io_channel_unix_get_fd (GIOChannel *channel); /* Hook for GClosure / GSource integration. Don't touch */ @@ -308,19 +308,19 @@ * from the underlying file descriptor. For SOCKETs, it is possible to call * recv(). */ -void g_io_channel_win32_make_pollfd (GIOChannel *channel, +GLIB_FUNC void g_io_channel_win32_make_pollfd (GIOChannel *channel, GIOCondition condition, - GPollFD *fd); + GPollFD *fd);; /* This can be used to wait a until at least one of the channels is readable. * On Unix you would do a select() on the file descriptors of the channels. */ -gint g_io_channel_win32_poll (GPollFD *fds, +GLIB_FUNC gint g_io_channel_win32_poll (GPollFD *fds, gint n_fds, - gint timeout_); + gint timeout_);; /* Create an IO channel for Windows messages for window handle hwnd. */ -GIOChannel *g_io_channel_win32_new_messages (guint hwnd); +GLIB_FUNC GIOChannel *g_io_channel_win32_new_messages (guint hwnd);; /* Create an IO channel for C runtime (emulated Unix-like) file * descriptors. After calling g_io_add_watch() on a IO channel @@ -331,17 +331,17 @@ * the file descriptor should be done by this internal GLib * thread. Your code should call only g_io_channel_read(). */ -GIOChannel* g_io_channel_win32_new_fd (gint fd); +GLIB_FUNC GIOChannel* g_io_channel_win32_new_fd (gint fd); /* Get the C runtime file descriptor of a channel. */ -gint g_io_channel_win32_get_fd (GIOChannel *channel); +GLIB_FUNC gint g_io_channel_win32_get_fd (GIOChannel *channel); /* Create an IO channel for a winsock socket. The parameter should be * a SOCKET. Contrary to IO channels for file descriptors (on *Win32), * you can use normal recv() or recvfrom() on sockets even if GLib * is polling them. */ -GIOChannel *g_io_channel_win32_new_socket (gint socket); +GLIB_FUNC GIOChannel *g_io_channel_win32_new_socket (gint socket);; #endif --- glib-2.4.6/glib/glib.def~visibility.patch +++ glib-2.4.6/glib/glib.def @@ -1,4 +1,3 @@ -EXPORTS g_allocator_free g_allocator_new g_array_append_vals @@ -47,9 +46,7 @@ g_atomic_int_add g_atomic_int_compare_and_exchange g_atomic_int_exchange_and_add -; g_atomic_int_get g_atomic_pointer_compare_and_exchange -; g_atomic_pointer_get g_basename g_bit_nth_lsf g_bit_nth_msf --- glib-2.4.6/glib/glist.h~visibility.patch +++ glib-2.4.6/glib/glist.h @@ -42,62 +42,62 @@ /* Doubly linked lists */ -void g_list_push_allocator (GAllocator *allocator); -void g_list_pop_allocator (void); -GList* g_list_alloc (void); -void g_list_free (GList *list); -void g_list_free_1 (GList *list); -GList* g_list_append (GList *list, - gpointer data); -GList* g_list_prepend (GList *list, - gpointer data); -GList* g_list_insert (GList *list, +GLIB_FUNC void g_list_push_allocator (GAllocator *allocator); +GLIB_FUNC void g_list_pop_allocator (void); +GLIB_FUNC GList* g_list_alloc (void); +GLIB_FUNC void g_list_free (GList *list); +GLIB_FUNC void g_list_free_1 (GList *list); +GLIB_FUNC GList* g_list_append (GList *list, + gpointer data);; +GLIB_FUNC GList* g_list_prepend (GList *list, + gpointer data);; +GLIB_FUNC GList* g_list_insert (GList *list, gpointer data, - gint position); -GList* g_list_insert_sorted (GList *list, + gint position);; +GLIB_FUNC GList* g_list_insert_sorted (GList *list, gpointer data, - GCompareFunc func); -GList* g_list_insert_before (GList *list, + GCompareFunc func);; +GLIB_FUNC GList* g_list_i