Mercurial > hg > xemacs-beta
comparison src/sysdep.c @ 251:677f6a0ee643 r20-5b24
Import from CVS: tag r20-5b24
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:19:59 +0200 |
parents | 41f2f0e326e9 |
children | 084402c475ba |
comparison
equal
deleted
inserted
replaced
250:f385a461c9aa | 251:677f6a0ee643 |
---|---|
883 | 883 |
884 /* ------------------------------------------------------ */ | 884 /* ------------------------------------------------------ */ |
885 /* SIGIO control */ | 885 /* SIGIO control */ |
886 /* ------------------------------------------------------ */ | 886 /* ------------------------------------------------------ */ |
887 | 887 |
888 #ifdef SIGIO | 888 #if defined(SIGIO) && !defined(BROKEN_SIGIO) |
889 | 889 |
890 static void | 890 static void |
891 init_sigio_on_device (struct device *d) | 891 init_sigio_on_device (struct device *d) |
892 { | 892 { |
893 int filedesc = DEVICE_INFD (d); | 893 int filedesc = DEVICE_INFD (d); |
1657 { | 1657 { |
1658 #ifdef HAVE_TTY | 1658 #ifdef HAVE_TTY |
1659 if (DEVICE_TTY_P (d)) | 1659 if (DEVICE_TTY_P (d)) |
1660 tty_init_sys_modes_on_device (d); | 1660 tty_init_sys_modes_on_device (d); |
1661 #endif | 1661 #endif |
1662 #ifdef SIGIO | 1662 #if defined(SIGIO) && !defined(BROKEN_SIGIO) |
1663 if (!DEVICE_STREAM_P (d)) | 1663 if (!DEVICE_STREAM_P (d)) |
1664 { | 1664 { |
1665 init_sigio_on_device (d); | 1665 init_sigio_on_device (d); |
1666 request_sigio_on_device (d); | 1666 request_sigio_on_device (d); |
1667 } | 1667 } |
1868 tty_reset_sys_modes_on_device (d); | 1868 tty_reset_sys_modes_on_device (d); |
1869 else | 1869 else |
1870 #endif | 1870 #endif |
1871 if (DEVICE_STREAM_P (d)) | 1871 if (DEVICE_STREAM_P (d)) |
1872 fflush (CONSOLE_STREAM_DATA (XCONSOLE (DEVICE_CONSOLE (d)))->outfd); | 1872 fflush (CONSOLE_STREAM_DATA (XCONSOLE (DEVICE_CONSOLE (d)))->outfd); |
1873 #ifdef SIGIO | 1873 #if defined(SIGIO) && !defined(BROKEN_SIGIO) |
1874 if (!DEVICE_STREAM_P (d)) | 1874 if (!DEVICE_STREAM_P (d)) |
1875 { | 1875 { |
1876 unrequest_sigio_on_device (d); | 1876 unrequest_sigio_on_device (d); |
1877 reset_sigio_on_device (d); | 1877 reset_sigio_on_device (d); |
1878 } | 1878 } |
2117 * data_start isn't defined. We take the address of environ, which | 2117 * data_start isn't defined. We take the address of environ, which |
2118 * is known to live at or near the start of the system crt0.c, and | 2118 * is known to live at or near the start of the system crt0.c, and |
2119 * we don't sweat the handful of bytes that might lose. | 2119 * we don't sweat the handful of bytes that might lose. |
2120 */ | 2120 */ |
2121 extern char **environ; | 2121 extern char **environ; |
2122 | 2122 #ifdef HEAP_IN_DATA |
2123 extern char* static_heap_base; | |
2124 if (!initialized) | |
2125 return static_heap_base; | |
2126 #endif | |
2123 return((char *) &environ); | 2127 return((char *) &environ); |
2124 #else | 2128 #else |
2125 extern int data_start; | 2129 extern int data_start; |
2126 return ((char *) &data_start); | 2130 return ((char *) &data_start); |
2127 #endif /* ORDINARY_LINK */ | 2131 #endif /* ORDINARY_LINK */ |
2206 break; | 2210 break; |
2207 | 2211 |
2208 hostname_size <<= 1; | 2212 hostname_size <<= 1; |
2209 hostname = (char *) alloca (hostname_size); | 2213 hostname = (char *) alloca (hostname_size); |
2210 } | 2214 } |
2211 # if defined( HAVE_SOCKETS) && !defined(__CYGWIN32__) | 2215 # if defined( HAVE_SOCKETS) && !defined(BROKEN_CYGWIN) |
2212 /* Turn the hostname into the official, fully-qualified hostname. | 2216 /* Turn the hostname into the official, fully-qualified hostname. |
2213 Don't do this if we're going to dump; this can confuse system | 2217 Don't do this if we're going to dump; this can confuse system |
2214 libraries on some machines and make the dumped emacs core dump. */ | 2218 libraries on some machines and make the dumped emacs core dump. */ |
2215 # ifndef CANNOT_DUMP | 2219 # ifndef CANNOT_DUMP |
2216 if (initialized) | 2220 if (initialized) |