diff options
| author | Eli Zaretskii | 2011-09-16 13:25:39 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2011-09-16 13:25:39 +0300 |
| commit | b41c3a3565631bdb20611126cae9bca4a4bc81f9 (patch) | |
| tree | 78dd74d418d04959b31834b1b3cf05c5a8fa4f8d /src | |
| parent | 7812ba2dea75097980bb6371381385b417479c74 (diff) | |
| download | emacs-b41c3a3565631bdb20611126cae9bca4a4bc81f9.tar.gz emacs-b41c3a3565631bdb20611126cae9bca4a4bc81f9.zip | |
Fix a compilation error with MinGW GCC 3.x in tiff_handler.
src/image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
GCC PR/17406) by declaring this function with external scope.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/image.c | 15 |
2 files changed, 18 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 15281f47438..cf75c28c385 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-09-16 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see | ||
| 4 | GCC PR/17406) by declaring this function with external scope. | ||
| 5 | |||
| 1 | 2011-09-15 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2011-09-15 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514). | 8 | * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514). |
diff --git a/src/image.c b/src/image.c index db201d5a831..ef72745a72f 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -6745,10 +6745,20 @@ tiff_size_of_memory (thandle_t data) | |||
| 6745 | return ((tiff_memory_source *) data)->len; | 6745 | return ((tiff_memory_source *) data)->len; |
| 6746 | } | 6746 | } |
| 6747 | 6747 | ||
| 6748 | /* GCC 3.x on x86 Windows targets has a bug that triggers an internal | ||
| 6749 | compiler error compiling tiff_handler, see Bugzilla bug #17406 | ||
| 6750 | (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17406). Declaring | ||
| 6751 | this function as external works around that problem. */ | ||
| 6752 | #if defined (__MINGW32__) && __GNUC__ == 3 | ||
| 6753 | # define MINGW_STATIC | ||
| 6754 | #else | ||
| 6755 | # define MINGW_STATIC static | ||
| 6756 | #endif | ||
| 6748 | 6757 | ||
| 6749 | static void tiff_handler (const char *, const char *, const char *, va_list) | 6758 | MINGW_STATIC void |
| 6759 | tiff_handler (const char *, const char *, const char *, va_list) | ||
| 6750 | ATTRIBUTE_FORMAT_PRINTF (3, 0); | 6760 | ATTRIBUTE_FORMAT_PRINTF (3, 0); |
| 6751 | static void | 6761 | MINGW_STATIC void |
| 6752 | tiff_handler (const char *log_format, const char *title, | 6762 | tiff_handler (const char *log_format, const char *title, |
| 6753 | const char *format, va_list ap) | 6763 | const char *format, va_list ap) |
| 6754 | { | 6764 | { |
| @@ -6762,6 +6772,7 @@ tiff_handler (const char *log_format, const char *title, | |||
| 6762 | add_to_log (log_format, build_string (title), | 6772 | add_to_log (log_format, build_string (title), |
| 6763 | make_string (buf, max (0, min (len, sizeof buf - 1)))); | 6773 | make_string (buf, max (0, min (len, sizeof buf - 1)))); |
| 6764 | } | 6774 | } |
| 6775 | #undef MINGW_STATIC | ||
| 6765 | 6776 | ||
| 6766 | static void tiff_error_handler (const char *, const char *, va_list) | 6777 | static void tiff_error_handler (const char *, const char *, va_list) |
| 6767 | ATTRIBUTE_FORMAT_PRINTF (2, 0); | 6778 | ATTRIBUTE_FORMAT_PRINTF (2, 0); |