1 2 // automatically generated by m4 from headers in proto subdir 3 4 5 #ifndef __UNISTD_H__ 6 #define __UNISTD_H__ 7 8 #ifndef NULL 9 #define NULL ((void*)(0)) 10 #endif 11 12 #ifndef SEEK_SET 13 #define SEEK_SET 0 14 #endif 15 16 #ifndef SEEK_CUR 17 #define SEEK_CUR 1 18 #endif 19 20 #ifndef SEEK_END 21 #define SEEK_END 2 22 #endif 23 24 #define STDIN_FILENO 0 25 #define STDOUT_FILENO 1 26 #define STDERR_FILENO 2 27 28 #ifndef _SIZE_T_DEFINED 29 #define _SIZE_T_DEFINED 30 typedef unsigned int size_t; 31 #endif 32 33 #ifndef _SSIZE_T_DEFINED 34 #define _SSIZE_T_DEFINED 35 typedef unsigned int ssize_t; 36 #endif 37 38 #ifndef _OFF_T_DEFINED 39 #define _OFF_T_DEFINED 40 typedef long off_t; 41 #endif 42 43 #ifndef _INTPTR_T_DEFINED 44 #define _INTPTR_T_DEFINED 45 typedef int intptr_t; 46 #endif 47 48 extern int __LIB__ close(int fd) __smallc __z88dk_fastcall; 49 50 51 extern int __LIB__ dup(int fd) __smallc __z88dk_fastcall; 52 53 54 extern int __LIB__ dup2(int fd,int fd2) __smallc; 55 extern int __LIB__ dup2_callee(int fd,int fd2) __smallc __z88dk_callee; 56 #define dup2(a,b) dup2_callee(a,b) 57 58 59 extern void __LIB__ _exit(int status) __smallc __z88dk_fastcall; 60 61 62 extern off_t __LIB__ lseek(int fd,off_t offset,int whence) __smallc; 63 extern off_t __LIB__ lseek_callee(int fd,off_t offset,int whence) __smallc __z88dk_callee; 64 #define lseek(a,b,c) lseek_callee(a,b,c) 65 66 67 extern ssize_t __LIB__ read(int fd,void *buf,size_t nbyte) __smallc; 68 extern ssize_t __LIB__ read_callee(int fd,void *buf,size_t nbyte) __smallc __z88dk_callee; 69 #define read(a,b,c) read_callee(a,b,c) 70 71 72 extern ssize_t __LIB__ write(int fd,const void *buf,size_t nbyte) __smallc; 73 extern ssize_t __LIB__ write_callee(int fd,const void *buf,size_t nbyte) __smallc __z88dk_callee; 74 #define write(a,b,c) write_callee(a,b,c) 75 76 77 78 #endif 79