]> granicus.if.org Git - mutt/commitdiff
fix for compiling Mutt with clang: check for wchar_h prior to wctype_h in check for...
authorMichael Elkins <me@sigpipe.org>
Tue, 6 Apr 2010 16:47:15 +0000 (09:47 -0700)
committerMichael Elkins <me@sigpipe.org>
Tue, 6 Apr 2010 16:47:15 +0000 (09:47 -0700)
configure.ac
muttlib.c

index b7227d3713d21f840c2afe7e193f3d8efa3ad030..65347220e8b5e5a8a0fed199f6a992c054f29727 100644 (file)
@@ -1252,11 +1252,11 @@ if test "$wc_funcs" != yes && test "$wc_funcs" != no; then
 #define _XOPEN_SOURCE 1
 #include <stddef.h>
 #include <stdlib.h>
-#ifdef HAVE_WCTYPE_H
-#include <wctype.h>
-#endif
 #ifdef HAVE_WCHAR_H
 #include <wchar.h>
+#endif
+#ifdef HAVE_WCTYPE_H
+#include <wctype.h>
 #endif],
                         [mbrtowc(0, 0, 0, 0); wctomb(0, 0); wcwidth(0);
         iswprint(0); iswspace(0); towlower(0); towupper(0); iswalnum(0)],
index c867ce9f8fc687cef40205b6a319f3d18837961e..f530f6bce0e2ee6b7d3007272a6b2fcd19b517a1 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -177,13 +177,13 @@ void mutt_free_body (BODY **p)
 
     if (b->parameter)
       mutt_free_parameter (&b->parameter);
-    if (b->unlink && b->filename)
+    if (b->filename)
     {
-      dprint (1, (debugfile, "mutt_free_body: Unlinking %s.\n", b->filename));
-      unlink (b->filename);
+      if (b->unlink)
+       unlink (b->filename);
+      dprint (1, (debugfile, "mutt_free_body: %sunlinking %s.\n",
+           b->unlink ? "" : "not ", b->filename));
     }
-    else if (b->filename) 
-      dprint (1, (debugfile, "mutt_free_body: Not unlinking %s.\n", b->filename));
 
     FREE (&b->filename);
     FREE (&b->content);