OSDN Git Service

3a574186b3e6a64d10e7863ec7d938179beba611
[pf3gnuchains/sourceware.git] / winsup / cygwin / ChangeLog
1 2010-08-09  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
2
3         * fhandler_proc.cc: Add /proc/filesystems virtual file.
4         (format_proc_filesystems): New function.
5         * mount.cc (fs_names): Move to global scope. Redefine as array
6         of { "name", block_device? } structs.
7         (fillout_mntent): Use name member of fs_names.
8         * mount.h (fs_names): New prototype.
9
10 2010-08-09  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
11
12         * include/dlfcn.h (RTLD_LOCAL): Define.
13
14 2010-08-06  Corinna Vinschen  <corinna@vinschen.de>
15
16         * include/sys/dirent.h (d_fileno): Define as d_ino.
17
18 2010-08-04  Corinna Vinschen  <corinna@vinschen.de>
19
20         * path.cc (cygwin_conv_path): Rearrange test for "." in POSIX to
21         relative DOS path conversion.  Simplify fixing the path.
22         In CCP_POSIX_TO_WIN_W conversion, always drop long path prefix if path
23         fits into MAX_PATH.  Explain why.
24
25 2010-08-01  Christopher Faylor  <me+cygwin@cgf.cx>
26
27         * exceptions.cc (_cygtls::interrupt_now): Revert to checking for
28         "spinning" when choosing to defer signal.
29         (_cygtls::call_signal_handler): Grab func when we have the lock.
30         * gendef: Update copyright.
31         (__sigbe): Simplify slightly.
32         (_sigdelayed): Grab a lock before manipulating stuff.
33         (_cygtls::pop): Properly return popped value.
34         (stabilize_sig_stack): Set incyg when we have the lock.
35         * sigproc.cc: Update copyright.
36
37 2010-07-28  Christopher Faylor  <me+cygwin@cgf.cx>
38
39         * cygthread.h (LPVOID_THREAD_START_ROUTINE): Define.
40         (cygthread::create): Rename from cygthread::cygthread.
41         (cygthread::cygthread): Define new constructor which accepts
42         LPVOID_THREAD_START_ROUTINE as the first argument.  Call
43         cygthread::create.
44         * cygthread.cc (cygthread::create): Rename from cygthread::cygthread.
45         Use 'arglen' rather than 'n' since 'n' is no longer supplied.
46         * fhandler_tty.cc (process_input): Define as void/noreturn.
47         (process_output): Ditto.
48         (process_ioctl): Ditto.
49         (fhandler_tty_master::init): Don't "zap_h" cygthreads which are
50         noreturn.  It's now implied.
51
52 2010-07-23  Corinna Vinschen  <corinna@vinschen.de>
53
54         * fhandler.cc (fhandler_base::raw_write): Remove STATUS_DISK_FULL
55         special handling.
56
57 2010-07-19  Eric Blake  <eblake@redhat.com>
58
59         * mktemp.cc (_gettemp): Add flags argument.  All callers updated.
60         (mkostemp, mkostemps): New functions.
61         * cygwin.din (mkostemp, mkostemps): Export.
62         * posix.sgml: Document them.
63         * include/cygwin/version.h: Bump version.
64
65 2010-07-18  Christopher Faylor  <me+cygwin@cgf.cx>
66
67         * autoload.cc (noload): Use "pushl" rather than "push".
68
69 2010-07-18  Christopher Faylor  <me+cygwin@cgf.cx>
70
71         * exceptions.cc (_cygtls::interrupt_now): Avoid nonsensical tests which
72         delay an interrupt.
73         (setup_handler): Remove unneeded DEBUGGING handling.  Ensure that stack
74         is locked when we are about to do push/pop to it.  Fix debugging output.
75
76 2010-07-18  Christopher Faylor  <me+cygwin@cgf.cx>
77
78         * gendef: Throughout, remove lock from xchgl since it is implied.
79         (__ZN7_cygtls3popEv): Avoid potential (but probably nonexistent) race
80         when clearing element after pop.
81
82 2010-07-15  Corinna Vinschen  <corinna@vinschen.de>
83
84         * wincap.cc (wincap_7): Set needs_count_in_si_lpres2 to false.
85
86 2010-07-07  Corinna Vinschen  <corinna@vinschen.de>
87
88         * syscalls.cc (unlink_nt): Disable try_to_bin for netapp drives.
89         Explain why.
90
91 2010-07-05  Corinna Vinschen  <corinna@vinschen.de>
92
93         Align seekdir and telldir API to POSIX definition.
94         * Makefile.in (NEW_FUNCTIONS): Remove seekdir and telldir mappings.
95         * dir.cc (telldir): Move functionality from telldir64 here.  Use
96         long, rather than _off_t.
97         (telldir64): Just call telldir.  Only keep for backward compatibility.
98         (seekdir): Move functionality from seekdir64 here.  Use long, rather
99         than _off_t.
100         (seekdir64): Just call seekdir.  Only keep for backward compatibility.
101         * fhandler.h: Throughout, change prototypes of seekdir and telldir
102         methods to use long, rather than _off64_t.
103         * fhandler_disk_file.cc: Change aforementioned methods accordingly.
104         * fhandler_netdrive.cc: Ditto.
105         * fhandler_registry.cc: Ditto.
106         * fhandler_virtual.cc: Ditto.
107         * include/sys/dirent.h (struct __DIR): Change __d_position from
108         _off_t to long to reflect API change.
109         (telldir): Change prototype to use long, rather than off_t.
110         (seekdir): Ditto.
111
112 2010-07-04  Christopher Faylor  <me+cygwin@cgf.cx>
113
114         * path.cc (path_conv::check): Move fs-specific settings to a point
115         where we know that we have filled out the filesystem information.
116         * path.h (path_conv::path_conv): Use consistent initialization for
117         constructors.
118
119         * include/sys/cygwin.h: Define CW_STRERROR.
120         * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 228.
121         * include/external.h: Implement CW_STRERROR.
122
123 2010-07-02  Corinna Vinschen  <corinna@vinschen.de>
124
125         * net.cc (cygwin_getsockopt): Make sure SO_PEERCRED is only handled
126         in level SOL_SOCKET.  Workaround a return value regression in Vista
127         and later.  Add comment to explain.
128
129 2010-06-29  Corinna Vinschen  <corinna@vinschen.de>
130
131         * spawn.cc (spawn_guts): Reinstantiate a FIXME comment.
132
133 2010-06-29  Corinna Vinschen  <corinna@vinschen.de>
134
135         * exceptions.cc (dump_exception): Use %W instead of %s for printing
136         progname.
137         * fork.cc (frok::parent): Fix typos in debug output.
138         * spawn.cc (spawn_guts): Copy wide Win32 filename into _pinfo::progname,
139         rather than native NT name.  Use %W instead of %S for printing progname.
140
141 2010-06-28  Christopher Faylor  <me+cygwin@cgf.cx>
142
143         * fork.cc (frok::parent): Improve error message.
144
145 2010-06-22  Corinna Vinschen  <corinna@vinschen.de>
146
147         * flock.cc (allow_others_to_sync): Use small stack buffer rather
148         than big temp buffer.  Fix typo in comment.
149         (lf_setlock): Revert to using tmp_pathbuf.
150         (lf_getlock): Ditto.
151
152 2010-06-22  Corinna Vinschen  <corinna@vinschen.de>
153
154         * sec_acl.cc (setacl): Use the long time unused ACL_DEFAULT_SIZE
155         instead of a constant value.
156         * security.cc (alloc_sd): Ditto.
157
158 2010-06-21  Christopher Faylor  <me+cygwin@cgf.cx>
159
160         * tmpbuf.h: New file.
161         * flock.cc: Include tmpbuf.h for new tmpbuf functionality.
162         (allow_others_to_sync): Use tmpbuf rather than tmp_pathbuf.  Explain
163         why.
164         (lf_setlock): For consistency, use tmpbuf rather than tmp_pathbuf.
165         (lf_getlock): Ditto.
166
167 2010-06-21  Christopher Faylor  <me+cygwin@cgf.cx>
168
169         * dcrt0.cc (__api_fatal): Temporarily generate a stackdump.
170
171 2010-06-21  Christopher Faylor  <me+cygwin@cgf.cx>
172
173         * tls_pbuf.cc (tmp_pathbuf::w_get): Report what's failing when too many
174         buffers are in use.
175
176 2010-06-17  Corinna Vinschen  <corinna@vinschen.de>
177
178         * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Fetch stat
179         handle only after checking for NFS.
180
181 2010-06-15  Corinna Vinschen  <corinna@vinschen.de>
182
183         * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Use handle
184         returned by get_stat_handle.
185         (fhandler_base::fstat_helper): Reinstatiate code to re-open the file
186         when checking for executability if called via fstat.  Explain why.
187
188 2010-06-15  Corinna Vinschen  <corinna@vinschen.de>
189
190         * dtable.cc (dtable::dup_worker): Reset path_conv handle in duplicated
191         fhandler.
192         * fhandler.cc (fhandler_base::fstatvfs): Keep handle in created
193         path_conv.
194         * fhandler.h (fhandler_base::get_stat_access): New method.
195         (fhandler_base::get_stat_handle): New method.
196         * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Use handle
197         returned by get_stat_handle.  Only request inode from system if it
198         isn't already set in the fhandler, and only for filesystems supporting
199         them.
200         (fhandler_base::fstat_fs): Use handle returned by get_stat_handle.
201         Change the way open_fs is called.  Explain why.
202         (fhandler_base::fstat_helper): Use handle returned by get_stat_handle.
203         Never use 0 inode number.  Simplify executable recognition by re-using
204         get_stat_handle if file could be opened with sufficient rights.
205         (fhandler_disk_file::fstatvfs): Use handle returned by get_stat_handle.
206         (fhandler_disk_file::facl): Use handle returned by get_stat_handle in
207         GETACL and GETACLCNT cases.
208         (fhandler_disk_file::link): Use handle returned by get_stat_handle
209         instead of opening file here again.  Add comment.
210         (readdir_get_ino): Keep handle in created path_conv and drop
211         opening file.
212         * ntdll.h (wait_pending): New helper function.
213         * path.cc (symlink_info::check): Drop unused 'opt' parameter from
214         declaration.  Add path_conv_handle argument.
215         (path_conv::check): Make sure conv_handle is closed.  Keep
216         PC_KEEP_HANDLE flag in pflags_or.  Accommodate call to sym.check to
217         new args.
218         (path_conv::~path_conv): Close conv_handle.
219         (symlink_info::check_shortcut): Don't re-open file here, just use
220         incoming handle.  Drop goto's and label out.
221         (symlink_info::check_sysfile): Don't re-open file here, just use
222         incoming handle.  Keep track of file position to accommodate the fact
223         that file has been opened asynchronously in calling function.
224         (symlink_info::check_nfs_symlink): Don't re-open file here, just use
225         incoming handle.
226         (symlink_info::check): Drop unused 'opt' parameter.  Add
227         path_conv_handle argument.  Always try to open file with GENERIC_READ
228         rights first to allow reading file content w/o having to re-open the
229         file.  Drop back to READ_CONTROL | FILE_READ_ATTRIBUTES otherwise.
230         Call symlink test functions (except for check_reparse_point) only if
231         file could be opened with GENERIC_READ.  Keep file handle open if
232         PC_KEEP_HANDLE is set in pflags.
233         * path.h (enum pathconv_arg): Add PC_KEEP_HANDLE flag.
234         (class path_conv_handle): New class.
235         (class path_conv): Add conv_handle member.
236         (path_conv::operator =): Duplicate conv_handle.
237         (path_conv::handle): New method.
238         (path_conv::access): New method.
239         (path_conv::reset_conv_handle): New method.
240         (path_conv::close_conv_handle): New method.
241
242 2010-06-15  Corinna Vinschen  <corinna@vinschen.de>
243
244         * fhandler_disk_file.cc (fhandler_disk_file::fstatvfs): Fix indentation.
245
246 2010-06-15  Corinna Vinschen  <corinna@vinschen.de>
247
248         * fhandler_disk_file.cc (path_conv::get_ino_by_handle): Convert from
249         static function to path_conv method.  Accommodate throughout.
250         (path_conv::ndisk_links): Unused, comment out.
251         * path.h (path_conv::get_ino_by_handle): Declare.
252         (path_conv::ndisk_links): Comment out declaration.
253
254 2010-06-14  Corinna Vinschen  <corinna@vinschen.de>
255
256         * path.cc (path_conv::check): Return with ENOTDIR if component is a
257         device.
258
259 2010-06-14  Corinna Vinschen  <corinna@vinschen.de>
260
261         * dlfcn.cc (get_full_path_of_dll): Revert patch from 2010-04-29.
262
263 2010-06-12  Christopher Faylor  <me+cygwin@cgf.cx>
264
265         * times.cc (gtod): Move to sharable region.
266
267 2010-06-09  Corinna Vinschen  <corinna@vinschen.de>
268
269         * path.cc (symlink_info::check_shortcut): Use ro_u_empty rather than
270         local UNICODE_STRING object.
271         (symlink_info::check_sysfile): Ditto.  Return immediately if NtOpenFile
272         failed to avoid closing random handle.  Improve debug output in case
273         NtReadFile failed.
274
275 2010-06-08  Corinna Vinschen  <corinna@vinschen.de>
276
277         * path.cc (symlink_info::check): Set h to NULL after closing handle
278         in udf check.  Remove overagressive bracketing.  Don't set h to NULL
279         without closing the handle.  Fix using wrong handle in checking
280         file system when using parent directory handle.
281
282 2010-06-07  Corinna Vinschen  <corinna@vinschen.de>
283
284         * include/sys/stdio.h: Remove _GNU_SOURCE guard around getline
285         and getdelim prototypes since they are SUSv4 now.
286
287 2010-06-02  Corinna Vinschen  <corinna@vinschen.de>
288
289         * ntdll.h (STATUS_BAD_NETWORK_PATH): Define.
290         (STATUS_BAD_NETWORK_NAME): Define.
291         * path.cc (symlink_info::check): Convert STATUS_BAD_NETWORK_PATH and
292         STATUS_BAD_NETWORK_NAME into an immediate ENOENT.
293
294 2010-06-01  Corinna Vinschen  <corinna@vinschen.de>
295
296         * exceptions.cc (open_stackdumpfile): Correctly append .stackdump
297         suffix.
298
299         * nlsfuncs.cc (rebase_locale_buf): Reorder arguments.  Accommodate
300         throughout.  Add pointer to end of buffer and avoid changing pointers
301         not pointing into the buffer.
302
303 2010-06-01  Corinna Vinschen  <corinna@vinschen.de>
304
305         * fhandler_netdrive.cc (fhandler_netdrive::exists): Always free WNet
306         resource if created.
307
308 2010-05-31  Corinna Vinschen  <corinna@vinschen.de>
309
310         * cygheap.cc (cygheap_user::set_name): Allow to change the user name
311         if it only differs by case.
312
313 2010-05-26  Corinna Vinschen  <corinna@vinschen.de>
314
315         * fhandler_registry.cc (multi_wcstombs): New function.
316         (fhandler_registry::fstat): Call multi_wcstombs for strings of type
317         REG_MULTI_SZ.
318         (fhandler_registry::fill_filebuf): Ditto.
319
320 2010-05-26  Christopher Faylor  <me+cygwin@cgf.cx>
321
322         * hires.h (hires_base::reset): New function.
323         (hires_us): Specify that hires_base is a public import.
324         (hires_ms): Ditto.
325         * times.cc (gtod): Move earlier in file.
326         (settimeofday): Reset gtod so that base will be subsequently
327         recalculated.
328
329 2010-05-26  Corinna Vinschen  <corinna@vinschen.de>
330
331         * path.cc (symlink_info::check): Don't try to handle remote reparse
332         points as symlinks.  Explain why.
333
334 2010-05-26  Corinna Vinschen  <corinna@vinschen.de>
335
336         * include/inttypes.h: Change PTR definitions to int to align with the
337         stdint.h type definitions of intptr_t/uintptr_t.
338
339 2010-05-26  Corinna Vinschen  <corinna@vinschen.de>
340
341         * fhandler.h (class fhandler_pty_master): Add master_thread member.
342         * fhandler_tty.cc (fhandler_pty_master::close): Properly detach from
343         master thread.
344         (fhandler_pty_master::setup): Store cygthread pointer of pty master
345         control thread in master_thread.  Don't zap thread handle.
346
347 2010-05-26  Kazuhiro Fujieda  <fujieda@acm.org>
348             Corinna Vinschen  <corinna@vinschen.de>
349
350         * nlsfuncs.cc (__set_lc_time_from_win): Use LOCALE_SMONTHNAME1
351         instead of LOCALE_SABBREVMONTHNAME1 in Japanese and Korean
352         locales to get abbreviated month names.  Explain why.
353
354 2010-05-18  Kazuhiro Fujieda  <fujieda@acm.org>
355
356         * environ.cc (regopt): Change the first argument to wide char string.
357         (environ_init): Accommodate change to the first argument of regopt.
358         * exception.cc (open_stackdumpfile): Accommodate change to the type of
359         progname in _pinfo.
360         * external.cc (fillout_pinfo): Ditto.
361         * fhandler_process.cc (format_process_winexename): Ditto.
362         (format_process_stat): Ditto.
363         * fork.cc (fork::parent): Ditto.
364         * pinfo.cc (pinfo_basic::pinfo_basic): Call GetModuleFileNameW instead
365         of GetModuleFileName.
366         (pinfo::thisproc): Accommodate change to the type of progname in
367         _pinfo.
368         (pinfo_init): Ditto.
369         * pinfo.h (_pinfo): Change the type of progname to a wide char array.
370         * registry.h (reg_key::get_int): Change the first argument from
371         constant point to pointer to constant.
372         (reg_key::get_string): Ditto.  Change the last argument likewise.
373         * registry.cc (reg_key::get_int): Accommodate change to the
374         declaration.
375         (reg_key::get_string): Ditto.
376         * strace.cc (strace::hello): Accommodate change to the type of progname
377         in _pinfo.
378         (strace::vsprntf): Ditto.
379
380 2010-05-07  Christopher Faylor  <me+cygwin@cgf.cx>
381
382         * Makefile.in (DLL_OFILES): Add pseudo-reloc.o.
383         * dcrt0.cc (child_info_fork::handle_fork): Call
384         _pei386_runtime_relocator here.
385         (dll_crt0_1): Ditto for non-fork case.
386         * dll_init.cc (dll::init): Complain more in comment.  Clean up
387         slightly.
388         (dll_dllcrt0_1): Call _pei386_runtime_relocator when we know we have
389         a filled-in per_process structure.
390         * globals.cc (__cygwin_user_data): Accommodate new fields for
391         _pei386_runtime_relocator.
392         * pseudo-reloc.cc: New file adapted from old lib/pseudo-reloc.c.
393         Include winsup.h directly.  Collapse #ifdef __CYGWIN__ into one block.
394         Perform minor whitespace code reformatting.
395         (__report_error): Use small_printf to output error.
396         (_pei386_runtime_relocator): Conditionalize for cygwin to take
397         per_process pointer parameter.
398         * winsup.h (_pei386_runtime_relocator): Declare.
399         * include/cygwin/version.h
400         (CYGWIN_VERSION_PER_PROCESS_API_VERSION_COMBINED): New macro.
401         (CYGWIN_VERSION_USER_API_VERSION_COMBINED): Use above macro.
402         (CYGWIN_VERSION_USE_PSEUDO_RELOC_IN_DLL): New macro.
403         (CYGWIN_VERSION_API_MINOR): Bump to 227.
404         * include/sys/cygwin.h: Remove obsolete comment.
405         (per_process::unused2): Shorten.
406         (per_process::pseudo_reloc_start): New field.
407         (per_process::pseudo_reloc_end): Ditto.
408         (per_process::image_base): Ditto.
409         * lib/_cygwin_crt0_common.cc: Declare pseudo runtime externs needed for
410         per_process structure.
411         (_cygwin_crt0_common): Fill in pseudo_reloc runtime constants.
412         * lib/pseudo-reloc-dummy.c: New file.  Dummy function to satisify ld.
413         * lib/pseudo-reloc.c: Delete.
414
415 2010-05-07  Corinna Vinschen  <corinna@vinschen.de>
416
417         * fhandler_tty.cc (fhandler_tty_slave::init): Disable grabbing
418         process group ownership of tty in case we're being debugged.
419
420 2010-05-06  Corinna Vinschen  <corinna@vinschen.de>
421
422         * path.cc (path_conv::check): Drop setting sym.pflags before calling
423         mount_info::conv_to_win32_path since the flag value is overwritten by
424         mount_info::conv_to_win32_path anyway.
425         Set flags for DOS paths before calling symlink_info::check so they can
426         be used in that function already.
427
428 2010-05-03  Christopher Faylor  <me+cygwin@cgf.cx>
429
430         * dll_init.cc (dll_list::alloc): Add debugging assertion.
431
432 2010-04-29  Corinna Vinschen  <corinna@vinschen.de>
433
434         * dlfcn.cc (get_full_path_of_dll): Handle non-existent file.
435
436 2010-04-29  Corinna Vinschen  <corinna@vinschen.de>
437
438         * mount.cc (struct opt): Add "dos" and "ihash" options.
439         (fillout_mntent): Ditto.
440         * path.cc (path_conv::get_nt_native_path): Use path_conv's
441         has_dos_filenames_only method.
442         (path_conv::check): Add PATH_IHASH flag if FS has unreliable inode
443         numbers.
444         (symlink_info::check_shortcut): Or symlink flags to pflags.
445         (symlink_info::check_sysfile): Ditto.  Change test accordingly.
446         (symlink_info::check_reparse_point): Ditto.
447         (symlink_info::check_nfs_symlink): Ditto.
448         (symlink_info::check): Check PATH_DOS flag in call to get_nt_native_path
449         to utilize mount flag.  Ditto in test for potential restarting.  Set
450         PATH_DOS if FS only allows DOS filename rules.
451         * path.h (enum path_types): Add PATH_DOS and PATH_IHASH.
452         (path_conv::hasgood_inode): Check PATH_IHASH instead of
453         fs.hasgood_inode.
454         (path_conv::has_dos_filenames_only): New method.
455         * include/sys/mount.h (MOUNT_DOS): New mount flag.
456         (MOUNT_IHASH): Ditto.
457
458 2010-04-29  Corinna Vinschen  <corinna@vinschen.de>
459
460         * external.cc (cygwin_internal): Add CW_CVT_MNT_OPTS to allow mount
461         flag parsing.  Add CW_LST_MNT_OPTS case to allow mount flag listing.
462         * mount.cc (fstab_read_flags): Rename from read_flags.  Make externally
463         available.  Change input string to char ** to allow returning faulty
464         option.  Add flag for avoiding debug output.
465         (fstab_list_flags): New function to create list of options.
466         * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_CVT_MNT_OPTS and
467         CW_LST_MNT_OPTS.
468
469 2010-04-28  Corinna Vinschen  <corinna@vinschen.de>
470
471         * mount.cc (compare_flags): New function.
472         (read_flags): Replace loop with bsearch.  Simplify error check.
473
474 2010-04-28  Corinna Vinschen  <corinna@vinschen.de>
475
476         * include/cygwin/version.h: Bump API minor version.
477
478 2010-04-28  Corinna Vinschen  <corinna@vinschen.de>
479
480         * cygwin.din (__locale_mb_cur_max): Export.
481         * nlsfuncs.cc (__getlocaleinfo): Drop conversion to multibyte.
482         (__charfromwchar): New function to convert to multibyte.
483         (__eval_datetimefmt): Convert to return wchar_t pointer.  Work on
484         wide char string.
485         (__set_lc_time_from_win): Take additional pointer to "C" category info
486         to accommodate C.foo locales.  Rework to fill wide char members in
487         category info.
488         (__set_lc_ctype_from_win): New function.
489         (__set_lc_numeric_from_win): Take additional pointer to "C" category
490         info to accommodate C.foo locales.  Rework to fill wide char members
491         in category info.
492         (__set_lc_monetary_from_win): Ditto.
493         (__set_lc_messages_from_win): Ditto.
494         (__get_current_collate_codeset): New function, called from nl_langinfo.
495         * include/cygwin/config.h (__HAVE_LOCALE_INFO_EXTENDED__): Define.
496
497 2010-04-27  Christopher Faylor  <me+cygwin@cgf.cx>
498
499         * spawn.cc (find_exec): Use the first detected errno when lookup fails.
500
501 2010-04-27  Corinna Vinschen  <corinna@vinschen.de>
502
503         * include/regex.h: Include _ansi.h to avoid missing out on preprocessor
504         macros in sys/_types.h.
505
506 2010-04-26  Corinna Vinschen  <corinna@vinschen.de>
507
508         * mount.h (fs_info::inited): New inline method.
509         * path.cc (path_conv::check): Clear filesystem info if following a
510         symlink.  Use new fs_info::inited method to check if FS info is already
511         available.
512         (symlink_info::check): Drop fs_update_called.  Use fs_info::inited
513         method instead.  Streamline test for leading space and trailing dot or
514         space.  Add comments.
515
516 2010-04-23  Corinna Vinschen  <corinna@vinschen.de>
517
518         * path.h (get_nt_native_path): Add third parameter to declaration and
519         declare with regparms.
520         * path.cc (get_nt_native_path): Add third parameter to allow conversion
521         of leading and trailing dots and spaces on filesystems only supporting
522         filenames following DOS rules.
523         (path_conv::get_nt_native_path): Call get_nt_native_path according to
524         fs.has_dos_filenames_only flag.
525         (getfileattr): Accommodate new parameter to get_nt_native_path.
526         (symlink_info::check): Revamp fs_update_called handling to call
527         fs.update only once per call.  Call get_nt_native_path according to
528         fs.has_dos_filenames_only flag.  Streamline filesystem dependent code
529         not to be called more than once unnecessarily.  Drop code tweaking
530         incoming path for broken filesystems only allowing DOS pathnames.
531         Rely on changed get_nt_native_path instead.
532         * mount.cc (fillout_mntent): Accommodate new parameter to
533         get_nt_native_path.
534         * strfuncs.cc (tfx_rev_chars): New conversion table with comment.
535         (sys_cp_wcstombs): Use tfx_rev_chars rather than tfx_chars.
536
537 2010-04-22  Corinna Vinschen  <corinna@vinschen.de>
538
539         * path.cc (symlink_info::check): Make sure to restart only once.
540
541 2010-04-22  Corinna Vinschen  <corinna@vinschen.de>
542
543         * mount.cc (GETVOLINFO_VALID_MASK): Drop FILE_SEQUENTIAL_WRITE_ONCE
544         from mask.  Expand the comment a bit.
545         (WIN_FAT_FLAGS): New define.
546         (FS_IS_WINDOWS_FAT): New macro.
547         (fs_info::update): Handle remote FS faking to be FAT.  Subsume under
548         CIFS.  Check for NWFS and has_buggy_basic_info only for remote
549         filesystems.  Add check for has_dos_filenames_only.
550         * mount.h (class fs_info): Add has_dos_filenames_only status flag.
551         Implement accessors.
552         * path.cc (symlink_info::check): Rearrange variable definitions to
553         clear them up.  Add a restart label to allow a clean restart within
554         the method.  Add a check for broken filesystems only allowing DOS
555         pathnames in case we encounter a STATUS_OBJECT_NAME_NOT_FOUND status.
556         If all checks point to one of that, restart method with tweaked
557         incoming path.  Add lengthy comments to explain what we do.
558
559 2010-04-22  Corinna Vinschen  <corinna@vinschen.de>
560
561         * path.cc (symlink_info::check): Fix a comment.
562
563 2010-04-21  Corinna Vinschen  <corinna@vinschen.de>
564             Christopher Faylor  <me+cygwin@cgf.cx>
565
566         * fhandler_termios.cc (tcinit): Remove previously applied change.
567         Replace with...
568         * fhandler_tty.cc (fhandler_tty_slave::init): Become process group
569         leader if called from dtable::init_std_file_from_handle.  Add comment
570         to explain.
571
572 2010-04-21  Corinna Vinschen  <corinna@vinschen.de>
573
574         * dtable.cc (dtable::init_std_file_from_handle): Set access mask for
575         the slave side of ttys explicitely.  Explain why.
576
577 2010-04-20  Christopher Faylor  <me+cygwin@cgf.cx>
578
579         * path.cc (cygwin_create_path): Free memory on error.
580
581 2010-04-20  Corinna Vinschen  <corinna@vinschen.de>
582
583         * cygheap.h (struct init_cygheap): Add rlim_core member.
584         * cygheap.cc (cygheap_init): Initialize rlim_core to RLIM_INFINITY.
585         * exceptions.cc (stackdump): Drop extern declaration of rlim_core.
586         Refer to cygheap->rlim_core instead.
587         (exception::handle): Disable stackdumping if cygheap->rlim_core is 0.
588         Don't set WCOREDUMP flag in exit code, if cygheap->rlim_core is 0.
589         (sigpacket::process): Ditto.
590         * resource.cc (rlim_core): Remove.
591         (getrlimit): Fetch RLIMIT_CORE value from cygheap->rlim_core.
592         (setrlimit): Store RLIMIT_CORE value in cygheap->rlim_core.
593
594 2010-04-19  Christopher Faylor  <me+cygwin@cgf.cx>
595
596         * cygerrno.h: Nevermind.
597
598 2010-04-19  Christopher Faylor  <me+cygwin@cgf.cx>
599
600         * cygerrno.h: Protect use of NTSTATUS for only when we need it.
601
602 2010-04-19  Christopher Faylor  <me+cygwin@cgf.cx>
603
604         * lib/_cygwin_crt0_common.cc: Remove unneeded declarations.
605
606 2010-04-19  Corinna Vinschen  <corinna@vinschen.de>
607
608         * fhandler_tty.cc (fhandler_tty_slave::fch_set_sd): Remove commented out
609         code.
610
611 2010-04-19  Corinna Vinschen  <corinna@vinschen.de>
612
613         * autoload.cc (GetNamedPipeClientProcessId): Define.
614         * fhandler.h (fhandler_tty_slave::fch_open_handles): Declare private.
615         (fhandler_tty_slave::fch_close_handles): Ditto.
616         (fhandler_tty_slave::cygserver_attach_tty): Drop declaration.
617         (fhandler_tty_slave::fstat): Declare public.
618         (fhandler_tty_slave::fchmod): Declare public.
619         (fhandler_tty_slave::fchown): Declare public.
620         (class fhandler_pty_master): Add master_ctl handle.
621         (fhandler_pty_master::pty_master_thread): Declare public.
622         * fhandler_termios.cc (fhandler_termios::tcinit): If the process
623         is started from a non-Cygwin process, make it tty process group
624         leader.
625         * fhandler_tty.cc: Throughout accommodate additional security related
626         arguments in calls to functions creating or opening objects.
627         (close_maybe): Move to start of file to reuse it
628         in other methods.
629         (struct pipe_request): Define.
630         (struct pipe_reply): Define.
631         (fhandler_tty_slave::open): Throughout, try to open synchronization
632         objects with MAXIMUM_ALLOWED permissions.  Drop call to cygserver.
633         Try to duplicate pipe handles via master_ctl pipe if duplicating
634         directly doesn't work.
635         (fhandler_tty_slave::cygserver_attach_tty): Remove.
636         (fhandler_tty_slave::init): Close unused incoming pipe handle.
637         (fhandler_pty_master::close): Send exit message to master control
638         thread and close master_ctl handle.
639         (fhandler_pty_master::pty_master_thread): New method, implementing the
640         master control thread.
641         (pty_master_thread): Static helper to start master control thread.
642         (fhandler_pty_master::setup): Simplify creating pipe inheritance.
643         Make sure we're the one creating the input_available_event.  Add
644         comment to explain why.  Create master_ctl pipe and start master
645         control thread.  Close master_ctl handle in case of error.
646         * security.cc (alloc_sd): Add code to handle tty objects.  Add comments
647         to explain what exactly is required.
648         (get_object_sd): New function.
649         (get_object_attribute): New function.
650         (create_object_sd_from_attribute): New function.
651         (set_object_sd): New function.
652         (set_object_attribute): New function.
653         (set_file_attribute): Change attribute type to mode_t.
654         * security.h (set_file_attribute): Change attribute type to mode_t.
655         (get_object_sd): Declare.
656         (get_object_attribute): Declare.
657         (create_object_sd_from_attribute): Declare.
658         (set_object_sd): Declare.
659         (set_object_attribute): Declare.
660         * tty.cc (tty::slave_alive): Implement directly instead of via alive.
661         (tty::exists): Open mutex handle with READ_CONTROL access.
662         (tty::alive): Remove.
663         (tty::open_output_mutex): Convert to inline method.
664         (tty::open_input_mutex): Ditto.
665         (tty::open_mutex): Take additional ACCESS_MASK parameter for the
666         mutex open access mask.
667         (tty::open_inuse): New method.
668         (tty::create_inuse): Take PSECURITY_ATTRIBUTES parameter.  Drop fmt
669         name parameter.  Always create TTY_SLAVE_ALIVE event.
670         (tty::get_event): Take additional PSECURITY_ATTRIBUTES parameter for
671         CreateEvent.
672         * tty.h (class tty): Change declarations according to aforementioned
673         changes.
674         (tty::open_output_mutex): Implement as inline method.
675         (tty::open_input_mutex): Ditto.
676
677 2010-04-19  Corinna Vinschen  <corinna@vinschen.de>
678
679         * dtable.cc (dtable::init_std_file_from_handle): Set dev to
680         valid content for ptys.  Remove setting FILE_CREATE_PIPE_INSTANCE
681         in access flags since it's not needed.  Set the access mask for
682         kernel objects according to what's returned by NtQueryInformationFile,
683         info class FileAccessInformation.
684
685 2010-04-19  Corinna Vinschen  <corinna@vinschen.de>
686
687         * syscalls.cc (rename): On STATUS_ACCESS_VIOLATION, retry to open
688         for DELETE until the STATUS_ACCESS_VIOLATION goes away.  Add comment
689         to explain why.
690
691 2010-04-17  Corinna Vinschen  <corinna@vinschen.de>
692
693         * sec_helper.cc (get_null_sd): Make static.  Use PSECURITY_DESCRIPTOR
694         instead of SECURITY_DESCRIPTOR *.
695         (sec_acl): Fix fomratting.
696         * security.h (get_null_sd): Drop declaration.
697
698 2010-04-16  Corinna Vinschen  <corinna@vinschen.de>
699
700         * cygerrno.h (seterrno_from_nt_status): Declare.
701         (__seterrno_from_nt_status): Call seterrno_from_nt_status.
702         * errno.cc (seterrno_from_win_error): Set errno without calling
703         set_errno to avoid packing strace output with errno messages.
704         (seterrno_from_nt_status): New function to print NT status as well as
705         resulting Windows error.
706
707 2010-04-15  Corinna Vinschen  <corinna@vinschen.de>
708
709         * kernel32.cc (CreateEventW): Create event object with EVENT_ALL_ACCESS
710         access mask.
711         (CreateMutexW): Create mutex object with MUTEX_ALL_ACCESS access mask.
712         (CreateSemaphoreW): Create semaphore object with SEMAPHORE_ALL_ACCESS
713         access mask.
714
715 2010-04-15  Corinna Vinschen  <corinna@vinschen.de>
716
717         * sec_helper.cc (set_cygwin_privileges): Enable SE_DEBUG_PRIVILEGE, if
718         available.  Add comments.
719
720 2010-04-13  Corinna Vinschen  <corinna@vinschen.de>
721
722         * fhandler_socket.cc (get_inet_addr): Only test the file for being a
723         socket after opening it.  Retry if opening failed with sharing
724         violation.  Explain why we do this.
725         (fhandler_socket::bind): Create file with no sharing allowed.
726
727 2010-04-13  John Bowman  <bowman@math.ualberta.ca>
728
729         * cygheap.cc (cwcsdup): Fix allocation size to accommodate sizeof WCHAR.
730         (cwcsdup1): Ditto.
731
732 2010-04-12  Corinna Vinschen  <corinna@vinschen.de>
733
734         * include/cygwin/version.h: Bump DLL minor version number to 5.
735
736 2010-04-12  Corinna Vinschen  <corinna@vinschen.de>
737
738         * posix.sgml (std-notes): Improve lseek description.
739
740 2010-04-12  Corinna Vinschen  <corinna@vinschen.de>
741
742         * fhandler_tty.cc (fhandler_tty_slave::open): Add code to duplicate
743         handles within a single process to simplify openpty case.
744         (fhandler_tty_slave::cygserver_attach_tty): Correctly send Windows PID
745         to cygserver, rather than the Cygwin PID.
746
747 2010-04-11  Corinna Vinschen  <corinna@vinschen.de>
748
749         * fhandler.h (class dev_console): Add backspace_keycode member.
750         * fhandler_console.cc (fhandler_console::get_tty_stuff): Initialize
751         backspace_keycode with CERASE.
752         (fhandler_console::read): Return dev_state->backspace_keycode if the
753         backspace key is pressed.
754         (fhandler_console::char_command): Implement DECBKM escape sequence.
755
756 2010-04-10  Christopher Faylor  <me+cygwin@cgf.cx>
757
758         * fhandler_console.cc (fhandler_console::read): Default to sending
759         CERASE character if termios VERASE field is zero.
760         (fhandler_console::fixup_after_fork_exec): Avoid a spurious debug
761         message.
762
763 2010-04-10  Christopher Faylor  <me+cygwin@cgf.cx>
764
765         * mkvers.sh: Use modern date formats to construct the date.
766
767 2010-04-09  Corinna Vinschen  <corinna@vinschen.de>
768
769         * nlsfuncs.cc (__set_lc_time_from_win): Actually set
770         _time_locale->md_order to the D_MD_ORDER value written to the buffer.
771
772 2010-04-09  Christopher Faylor  <me+cygwin@cgf.cx>
773
774         * path.cc (path_conv::set_normalized_path): Use crealloc_abort to avoid
775         a memory leak.
776         * path.h (path_conv::operator =): Just use cstrdup to allocate
777         normalized_path, avoiding attempt to free a pointer which is allocated
778         in another pc.
779
780 2010-04-07  Corinna Vinschen  <corinna@vinschen.de>
781
782         * include/cygwin/version.h: Bump DLL minor version number to 4.
783
784 2010-04-06  Corinna Vinschen  <corinna@vinschen.de>
785
786         * thread.cc (valid_sched_parameters): Declare extern here.
787         (sched_set_thread_priority): Ditto.
788
789 2010-04-06  Corinna Vinschen  <corinna@vinschen.de>
790
791         * include/sched.h: Remove, overruled by newlib file.
792         * include/sys/sched.h: Ditto.
793
794 2010-04-06  Christopher Faylor  <me+cygwin@cgf.cx>
795
796         * fhandler_fifo.cc (fhandler_fifo::open): Accommodate previous return
797         value change to setup_overlapped.
798
799 2010-04-02  Christopher Faylor  <me+cygwin@cgf.cx>
800
801         * fhandler.h (fhandler_base::has_ongoing_io): Declare virtual method.
802         * select.cc (peek_pipe): Reorganize slightly.  Don't attempt to check a
803         handle if it has ongoing I/O.
804         (select_pipe_info::select_pipe_info): Delete definition.
805         (select_pipe_info::~select_pipe_info): Delete definition.
806         (thread_pipe): Get rid of WFMO call.  Reorganize loop.
807         (pipe_cleanup): Remove dependence on destructor.
808         (thread_serial): Reorganize loop.
809         * select.h (select_pipe_info): Empty this class since it no longer has
810         any special requirements (for now).
811
812         * syscalls.cc (readv): Remove an unneeded debug printf.
813
814 2010-04-02  Christopher Faylor  <me+cygwin@cgf.cx>
815
816         * fhandler.h (fhandler_base::setup_overlapped): Delete virtual
817         declaration.
818         (fhandler_base::destroy_overlapped): Ditto.
819         (fhandler_base_overlapped): Remove now-unneeded friend.
820         (fhandler_base_overlapped::setup_overlapped): Return int, remove
821         parameter.
822         (fhandler_base_overlapped::get_overlapped): Return reference.
823         (fhandler_base_overlapped::fhandler_base_overlapped): Be more assertive
824         about zeroing everything.
825         (fhandler_base_overlapped::fixup_after_fork): Declare new function.
826         (fhandler_base_overlapped::fixup_after_exec): Ditto.
827         (fhandler_base_overlapped::dup): Ditto.
828         (fhandler_base_overlapped::close): Ditto.
829         * fhandler_fifo.cc (fhandler_fifo::dup): Call
830         fhandler_base_overlapped::dup rather than fhandler_base::dup.
831         * pipe.cc (fhandler_pipe::dup): Ditto.
832         (fhandler_pipe::init): Accommodate change in setup_overlapped arguments
833         for "opened_properly" case.
834
835 2010-04-02  Christopher Faylor  <me+cygwin@cgf.cx>
836
837         * fhandler_fifo.cc (fhandler_fifo::fhandler_fifo): Properly initialize
838         overlapped part of this class.
839
840 2010-04-02  Corinna Vinschen  <corinna@vinschen.de>
841
842         * fhandler_tty.cc (fhandler_tty_slave::close): Revert previous change.
843
844 2010-04-02  Christopher Faylor  <me+cygwin@cgf.cx>
845
846         * select.h (select_pipe_info::add_watch_handle): Delete declaration.
847         * select.cc (select_pipe_info::add_watch_handle): Delete definition.
848         (fhandler_pipe::select_read): Delete call to add_watch_handle.
849         (fhandler_pipe::select_write): Ditto.
850         (fhandler_pipe::select_except): Ditto.
851
852 2010-04-02  Christopher Faylor  <me+cygwin@cgf.cx>
853
854         * dtable.cc (dtable::init_std_file_from_handle): Avoid adding fh to
855         fdtab until we know that it is good.
856         * fhandler_tty.cc (fhandler_tty_slave::fhandler_tty_slave): Handle
857         error conditions more consistently.  Avoid handle leakage on error.
858
859 2010-04-02  Corinna Vinschen  <corinna@vinschen.de>
860
861         * fhandler_tty.cc (fhandler_tty_slave::close): Avoid potential crash
862         if former open call has been unsuccessful.
863
864 2010-04-01  Corinna Vinschen  <corinna@vinschen.de>
865
866         * nlsfuncs.cc: Fix indentation.
867
868 2010-04-01  Corinna Vinschen  <corinna@vinschen.de>
869
870         * nlsfuncs.cc (rebase_locale_buf): New helper function to rebase
871         function pointers in locale structures.  Explain why this is necessary.
872         (__set_lc_time_from_win): Use rebase_locale_buf after realloc.
873         (__set_lc_numeric_from_win): Ditto.
874         (__set_lc_monetary_from_win): Ditto.
875
876 2010-03-31  Christopher Faylor  <me+cygwin@cgf.cx>
877
878         * sigproc.cc (wait_sig): Make sure that strace is activated on
879         __SIGSTRACE by calling new strace::activate function.
880         * strace.cc (strace::activate): Rename from strace::strace.
881         * strace.h (strace::activate): Define new function.
882         (strace::strace): Call activate.
883
884 2010-03-31  Christopher Faylor  <me+cygwin@cgf.cx>
885
886         * fhandler.h (fhandler_base_overlapped): Temporarily (?) make
887         select_pipe_info a friend until the fhandler_tty intertangling can be
888         worked out.
889         * select.cc (select_pipe_info::add_watch_handle): Don't inspect the
890         overlapped event if we're not waiting for I/O.
891         (fhandler_tty_common::select_*): Change to standard function.  Don't do
892         kludgy fhandler_pipe coercion.
893
894 2010-03-31  Christopher Faylor  <me+cygwin@cgf.cx>
895
896         * fhandler.cc (fhandler_base::dup): Call setup_overlapped
897         unconditionally.
898         (fhandler_base::fork_fixup): Ditto.
899         (fhandler_base::fixup_after_fork): Ditto.
900         (fhandler_base::fixup_after_exec): Ditto.
901         (fhandler_base_overlapped::setup_overlapped): Move to this class from
902         fhandler_base.
903         (handler_base_overlapped::destroy_overlapped): Ditto.
904         (fhandler_base_overlapped::wait_overlapped): Ditto.  Track when we
905         expect pending I/O.
906         (fhandler_base_overlapped::read_overlapped): Move to this class from
907         fhandler_base.  Return error if ongoing I/O.
908         (fhandler_base_overlapped::write_overlapped): Ditto.
909         (fhandler_base_overlapped::has_ongoing_io): Semi-reinstate previous
910         function.
911         * fhandler.h (fhandler_base::wait_overlapped): Move to
912         fhandler_base_overlapped class.
913         (fhandler_base::write_overlapped): Ditto.
914         (fhandler_base::get_overlapped): Ditto.
915         (fhandler_base::get_overlapped_buffer): Ditto.
916         (fhandler_base_overlapped): New class.
917         (fhandler_pipe): Inherit from fhandler_base_overlapped.  Remove
918         overlapped stuff as a result.
919         (fhandler_fifo): Ditto.
920         * pipe.cc (fhandler_pipe::fhandler_pipe): Initialize fhandler_base_overlapped.
921         (pipe): Put a descriptive name in the fhandler.
922
923 2010-03-30  Corinna Vinschen  <corinna@vinschen.de>
924
925         * fhandler_socket.cc (fhandler_socket::wait_for_events): Remove call to
926         sig_dispatch_pending.
927
928 2010-03-30  Thomas Wolff  <towo@towo.net>
929
930         * fhandler.h (class dev_console): Drop vt100_graphics_mode_active.  Add
931         flags vt100_graphics_mode_G0, vt100_graphics_mode_G1 and iso_2022_G1.
932         * fhandler_console.cc: Throughout, tune VT100 graphics mode switching
933         to follow ISO 2022 strictly.
934         (fhandler_console::write) Reset VT100 graphic mode flags on terminal
935         full reset (ESC c).
936
937 2010-03-30  Corinna Vinschen  <corinna@vinschen.de>
938
939         * syscalls.cc (open): Remove call to sig_dispatch_pending.
940
941 2010-03-30  Corinna Vinschen  <corinna@vinschen.de>
942
943         * net.cc: Remove calls to sig_dispatch_pending throughout.
944         * libc/rexec.cc: Ditto.
945
946 2010-03-30  Corinna Vinschen  <corinna@vinschen.de>
947
948         * mount.cc (fs_info::update): Allow variable FILE_SUPPORTS_SPARSE_FILES
949         flag in netapp flag test.  Add comment.
950
951 2010-03-29  Corinna Vinschen  <corinna@vinschen.de>
952
953         * spawn.cc (find_exec): Enable finding paths in backslash notation,
954         especially for the exec[vl]p functions.
955
956         * path.cc (symlink_info::check): Disable returning directories with
957         suffix appended here.
958
959 2010-03-29  Corinna Vinschen  <corinna@vinschen.de>
960
961         * include/cygwin/version.h: Bump DLL minor version number to 3.
962
963 2010-03-29  Corinna Vinschen  <corinna@vinschen.de>
964
965         * fhandler.cc (fhandler_base::fstat): Keep st_ctime and st_birthtime
966         fixed to 2006-12-01 00:00 UTC.
967
968 2010-03-29  Corinna Vinschen  <corinna@vinschen.de>
969
970         * libc/rcmd.c: Enable IPv6.
971
972 2010-03-28  Christopher Faylor  <me+cygwin@cgf.cx>
973
974         * fhandler.cc (fhandler_base::fstat): Set st_mtime to current time.
975
976 2010-03-28  Christopher Faylor  <me+cygwin@cgf.cx>
977
978         * globals.cc (exit_status): Add new ES_EXIT_STARTING enum.
979         * dcrt0.cc (cygwin_exit): Set exit_state to ES_EXIT_STARTING prior to
980         calling real exit.
981         * dll_init.cc (dll_list::detach): Remove dll from linked list and call
982         destructors even if exiting.  Don't call __cxa_finalize in exiting case.
983
984 2010-03-27  Corinna Vinschen  <corinna@vinschen.de>
985
986         * nlsfuncs.cc (__set_charset_from_locale):  Set default charset for
987         locales defaulting to codepage 936 to GB2312.
988
989 2010-03-22  Corinna Vinschen  <corinna@vinschen.de>
990
991         * fhandler_socket.cc (fhandler_socket::evaluate_events): Make erase
992         const in parameter list.
993         (fhandler_socket::wait_for_events): Take a DWORD flags value instead of
994         just a bool.  Call evaluate_events with erase flag according to
995         MSG_PEEK value in flags.  Replace check for dontwait with check for
996         MSG_DONTWAIT in flags.
997         (fhandler_socket::connect): Call wait_for_events with 0 flags value.
998         (fhandler_socket::accept4): Ditto.
999         (fhandler_socket::recv_internal): Save flags in wait_flags.  Drop
1000         dontwait variable.  Call wait_for_events with wait_flags.
1001         (fhandler_socket::send_internal): Save MSG_DONTWAIT flag in wait_flags
1002         and call wait_for_events with wait_flags as argument.  Drop dontwait
1003         variable.
1004         * fhandler.h (class fhandler_socket): Change second parameter in
1005         declaration of wait_for_events to const DWORD.
1006
1007 2010-03-19  Corinna Vinschen  <corinna@vinschen.de>
1008
1009         * fhandler_disk_file.cc (fhandler_cygdrive::fstat): Add standard read
1010         permissions again.
1011
1012 2010-03-18  Corinna Vinschen  <corinna@vinschen.de>
1013
1014         * shared.cc (init_installation_root): Change to make sure that scope of
1015         the lock lasts the entire function.
1016
1017 2010-03-15  Christopher Faylor  <me+cygwin@cgf.cx>
1018
1019         * shared_info.h (user_info): Add dll_crt0_1 as a friend.
1020         (user_info::version): Make LONG to accommodate spinlock use.
1021         (user_info::create): New static function renamed from user_info_create.
1022         (user_info::initialize): New private function renamed from
1023         user_info_initialize.
1024         (SHARED_VERSION): Delete.
1025         (SHARED_VERSION_MAGIC): Ditto.
1026         (USER_VERSION_MAGIC): Ditto.
1027         (SHARED_INFO_CB): Ditto.
1028         (USER_VERSION): Ditto.
1029         (USER_VERSION_MAGIC): Ditto.
1030         (CURR_SHARED_MAGIC): Update.
1031         (CURR_USER_MAGIC): Ditto.
1032         (shared_info::version): Make LONG to accommodate spinlock use.
1033         (shared_info::create): New static function mirroring user_info::create.
1034         (dll_crt0_1): Accommodate change to user_info::initialize.
1035         * spinlock.h (spinlock::setto): New variable member.
1036         (spinlock::done): New function.
1037         (spinlock::spinlock): Generalize to allow arbitrary values and
1038         timeouts.  Call done() when lock is not needed.
1039         * ntdll.h: Make multiple-inclusion safe.
1040         (NtQuerySystemTime): Declare.
1041         * shared.cc (installation_root_inited): Rename from shared_mem_inited.
1042         (init_installation_root): Make inline.  Use a spinlock to ensure that
1043         this is initialized only once per session.
1044         (user_info::initialize): Rename from user_shared_initialize.  Protect
1045         with spinlock on sversion and remove other spinlock-like things.
1046         Remove reference to user_shared since it is now implicit.  Refer to
1047         spinlock version of multiple_cygwin_problem to ensure that any spinlock
1048         is released.
1049         (user_info::create): Rename from user_shared_create.  Accommodate
1050         change from user_shared_initialize to user_info::initialize.
1051         (shared_info::create): New inline function.
1052         (shared_info::initialize): Protect with spinlock on sversion.  Move
1053         heap_init back under specific control of shared_info spinlock.  Remove
1054         reference to SHARED_INFO_CB and just use sizeof(*this).
1055         (memory_init): Move all locking into respective functions where it is
1056         needed.  Accommodate name changes.  Remove call to heap_init().
1057         * syscalls.cc (seteuid32): Accommodate name change to
1058         user_info::create().
1059
1060         * mount.cc (mount_info::create_root_entry): Report on errors from
1061         add_item since they should be nonexistent.
1062         (mount_info::init): Don't initialize nmounts.  It should already be
1063         zero.  Give more verbose error when root_idx < 0.  Implicitly use this
1064         pointer rather than explicitly referencing mount_table->.
1065         (mount_info::add_item): Minor whitespace fix.
1066
1067 2010-03-15  Christopher Faylor  <me+cygwin@cgf.cx>
1068
1069         * sigproc.cc (no_signals_available): Get sense of the test right for
1070         previous botched change.
1071
1072 2010-03-15  Christopher Faylor  <me+cygwin@cgf.cx>
1073
1074         * sigproc.cc (no_signals_available): Don't try to send a signal if
1075         still in cygwin startup code.
1076
1077 2010-03-13  Christopher Faylor  <me+cygwin@cgf.cx>
1078
1079         * spinlock.h: New file.
1080         (spinlock): New class.
1081         * shared.cc: Include spinlock.h.
1082         (memory_init): Use new spinlock methods rather than roll-your-own.
1083         Time out after ten seconds if shared_mem_inited is not initialized.
1084
1085         * sync.h: Update copyright.  Remove vanity attribution.
1086
1087         * sigproc.cc (sigproc_terminate): Avoid attempts to kill the signal
1088         thread while we're still initializing or suffer a deadlock.
1089
1090 2010-03-12  Christopher Faylor  <me+cygwin@cgf.cx>
1091
1092         Throughout change all calls of low_priority_sleep (0) to yield ().
1093         * miscfuncs.cc (yield): Rename from low_priority_sleep.  Remove all of
1094         the logic which called Sleep() and just use SwitchToThread.
1095         * miscfuncs.h (yield): Rename from low_priority_sleep.
1096         (SLEEP_0_STAY_LOW): Delete unused define.
1097         * shared.cc (memory_init): Move heap_init() call directly after shared
1098         memory initialization to more closely mimic long-standing program flow.
1099         * tty.cc (tty_list::terminate): Replace call to low_priority_sleep with
1100         Sleep.
1101
1102 2010-03-10  Christopher Faylor  <me.cygwin@cgf.cx>
1103
1104         * shared.cc (memory_init): Fix comment.  Fix indentation.
1105
1106 2010-03-09  Christopher Faylor  <me+cygwin@cgf.cx>
1107
1108         * shared_info.h (open_shared): Create function wrapper for common use
1109         case.
1110         (open_shared): Change fifth argument to a pointer rather than a
1111         reference.
1112         * fhandler_console.cc (fhandler_console::get_tty_stuff): Eliminate use
1113         of dummy variable and call open_shared with constant.
1114         * fhandler_process.cc (format_process_mounts): Ditto.
1115         * pinfo.cc (pinfo::init): Pass pointer to shloc.
1116         * shared.cc (shared_mem_inited): New variable.
1117         (open_shared): Crate function wrapper for common use case.
1118         (open_shared): Accommodate change to fifth argument to a pointer.
1119         (shared_info::initialize): Remove spinlock test.  Simplify function.
1120         Move get_session_parent_dir call back here.
1121         (memory_init): Protect global shared settings with shared_mem_inited
1122         spinlock.  Move get_session_parent_dir call to shared_info::initialize.
1123
1124 2010-03-09  Christopher Faylor  <me.cygwin@cgf.cx>
1125
1126         * shared.cc (inst_root_inited): Delete.
1127         * (shared_info::initialize): Reorganize.  Move call to
1128         init_installation_root here under spinlock control.  Move unneeded
1129         non-shared_info initialization out of this function.
1130         (memory_init): Remove call to init_installation_root.  Call heap_init
1131         and get_session_parent_dir here.
1132
1133 2010-03-04  Corinna Vinschen  <corinna@vinschen.de>
1134
1135         * syscalls.cc (nt_path_has_executable_suffix): Change storage class of
1136         blessed_executable_suffixes to static.
1137         (rename): Revert meaning of old_explicit_suffix.  Change the rules
1138         for appending a .exe suffix and (yikes!) document them.
1139
1140 2010-03-04  Charles Wilson  <cygwin@cwilson.fastmail.fm>
1141
1142         * cygwin.din: Export __xdr functions.
1143         * include/cygwin/version.h: Bump version.
1144         * posix.sgml: Add a few more XDR functions to list
1145         of implemented Solaris functions.
1146
1147 2010-03-03  Charles Wilson  <cygwin@cwilson.fastmail.fm>
1148
1149         Add XDR support.
1150         * cygwin.din: Export xdr functions.
1151         * include/cygwin/version.h: Bump version.
1152         * cygxdr.cc: New.
1153         * cygxdr.h: New.
1154         * dcrt0.cc (dll_crt0_1): Print the (rare) xdr-related
1155         error messages to stderr.
1156         * Makefile.in: Add cygxdr.
1157         * posix.sgml: Add new XDR functions to list of implemented Solaris
1158         functions.
1159
1160 2010-03-01  Christopher Faylor  <me+cygwin@cgf.cx>
1161
1162         * cygtls.h: Replace /*gentls_offsets*/ at end.
1163
1164 2010-03-01  Christopher Faylor  <me+cygwin@cgf.cx>
1165
1166         * exception.h: Fix copyright.
1167
1168 2010-02-27  Christopher Faylor  <me+cygwin@cgf.cx>
1169
1170         Update some copyrights.
1171         * cygtls.cc (_cygtls::call): Invoke new exception protection here.
1172         (_cygtls::init_thread): Remove conditionalized exception handler setup.
1173         (exception_list): Delete declaration.
1174         (_cygtls::init_exception_handler): Delete obsolete function.
1175         * cygtls.h: Remove (now) unneeded include.
1176         (_cygtls): Make this a real C++ class.
1177         (_cygtls::handle_exceptions): Remove.
1178         (_cygtls::init_exception_handler): Remove.
1179         (_cygtls::call2): Make private.
1180         (myfault::faulted): Remove unneeded parentheses.
1181         * dcrt0.cc (dll_crt0_1): Remove exception handler setup.
1182         * dlfcn.cc (dlopen): Ditto.
1183         (dlclose): Ditto.
1184         * dll_init.cc (dll_dllcrt0_1): Ditto.
1185         (dll_list::detach): Use new exception handler protection.
1186         * exceptions.cc (dump_exception): Rename to prevent confusion with new
1187         class.
1188         (exception::handle): Rename from _cygtls::handle_exceptions.
1189         Accommodate new exception class.  Accommodate rename to dump_exception.
1190         * tlsoffsets.h: Regenerate.
1191
1192 2010-02-26  Christopher Faylor  <me+cygwin@cgf.cx>
1193
1194         * cygtls.h (_cygtls::init_exception_handler): Eliminate argument.
1195         (_cygtls::andreas): Convert to a pointer.
1196         (san): Convert to a real class with methods.  Use a linked list to
1197         keep track of previous handlers on the "stack".
1198         (myfault): Rewrite to use new san class rather than calling directly
1199         into _cygtls.
1200         * cygtls.cc (_cygtls::init_exception_handler): Just assume that we're
1201         always using the standard exception handler.
1202         (_cygtls::init_thread): Reflect loss of argument to
1203         init_exception_handler.
1204         * dcrt0.cc (dll_crt0_1): Ditto.
1205         * dfcn.cc (dlopen): Ditto.
1206         (dlclose): Reset the exception handler after FreeLibrary.
1207         * dll_init.cc (dll_list::detach): Make sure that the exception handler
1208         is initialized before calling destructors.
1209         * exceptions.cc (_cygtls::handle_exceptions): Accommodate new andreas
1210         pointer.
1211         * thread.cc (verifyable_object_isvalid): Pass objectptr to faulted for
1212         explicit NULL pointer checking.
1213         * tlsoffsets.h: Regenerate.
1214
1215 2010-02-26  Christopher Faylor  <me+cygwin@cgf.cx>
1216
1217         * mkimport: cd away from temp directory or Windows will have problems
1218         removing the directory.
1219
1220 2010-02-26  Corinna Vinschen  <corinna@vinschen.de>
1221
1222         * libc/strptime.cc: Implement support for era, alt_digits and POSIX
1223         padding and width modifiers.
1224         (era_info_t): New type.
1225         (free_era_info): New static function to free era_info_t storage.
1226         (get_era_info): New static function to create era_info_t storage
1227         from LC_TIME era information.
1228         (alt_digits_t): New type.
1229         (get_alt_digits): New static function to create alt_digits_t storage
1230         from LC_TIME alt_digits information.
1231         (free_alt_digits): New static function to free alt_digits_t storage.
1232         (find_alt_digits): New static function to scan input for alternative
1233         digits and return them, if any.  Return NULL otherwise.
1234         (__strptime): New static function taking all code from strptime.
1235         Implement handling for E, O, +, 0, and width modifiers per POSIX-1.2008.
1236         (strptime): Convert into wrapper function to provide era_info and
1237         alt_digits pointers and call __strptime.
1238         (conv_num): Take additional alt_digits_t parameter and if it's not
1239         NULL, call find_alt_digits to convert.
1240
1241 2010-02-26  Corinna Vinschen  <corinna@vinschen.de>
1242
1243         * strsig.cc: Fix formatting and copyright.
1244
1245 2010-02-26  Pierre Humblet <Pierre.Humblet@ieee.org>
1246
1247         * security.cc (check_access): Use user.imp_token if appropriate.
1248         Set errno and return if DuplicateTokenEx fails .
1249
1250 2010-02-26  Corinna Vinschen  <corinna@vinschen.de>
1251
1252         Remove all traces of __CYGWIN_USE_BIG_TYPES__.
1253
1254         * include/cygwin/config.h: Move Cygwin-specific build flags from
1255         newlib's sys/config.h here.  Add a comment.
1256
1257 2010-02-25  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
1258
1259         * include/cygwin/signal.h: Define SIGPWR as synonym for SIGLOST.
1260         * strsig.cc: Ditto.
1261         * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR.
1262
1263 2010-02-25  Corinna Vinschen  <corinna@vinschen.de>
1264
1265         * lc_era.h (lc_era_t): Fix apparent glibc bug in ja_JP era definition.
1266
1267 2010-02-24  Corinna Vinschen  <corinna@vinschen.de>
1268
1269         * sec_auth.cc (get_full_privileged_inheritable_token): Fix dumb typo
1270         when checking linked token for being a primary token.
1271
1272 2010-02-24  Christopher Faylor  <me+cygwin@cgf.cx>
1273
1274         * dlfcn.cc (dlopen): Make sure exception handler is really loaded after
1275         dynamic load.
1276
1277 2010-02-23  Christopher Faylor  <me+cygwin@cgf.cx>
1278
1279         * cygtls.cc (_cygtls::init_exception_handler): Force installation of
1280         our exception handler to always be at the beginning.
1281
1282 2010-02-23  Christopher Faylor  <me+cygwin@cgf.cx>
1283
1284         * thread.cc (pthread_mutex::unlock): Don't attempt to unlock if there
1285         is an error.
1286
1287 2010-02-22  Christopher Faylor  <me+cygwin@cgf.cx>
1288
1289         * include/sys/strace.h: Define _STRACE_SPECIAL.
1290         (strace_printf_wrap): Fix NOSTRACE definitions.
1291         (strace_printf_wrap1): Fix NOSTRACE definitions.
1292         (special_printf): Define.
1293
1294         * thread.cc: Perform minor syntax fix in a comment.  Rename
1295         "is_good_initialzer*" to "is_initializer*" throughout.  Use
1296         pthread_printf rather than debug_printf throughout.  Add extra
1297         pthread_printf debugging throughout.
1298         (pthread_mutex::_new_mutex): New constant value.
1299         (pthread_mutex::_unlocked_mutex): Ditto.
1300         (pthread_mutex::_destroyed_mutex): Ditto.
1301         (pthread_mutex::no_owner): Define new function.
1302         (pthread_mutex::can_be_unlocked): Detect no_owner situation.  Handle
1303         PTHREAD_MUTEX_NORMAL as a special case.
1304         (pthread::create_cancel_event): Use C++ boolean values.
1305         (pthread::precreate): Use method to set mutex type.
1306         (pthread_cond::pthread_cond): Ditto.
1307         (pthread_rwlock::pthread_rwlock): Ditto.
1308         (pthread_mutex::pthread_mutex): Set owner to _new_mutex initially.
1309         (pthread_mutex::~pthread_mutex): Reset various elements to make it
1310         clearer if they are incorrectly reused.
1311         (pthread_mutex::lock): Add clarifying comment.
1312         (pthread_mutex::unlock): Attempt to handle various mutex types
1313         correctly.  In particular, reinstate ability to have one thread unlock
1314         another thread's mutex if type == PTHREAD_MUTEX_NORMAL.
1315         (semaphore::_fixup_after_fork): Avoid redundancy.
1316         (pthread_mutex::_fixup_after_fork): Ditto.  Fix debugging statement.
1317         (__pthread_cond_dowait): Accommodate changes to remove previously
1318         inexplicable use can_be_unblocked() as a static function.
1319         * thread.h: Rename "is_good_initialzer*" to "is_initializer*"
1320         throughout.
1321         (pthread_mutex): Reorganize.  Make many things private.
1322         (pthread_mutex::no_owner): Define new method.
1323         (pthread_mutex::_new_mutex): Define new constant.
1324         (pthread_mutex::_unlocked_mutex): Ditto.
1325         (pthread_mutex::_destroyed_mutex): Ditto.
1326
1327 2010-02-22  Corinna Vinschen  <corinna@vinschen.de>
1328
1329         * lc_era.h: Redefine lc_era_t to keep
1330         default date and time formats as well to workaround YA Windows
1331         shortcoming.  Refresh with latest data.
1332         * lc_msg.h: Refresh with latest data.
1333         * nlsfuncs.cc (__eval_datetimefmt): Revert latest change.
1334         (__set_lc_time_from_win): Rename res to era.  Prefer default date and
1335         time formats from era array if available.
1336         (__set_lc_messages_from_win): Rename res to msg.
1337
1338 2010-02-20  Corinna Vinschen  <corinna@vinschen.de>
1339
1340         * lc_era.h (lc_era): Fix "ja_JP" era_t_fmt entry to use traditional
1341         format.
1342         * nlsfuncs.cc (dt_flags): Remove DT_ERACAL since crippled era data
1343         in Windows makes it useless.
1344         (__eval_datetimefmt): Check if locale's default calender has
1345         non-gregorian start year.  Use era year also in default date entries,
1346         if so.
1347
1348 2010-02-20  Corinna Vinschen  <corinna@vinschen.de>
1349
1350         * path.cc (warn_msdos): Enforce extended hex printing of multibyte
1351         pathnames.
1352
1353 2010-02-19  Christopher Faylor  <me+cygwin@cgf.cx>
1354
1355         * include/sys/strace.h: Remove old code.  Add support for ptrace
1356         tracing.
1357
1358 2010-02-19  Corinna Vinschen  <corinna@vinschen.de>
1359
1360         * lc_era.h: New file.
1361         * nlsfuncs.cc: Include lc_era.h.
1362         (locale_cmp): convert arguments to char** to be usable for both types,
1363         lc_msg_t and lc_era_t.
1364         (__set_lc_time_from_win): Handle era-related data
1365
1366 2010-02-19  Corinna Vinschen  <corinna@vinschen.de>
1367
1368         * fhandler_disk_file.cc (fhandler_disk_file::opendir): Try to open
1369         directory with stat()-friendly access mask first.  Explain why.
1370
1371 2010-02-19  Corinna Vinschen  <corinna@vinschen.de>
1372
1373         * fhandler_disk_file.cc (fhandler_base::fstat_helper):  Set st_rdev
1374         to same value as st_dev.  Avoid useless debug output in executable
1375         check.  Add filename to debug output.
1376         (fhandler_disk_file::facl): Simplify code calling fstat methods to
1377         just call fstat to avoid errors with the cygdrive directory.
1378
1379 2010-02-18  Corinna Vinschen  <corinna@vinschen.de>
1380
1381         * nlsfuncs.cc (eval_datetimefmt): Rename force to flags.
1382         (enum dt_flags): Define.
1383         (__eval_datetimefmt): Change force to flags and change type to
1384         dt_flags.  Accommodate throughout.
1385         (__set_lc_time_from_win): Accommodate above change.  Set era-related
1386         values to empty strings for now.
1387
1388 2010-02-18  Christopher Faylor  <me+cygwin@cgf.cx>
1389
1390         * fhandler.cc (fhandler_base::setup_overlapped): Revert to starting
1391         with handle in signalled state as it seems to fix some hangs.
1392
1393 2010-02-15  Corinna Vinschen  <corinna@vinschen.de>
1394
1395         * path.cc (path_conv::check): Treat native DOS paths as "noacl".
1396
1397 2010-02-15  Corinna Vinschen  <corinna@vinschen.de>
1398
1399         * mount.cc (mount_info::conv_to_win32_path): Set UNC path flags to
1400         cygdrive prefix path flags.
1401
1402 2010-02-14  Christopher Faylor  <me+cygwin@cgf.cx>
1403
1404         * fhandler.cc (fhandler_base::setup_overlapped): Don't set signalled
1405         state to true initially.
1406         (fhandler_base::has_ongoing_io): Delete ill-advised function.
1407         (fhandler_base::read_overlapped): Rely on caller having checked
1408         nonblocking state.  Don't attempt to (incorrectly) check it here.
1409         (fhandler_base::write_overlapped): Remove call to has_ongoing_io.
1410         * select.cc (peek_pipe): Ditto.
1411         * fhandler.h (fhandler_base::has_ongoing_io): Delete declaration.
1412
1413 2010-02-14  Christopher Faylor  <me+cygwin@cgf.cx>
1414
1415         * regex/regcomp.c (xwcrtomb): Fix one explicable and one inexcplicable
1416         C warning.
1417
1418 2010-02-13  Corinna Vinschen  <corinna@vinschen.de>
1419
1420         * regex/regcomp.c (xwcrtomb): Don't convert Unicode chars outside the
1421         base plane always to UTF-8.  Call wcsnrtombs instead to allow arbitrary
1422         multibyte charsets.
1423
1424 2010-02-12  Corinna Vinschen  <corinna@vinschen.de>
1425
1426         * regex/regcomp.c (wgetnext): Use size_t as type for n2 since that's
1427         what's returned by mbrtowc.
1428         * regex/regexec.c (xmbrtowc): Ditto.
1429
1430 2010-02-12  Christopher Faylor  <me+cygwin@cgf.cx>
1431
1432         * pthread.cc (pthread_mutex_init): Explicitly fill out third arg to
1433         pthread_mutex::init.
1434         * thread.cc: Remov some obsolete comments.
1435         (verifyable_object_isvalid): Reflect change to use thread_magic_t for
1436         magic numbers.
1437         (pthread_mutex::pthread_mutex): Set magic number to invalid initially
1438         until we've verified that everything is valid.
1439         (pthread_mutex::unlock): Fix a comment.
1440         (verifyable_object::verifyable_object): Delete here.
1441         (~verifyable_object::~verifyable_object): Ditto.
1442         (pthread_mutex::init): Don't run is_good_initializer for non-static
1443         objects.
1444         * thread.h (thread_magic_t): New typedef.
1445         (verifyable_object::verifyable_object): Use thread_magic_t;
1446         (verifyable_object::magic): Ditto.
1447         (pthread_mutex::is_good_initializer_or_bad_object): Remove unneeded
1448         variable names.
1449         (pthread_mutex::can_be_unlocked): Ditto.
1450         (pthread_mutex::init): Ditto.  Remove default for third argument.
1451
1452 2010-02-12  Corinna Vinschen  <corinna@vinschen.de>
1453
1454         * regex/regcomp.c (xwcrtomb): New function to convert wide chars
1455         outside of the base plane to UTF-8.  Call throughout instead of
1456         wcrtomb.
1457         (wgetnext): Handle surrogate pairs on UTF-16 systems.
1458         * regex/regexec.c (xmbrtowc): Ditto.
1459
1460 2010-02-12  Corinna Vinschen  <corinna@vinschen.de>
1461
1462         * sec_auth.cc (get_user_local_groups): Retrieve name of well known
1463         builtin group from system.  Explain why.
1464         * sec_helper.cc (well_known_builtin_sid): New SID for BUILTIN group.
1465         * security.h (well_known_builtin_sid): Declare.
1466
1467 2010-02-11  Pierre Humblet <Pierre.Humblet@ieee.org>
1468
1469         * registry.cc (get_registry_hive_path): Add space in string.
1470
1471 2010-02-11  Corinna Vinschen  <corinna@vinschen.de>
1472
1473         * regex/engine.c (step): Drop Cygwin-specific definition.
1474         (NONCHAR): Better cast here to make the test work.  Move comment
1475         from step here.
1476         (matcher): Disable skipping initial string in multibyte case.
1477         * regex/regcomp.c (p_bracket): Don't simplify singleton in the invert
1478         case.
1479         (p_b_term): Handle early end of pattern after dash in bracket
1480         expression.
1481         (singleton): Don't ignore the wides just because there's already a
1482         singleton in the single byte chars.  Fix condition for a singleton
1483         wide accordingly.
1484         (findmust): Check for LC_CTYPE charset, rather than LC_COLLATE charset.
1485         * regex2.h (CHIN): Fix condition in the icase & invert case.
1486         (ISWORD): Fix wrong cast to unsigned char.
1487
1488 2010-02-11  Andy Koppe  <andy.koppe@gmail.com>
1489
1490         * nlsfuncs.cc (initial_setlocale): Move check whether charset has
1491         changed from here...
1492         (internal_setlocale): ...to here, to avoid unnecessary work when invoked
1493         via CW_INT_SETLOCALE.
1494
1495 2010-02-10  Corinna Vinschen  <corinna@vinschen.de>
1496
1497         * nlsfuncs.cc (__set_charset_from_locale): Allow "@euro" modifier only
1498         for locales which use EUR as currency.
1499
1500 2010-02-10  Corinna Vinschen  <corinna@vinschen.de>
1501
1502         * nlsfuncs.cc (__get_lcid_from_locale): Convert iu_CA to iu-Latn-CA
1503         rather than iu-Cans-CA on Vista and later.
1504         (__set_charset_from_locale): Set default charset for iu_CA to UTF-8.
1505
1506 2010-02-10  Christopher Faylor  <me+cygwin@cgf.cx>
1507
1508         * dcrt0.cc (_dll_crt0): Set _main_tls as early as possible.
1509         * thread.cc (pthread_mutex::can_be_unlocked): Remove check for
1510         MUTEX_OWNER_ANONYMOUS since it is racy and unsafe.
1511         (pthread::init_mainthread): Initialize thread directly from _my_tls.
1512         (pthread::self): Ditto.
1513         (pthread::get_tls_self_pointer): Delete.
1514         (pthread_mutex::pthread_mutex): Use an event rather than a semaphore.
1515         (pthread_mutex::lock): Rename from _<func>.  Derive self directly.
1516         (pthread_mutex::tryunlock): Ditto.
1517         (pthread_mutex::destroy): Ditto.
1518         (pthread_mutex::unlock): Ditto.  Accommodate change from semaphore to
1519         event.
1520         (pthread_mutex::_fixup_after_fork): Accommodate change from semaphore
1521         to event.
1522         (pthread_mutex::init): Don't attempt to initialize a semaphore unless
1523         it is in an initialized state.  Do this check under
1524         mutex_initialization_lock.lock
1525         * thread.h (fast_mutex::init): Use event rather than semaphore.
1526         (fast_mutex::lock): Ditto.
1527         (pthread_mutex::_lock): Delete.
1528         (pthread_mutex::_unlock): Ditto.
1529         (pthread_mutex::_trylock): Ditto.
1530         (pthread_mutex::_destroy): Ditto.
1531         (pthread_mutex::get_pthread_self): Ditto.
1532         (pthread_mutex::get_tls_self_pointer): Ditto.
1533         (pthread_mutex::lock): Un-inline.
1534         (pthread_mutex::unlock): Ditto.
1535         (pthread_mutex::trylock): Ditto.
1536         (pthread_mutex::destroy): Ditto.
1537
1538 2010-02-09  Christopher Faylor  <me+cygwin@cgf.cx>
1539
1540         * cygtls.h (struct _cygtls): Remove unneeded elements.
1541         * thread.cc (pthread::exit): Avoid potential double call to
1542         _my_tls.remove.
1543         * tlsoffsets.h: Regenerate.
1544
1545 2010-02-09  Corinna Vinschen  <corinna@vinschen.de>
1546
1547         * nlsfuncs.cc (lc_wcstombs): Add `return_invalid' flag to specify
1548         whether invalid chars should be ignored or not.  Change comment.
1549         (__set_lc_monetary_from_win): Call lc_wcstombs with return_invalid
1550         flag set.
1551         (__set_lc_messages_from_win): Simplify to accommodate the fact that
1552         lc_wcstombs just ignores invalid chars.  Explain why.
1553
1554 2010-02-09  Corinna Vinschen  <corinna@vinschen.de>
1555
1556         * nlsfuncs.cc (__set_lc_messages_from_win): Fix typo.
1557
1558 2010-02-09  Corinna Vinschen  <corinna@vinschen.de>
1559
1560         * lc_msg.h: New file, fix a problem in locales with modifiers.
1561
1562 2010-02-09  Corinna Vinschen  <corinna@vinschen.de>
1563
1564         * lc_msg.h: New file, generated from running Linux system.
1565
1566 2010-02-09  Corinna Vinschen  <corinna@vinschen.de>
1567
1568         * lc_msg.h: New file, autogenerated from CLDR data.
1569         * nlsfuncs.cc: Include lc_msg.h.
1570         (lc_time_buf): Remove.
1571         (lc_numeric_buf): Remove.
1572         (lc_monetary_buf): Remove.
1573         (lc_mbstowcs): Fix previous fix.
1574         (__set_lc_time_from_win): Take additional pointer to buffer pointer,
1575         defined in newlib.
1576         (__set_lc_numeric_from_win): Ditto.
1577         (__set_lc_monetary_from_win): Ditto.
1578         (locale_cmp): New static function.
1579         (__set_lc_messages_from_win): New function to be called from newlib.
1580
1581 2010-02-08  Corinna Vinschen  <corinna@vinschen.de>
1582
1583         * external.cc (cygwin_internal): Add CW_INT_SETLOCALE case to
1584         allow to call internal_setlocale().
1585         * nlsfuncs.cc (internal_setlocale): Make externally available.
1586         * include/cygwin/version.h: Bump API minor number.
1587         * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_INT_SETLOCALE.
1588
1589         * nlsfuncs.cc (lc_mbstowcs): Fix call to f_mbtowc.
1590         (__set_locale_from_locale_alias): Ignore "@cjknarrow" modifier.
1591
1592 2010-02-07  Corinna Vinschen  <corinna@vinschen.de>
1593
1594         * nlsfuncs.cc (__get_lcid_from_locale): Handle "@cyrillic" modifier
1595         for uz_UZ locale here.
1596         (__set_charset_from_locale): Accommodate above change.
1597
1598 2010-02-07  Corinna Vinschen  <corinna@vinschen.de>
1599
1600         * nlsfuncs.cc (__set_locale_from_locale_alias): New function to read
1601         locale aliases from /usr/share/locale/locale.alias.
1602
1603 2010-02-06  Corinna Vinschen  <corinna@vinschen.de>
1604
1605         * nlsfuncs.cc (__get_lcid_from_locale): Handle no_NO as nb_NO, rather
1606         than nn_NO.
1607
1608 2010-02-06  Corinna Vinschen  <corinna@vinschen.de>
1609
1610         * nlsfuncs.cc (has_modifier): MOve up in file to use in
1611         __get_lcid_from_locale as well.
1612         (__get_lcid_from_locale): Handle no_NO locale as alias for nn_NO.
1613         Default all sr_XY locales to Cyrillic script.  Change lcid to Latin
1614         script if "@latin" modifier has been specified.
1615         (__set_charset_from_locale): Handle Serbian in codepage 1251 case as
1616         well.  Also check for sr_BA lcid.  Restrict "@euro" modifier to
1617         locales otherwise defaulting to ISO-8859-1.
1618
1619 2010-02-06  Corinna Vinschen  <corinna@vinschen.de>
1620
1621         * nlsfuncs.cc (__set_charset_from_locale): Set default charset for
1622         "ka_GE" locale to GEORGIAN-PS, for "kk_KZ" to PT154.
1623
1624 2010-02-06  Corinna Vinschen  <corinna@vinschen.de>
1625
1626         * path.cc (symlink_info::check_nfs_symlink): Reopen file with
1627         FILE_READ_EA access since, surprisingly, you need it to read EAs even
1628         on NFS.
1629
1630 2010-02-06  Corinna Vinschen  <corinna@vinschen.de>
1631
1632         * sec_auth.cc (get_full_privileged_inheritable_token): New function
1633         to fetch token with full privileges from logon token in Vista and
1634         later, and to make token inheritable.  Add lengthy comments to explain
1635         the function's job.
1636         (cygwin_logon_user): Drop calling SetHandleInformation.  Enable TCB
1637         privilege and call get_full_privileged_inheritable_token.
1638         (lsaauth): Don't fetch linked token and don't make handle inheritable
1639         here, just call get_full_privileged_inheritable_token instead.
1640         (lsaprivkeyauth): Ditto.
1641
1642 2010-02-05  Corinna Vinschen  <corinna@vinschen.de>
1643
1644         * nlsfuncs.cc (__set_charset_from_locale): Set default charset for
1645         "uz_UZ" locale to ISO-8859-1, with the "@cyrillic" modifier to UTF-8.
1646
1647 2010-02-05  Christopher Faylor  <me+cygwin@cgf.cx>
1648
1649         * dll_init.cc (per_module::run_dtors): Use consistent method for
1650         running destructors.
1651
1652 2010-02-04  Christopher Faylor  <me+cygwin@cgf.cx>
1653
1654         * regcomp.c (p_ere): Workaround incorrect compiler warning.
1655         * regerror.c (regatoi): Return non-const string or compiler complains
1656         in certain inexplicable situations.
1657
1658 2010-02-04  Corinna Vinschen  <corinna@vinschen.de>
1659
1660         * regex/engine.c (step): Declare and define with `int ch' rather than
1661         `wint_t ch' parameter.  Explain why.
1662         (NONCHAR): Remove related Cygwin patch here, including wrong comment.
1663
1664 2010-02-04  Corinna Vinschen  <corinna@vinschen.de>
1665
1666         Replace regex files with multibyte-aware version from FreeBSD.
1667         * Makefile.in (install-headers): Remove extra command to install
1668         regex.h.
1669         (uninstall-headers): Remove extra command to uninstall regex.h.
1670         * nlsfuncs.cc (collate_lcid): Make externally available to allow
1671         access to collation internals from regex functions.
1672         (collate_charset): Ditto.
1673         * wchar.h: Add __cplusplus guards to make C-clean.
1674         * include/regex.h: New file, replacing regex/regex.h.  Remove UCB
1675         advertising clause.
1676         * regex/COPYRIGHT: Accommodate BSD license.  Remove UCB advertising
1677         clause.
1678         * regex/cclass.h: Remove.
1679         * regex/cname.h: New file from FreeBSD.
1680         * regex/engine.c: Ditto.
1681         (NONCHAR): Tweak for Cygwin.
1682         * regex/engine.ih: Remove.
1683         * regex/mkh: Remove.
1684         * regex/regcomp.c: New file from FreeBSD.  Tweak slightly for Cygwin.
1685         Import required collate internals from nlsfunc.cc.
1686         (p_ere_exp): Add GNU-specific \< and \> handling for word boundaries.
1687         (p_simp_re): Ditto.
1688         (__collate_range_cmp): Define.
1689         (p_b_term): Use Cygwin-specific collate internals.
1690         (findmust): Ditto.
1691         * regex/regcomp.ih: Remove.
1692         * regex/regerror.c: New file from FreeBSD.  Fix a few compiler warnings.
1693         * regex/regerror.ih: Remove.
1694         * regex/regex.7: New file from FreeBSD.  Remove UCB advertising clause.
1695         * regex/regex.h: Remove.  Replaced by include/regex.h.
1696         * regex/regexec.c: New file from FreeBSD.  Fix a few compiler warnings.
1697         * regex/regfree.c: New file from FreeBSD.
1698         * regex/tests: Remove.
1699         * regex/utils.h: New file from FreeBSD.
1700
1701 2010-02-03  Christopher Faylor  <me+cygwin@cgf.cx>
1702
1703         * sigproc.cc (get_proc_lock): Fix error message typo.
1704
1705 2010-02-03  Corinna Vinschen  <corinna@vinschen.de>
1706
1707         * fhandler_disk_file.cc (fhandler_base::fstat_helper): Workaround
1708         another bug in NWFS.  Add comment to explain why.  Improve debug output
1709         in case the NT calls to test for binary fail.
1710         * path.h (path_conv::fs_is_cifs): New method.
1711         (path_conv::fs_is_nwfs): New method.
1712
1713 2010-02-02  Corinna Vinschen  <corinna@vinschen.de>
1714
1715         * include/paths.h (_PATH_MNTTAB): Define.
1716         (_PATH_MOUNTED): Define.
1717         * include/mntent.h: Include paths.h.  Define MNTTAB and MOUNTED as their
1718         paths.h equivalents.  Add comment.
1719
1720 2010-02-01  Christopher Faylor  <me+cygwin@cgf.cx>
1721
1722         * dcrt0.cc (atexit_lock): Delete.
1723         (cygwin_exit): Remove atexit lock.
1724         (cygwin_atexit): Ditto.  Rename parameter to match newlib.  Call
1725         __cxa_atexit when invoked by a registered DLL.
1726         * dll_init.cc (remove_dll_atexit): Delete.
1727         (dll_list::find): New function.
1728         (dll_list::detach): Use dll_list::find to find dll associated with
1729         return address.  Use __cxa_finalize to run atexit functions associated
1730         with the dll.
1731         (cygwin_detach_dll): Don't assume that HANDLE == void *.
1732         * dll_init.h (dll_list::find): Declare.
1733         (__cxa_atexit): Ditto.
1734         (__cxa_finalize): Ditto.
1735
1736         * init.cc (dll_entry): Clarify comment.
1737
1738 2010-02-02  Dave Korn  <dave.korn.cygwin@gmail.com>
1739
1740         * how-startup-shutdown-works.txt: Add new document.
1741
1742 2010-01-29  Corinna Vinschen  <corinna@vinschen.de>
1743
1744         * sec_auth.cc (lsaauth): Use CYG_LSA_MAGIC as checksum start value to
1745         decouple from Cygwin release.
1746
1747 2010-01-29  Corinna Vinschen  <corinna@vinschen.de>
1748
1749         * libc/strfmon.c (__setup_vars): Test for an empty string rather than
1750         for a NULL pointer.
1751
1752 2010-01-29  Christopher Faylor  <me+cygwin@cgf.cx>
1753
1754         * dll_init.cc (remove_dll_atexit): New function.
1755         (dll_list::detach): Run any atexit handlers registered in the DLL prior
1756         to unloading.
1757
1758 2010-01-29  Christopher Faylor  <me+cygwin@cgf.cx>
1759
1760         * libc/strfmon.c (__setup_vars): Fix compiler warning about assigning
1761         const strings.  Compare a pointer to NULL rather than '\0'.
1762
1763         * dll_init.cc (dll_dllcrt0_1): Minor comment fix.
1764
1765         * pipe.cc (fhandler_pipe::create_selectable): Remove Win9x
1766         accommodation.
1767
1768 2010-01-29  Corinna Vinschen  <corinna@vinschen.de>
1769
1770         Throughout, use FileBothDirectoryInformation info class rather than
1771         FileDirectoryInformation info class to avoid problems with incomplete
1772         filesystem implementations.  Fix comments accordingly.
1773         * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Set
1774         fname->Length to 0 in error case to avoid potential crash in debug
1775         output.
1776         (fhandler_disk_file::readdir): Try to speed up the working default case.
1777         Check for STATUS_INVALID_NETWORK_RESPONSE as potential status value
1778         returned by filesystems not implementing FileIdBothDirectoryInformation.
1779         * ntdll.h (STATUS_INVALID_NETWORK_RESPONSE): Define.
1780         (FILE_BOTH_DIRECTORY_INFORMATION): Rename to official name.
1781         * path.cc (symlink_info::check): Don't request FILE_READ_EA access, it's
1782         not required for NFS.  Try to speed up the working default case.  Check
1783         for STATUS_INVALID_NETWORK_RESPONSE as potential status value returned
1784         by filesystems not supporting non-NULL EA parameters.  Fix the way
1785         fs.update is called.  Improve debug output.
1786
1787 2010-01-28  Corinna Vinschen  <corinna@vinschen.de>
1788
1789         * Makefile.in (tags, ctags, CTAGS)): Add rules to create tags file.
1790
1791 2010-01-25  Corinna Vinschen  <corinna@vinschen.de>
1792
1793         * nlsfuncs.cc (__get_lcid_from_locale): Add comments.  Fix typos in
1794         comments.  Make sure to set last_lcid every time.  Return locale
1795         without territory part as invalid.  Handle modern serbian territory
1796         names per ISO 3166 on older systems as well.  Add appropriate comment.
1797         (__set_charset_from_locale): Handle LCID for sr_CS as well to make older
1798         systems happy.
1799
1800 2010-01-25  Corinna Vinschen  <corinna@vinschen.de>
1801
1802         * nlsfuncs.cc (__set_charset_from_locale): Rearrange to set charset
1803         more closely aligned to Glibc.
1804
1805 2010-01-25  Corinna Vinschen  <corinna@vinschen.de>
1806
1807         * spawn.cc (spawn_guts): Only try to remove long path prefix from
1808         runpath if runpath is not NULL.
1809
1810 2010-01-25  Corinna Vinschen  <corinna@vinschen.de>
1811
1812         * nlsfuncs.cc (__get_lcid_from_locale):  Fix a comment.  Handle special
1813         language/TERRITORY combinations explicitely.  Explain why.
1814
1815 2010-01-24  Corinna Vinschen  <corinna@vinschen.de>
1816
1817         * nlsfuncs.cc (__set_charset_from_locale): Fix comment.
1818
1819 2010-01-24  Corinna Vinschen  <corinna@vinschen.de>
1820
1821         * nlsfuncs.cc (check_codepage): Move from syscalls.cc here.
1822         (internal_setlocale): Ditto.
1823         (initial_setlocale): Ditto.
1824         (setlocale): Ditto.
1825         * strfuncs.cc (__sjis_wctomb): Revert previous patch.
1826         (__sjis_mbtowc): Ditto.
1827         * syscalls.cc: Move setlocale-related functions to nlsfuncs.cc.
1828
1829 2010-01-23  Corinna Vinschen  <corinna@vinschen.de>
1830
1831         * strfuncs.cc (__sjis_wctomb): Special handling for characters which
1832         differ between SJIS and Windows codepage 932, if charset is "SJIS".
1833         (__sjis_mbtowc): Ditto.
1834         (_jis_wctomb): Remove.
1835         (__jis_mbtowc): Remove.
1836
1837 2010-01-23  Corinna Vinschen  <corinna@vinschen.de>
1838
1839         * nlsfuncs.cc (wcsxfrm): Call LCMapStringW with LCMAP_BYTEREV flag to
1840         allow correct comparison using wcscmp.
1841
1842 2010-01-22  Corinna Vinschen  <corinna@vinschen.de>
1843
1844         * posix.sgml (strfmon): Move to implemented SUSv4 API.
1845
1846 2010-01-22  Corinna Vinschen  <corinna@vinschen.de>
1847
1848         * Makefile.in (DLL_OFILES): Add nlsfunc.o and strfmon.o.
1849         * autoload.cc (LocaleNameToLCID): Define.
1850         * cygwin.din (strfmon): Export.
1851         * nlsfuncs.cc: New file.  Define a lot of internal functions called
1852         from setlocale.
1853         (wcscoll): Implement locale-aware here, using CompareStringW function.
1854         (strcoll): Ditto.
1855         (wcsxfrm): Implement locale-aware here, usingLCMapStringW function.
1856         (strxfrm): Ditto.
1857         (__set_charset_from_locale): Replace __set_charset_from_codepage.
1858         Return Linux-compatible charset.
1859         * strfuncs.cc (__set_charset_from_codepage): Remove.
1860         * wchar.h (__set_charset_from_codepage): Drop definition.
1861         * wincap.h (wincaps::has_localenames): New element.
1862         * wincap.cc: Implement above element throughout.
1863         * libc/strfmon.c: New file.
1864         * libc/strptime.cc: Remove locale constant strings in favor of
1865         access to locale-specifc data.
1866         (strptime): Point _CurrentTimeLocale to locale-specific data.
1867         Throughout use correct locale-specific format fields for all
1868         locale-specific formats.
1869         * include/monetary.h: New file.
1870         * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
1871
1872 2010-01-18  Corinna Vinschen  <corinna@vinschen.de>
1873
1874         * strfuncs.cc: Remove needless includes.
1875
1876 2010-01-17  Corinna Vinschen  <corinna@vinschen.de>
1877
1878         * syscalls.cc (internal_setlocale): Use UTF-8 internally if external
1879         charset is ASCII.
1880
1881 2010-01-15  Corinna Vinschen  <corinna@vinschen.de>
1882
1883         * libc/fnmatch.c: Replace with multibyte capable version from FreeBSD.
1884
1885 2010-01-15  Corinna Vinschen  <corinna@vinschen.de>
1886
1887         * fhandler_socket.cc (fhandler_socket::accept4): Reset async flag
1888         on accepted socket.
1889
1890 2010-01-15  Pierre A. Humblet  <phumblet@phumblet.no-ip.org>
1891
1892         * fhandler_socket.cc (fhandler_socket::accept4): Set nonblocking
1893         flag exactly according to flags, as on Linux.
1894         * net.cc (cygwin_accept): Maintain BSD semantics here.
1895
1896 2010-01-15  Corinna Vinschen  <corinna@vinschen.de>
1897
1898         * cygwin.din (accept4): Export.
1899         * fhandler.h (fhandler_socket::accept4): Rename from accept.  Take
1900         additional flag parameter.
1901         * fhandler_socket.cc (fhandler_socket::accept4): Ditto.  Handle
1902         SOCK_NONBLOCK and SOCK_CLOEXEC flags.
1903         * net.cc (cygwin_socket): Handle SOCK_NONBLOCK and SOCK_CLOEXEC flags
1904         in type.  Check for invalid flag values.
1905         (socketpair): Ditto.
1906         (cygwin_accept): Accommodate renaming of fhandler_socket::accept
1907         function to accept4.
1908         (accept4): New function.
1909         * posix.sgml: Mention accept4 as GNU extensions.
1910         * include/cygwin/socket.h (SOCK_NONBLOCK): Define.
1911         (SOCK_CLOEXEC): Define.
1912         (_SOCK_FLAG_MASK): Define when building Cygwin.
1913         * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
1914         * include/sys/socket.h (accept4): Declare.
1915
1916 2010-01-15  Corinna Vinschen  <corinna@vinschen.de>
1917
1918         * posix.sgml: Mention dup3 and pipe2 as GNU extensions.
1919
1920 2010-01-14  Corinna Vinschen  <corinna@vinschen.de>
1921
1922         * dcrt0.cc (dll_crt0_1): Reset locale to "C" at the last moment before
1923         calling the application's main.
1924         * syscalls.cc (internal_setlocale): Don't reset locale to "C here.
1925         Change comment accordingly.
1926
1927 2010-01-14  Corinna Vinschen  <corinna@vinschen.de>
1928
1929         * cygwin.din (dup3): Export.
1930         (pipe2): Export.
1931         * dtable.cc (dtable::dup_worker): Take additional flags parameter.
1932         Handle O_CLOEXEC flag.
1933         (dtable::dup3): Rename from dup2.  Take additional flags parameter.
1934         Check for valid flags.  Drop check for newfd == oldfd.
1935         * dtable.h (dtable::dup_worker): Add flags parameter.
1936         (dtable::dup3): Rename from dup2.
1937         * fcntl.cc (fcntl64): Add F_DUPFD_CLOEXEC case.
1938         * fhandler.h (fhandler_mailslot::get_object_attr): Add flags parameter.
1939         * fhandler.cc (fhandler_base::open): Use security attribute with
1940         inheritance according to setting of O_CLOEXEC flag.
1941         * fhandler_console.cc (fhandler_console::open): Ditto.
1942         * fhandler_fifo.cc (sec_user_cloexec): New inline function to
1943         create security attribute with inheritance according to setting of
1944         O_CLOEXEC flag.
1945         (fhandler_fifo::open): Call sec_user_cloexec to fetch security
1946         attribute.
1947         (fhandler_fifo::wait): Ditto.
1948         * fhandler_mem.cc (fhandler_dev_mem::open): Ditto.
1949         * fhandler_mailslot.cc (fhandler_mailslot::get_object_attr): Take
1950         additional flags parameter.  Use security attribute with inheritance
1951         according to setting of O_CLOEXEC flag.
1952         (fhandler_mailslot::open): Call get_object_attr with flags parameter.
1953         * fhandler_registry.cc (fhandler_registry::open): Call set_close_on_exec
1954         on real handles to accommodate O_CLOEXEC flag.
1955         * fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
1956         * fhandler_tape.cc: Create mutex with inheritance according to setting
1957         of O_CLOEXEC flag.
1958         * pipe.cc: Replace usage of O_NOINHERIT with O_CLOEXEC.
1959          (fhandler_pipe::init): Simplify setting close_on_exec flag.
1960         (fhandler_pipe::open): Remove setting close_on_exec flag.
1961         (fhandler_pipe::create): Use security attribute with inheritance
1962         according to setting of O_CLOEXEC flag.
1963         (pipe2): New exported function.
1964         * posix_ipc.cc: Throughout, open backing files with O_CLOEXEC
1965         flag to follow POSIX semantics.
1966         * security.h (sec_none_cloexec): New define.
1967         * syscalls.cc (dup): Add missing extern "C" qualifier.  Accommodate
1968         renaming of dtable::dup2 to dtable::dup3.
1969         (dup2): Ditto.  Check newfd == oldfd here.
1970         (dup3): New function.  Check newfd == oldfd here.
1971         (open): Set close_on_exec flag according to O_CLOEXEC flag before
1972         calling fhandler->open.
1973         * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
1974
1975 2010-01-13  Corinna Vinschen  <corinna@vinschen.de>
1976
1977         * include/fcntl.h (O_TTY_INIT): Define as 0.
1978
1979 2010-01-13  Corinna Vinschen  <corinna@vinschen.de>
1980
1981         * fhandler_tty.cc (fhandler_tty_master::init): Don't erase all default
1982         termios settings of slave console.
1983
1984 2010-01-13  Corinna Vinschen  <corinna@vinschen.de>
1985
1986         * syscalls.cc (rename): Don't exit prematurely with EROFS when trying
1987         to rename an AF_LOCAL socket or when trying to replace an AF_LOCAL
1988         socket.
1989
1990 2010-01-12  Corinna Vinschen  <corinna@vinschen.de>
1991
1992         * globals.cc (ro_u_nwfs): New R/O unicode string.
1993         * mount.cc (fs_info::update): Check for NWFS filesystem.  Set
1994         has_buggy_basic_info, if so.  Add comment to explain why.
1995         (fillout_mntent): Add "nwfs" string to fs_names array.
1996         * mount.h (enum fs_info_type): Add nwfs.
1997         (class fs_info): Add has_buggy_basic_info status flag.  Add accessors
1998         for has_buggy_basic_info and is_nwfs.
1999         * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Accommodate
2000         filesystems with broken FileBasicInformation handling.
2001         * path.cc (symlink_info::check): Ditto.
2002         * path.h (path_conv::has_buggy_basic_info): Add method.
2003
2004 2010-01-12  Corinna Vinschen  <corinna@vinschen.de>
2005
2006         * dtable.cc (build_fh_name_worker): Remove.  Move all functionality
2007         back into build_fh_name.
2008         (build_fh_name): Drop unused HANDLE parameter.  Drop call to pc.fillin.
2009         Remove disabled build_fh_name with UNICODE_STRING name parameter.
2010         * dtable.h (build_fh_name): Drop HANDLE parameter from declaration.
2011         Remove declaration for build_fh_name with UNICODE_STRING name parameter.
2012         * path.cc (path_conv::fillin): Remove.
2013         (symlink_info::check): Fix comment.
2014         * path.h (path_conv::fillin): Remove declaration.
2015         * dir.cc: Accommodate change in build_fh_name parameters throughout.
2016         * sec_acl.cc: Ditto.
2017         * syscalls.cc: Ditto.
2018
2019         * ntea.cc (getxattr_worker): Fix debug output.
2020         (setxattr_worker): Ditto.
2021         * times.cc (utimens_worker): Ditto.
2022
2023 2010-01-11  Corinna Vinschen  <corinna@vinschen.de>
2024
2025         * fhandler_proc.cc (format_proc_stat): Use new in_buf.
2026         (format_proc_cpuinfo): Replace szBuffer with a union in_buf.  Use type
2027         correct throughout.  Add a couple of missing or newer cpu flags.  Allow
2028         certain AMD flags for intel as well.
2029
2030 2010-01-10  Corinna Vinschen  <corinna@vinschen.de>
2031
2032         * fhandler.h (fhandler_base::fstat_helper): Declare timestamps as
2033         PLARGE_INTEGER.
2034         * fhandler_disk_file.cc (fhandler_base::fstat_by_handle):
2035         Accommodate fstat_helper change of timestamp arguments.
2036         (fhandler_base::fstat_by_name): Ditto.
2037         (fhandler_base::fstat_helper): Define with timestamps as PLARGE_INTEGER.
2038         Accommodate in call to to_timestruc_t.
2039
2040 2010-01-08  Corinna Vinschen  <corinna@vinschen.de>
2041
2042         * sec_auth.cc (get_token_group_sidlist): Add BUILTIN\Users account
2043         to all created tokens.
2044         * sec_helper.cc (well_known_users_sid): Define as BUILTIN\Users.
2045         * security.h (well_known_users_sid): Declare.
2046
2047 2010-01-01  Christopher Faylor  <me+cygwin@cgf.cx>
2048
2049         * dcrt0.cc: Bump copyright.
2050
2051 2010-01-01  Christopher Faylor  <me+cygwin@cgf.cx>
2052
2053         * dcrt0.cc (dll_crt0_1): Move internal locale setting prior to
2054         potential globify to prevent creation of unglobbed filenames in the
2055         wrong character set.