mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-25 22:07:15 +00:00
Addition of more functionality by Eric Norum to support GNU readline.
This commit is contained in:
33
c/src/exec/libcsupport/src/tcflow.c
Normal file
33
c/src/exec/libcsupport/src/tcflow.c
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* tcflow() - POSIX 1003.1b 7.2.2 - Line Control Functions
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1998.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* Copyright assigned to U.S. Government, 1994.
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.OARcorp.com/rtems/license.html.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <rtems.h>
|
||||
#if defined(RTEMS_NEWLIB)
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <termios.h>
|
||||
/* #include <sys/ioctl.h> */
|
||||
|
||||
int ioctl();
|
||||
|
||||
#include <rtems/libio.h>
|
||||
|
||||
int tcflow (int fd, int action)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
33
c/src/exec/libcsupport/src/tcflush.c
Normal file
33
c/src/exec/libcsupport/src/tcflush.c
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* tcflush() - POSIX 1003.1b 7.2.2 - Line Control Functions
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1998.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* Copyright assigned to U.S. Government, 1994.
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.OARcorp.com/rtems/license.html.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <rtems.h>
|
||||
#if defined(RTEMS_NEWLIB)
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <termios.h>
|
||||
/* #include <sys/ioctl.h> */
|
||||
|
||||
int ioctl();
|
||||
|
||||
#include <rtems/libio.h>
|
||||
|
||||
int tcflush (int fd, int queue)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -32,9 +32,18 @@ int tcsetattr(
|
||||
struct termios *tp
|
||||
)
|
||||
{
|
||||
if ( opt != TCSANOW )
|
||||
switch (opt) {
|
||||
default:
|
||||
set_errno_and_return_minus_one( ENOTSUP );
|
||||
|
||||
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
|
||||
case TCSADRAIN:
|
||||
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
|
||||
return -1;
|
||||
/*
|
||||
* Fall through to....
|
||||
*/
|
||||
case TCSANOW:
|
||||
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -25,7 +25,8 @@ IMFS_C_PIECES = imfs_chown imfs_creat imfs_directory imfs_eval imfs_free \
|
||||
imfs_readlink imfs_fdatasync
|
||||
|
||||
TERMIOS_C_PIECES = cfgetispeed cfgetospeed cfsetispeed cfsetospeed tcgetattr \
|
||||
tcsetattr tcdrain termios termiosinitialize termiosreserveresources
|
||||
tcsetattr tcdrain tcflow tcflush termios \
|
||||
termiosinitialize termiosreserveresources
|
||||
|
||||
SYSTEM_CALL_C_PIECES = open close read write lseek ioctl mkdir mknod mkfifo \
|
||||
rmdir chdir chmod fchmod chown link unlink umask ftruncate utime fstat \
|
||||
|
||||
33
c/src/lib/libc/tcflow.c
Normal file
33
c/src/lib/libc/tcflow.c
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* tcflow() - POSIX 1003.1b 7.2.2 - Line Control Functions
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1998.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* Copyright assigned to U.S. Government, 1994.
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.OARcorp.com/rtems/license.html.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <rtems.h>
|
||||
#if defined(RTEMS_NEWLIB)
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <termios.h>
|
||||
/* #include <sys/ioctl.h> */
|
||||
|
||||
int ioctl();
|
||||
|
||||
#include <rtems/libio.h>
|
||||
|
||||
int tcflow (int fd, int action)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
33
c/src/lib/libc/tcflush.c
Normal file
33
c/src/lib/libc/tcflush.c
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* tcflush() - POSIX 1003.1b 7.2.2 - Line Control Functions
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1998.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* Copyright assigned to U.S. Government, 1994.
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.OARcorp.com/rtems/license.html.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <rtems.h>
|
||||
#if defined(RTEMS_NEWLIB)
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <termios.h>
|
||||
/* #include <sys/ioctl.h> */
|
||||
|
||||
int ioctl();
|
||||
|
||||
#include <rtems/libio.h>
|
||||
|
||||
int tcflush (int fd, int queue)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -32,9 +32,18 @@ int tcsetattr(
|
||||
struct termios *tp
|
||||
)
|
||||
{
|
||||
if ( opt != TCSANOW )
|
||||
switch (opt) {
|
||||
default:
|
||||
set_errno_and_return_minus_one( ENOTSUP );
|
||||
|
||||
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
|
||||
case TCSADRAIN:
|
||||
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
|
||||
return -1;
|
||||
/*
|
||||
* Fall through to....
|
||||
*/
|
||||
case TCSANOW:
|
||||
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user