diff options
| author | Jim Blandy | 1993-05-27 02:12:20 +0000 |
|---|---|---|
| committer | Jim Blandy | 1993-05-27 02:12:20 +0000 |
| commit | 50b8cf60325f92026d3fc768a433a5579c642df2 (patch) | |
| tree | 5acda07c8407dd48778d61b146431508c9daf5eb /src/sysdep.c | |
| parent | 7ad1552990092f3c0301a2bb946bf368def41b08 (diff) | |
| download | emacs-50b8cf60325f92026d3fc768a433a5579c642df2.tar.gz emacs-50b8cf60325f92026d3fc768a433a5579c642df2.zip | |
* systty.h (HAVE_LTCHARS, HAVE_TCHARS): New macros; define them if
we have those structures, but *don't* define them if we have
TERMIOS, whose functions take care of those parameters; that
screws up AIX.
(struct emacs_tty): Test those symbols, instead of the ioctl
commands.
* sysdep.c (emacs_get_tty, emacs_set_tty, new_ltchars, new_tchars,
init_sys_modes): Same.
Diffstat (limited to 'src/sysdep.c')
| -rw-r--r-- | src/sysdep.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index 300ad654f1e..15a0da97190 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -765,13 +765,13 @@ emacs_get_tty (fd, settings) | |||
| 765 | #endif | 765 | #endif |
| 766 | 766 | ||
| 767 | /* Suivant - Do we have to get struct ltchars data? */ | 767 | /* Suivant - Do we have to get struct ltchars data? */ |
| 768 | #ifdef TIOCGLTC | 768 | #ifdef HAVE_LTCHARS |
| 769 | if (ioctl (fd, TIOCGLTC, &settings->ltchars) < 0) | 769 | if (ioctl (fd, TIOCGLTC, &settings->ltchars) < 0) |
| 770 | return -1; | 770 | return -1; |
| 771 | #endif | 771 | #endif |
| 772 | 772 | ||
| 773 | /* How about a struct tchars and a wordful of lmode bits? */ | 773 | /* How about a struct tchars and a wordful of lmode bits? */ |
| 774 | #ifdef TIOCGETC | 774 | #ifdef HAVE_TCHARS |
| 775 | if (ioctl (fd, TIOCGETC, &settings->tchars) < 0 | 775 | if (ioctl (fd, TIOCGETC, &settings->tchars) < 0 |
| 776 | || ioctl (fd, TIOCLGET, &settings->lmode) < 0) | 776 | || ioctl (fd, TIOCLGET, &settings->lmode) < 0) |
| 777 | return -1; | 777 | return -1; |
| @@ -846,13 +846,13 @@ emacs_set_tty (fd, settings, waitp) | |||
| 846 | #endif | 846 | #endif |
| 847 | 847 | ||
| 848 | /* Suivant - Do we have to get struct ltchars data? */ | 848 | /* Suivant - Do we have to get struct ltchars data? */ |
| 849 | #ifdef TIOCGLTC | 849 | #ifdef HAVE_LTCHARS |
| 850 | if (ioctl (fd, TIOCSLTC, &settings->ltchars) < 0) | 850 | if (ioctl (fd, TIOCSLTC, &settings->ltchars) < 0) |
| 851 | return -1; | 851 | return -1; |
| 852 | #endif | 852 | #endif |
| 853 | 853 | ||
| 854 | /* How about a struct tchars and a wordful of lmode bits? */ | 854 | /* How about a struct tchars and a wordful of lmode bits? */ |
| 855 | #ifdef TIOCGETC | 855 | #ifdef HAVE_TCHARS |
| 856 | if (ioctl (fd, TIOCSETC, &settings->tchars) < 0 | 856 | if (ioctl (fd, TIOCSETC, &settings->tchars) < 0 |
| 857 | || ioctl (fd, TIOCLSET, &settings->lmode) < 0) | 857 | || ioctl (fd, TIOCLSET, &settings->lmode) < 0) |
| 858 | return -1; | 858 | return -1; |
| @@ -888,10 +888,10 @@ unsigned char _sobuf[BUFSIZ+8]; | |||
| 888 | char _sobuf[BUFSIZ]; | 888 | char _sobuf[BUFSIZ]; |
| 889 | #endif | 889 | #endif |
| 890 | 890 | ||
| 891 | #ifdef TIOCGLTC | 891 | #ifdef HAVE_LTCHARS |
| 892 | static struct ltchars new_ltchars = {-1,-1,-1,-1,-1,-1}; | 892 | static struct ltchars new_ltchars = {-1,-1,-1,-1,-1,-1}; |
| 893 | #endif | 893 | #endif |
| 894 | #ifdef TIOCGETC | 894 | #ifdef HAVE_TCHARS |
| 895 | static struct tchars new_tchars = {-1,-1,-1,-1,-1,-1}; | 895 | static struct tchars new_tchars = {-1,-1,-1,-1,-1,-1}; |
| 896 | #endif | 896 | #endif |
| 897 | 897 | ||
| @@ -1042,7 +1042,7 @@ init_sys_modes () | |||
| 1042 | control for user coming over network on 4.2; in this case, | 1042 | control for user coming over network on 4.2; in this case, |
| 1043 | only t_stopc and t_startc really matter. */ | 1043 | only t_stopc and t_startc really matter. */ |
| 1044 | #ifndef HAVE_TERMIO | 1044 | #ifndef HAVE_TERMIO |
| 1045 | #ifdef TIOCGETC | 1045 | #ifdef HAVE_TCHARS |
| 1046 | /* Note: if not using CBREAK mode, it makes no difference how we | 1046 | /* Note: if not using CBREAK mode, it makes no difference how we |
| 1047 | set this */ | 1047 | set this */ |
| 1048 | tty.tchars = new_tchars; | 1048 | tty.tchars = new_tchars; |
| @@ -1068,12 +1068,12 @@ init_sys_modes () | |||
| 1068 | lmode = tty.lmode; | 1068 | lmode = tty.lmode; |
| 1069 | #endif | 1069 | #endif |
| 1070 | 1070 | ||
| 1071 | #endif /* TIOCGETC */ | 1071 | #endif /* HAVE_TCHARS */ |
| 1072 | #endif /* not HAVE_TERMIO */ | 1072 | #endif /* not HAVE_TERMIO */ |
| 1073 | 1073 | ||
| 1074 | #ifdef TIOCGLTC | 1074 | #ifdef HAVE_LTCHARS |
| 1075 | tty.ltchars = new_ltchars; | 1075 | tty.ltchars = new_ltchars; |
| 1076 | #endif /* TIOCGLTC */ | 1076 | #endif /* HAVE_LTCHARS */ |
| 1077 | 1077 | ||
| 1078 | EMACS_SET_TTY (input_fd, &tty, 0); | 1078 | EMACS_SET_TTY (input_fd, &tty, 0); |
| 1079 | 1079 | ||