1/*
2 * $Id: restart.h,v 1.1 2009-06-30 02:31:09 steven Exp $
3 * Restart Library
4 *
5 * ** NOTICE **
6 *
7 * This code is written by (and is therefore copyright) Dr Kay Robbins
8 * (krobbins@cs.utsa.edu) and Dr. Steve Robbins (srobbins@cs.utsa.edu),
9 * and was released with unspecified licensing as part of their book
10 * _UNIX_Systems_Programming_ (Prentice Hall, ISBN: 0130424110).
11 *
12 * Dr. Steve Robbins was kind enough to allow me to re-license this
13 * software as GPL.  I would request that any bugs or problems with
14 * this code be brought to my attention (ron@pedde.com), and I will
15 * submit appropriate patches upstream, should the problem be with
16 * the original code.
17 *
18 * ** NOTICE **
19 *
20 * This program is free software; you can redistribute it and/or modify
21 * it under the terms of the GNU General Public License as published by
22 * the Free Software Foundation; either version 2 of the License, or
23 * (at your option) any later version.
24 *
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28 * GNU General Public License for more details.
29 *
30 * You should have received a copy of the GNU General Public License
31 * along with this program; if not, write to the Free Software
32 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
33 */
34
35#include <fcntl.h>
36#include <unistd.h>
37#include <sys/time.h>
38#include <sys/types.h>
39
40#ifndef ETIME
41#define ETIME ETIMEDOUT
42#endif
43
44struct timeval add2currenttime(double seconds);
45int copyfile(int fromfd, int tofd);
46int r_close(int fildes);
47int r_dup2(int fildes, int fildes2);
48int r_open2(const char *path, int oflag);
49int r_open3(const char *path, int oflag, mode_t mode);
50ssize_t r_read(int fd, void *buf, size_t size);
51pid_t r_wait(int *stat_loc);
52pid_t r_waitpid(pid_t pid, int *stat_loc, int options);
53ssize_t r_write(int fd, void *buf, size_t size);
54ssize_t readblock(int fd, void *buf, size_t size);
55int readline(int fd, char *buf, int nbytes);
56int readlinetimed(int fd, char *buf, int nbytes, double seconds);
57ssize_t readtimed(int fd, void *buf, size_t nbyte, double seconds);
58int readwrite(int fromfd, int tofd);
59int readwriteblock(int fromfd, int tofd, char *buf, int size);
60int waitfdtimed(int fd, struct timeval end);
61