diff options
Diffstat (limited to 'src/w32.c')
| -rw-r--r-- | src/w32.c | 57 |
1 files changed, 16 insertions, 41 deletions
| @@ -1273,9 +1273,9 @@ init_user_info (void) | |||
| 1273 | 1273 | ||
| 1274 | /* Ensure HOME and SHELL are defined. */ | 1274 | /* Ensure HOME and SHELL are defined. */ |
| 1275 | if (getenv ("HOME") == NULL) | 1275 | if (getenv ("HOME") == NULL) |
| 1276 | abort (); | 1276 | emacs_abort (); |
| 1277 | if (getenv ("SHELL") == NULL) | 1277 | if (getenv ("SHELL") == NULL) |
| 1278 | abort (); | 1278 | emacs_abort (); |
| 1279 | 1279 | ||
| 1280 | /* Set dir and shell from environment variables. */ | 1280 | /* Set dir and shell from environment variables. */ |
| 1281 | strcpy (dflt_passwd.pw_dir, getenv ("HOME")); | 1281 | strcpy (dflt_passwd.pw_dir, getenv ("HOME")); |
| @@ -1530,34 +1530,10 @@ is_unc_volume (const char *filename) | |||
| 1530 | } | 1530 | } |
| 1531 | 1531 | ||
| 1532 | /* Routines that are no-ops on NT but are defined to get Emacs to compile. */ | 1532 | /* Routines that are no-ops on NT but are defined to get Emacs to compile. */ |
| 1533 | |||
| 1534 | int | ||
| 1535 | sigsetmask (int signal_mask) | ||
| 1536 | { | ||
| 1537 | return 0; | ||
| 1538 | } | ||
| 1539 | |||
| 1540 | int | ||
| 1541 | sigmask (int sig) | ||
| 1542 | { | ||
| 1543 | return 0; | ||
| 1544 | } | ||
| 1545 | |||
| 1546 | int | ||
| 1547 | sigblock (int sig) | ||
| 1548 | { | ||
| 1549 | return 0; | ||
| 1550 | } | ||
| 1551 | |||
| 1552 | int | ||
| 1553 | sigunblock (int sig) | ||
| 1554 | { | ||
| 1555 | return 0; | ||
| 1556 | } | ||
| 1557 | |||
| 1558 | int | 1533 | int |
| 1559 | sigemptyset (sigset_t *set) | 1534 | sigemptyset (sigset_t *set) |
| 1560 | { | 1535 | { |
| 1536 | *set = 0; | ||
| 1561 | return 0; | 1537 | return 0; |
| 1562 | } | 1538 | } |
| 1563 | 1539 | ||
| @@ -1788,9 +1764,9 @@ init_environment (char ** argv) | |||
| 1788 | char modname[MAX_PATH]; | 1764 | char modname[MAX_PATH]; |
| 1789 | 1765 | ||
| 1790 | if (!GetModuleFileName (NULL, modname, MAX_PATH)) | 1766 | if (!GetModuleFileName (NULL, modname, MAX_PATH)) |
| 1791 | abort (); | 1767 | emacs_abort (); |
| 1792 | if ((p = strrchr (modname, '\\')) == NULL) | 1768 | if ((p = strrchr (modname, '\\')) == NULL) |
| 1793 | abort (); | 1769 | emacs_abort (); |
| 1794 | *p = 0; | 1770 | *p = 0; |
| 1795 | 1771 | ||
| 1796 | if ((p = strrchr (modname, '\\')) && xstrcasecmp (p, "\\bin") == 0) | 1772 | if ((p = strrchr (modname, '\\')) && xstrcasecmp (p, "\\bin") == 0) |
| @@ -1902,13 +1878,13 @@ init_environment (char ** argv) | |||
| 1902 | /* FIXME: Do we need to resolve possible symlinks in startup_dir? | 1878 | /* FIXME: Do we need to resolve possible symlinks in startup_dir? |
| 1903 | Does it matter anywhere in Emacs? */ | 1879 | Does it matter anywhere in Emacs? */ |
| 1904 | if (!GetCurrentDirectory (MAXPATHLEN, startup_dir)) | 1880 | if (!GetCurrentDirectory (MAXPATHLEN, startup_dir)) |
| 1905 | abort (); | 1881 | emacs_abort (); |
| 1906 | 1882 | ||
| 1907 | { | 1883 | { |
| 1908 | static char modname[MAX_PATH]; | 1884 | static char modname[MAX_PATH]; |
| 1909 | 1885 | ||
| 1910 | if (!GetModuleFileName (NULL, modname, MAX_PATH)) | 1886 | if (!GetModuleFileName (NULL, modname, MAX_PATH)) |
| 1911 | abort (); | 1887 | emacs_abort (); |
| 1912 | argv[0] = modname; | 1888 | argv[0] = modname; |
| 1913 | } | 1889 | } |
| 1914 | 1890 | ||
| @@ -1930,7 +1906,7 @@ emacs_root_dir (void) | |||
| 1930 | 1906 | ||
| 1931 | p = getenv ("emacs_dir"); | 1907 | p = getenv ("emacs_dir"); |
| 1932 | if (p == NULL) | 1908 | if (p == NULL) |
| 1933 | abort (); | 1909 | emacs_abort (); |
| 1934 | strcpy (root_dir, p); | 1910 | strcpy (root_dir, p); |
| 1935 | root_dir[parse_root (root_dir, NULL)] = '\0'; | 1911 | root_dir[parse_root (root_dir, NULL)] = '\0'; |
| 1936 | dostounix_filename (root_dir); | 1912 | dostounix_filename (root_dir); |
| @@ -3287,7 +3263,7 @@ generate_inode_val (const char * name) | |||
| 3287 | doesn't resolve aliasing due to subst commands, or recognize hard | 3263 | doesn't resolve aliasing due to subst commands, or recognize hard |
| 3288 | links. */ | 3264 | links. */ |
| 3289 | if (!w32_get_long_filename ((char *)name, fullname, MAX_PATH)) | 3265 | if (!w32_get_long_filename ((char *)name, fullname, MAX_PATH)) |
| 3290 | abort (); | 3266 | emacs_abort (); |
| 3291 | 3267 | ||
| 3292 | parse_root (fullname, &p); | 3268 | parse_root (fullname, &p); |
| 3293 | /* Normal W32 filesystems are still case insensitive. */ | 3269 | /* Normal W32 filesystems are still case insensitive. */ |
| @@ -5587,7 +5563,7 @@ socket_to_fd (SOCKET s) | |||
| 5587 | if (fd_info[ fd ].cp != NULL) | 5563 | if (fd_info[ fd ].cp != NULL) |
| 5588 | { | 5564 | { |
| 5589 | DebPrint (("sys_socket: fd_info[%d] apparently in use!\n", fd)); | 5565 | DebPrint (("sys_socket: fd_info[%d] apparently in use!\n", fd)); |
| 5590 | abort (); | 5566 | emacs_abort (); |
| 5591 | } | 5567 | } |
| 5592 | 5568 | ||
| 5593 | fd_info[ fd ].cp = cp; | 5569 | fd_info[ fd ].cp = cp; |
| @@ -5966,7 +5942,7 @@ sys_close (int fd) | |||
| 5966 | { | 5942 | { |
| 5967 | if (fd_info[fd].flags & FILE_SOCKET) | 5943 | if (fd_info[fd].flags & FILE_SOCKET) |
| 5968 | { | 5944 | { |
| 5969 | if (winsock_lib == NULL) abort (); | 5945 | if (winsock_lib == NULL) emacs_abort (); |
| 5970 | 5946 | ||
| 5971 | pfn_shutdown (SOCK_HANDLE (fd), 2); | 5947 | pfn_shutdown (SOCK_HANDLE (fd), 2); |
| 5972 | rc = pfn_closesocket (SOCK_HANDLE (fd)); | 5948 | rc = pfn_closesocket (SOCK_HANDLE (fd)); |
| @@ -6084,7 +6060,7 @@ _sys_read_ahead (int fd) | |||
| 6084 | || (fd_info[fd].flags & FILE_READ) == 0) | 6060 | || (fd_info[fd].flags & FILE_READ) == 0) |
| 6085 | { | 6061 | { |
| 6086 | DebPrint (("_sys_read_ahead: internal error: fd %d is not a pipe, serial port, or socket!\n", fd)); | 6062 | DebPrint (("_sys_read_ahead: internal error: fd %d is not a pipe, serial port, or socket!\n", fd)); |
| 6087 | abort (); | 6063 | emacs_abort (); |
| 6088 | } | 6064 | } |
| 6089 | 6065 | ||
| 6090 | cp->status = STATUS_READ_IN_PROGRESS; | 6066 | cp->status = STATUS_READ_IN_PROGRESS; |
| @@ -6220,7 +6196,7 @@ sys_read (int fd, char * buffer, unsigned int count) | |||
| 6220 | /* re-read CR carried over from last read */ | 6196 | /* re-read CR carried over from last read */ |
| 6221 | if (fd_info[fd].flags & FILE_LAST_CR) | 6197 | if (fd_info[fd].flags & FILE_LAST_CR) |
| 6222 | { | 6198 | { |
| 6223 | if (fd_info[fd].flags & FILE_BINARY) abort (); | 6199 | if (fd_info[fd].flags & FILE_BINARY) emacs_abort (); |
| 6224 | *buffer++ = 0x0d; | 6200 | *buffer++ = 0x0d; |
| 6225 | count--; | 6201 | count--; |
| 6226 | nchars++; | 6202 | nchars++; |
| @@ -6323,7 +6299,7 @@ sys_read (int fd, char * buffer, unsigned int count) | |||
| 6323 | } | 6299 | } |
| 6324 | else /* FILE_SOCKET */ | 6300 | else /* FILE_SOCKET */ |
| 6325 | { | 6301 | { |
| 6326 | if (winsock_lib == NULL) abort (); | 6302 | if (winsock_lib == NULL) emacs_abort (); |
| 6327 | 6303 | ||
| 6328 | /* do the equivalent of a non-blocking read */ | 6304 | /* do the equivalent of a non-blocking read */ |
| 6329 | pfn_ioctlsocket (SOCK_HANDLE (fd), FIONREAD, &waiting); | 6305 | pfn_ioctlsocket (SOCK_HANDLE (fd), FIONREAD, &waiting); |
| @@ -6474,7 +6450,7 @@ sys_write (int fd, const void * buffer, unsigned int count) | |||
| 6474 | else if (fd < MAXDESC && fd_info[fd].flags & FILE_SOCKET) | 6450 | else if (fd < MAXDESC && fd_info[fd].flags & FILE_SOCKET) |
| 6475 | { | 6451 | { |
| 6476 | unsigned long nblock = 0; | 6452 | unsigned long nblock = 0; |
| 6477 | if (winsock_lib == NULL) abort (); | 6453 | if (winsock_lib == NULL) emacs_abort (); |
| 6478 | 6454 | ||
| 6479 | /* TODO: implement select() properly so non-blocking I/O works. */ | 6455 | /* TODO: implement select() properly so non-blocking I/O works. */ |
| 6480 | /* For now, make sure the write blocks. */ | 6456 | /* For now, make sure the write blocks. */ |
| @@ -6640,8 +6616,7 @@ check_windows_init_file (void) | |||
| 6640 | buffer, | 6616 | buffer, |
| 6641 | "Emacs Abort Dialog", | 6617 | "Emacs Abort Dialog", |
| 6642 | MB_OK | MB_ICONEXCLAMATION | MB_TASKMODAL); | 6618 | MB_OK | MB_ICONEXCLAMATION | MB_TASKMODAL); |
| 6643 | /* Use the low-level Emacs abort. */ | 6619 | /* Use the low-level system abort. */ |
| 6644 | #undef abort | ||
| 6645 | abort (); | 6620 | abort (); |
| 6646 | } | 6621 | } |
| 6647 | else | 6622 | else |