applied a trio update patch from Bjorn Reese which should work with MinGW

* trio.c trio.h triodef.h trionan.c trionan.h triop.h
  triostr.c triostr.h: applied a trio update patch from
  Bjorn Reese which should work with MinGW
Daniel
diff --git a/triostr.h b/triostr.h
index 94b01ee..083e2a5 100644
--- a/triostr.h
+++ b/triostr.h
@@ -31,42 +31,50 @@
   TRIO_HASH_TWOSIGNED
 };
 
+#if !defined(TRIO_STRING_PUBLIC)
+# if !defined(TRIO_PUBLIC)
+#  define TRIO_PUBLIC
+# endif
+# define TRIO_STRING_PUBLIC TRIO_PUBLIC
+#endif
+
 /*************************************************************************
  * String functions
  */
 
-int trio_append(char *target, const char *source);
-int trio_append_max(char *target, size_t max, const char *source);
-int trio_contains(const char *string, const char *substring);
-int trio_copy(char *target, const char *source);
-int trio_copy_max(char *target, size_t max, const char *source);
-char *trio_create(size_t size);
-void trio_destroy(char *string);
-char *trio_duplicate(const char *source);
-char *trio_duplicate_max(const char *source, size_t max);
-int trio_equal(const char *first, const char *second);
-int trio_equal_case(const char *first, const char *second);
-int trio_equal_case_max(const char *first, size_t max, const char *second);
-int trio_equal_locale(const char *first, const char *second);
-int trio_equal_max(const char *first, size_t max, const char *second);
-const char *trio_error(int);
-size_t trio_format_date_max(char *target, size_t max, const char *format, const struct tm *datetime);
-unsigned long trio_hash(const char *string, int type);
-char *trio_index(const char *string, char character);
-char *trio_index_last(const char *string, char character);
-size_t trio_length(const char *string);
-int trio_lower(char *target);
-int trio_match(const char *string, const char *pattern);
-int trio_match_case(const char *string, const char *pattern);
-size_t trio_span_function(char *target, const char *source, int (*Function)(int));
-char *trio_substring(const char *string, const char *substring);
-char *trio_substring_max(const char *string, size_t max, const char *substring);
-char *trio_tokenize(char *string, const char *delimiters);
-float trio_to_float(const char *source, const char **endp);
-double trio_to_double(const char *source, const char **endp);
-long trio_to_long(const char *source, char **endp, int base);
-unsigned long trio_to_unsigned_long(const char *source, char **endp, int base);
-int trio_upper(char *target);
+TRIO_STRING_PUBLIC int trio_append TRIO_PROTO((char *target, const char *source));
+TRIO_STRING_PUBLIC int trio_append_max TRIO_PROTO((char *target, size_t max, const char *source));
+TRIO_STRING_PUBLIC int trio_contains TRIO_PROTO((const char *string, const char *substring));
+TRIO_STRING_PUBLIC int trio_copy TRIO_PROTO((char *target, const char *source));
+TRIO_STRING_PUBLIC int trio_copy_max TRIO_PROTO((char *target, size_t max, const char *source));
+TRIO_STRING_PUBLIC char *trio_create TRIO_PROTO((size_t size));
+TRIO_STRING_PUBLIC void trio_destroy TRIO_PROTO((char *string));
+TRIO_STRING_PUBLIC char *trio_duplicate TRIO_PROTO((const char *source));
+TRIO_STRING_PUBLIC char *trio_duplicate_max TRIO_PROTO((const char *source, size_t max));
+TRIO_STRING_PUBLIC int trio_equal TRIO_PROTO((const char *first, const char *second));
+TRIO_STRING_PUBLIC int trio_equal_case TRIO_PROTO((const char *first, const char *second));
+TRIO_STRING_PUBLIC int trio_equal_case_max TRIO_PROTO((const char *first, size_t max, const char *second));
+TRIO_STRING_PUBLIC int trio_equal_locale TRIO_PROTO((const char *first, const char *second));
+TRIO_STRING_PUBLIC int trio_equal_max TRIO_PROTO((const char *first, size_t max, const char *second));
+TRIO_STRING_PUBLIC TRIO_CONST char *trio_error TRIO_PROTO((int));
+TRIO_STRING_PUBLIC size_t trio_format_date_max TRIO_PROTO((char *target, size_t max, const char *format, const struct tm *datetime));
+TRIO_STRING_PUBLIC unsigned long trio_hash TRIO_PROTO((const char *string, int type));
+TRIO_STRING_PUBLIC char *trio_index TRIO_PROTO((const char *string, int character));
+TRIO_STRING_PUBLIC char *trio_index_last TRIO_PROTO((const char *string, int character));
+TRIO_STRING_PUBLIC size_t trio_length TRIO_PROTO((const char *string));
+TRIO_STRING_PUBLIC int trio_lower TRIO_PROTO((char *target));
+TRIO_STRING_PUBLIC int trio_match TRIO_PROTO((const char *string, const char *pattern));
+TRIO_STRING_PUBLIC int trio_match_case TRIO_PROTO((const char *string, const char *pattern));
+TRIO_STRING_PUBLIC size_t trio_span_function TRIO_PROTO((char *target, const char *source, int (*Function) TRIO_PROTO((int))));
+TRIO_STRING_PUBLIC char *trio_substring TRIO_PROTO((const char *string, const char *substring));
+TRIO_STRING_PUBLIC char *trio_substring_max TRIO_PROTO((const char *string, size_t max, const char *substring));
+TRIO_STRING_PUBLIC double trio_to_double TRIO_PROTO((const char *source, char **endp));
+TRIO_STRING_PUBLIC float trio_to_float TRIO_PROTO((const char *source, char **endp));
+TRIO_STRING_PUBLIC trio_long_double_t trio_to_long_double TRIO_PROTO((const char *source, char **endp));
+TRIO_STRING_PUBLIC long trio_to_long TRIO_PROTO((const char *source, char **endp, int base));
+TRIO_STRING_PUBLIC unsigned long trio_to_unsigned_long TRIO_PROTO((const char *source, char **endp, int base));
+TRIO_STRING_PUBLIC char *trio_tokenize TRIO_PROTO((char *string, const char *delimiters));
+TRIO_STRING_PUBLIC int trio_upper TRIO_PROTO((char *target));
 
 /*************************************************************************
  * Dynamic string functions
@@ -77,43 +85,43 @@
  */
 typedef struct _trio_string_t trio_string_t;
 
