AC_DEFINE(HAVE_LANGINFO_YESEXPR,1,[ Define if you have <langinfo.h> and nl_langinfo(YESEXPR). ])
fi
-AC_CHECK_FUNCS(fmemopen open_memstream)
+AC_CHECK_FUNCS(fmemopen open_memstream, [
+ AC_ARG_ENABLE(fmemopen, AS_HELP_STRING([--disable-fmemopen],[Do NOT use fmemopen]),
+ [],
+ [AC_DEFINE(USE_FMEMOPEN, 1, [Use fmemopen])])
+])
dnl Documentation tools
have_openjade="no"
int origType;
char *savePrefix = NULL;
FILE *fp = NULL;
-#ifndef HAVE_FMEMOPEN
+#ifndef USE_FMEMOPEN
char tempfile[_POSIX_PATH_MAX];
#endif
size_t tmplength = 0;
fseeko (s->fpin, b->offset, 0);
-#ifdef HAVE_FMEMOPEN
+#ifdef USE_FMEMOPEN
char *temp;
size_t tempsize;
#endif
{
/* decode to a tempfile, saving the original destination */
fp = s->fpout;
-#ifdef HAVE_FMEMOPEN
+#ifdef USE_FMEMOPEN
s->fpout = open_memstream (&temp, &tempsize);
if (!s->fpout) {
mutt_error _("Unable to open memory stream!");
/* restore final destination and substitute the tempfile for input */
s->fpout = fp;
fp = s->fpin;
-#ifdef HAVE_FMEMOPEN
+#ifdef USE_FMEMOPEN
if (tempsize) {
s->fpin = fmemopen (temp, tempsize, "r");
} else { /* fmemopen cannot handle zero-length buffers */
/* restore the original source stream */
safe_fclose (&s->fpin);
-#ifdef HAVE_FMEMOPEN
+#ifdef USE_FMEMOPEN
if (tempsize)
FREE(&temp);
#endif
"-USE_SIDEBAR "
#endif
+#if USE_FMEMOPEN
+ "+USE_FMEMOPEN "
+#else
+ "-USE_FMEMOPEN "
+#endif
+
);
#ifdef ISPELL
HEADER *h = ctx->hdrs[msgno];
char *buf;
size_t blen;
-#ifdef HAVE_FMEMOPEN
+#ifdef USE_FMEMOPEN
char *temp;
size_t tempsize;
#else
memset (&s, 0, sizeof (s));
s.fpin = msg->fp;
s.flags = MUTT_CHARCONV;
-#ifdef HAVE_FMEMOPEN
+#ifdef USE_FMEMOPEN
s.fpout = open_memstream (&temp, &tempsize);
if (!s.fpout) {
mutt_perror ("Error opening memstream");
if (s.fpout)
{
safe_fclose (&s.fpout);
-#ifdef HAVE_FMEMOPEN
+#ifdef USE_FMEMOPEN
FREE(&temp);
#else
unlink (tempfile);
mutt_body_handler (h->content, &s);
}
-#ifdef HAVE_FMEMOPEN
+#ifdef USE_FMEMOPEN
fclose (s.fpout);
lng = tempsize;
if (option (OPTTHOROUGHSRC))
{
safe_fclose (&fp);
-#ifdef HAVE_FMEMOPEN
+#ifdef USE_FMEMOPEN
if (tempsize)
FREE(&temp);
#else