diff options
| author | Dan Nicolaescu | 2008-07-16 07:45:52 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2008-07-16 07:45:52 +0000 |
| commit | c7607b94f52c04bcc4e1e8b00ce954c9e34c3e19 (patch) | |
| tree | 8d84d5379ef49e50fa966cb3fc06f2c974b1bdb5 /src/sysdep.c | |
| parent | 2c369af74f77c013250f3f7ba2cca52abb941e39 (diff) | |
| download | emacs-c7607b94f52c04bcc4e1e8b00ce954c9e34c3e19.tar.gz emacs-c7607b94f52c04bcc4e1e8b00ce954c9e34c3e19.zip | |
* sysdep.c: Remove code depending on NEED_PTEM_H, unused. Remove
if 0-ed code.
(baud_convert): Don't depend on BAUD_CONVERT, all definitions the
were the same as the default.
* s/vms.h (BAUD_CONVERT): Remove, same as the default.
Remove boilerplate comments.
* s/hpux10-20.h (BAUD_CONVERT): Remove, same as the default.
(HAVE_SYSVIPC): Remove, unused.
(LD_SWITCH_SYSTEM_TEMACS): Simplify, hp9000s700 not supported anymore.
Diffstat (limited to 'src/sysdep.c')
| -rw-r--r-- | src/sysdep.c | 131 |
1 files changed, 0 insertions, 131 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index ef56346a313..1721172e0d6 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -31,13 +31,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 31 | #include "lisp.h" | 31 | #include "lisp.h" |
| 32 | /* Including stdlib.h isn't necessarily enough to get srandom | 32 | /* Including stdlib.h isn't necessarily enough to get srandom |
| 33 | declared, e.g. without __USE_XOPEN_EXTENDED with glibc 2. */ | 33 | declared, e.g. without __USE_XOPEN_EXTENDED with glibc 2. */ |
| 34 | #ifdef HAVE_RANDOM | ||
| 35 | #if 0 /* Don't prototype srandom; it takes an unsigned argument on | ||
| 36 | some systems, and an unsigned long on others, like FreeBSD | ||
| 37 | 4.1. */ | ||
| 38 | extern void srandom P_ ((unsigned int)); | ||
| 39 | #endif | ||
| 40 | #endif | ||
| 41 | 34 | ||
| 42 | /* The w32 build defines select stuff in w32.h, which is included by | 35 | /* The w32 build defines select stuff in w32.h, which is included by |
| 43 | sys/select.h (included below). */ | 36 | sys/select.h (included below). */ |
| @@ -138,12 +131,6 @@ extern int errno; | |||
| 138 | #if defined (USG) | 131 | #if defined (USG) |
| 139 | #include <sys/utsname.h> | 132 | #include <sys/utsname.h> |
| 140 | #include <memory.h> | 133 | #include <memory.h> |
| 141 | #if defined (TIOCGWINSZ) | ||
| 142 | #ifdef NEED_PTEM_H | ||
| 143 | #include <sys/stream.h> | ||
| 144 | #include <sys/ptem.h> | ||
| 145 | #endif | ||
| 146 | #endif /* TIOCGWINSZ */ | ||
| 147 | #endif /* USG */ | 134 | #endif /* USG */ |
| 148 | 135 | ||
| 149 | extern int quit_char; | 136 | extern int quit_char; |
| @@ -199,14 +186,10 @@ struct utimbuf { | |||
| 199 | #endif | 186 | #endif |
| 200 | 187 | ||
| 201 | static int baud_convert[] = | 188 | static int baud_convert[] = |
| 202 | #ifdef BAUD_CONVERT | ||
| 203 | BAUD_CONVERT; | ||
| 204 | #else | ||
| 205 | { | 189 | { |
| 206 | 0, 50, 75, 110, 135, 150, 200, 300, 600, 1200, | 190 | 0, 50, 75, 110, 135, 150, 200, 300, 600, 1200, |
| 207 | 1800, 2400, 4800, 9600, 19200, 38400 | 191 | 1800, 2400, 4800, 9600, 19200, 38400 |
| 208 | }; | 192 | }; |
| 209 | #endif | ||
| 210 | 193 | ||
| 211 | #ifdef HAVE_SPEED_T | 194 | #ifdef HAVE_SPEED_T |
| 212 | #include <termios.h> | 195 | #include <termios.h> |
| @@ -593,13 +576,6 @@ child_setup_tty (out) | |||
| 593 | #endif | 576 | #endif |
| 594 | s.main.c_lflag &= ~ECHO; /* Disable echo */ | 577 | s.main.c_lflag &= ~ECHO; /* Disable echo */ |
| 595 | s.main.c_lflag |= ISIG; /* Enable signals */ | 578 | s.main.c_lflag |= ISIG; /* Enable signals */ |
| 596 | #if 0 /* This causes bugs in (for instance) telnet to certain sites. */ | ||
| 597 | s.main.c_iflag &= ~ICRNL; /* Disable map of CR to NL on input */ | ||
| 598 | #ifdef INLCR /* Just being cautious, since I can't check how | ||
| 599 | widespread INLCR is--rms. */ | ||
| 600 | s.main.c_iflag &= ~INLCR; /* Disable map of NL to CR on input */ | ||
| 601 | #endif | ||
| 602 | #endif | ||
| 603 | #ifdef IUCLC | 579 | #ifdef IUCLC |
| 604 | s.main.c_iflag &= ~IUCLC; /* Disable downcasing on input. */ | 580 | s.main.c_iflag &= ~IUCLC; /* Disable downcasing on input. */ |
| 605 | #endif | 581 | #endif |
| @@ -611,12 +587,6 @@ child_setup_tty (out) | |||
| 611 | #endif | 587 | #endif |
| 612 | s.main.c_oflag &= ~TAB3; /* Disable tab expansion */ | 588 | s.main.c_oflag &= ~TAB3; /* Disable tab expansion */ |
| 613 | s.main.c_cflag = (s.main.c_cflag & ~CSIZE) | CS8; /* Don't strip 8th bit */ | 589 | s.main.c_cflag = (s.main.c_cflag & ~CSIZE) | CS8; /* Don't strip 8th bit */ |
| 614 | #if 0 | ||
| 615 | /* Said to be unnecessary: */ | ||
| 616 | s.main.c_cc[VMIN] = 1; /* minimum number of characters to accept */ | ||
| 617 | s.main.c_cc[VTIME] = 0; /* wait forever for at least 1 character */ | ||
| 618 | #endif | ||
| 619 | |||
| 620 | s.main.c_lflag |= ICANON; /* Enable erase/kill and eof processing */ | 590 | s.main.c_lflag |= ICANON; /* Enable erase/kill and eof processing */ |
| 621 | s.main.c_cc[VEOF] = 04; /* insure that EOF is Control-D */ | 591 | s.main.c_cc[VEOF] = 04; /* insure that EOF is Control-D */ |
| 622 | s.main.c_cc[VERASE] = CDISABLE; /* disable erase processing */ | 592 | s.main.c_cc[VERASE] = CDISABLE; /* disable erase processing */ |
| @@ -862,10 +832,6 @@ sys_subshell () | |||
| 862 | if (epwd) | 832 | if (epwd) |
| 863 | putenv (old_pwd); /* restore previous value */ | 833 | putenv (old_pwd); /* restore previous value */ |
| 864 | } | 834 | } |
| 865 | #if 0 /* This is also reported if last command executed in subshell failed, KFS */ | ||
| 866 | if (st) | ||
| 867 | report_file_error ("Can't execute subshell", Fcons (build_string (sh), Qnil)); | ||
| 868 | #endif | ||
| 869 | #else /* not MSDOS */ | 835 | #else /* not MSDOS */ |
| 870 | #ifdef WINDOWSNT | 836 | #ifdef WINDOWSNT |
| 871 | /* Waits for process completion */ | 837 | /* Waits for process completion */ |
| @@ -1279,13 +1245,6 @@ init_sys_modes (tty_out) | |||
| 1279 | { | 1245 | { |
| 1280 | struct emacs_tty tty; | 1246 | struct emacs_tty tty; |
| 1281 | 1247 | ||
| 1282 | #ifdef VMS | ||
| 1283 | #if 0 | ||
| 1284 | static int oob_chars[2] = {0, 1 << 7}; /* catch C-g's */ | ||
| 1285 | extern int (*interrupt_signal) (); | ||
| 1286 | #endif | ||
| 1287 | #endif | ||
| 1288 | |||
| 1289 | Vtty_erase_char = Qnil; | 1248 | Vtty_erase_char = Qnil; |
| 1290 | 1249 | ||
| 1291 | if (noninteractive) | 1250 | if (noninteractive) |
| @@ -1304,21 +1263,8 @@ init_sys_modes (tty_out) | |||
| 1304 | timer_ef = get_timer_event_flag (); | 1263 | timer_ef = get_timer_event_flag (); |
| 1305 | /* LIB$GET_EF (&timer_ef); */ | 1264 | /* LIB$GET_EF (&timer_ef); */ |
| 1306 | SYS$CLREF (timer_ef); | 1265 | SYS$CLREF (timer_ef); |
| 1307 | #if 0 | ||
| 1308 | if (!process_ef) | ||
| 1309 | { | ||
| 1310 | LIB$GET_EF (&process_ef); | ||
| 1311 | SYS$CLREF (process_ef); | ||
| 1312 | } | ||
| 1313 | if (input_ef / 32 != process_ef / 32) | ||
| 1314 | croak ("Input and process event flags in different clusters."); | ||
| 1315 | #endif | ||
| 1316 | if (input_ef / 32 != timer_ef / 32) | 1266 | if (input_ef / 32 != timer_ef / 32) |
| 1317 | croak ("Input and timer event flags in different clusters."); | 1267 | croak ("Input and timer event flags in different clusters."); |
| 1318 | #if 0 | ||
| 1319 | input_eflist = ((unsigned) 1 << (input_ef % 32)) | | ||
| 1320 | ((unsigned) 1 << (process_ef % 32)); | ||
| 1321 | #endif | ||
| 1322 | timer_eflist = ((unsigned) 1 << (input_ef % 32)) | | 1268 | timer_eflist = ((unsigned) 1 << (input_ef % 32)) | |
| 1323 | ((unsigned) 1 << (timer_ef % 32)); | 1269 | ((unsigned) 1 << (timer_ef % 32)); |
| 1324 | #ifndef VMS4_4 | 1270 | #ifndef VMS4_4 |
| @@ -2341,9 +2287,6 @@ init_system_name () | |||
| 2341 | if (hp) | 2287 | if (hp) |
| 2342 | { | 2288 | { |
| 2343 | char *fqdn = (char *) hp->h_name; | 2289 | char *fqdn = (char *) hp->h_name; |
| 2344 | #if 0 | ||
| 2345 | char *p; | ||
| 2346 | #endif | ||
| 2347 | 2290 | ||
| 2348 | if (!index (fqdn, '.')) | 2291 | if (!index (fqdn, '.')) |
| 2349 | { | 2292 | { |
| @@ -2358,62 +2301,10 @@ init_system_name () | |||
| 2358 | fqdn = *alias; | 2301 | fqdn = *alias; |
| 2359 | } | 2302 | } |
| 2360 | hostname = fqdn; | 2303 | hostname = fqdn; |
| 2361 | #if 0 | ||
| 2362 | /* Convert the host name to lower case. */ | ||
| 2363 | /* Using ctype.h here would introduce a possible locale | ||
| 2364 | dependence that is probably wrong for hostnames. */ | ||
| 2365 | p = hostname; | ||
| 2366 | while (*p) | ||
| 2367 | { | ||
| 2368 | if (*p >= 'A' && *p <= 'Z') | ||
| 2369 | *p += 'a' - 'A'; | ||
| 2370 | p++; | ||
| 2371 | } | ||
| 2372 | #endif | ||
| 2373 | } | 2304 | } |
| 2374 | #endif /* !HAVE_GETADDRINFO */ | 2305 | #endif /* !HAVE_GETADDRINFO */ |
| 2375 | } | 2306 | } |
| 2376 | #endif /* HAVE_SOCKETS */ | 2307 | #endif /* HAVE_SOCKETS */ |
| 2377 | /* We used to try using getdomainname here, | ||
| 2378 | but NIIBE Yutaka <gniibe@etl.go.jp> says that | ||
| 2379 | getdomainname gets the NIS/YP domain which often is not the same | ||
| 2380 | as in Internet domain name. */ | ||
| 2381 | #if 0 /* Turned off because sysinfo is not really likely to return the | ||
| 2382 | correct Internet domain. */ | ||
| 2383 | #if (HAVE_SYSINFO && defined (SI_SRPC_DOMAIN)) | ||
| 2384 | if (! index (hostname, '.')) | ||
| 2385 | { | ||
| 2386 | /* The hostname is not fully qualified. Append the domain name. */ | ||
| 2387 | |||
| 2388 | int hostlen = strlen (hostname); | ||
| 2389 | int domain_size = 256; | ||
| 2390 | |||
| 2391 | for (;;) | ||
| 2392 | { | ||
| 2393 | char *domain = (char *) alloca (domain_size + 1); | ||
| 2394 | char *fqdn = (char *) alloca (hostlen + 1 + domain_size + 1); | ||
| 2395 | int sys_domain_size = sysinfo (SI_SRPC_DOMAIN, domain, domain_size); | ||
| 2396 | if (sys_domain_size <= 0) | ||
| 2397 | break; | ||
| 2398 | if (domain_size < sys_domain_size) | ||
| 2399 | { | ||
| 2400 | domain_size = sys_domain_size; | ||
| 2401 | continue; | ||
| 2402 | } | ||
| 2403 | strcpy (fqdn, hostname); | ||
| 2404 | if (domain[0] == '.') | ||
| 2405 | strcpy (fqdn + hostlen, domain); | ||
| 2406 | else if (domain[0] != 0) | ||
| 2407 | { | ||
| 2408 | fqdn[hostlen] = '.'; | ||
| 2409 | strcpy (fqdn + hostlen + 1, domain); | ||
| 2410 | } | ||
| 2411 | hostname = fqdn; | ||
| 2412 | break; | ||
| 2413 | } | ||
| 2414 | } | ||
| 2415 | #endif /* HAVE_SYSINFO && defined (SI_SRPC_DOMAIN) */ | ||
| 2416 | #endif /* 0 */ | ||
| 2417 | Vsystem_name = build_string (hostname); | 2308 | Vsystem_name = build_string (hostname); |
| 2418 | #endif /* HAVE_GETHOSTNAME */ | 2309 | #endif /* HAVE_GETHOSTNAME */ |
| 2419 | #endif /* VMS */ | 2310 | #endif /* VMS */ |
| @@ -4112,28 +4003,6 @@ sys_read (fildes, buf, nbyte) | |||
| 4112 | return read (fildes, buf, (nbyte < MAXIOSIZE ? nbyte : MAXIOSIZE)); | 4003 | return read (fildes, buf, (nbyte < MAXIOSIZE ? nbyte : MAXIOSIZE)); |
| 4113 | } | 4004 | } |
| 4114 | 4005 | ||
| 4115 | #if 0 | ||
| 4116 | int | ||
| 4117 | sys_write (fildes, buf, nbyte) | ||
| 4118 | int fildes; | ||
| 4119 | char *buf; | ||
| 4120 | unsigned int nbyte; | ||
| 4121 | { | ||
| 4122 | register int nwrote, rtnval = 0; | ||
| 4123 | |||
| 4124 | while (nbyte > MAXIOSIZE && (nwrote = write (fildes, buf, MAXIOSIZE)) > 0) { | ||
| 4125 | nbyte -= nwrote; | ||
| 4126 | buf += nwrote; | ||
| 4127 | rtnval += nwrote; | ||
| 4128 | } | ||
| 4129 | if (nwrote < 0) | ||
| 4130 | return rtnval ? rtnval : -1; | ||
| 4131 | if ((nwrote = write (fildes, buf, nbyte)) < 0) | ||
| 4132 | return rtnval ? rtnval : -1; | ||
| 4133 | return (rtnval + nwrote); | ||
| 4134 | } | ||
| 4135 | #endif /* 0 */ | ||
| 4136 | |||
| 4137 | /* | 4006 | /* |
| 4138 | * VAX/VMS VAX C RTL really loses. It insists that records | 4007 | * VAX/VMS VAX C RTL really loses. It insists that records |
| 4139 | * end with a newline (carriage return) character, and if they | 4008 | * end with a newline (carriage return) character, and if they |