-/* $OpenBSD: asr.c,v 1.34 2014/09/15 06:15:48 guenther Exp $ */
+/* $OpenBSD: asr.c,v 1.35 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 2010-2012 Eric Faurot <eric@openbsd.org>
*
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <limits.h>
#include "asr_private.h"
-/* $OpenBSD: gethostnamadr.c,v 1.11 2014/03/26 18:13:15 eric Exp $ */
+/* $OpenBSD: gethostnamadr.c,v 1.12 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 2012,2013 Eric Faurot <eric@openbsd.org>
*
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include <sys/param.h> /* ALIGN */
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
-/* $OpenBSD: gethostnamadr_async.c,v 1.33 2015/01/14 23:36:15 deraadt Exp $ */
+/* $OpenBSD: gethostnamadr_async.c,v 1.34 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
static char *domain = NULL;
struct hostent_ext *h = NULL;
const char *name;
- char buf[MAXHOSTNAMELEN];
+ char buf[HOST_NAME_MAX+1];
char *res = NULL;
int r, len;
-/* $OpenBSD: getnetnamadr.c,v 1.8 2014/03/26 18:13:15 eric Exp $ */
+/* $OpenBSD: getnetnamadr.c,v 1.9 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include <sys/param.h> /* ALIGN */
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
-/* $OpenBSD: citrus_utf8.c,v 1.7 2014/05/03 14:10:20 stsp Exp $ */
+/* $OpenBSD: citrus_utf8.c,v 1.8 2015/01/16 16:48:51 deraadt Exp $ */
/*-
* Copyright (c) 2002-2004 Tim J. Robbins
*/
#include <sys/errno.h>
-#include <sys/param.h>
#include <sys/types.h>
#include <sys/limits.h>
#include "citrus_ctype.h"
#include "citrus_utf8.h"
+#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b))
+
_CITRUS_CTYPE_DEF_OPS(utf8);
struct _utf8_state {
wch = (unsigned char)*s++ & mask;
else
wch = us->ch;
- for (i = (us->want == 0) ? 1 : 0; i < MIN(want, n); i++) {
+ for (i = (us->want == 0) ? 1 : 0; i < MINIMUM(want, n); i++) {
if ((*s & 0xc0) != 0x80) {
/*
* Malformed input; bad characters in the middle
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <signal.h>
int
-/* $OpenBSD: arc4random.c,v 1.51 2015/01/15 06:57:18 deraadt Exp $ */
+/* $OpenBSD: arc4random.c,v 1.52 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1996, David Mazieres <dm@uun.org>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/time.h>
#define KEYSTREAM_ONLY
-/* $OpenBSD: crypt.c,v 1.25 2014/12/08 20:36:18 tedu Exp $ */
+/* $OpenBSD: crypt.c,v 1.26 2015/01/16 16:48:51 deraadt Exp $ */
/*
* FreeSec: libcrypt
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <pwd.h>
#include <unistd.h>
#include <string.h>
-/* $OpenBSD: bt_close.c,v 1.9 2005/08/05 13:02:59 espie Exp $ */
+/* $OpenBSD: bt_close.c,v 1.10 2015/01/16 16:48:51 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
* SUCH DAMAGE.
*/
-#include <sys/param.h>
-
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
-/* $OpenBSD: bt_conv.c,v 1.9 2005/08/05 13:02:59 espie Exp $ */
+/* $OpenBSD: bt_conv.c,v 1.10 2015/01/16 16:48:51 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
* SUCH DAMAGE.
*/
-#include <sys/param.h>
-
#include <stdio.h>
#include <db.h>
-/* $OpenBSD: bt_debug.c,v 1.9 2005/08/08 08:05:33 espie Exp $ */
+/* $OpenBSD: bt_debug.c,v 1.10 2015/01/16 16:48:51 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
* SUCH DAMAGE.
*/
-#include <sys/param.h>
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-/* $OpenBSD: bt_overflow.c,v 1.10 2007/08/08 23:57:19 ray Exp $ */
+/* $OpenBSD: bt_overflow.c,v 1.11 2015/01/16 16:48:51 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
* SUCH DAMAGE.
*/
-#include <sys/param.h>
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <db.h>
#include "btree.h"
+#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b))
+
/*
* Big key/data code.
*
if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
return (RET_ERROR);
- nb = MIN(sz, plen);
+ nb = MINIMUM(sz, plen);
memmove(p, (char *)h + BTDATAOFF, nb);
mpool_put(t->bt_mp, h, 0);
h->flags = P_OVERFLOW;
h->lower = h->upper = 0;
- nb = MIN(sz, plen);
+ nb = MINIMUM(sz, plen);
memmove((char *)h + BTDATAOFF, p, nb);
if (last) {
-/* $OpenBSD: bt_utils.c,v 1.10 2007/08/08 23:57:19 ray Exp $ */
+/* $OpenBSD: bt_utils.c,v 1.11 2015/01/16 16:48:51 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
* SUCH DAMAGE.
*/
-#include <sys/param.h>
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <db.h>
#include "btree.h"
+#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b))
+
/*
* __bt_ret --
* Build return key/data pair.
* What we need is a integral type which is guaranteed to be
* larger than a size_t, and there is no such thing.
*/
- len = MIN(a->size, b->size);
+ len = MINIMUM(a->size, b->size);
for (p1 = a->data, p2 = b->data; len--; ++p1, ++p2)
if (*p1 != *p2)
return ((int)*p1 - (int)*p2);
size_t cnt, len;
cnt = 1;
- len = MIN(a->size, b->size);
+ len = MINIMUM(a->size, b->size);
for (p1 = a->data, p2 = b->data; len--; ++p1, ++p2, ++cnt)
if (*p1 != *p2)
return (cnt);
-/* $OpenBSD: hash.c,v 1.25 2014/08/15 03:51:40 guenther Exp $ */
+/* $OpenBSD: hash.c,v 1.26 2015/01/16 16:48:51 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/stat.h>
#include <errno.h>
#include "page.h"
#include "extern.h"
+#define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b))
+
static int alloc_segs(HTAB *, int);
static int flush_meta(HTAB *);
static int hash_access(HTAB *, ACTION, DBT *, DBT *);
*/
nelem = (nelem - 1) / hashp->FFACTOR + 1;
- l2 = __log2(MAX(nelem, 2));
+ l2 = __log2(MAXIMUM(nelem, 2));
nbuckets = 1 << l2;
hashp->SPARES[l2] = l2 + 1;
hashp->MAX_BUCKET = hashp->LOW_MASK = nbuckets - 1;
hashp->HIGH_MASK = (nbuckets << 1) - 1;
- hashp->HDRPAGES = ((MAX(sizeof(HASHHDR), MINHDRSIZE) - 1) >>
+ hashp->HDRPAGES = ((MAXIMUM(sizeof(HASHHDR), MINHDRSIZE) - 1) >>
hashp->BSHIFT) + 1;
nsegs = (nbuckets - 1) / hashp->SGSIZE + 1;
-/* $OpenBSD: hash_bigkey.c,v 1.17 2006/04/03 19:56:47 deraadt Exp $ */
+/* $OpenBSD: hash_bigkey.c,v 1.18 2015/01/16 16:48:51 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
* collect_data
*/
-#include <sys/param.h>
-
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include "page.h"
#include "extern.h"
+#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b))
+
static int collect_key(HTAB *, BUFHEAD *, int, DBT *, int);
static int collect_data(HTAB *, BUFHEAD *, int, int);
/* First move the Key */
for (space = FREESPACE(p) - BIGOVERHEAD; key_size;
space = FREESPACE(p) - BIGOVERHEAD) {
- move_bytes = MIN(space, key_size);
+ move_bytes = MINIMUM(space, key_size);
off = OFFSET(p) - move_bytes;
memmove(cp + off, key_data, move_bytes);
key_size -= move_bytes;
if (!key_size) {
space = FREESPACE(p);
if (space) {
- move_bytes = MIN(space, val_size);
+ move_bytes = MINIMUM(space, val_size);
/*
* If the data would fit exactly in the
* remaining space, we must overflow it to the
/* Now move the data */
for (space = FREESPACE(p) - BIGOVERHEAD; val_size;
space = FREESPACE(p) - BIGOVERHEAD) {
- move_bytes = MIN(space, val_size);
+ move_bytes = MINIMUM(space, val_size);
/*
* Here's the hack to make sure that if the data ends on the
* same page as the key ends, FREESPACE is at least one.
-/* $OpenBSD: hash_buf.c,v 1.18 2008/10/01 20:22:47 millert Exp $ */
+/* $OpenBSD: hash_buf.c,v 1.19 2015/01/16 16:48:51 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
* newbuf
*/
-#include <sys/param.h>
-
#include <errno.h>
#include <stddef.h>
#include <stdio.h>
#include "page.h"
#include "extern.h"
+#define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b))
+
static BUFHEAD *newbuf(HTAB *, u_int32_t, BUFHEAD *);
/* Unlink B from its place in the lru */
bfp = &(hashp->bufhead);
npages = (nbytes + hashp->BSIZE - 1) >> hashp->BSHIFT;
- npages = MAX(npages, MIN_BUFFERS);
+ npages = MAXIMUM(npages, MIN_BUFFERS);
hashp->nbufs = npages;
bfp->next = bfp;
-/* $OpenBSD: mpool.c,v 1.19 2013/12/02 02:28:21 krw Exp $ */
+/* $OpenBSD: mpool.c,v 1.20 2015/01/16 16:48:51 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/queue.h>
#include <sys/stat.h>
-/* $OpenBSD: rec_utils.c,v 1.8 2007/08/07 05:40:34 ray Exp $ */
+/* $OpenBSD: rec_utils.c,v 1.9 2015/01/16 16:48:51 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-/* $OpenBSD: clock.c,v 1.5 2005/08/08 08:05:33 espie Exp $ */
+/* $OpenBSD: clock.c,v 1.6 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/time.h>
#include <sys/resource.h>
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/param.h> /* MAXFRAG DEV_BSIZE */
+#include <sys/types.h>
#define DKTYPENAMES
#include <sys/disklabel.h>
#include <ufs/ffs/fs.h>
-/* $OpenBSD: elf_hash.c,v 1.8 2005/08/08 08:05:33 espie Exp $ */
+/* $OpenBSD: elf_hash.c,v 1.9 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1995, 1996 Erik Theisen
* All rights reserved.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/file.h>
-/* $OpenBSD: fts.c,v 1.49 2014/11/23 00:14:22 guenther Exp $ */
+/* $OpenBSD: fts.c,v 1.50 2015/01/16 16:48:51 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/param.h> /* ALIGN */
#include <sys/stat.h>
#include <dirent.h>
#include <string.h>
#include <unistd.h>
+#define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b))
+
static FTSENT *fts_alloc(FTS *, char *, size_t);
static FTSENT *fts_build(FTS *, int);
static void fts_lfree(FTSENT *);
* Start out with 1K of path space, and enough, in any case,
* to hold the user's paths.
*/
- if (fts_palloc(sp, MAX(fts_maxarglen(argv), PATH_MAX)))
+ if (fts_palloc(sp, MAXIMUM(fts_maxarglen(argv), PATH_MAX)))
goto mem1;
/* Allocate/initialize root's parent. */
-/* $OpenBSD: getgrent.c,v 1.41 2014/09/15 06:15:48 guenther Exp $ */
+/* $OpenBSD: getgrent.c,v 1.42 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <limits.h>
#include <grp.h>
#include <errno.h>
#ifdef YP
-/* $OpenBSD: getloadavg.c,v 1.6 2005/08/08 08:05:34 espie Exp $ */
+/* $OpenBSD: getloadavg.c,v 1.7 2015/01/16 16:48:51 deraadt Exp $ */
/*-
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/sysctl.h>
#include <stdlib.h>
+#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b))
+
/*
* getloadavg() -- Get system load averages.
*
if (sysctl(mib, 2, &loadinfo, &size, NULL, 0) < 0)
return (-1);
- nelem = MIN(nelem, sizeof(loadinfo.ldavg) / sizeof(fixpt_t));
+ nelem = MINIMUM(nelem, sizeof(loadinfo.ldavg) / sizeof(fixpt_t));
for (i = 0; i < nelem; i++)
loadavg[i] = (double) loadinfo.ldavg[i] / loadinfo.fscale;
return (nelem);
-/* $OpenBSD: getmntinfo.c,v 1.7 2005/08/08 08:05:34 espie Exp $ */
+/* $OpenBSD: getmntinfo.c,v 1.8 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/mount.h>
#include <stdlib.h>
-/* $OpenBSD: getpwent.c,v 1.52 2014/03/12 10:54:36 schwarze Exp $ */
+/* $OpenBSD: getpwent.c,v 1.53 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 2008 Theo de Raadt
* Copyright (c) 1988, 1993
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/param.h> /* ALIGN */
#include <fcntl.h>
#include <db.h>
#include <syslog.h>
#endif
#include "thread_private.h"
+#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b))
+
_THREAD_PRIVATE_KEY(pw);
static DB *_pw_db; /* password database */
if (len > _PW_NAME_LEN)
return (NULL);
bf[0] = _PW_KEYBYNAME;
- bcopy(name, &bf[1], MIN(len, _PW_NAME_LEN));
+ bcopy(name, &bf[1], MINIMUM(len, _PW_NAME_LEN));
key.data = (u_char *)bf;
- key.size = 1 + MIN(len, _PW_NAME_LEN);
+ key.size = 1 + MINIMUM(len, _PW_NAME_LEN);
r = __hashpw(&key, buf, buflen, pw, flagsp);
if (r)
return (pw);
-/* $OpenBSD: initgroups.c,v 1.8 2005/08/08 08:05:34 espie Exp $ */
+/* $OpenBSD: initgroups.c,v 1.9 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
-
#include <err.h>
#include <stdio.h>
#include <unistd.h>
+#include <limits.h>
int
initgroups(const char *uname, gid_t agroup)
{
- gid_t groups[NGROUPS];
+ gid_t groups[NGROUPS_MAX];
int ngroups;
- ngroups = NGROUPS;
+ ngroups = NGROUPS_MAX;
(void) getgrouplist(uname, agroup, groups, &ngroups);
if (setgroups(ngroups, groups) < 0)
return (-1);
-/* $OpenBSD: nlist.c,v 1.57 2014/01/19 20:48:57 deraadt Exp $ */
+/* $OpenBSD: nlist.c,v 1.58 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <limits.h>
#include <a.out.h> /* pulls in nlist.h */
#ifdef _NLIST_DO_ELF
#include <elf_abi.h>
#endif
+#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b))
+
int __fdnlist(int, struct nlist *);
#ifdef _NLIST_DO_ELF
int __elf_is_okay__(Elf_Ehdr *ehdr);
goto elf_done;
while (symsize > 0) {
- cc = MIN(symsize, sizeof(sbuf));
+ cc = MINIMUM(symsize, sizeof(sbuf));
if (pread(fd, sbuf, cc, (off_t)symoff) != cc)
break;
symsize -= cc;
-/* $OpenBSD: popen.c,v 1.19 2014/08/31 02:21:18 guenther Exp $ */
+/* $OpenBSD: popen.c,v 1.20 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/wait.h>
#include <signal.h>
-/* $OpenBSD: scandir.c,v 1.17 2014/10/08 05:34:59 deraadt Exp $ */
+/* $OpenBSD: scandir.c,v 1.18 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
* struct dirent (through namelist). Returns -1 if there were any errors.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <errno.h>
#include <string.h>
#include "telldir.h"
+#define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b))
+
/*
* The DIRSIZ macro is the minimum record length which will hold the directory
* entry. This requires the amount of space in struct dirent without the
* estimate the array size by taking the size of the directory file
* and dividing it by a multiple of the minimum size entry.
*/
- arraysz = MAX(stb.st_size / 24, 16);
+ arraysz = MAXIMUM(stb.st_size / 24, 16);
if (arraysz > SIZE_MAX / sizeof(struct dirent *)) {
errno = ENOMEM;
goto fail;
-/* $OpenBSD: setdomainname.c,v 1.8 2005/08/08 08:05:34 espie Exp $ */
+/* $OpenBSD: setdomainname.c,v 1.9 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/sysctl.h>
#include <unistd.h>
-/* $OpenBSD: sethostname.c,v 1.8 2005/08/08 08:05:34 espie Exp $ */
+/* $OpenBSD: sethostname.c,v 1.9 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/sysctl.h>
#include <unistd.h>
-/* $OpenBSD: setproctitle.c,v 1.12 2011/05/30 18:48:33 martynas Exp $ */
+/* $OpenBSD: setproctitle.c,v 1.13 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1994, 1995 Christopher G. Demetriou
* All rights reserved.
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <sys/exec.h>
#include <sys/sysctl.h>
-/* $OpenBSD: statvfs.c,v 1.1 2008/03/22 19:18:42 otto Exp $ */
+/* $OpenBSD: statvfs.c,v 1.2 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 2008 Otto Moerbeek <otto@drijf.net>
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/mount.h>
#include <sys/statvfs.h>
-/* $OpenBSD: sysconf.c,v 1.20 2014/07/08 17:19:21 deraadt Exp $ */
+/* $OpenBSD: sysconf.c,v 1.21 2015/01/16 16:48:51 deraadt Exp $ */
/*-
* Copyright (c) 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/sem.h>
#include <sys/sysctl.h>
#include <sys/time.h>
/* Unsorted */
case _SC_HOST_NAME_MAX:
- return (MAXHOSTNAMELEN - 1); /* does not include \0 */
+ return (HOST_NAME_MAX+1 - 1); /* does not include \0 */
case _SC_MONOTONIC_CLOCK:
return (_POSIX_MONOTONIC_CLOCK);
case _SC_2_PBS:
-/* $OpenBSD: sysctl.c,v 1.9 2013/06/09 13:10:17 miod Exp $ */
+/* $OpenBSD: sysctl.c,v 1.10 2015/01/16 16:48:51 deraadt Exp $ */
/*-
* Copyright (c) 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/sysctl.h>
int __sysctl(const int *, u_int, void *, size_t *, void *, size_t);
-/* $OpenBSD: times.c,v 1.5 2005/08/08 08:05:34 espie Exp $ */
+/* $OpenBSD: times.c,v 1.6 2015/01/16 16:48:51 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/time.h>
#include <sys/times.h>
#include <sys/resource.h>
-/* $OpenBSD: uname.c,v 1.9 2013/04/05 12:59:54 kurt Exp $ */
+/* $OpenBSD: uname.c,v 1.10 2015/01/16 16:48:51 deraadt Exp $ */
/*-
* Copyright (c) 1994
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/sysctl.h>
#include <sys/utsname.h>
-/* $OpenBSD: gmon.c,v 1.22 2013/02/12 08:06:22 mpi Exp $ */
+/* $OpenBSD: gmon.c,v 1.23 2015/01/16 16:48:51 deraadt Exp $ */
/*-
* Copyright (c) 1983, 1992, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/time.h>
#include <sys/gmon.h>
#include <sys/mman.h>
-/* $OpenBSD: mcount.c,v 1.14 2013/03/12 09:37:16 mpi Exp $ */
+/* $OpenBSD: mcount.c,v 1.15 2015/01/16 16:48:51 deraadt Exp $ */
/*-
* Copyright (c) 1983, 1992, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/gmon.h>
/*
-/* $OpenBSD: helper.c,v 1.12 2015/01/15 13:05:59 millert Exp $ */
+/* $OpenBSD: helper.c,v 1.13 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 2000 Poul-Henning Kamp <phk@FreeBSD.org>
* can buy me a beer in return. Poul-Henning Kamp
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <hashinc>
+#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b))
+
/* ARGSUSED */
char *
HASHEnd(HASH_CTX *ctx, char *buf)
return (NULL);
}
- while ((nr = read(fd, buffer, MIN(sizeof(buffer), len))) > 0) {
+ while ((nr = read(fd, buffer, MINIMUM(sizeof(buffer), len))) > 0) {
HASHUpdate(&ctx, buffer, (size_t)nr);
if (len > 0 && (len -= nr) == 0)
break;
-/* $OpenBSD: sha1.c,v 1.24 2015/01/15 13:05:59 millert Exp $ */
+/* $OpenBSD: sha1.c,v 1.25 2015/01/16 16:48:51 deraadt Exp $ */
/*
* SHA-1 in C
* 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <string.h>
#include <sha1.h>
-/* $OpenBSD: siphash.c,v 1.1 2014/12/08 20:37:11 tedu Exp $ */
+/* $OpenBSD: siphash.c,v 1.2 2015/01/16 16:48:51 deraadt Exp $ */
/*-
* Copyright (c) 2013 Andre Oppermann <andre@FreeBSD.org>
* https://131002.net/siphash/
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/endian.h>
#include <string.h>
-/* $OpenBSD: base64.c,v 1.7 2013/12/31 02:32:56 tedu Exp $ */
+/* $OpenBSD: base64.c,v 1.8 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1996 by Internet Software Consortium.
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-/* $OpenBSD: ethers.c,v 1.22 2014/09/15 06:15:48 guenther Exp $ */
+/* $OpenBSD: ethers.c,v 1.23 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
#include <net/if.h>
#include <netinet/in.h>
#include <netinet/if_ether.h>
-#include <sys/param.h>
#include <paths.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
+#include <limits.h>
#ifdef YP
#include <rpcsvc/ypclnt.h>
#endif
{
FILE *f;
char buf[BUFSIZ+1], *p;
- char try[MAXHOSTNAMELEN];
+ char try[HOST_NAME_MAX+1];
size_t len;
#ifdef YP
int hostlen = strlen(hostname);
if (*p == '\0')
goto bad;
n = strcspn(p, " \t\n");
- if (n >= MAXHOSTNAMELEN)
+ if (n >= HOST_NAME_MAX+1)
goto bad;
strlcpy(hostname, p, n + 1);
return (0);
-/* $OpenBSD: getifaddrs.c,v 1.11 2013/03/20 14:15:56 deraadt Exp $ */
+/* $OpenBSD: getifaddrs.c,v 1.12 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1995, 1999
* BSDI getifaddrs.c,v 2.12 2000/02/23 14:51:59 dab Exp
*/
+#include <sys/param.h> /* ALIGN */
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <net/if.h>
-#include <sys/param.h>
#include <net/route.h>
#include <sys/sysctl.h>
#include <net/if_dl.h>
-/* $OpenBSD: getnetent.c,v 1.14 2014/09/15 06:15:48 guenther Exp $ */
+/* $OpenBSD: getnetent.c,v 1.15 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <stdio.h>
#include <string.h>
+#include <limits.h>
#define MAXALIASES 35
if ((cp = strchr(p, '#')) != NULL)
*cp = '\0';
net.n_name = p;
- if (strlen(net.n_name) >= MAXHOSTNAMELEN-1)
- net.n_name[MAXHOSTNAMELEN-1] = '\0';
+ if (strlen(net.n_name) >= HOST_NAME_MAX+1-1)
+ net.n_name[HOST_NAME_MAX+1-1] = '\0';
cp = strpbrk(p, " \t");
if (cp == NULL)
goto again;
}
if (q < &net_aliases[MAXALIASES - 1]) {
*q++ = cp;
- if (strlen(cp) >= MAXHOSTNAMELEN-1)
- cp[MAXHOSTNAMELEN-1] = '\0';
+ if (strlen(cp) >= HOST_NAME_MAX+1-1)
+ cp[HOST_NAME_MAX+1-1] = '\0';
}
cp = strpbrk(cp, " \t");
if (cp != NULL)
-/* $OpenBSD: herror.c,v 1.8 2005/08/06 20:30:03 espie Exp $ */
+/* $OpenBSD: herror.c,v 1.9 2015/01/16 16:48:51 deraadt Exp $ */
/*
* ++Copyright++ 1987, 1993
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/uio.h>
#include <netdb.h>
#include <unistd.h>
-/* $OpenBSD: inet_addr.c,v 1.10 2013/11/24 23:51:28 deraadt Exp $ */
+/* $OpenBSD: inet_addr.c,v 1.11 2015/01/16 16:48:51 deraadt Exp $ */
/*
* ++Copyright++ 1983, 1990, 1993
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <ctype.h>
-/* $OpenBSD: inet_lnaof.c,v 1.6 2005/08/06 20:30:03 espie Exp $ */
+/* $OpenBSD: inet_lnaof.c,v 1.7 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-/* $OpenBSD: inet_makeaddr.c,v 1.6 2005/08/06 20:30:03 espie Exp $ */
+/* $OpenBSD: inet_makeaddr.c,v 1.7 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-/* $OpenBSD: inet_netof.c,v 1.6 2005/08/06 20:30:03 espie Exp $ */
+/* $OpenBSD: inet_netof.c,v 1.7 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-/* $OpenBSD: inet_ntop.c,v 1.10 2014/05/17 18:16:14 tedu Exp $ */
+/* $OpenBSD: inet_ntop.c,v 1.11 2015/01/16 16:48:51 deraadt Exp $ */
/* Copyright (c) 1996 by Internet Software Consortium.
*
* SOFTWARE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
-/* $OpenBSD: inet_pton.c,v 1.8 2010/05/06 15:47:14 claudio Exp $ */
+/* $OpenBSD: inet_pton.c,v 1.9 2015/01/16 16:48:51 deraadt Exp $ */
/* Copyright (c) 1996 by Internet Software Consortium.
*
* SOFTWARE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
-/* $OpenBSD: ip6opt.c,v 1.7 2014/06/13 15:41:06 chrisz Exp $ */
+/* $OpenBSD: ip6opt.c,v 1.8 2015/01/16 16:48:51 deraadt Exp $ */
/* $KAME: ip6opt.c,v 1.18 2005/06/15 07:11:35 keiichi Exp $ */
/*
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <sys/socket.h>
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
#include <unistd.h>
+#include <limits.h>
#include <pwd.h>
#include <errno.h>
#include <stdio.h>
rcmd_af(char **ahost, int porta, const char *locuser, const char *remuser,
const char *cmd, int *fd2p, int af)
{
- static char hbuf[MAXHOSTNAMELEN];
+ static char hbuf[HOST_NAME_MAX+1];
char pbuf[NI_MAXSERV];
struct addrinfo hints, *res, *r;
int error;
-/* $OpenBSD: res_comp.c,v 1.14 2008/04/16 22:35:23 deraadt Exp $ */
+/* $OpenBSD: res_comp.c,v 1.15 2015/01/16 16:48:51 deraadt Exp $ */
/*
* ++Copyright++ 1985, 1993
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <ctype.h>
#include <unistd.h>
+#include <limits.h>
#include <string.h>
static int dn_find(u_char *, u_char *, u_char **, u_char **);
dn = exp_dn;
cp = comp_dn;
- if (length > MAXHOSTNAMELEN-1)
- length = MAXHOSTNAMELEN-1;
+ if (length > HOST_NAME_MAX+1-1)
+ length = HOST_NAME_MAX+1-1;
eom = exp_dn + length;
/*
* fetch next label in domain name
-/* $OpenBSD: res_data.c,v 1.3 2005/08/06 20:30:03 espie Exp $ */
+/* $OpenBSD: res_data.c,v 1.4 2015/01/16 16:48:51 deraadt Exp $ */
/*
* ++Copyright++ 1995
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <netinet/in.h>
-/* $OpenBSD: rresvport.c,v 1.9 2005/11/10 10:00:17 espie Exp $ */
+/* $OpenBSD: rresvport.c,v 1.10 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1995, 1996, 1998 Theo de Raadt. All rights reserved.
* Copyright (c) 1983, 1993, 1994
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/socket.h>
#include <sys/stat.h>
-/* $OpenBSD: rthdr.c,v 1.9 2014/06/13 15:41:06 chrisz Exp $ */
+/* $OpenBSD: rthdr.c,v 1.10 2015/01/16 16:48:51 deraadt Exp $ */
/* $KAME: rthdr.c,v 1.22 2006/02/09 08:18:58 keiichi Exp $ */
/*
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <sys/socket.h>
const char *auser, *ahost;
int hostok, userok;
char *rhost = (char *)-1;
- char domain[MAXHOSTNAMELEN];
+ char domain[HOST_NAME_MAX+1];
size_t buflen;
getdomainname(domain, sizeof(domain));
auser = *user ? user : luser;
ahost = buf;
- if (strlen(ahost) >= MAXHOSTNAMELEN)
+ if (strlen(ahost) >= HOST_NAME_MAX+1)
continue;
/*
-/* $OpenBSD: catopen.c,v 1.15 2013/06/01 21:26:17 stsp Exp $ */
+/* $OpenBSD: catopen.c,v 1.16 2015/01/16 16:48:51 deraadt Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
* All rights reserved.
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <unistd.h>
-/* $OpenBSD: clnt_simple.c,v 1.16 2014/11/11 04:51:49 guenther Exp $ */
+/* $OpenBSD: clnt_simple.c,v 1.17 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 2010, Oracle America, Inc.
* Simplified front end to rpc.
*/
-#include <sys/param.h>
#include <sys/socket.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <limits.h>
#include <rpc/rpc.h>
static struct callrpc_private {
callrpc_private = crp;
}
if (crp->oldhost == NULL) {
- crp->oldhost = malloc(MAXHOSTNAMELEN);
+ crp->oldhost = malloc(HOST_NAME_MAX+1);
if (crp->oldhost == NULL) {
free(crp);
callrpc_private = save_callrpc_private;
crp->valid = 1;
crp->oldprognum = prognum;
crp->oldversnum = versnum;
- strlcpy(crp->oldhost, host, MAXHOSTNAMELEN);
+ strlcpy(crp->oldhost, host, HOST_NAME_MAX+1);
}
tottimeout.tv_sec = 25;
tottimeout.tv_usec = 0;
-/* $OpenBSD: rpc_callmsg.c,v 1.10 2010/09/01 14:43:34 millert Exp $ */
+/* $OpenBSD: rpc_callmsg.c,v 1.11 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 2010, Oracle America, Inc.
#include <stdlib.h>
#include <string.h>
-#include <sys/param.h>
#include <rpc/rpc.h>
-/* $OpenBSD: rpc_prot.c,v 1.11 2010/09/01 14:43:34 millert Exp $ */
+/* $OpenBSD: rpc_prot.c,v 1.12 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 2010, Oracle America, Inc.
* routines are also in this program.
*/
-#include <sys/param.h>
-
#include <rpc/rpc.h>
/* * * * * * * * * * * * * * XDR Authentication * * * * * * * * * * * */
-/* $OpenBSD: xdr_float.c,v 1.21 2014/07/21 01:51:11 guenther Exp $ */
+/* $OpenBSD: xdr_float.c,v 1.22 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 2010, Oracle America, Inc.
#include <stdio.h>
#include <sys/types.h>
-#include <sys/param.h>
#include <rpc/types.h>
#include <rpc/xdr.h>
-/* $OpenBSD: findfp.c,v 1.16 2014/11/19 04:19:56 guenther Exp $ */
+/* $OpenBSD: findfp.c,v 1.17 2015/01/16 16:48:51 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/param.h> /* ALIGN */
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
-/* $OpenBSD: open_memstream.c,v 1.3 2013/04/03 03:11:53 guenther Exp $ */
+/* $OpenBSD: open_memstream.c,v 1.4 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 2011 Martin Pieuchot <mpi@openbsd.org>
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h>
-
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <string.h>
#include "local.h"
+#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b))
+
struct state {
char *string; /* actual stream */
char **pbuf; /* point to the stream */
}
st->pos = base + off;
- *st->psize = MIN(st->pos, st->len);
+ *st->psize = MINIMUM(st->pos, st->len);
return (st->pos);
}
-/* $OpenBSD: open_wmemstream.c,v 1.4 2014/10/08 05:28:19 deraadt Exp $ */
+/* $OpenBSD: open_wmemstream.c,v 1.5 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 2011 Martin Pieuchot <mpi@openbsd.org>
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h>
-
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <wchar.h>
#include "local.h"
+#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b))
+
struct state {
wchar_t *string; /* actual stream */
wchar_t **pbuf; /* point to the stream */
bzero(&st->mbs, sizeof(st->mbs));
st->pos = base + off;
- *st->psize = MIN(st->pos, st->len);
+ *st->psize = MINIMUM(st->pos, st->len);
return (st->pos);
}
-/* $OpenBSD: malloc.c,v 1.172 2015/01/05 21:04:04 tedu Exp $ */
+/* $OpenBSD: malloc.c,v 1.173 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 2008, 2010, 2011 Otto Moerbeek <otto@drijf.net>
* Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org>
/* #define MALLOC_STATS */
#include <sys/types.h>
-#include <sys/param.h>
+#include <sys/param.h> /* PAGE_SHIFT ALIGN */
#include <sys/queue.h>
#include <sys/mman.h>
#include <sys/uio.h>
-/* $OpenBSD: random.c,v 1.28 2014/12/16 20:51:32 sthen Exp $ */
+/* $OpenBSD: random.c,v 1.29 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
-#include <sys/sysctl.h>
-#include <sys/time.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
-/* $OpenBSD: realpath.c,v 1.18 2014/10/19 03:56:28 doug Exp $ */
+/* $OpenBSD: realpath.c,v 1.19 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 2003 Constantin S. Svintsoff <kostik@iclub.nsu.ru>
*
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/stat.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <limits.h>
/* A slightly modified copy of this file exists in libexec/ld.so */
goto err;
}
if (S_ISLNK(sb.st_mode)) {
- if (symlinks++ > MAXSYMLINKS) {
+ if (symlinks++ > SYMLOOP_MAX) {
errno = ELOOP;
goto err;
}
-/* $OpenBSD: stack_protector.c,v 1.15 2013/12/28 18:42:42 deraadt Exp $ */
+/* $OpenBSD: stack_protector.c,v 1.16 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 2002 Hiroaki Etoh, Federico G. Schwindt, and Miodrag Vallat.
*
*/
-#include <sys/param.h>
#include <signal.h>
#include <string.h>
#include <syslog.h>
-/* $OpenBSD: _yp_check.c,v 1.6 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: _yp_check.c,v 1.7 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
+#include <limits.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
#include <rpcsvc/yp.h>
-/* $OpenBSD: xdr_domainname.c,v 1.6 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: xdr_domainname.c,v 1.7 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
-/* $OpenBSD: xdr_keydat.c,v 1.7 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: xdr_keydat.c,v 1.8 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
-/* $OpenBSD: xdr_mapname.c,v 1.6 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: xdr_mapname.c,v 1.7 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
-/* $OpenBSD: xdr_peername.c,v 1.6 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: xdr_peername.c,v 1.7 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
-/* $OpenBSD: xdr_valdat.c,v 1.7 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: xdr_valdat.c,v 1.8 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
-/* $OpenBSD: xdr_ypbind_binding.c,v 1.6 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: xdr_ypbind_binding.c,v 1.7 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
-/* $OpenBSD: xdr_ypbind_resp.c,v 1.6 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: xdr_ypbind_resp.c,v 1.7 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
-/* $OpenBSD: xdr_ypbind_resptype.c,v 1.6 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: xdr_ypbind_resptype.c,v 1.7 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
-/* $OpenBSD: xdr_ypbind_setdom.c,v 1.6 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: xdr_ypbind_setdom.c,v 1.7 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
-/* $OpenBSD: xdr_ypmaplist.c,v 1.6 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: xdr_ypmaplist.c,v 1.7 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
-/* $OpenBSD: xdr_ypreq_key.c,v 1.6 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: xdr_ypreq_key.c,v 1.7 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
-/* $OpenBSD: xdr_ypreq_nokey.c,v 1.6 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: xdr_ypreq_nokey.c,v 1.7 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
-/* $OpenBSD: xdr_ypresp_all.c,v 1.6 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: xdr_ypresp_all.c,v 1.7 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
-/* $OpenBSD: xdr_ypresp_key_val.c,v 1.6 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: xdr_ypresp_key_val.c,v 1.7 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
-/* $OpenBSD: xdr_ypresp_maplist.c,v 1.6 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: xdr_ypresp_maplist.c,v 1.7 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
-/* $OpenBSD: xdr_ypresp_master.c,v 1.6 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: xdr_ypresp_master.c,v 1.7 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
-/* $OpenBSD: xdr_ypresp_order.c,v 1.6 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: xdr_ypresp_order.c,v 1.7 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
-/* $OpenBSD: xdr_ypresp_val.c,v 1.6 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: xdr_ypresp_val.c,v 1.7 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
-/* $OpenBSD: xdr_ypstat.c,v 1.7 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: xdr_ypstat.c,v 1.8 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
-/* $OpenBSD: yp_all.c,v 1.10 2010/04/02 17:35:03 schwarze Exp $ */
+/* $OpenBSD: yp_all.c,v 1.11 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <limits.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
#include <rpcsvc/yp.h>
-/* $OpenBSD: yp_bind.c,v 1.21 2015/01/14 23:36:16 deraadt Exp $ */
+/* $OpenBSD: yp_bind.c,v 1.22 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993, 1996 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/uio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <limits.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
#include <rpcsvc/yp.h>
-/* $OpenBSD: yp_first.c,v 1.9 2009/06/07 03:33:36 schwarze Exp $ */
+/* $OpenBSD: yp_first.c,v 1.10 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
+#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <rpc/rpc.h>
-/* $OpenBSD: yp_get_default_domain.c,v 1.7 2009/06/05 16:39:39 schwarze Exp $ */
+/* $OpenBSD: yp_get_default_domain.c,v 1.8 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <unistd.h>
+#include <limits.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
#include <rpcsvc/yp.h>
-/* $OpenBSD: yp_maplist.c,v 1.8 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: yp_maplist.c,v 1.9 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <string.h>
+#include <limits.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
#include <rpcsvc/yp.h>
-/* $OpenBSD: yp_master.c,v 1.8 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: yp_master.c,v 1.9 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <string.h>
+#include <limits.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
#include <rpcsvc/yp.h>
-/* $OpenBSD: yp_order.c,v 1.9 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: yp_order.c,v 1.10 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <string.h>
+#include <limits.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
#include <rpcsvc/yp.h>
-/* $OpenBSD: yperr_string.c,v 1.6 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: yperr_string.c,v 1.7 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <stdio.h>
#include <rpc/rpc.h>
-/* $OpenBSD: ypmatch_cache.c,v 1.15 2009/11/01 00:08:54 schwarze Exp $ */
+/* $OpenBSD: ypmatch_cache.c,v 1.16 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
+#include <limits.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
#include <rpcsvc/yp.h>
-/* $OpenBSD: ypprot_err.c,v 1.7 2005/08/05 13:02:16 espie Exp $ */
+/* $OpenBSD: ypprot_err.c,v 1.8 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
-/* $OpenBSD: el.c,v 1.19 2014/10/17 06:07:50 deraadt Exp $ */
+/* $OpenBSD: el.c,v 1.20 2015/01/16 16:48:51 deraadt Exp $ */
/* $NetBSD: el.c,v 1.61 2011/01/27 23:11:40 christos Exp $ */
/*-
* el.c: EditLine interface functions
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <ctype.h>
#include <locale.h>
+#include <limits.h>
#include <langinfo.h>
#include "el.h"
size_t len;
char *ptr, *lptr = NULL;
#ifdef HAVE_ISSETUGID
- char path[MAXPATHLEN];
+ char path[PATH_MAX];
#endif
const Char *dptr;
-/* $OpenBSD: fuse_private.h,v 1.10 2014/04/28 13:08:34 syl Exp $ */
+/* $OpenBSD: fuse_private.h,v 1.11 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 2013 Sylvestre Gallon <ccna.syl@gmail.com>
*
#ifndef _FUSE_SUBR_H_
#define _FUSE_SUBR_H_
-#include <sys/param.h>
#include <sys/dirent.h>
#include <sys/mount.h>
#include <sys/statvfs.h>
#include <sys/vnode.h>
#include <sys/fusebuf.h>
+#include <limits.h>
#include "fuse.h"
-/* $OpenBSD: kvm.c,v 1.53 2014/08/15 03:51:40 guenther Exp $ */
+/* $OpenBSD: kvm.c,v 1.54 2015/01/16 16:48:51 deraadt Exp $ */
/* $NetBSD: kvm.c,v 1.43 1996/05/05 04:31:59 gwr Exp $ */
/*-
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/param.h> /* MAXCOMLEN MID_MACHINE */
#include <sys/proc.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
return (kd);
}
- if (uf && strlen(uf) >= MAXPATHLEN) {
+ if (uf && strlen(uf) >= PATH_MAX) {
_kvm_err(kd, kd->program, "exec file name too long");
goto failed;
}
kvm_dbopen(kvm_t *kd, const char *uf)
{
char dbversion[_POSIX2_LINE_MAX], kversion[_POSIX2_LINE_MAX];
- char dbname[MAXPATHLEN];
+ char dbname[PATH_MAX];
struct nlist nitem;
size_t dbversionlen;
DBT rec;
-/* $OpenBSD: kvm_amd64.c,v 1.11 2013/11/01 15:57:56 deraadt Exp $ */
+/* $OpenBSD: kvm_amd64.c,v 1.12 2015/01/16 16:48:51 deraadt Exp $ */
/* $NetBSD: kvm_x86_64.c,v 1.3 2002/06/05 22:01:55 fvdl Exp $ */
/*-
* x86-64 machine dependent routines for kvm.
*/
-#include <sys/param.h>
+#include <sys/param.h> /* MAXCOMLEN */
#include <sys/proc.h>
#include <sys/stat.h>
#include <sys/kcore.h>
-/* $OpenBSD: kvm_file2.c,v 1.40 2014/11/19 13:35:36 krw Exp $ */
+/* $OpenBSD: kvm_file2.c,v 1.41 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 2009 Todd C. Miller <Todd.Miller@courtesan.com>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <limits.h>
#include "kvm_private.h"
#include "kvm_file.h"
-/* $OpenBSD: termcap.c,v 1.9 2005/08/14 17:15:19 espie Exp $ */
+/* $OpenBSD: termcap.c,v 1.10 2015/01/16 16:48:51 deraadt Exp $ */
/* $NetBSD: termcap.c,v 1.7 1995/06/05 19:45:52 pk Exp $ */
/*
#define PBUFSIZ 512 /* max length of filename path */
#define PVECSIZ 32 /* max number of names in path */
-#include <sys/param.h>
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <limits.h>
#include <curses.h>
#include "pathnames.h"
char **fname;
char *home;
int i;
- char pathbuf[MAXPATHLEN]; /* holds raw path of filenames */
+ char pathbuf[PATH_MAX]; /* holds raw path of filenames */
char *pathvec[PVECSIZ]; /* to point to names in pathbuf */
char **pvec; /* holds usable tail of path vector */
char *termpath;
-/* $OpenBSD: gencode.c,v 1.39 2014/11/20 14:51:41 krw Exp $ */
+/* $OpenBSD: gencode.c,v 1.40 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
+#include <sys/param.h> /* ALIGN */
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
-/* $OpenBSD: inet.c,v 1.19 2006/03/26 20:58:50 djm Exp $ */
+/* $OpenBSD: inet.c,v 1.20 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 1994, 1995, 1996, 1997, 1998
*/
-#include <sys/param.h>
#include <sys/file.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
-/* $OpenBSD: bootparam_prot.x,v 1.9 2010/09/01 14:43:34 millert Exp $ */
+/* $OpenBSD: bootparam_prot.x,v 1.10 2015/01/16 16:48:51 deraadt Exp $ */
/*
* Copyright (c) 2010, Oracle America, Inc.
*/
#ifdef RPC_HDR
-%#include <sys/param.h>
+%#include <sys/types.h>
%#include <rpc/types.h>
%#include <sys/time.h>
%#include <sys/ucred.h>
-/* $OpenBSD: rthread_np.c,v 1.15 2014/12/08 18:15:46 tedu Exp $ */
+/* $OpenBSD: rthread_np.c,v 1.16 2015/01/16 16:48:52 deraadt Exp $ */
/*
* Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org>
* Copyright (c) 2005 Otto Moerbeek <otto@openbsd.org>
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h>
#include <sys/time.h>
#include <sys/lock.h>
#include <sys/resource.h>
-/* $OpenBSD: rthread_sem.c,v 1.19 2014/06/27 23:21:47 matthew Exp $ */
+/* $OpenBSD: rthread_sem.c,v 1.20 2015/01/16 16:48:52 deraadt Exp $ */
/*
* Copyright (c) 2004,2005,2013 Ted Unangst <tedu@openbsd.org>
* All Rights Reserved.
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h>
+
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>
-/* $OpenBSD: rthread_stack.c,v 1.12 2014/06/27 23:21:47 matthew Exp $ */
+/* $OpenBSD: rthread_stack.c,v 1.13 2015/01/16 16:48:52 deraadt Exp $ */
/* $snafu: rthread_stack.c,v 1.12 2005/01/11 02:45:28 marc Exp $ */
/* PUBLIC DOMAIN: No Rights Reserved. Marco S Hyman <marc@snafu.org> */
-#include <sys/param.h>
#include <sys/mman.h>
#include <errno.h>
*
* S/Key verification check, lookups, and authentication.
*
- * $OpenBSD: skeylogin.c,v 1.55 2013/11/29 19:00:51 deraadt Exp $
+ * $OpenBSD: skeylogin.c,v 1.56 2015/01/16 16:48:52 deraadt Exp $
*/
-#include <sys/param.h>
#ifdef QUOTA
#include <sys/quota.h>
#endif
#include <string.h>
#include <time.h>
#include <unistd.h>
+#include <limits.h>
#include <sha1.h>
#include "skey.h"
-/* $OpenBSD: mio.c,v 1.18 2013/11/13 22:38:22 ratchov Exp $ */
+/* $OpenBSD: mio.c,v 1.19 2015/01/16 16:48:52 deraadt Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
-/* $OpenBSD: mio_priv.h,v 1.10 2013/11/13 22:38:22 ratchov Exp $ */
+/* $OpenBSD: mio_priv.h,v 1.11 2015/01/16 16:48:52 deraadt Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
#ifndef MIO_PRIV_H
#define MIO_PRIV_H
-#include <sys/param.h>
#include "sndio.h"
#define MIO_MAXNFDS 16
-/* $OpenBSD: sio.c,v 1.18 2014/08/10 09:11:07 jsg Exp $ */
+/* $OpenBSD: sio.c,v 1.19 2015/01/16 16:48:52 deraadt Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h>
#include <sys/types.h>
#include <sys/stat.h>
-/* $OpenBSD: sio_priv.h,v 1.8 2014/03/05 20:40:49 ratchov Exp $ */
+/* $OpenBSD: sio_priv.h,v 1.9 2015/01/16 16:48:52 deraadt Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
#ifndef SNDIO_PRIV_H
#define SNDIO_PRIV_H
-#include <sys/param.h>
#include "sndio.h"
#define SIO_MAXNFDS 16
-/* $OpenBSD: readlabel.c,v 1.12 2014/06/30 00:25:37 deraadt Exp $ */
+/* $OpenBSD: readlabel.c,v 1.13 2015/01/16 16:48:52 deraadt Exp $ */
/*
* Copyright (c) 1996, Jason Downs. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/disk.h>
#include <sys/dkio.h>
#define DKTYPENAMES
#include <stdio.h>
#include <err.h>
#include <errno.h>
+#include <limits.h>
#include <fcntl.h>
#include <paths.h>
#include <string.h>
char *
readlabelfs(char *device, int verbose)
{
- char rpath[MAXPATHLEN];
+ char rpath[PATH_MAX];
struct dk_diskmap dm;
struct disklabel dk;
char part, *type;