Index: src/winsup/cygwin/environ.cc =================================================================== RCS file: /home/max/cvsmirror/src-cvs/src/winsup/cygwin/environ.cc,v retrieving revision 1.91 diff -u -p -r1.91 environ.cc --- src/winsup/cygwin/environ.cc 13 Feb 2003 15:15:32 -0000 1.91 +++ src/winsup/cygwin/environ.cc 18 May 2003 22:34:03 -0000 @@ -37,6 +37,7 @@ extern BOOL strip_title_path; extern int pcheck_case; extern int subauth_id; BOOL reset_com = FALSE; +BOOL sparse_files = FALSE; static BOOL envcache = TRUE; static char **lastenviron; @@ -516,6 +517,7 @@ static struct parse_thing {"ntea", {&allow_ntea}, justset, NULL, {{FALSE}, {TRUE}}}, {"ntsec", {&allow_ntsec}, justset, NULL, {{FALSE}, {TRUE}}}, {"smbntsec", {&allow_smbntsec}, justset, NULL, {{FALSE}, {TRUE}}}, + {"sparse", {&sparse_files}, justset, NULL, {{FALSE}, {TRUE}}}, {"reset_com", {&reset_com}, justset, NULL, {{FALSE}, {TRUE}}}, {"strip_title", {&strip_title_path}, justset, NULL, {{FALSE}, {TRUE}}}, {"subauth_id", {func: &subauth_id_init}, isfunc, NULL, {{0}, {0}}}, Index: src/winsup/cygwin/fhandler_disk_file.cc =================================================================== RCS file: /home/max/cvsmirror/src-cvs/src/winsup/cygwin/fhandler_disk_file.cc,v retrieving revision 1.50 diff -u -p -r1.50 fhandler_disk_file.cc --- src/winsup/cygwin/fhandler_disk_file.cc 11 May 2003 21:52:09 -0000 1.50 +++ src/winsup/cygwin/fhandler_disk_file.cc 18 May 2003 22:34:57 -0000 @@ -31,6 +31,8 @@ details. */ #define _COMPILING_NEWLIB #include +extern BOOL sparse_files; + static int __stdcall num_entries (const char *win32_name) { @@ -409,7 +411,7 @@ fhandler_disk_file::open (path_conv *rea set_file_attribute (has_acls (), get_win32_name (), mode); /* Set newly created and truncated files as sparse files. */ - if ((real_path->fs_flags () & FILE_SUPPORTS_SPARSE_FILES) + if (sparse_files && (real_path->fs_flags () & FILE_SUPPORTS_SPARSE_FILES) && (get_access () & GENERIC_WRITE) == GENERIC_WRITE && (get_flags () & (O_CREAT | O_TRUNC))) {