summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorunknown <vva@eagle.mysql.r18.ru>2004-08-31 18:29:01 +0500
committerunknown <vva@eagle.mysql.r18.ru>2004-08-31 18:29:01 +0500
commit8bf3885883b0ddedda634a3aeffe7d395dbc5dd0 (patch)
treecaa5daeb44390bc03d609ca8b9f015c21b5ae594 /acinclude.m4
parent51fce2d24710fb25a2da30eab7fa2be78430b3fc (diff)
downloadmariadb-git-8bf3885883b0ddedda634a3aeffe7d395dbc5dd0.tar.gz
fixed two compiling bugs for libedit
acinclude.m4: added macro to check if dirent.d_namlen is defined cmd-line-utils/libedit/config.h: added define for __attribute__ cmd-line-utils/libedit/readline.c: checked STRUCT_DIRENT_HAS_D_NAMLEN instead of old enumeration of problem platforms configure.in: added checking if dirent has d_namlen member field
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m435
1 files changed, 35 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 7c11462d290..f634784ea34 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -665,6 +665,41 @@ AC_DEFINE(STRUCT_DIRENT_HAS_D_INO, [1],
fi
])
+AC_DEFUN(MYSQL_STRUCT_DIRENT_D_NAMLEN,
+[AC_REQUIRE([AC_HEADER_DIRENT])
+AC_MSG_CHECKING(if struct dirent has a d_namlen member)
+AC_CACHE_VAL(mysql_cv_dirent_has_dnamlen,
+[AC_TRY_COMPILE([
+#include <stdio.h>
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#if defined(HAVE_DIRENT_H)
+# include <dirent.h>
+#else
+# define dirent direct
+# ifdef HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif /* SYSNDIR */
+# ifdef HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif /* SYSDIR */
+# ifdef HAVE_NDIR_H
+# include <ndir.h>
+# endif
+#endif /* HAVE_DIRENT_H */
+],[
+struct dirent d; int z; z = (int)d.d_namlen;
+], mysql_cv_dirent_has_dnamlen=yes, mysql_cv_dirent_has_dnamlen=no)])
+AC_MSG_RESULT($mysql_cv_dirent_has_dnamlen)
+if test "$mysql_cv_dirent_has_dnamlen" = "yes"; then
+AC_DEFINE(STRUCT_DIRENT_HAS_D_NAMLEN, [1],
+ [d_namlen member present in struct dirent])
+fi
+])
+
+
AC_DEFUN(MYSQL_TYPE_SIGHANDLER,
[AC_MSG_CHECKING([whether signal handlers are of type void])
AC_CACHE_VAL(mysql_cv_void_sighandler,