Changeset 1206 for trunk/src/kash/shfile.h
- Timestamp:
- Oct 7, 2007, 5:40:04 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/shfile.h
r1199 r1206 29 29 30 30 #include "shtypes.h" 31 #include <fcntl.h> 32 #include <sys/stat.h> 33 #ifndef _MSC_VER 34 # include <sys/fcntl.h> 35 # include <unistd.h> 36 # ifndef O_BINARY 37 # define O_BINARY 0 38 # endif 39 # ifndef O_TEXT 40 # define O_TEXT 0 41 # endif 42 43 #else 44 # include <io.h> 45 # include <direct.h> 46 47 # define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) 48 # define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG) 49 # define S_ISLNK(m) 0 50 # define S_IRWXU (_S_IREAD | _S_IWRITE | _S_IEXEC) 51 # define S_IXUSR _S_IEXEC 52 # define S_IWUSR _S_IWRITE 53 # define S_IRUSR _S_IREAD 54 # define S_IRWXG 0000070 55 # define S_IRGRP 0000040 56 # define S_IWGRP 0000020 57 # define S_IXGRP 0000010 58 # define S_IRWXO 0000007 59 # define S_IROTH 0000004 60 # define S_IWOTH 0000002 61 # define S_IXOTH 0000001 62 # define S_ISUID 0004000 63 # define S_ISGID 0002000 64 # define ALLPERMS 0000777 65 66 # define F_DUPFD 0 67 # define F_GETFD 1 68 # define F_SETFD 2 69 # define F_GETFL 3 70 # define F_SETFL 4 71 # define FD_CLOEXEC 1 72 73 # define F_OK 0 74 # define X_OK 1 75 # define W_OK 2 76 # define R_OK 4 77 78 #endif 79 31 80 32 81 /** … … 51 100 } shfdtab; 52 101 53 54 102 int shfile_open(shfdtab *, const char *, unsigned); 55 103 int shfile_pipe(shfdtab *, int [2]); … … 59 107 long shfile_lseek(shfdtab *, int, long, int); 60 108 int shfile_fcntl(shfdtab *, int fd, int cmd, int arg); 61 #ifdef _MSC_VER62 # define F_DUPFD 063 # define F_GETFD 164 # define F_SETFD 265 # define F_GETFL 366 # define F_SETFL 467 # define FD_CLOEXEC 168 #else69 # include <sys/fcntl.h>70 #endif71 109 72 110 int shfile_stat(shfdtab *, const char *, struct stat *); … … 75 113 char *shfile_getcwd(shfdtab *, char *, int); 76 114 int shfile_isatty(shfdtab *, int); 77 /*int shfile_ioctl(shfdtab *, int, unsigned long, char *);*/ 115 int shfile_ioctl(shfdtab *, int, unsigned long, char *); 116 int shfile_access(shfdtab *, const char *, int); 78 117 79 118 #endif
Note:
See TracChangeset
for help on using the changeset viewer.