Files
bpfire/src/patches/pam-0.99.3.0-hostname.patch
ms a52153e7e4 ipac-ng fix
uClibc fix
pam-patch fix



git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@50 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2006-02-20 01:10:06 +00:00

51 lines
1.6 KiB
Diff

--- Linux-PAM-0.99.3.0/configure.in.host-name-max 2005-12-12 19:56:27.000000000 +0300
+++ Linux-PAM-0.99.3.0/configure.in 2006-01-28 01:31:58.000000000 +0300
@@ -395,6 +395,46 @@
AC_CHECK_FUNCS(getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r)
AC_CHECK_FUNCS(getgrouplist getline getdelim)
+AH_BOTTOM([#ifndef HAVE_HOST_NAME_MAX
+ #ifdef HAVE_MAXHOSTNAME
+ #include <sys/param.h>
+ #define HOST_NAME_MAX MAXHOSTNAME
+ #else
+ #define HOST_NAME_MAX 64
+ #endif
+#endif])
+ac_cv_maxhostname_defined=no
+AC_CACHE_CHECK([[whether HOST_NAME_MAX is defined in limits.h]],
+[ac_cv_host_name_max_defined],
+[AC_COMPILE_IFELSE([[#include <limits.h>
+
+char name[HOST_NAME_MAX];
+
+int main()
+{
+ return 0;
+}]], [ac_cv_host_name_max_defined=yes
+ AC_MSG_RESULT([ac_cv_host_name_max_defined])],
+[ac_cv_host_name_max_defined=no
+AC_MSG_RESULT([ac_cv_host_name_max_defined])
+AC_CACHE_CHECK([[whether MAXHOSTNAME is defined in sys/param.h]],
+[ac_cv_maxhostname_defined],
+[AC_COMPILE_IFELSE([[#include <sys/param.h>
+
+char name[MAXHOSTNAME];
+
+int main()
+{
+return 0;
+}]], [ac_cv_maxhostname_defined=yes], [ac_cv_maxhostname_defined=no])])
+AC_MSG_RESULT([ac_cv_maxhostname_defined])])])
+if test $ac_cv_host_name_max_defined = yes; then
+AC_DEFINE([HAVE_HOST_NAME_MAX], 1, [Define if system header limits.h defines HOST_NAME_MAX])
+fi
+if test $ac_cv_maxhostname_defined = yes; then
+AC_DEFINE([HAVE_MAXHOSTNAME], 1, [Define if system header sys/param.h defines MAXHOSTNAME])
+fi
+
dnl Checks for programs/utilities
AC_CHECK_PROG(SGML2PS, sgml2ps, yes, no)
AC_CHECK_PROG(SGML2TXT, sgml2txt, yes, no)