diff --git a/src/config.in b/src/config.in index e479029a70f..0cd0b54dd94 100644 --- a/src/config.in +++ b/src/config.in @@ -183,8 +183,11 @@ and this notice must be preserved on all copies. */ /* joe@zircon.uucp says that in order to use XFree386, you have to link against -lXbsd, which insists on defining the random - function. */ -#ifdef HAVE_XFREE386 + function. + faith@cs.unc.edu says this is bogus for Linux and several other OS's. + Eventually, we should have autoconf test for this. Anyone want to + submit a patch? */ +#if defined (HAVE_XFREE386) && !defined (LINUX) #define LIBX11_SYSTEM -lXbsd #define HAVE_RANDOM #endif diff --git a/src/mem-limits.h b/src/mem-limits.h index 06c8e1f5dd0..e2df73ee8d0 100644 --- a/src/mem-limits.h +++ b/src/mem-limits.h @@ -77,13 +77,20 @@ static void get_lim_data () { extern long ulimit (); - -#ifdef ULIMIT_BREAK_VALUE - lim_data = ULIMIT_BREAK_VALUE; -#else + + lim_data = -1; + + /* Use the ulimit call, if we seem to have it. */ +#if !defined (ULIMIT_BREAK_VALUE) || defined (LINUX) lim_data = ulimit (3, 0); #endif + /* If that didn't work, just use the macro's value. */ +#ifdef ULIMIT_BREAK_VALUE + if (lim_data == -1) + lim_data = ULIMIT_BREAK_VALUE; +#endif + lim_data -= (long) data_space_start; } diff --git a/src/process.c b/src/process.c index 84a4dbd0c7e..2b2fc8304dc 100644 --- a/src/process.c +++ b/src/process.c @@ -110,7 +110,7 @@ static Lisp_Object stream_process; #ifndef VMS #ifndef WAITTYPE -#if !defined (BSD) && !defined (UNIPLUS) && !defined (STRIDE) && !(defined (HPUX) && !defined (NOMULTIPLEJOBS)) && !defined (HAVE_WAIT_HEADER) +#if (!defined (BSD) && !defined (UNIPLUS) && !defined (STRIDE) && !(defined (HPUX) && !defined (NOMULTIPLEJOBS)) && !defined (HAVE_WAIT_HEADER)) || defined (LINUX) #define WAITTYPE int #define WIFSTOPPED(w) ((w&0377) == 0177) #define WIFSIGNALED(w) ((w&0377) != 0177 && (w&~0377) == 0) diff --git a/src/s/template.h b/src/s/template.h index b7abe09e449..6460deab05b 100644 --- a/src/s/template.h +++ b/src/s/template.h @@ -79,16 +79,16 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * Define HAVE_TERMIOS if the system provides POSIX-style * functions and macros for terminal control. + * + * Define HAVE_TERMIO if the system provides sysV-style ioctls + * for terminal control. + * + * Do not define both. HAVE_TERMIOS is prefered, if it is + * supported on your system. */ #define HAVE_TERMIOS - -/* - * Define HAVE_TERMIO if the system provides sysV-style ioctls - * for terminal control. - */ - -#define HAVE_TERMIO +/* #define HAVE_TERMIO */ /* * Define HAVE_TIMEVAL if the system supports the BSD style clock values. diff --git a/src/systty.h b/src/systty.h index a7c682cf7c1..897a3c28e93 100644 --- a/src/systty.h +++ b/src/systty.h @@ -218,7 +218,7 @@ static struct sensemode { #ifdef HAVE_TERMIOS #define EMACS_GET_TTY_PGRP(fd, pgid) (*(pgid) = tcgetpgrp ((fd))) -#define EMACS_SET_TTY_PGRP(fd, pgid) (*(pgid) = tcsetpgrp ((fd), *(pgid))) +#define EMACS_SET_TTY_PGRP(fd, pgid) (tcsetpgrp ((fd), *(pgid))) #else #ifdef TIOCSPGRP diff --git a/src/unexec.c b/src/unexec.c index 2fb289d8fba..e8906fe68ad 100644 --- a/src/unexec.c +++ b/src/unexec.c @@ -235,7 +235,7 @@ static EXEC_HDR_TYPE hdr, ohdr; #else /* not HPUX */ -#if defined (USG) && !defined (IBMAIX) && !defined (IRIS) && !defined (COFF_ENCAPSULATE) +#if defined (USG) && !defined (IBMAIX) && !defined (IRIS) && !defined (COFF_ENCAPSULATE) && !defined (LINUX) static struct bhdr hdr, ohdr; #define a_magic fmagic #define a_text tsize