summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-12-28 10:19:16 +1100
committerDamien Miller <djm@mindrot.org>1999-12-28 10:19:16 +1100
commit13bc0be2b65b65ab7ac020bbd0a772ed3abe1738 (patch)
tree721e717913d8eda07e1fde46d1fdde31b9f2743c
parent68e45de53b72087a77069a61c4e789e2012cd706 (diff)
- Replacement for getpagesize() for systems which lack it
-rw-r--r--ChangeLog3
-rw-r--r--bsd-snprintf.c19
-rw-r--r--configure.in4
3 files changed, 24 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 984e15505..70e1c037a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
119991228
2 - Replacement for getpagesize() for systems which lack it
3
119991227 419991227
2 - Automatically correct paths in manpages and configuration files. Patch 5 - Automatically correct paths in manpages and configuration files. Patch
3 and script from Andre Lucas <andre.lucas@dial.pipex.com> 6 and script from Andre Lucas <andre.lucas@dial.pipex.com>
diff --git a/bsd-snprintf.c b/bsd-snprintf.c
index e85d9296a..81a4b284e 100644
--- a/bsd-snprintf.c
+++ b/bsd-snprintf.c
@@ -54,6 +54,25 @@ static sigjmp_buf bail;
54 54
55#define EXTRABYTES 2 /* XXX: why 2? you don't want to know */ 55#define EXTRABYTES 2 /* XXX: why 2? you don't want to know */
56 56
57#ifndef HAVE_GETPAGESIZE
58int
59getpagesize()
60{
61#ifdef EXEC_PAGESIZE
62 return EXEC_PAGESIZE;
63#else /* !EXEC_PAGESIZE */
64# ifdef NBPG
65# ifndef CLSIZE
66# define CLSIZE 1
67# endif /* No CLSIZE */
68 return NBPG * CLSIZE;
69# else /* !NBPG */
70 return NBPC;
71# endif /* NBPG */
72#endif /* EXEC_PAGESIZE */
73}
74#endif /* HAVE_GETPAGESIZE */
75
57static char * 76static char *
58msetup(str, n) 77msetup(str, n)
59 char *str; 78 char *str;
diff --git a/configure.in b/configure.in
index 17b392d8f..57b08a421 100644
--- a/configure.in
+++ b/configure.in
@@ -114,10 +114,10 @@ if test -z "$no_pam" ; then
114fi 114fi
115 115
116dnl Checks for header files. 116dnl Checks for header files.
117AC_CHECK_HEADERS(endian.h lastlog.h login.h maillock.h netgroup.h paths.h poll.h pty.h shadow.h util.h utmp.h utmpx.h sys/bsdtty.h sys/poll.h sys/select.h sys/stropts.h sys/time.h sys/ttcompat.h) 117AC_CHECK_HEADERS(endian.h lastlog.h login.h maillock.h netgroup.h paths.h poll.h pty.h shadow.h sys/bsdtty.h sys/poll.h sys/select.h sys/stropts.h sys/time.h sys/ttcompat.h util.h utmp.h utmpx.h)
118 118
119dnl Checks for library functions. 119dnl Checks for library functions.
120AC_CHECK_FUNCS(arc4random updwtmpx mkdtemp openpty _getpty innetgr setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy vsnprintf) 120AC_CHECK_FUNCS(arc4random getpagesize _getpty innetgr mkdtemp openpty setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy updwtmpx vsnprintf)
121 121
122AC_CHECK_FUNC(login, 122AC_CHECK_FUNC(login,
123 [AC_DEFINE(HAVE_LOGIN)], 123 [AC_DEFINE(HAVE_LOGIN)],