1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-09 15:50:21 +00:00
Commit Graph

43 Commits

Author SHA1 Message Date
Geoff Voelker
9d3355d178 (is_unc_volume, open_unc_volume, read_unc_volume,
close_unc_volume, unc_volume_file_attributes): New functions.
(wnet_enum_handle): New variable.
(opendir, readdir, closedir, sys_access, stat): Handle UNC volumes.
1998-06-17 04:22:58 +00:00
Richard M. Stallman
f313ee82af (sys_rename): On some network drives, rename fails with
EACCES instead of EEXIST if target already exists.
1998-06-16 04:33:08 +00:00
Richard M. Stallman
58f0cb7e31 (sys_rename): Don't examine errno if rename didn't fail. 1998-06-10 21:00:39 +00:00
Karl Heuer
b3308d2eb9 #include sys/file.h
(sys_access): Provide our own implementation which recognizes D_OK.
(is_exec): New function.
(stat): Use it.
(init_environment): Set TMPDIR to an existing directory.
Abort if none of the usual places is available.
(sys_rename): On Windows 95, choose a temp name that
includes the original file's base name and use an explicit loop
rather than calling mktemp.  Only attempt to unlink the newname if
the rename fails, rather than second-guessing whether the old and
new names refer to the same file.
1998-06-05 16:08:32 +00:00
Geoff Voelker
eb9ea53f9c (sys_rename): Handle filenames with accented characters.
(stat): Handle "c:/.." and "/.." specially.
1998-05-30 23:41:57 +00:00
Richard M. Stallman
bb1584c878 (stat, get_long_basename): Fail if filename contains any
characters that are illegal in file names.
1998-05-12 21:33:44 +00:00
Geoff Voelker
caf1a17212 (sys_socket): Make sockets non-inheritable. 1998-04-24 04:35:05 +00:00
Geoff Voelker
16bb7578f2 (fstat, utime): New functions; these are provided in
conjunction with stat to make handling of file timestamps
consistent.
(convert_from_time_t): Fix calculation of low-order bits.
(sys_unlink): Allow read-only files to be unlinked as on Unix.
1998-04-23 23:41:12 +00:00
Geoff Voelker
f52eb3efc4 (sys_read): Clear carriage return flag.
Report normal EOF when read fails if nothing in buffer.
Only read more if more remaining.
(check_windows_init_file): New function.
(term_ntproc): Invoke check_windows_init_file.
1998-04-17 05:07:15 +00:00
Eli Zaretskii
7664e30672 (sys_pipe): Use binary pipe I/O unconditionally. 1998-04-15 14:40:43 +00:00
Karl Heuer
03887dd388 (min, max): Define as macros. 1998-04-09 18:12:46 +00:00
Karl Heuer
c66245847e (unrequest_sigio, request_sigio): Fix prototype. 1998-04-09 17:06:31 +00:00
Geoff Voelker
76b3903d85 Include stddef.h.
(getwd): Delete macro.
(startup_dir): New variable.
(getwd): Return directory in which Emacs started.
(init_user_info): Set SHELL environment variable if not set.
(parse_root, get_long_basename, w32_get_long_filename): New functions.
(init_environment): Look for CMDPROXY.
Make sure that PATH and COMSPEC are capitalized in the environment.
Record startup directory.
(get_emacs_configuration, sys_rename): Use OS_WIN95.
(map_w32_filename): Calculate returned string correctly.

(sys_fopen): Use _fdopen.
(sys_link): Support NTFS links.
(sys_rename): Use a long file name for temporary name.
(sys_pipe): Make pipes binary and non-inheritable.
(sys_read, sys_write): Spoof text mode translation for pipes
and sockets.

(hashval): Simplify.
(generate_inode_val): Use long file name version of file.

(stat): Optimize by using active readdir info.
Set fake_inode to 0 for directories.
Set fake_inode to xor of file indexes for files.
Don't use generate_inode_val to set inode value.

(volume_info_data): Renamed from volume_info.
(volume_info, fixed_drives, volume_cache): New variables.
(DRIVE_INDEX, VOLINFO_STILL_VALID): New macros.
(lookup_volume_info, add_volume_info, GetCachedVolumeInformation):
New functions.
(get_volume_info): Use volume_info_data.
Use GetCachedVolumeInformation.

(init_ntproc): No longer restrict to one DOS subprocess.
Use CRT _open and _fdopen.
Cache fixed drive information.
1997-09-03 00:43:20 +00:00
Geoff Voelker
380961a672 (sys_shutdown): New function. 1997-07-10 20:10:09 +00:00
Geoff Voelker
75b08edbf5 Rebuild Vsystem_configuration at startup. 1997-01-20 01:52:48 +00:00
Geoff Voelker
e9e23e2348 Change all uses of win95, winnt, and win32
into Windows 95, Windows NT, and W32, respectively.
Expand "win" substring in variables referring to Microsoft Windows
constructs into "windows".
Canonicalize header comments to use same terminology.
1997-01-20 00:38:22 +00:00
Richard M. Stallman
1f8bd7fb36 (get_emacs_configuration): Return windows95 instead of win95. 1997-01-15 20:19:54 +00:00
Geoff Voelker
489f937121 Use new names for w32 files 1996-11-19 07:04:49 +00:00
Geoff Voelker
fbd6baedb5 Change identifiers of the form win32* to w32*. 1996-11-19 04:59:23 +00:00
Miles Bader
5162ffce81 (normalize_filename): Always lower-case drive letters, even on systems
that preserve case in filenames.
(sys_rename): Do not delete newname if only changing case.  On Windows
	95, use our version of mktemp (not the MSVC version) and give
	the temp name a long extension to ensure the final rename works
	as expected.