-trio_string_t *trio_string_create(int initial_size);
-void trio_string_destroy(trio_string_t *self);
-char *trio_string_get(trio_string_t *self, int offset);
-void trio_xstring_set(trio_string_t *self, char *buffer);
-char *trio_string_extract(trio_string_t *self);
-int trio_string_size(trio_string_t *self);
-void trio_string_terminate(trio_string_t *self);
+TRIO_STRING_PUBLIC trio_string_t *trio_string_create TRIO_PROTO((int initial_size));
+TRIO_STRING_PUBLIC void trio_string_destroy TRIO_PROTO((trio_string_t *self));
+TRIO_STRING_PUBLIC char *trio_string_get TRIO_PROTO((trio_string_t *self, int offset));
+TRIO_STRING_PUBLIC void trio_xstring_set TRIO_PROTO((trio_string_t *self, char *buffer));
+TRIO_STRING_PUBLIC char *trio_string_extract TRIO_PROTO((trio_string_t *self));
+TRIO_STRING_PUBLIC int trio_string_size TRIO_PROTO((trio_string_t *self));
+TRIO_STRING_PUBLIC void trio_string_terminate TRIO_PROTO((trio_string_t *self));
 
-int trio_string_append(trio_string_t *self, trio_string_t *other);
-int trio_string_contains(trio_string_t *self, trio_string_t *other);
-int trio_string_copy(trio_string_t *self, trio_string_t *other);
-trio_string_t *trio_string_duplicate(trio_string_t *other);
-int trio_string_equal(trio_string_t *self, trio_string_t *other);
-int trio_string_equal_max(trio_string_t *self, size_t max, trio_string_t *second);
-int trio_string_equal_case(trio_string_t *self, trio_string_t *other);
-int trio_string_equal_case_max(trio_string_t *self, size_t max, trio_string_t *other);
-size_t trio_string_format_date_max(trio_string_t *self, size_t max, const char *format, const struct tm *datetime);
-char *trio_string_index(trio_string_t *self, int character);
-char *trio_string_index_last(trio_string_t *self, int character);
-int trio_string_length(trio_string_t *self);
-int trio_string_lower(trio_string_t *self);
-int trio_string_match(trio_string_t *self, trio_string_t *other);
-int trio_string_match_case(trio_string_t *self, trio_string_t *other);
-char *trio_string_substring(trio_string_t *self, trio_string_t *other);
-int trio_string_upper(trio_string_t *self);
+TRIO_STRING_PUBLIC int trio_string_append TRIO_PROTO((trio_string_t *self, trio_string_t *other));
+TRIO_STRING_PUBLIC int trio_string_contains TRIO_PROTO((trio_string_t *self, trio_string_t *other));
+TRIO_STRING_PUBLIC int trio_string_copy TRIO_PROTO((trio_string_t *self, trio_string_t *other));
+TRIO_STRING_PUBLIC trio_string_t *trio_string_duplicate TRIO_PROTO((trio_string_t *other));
+TRIO_STRING_PUBLIC int trio_string_equal TRIO_PROTO((trio_string_t *self, trio_string_t *other));
+TRIO_STRING_PUBLIC int trio_string_equal_max TRIO_PROTO((trio_string_t *self, size_t max, trio_string_t *second));
+TRIO_STRING_PUBLIC int trio_string_equal_case TRIO_PROTO((trio_string_t *self, trio_string_t *other));
+TRIO_STRING_PUBLIC int trio_string_equal_case_max TRIO_PROTO((trio_string_t *self, size_t max, trio_string_t *other));
+TRIO_STRING_PUBLIC size_t trio_string_format_date_max TRIO_PROTO((trio_string_t *self, size_t max, const char *format, const struct tm *datetime));
+TRIO_STRING_PUBLIC char *trio_string_index TRIO_PROTO((trio_string_t *self, int character));
+TRIO_STRING_PUBLIC char *trio_string_index_last TRIO_PROTO((trio_string_t *self, int character));
+TRIO_STRING_PUBLIC int trio_string_length TRIO_PROTO((trio_string_t *self));
+TRIO_STRING_PUBLIC int trio_string_lower TRIO_PROTO((trio_string_t *self));
+TRIO_STRING_PUBLIC int trio_string_match TRIO_PROTO((trio_string_t *self, trio_string_t *other));
+TRIO_STRING_PUBLIC int trio_string_match_case TRIO_PROTO((trio_string_t *self, trio_string_t *other));
+TRIO_STRING_PUBLIC char *trio_string_substring TRIO_PROTO((trio_string_t *self, trio_string_t *other));
+TRIO_STRING_PUBLIC int trio_string_upper TRIO_PROTO((trio_string_t *self));
 
