2002-12-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>

* configure.ac: Add various checks to enhance portability.
	* src/termios.c: Reflect changes to configure.ac.
This commit is contained in:
Ralf Corsepius
2002-12-06 06:25:58 +00:00
parent 382e1eb331
commit c7078611fc
3 changed files with 55 additions and 11 deletions

View File

@@ -1,3 +1,8 @@
2002-12-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* configure.ac: Add various checks to enhance portability.
* src/termios.c: Reflect changes to configure.ac.
2002-12-02 Joel Sherrill <joel@OARcorp.com>
* include/rtems/libio.h: Internally use a union of an unsigned64

View File

@@ -43,6 +43,35 @@ AS_IF([test x"$RTEMS_USE_NEWLIB" != x"yes"],[
AC_CHECK_DECLS([_POSIX_LOGIN_NAME_MAX],,,[#include <limits.h>])
AC_CHECK_DECLS([CHAR_BIT],,,[#include <limits.h>])
AS_IF([test x"${RTEMS_USE_NEWLIB}" = x"yes"],[
ac_cv_have_decl_XTABS=yes
ac_cv_have_decl_OLCUC=yes
## SUSV3, but seemingly not available on some platforms (reportedly FreeBSD)
ac_cv_have_decl_ONLRET=yes
ac_cv_have_decl_ONOCR=yes
ac_cv_have_decl_TABDLY=yes
ac_cv_have_decl_OCRNL=yes
ac_cv_have_decl_IUCLC=yes
## SUSV3-XSI extension
ac_cv_have_decl_ECHOPRT=yes
])
# FIXME: Some cruft to work around portability issues with termios.c
## Seemingly not covered by any standard.
AC_CHECK_DECLS([XTABS],,,[#include <termios.h>])
AC_CHECK_DECLS([OLCUC],,,[#include <termios.h>])
## SUSV3, but seemingly not available on some platforms (reportedly FreeBSD)
AC_CHECK_DECLS([ONLRET],,,[#include <termios.h>])
AC_CHECK_DECLS([ONOCR],,,[#include <termios.h>])
AC_CHECK_DECLS([TABDLY],,,[#include <termios.h>])
AC_CHECK_DECLS([OCRNL],,,[#include <termios.h>])
AC_CHECK_DECLS([IUCLC],,,[#include <termios.h>])
## SUSV3-XSI extension
AC_CHECK_DECLS([ECHOPRT],,,[#include <termios.h>])
## BSD-ism, excluded from POSIX, but available on most platforms
AC_CHECK_DECLS([sbrk],,,[#include <unistd.h>])
AM_CONDITIONAL([NEED_SYS_CDEFS_H],[test x"$NEED_SYS_CDEFS_H" = x"yes"])
AM_CONFIG_HEADER([src/config.h])

View File

@@ -34,23 +34,33 @@
/*
* FreeBSD does not support a full POSIX termios so we have to help it out
*/
#if defined(__FreeBSD__)
#if !HAVE_DECL_XTABS
#define XTABS 0
#endif
#if !HAVE_DECL_ONLRET
#define ONLRET 0
#define ONOCR 0
#endif
#if !HAVE_DECL_ONOCR
#define ONOCR 0
#endif
#if !HAVE_DECL_TABDLY
#define TABDLY 0
#define OLCUC 0
#define ILCUC 0
#define OCRNL 0
#endif
#if !HAVE_DECL_OLCUC
#define OLCUC 0
#endif
#if !HAVE_DECL_ILCUC
#define ILCUC 0
#endif
#if !HAVE_DECL_OCRNL
#define OCRNL 0
#endif
#if !HAVE_DECL_IUCLC
#define IUCLC 0
#endif
/*
* Cygwin does not define these
*/
#if defined(__CYGWIN__)
#if !HAVE_DECL_ECHOPRT
#define ECHOPRT 0
#endif