These includes are already "correctly" handled inside mutt.h.

configure.ac does a compile check for wchar_t, wint_t, and mbstate_t,
including wchar.h if it exists.  If the check fails, it defines
default values for those.  It does this prior to, and independently
from, the --without-wc-funcs check.

That means, on a system with wchar.h containing those types,
configuring mutt --without-wc-funcs would generate errors using only
the mbyte.h version of includes, because no substitute wchar_t,
wint_t, and mbstate_t would be defined and wchar.h would not be
included even though it exists.

These includes in mbyte.h are unnecessary and confusing.
---
Regardless of what we decided to do with --without-wc-funcs, I thought
it would be a good idea to remove these confusing and incorrect
includes.

 mbyte.h | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/mbyte.h b/mbyte.h
index 1580d223..2d703e9f 100644
--- a/mbyte.h
+++ b/mbyte.h
@@ -1,15 +1,6 @@
 #ifndef _MBYTE_H
 # define _MBYTE_H
 
-# ifdef HAVE_WC_FUNCS
-#  ifdef HAVE_WCHAR_H
-#   include <wchar.h>
-#  endif
-#  ifdef HAVE_WCTYPE_H
-#   include <wctype.h>
-#  endif
-# endif
-
 # ifndef HAVE_WC_FUNCS
 #ifdef towupper
 # undef towupper
-- 
2.53.0

Reply via email to