Changeset 217e398 in rtems
- Timestamp:
- 01/17/96 20:13:01 (28 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 72c440e
- Parents:
- 5d3e539
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libc/syscalls.c
r5d3e539 r217e398 24 24 #include <sys/stat.h> 25 25 26 int 27 __fstat(int _fd, struct stat* _sbuf) 26 /* 27 * check this newlib bug?: 28 * 29 * newlib/libc/stdio/makebuf.c: 30 * 31 * 2nd ifdef uses 1024 instead of BUFSIZ 32 * 2nd check lets fp blksize be 0 33 * finally look at the malloc 34 */ 35 36 /* 37 * fstat, stat, and isatty must lie consistently and report that everything 38 * is a tty or stdout will not be line buffered. 39 */ 40 41 int __fstat(int _fd, struct stat* _sbuf) 28 42 { 29 return -1; 43 _sbuf->st_mode = S_IFCHR; 44 #ifdef HAVE_BLKSIZE 45 _sbuf->st_blksize = 0; 46 #endif 47 return 0; 30 48 } 31 49 32 int 33 __isatty(int _fd) 50 int __isatty(int _fd) 34 51 { 35 52 return 1; … … 38 55 int stat( const char *path, struct stat *buf ) 39 56 { 40 /* always fail */ 41 return -1; 57 return __fstat( 0, buf ); 42 58 } 43 59
Note: See TracChangeset
for help on using the changeset viewer.