diff options
Diffstat (limited to 'bsd-snprintf.c')
-rw-r--r-- | bsd-snprintf.c | 19 |
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 | ||
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; |