Mercurial > emacs
changeset 18660:42cf8e9273ee
(ospeed): Define as short, unless HAVE_TERMIOS_H and LINUX.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 07 Jul 1997 06:48:01 +0000 |
parents | b6ced5dad84b |
children | 537522d5e6d8 |
files | src/sysdep.c src/terminfo.c |
diffstat | 2 files changed, 15 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/sysdep.c Mon Jul 07 06:42:35 1997 +0000 +++ b/src/sysdep.c Mon Jul 07 06:48:01 1997 +0000 @@ -230,7 +230,9 @@ }; #endif -#ifdef HAVE_TERMIOS_H +#if defined (HAVE_TERMIOS_H) || defined (LINUX) +/* HJL's version of libc is said to need this on the Alpha. + On the other hand, DEC OSF1 on the Alpha needs ospeed to be a short. */ extern speed_t ospeed; #else extern short ospeed; @@ -2275,8 +2277,8 @@ for (;;) { - char *fqdn = (char *) alloca (hostlen + 1 + domain_size); - char *domain = fqdn + hostlen + 1; + char *domain = (char *) alloca (domain_size + 1); + char *fqdn = (char *) alloca (hostlen + 1 + domain_size + 1); #if HAVE_SYSINFO && defined (SI_SRPC_DOMAIN) int sys_domain_size = sysinfo (SI_SRPC_DOMAIN, domain, domain_size); if (sys_domain_size <= 0) @@ -2304,7 +2306,13 @@ } #endif /* HAVE_GETDOMAINNAME */ strcpy (fqdn, hostname); - fqdn[hostlen] = '.'; + if (domain[0] == '.') + strcpy (fqdn + hostlen, domain); + else + { + fqdn[hostlen] = '.'; + strcpy (fqdn + hostlen + 1, domain); + } hostname = fqdn; break; }
--- a/src/terminfo.c Mon Jul 07 06:42:35 1997 +0000 +++ b/src/terminfo.c Mon Jul 07 06:48:01 1997 +0000 @@ -26,8 +26,10 @@ char *UP, *BC, PC; -#ifdef HAVE_TERMIOS_H +#if defined (HAVE_TERMIOS_H) || defined (LINUX) #include <termios.h> +/* HJL's version of libc is said to need this on the Alpha. + On the other hand, DEC OSF1 on the Alpha needs ospeed to be a short. */ speed_t ospeed; #else short ospeed;