X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/1bf61ff9f85289ed5a28cebc319735c676fa6594..28146d2b8e7e9b28565d24a4a88d1f6dc6bb12c4:/src/systty.h diff --git a/src/systty.h b/src/systty.h index 4bfb00b451..6aeb2f65a4 100644 --- a/src/systty.h +++ b/src/systty.h @@ -15,7 +15,8 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ #ifdef HAVE_TERMIOS #define HAVE_TCATTR @@ -62,12 +63,12 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #if defined(_AIX) && defined(_I386) #include /* termios.h needs to be before termio.h */ #include -#else /* not HAVE_TERMIOS */ +#else /* not (_AIX && _I386) */ #ifndef NO_TERMIO #include #endif #include -#endif /* _AIX && _I386 */ +#endif /* not (_AIX && _I386) */ #define INCLUDED_FCNTL #include #else /* neither HAVE_TERMIO nor HAVE_TERMIOS */ @@ -115,6 +116,7 @@ static struct sensemode { #endif /* not HAVE_TERMIO */ #ifdef __GNU_LIBRARY__ +#include #include #endif @@ -290,13 +292,26 @@ static struct sensemode { #endif -/* EMACS_GETPGRP (arg) returns the process group of the terminal. */ +/* EMACS_GETPGRP (arg) returns the process group of the process. */ +#ifdef __GNU_LIBRARY__ +/* GNU libc by default defines getpgrp with no args on all systems. */ +#if __GLIBC__ >= 2 +/* glibc-2.1 adds the BSD compatibility getpgrp function + if you use _BSD_SOURCE, which Emacs does on GNU/Linux systems. */ +#if __GLIBC_MINOR__ < 1 || ! defined (__FAVOR_BSD) +#define GETPGRP_NO_ARG +#endif +#else /* __GLIBC__ < 2 */ +#define GETPGRP_NO_ARG +#endif /* __GLIBC__ < 2 */ +#else /* not __GNU_LIBRARY__ */ #if defined (USG) && !defined (GETPGRP_NEEDS_ARG) # if !defined (GETPGRP_NO_ARG) # define GETPGRP_NO_ARG # endif #endif +#endif /* not __GNU_LIBRARY__ */ #if defined (GETPGRP_NO_ARG) # define EMACS_GETPGRP(x) getpgrp() @@ -377,6 +392,10 @@ struct emacs_tty { expression, so we moved them out to their own functions in sysdep.c. */ #define EMACS_GET_TTY(fd, p) (emacs_get_tty ((fd), (p))) #define EMACS_SET_TTY(fd, p, waitp) (emacs_set_tty ((fd), (p), (waitp))) +#ifdef P_ /* Unfortunately this file is sometimes included before lisp.h */ +extern int emacs_get_tty P_ ((int, struct emacs_tty *)); +extern int emacs_set_tty P_ ((int, struct emacs_tty *, int)); +#endif /* Define EMACS_TTY_TABS_OK. */