-int trio_xstring_append_char(trio_string_t *self, char character);
-int trio_xstring_append(trio_string_t *self, const char *other);
-int trio_xstring_contains(trio_string_t *self, const char *other);
-int trio_xstring_copy(trio_string_t *self, const char *other);
-trio_string_t *trio_xstring_duplicate(const char *other);
-int trio_xstring_equal(trio_string_t *self, const char *other);
-int trio_xstring_equal_max(trio_string_t *self, size_t max, const char *other);
-int trio_xstring_equal_case(trio_string_t *self, const char *other);
-int trio_xstring_equal_case_max(trio_string_t *self, size_t max, const char *other);
-int trio_xstring_match(trio_string_t *self, const char *other);
-int trio_xstring_match_case(trio_string_t *self, const char *other);
-char *trio_xstring_substring(trio_string_t *self, const char *other);
+TRIO_STRING_PUBLIC int trio_xstring_append_char TRIO_PROTO((trio_string_t *self, char character));
+TRIO_STRING_PUBLIC int trio_xstring_append TRIO_PROTO((trio_string_t *self, const char *other));
+TRIO_STRING_PUBLIC int trio_xstring_contains TRIO_PROTO((trio_string_t *self, const char *other));
+TRIO_STRING_PUBLIC int trio_xstring_copy TRIO_PROTO((trio_string_t *self, const char *other));
+TRIO_STRING_PUBLIC trio_string_t *trio_xstring_duplicate TRIO_PROTO((const char *other));
+TRIO_STRING_PUBLIC int trio_xstring_equal TRIO_PROTO((trio_string_t *self, const char *other));
+TRIO_STRING_PUBLIC int trio_xstring_equal_max TRIO_PROTO((trio_string_t *self, size_t max, const char *other));
+TRIO_STRING_PUBLIC int trio_xstring_equal_case TRIO_PROTO((trio_string_t *self, const char *other));
+TRIO_STRING_PUBLIC int trio_xstring_equal_case_max TRIO_PROTO((trio_string_t *self, size_t max, const char *other));
+TRIO_STRING_PUBLIC int trio_xstring_match TRIO_PROTO((trio_string_t *self, const char *other));
+TRIO_STRING_PUBLIC int trio_xstring_match_case TRIO_PROTO((trio_string_t *self, const char *other));
+TRIO_STRING_PUBLIC char *trio_xstring_substring TRIO_PROTO((trio_string_t *self, const char *other));
 
 #endif /* TRIO_TRIOSTR_H */