Changeset 4dc0fd6 in rtems
- Timestamp:
- 01/19/98 22:22:25 (25 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 866c465f
- Parents:
- 6f9c75c3
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/libcsupport/src/termios.c
r6f9c75c3 r4dc0fd6 114 114 int (*write)(int minor, const char *buf, int len); 115 115 }; 116 116 117 static struct rtems_termios_tty *ttyHead, *ttyTail; 117 118 static rtems_id ttyMutex; -
c/src/lib/libc/Makefile.in
r6f9c75c3 r4dc0fd6 31 31 32 32 include $(RTEMS_CUSTOM) 33 include $( PROJECT_ROOT)/make/lib.cfg33 include $(RTEMS_ROOT)/make/lib.cfg 34 34 35 35 # -
c/src/lib/libc/syscalls.c
r6f9c75c3 r4dc0fd6 27 27 28 28 #include <rtems.h> 29 #include <rtems/libio.h> 29 30 30 31 #ifdef RTEMS_NEWLIB … … 36 37 int __rtems_fstat(int _fd, struct stat* _sbuf) 37 38 { 38 if ( _fd > 2 ) {39 puts( "__rtems_fstat -- only stdio supported" );40 assert( 0 );41 }42 _sbuf->st_mode = S_IFCHR;43 39 #ifdef HAVE_BLKSIZE 44 40 _sbuf->st_blksize = 0; 45 41 #endif 42 43 /* 44 * For now assume stdin/stdout/stderr are always a TTY line 45 */ 46 if (_fd <= 2) { 47 _sbuf->st_mode = S_IFCHR; 48 } else { 49 switch (rtems_file_descriptor_type (_fd)) { 50 case RTEMS_FILE_DESCRIPTOR_TYPE_SOCKET: 51 _sbuf->st_mode = S_IFSOCK; 52 break; 53 54 default: 55 puts( "__rtems_fstat -- unknown socket type" ); 56 assert( 0 ); 57 } 58 } 46 59 return 0; 47 60 } … … 49 62 int __rtems_isatty(int _fd) 50 63 { 51 return 1; 64 struct stat st; 65 66 if (__rtems_fstat(_fd, &st) < 0) 67 return 0; 68 return S_ISCHR (st.st_mode); 52 69 } 53 70 -
c/src/lib/libc/termios.c
r6f9c75c3 r4dc0fd6 114 114 int (*write)(int minor, const char *buf, int len); 115 115 }; 116 116 117 static struct rtems_termios_tty *ttyHead, *ttyTail; 117 118 static rtems_id ttyMutex; -
cpukit/libcsupport/src/termios.c
r6f9c75c3 r4dc0fd6 114 114 int (*write)(int minor, const char *buf, int len); 115 115 }; 116 116 117 static struct rtems_termios_tty *ttyHead, *ttyTail; 117 118 static rtems_id ttyMutex;
Note: See TracChangeset
for help on using the changeset viewer.