emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r105792: Fix a compilation error with


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105792: Fix a compilation error with MinGW GCC 3.x in tiff_handler.
Date: Fri, 16 Sep 2011 13:25:39 +0300
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105792
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Fri 2011-09-16 13:25:39 +0300
message:
  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.
modified:
  src/ChangeLog
  src/image.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-09-15 18:11:37 +0000
+++ b/src/ChangeLog     2011-09-16 10:25:39 +0000
@@ -1,3 +1,8 @@
+2011-09-16  Eli Zaretskii  <address@hidden>
+
+       * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
+       GCC PR/17406) by declaring this function with external scope.
+
 2011-09-15  Paul Eggert  <address@hidden>
 
        * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).

=== modified file 'src/image.c'
--- a/src/image.c       2011-09-10 18:13:24 +0000
+++ b/src/image.c       2011-09-16 10:25:39 +0000
@@ -6745,10 +6745,20 @@
   return ((tiff_memory_source *) data)->len;
 }
 
+/* GCC 3.x on x86 Windows targets has a bug that triggers an internal
+   compiler error compiling tiff_handler, see Bugzilla bug #17406
+   (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17406).  Declaring
+   this function as external works around that problem.  */
+#if defined (__MINGW32__) && __GNUC__ == 3
+# define MINGW_STATIC
+#else
+# define MINGW_STATIC static
+#endif
 
-static void tiff_handler (const char *, const char *, const char *, va_list)
+MINGW_STATIC void
+tiff_handler (const char *, const char *, const char *, va_list)
   ATTRIBUTE_FORMAT_PRINTF (3, 0);
-static void
+MINGW_STATIC void
 tiff_handler (const char *log_format, const char *title,
              const char *format, va_list ap)
 {
@@ -6762,6 +6772,7 @@
   add_to_log (log_format, build_string (title),
              make_string (buf, max (0, min (len, sizeof buf - 1))));
 }
+#undef MINGW_STATIC
 
 static void tiff_error_handler (const char *, const char *, va_list)
   ATTRIBUTE_FORMAT_PRINTF (2, 0);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]