summaryrefslogtreecommitdiff
path: root/bsd-snprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'bsd-snprintf.c')
-rw-r--r--bsd-snprintf.c19
1 files changed, 19 insertions, 0 deletions
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;