]> code.delx.au - gnu-emacs/blobdiff - src/systty.h
[!SYSTEM_MALLOC] (MEMMOVE_MISSING): Defined.
[gnu-emacs] / src / systty.h
index 5d651877c95e624395eb6d6c69985e02cb9dc537..b92b0249b66a209312d5fdcb3999d6f77ca2a963 100644 (file)
@@ -20,6 +20,30 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #ifdef HAVE_TERMIOS
 #define HAVE_TCATTR
 #endif
+
+/* If we defined these before and we are about to redefine them,
+   prevent alarming warnings.  */
+#ifdef BSD_TERMIOS
+#undef NL0
+#undef NL1
+#undef CR0
+#undef CR1
+#undef CR2
+#undef CR3
+#undef TAB0
+#undef TAB1
+#undef TAB2
+#undef XTABS
+#undef BS0
+#undef BS1
+#undef FF0
+#undef FF1
+#undef ECHO
+#undef NOFLSH
+#undef TOSTOP
+#undef FLUSHO
+#undef PENDIN
+#endif
 \f
 /* Include the proper files.  */
 #ifdef HAVE_TERMIO
@@ -114,11 +138,18 @@ static struct sensemode {
 #ifdef AIX
 #include <sys/pty.h>
 #include <unistd.h>
+#define UNISTD_H_INCLUDED
 #endif /* AIX */
 
 #ifdef IRIX4
 /* Get _getpty prototype */
 #include <unistd.h>
+#define UNISTD_H_INCLUDED
+#endif
+
+#if defined (POSIX) && !defined (UNISTD_H_INCLUDED) && defined (HAVE_UNISTD_H)
+#include <unistd.h>
+#define UNISTD_H_INCLUDED
 #endif
 
 #ifdef SYSV_PTYS
@@ -242,7 +273,7 @@ static struct sensemode {
 
 #ifdef EMACS_HAVE_TTY_PGRP
 
-#ifdef HAVE_TERMIOS
+#if defined (HAVE_TERMIOS) && ! defined (BSD_TERMIOS)
 
 #define EMACS_GET_TTY_PGRP(fd, pgid) (*(pgid) = tcgetpgrp ((fd)))
 #define EMACS_SET_TTY_PGRP(fd, pgid) (tcsetpgrp ((fd), *(pgid)))
@@ -264,6 +295,19 @@ static struct sensemode {
 
 #endif
 
+/* EMACS_GETPGRP (arg) returns the process group of the terminal.  */
+
+#if defined (USG) && !defined (GETPGRP_NEEDS_ARG)
+#  if !defined (GETPGRP_NO_ARG)
+#    define GETPGRP_NO_ARG
+#  endif
+#endif
+
+#if defined (GETPGRP_NO_ARG)
+#  define EMACS_GETPGRP(x) getpgrp()
+#else
+#  define EMACS_GETPGRP(x) getpgrp(x)
+#endif /* !GETPGRP_NO_ARG */
 \f
 /* Manipulate a TTY's input/output processing parameters.  */