MESSAGE(FATAL_ERROR "inconv.h not found")
ENDIF(NOT HAVE_ICONV_H)
+# }}}
+# types {{{
+
+INCLUDE(CheckStructMember)
+
+CHECK_STRUCT_MEMBER("struct dirent" "d_ino" "dirent.h" HAVE_DIRENT_D_INO)
+
# }}}
# functions {{{
INCLUDE (CheckFunctionExists)
--- /dev/null
+# - Check if the given struct or class has the specified member variable
+# CHECK_STRUCT_MEMBER (STRUCT MEMBER HEADER VARIABLE)
+#
+# STRUCT - the name of the struct or class you are interested in
+# MEMBER - the member which existence you want to check
+# HEADER - the header(s) where the prototype should be declared
+# VARIABLE - variable to store the result
+#
+# The following variables may be set before calling this macro to
+# modify the way the check is run:
+#
+# CMAKE_REQUIRED_FLAGS = string of compile command line flags
+# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
+# CMAKE_REQUIRED_INCLUDES = list of include directories
+
+# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+INCLUDE(CheckCSourceCompiles)
+
+MACRO (CHECK_STRUCT_MEMBER _STRUCT _MEMBER _HEADER _RESULT)
+ SET(_INCLUDE_FILES)
+ FOREACH (it ${_HEADER})
+ SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n")
+ ENDFOREACH (it)
+
+ SET(_CHECK_STRUCT_MEMBER_SOURCE_CODE "
+${_INCLUDE_FILES}
+int main()
+{
+ ${_STRUCT} tmp;
+ tmp.${_MEMBER};
+ return 0;
+}
+")
+ CHECK_C_SOURCE_COMPILES("${_CHECK_STRUCT_MEMBER_SOURCE_CODE}" ${_RESULT})
+
+ENDMACRO (CHECK_STRUCT_MEMBER)
-#cmakedefine SENDMAIL "${SENDMAIL}/sendmail"
-#cmakedefine MIXMASTER "${MIXMASTER}/mixmaster"
+#cmakedefine MAILPATH "${MAILPATH}"
+#cmakedefine SENDMAIL "${SENDMAIL}/sendmail"
+#cmakedefine MIXMASTER "${MIXMASTER}/mixmaster"
#ifndef MIXMASTER
-#define MIXMASTER "mixmaster"
+#define MIXMASTER "mixmaster"
#endif
-#cmakedefine MAILPATH "${MAILPATH}"
-
-#cmakedefine HAVE_LIBIDN 1
-#cmakedefine HAVE_QDBM 1
-#cmakedefine HAVE_GDBM 1
-#cmakedefine USE_FLOCK 1
-#cmakedefine USE_FCNTL 1
-#cmakedefine USE_HCACHE 1
-#cmakedefine USE_NNTP 1
-#cmakedefine USE_LIBESMTP 1
-#cmakedefine USE_SLANG_CURSES 1
-
+/* headers */
#cmakedefine HAVE_ALLOCA_H 1
#cmakedefine HAVE_ARGZ_H 1
#cmakedefine HAVE_GETOPT_H 1
#cmakedefine HAVE_WCHAR_H 1
#cmakedefine HAVE_WCTYPE_H 1
+/* type */
+#cmakedefine HAVE_DIRENT_D_INO 1
+
+/* functions */
#cmakedefine HAVE_GETSID 1
#cmakedefine HAVE_ISCTYPE 1
#cmakedefine HAVE_GETOPT 1
#cmakedefine HAVE_META 1
#cmakedefine HAVE_USE_DEFAULT_COLORS 1
#cmakedefine HAVE_RESIZETERM 1
+
+/* libraries */
+#cmakedefine HAVE_LIBIDN 1
+#cmakedefine HAVE_QDBM 1
+#cmakedefine HAVE_GDBM 1
+#cmakedefine USE_FLOCK 1
+#cmakedefine USE_FCNTL 1
+#cmakedefine USE_HCACHE 1
+#cmakedefine USE_NNTP 1
+#cmakedefine USE_LIBESMTP 1
+#cmakedefine USE_SLANG_CURSES 1
+
/* FOO - really ignore the return value? */
maildir_parse_entry (ctx, last, subdir, de->d_name, count, is_old,
-#if HAVE_DIRENT_D_INO
+#ifdef HAVE_DIRENT_D_INO
de->d_ino
#else
0
* -2 - invalid command or execution error,
* -3 - error in funct(*line, *data).
*/
-static int mutt_nntp_fetch (NNTP_DATA * nntp_data, const char *query, char *msg,
- progress_t* bar, int (*funct) (char *, void *),
+static int mutt_nntp_fetch (NNTP_DATA * nntp_data, const char *query,
+ const char *msg, progress_t* bar,
+ int (*funct) (char *, void *),
void *data, int tagged)
{
char buf[LONG_STRING];