1*68e3ffa3Smatt /* $NetBSD: pwritev.c,v 1.7 2012/03/20 16:26:12 matt Exp $ */
2637dff35Sthorpej
3637dff35Sthorpej /*
4637dff35Sthorpej * Copyright (c) 1992, 1993
5637dff35Sthorpej * The Regents of the University of California. All rights reserved.
6637dff35Sthorpej *
7637dff35Sthorpej * Redistribution and use in source and binary forms, with or without
8637dff35Sthorpej * modification, are permitted provided that the following conditions
9637dff35Sthorpej * are met:
10637dff35Sthorpej * 1. Redistributions of source code must retain the above copyright
11637dff35Sthorpej * notice, this list of conditions and the following disclaimer.
12637dff35Sthorpej * 2. Redistributions in binary form must reproduce the above copyright
13637dff35Sthorpej * notice, this list of conditions and the following disclaimer in the
14637dff35Sthorpej * documentation and/or other materials provided with the distribution.
15eb7c1594Sagc * 3. Neither the name of the University nor the names of its contributors
16637dff35Sthorpej * may be used to endorse or promote products derived from this software
17637dff35Sthorpej * without specific prior written permission.
18637dff35Sthorpej *
19637dff35Sthorpej * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20637dff35Sthorpej * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21637dff35Sthorpej * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22637dff35Sthorpej * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23637dff35Sthorpej * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24637dff35Sthorpej * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25637dff35Sthorpej * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26637dff35Sthorpej * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27637dff35Sthorpej * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28637dff35Sthorpej * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29637dff35Sthorpej * SUCH DAMAGE.
30637dff35Sthorpej */
31637dff35Sthorpej
32637dff35Sthorpej #include <sys/cdefs.h>
33637dff35Sthorpej #if defined(LIBC_SCCS) && !defined(lint)
34*68e3ffa3Smatt __RCSID("$NetBSD: pwritev.c,v 1.7 2012/03/20 16:26:12 matt Exp $");
35637dff35Sthorpej #endif /* LIBC_SCCS and not lint */
36637dff35Sthorpej
37637dff35Sthorpej #include <sys/types.h>
38637dff35Sthorpej #include <sys/syscall.h>
39637dff35Sthorpej #include <sys/uio.h>
40637dff35Sthorpej #include <unistd.h>
41637dff35Sthorpej
422b37ebddSuebayasi ssize_t __pwritev(int, const struct iovec *, int, int, off_t);
43b0b7248dSdsl
44637dff35Sthorpej /*
45637dff35Sthorpej * This function provides 64-bit offset padding that
46637dff35Sthorpej * is not supplied by GCC 1.X but is supplied by GCC 2.X.
47637dff35Sthorpej */
48a644188bSthorpej ssize_t
pwritev(int fd,const struct iovec * iovp,int iovcnt,off_t offset)49*68e3ffa3Smatt pwritev(int fd, const struct iovec *iovp, int iovcnt, off_t offset)
50637dff35Sthorpej {
51637dff35Sthorpej
52b0b7248dSdsl return __pwritev(fd, iovp, iovcnt, 0, offset);
53637dff35Sthorpej }
54