From 7920792369b18fd7d796a61aa7f3dda98c1957c8 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 20 Feb 2003 10:14:53 +0000 Subject: w32api: * include/winioctl.h (FSCTL_SET_SPARSE): Define. cygwin: * wincap.h (wincaps::supports_sparse_files): New flag. (wincapc::supports_sparse_files): New method. * wincap.cc (wincap_unknown): Define value for the new flag. (wincap_95): Ditto. (wincap_95osr2): Ditto. (wincap_98): Ditto. (wincap_98se): Ditto. (wincap_me): Ditto. (wincap_nt3): Ditto. (wincap_nt4): Ditto. (wincap_nt4sp4): Ditto. (wincap_2000): Ditto. (wincap_xp): Ditto. * path.h (path_conv::fs_flags): New method. * fhandler_disk_file.cc: Include winioctl.h for DeviceIoControl. (fhandler_disk_file::open): Set newly created and truncated files as sparse on platforms that support it. --- winsup/cygwin/wincap.cc | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) (limited to 'winsup/cygwin/wincap.cc') diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc index e70a362da..b5671c558 100644 --- a/winsup/cygwin/wincap.cc +++ b/winsup/cygwin/wincap.cc @@ -47,7 +47,8 @@ static NO_COPY wincaps wincap_unknown = { has_64bit_file_access:false, has_process_io_counters:false, supports_reading_modem_output_lines:false, - needs_memory_protection:false + needs_memory_protection:false, + supports_sparse_files:false }; static NO_COPY wincaps wincap_95 = { @@ -86,7 +87,8 @@ static NO_COPY wincaps wincap_95 = { has_64bit_file_access:false, has_process_io_counters:false, supports_reading_modem_output_lines:false, - needs_memory_protection:false + needs_memory_protection:false, + supports_sparse_files:false }; static NO_COPY wincaps wincap_95osr2 = { @@ -125,7 +127,8 @@ static NO_COPY wincaps wincap_95osr2 = { has_64bit_file_access:false, has_process_io_counters:false, supports_reading_modem_output_lines:false, - needs_memory_protection:false + needs_memory_protection:false, + supports_sparse_files:false }; static NO_COPY wincaps wincap_98 = { @@ -164,7 +167,8 @@ static NO_COPY wincaps wincap_98 = { has_64bit_file_access:false, has_process_io_counters:false, supports_reading_modem_output_lines:false, - needs_memory_protection:false + needs_memory_protection:false, + supports_sparse_files:false }; static NO_COPY wincaps wincap_98se = { @@ -203,7 +207,8 @@ static NO_COPY wincaps wincap_98se = { has_64bit_file_access:false, has_process_io_counters:false, supports_reading_modem_output_lines:false, - needs_memory_protection:false + needs_memory_protection:false, + supports_sparse_files:false }; static NO_COPY wincaps wincap_me = { @@ -242,7 +247,8 @@ static NO_COPY wincaps wincap_me = { has_64bit_file_access:false, has_process_io_counters:false, supports_reading_modem_output_lines:false, - needs_memory_protection:false + needs_memory_protection:false, + supports_sparse_files:false }; static NO_COPY wincaps wincap_nt3 = { @@ -281,7 +287,8 @@ static NO_COPY wincaps wincap_nt3 = { has_64bit_file_access:true, has_process_io_counters:false, supports_reading_modem_output_lines:true, - needs_memory_protection:true + needs_memory_protection:true, + supports_sparse_files:false }; static NO_COPY wincaps wincap_nt4 = { @@ -320,7 +327,8 @@ static NO_COPY wincaps wincap_nt4 = { has_64bit_file_access:true, has_process_io_counters:false, supports_reading_modem_output_lines:true, - needs_memory_protection:true + needs_memory_protection:true, + supports_sparse_files:false }; static NO_COPY wincaps wincap_nt4sp4 = { @@ -359,7 +367,8 @@ static NO_COPY wincaps wincap_nt4sp4 = { has_64bit_file_access:true, has_process_io_counters:false, supports_reading_modem_output_lines:true, - needs_memory_protection:true + needs_memory_protection:true, + supports_sparse_files:false }; static NO_COPY wincaps wincap_2000 = { @@ -398,7 +407,8 @@ static NO_COPY wincaps wincap_2000 = { has_64bit_file_access:true, has_process_io_counters:true, supports_reading_modem_output_lines:true, - needs_memory_protection:true + needs_memory_protection:true, + supports_sparse_files:true }; static NO_COPY wincaps wincap_xp = { @@ -437,7 +447,8 @@ static NO_COPY wincaps wincap_xp = { has_64bit_file_access:true, has_process_io_counters:true, supports_reading_modem_output_lines:true, - needs_memory_protection:true + needs_memory_protection:true, + supports_sparse_files:true }; wincapc wincap; -- cgit v1.2.3