summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cm.h4
-rw-r--r--src/sysdep.c4
-rw-r--r--src/terminfo.c4
3 files changed, 12 insertions, 0 deletions
diff --git a/src/cm.h b/src/cm.h
index 4567c4474a9..fc3d183f5f9 100644
--- a/src/cm.h
+++ b/src/cm.h
@@ -101,6 +101,9 @@ struct cm
extern struct cm Wcm; /* Terminal capabilities */
extern char PC; /* Pad character */
+#if defined (HAVE_LIBNCURSES) && ! defined (NCURSES_OSPEED_T)
+extern short ospeed;
+#else
#if defined (HAVE_TERMIOS_H) && defined (LINUX)
#include <termios.h>
/* HJL's version of libc is said to need this on the Alpha.
@@ -109,6 +112,7 @@ extern speed_t ospeed;
#else
extern short ospeed; /* Output speed (from sg_ospeed) */
#endif
+#endif
/* Shorthand */
#ifndef NoCMShortHand
diff --git a/src/sysdep.c b/src/sysdep.c
index a72d1977dd3..098612a1bb5 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -226,6 +226,9 @@ static int baud_convert[] =
};
#endif
+#if defined (HAVE_LIBNCURSES) && ! defined (NCURSES_OSPEED_T)
+extern short ospeed;
+#else
#if defined (HAVE_TERMIOS_H) && defined (LINUX)
#include <termios.h>
/* HJL's version of libc is said to need this on the Alpha.
@@ -234,6 +237,7 @@ extern speed_t ospeed;
#else
extern short ospeed;
#endif
+#endif
/* The file descriptor for Emacs's input terminal.
Under Unix, this is normally zero except when using X;
diff --git a/src/terminfo.c b/src/terminfo.c
index 870461f5a04..4bb47997507 100644
--- a/src/terminfo.c
+++ b/src/terminfo.c
@@ -26,6 +26,9 @@ Boston, MA 02111-1307, USA. */
char *UP, *BC, PC;
+#if defined (HAVE_LIBNCURSES) && ! defined (NCURSES_OSPEED_T)
+short ospeed;
+#else
#if defined (HAVE_TERMIOS_H) && defined (LINUX)
#include <termios.h>
/* HJL's version of libc is said to need this on the Alpha.
@@ -34,6 +37,7 @@ speed_t ospeed;
#else
short ospeed;
#endif
+#endif
static buffer[512];