-/* $OpenBSD: args.c,v 1.26 2014/09/14 22:44:47 schwarze Exp $ */
+/* $OpenBSD: args.c,v 1.27 2016/08/14 13:40:55 tedu Exp $ */
/* $NetBSD: args.c,v 1.7 1996/03/01 01:18:58 jtc Exp $ */
/*-
/*
* Read and write take size_t's as arguments. Lseek, however,
- * takes an off_t (quad).
+ * takes an off_t.
*/
if (cbsz > SSIZE_MAX || in.dbsz > SSIZE_MAX || out.dbsz > SSIZE_MAX)
errx(1, "buffer sizes cannot be greater than %zd",
(ssize_t)SSIZE_MAX);
- if (in.offset > QUAD_MAX / in.dbsz || out.offset > QUAD_MAX / out.dbsz)
- errx(1, "seek offsets cannot be larger than %qd", QUAD_MAX);
+ if (in.offset > LLONG_MAX / in.dbsz || out.offset > LLONG_MAX / out.dbsz)
+ errx(1, "seek offsets cannot be larger than %lld", LLONG_MAX);
}
static int
off_t num, t;
char *expr;
- num = strtoq(val, &expr, 0);
- if (num == QUAD_MAX) /* Overflow. */
+ num = strtoll(val, &expr, 0);
+ if (num == LLONG_MAX) /* Overflow. */
err(1, "%s", oper);
if (expr == val) /* No digits. */
errx(1, "%s: illegal numeric value", oper);