1996-07-07 01:59:24 +00:00
Richard M. Stallman
6b5edcadd1 Delete restrict_dos_process. 1996-06-12 18:19:40 +00:00
Richard M. Stallman
4ffab11c42 (restrict_dos_process): Renamed from can_run_dos_process.
(init_ntproc): Refer to restrict_dos_process.
1996-06-12 15:58:53 +00:00
Richard M. Stallman
f249a01280 (init_environment): Read PRELOAD_WINSOCK from registry if
not set in environment.

(winsock_inuse) [HAVE_SOCKETS]: New variable.
(have_winsock) [HAVE_SOCKETS]: Obsolete variable removed.

(term_winsock) [HAVE_SOCKETS]: Only unload winsock library if there
are no active sockets still open, and if the cleanup function
succeeds.  Return TRUE if winsock is unloaded.

(init_winsock) [HAVE_SOCKETS]: Load winsock if not already loaded,
and return TRUE if winsock support is available.  Unload winsock
immediately if new parameter load_now is false.  Check that
WSAStartup supports the winsock version we requested.

(set_errno, check_errno, sys_socket, sys_bind, sys_connect, sys_htons,
sys_ntohs, sys_inet_addr, sys_gethostname, sys_gethostbyname,
sys_getservbyname, sys_close, sys_read, sys_write) [HAVE_SOCKETS]:
Check winsock_lib instead of have_winsock to determine if winsock
support is available.

(sys_socket, sys_close) [HAVE_SOCKETS]: Count sockets in use.

(init_ntproc) [HAVE_SOCKETS]: Only load winsock library on startup
if PRELOAD_WINSOCK is set in environment (or registry).
1996-06-08 00:22:50 +00:00
Richard M. Stallman
9d1778b1b7 (sys_mktemp): Complete rewrite. 1996-06-07 23:07:00 +00:00
Richard M. Stallman
f16140618d (init_winsock): Dynamically link to SetHandleInformation.
(sys_socket): If possible, use SetHandleInformation to make socket
handle non-inheritable to avoid a bug in NT.
1996-06-06 17:07:00 +00:00
Richard M. Stallman
cbe39279d3 (normalize_filename): New function.
(dostounix_filename, unixtodos_filename): Use it.
(readdir): Convert upper case file names to lower case
if win32-downcase-file-names is non-nil.
1996-06-03 21:18:55 +00:00
Karl Heuer
139b57253d (get_volume_info): Always update *pPath correctly, even if
UNC header is incomplete.
1996-05-22 00:36:27 +00:00
Karl Heuer
f75543492d (_sys_read_ahead): Handle sleep here.
(sys_read): Not here.
(init_ntproc): Initialize can_run_dos_process, dos_process_running.
1996-05-17 21:45:30 +00:00
Karl Heuer
341e722e0e (sys_read): Introduce a small delay before reading from
a pipe or socket to allow more data to be buffered; otherwise,
process output is read one byte at a time on fast machines
(which is slow).
1996-05-15 14:38:30 +00:00
Richard M. Stallman
fc85cb2995 (map_win32_filename): If not a fat volume, cvt name to dos. 1996-05-11 17:26:00 +00:00
Geoff Voelker
480b0c5b52 (nt_stat, nt_ctime): Functions deleted.
Undefine macros of CRT functions.
1996-05-03 18:32:52 +00:00
Geoff Voelker
15c5ec83fd (rename): New function. 1996-03-29 04:24:58 +00:00
Geoff Voelker
00b3b7b3ae (nt_stat): Use alloca instead of xmalloc.
(get_unassigned_drive_letter, is_toplevel_share_name,
stat_toplevel_share): New functions for stat on remote shares.
(readdir): Use IS_ANY_SEP.
1996-01-21 00:31:34 +00:00
Erik Naggum
3b7ad313e0 Update FSF's address in the preamble. 1996-01-15 09:18:04 +00:00
Geoff Voelker
03e123e738 (getuid): Only return root uid if Administrator.
(geteuid): Return getuid.
1996-01-04 05:01:44 +00:00
Geoff Voelker
f332b293c5 (nt_get_resource, init_environment): Defined.
(prepare_standard_handles, restore_standard_handles) [HAVE_NTGUI]:
Don't duplicate or restore standard handles.
1995-11-07 07:36:09 +00:00
Richard M. Stallman
d1c1c3d299 Indentation change. 1995-10-08 19:38:53 +00:00
Geoff Voelker
051fe60dc4 (PASSWD_FIELD_SIZE): Defined.
(the_passwd_name, the_passwd_passwd, the_passwd_gecos,
the_passwd_dir, the_passwd_shell, getpwuid): Use PASSWD_FIELD_SIZE.
(get_emacs_configuration): Check if processor macros are defined.
1995-06-30 21:12:37 +00:00
Geoff Voelker
6816efced2 Include config.h before stdio.h. 1995-06-10 21:45:43 +00:00
Karl Heuer
7cca72e3e2 Change Vuser_real_name to Vuser_real_login_name. 1995-05-30 21:50:07 +00:00
Geoff Voelker
bd4a449f55 (configuration_buffer): Increase size.
(get_emacs_configuration) [WINDOWS95]: Use appropriate string.
(prepare_standard_handles) [WINDOWS95]: Disable subprocesses.
(reset_standard_handles): Check error number on failure.
1995-05-26 05:26:17 +00:00
Karl Heuer
35f0d4826f (nt_ctime): Defined.
(gettimeofday): Defined.
(nt_stat): Defined.
(random): Defined.
(srandom): Defined.
(readdir): Include "." and "..".
(get_inode_and_device_vals): Handle directories.
1995-04-12 02:10:10 +00:00
Richard M. Stallman
95ed00257a Initial revision 1994-11-01 10:27:02 +00:00