diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | bsd-snprintf.c | 19 | ||||
-rw-r--r-- | configure.in | 4 |
3 files changed, 24 insertions, 2 deletions
@@ -1,3 +1,6 @@ | |||
1 | 19991228 | ||
2 | - Replacement for getpagesize() for systems which lack it | ||
3 | |||
1 | 19991227 | 4 | 19991227 |
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 | ||
58 | int | ||
59 | getpagesize() | ||
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 | |||
57 | static char * | 76 | static char * |
58 | msetup(str, n) | 77 | msetup(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 | |||
114 | fi | 114 | fi |
115 | 115 | ||
116 | dnl Checks for header files. | 116 | dnl Checks for header files. |
117 | AC_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) | 117 | AC_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 | ||
119 | dnl Checks for library functions. | 119 | dnl Checks for library functions. |
120 | AC_CHECK_FUNCS(arc4random updwtmpx mkdtemp openpty _getpty innetgr setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy vsnprintf) | 120 | AC_CHECK_FUNCS(arc4random getpagesize _getpty innetgr mkdtemp openpty setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy updwtmpx vsnprintf) |
121 | 121 | ||
122 | AC_CHECK_FUNC(login, | 122 | AC_CHECK_FUNC(login, |
123 | [AC_DEFINE(HAVE_LOGIN)], | 123 | [AC_DEFINE(HAVE_LOGIN)], |