new ioctl() call (instead of _kern_ioctl)
[newos.git] / include / libc / unistd.h
blob630a2373b03e64f3038a6ae39627ff7648b5ac64
1 /*
2 ** Copyright 2001, 2003, Travis Geiselbrecht. All rights reserved.
3 ** Copyright 2002, Manuel J. Petit. All rights reserved.
4 ** Distributed under the terms of the NewOS License.
5 */
7 #ifndef __newos__libc_unistd__hh__
8 #define __newos__libc_unistd__hh__
11 #include <newos/types.h>
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
17 /* whence values for lseek() */
18 #define SEEK_SET 0
19 #define SEEK_CUR 1
20 #define SEEK_END 2
22 int open(char const *, int, ...);
23 int close(int);
24 int dup(int);
25 int dup2(int, int);
27 off_t lseek(int, off_t, int);
28 ssize_t read(int, void *, size_t);
29 ssize_t pread(int, void *, size_t, off_t);
30 ssize_t write(int, void const*, size_t);
31 ssize_t pwrite(int, void const*, size_t, off_t);
33 unsigned sleep(unsigned);
34 int usleep(unsigned);
36 int chdir(char *);
37 char *getcwd(char *, size_t);
38 char *getwd(char *);
40 int pipe(int fds[2]);
42 /* not strictly supposed to be here, and doesn't quite match unix ioctl() */
43 int ioctl(int, int, void *, size_t);
45 #ifdef __cplusplus
46 } /* extern "C" */
47 #endif
50 #endif