]> sourceware.org Git - newlib-cygwin.git/blame - winsup/cygwin/ChangeLog
* syscalls.cc (gethostid): Use correct path to ProductId registry value.
[newlib-cygwin.git] / winsup / cygwin / ChangeLog
CommitLineData
41c91ad6
CV
12010-09-28 Corinna Vinschen <corinna@vinschen.de>
2
3 * syscalls.cc (gethostid): Use correct path to ProductId registry value.
4
3f1d4f87
CV
52010-09-27 Corinna Vinschen <corinna@vinschen.de>
6
7 * mount.cc (fs_info::update): Remove erroneous NtClose on random handle
8 value.
9
ebdc75d9
CV
102010-09-26 Corinna Vinschen <corinna@vinschen.de>
11
12 * uinfo.cc (cygheap_user::init): Call GetUserNameW and convert to
13 multibyte here so as not to rely on the current ANSI page.
14
71ef2142
CF
152010-09-26 Christopher Faylor <me+cygwin@cgf.cx>
16
17 * dcrt0.cc (__main): Force signal synchronization.
18
92626feb
CV
192010-09-25 Corinna Vinschen <corinna@vinschen.de>
20
6fe59500
CV
21 * fhandler_socket.cc (fhandler_socket::bind): Drop has_exclusiveaddruse
22 condition. Fix comment about availability. Move remaining comment to
23 the right spot. Drop has_ip_helper_lib condition.
24 * net.cc (cygwin_setsockopt): Drop has_disabled_user_tos_setting
25 condition. Fix comment.
26 (get_2k_ifs): Fix comment.
27 (get_nt_ifs): Remove.
28 (getifaddrs): Drop call to get_nt_ifs.
29 (get_ifconf): Ditto.
30 * wincap.cc: Throughout, drop has_ip_helper_lib,
31 has_disabled_user_tos_setting, and has_exclusiveaddruse settings from
32 wincaps.
33 (wincap_unknown): Remove.
34 (wincap_nt4): Remove.
35 (wincap_minimal): New macro, set to wincap_nt4sp4 for now.
36 (wincapc::init): Drop test for pre-SP4 NT4. Just imply at least NT SP4.
37 Replace references to wincap_unknown with references to wincap_minimal.
38 * wincap.h (struct wincaps): Drop has_ip_helper_lib,
39 has_disabled_user_tos_setting, and has_exclusiveaddruse flags and
40 methods.
41
422010-09-25 Corinna Vinschen <corinna@vinschen.de>
43
44 * autoload.cc: Throughout, order entry points alphabetically by DLL
92626feb
CV
45 and function name. Make functions which are available on all supported
46 systems non-optional. Fix return value on entry points imported from
47 secur32.dll. Add comment.
48 (std_dll_init): Call fesetenv unconditionally.
49
8d07b1aa
CF
502010-09-24 Christopher Faylor <me+cygwin@cgf.cx>
51
52 * autoload.cc (std_dll_init): Move dll_path closer to its use. Use
53 dll_path in fatal error. Set ret values under lock control.
54 * lib/minires.c (res_nsend): Fix compilation errors owing to pointer
55 signedness.
56
7438a10a
CV
572010-09-24 Corinna Vinschen <corinna@vinschen.de>
58
59 * fhandler.cc (fhandler_base::open): Handle query_write_dac flag.
60 * fhandler.h (enum query_state): Add query_write_dac flag.
61 * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Open file
62 with query_write_dac instead of query_write_control.
63
3498f76d
CV
642010-09-24 Corinna Vinschen <corinna@vinschen.de>
65
66 * errno.cc (errmap): Map ERROR_BAD_NET_RESP to ENOSYS.
67 * fhandler_disk_file.cc (fhandler_disk_file::facl): Handle ENOSYS and
68 point to the explanation.
69 * ntdll.h (STATUS_NOT_IMPLEMENTED): Define.
70 * path.cc (symlink_info::check): Handle the inability of NT4 to use
71 FileNetworkOpenInformation on share root dirs in either direction.
72 * path.h (slash_unc_prefix_p): Remove unused declaration.
73 * security.cc (get_info_from_sd): Handle ENOSYS from get_file_sd.
74 Explain when this happens.
75
b3755579
CF
762010-09-23 Christopher Faylor <me+cygwin@cgf.cx>
77
78 * autoload.cc (std_dll_init): Use correct format type when displaying
79 dll name in error output.
80
5c22068f
PH
812010-09-21 Pierre Humblet <Pierre.Humblet@ieee.org>
82
83 * libc/minires.c (res_nsend): Use the Windows resolver if appropriate.
84 (dn_expand): Only set errno in case of error. Delete old comments.
85 (dn_skipname): Fix typo in comment.
86
b53c1929
CV
872010-09-21 Corinna Vinschen <corinna@vinschen.de>
88
89 * path.cc (cwdstuff::set): Replace constant 2 with sizeof(WCHAR) where
90 appropriate.
91
4c9d01fd
CV
922010-09-21 Corinna Vinschen <corinna@vinschen.de>
93
94 * mount.h (class fs_info): Add has_buggy_reopen flag and accessor
95 methods.
96 * mount.cc (fs_info::update): Set has_buggy_reopen flag for NWFS.
97 Add comment.
98 * path.h (path_conv::get_object_attr) Make inline method.
99 (path_conv::init_reopen_attr): New inline method.
100 * path.cc (path_conv::get_object_attr): Remove.
101 * fhandler_disk_file.cc (fhandler_base::fstat_helper): Use
102 path_conv::init_reopen_attr method to initialize OBJECT_ATTRIBUTE for
103 reopening file.
104 (fhandler_disk_file::fchmod): Ditto.
105 (fhandler_base::utimens_fs): Ditto.
106 (fhandler_disk_file::rewinddir): Ditto.
107 * syscalls.cc (unlink_nt): Ditto.
108
7ba1698e
CV
1092010-09-21 Corinna Vinschen <corinna@vinschen.de>
110
111 * fhandler.cc (fhandler_base::open): Always open NFS files with
112 FILE_READ_EA, even when opening with O_WRONLY to allow fstat.
113 * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Call
114 FlushFileBuffers if file has been opened for writing. Explain why.
115 (fhandler_base::fstat_by_handle): Renew content of pc.fnoi if called
116 via fstat. Explain why. Fix formatting.
117 * path.cc (symlink_info::check): Try to open file the second time with
118 FILE_READ_EA permissions since it's needed in later calls to
119 fhandler_base::fstat_by_nfs_ea.
120
df4d2bea
CF
1212010-09-20 Christopher Faylor <me+cygwin@cgf.cx>
122
123 * include/sys/cygwin.h (PID_NOTCYGWIN): New enum.
124 * spawn.cc (spawn_guts): Set a flag when a process is not a cygwin
125 process.
126 * fhandler_tty.cc (fhandler_tty_slave::init): Remove previous change.
127 Try a different method to determine when we should become the process
128 group owner.
129 * signal.cc (kill0): Remove archaic code which dealt with never-set
130 flag.
131
73b6b43e
CF
1322010-09-20 Christopher Faylor <me+cygwin@cgf.cx>
133
134 * fhandler_tty.cc (fhandler_tty_slave::init): Add additional checks to
135 determine when a process should grab control of a tty's pgid. Use
136 being_debugged() for consistency.
137 * debug.h (being_debugged): Remove vestige of win9x accommodation.
138
b6473313
CF
1392010-09-19 Christopher Faylor <me+cygwin@cgf.cx>
140
141 * wincap.h (wincaps::has_buggy_thread_startup): Declare.
142 (wincapc::has_buggy_thread_startup): Ditto.
143 * wincap.cc::wincap_*): Accommodate has_buggy_thread_startup.
144 (wincapc::init): Explicitly turn off has_buggy_thread_startup if not
145 WOW64.
146 * cygthread.h (cygthread::thread_handle): Declare/define new method.
147 * dcrt0.cc (_dll_crt0): Don't call __sinit here.
148 (dll_crt0_0): Don't call sigproc_init during initialization
149 if wincap.has_buggy_thread_startup().
150 (dll_crt0_1): Defer sigproc_init to here when
151 wincap.has_buggy_thread_startup(). Call __sinit after we've determined
152 that we're not forking.
153 (__main): Rework comments. Add potential future reminder.
154
421ff3ff
CV
1552010-09-15 Corinna Vinschen <corinna@vinschen.de>
156
157 * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Fetch number
158 of links and inode number only if path has good inodes.
159 (fhandler_base::fstat_by_name): Fetch inode number only if path has
160 good inodes.
161
1df35772
CV
1622010-09-14 Corinna Vinschen <corinna@vinschen.de>
163
164 * path.cc (symlink_info::check): Make sure AllocationSize and EndOfFile
165 are stored in the right order when fetching the info from the
166 NtQueryDirectoryFile result.
167
27e79675
CV
1682010-09-13 Corinna Vinschen <corinna@vinschen.de>
169
170 * fhandler_process.cc (get_mem_values): Simplify code. Fix
171 NtQueryVirtualMemory loop so it handles memory allocation gracefully.
172 Always set errno to a useful value.
173
c80480bf
CV
1742010-09-13 Corinna Vinschen <corinna@vinschen.de>
175
176 * fhandler.h (class fhandler_base): Change inheritance of fstat_helper
177 and fstat_by_... methods to private.
178 (fhandler_base::fstat_helper): Drop all redundant arguments.
179 * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Drop call
180 to fstat_by_nfs_ea here. Drop fetching basic file information.
181 Drop setting file attributes. Accommodate change in fstat_helper call.
182 (fhandler_base::fstat_by_name): Simplify. Only fetch directory
183 information to get the inode number. Drop setting file attributes.
184 Accommodate change in fstat_helper call.
185 (fhandler_base::fstat_fs): Call fstat_by_nfs_ea if on NFS.
186 (fhandler_base::fstat_helper): Drop all redundant arguments. Use
187 information already collected in the fhandler. Move heading comment
188 into code and drop dwFileAttributes comment.
189 * mmap.cc (mmap64): Call fstat_fs rather than fstat_by_handle.
190 * mount.cc (fs_info::update): Note that has_buggy_basic_info is unused.
191 * path.cc (symlink_info::check_reparse_point): Add comment.
192 (symlink_info::check): Fetch FileNetworkOpenInformation rather than
193 FileBasicInformation throughout, except on NFS. Explain why. Store
194 FILE_NETWORK_OPEN_INFORMATION in conv_hdl. Remove
195 FILE_ATTRIBUTE_DIRECTORY attribute in conv_hdl for reparse point
196 symlinks.
197 * path.h (class path_conv_handle): Add FILE_NETWORK_OPEN_INFORMATION
198 member _fnoi.
199 (path_conv_handle::fnoi): New accessor method for _fnoi.
200 (path_conv::fnoi): New accessor method for cubv_hdl._fnoi.
201
202 * fhandler_tty.cc (fhandler_tty_slave::init): Use tty::setpgid method.
203
f7382efe
CV
2042010-09-12 Corinna Vinschen <corinna@vinschen.de>
205
206 * sec_acl.cc (acl_worker): Remove.
207 (acl32): Implement acl_worker functionality here.
208 (lacl32): Just return -1 with errno set to ENOSYS.
209 (lacl): Ditto.
210 * include/cygwin/acl.h (lacl): Remove this call.
211
11fef787
CF
2122010-09-12 Christopher Faylor <me+cygwin@cgf.cx>
213
214 * sigproc.cc (sig_dispatch_pending): Remove debugging statement.
215 (sigproc_init): Wrap a long line.
216
6c6eb02b
CF
2172010-09-12 Christopher Faylor <me+cygwin@cgf.cx>
218
219 * cygthread.h (cygthread::cygthread): Reorganize slightly.
220 * dcrt0.cc (dll_crt0_0): Move sigproc initialization later to ensure
221 everything we need has been set up.
222 (dll_crt0_1): Streamline some logic slightly.
223 * sigproc.cc (no_signals_available): Add back dropped test for macro
224 parameter.
225 * fhandler_console.cc (fhandler_console::write): Show a little bit of
226 what's being written to the console in debugging output.
227
18df3935
CV
2282010-09-12 Corinna Vinschen <corinna@vinschen.de>
229
230 * syscalls.cc (start_transaction): Make inline function. Move up to be
231 more generally available.
232 (stop_transaction): Ditto.
233 (unlink_nt): Potentially start transaction when trying to delete file
234 with DOS R/O attribute set. If file is .lnk symlink, check for number
235 of hardlinks. Add "out" label and only return via "out". Rearrange
236 reversion of DOS R/O attribute and, on success, only revert R/O
237 attribute if file is .lnk symlink with more than one hardlink. Add
238 length comment to explain why.
239
99544f92
CV
2402010-09-11 Corinna Vinschen <corinna@vinschen.de>
241
242 * fhandler_disk_file.cc (fhandler_disk_file::rmdir): More thoroughly
243 check the existence condition on remote drives. Enhance comment.
244
0f81b5d4
DK
2452010-09-11 Dave Korn <dave.korn.cygwin@gmail.com>
246
247 * Makefile.in (DLL_OFILES): Add new fenv.o module.
248 (fenv_CFLAGS): New flags definition for fenv.o compile.
249 * autoload.cc (std_dll_init): Use fenv.h functions instead of direct
250 manipulation of x87 FPU registers.
251 * crt0.c (mainCRTStartup): Likewise.
252 * cygwin.din (feclearexcept, fegetexceptflag, feraiseexcept,
253 fesetexceptflag, fetestexcept, fegetround, fesetround, fegetenv,
254 feholdexcept, fesetenv, feupdateenv, fegetprec, fesetprec,
255 feenableexcept, fedisableexcept, fegetexcept, _feinitialise,
256 _fe_dfl_env, _fe_nomask_env): Export new functions and data items.
257 * fenv.cc: New file.
258 * posix.sgml: Update status of newly-implemented APIs.
259 * include/fenv.h: Likewise related header.
260 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
261
f7dea7f2
CV
2622010-09-10 Corinna Vinschen <corinna@vinschen.de>
263
264 * syscalls.cc (rename): Limit retry loop in case of sharing violation
265 to about a second.
266
396561aa
CV
2672010-09-10 Corinna Vinschen <corinna@vinschen.de>
268
269 * syscalls.cc (fstatat): Call stat_worker directly from here.
270
4e8f539f
CV
2712010-09-10 Corinna Vinschen <corinna@vinschen.de>
272
273 * flock.cc (allow_others_to_sync): Define MAX_PROCESS_SD_SIZE. Use
274 instead of ACL_DEFAULT_SIZE.
275 * sec_acl.cc (setacl): Use TLS buffer to allow maximum ACL size.
276 * security.h (ACL_DEFAULT_SIZE): Drop definition.
277 (ACL_MAXIMUM_SIZE): Define.
278 (SD_MAXIMUM_SIZE): Define.
279 * security.cc (get_file_sd): Allocate security_decscriptor with size
280 SD_MAXIMUM_SIZE.
281 (alloc_sd): Use TLS buffer to allow maximum ACL size.
282
f65c5a0a
CV
2832010-09-10 Corinna Vinschen <corinna@vinschen.de>
284
285 * mount.cc (class fs_info_cache): New class to cache filesystem
286 information.
287 (fs_info::update): Check FileFsVolumeInformation against filesystem
288 cache and use it, if filesystem is already available. Add filesystem
289 to cache, if not. Only request FileFsObjectIdInformation if
290 FILE_SUPPORTS_OBJECT_IDS is set in filesystem flags.
291 * ntdll.h (struct _FILE_FS_VOLUME_INFORMATION): Add pragma pack so the
292 structure size is matching the OS expectations. Add __dummy member
293 used in filesystem cache.
294
67a93078
CV
2952010-09-10 Corinna Vinschen <corinna@vinschen.de>
296
297 * security.cc (get_file_sd): Add bool parameter justcreated. Use
298 GetSecurityInfo only if justcreated is true, NtQuerySecurityObject
299 otherwise. Add comment to explain why. Don't waste time to call
300 NtQuerySecurityObject twice, just allocate big enough area.
301 (get_file_attribute): Call get_file_sd with justcreated set to false.
302 (set_file_attribute): Call get_file_sd with justcreated depending on
303 S_JUSTCREATED pseudo file attribute.
304 (check_file_access): Call get_file_sd with justcreated set to false.
305 * sec_acl.cc (setacl): Ditto.
306 (getacl): Ditto.
307 * security.h: Convert many functions to regparm functions.
308 (get_file_sd): Declare with extra bool parameter.
309
28e19baf
CV
3102010-09-10 Corinna Vinschen <corinna@vinschen.de>
311
312 * fhandler_procsys.cc (fhandler_procsys::exists): Rearrange to handle
313 dangling symlinks correctly. Fix comments.
314 (fhandler_procsys::fill_filebuf): Remove useless comment.
315
f99de2b3 3162010-09-08 Corinna Vinschen <corinna@vinschen.de>
fa3ab15b 317
f99de2b3
CV
318 * fhandler_procsys.cc (fhandler_procsys::open): Simplify by just
319 calling fhandler_base::open.
fa3ab15b 320
43f65cdd
CV
3212010-09-06 Corinna Vinschen <corinna@vinschen.de>
322
323 * Makefile.in (DLL_OFILES): Add fhandler_procsys.o.
324 * devices.h (enum fh_devices): Add FH_PROCSYS.
325 * devices.in (dev_procsys_storage): New device.
326 * devices.cc: Regenerate.
327 * dtable.cc (build_fh_pc): Add code to allocate fhandler_procsys.
328 * fhandler.h (proc_len): Convert to size_t.
329 (procsys): Declare.
330 (procsys_len): Declare.
331 (enum virtual_ftype_t): Move here from fhandler_virtual.h.
332 Add members supported by fhandler_procsys.
333 (fhandler_virtual::exists): Return virtual_ftype_t. Change
334 in all derived classes.
335 (class fhandler_procsys): New class.
336 (fhandler_union): Add fhandler_procnet and fhandler_procsys members.
337 * fhandler_disk_file.cc (__DIR_mounts::check_missing_mount): Use
338 ro_u_proc.
339 (fhandler_base::fstat_by_handle): Don't copy attributes if file is an
340 NT device.
341 (fhandler_base::fstat_by_name): Ditto.
342 * fhandler_netdrive.cc (fhandler_netdrive::exists): Return
343 virtual_ftype_t.
344 * fhandler_proc.cc (proc_tab): Sort alphabetically. Use _VN macro
345 to store length.
346 (proc_len): Change to size_t.
347 (proc_tab_cmp): New static function.
348 (virt_tab_search): New function to search entry in virt_tab_t
349 arrays. Use throughout in /proc and sibling classes instead of
350 loop.
351 (fhandler_proc::exists): Return virtual_ftype_t.
352 * fhandler_process.cc (process_tab): Sort alphabetically. Use _VN
353 macro to store length.
354 (fhandler_process::exists): Return virtual_ftype_t.
355 (fhandler_process::open): Simplify code.
356 * fhandler_procnet.cc (procnet_tab): Sort alphabetically. Use _VN
357 macro to store length.
358 (fhandler_procnet::exists): Return virtual_ftype_t.
359 (fhandler_procnet::open): Simplify.
360 * fhandler_procsys.cc: New file.
361 * fhandler_registry.cc (fhandler_registry::exists): Return
362 virtual_ftype_t.
363 * fhandler_virtual.cc (fhandler_virtual::exists): Ditto.
364 * fhandler_virtual.h (enum virtual_ftype_t): Move to fhandler.h.
365 (virt_tab_t): Add name_len member.
366 (_VN): New macro.
367 (virt_tab_search): Declare.
368 * mount.cc (mount_info::conv_to_win32_path): Fix comment. Backslashify
369 isprocsys_dev paths.
370 * ntdll.h (STATUS_OBJECT_TYPE_MISMATCH): Define
371 (STATUS_INSTANCE_NOT_AVAILABLE): Define.
372 (STATUS_PIPE_NOT_AVAILABLE): Define.
373 (STATUS_INVALID_PIPE_STATE): Define.
374 (STATUS_PIPE_BUSY): Define.
375 (SYMBOLIC_LINK_QUERY): Define.
376 (NtOpenSymbolicLinkObject): Declare.
377 (NtQuerySymbolicLinkObject): Declare.
378 * path.cc (path_conv::check): Accommodate fact that exists method
379 returns virtual_ftype_t now. Add cases for new virtual_ftype_t
380 types.
381 (cygwin_conv_path): Add GLOBALROOT prefix to native device paths.
382 Make sure to strip \\?\ prefix only for actual filesystem-based
383 paths, not for all paths.
384 * path.h (isproc_dev): Add FH_PROCSYS.
385 (isprocsys_dev): Define.
386
0de48837
CV
3872010-09-04 Corinna Vinschen <corinna@vinschen.de>
388
389 * mount.cc (mount_info::from_fstab_line): Reorder to make sure all
390 mounts from user fstab are user mounts.
391 (mount): Make sure all mounts are user mounts, even those added via
392 mount -a.
393
6a7d80f2
CF
3942010-09-02 Christopher Faylor <me+cygwin@cgf.cx>
395
fa3ab15b 396 * sigproc.cc (sigproc_init): Use American spelling in comment.
6a7d80f2 397
fc0e5071
CF
3982010-09-01 Christopher Faylor <me+cygwin@cgf.cx>
399
400 * dcrt0.cc (dll_crt0_0): Remove myself settings.
fa3ab15b 401 * fork.cc (fork): Set myself process_state.
fc0e5071
CF
402 * pinfo.cc (pinfo_init): Ditto.
403 (pinfo::thisproc): Make sure any sendsig setting is correctly copied.
404 * pinfo.h: Update copyright. Remove unused code.
405
b9874a0c
CF
4062010-09-01 Christopher Faylor <me+cygwin@cgf.cx>
407
408 * cygthread.cc (cygthread::create): Fix incorrect use of name rather
409 than __name.
410 * cygthread.h (cygthread::cygthread): Create versions which eliminate
411 'n' parameter.
412 * dcrt0.cc (dll_crt0_1): Remove check for threadfunc_ix. Remove
413 obsolete comments. Set process_state to active here.
414 * fhandler_netdrive.cc (create_thread_and_wait): Use shortened
415 cygthread constructor.
416 * timer.cc (timer_tracker::settime): Ditto.
417 * window.cc (HWND): Ditto.
418 * fhandler_tty.cc: Use shortened cygthread constructor, where
419 appropriate, throughout.
420 * select.cc: Ditto.
421 * fork.cc (frok::child): Remove wait_for_sigthread.
422 (fork): Reformat if for slightly better clarity.
423 * init.cc (dll_finished_loading): New variable.
424 (dll_entry): Use dll_finished_loading to determine when we should call
425 merge_threadfunc.
426 * sigproc.cc (no_signals_available): Simplify by using my_readsig.
427 (wait_sig_inited): Delete.
428 (wait_sig): Define as void function.
429 (pending_signals): Accommodate change to wait_sig definition.
430 (wait_for_sigthread): Delete definition.
431 (sigproc_init): Initialize signal pipe here, before wait_sig thread is
432 created. Use void form of cygthread creation.
433 (init_sig_pipe): Delete.
434 (wait_sig): Return void rather than DWORD. Assume previous
435 initialization of signal pipe. Set my_sendsig to NULL when exiting.
436 * sigproc.h (wait_for_sigthread): Delete declaration.
437
20973ec9
CV
4382010-09-01 Corinna Vinschen <corinna@vinschen.de>
439
440 * fhandler_netdrive.cc (fhandler_netdrive::readdir): Set d_type.
441 (fhandler_netdrive::seekdir): Fix test for readdir return value.
442 * fhandler_registry.cc (fhandler_registry::seekdir): Ditto.
443
41073b47
CV
4442010-09-01 Corinna Vinschen <corinna@vinschen.de>
445
446 * include/cygwin/version.h: Bump DLL minor version number to 8.
447
274116ea
CV
4482010-08-31 Corinna Vinschen <corinna@vinschen.de>
449
450 * path.cc (normalize_posix_path): Preserve //./ and //?/ prefixes.
451 (path_conv::check): Allow access to root directory of native NT disk
452 devices.
453
8fd414ff
CV
4542010-08-31 Corinna Vinschen <corinna@vinschen.de>
455
456 * include/cygwin/version.h: Bump DLL minor version number to 7.
457
166f3822
CF
4582010-08-30 Christopher Faylor <me+cygwin@cgf.cx>
459
460 * dcrt0.cc (dll_crt0_0): Move sigproc_init later, after cygheap
461 initialization since it relies on the cygheap existing (even if
462 it shouldn't matter do to dll initialization serialization).
463
45bc8c1f
CV
4642010-08-30 Corinna Vinschen <corinna@vinschen.de>
465
466 * posix.sgml (std-notes): Fix typos and incorrectnesses.
467
92596190
CV
4682010-08-30 Corinna Vinschen <corinna@vinschen.de>
469
470 * autoload.cc (MsgWaitForMultipleObjectsEx): Define.
471 (MsgWaitForMultipleObjects): Remove.
472 * select.cc (select_stuff::wait): Use MsgWaitForMultipleObjectsEx with
473 QS_ALLPOSTMESSAGE and, if possible, MWMO_INPUTAVAILABLE flags. Explain
474 why. Fix a potential crash due to a NULL pointer in WAIT_FAILED case.
475 (peek_windows): Use filter pattern on NT4. Explain why.
476 * wincap.h (wincaps::has_mwmo_inputavailable): New element.
477 * wincap.cc: Implement above element throughout.
478
92117cb2
CF
4792010-08-29 Christopher Faylor <me+cygwin@cgf.cx>
480
481 * winlean.h: New file.
482 * automode.c: Use "winlean.h".
483 * binmode.c: Ditto.
484 * gmon.c: Ditto.
485 * textmode.c: Ditto.
486 * textreadmode.c: Ditto.
487 * winsup.h: Ditto.
488 * lib/cygwin_attach_dll.c: Ditto.
489 * lib/dll_main.cc: Ditto.
490 * profile.c: Ditto.
491 * crt0.c: Ditto. Cleanup ancient cruft. Add dummy calls to
492 cygwin_premain*.
493 * include/sys/cygwin.h: Remove old stuff. Move premain declarations
494 nearer to other cygwin-specific function declarations.
495 * globals.cc: Add comment.
496
893a8b78
CV
4972010-08-28 Corinna Vinschen <corinna@vinschen.de>
498
499 * autoload.cc (LoadDLLprime): Change dllname storage to string16.
500 (struct dll_info): Convert name to WCHAR.
501 (std_dll_init): Load DLLs with full path to windows system directory.
502 Add hint to Microsoft security advisory.
503 * dcrt0.cc (init_windows_system_directory): New function.
504 (dll_crt0_0): Call init_windows_system_directory first.
505 * exceptions.cc (windows_system_directory): Move to globals.cc.
506 (windows_system_directory_length): Ditto.
507 (events_init): Drop code fetching windows_system_directory.
508 * globals.cc (windows_system_directory): New global variable.
509 (windows_system_directory_length): Ditto.
510 * net.cc (load_ipv6_funcs): Use windows_system_directory rather than
511 GetSystemDirectoryW.
512 * netdb.cc (open_system_file): Ditto. Simplify debug output.
513
1121c57f
CV
5142010-08-27 Corinna Vinschen <corinna@vinschen.de>
515
516 * external.cc (sync_wincwd): Remove.
517 (cygwin_internal): Drop CW_SYNC_WINCWD case.
518 * globals.cc (ro_u_pipedir): New R/O unicode string.
519 * ntdll.h (RtlSetCurrentDirectory_U): Declare.
520 * path.cc (cwdstuff::set): Improve comments. Drop setting Win32 CWD to
521 \\?\PIPE\ on init. Keep Win32 CWD in sync, if possible. Set to
522 \\?\PIPE\ otherwise.
523 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Revert to 230.
524 * include/sys/cygwin.h (cygwin_getinfo_types): Remove CW_SYNC_WINCWD.
525
11650075
CV
5262010-08-27 Corinna Vinschen <corinna@vinschen.de>
527
528 * fhandler_proc.cc (format_proc_partitions): Improve comment.
529
46059af7
CV
5302010-08-26 Corinna Vinschen <corinna@vinschen.de>
531
532 * fhandler_proc.cc (format_proc_partitions): Simplify code and enable
533 partition layout printing for non-privileged users.
534
2f183289
CV
5352010-08-25 Corinna Vinschen <corinna@vinschen.de>
536
537 * mount.cc (fs_info::update): Fix comments.
538
df70da7f
CV
5392010-08-25 Corinna Vinschen <corinna@vinschen.de>
540
541 * syscalls.cc (rename): Open file with FILE_READ_ATTRIBUTES.
542
48f6c6c6
CV
5432010-08-24 Corinna Vinschen <corinna@vinschen.de>
544
545 * include/cygwin/version.h: Fix comment.
546
8ae578d6
CV
5472010-08-24 Corinna Vinschen <corinna@vinschen.de>
548
549 * external.cc (cygwin_internal): In CW_CVT_MNT_OPTS case, initialize
550 flags with *pflags to restore original behaviour.
551
43c394de
CV
5522010-08-21 Corinna Vinschen <corinna@vinschen.de>
553
554 * Makefile.in (DLL_IMPORTS): Link against advapi32.a before kernel32.a.
555
ff7fca61
CF
5562010-08-20 Christopher Faylor <me+cygwin@cgf.cx>
557
558 * cygthread.cc: Update copyright.
559
a6fc3a61
CV
5602010-08-20 Corinna Vinschen <corinna@vinschen.de>
561
562 * path.cc (path_conv::check): Close handle in conv_handle if we're
563 following a symlink.
564
74f50846
CV
5652010-08-20 Pedro Izecksohn <pedro.izecksohn@gmail.com>
566
567 * endian.h (htobe16, htobe32, htobe64, be16toh, be32toh, be64toh,
568 htole16, htole32, htole64, le16toh, le32toh, le64toh): Define.
569
a6c83569
CV
5702010-08-20 Corinna Vinschen <corinna@vinschen.de>
571
572 * fhandler_disk_file.cc (readdir_check_reparse_point): Rename from
573 is_volume_mountpoint. Return valid d_type value for underlying
574 reparse point type.
575 (readdir_get_ino): Don't rely on the handle set in pc.check. Open
576 file here if pc.handle() is NULL.
577 (fhandler_disk_file::readdir_helper): Try to set a correct d_type value
578 more diligent.
579 (fhandler_disk_file::readdir): Don't reset dirent_set_d_ino unless
580 we're really sure it's due to an untrusted FS. Simplify usage of
581 FileAttributes, which is 0 if buf is NULL, anyway. Set d_type
582 correctly for faked "." and ".." entries. Improve debug output.
583 * path.cc (symlink_info::check): Don't keep handle to volume mount
584 point open. Explain why.
585
dd442880
CV
5862010-08-20 Corinna Vinschen <corinna@vinschen.de>
587
588 * fhandler_disk_file.cc (fhandler_disk_file::fstatvfs): Revert usage
589 of get_stat_handle () to get_handle (). Add comment to explain why.
590 * syscalls.cc (statvfs): Drop using PC_KEEP_HANDLE.
591
e652eb92
CV
5922010-08-19 Corinna Vinschen <corinna@vinschen.de>
593
594 * external.cc (sync_wincwd): New function.
595 (cygwin_internal): Rename CW_SETCWD to CW_SYNC_WINCWD. Call
596 sync_wincwd from here.
597 * include/sys/cygwin.h (cygwin_getinfo_types): Rename CW_SETCWD to
598 CW_SYNC_WINCWD.
599
590ad479
CF
6002010-08-18 Christopher Faylor <me+cygwin@cgf.cx>
601
602 * external.cc (CW_SETCWD): New option.
603 * include/cygwin/version.h: Bump api minor to 231.
604 * include/sys/cygwin.h (CW_SETCWD): Define.
605
ce9898da
CV
6062010-08-18 Corinna Vinschen <corinna@vinschen.de>
607
608 * syscalls.cc (rename): Fix renaming file-based devices.
609
75a3b858
CV
6102010-08-18 Corinna Vinschen <corinna@vinschen.de>
611
612 * exceptions.cc (open_stackdumpfile): Don't try to open file if we
613 have no filesystem based CWD. Add comment.
614 * path.cc (cwdstuff::set): Set CWD handle to NULL if CWD is a virtual
615 path. Simplify matching comment.
616
d15ed91c
CV
6172010-08-18 Corinna Vinschen <corinna@vinschen.de>
618
619 * fhandler_disk_file.cc (fhandler_base::fstat_helper): Set st_rdev
620 to correct device number for fs_special devices.
621
adb4e0f3
CV
6222010-08-16 Corinna Vinschen <corinna@vinschen.de>
623
624 * include/cygwin/version.h: Bump DLL minor version number to 6.
625
f5a51f91
CV
6262010-08-14 Corinna Vinschen <corinna@vinschen.de>
627
628 * pipe.cc (fhandler_pipe::open): Duplicate content of opened pipe
629 fhandler before calling dup method.
630
260b8074
CV
6312010-08-13 Corinna Vinschen <corinna@vinschen.de>
632
633 * cygheap.h (class cwdstuff): Make drive_length private.
634 Add "error" member.
635 (cwdstuff::get_error): New inline method.
636 (cwdstuff::get_error_desc): Declare.
637 (cwdstuff::set): Change first parameter to pointer to path_conv.
638 * path.cc (chdir): Drop doit. Align call to cwdstuff::set to
639 new arguments.
640 (cwdstuff::init): Only call cwdstuff::set if it's not already
641 initialized. Add comment. Drop third parameter in call to
642 cwdstuff::set.
643 (cwdstuff::set): Partially rewrite. Add lots of comments to explain
644 everything. Drop "doit" since it's not used anymore. Always create
645 new handle to CWD if not in a virtual path. Drop PEB locking when
646 reading PEB values in init phase. Check for accessibility to set
647 correct error code. Drop Vista workaround. Never write back into PEB.
648 Set Win32 CWD to \\?\PIPE\ on init. Simplify creation of win32 path.
649 Set new error member to a meaningful value.
650 (cwdstuff::get_error_desc): New method to generate error message
651 from cwd error code.
652 * spawn.cc (spawn_guts): Call cwdstuff::get_error_desc to create
653 more meaningful error message when not being able to start native
654 Win32 app due to CWD restrictions. When starting native Win32 app,
655 lock cwd and use in calls to CreateProcessW/CreateProcessAsUserW.
656
a5fe4262
CV
6572010-08-11 Corinna Vinschen <corinna@vinschen.de>
658
659 * mount.cc (struct opt): Add "bind" option.
660 (mount_info::from_fstab_line): Handle "bind" option.
661 (fillout_mntent): Add "bind" option to mnt_opts.
662 (mount): Handle "bind" option.
663 * include/sys/mount.h (MOUNT_BIND): New mount flag.
664
92514fd2
CF
6652010-08-10 Christopher Faylor <me+cygwin@cgf.cx>
666
667 * sigproc.cc (init_sig_pipe): Add retry loop.
668
514fdad3
CF
6692010-08-09 Christopher Faylor <me+cygwin@cgf.cx>
670
671 * cygheap.h (cygheap_fdmanip): Delete fh and use fd index into
672 cygheap->fdtab throughout.
673 (cygheap_fdnew): Replace fh by using fd index into cygheap->fdtab
674 throughout. (cygheap_fdget): Ditto. (cygheap_fdenum): Ditto.
675
b150f523
YS
6762010-08-09 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
677
678 Implement POSIX.1-2004 Monotonic Clock.
679 * hires.h: Change hires_us to hires_ns, with nanosecond resolution.
680 (hires_ns::primed_ft): Remove.
681 (hires_ns::nsecs): New prototype.
682 (hires_ns::usecs): Rewrite in terms of nsecs.
683 (hires_ns::resolution): New prototype.
684 * times.cc: Change hires_us to hires_ns.
685 (ntod): Declare.
686 (systime): Remove.
687 (hires_ns::prime): Increase resolution to nanoseconds.
688 (hires_ns::nsecs): Rename usecs to nsecs to reflect increased resolution.
689 Remove justdelta argument.
690 (hires_ns::resolution): New function.
691 (clock_gettime): Accept CLOCK_MONOTONIC.
692 Use EINVAL instead of ENOSYS per POSIX.1-2004.
693 (clock_getres): Ditto.
694 (clock_setres): Use EINVAL instead of ENOSYS to conform with other
695 implementations.
696 * strace.cc (strace::microseconds): Adjust for hires_ns.
697 * sysconf.cc (sca): Set _SC_MONOTONIC_CLOCK to _POSIX_MONOTONIC_CLOCK.
698 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
699
a52993d4
CV
7002010-08-09 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
701
702 * fhandler_proc.cc: Add /proc/filesystems virtual file.
703 (format_proc_filesystems): New function.
704 * mount.cc (fs_names): Move to global scope. Redefine as array
705 of { "name", block_device? } structs.
706 (fillout_mntent): Use name member of fs_names.
707 * mount.h (fs_names): New prototype.
708
99006a85
CV
7092010-08-09 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
710
711 * include/dlfcn.h (RTLD_LOCAL): Define.
712
5c9d7a42
CV
7132010-08-06 Corinna Vinschen <corinna@vinschen.de>
714
715 * include/sys/dirent.h (d_fileno): Define as d_ino.
716
06cc41a6
CV
7172010-08-04 Corinna Vinschen <corinna@vinschen.de>
718
719 * path.cc (cygwin_conv_path): Rearrange test for "." in POSIX to
720 relative DOS path conversion. Simplify fixing the path.
721 In CCP_POSIX_TO_WIN_W conversion, always drop long path prefix if path
722 fits into MAX_PATH. Explain why.
723
0b6fbd39
CF
7242010-08-01 Christopher Faylor <me+cygwin@cgf.cx>
725
726 * exceptions.cc (_cygtls::interrupt_now): Revert to checking for
727 "spinning" when choosing to defer signal.
728 (_cygtls::call_signal_handler): Grab func when we have the lock.
729 * gendef: Update copyright.
730 (__sigbe): Simplify slightly.
731 (_sigdelayed): Grab a lock before manipulating stuff.
732 (_cygtls::pop): Properly return popped value.
733 (stabilize_sig_stack): Set incyg when we have the lock.
734 * sigproc.cc: Update copyright.
735
4db1bd40
CF
7362010-07-28 Christopher Faylor <me+cygwin@cgf.cx>
737
738 * cygthread.h (LPVOID_THREAD_START_ROUTINE): Define.
739 (cygthread::create): Rename from cygthread::cygthread.
740 (cygthread::cygthread): Define new constructor which accepts
741 LPVOID_THREAD_START_ROUTINE as the first argument. Call
742 cygthread::create.
743 * cygthread.cc (cygthread::create): Rename from cygthread::cygthread.
744 Use 'arglen' rather than 'n' since 'n' is no longer supplied.
745 * fhandler_tty.cc (process_input): Define as void/noreturn.
746 (process_output): Ditto.
747 (process_ioctl): Ditto.
748 (fhandler_tty_master::init): Don't "zap_h" cygthreads which are
749 noreturn. It's now implied.
750
cb6bfcff
CV
7512010-07-23 Corinna Vinschen <corinna@vinschen.de>
752
753 * fhandler.cc (fhandler_base::raw_write): Remove STATUS_DISK_FULL
754 special handling.
755
3083fa94
EB
7562010-07-19 Eric Blake <eblake@redhat.com>
757
758 * mktemp.cc (_gettemp): Add flags argument. All callers updated.
759 (mkostemp, mkostemps): New functions.
760 * cygwin.din (mkostemp, mkostemps): Export.
761 * posix.sgml: Document them.
762 * include/cygwin/version.h: Bump version.
763
bee6d431
CF
7642010-07-18 Christopher Faylor <me+cygwin@cgf.cx>
765
766 * autoload.cc (noload): Use "pushl" rather than "push".
767
9134e80a
CF
7682010-07-18 Christopher Faylor <me+cygwin@cgf.cx>
769
770 * exceptions.cc (_cygtls::interrupt_now): Avoid nonsensical tests which
771 delay an interrupt.
772 (setup_handler): Remove unneeded DEBUGGING handling. Ensure that stack
773 is locked when we are about to do push/pop to it. Fix debugging output.
774
3a7c5515
CF
7752010-07-18 Christopher Faylor <me+cygwin@cgf.cx>
776
777 * gendef: Throughout, remove lock from xchgl since it is implied.
778 (__ZN7_cygtls3popEv): Avoid potential (but probably nonexistent) race
779 when clearing element after pop.
780
ac40a195
CV
7812010-07-15 Corinna Vinschen <corinna@vinschen.de>
782
783 * wincap.cc (wincap_7): Set needs_count_in_si_lpres2 to false.
784
975a85f4
CV
7852010-07-07 Corinna Vinschen <corinna@vinschen.de>
786
787 * syscalls.cc (unlink_nt): Disable try_to_bin for netapp drives.
788 Explain why.
789
c492992f
CV
7902010-07-05 Corinna Vinschen <corinna@vinschen.de>
791
792 Align seekdir and telldir API to POSIX definition.
793 * Makefile.in (NEW_FUNCTIONS): Remove seekdir and telldir mappings.
794 * dir.cc (telldir): Move functionality from telldir64 here. Use
795 long, rather than _off_t.
796 (telldir64): Just call telldir. Only keep for backward compatibility.
797 (seekdir): Move functionality from seekdir64 here. Use long, rather
798 than _off_t.
799 (seekdir64): Just call seekdir. Only keep for backward compatibility.
800 * fhandler.h: Throughout, change prototypes of seekdir and telldir
801 methods to use long, rather than _off64_t.
802 * fhandler_disk_file.cc: Change aforementioned methods accordingly.
803 * fhandler_netdrive.cc: Ditto.
804 * fhandler_registry.cc: Ditto.
805 * fhandler_virtual.cc: Ditto.
806 * include/sys/dirent.h (struct __DIR): Change __d_position from
807 _off_t to long to reflect API change.
808 (telldir): Change prototype to use long, rather than off_t.
809 (seekdir): Ditto.
810
6259826e
CF
8112010-07-04 Christopher Faylor <me+cygwin@cgf.cx>
812
813 * path.cc (path_conv::check): Move fs-specific settings to a point
814 where we know that we have filled out the filesystem information.
815 * path.h (path_conv::path_conv): Use consistent initialization for
816 constructors.
817
818 * include/sys/cygwin.h: Define CW_STRERROR.
819 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 228.
820 * include/external.h: Implement CW_STRERROR.
821
7ba0a42f
CV
8222010-07-02 Corinna Vinschen <corinna@vinschen.de>
823
824 * net.cc (cygwin_getsockopt): Make sure SO_PEERCRED is only handled
825 in level SOL_SOCKET. Workaround a return value regression in Vista
826 and later. Add comment to explain.
827
601fbebd
CV
8282010-06-29 Corinna Vinschen <corinna@vinschen.de>
829
830 * spawn.cc (spawn_guts): Reinstantiate a FIXME comment.
831
e7daa3ed
CV
8322010-06-29 Corinna Vinschen <corinna@vinschen.de>
833
834 * exceptions.cc (dump_exception): Use %W instead of %s for printing
835 progname.
836 * fork.cc (frok::parent): Fix typos in debug output.
837 * spawn.cc (spawn_guts): Copy wide Win32 filename into _pinfo::progname,
601fbebd 838 rather than native NT name. Use %W instead of %S for printing progname.
e7daa3ed 839
22d78f10
CF
8402010-06-28 Christopher Faylor <me+cygwin@cgf.cx>
841
842 * fork.cc (frok::parent): Improve error message.
843
30bbc55e
CV
8442010-06-22 Corinna Vinschen <corinna@vinschen.de>
845
846 * flock.cc (allow_others_to_sync): Use small stack buffer rather
847 than big temp buffer. Fix typo in comment.
848 (lf_setlock): Revert to using tmp_pathbuf.
849 (lf_getlock): Ditto.
850
c7b24005
CV
8512010-06-22 Corinna Vinschen <corinna@vinschen.de>
852
853 * sec_acl.cc (setacl): Use the long time unused ACL_DEFAULT_SIZE
854 instead of a constant value.
855 * security.cc (alloc_sd): Ditto.
856
f074bd3a
CF
8572010-06-21 Christopher Faylor <me+cygwin@cgf.cx>
858
859 * tmpbuf.h: New file.
860 * flock.cc: Include tmpbuf.h for new tmpbuf functionality.
861 (allow_others_to_sync): Use tmpbuf rather than tmp_pathbuf. Explain
862 why.
863 (lf_setlock): For consistency, use tmpbuf rather than tmp_pathbuf.
864 (lf_getlock): Ditto.
865
74434376
CF
8662010-06-21 Christopher Faylor <me+cygwin@cgf.cx>
867
868 * dcrt0.cc (__api_fatal): Temporarily generate a stackdump.
869
7b8cf7c8
CF
8702010-06-21 Christopher Faylor <me+cygwin@cgf.cx>
871
872 * tls_pbuf.cc (tmp_pathbuf::w_get): Report what's failing when too many
873 buffers are in use.
874
4365c159
CV
8752010-06-17 Corinna Vinschen <corinna@vinschen.de>
876
877 * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Fetch stat
878 handle only after checking for NFS.
879
342814df
CV
8802010-06-15 Corinna Vinschen <corinna@vinschen.de>
881
882 * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Use handle
883 returned by get_stat_handle.
884 (fhandler_base::fstat_helper): Reinstatiate code to re-open the file
885 when checking for executability if called via fstat. Explain why.
886
5a0d1edb
CV
8872010-06-15 Corinna Vinschen <corinna@vinschen.de>
888
889 * dtable.cc (dtable::dup_worker): Reset path_conv handle in duplicated
890 fhandler.
891 * fhandler.cc (fhandler_base::fstatvfs): Keep handle in created
892 path_conv.
893 * fhandler.h (fhandler_base::get_stat_access): New method.
894 (fhandler_base::get_stat_handle): New method.
895 * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Use handle
896 returned by get_stat_handle. Only request inode from system if it
897 isn't already set in the fhandler, and only for filesystems supporting
898 them.
899 (fhandler_base::fstat_fs): Use handle returned by get_stat_handle.
900 Change the way open_fs is called. Explain why.
901 (fhandler_base::fstat_helper): Use handle returned by get_stat_handle.
902 Never use 0 inode number. Simplify executable recognition by re-using
903 get_stat_handle if file could be opened with sufficient rights.
904 (fhandler_disk_file::fstatvfs): Use handle returned by get_stat_handle.
905 (fhandler_disk_file::facl): Use handle returned by get_stat_handle in
906 GETACL and GETACLCNT cases.
907 (fhandler_disk_file::link): Use handle returned by get_stat_handle
908 instead of opening file here again. Add comment.
909 (readdir_get_ino): Keep handle in created path_conv and drop
910 opening file.
911 * ntdll.h (wait_pending): New helper function.
912 * path.cc (symlink_info::check): Drop unused 'opt' parameter from
913 declaration. Add path_conv_handle argument.
914 (path_conv::check): Make sure conv_handle is closed. Keep
915 PC_KEEP_HANDLE flag in pflags_or. Accommodate call to sym.check to
916 new args.
917 (path_conv::~path_conv): Close conv_handle.
918 (symlink_info::check_shortcut): Don't re-open file here, just use
919 incoming handle. Drop goto's and label out.
920 (symlink_info::check_sysfile): Don't re-open file here, just use
921 incoming handle. Keep track of file position to accommodate the fact
922 that file has been opened asynchronously in calling function.
923 (symlink_info::check_nfs_symlink): Don't re-open file here, just use
924 incoming handle.
925 (symlink_info::check): Drop unused 'opt' parameter. Add
926 path_conv_handle argument. Always try to open file with GENERIC_READ
927 rights first to allow reading file content w/o having to re-open the
928 file. Drop back to READ_CONTROL | FILE_READ_ATTRIBUTES otherwise.
929 Call symlink test functions (except for check_reparse_point) only if
930 file could be opened with GENERIC_READ. Keep file handle open if
931 PC_KEEP_HANDLE is set in pflags.
932 * path.h (enum pathconv_arg): Add PC_KEEP_HANDLE flag.
933 (class path_conv_handle): New class.
934 (class path_conv): Add conv_handle member.
935 (path_conv::operator =): Duplicate conv_handle.
936 (path_conv::handle): New method.
937 (path_conv::access): New method.
938 (path_conv::reset_conv_handle): New method.
939 (path_conv::close_conv_handle): New method.
940
51ec3f5c
CV
9412010-06-15 Corinna Vinschen <corinna@vinschen.de>
942
943 * fhandler_disk_file.cc (fhandler_disk_file::fstatvfs): Fix indentation.
944
5e3dd23e
CV
9452010-06-15 Corinna Vinschen <corinna@vinschen.de>
946
947 * fhandler_disk_file.cc (path_conv::get_ino_by_handle): Convert from
948 static function to path_conv method. Accommodate throughout.
949 (path_conv::ndisk_links): Unused, comment out.
950 * path.h (path_conv::get_ino_by_handle): Declare.
951 (path_conv::ndisk_links): Comment out declaration.
952
d955b6cf
CV
9532010-06-14 Corinna Vinschen <corinna@vinschen.de>
954
955 * path.cc (path_conv::check): Return with ENOTDIR if component is a
956 device.
957
aec297d5
CV
9582010-06-14 Corinna Vinschen <corinna@vinschen.de>
959
960 * dlfcn.cc (get_full_path_of_dll): Revert patch from 2010-04-29.
961
75172e03
CF
9622010-06-12 Christopher Faylor <me+cygwin@cgf.cx>
963
964 * times.cc (gtod): Move to sharable region.
965
03c991fe
CV
9662010-06-09 Corinna Vinschen <corinna@vinschen.de>
967
968 * path.cc (symlink_info::check_shortcut): Use ro_u_empty rather than
969 local UNICODE_STRING object.
970 (symlink_info::check_sysfile): Ditto. Return immediately if NtOpenFile
971 failed to avoid closing random handle. Improve debug output in case
972 NtReadFile failed.
973
b7d3e6d7
CV
9742010-06-08 Corinna Vinschen <corinna@vinschen.de>
975
976 * path.cc (symlink_info::check): Set h to NULL after closing handle
977 in udf check. Remove overagressive bracketing. Don't set h to NULL
978 without closing the handle. Fix using wrong handle in checking
979 file system when using parent directory handle.
980
814e854e
CV
9812010-06-07 Corinna Vinschen <corinna@vinschen.de>
982
983 * include/sys/stdio.h: Remove _GNU_SOURCE guard around getline
984 and getdelim prototypes since they are SUSv4 now.
985
fad9568b
CV
9862010-06-02 Corinna Vinschen <corinna@vinschen.de>
987
988 * ntdll.h (STATUS_BAD_NETWORK_PATH): Define.
989 (STATUS_BAD_NETWORK_NAME): Define.
990 * path.cc (symlink_info::check): Convert STATUS_BAD_NETWORK_PATH and
991 STATUS_BAD_NETWORK_NAME into an immediate ENOENT.
992
ded1f66c
CV
9932010-06-01 Corinna Vinschen <corinna@vinschen.de>
994
995 * exceptions.cc (open_stackdumpfile): Correctly append .stackdump
996 suffix.
997
998 * nlsfuncs.cc (rebase_locale_buf): Reorder arguments. Accommodate
999 throughout. Add pointer to end of buffer and avoid changing pointers
1000 not pointing into the buffer.
1001
80a10a39
CV
10022010-06-01 Corinna Vinschen <corinna@vinschen.de>
1003
1004 * fhandler_netdrive.cc (fhandler_netdrive::exists): Always free WNet
1005 resource if created.
1006
685e55e2
CV
10072010-05-31 Corinna Vinschen <corinna@vinschen.de>
1008
1009 * cygheap.cc (cygheap_user::set_name): Allow to change the user name
1010 if it only differs by case.
1011
88addc64
CV
10122010-05-26 Corinna Vinschen <corinna@vinschen.de>
1013
1014 * fhandler_registry.cc (multi_wcstombs): New function.
1015 (fhandler_registry::fstat): Call multi_wcstombs for strings of type
1016 REG_MULTI_SZ.
1017 (fhandler_registry::fill_filebuf): Ditto.
1018
fca8f35f
CF
10192010-05-26 Christopher Faylor <me+cygwin@cgf.cx>
1020
1021 * hires.h (hires_base::reset): New function.
1022 (hires_us): Specify that hires_base is a public import.
1023 (hires_ms): Ditto.
1024 * times.cc (gtod): Move earlier in file.
1025 (settimeofday): Reset gtod so that base will be subsequently
1026 recalculated.
1027
1ee8d76c
CV
10282010-05-26 Corinna Vinschen <corinna@vinschen.de>
1029
1030 * path.cc (symlink_info::check): Don't try to handle remote reparse
1031 points as symlinks. Explain why.
1032
16f52c14
CV
10332010-05-26 Corinna Vinschen <corinna@vinschen.de>
1034
1035 * include/inttypes.h: Change PTR definitions to int to align with the
1036 stdint.h type definitions of intptr_t/uintptr_t.
1037
403ab0c0
CV
10382010-05-26 Corinna Vinschen <corinna@vinschen.de>
1039
1040 * fhandler.h (class fhandler_pty_master): Add master_thread member.
1041 * fhandler_tty.cc (fhandler_pty_master::close): Properly detach from
1042 master thread.
1043 (fhandler_pty_master::setup): Store cygthread pointer of pty master
1044 control thread in master_thread. Don't zap thread handle.
1045
a36728ea
CV
10462010-05-26 Kazuhiro Fujieda <fujieda@acm.org>
1047 Corinna Vinschen <corinna@vinschen.de>
1048
1049 * nlsfuncs.cc (__set_lc_time_from_win): Use LOCALE_SMONTHNAME1
1050 instead of LOCALE_SABBREVMONTHNAME1 in Japanese and Korean
1051 locales to get abbreviated month names. Explain why.
1052
10532010-05-18 Kazuhiro Fujieda <fujieda@acm.org>
d3258e06
CF
1054
1055 * environ.cc (regopt): Change the first argument to wide char string.
1056 (environ_init): Accommodate change to the first argument of regopt.
1057 * exception.cc (open_stackdumpfile): Accommodate change to the type of
1058 progname in _pinfo.
1059 * external.cc (fillout_pinfo): Ditto.
1060 * fhandler_process.cc (format_process_winexename): Ditto.
1061 (format_process_stat): Ditto.
1062 * fork.cc (fork::parent): Ditto.
1063 * pinfo.cc (pinfo_basic::pinfo_basic): Call GetModuleFileNameW instead
1064 of GetModuleFileName.
1065 (pinfo::thisproc): Accommodate change to the type of progname in
1066 _pinfo.
1067 (pinfo_init): Ditto.
1068 * pinfo.h (_pinfo): Change the type of progname to a wide char array.
1069 * registry.h (reg_key::get_int): Change the first argument from
1070 constant point to pointer to constant.
1071 (reg_key::get_string): Ditto. Change the last argument likewise.
1072 * registry.cc (reg_key::get_int): Accommodate change to the
1073 declaration.
1074 (reg_key::get_string): Ditto.
1075 * strace.cc (strace::hello): Accommodate change to the type of progname
1076 in _pinfo.
1077 (strace::vsprntf): Ditto.
1078
27f564e9
CF
10792010-05-07 Christopher Faylor <me+cygwin@cgf.cx>
1080
1081 * Makefile.in (DLL_OFILES): Add pseudo-reloc.o.
1082 * dcrt0.cc (child_info_fork::handle_fork): Call
1083 _pei386_runtime_relocator here.
1084 (dll_crt0_1): Ditto for non-fork case.
1085 * dll_init.cc (dll::init): Complain more in comment. Clean up
1086 slightly.
1087 (dll_dllcrt0_1): Call _pei386_runtime_relocator when we know we have
1088 a filled-in per_process structure.
1089 * globals.cc (__cygwin_user_data): Accommodate new fields for
1090 _pei386_runtime_relocator.
1091 * pseudo-reloc.cc: New file adapted from old lib/pseudo-reloc.c.
1092 Include winsup.h directly. Collapse #ifdef __CYGWIN__ into one block.
1093 Perform minor whitespace code reformatting.
1094 (__report_error): Use small_printf to output error.
1095 (_pei386_runtime_relocator): Conditionalize for cygwin to take
1096 per_process pointer parameter.
1097 * winsup.h (_pei386_runtime_relocator): Declare.
1098 * include/cygwin/version.h
1099 (CYGWIN_VERSION_PER_PROCESS_API_VERSION_COMBINED): New macro.
1100 (CYGWIN_VERSION_USER_API_VERSION_COMBINED): Use above macro.
1101 (CYGWIN_VERSION_USE_PSEUDO_RELOC_IN_DLL): New macro.
1102 (CYGWIN_VERSION_API_MINOR): Bump to 227.
1103 * include/sys/cygwin.h: Remove obsolete comment.
1104 (per_process::unused2): Shorten.
1105 (per_process::pseudo_reloc_start): New field.
1106 (per_process::pseudo_reloc_end): Ditto.
1107 (per_process::image_base): Ditto.
1108 * lib/_cygwin_crt0_common.cc: Declare pseudo runtime externs needed for
1109 per_process structure.
1110 (_cygwin_crt0_common): Fill in pseudo_reloc runtime constants.
1111 * lib/pseudo-reloc-dummy.c: New file. Dummy function to satisify ld.
1112 * lib/pseudo-reloc.c: Delete.
1113
186bcf2a
CV
11142010-05-07 Corinna Vinschen <corinna@vinschen.de>
1115
1116 * fhandler_tty.cc (fhandler_tty_slave::init): Disable grabbing
1117 process group ownership of tty in case we're being debugged.
1118
35c0485d
CV
11192010-05-06 Corinna Vinschen <corinna@vinschen.de>
1120
1121 * path.cc (path_conv::check): Drop setting sym.pflags before calling
1122 mount_info::conv_to_win32_path since the flag value is overwritten by
1123 mount_info::conv_to_win32_path anyway.
1124 Set flags for DOS paths before calling symlink_info::check so they can
1125 be used in that function already.
1126
73bcd49b
CF
11272010-05-03 Christopher Faylor <me+cygwin@cgf.cx>
1128
1129 * dll_init.cc (dll_list::alloc): Add debugging assertion.
1130
2b749986
CV
11312010-04-29 Corinna Vinschen <corinna@vinschen.de>
1132
1133 * dlfcn.cc (get_full_path_of_dll): Handle non-existent file.
1134
5b4c992b
CV
11352010-04-29 Corinna Vinschen <corinna@vinschen.de>
1136
1137 * mount.cc (struct opt): Add "dos" and "ihash" options.
1138 (fillout_mntent): Ditto.
1139 * path.cc (path_conv::get_nt_native_path): Use path_conv's
1140 has_dos_filenames_only method.
1141 (path_conv::check): Add PATH_IHASH flag if FS has unreliable inode
1142 numbers.
1143 (symlink_info::check_shortcut): Or symlink flags to pflags.
1144 (symlink_info::check_sysfile): Ditto. Change test accordingly.
1145 (symlink_info::check_reparse_point): Ditto.
1146 (symlink_info::check_nfs_symlink): Ditto.
1147 (symlink_info::check): Check PATH_DOS flag in call to get_nt_native_path
1148 to utilize mount flag. Ditto in test for potential restarting. Set
1149 PATH_DOS if FS only allows DOS filename rules.
1150 * path.h (enum path_types): Add PATH_DOS and PATH_IHASH.
1151 (path_conv::hasgood_inode): Check PATH_IHASH instead of
1152 fs.hasgood_inode.
1153 (path_conv::has_dos_filenames_only): New method.
1154 * include/sys/mount.h (MOUNT_DOS): New mount flag.
1155 (MOUNT_IHASH): Ditto.
1156
a11a0723
CV
11572010-04-29 Corinna Vinschen <corinna@vinschen.de>
1158
1159 * external.cc (cygwin_internal): Add CW_CVT_MNT_OPTS to allow mount
1160 flag parsing. Add CW_LST_MNT_OPTS case to allow mount flag listing.
1161 * mount.cc (fstab_read_flags): Rename from read_flags. Make externally
1162 available. Change input string to char ** to allow returning faulty
1163 option. Add flag for avoiding debug output.
1164 (fstab_list_flags): New function to create list of options.
1165 * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_CVT_MNT_OPTS and
1166 CW_LST_MNT_OPTS.
1167
f00bc469
CV
11682010-04-28 Corinna Vinschen <corinna@vinschen.de>
1169
1170 * mount.cc (compare_flags): New function.
1171 (read_flags): Replace loop with bsearch. Simplify error check.
1172
8f47a15c
CV
11732010-04-28 Corinna Vinschen <corinna@vinschen.de>
1174
1175 * include/cygwin/version.h: Bump API minor version.
1176
be764ea8
CV
11772010-04-28 Corinna Vinschen <corinna@vinschen.de>
1178
1179 * cygwin.din (__locale_mb_cur_max): Export.
1180 * nlsfuncs.cc (__getlocaleinfo): Drop conversion to multibyte.
1181 (__charfromwchar): New function to convert to multibyte.
1182 (__eval_datetimefmt): Convert to return wchar_t pointer. Work on
1183 wide char string.
1184 (__set_lc_time_from_win): Take additional pointer to "C" category info
1185 to accommodate C.foo locales. Rework to fill wide char members in
1186 category info.
1187 (__set_lc_ctype_from_win): New function.
1188 (__set_lc_numeric_from_win): Take additional pointer to "C" category
1189 info to accommodate C.foo locales. Rework to fill wide char members
1190 in category info.
1191 (__set_lc_monetary_from_win): Ditto.
1192 (__set_lc_messages_from_win): Ditto.
1193 (__get_current_collate_codeset): New function, called from nl_langinfo.
1194 * include/cygwin/config.h (__HAVE_LOCALE_INFO_EXTENDED__): Define.
1195
9b53b52a
CF
11962010-04-27 Christopher Faylor <me+cygwin@cgf.cx>
1197
1198 * spawn.cc (find_exec): Use the first detected errno when lookup fails.
1199
0f6697b3
CV
12002010-04-27 Corinna Vinschen <corinna@vinschen.de>
1201
1202 * include/regex.h: Include _ansi.h to avoid missing out on preprocessor
1203 macros in sys/_types.h.
1204
002a34fa
CV
12052010-04-26 Corinna Vinschen <corinna@vinschen.de>
1206
1207 * mount.h (fs_info::inited): New inline method.
1208 * path.cc (path_conv::check): Clear filesystem info if following a
1209 symlink. Use new fs_info::inited method to check if FS info is already
1210 available.
1211 (symlink_info::check): Drop fs_update_called. Use fs_info::inited
1212 method instead. Streamline test for leading space and trailing dot or
1213 space. Add comments.
1214
8802178f
CV
12152010-04-23 Corinna Vinschen <corinna@vinschen.de>
1216
1217 * path.h (get_nt_native_path): Add third parameter to declaration and
1218 declare with regparms.
1219 * path.cc (get_nt_native_path): Add third parameter to allow conversion
1220 of leading and trailing dots and spaces on filesystems only supporting
1221 filenames following DOS rules.
1222 (path_conv::get_nt_native_path): Call get_nt_native_path according to
1223 fs.has_dos_filenames_only flag.
1224 (getfileattr): Accommodate new parameter to get_nt_native_path.
1225 (symlink_info::check): Revamp fs_update_called handling to call
1226 fs.update only once per call. Call get_nt_native_path according to
1227 fs.has_dos_filenames_only flag. Streamline filesystem dependent code
1228 not to be called more than once unnecessarily. Drop code tweaking
1229 incoming path for broken filesystems only allowing DOS pathnames.
1230 Rely on changed get_nt_native_path instead.
1231 * mount.cc (fillout_mntent): Accommodate new parameter to
1232 get_nt_native_path.
1233 * strfuncs.cc (tfx_rev_chars): New conversion table with comment.
1234 (sys_cp_wcstombs): Use tfx_rev_chars rather than tfx_chars.
1235
b12d6d10
CV
12362010-04-22 Corinna Vinschen <corinna@vinschen.de>
1237
1238 * path.cc (symlink_info::check): Make sure to restart only once.
1239
6ff06a07
CV
12402010-04-22 Corinna Vinschen <corinna@vinschen.de>
1241
1242 * mount.cc (GETVOLINFO_VALID_MASK): Drop FILE_SEQUENTIAL_WRITE_ONCE
1243 from mask. Expand the comment a bit.
1244 (WIN_FAT_FLAGS): New define.
1245 (FS_IS_WINDOWS_FAT): New macro.
1246 (fs_info::update): Handle remote FS faking to be FAT. Subsume under
1247 CIFS. Check for NWFS and has_buggy_basic_info only for remote
1248 filesystems. Add check for has_dos_filenames_only.
1249 * mount.h (class fs_info): Add has_dos_filenames_only status flag.
1250 Implement accessors.
1251 * path.cc (symlink_info::check): Rearrange variable definitions to
1252 clear them up. Add a restart label to allow a clean restart within
1253 the method. Add a check for broken filesystems only allowing DOS
1254 pathnames in case we encounter a STATUS_OBJECT_NAME_NOT_FOUND status.
1255 If all checks point to one of that, restart method with tweaked
1256 incoming path. Add lengthy comments to explain what we do.
1257
c43e1944
CV
12582010-04-22 Corinna Vinschen <corinna@vinschen.de>
1259
1260 * path.cc (symlink_info::check): Fix a comment.
1261
05c98e07
CV
12622010-04-21 Corinna Vinschen <corinna@vinschen.de>
1263 Christopher Faylor <me+cygwin@cgf.cx>
1264
1265 * fhandler_termios.cc (tcinit): Remove previously applied change.
1266 Replace with...
1267 * fhandler_tty.cc (fhandler_tty_slave::init): Become process group
1268 leader if called from dtable::init_std_file_from_handle. Add comment
1269 to explain.
1270
179bee57
CV
12712010-04-21 Corinna Vinschen <corinna@vinschen.de>
1272
1273 * dtable.cc (dtable::init_std_file_from_handle): Set access mask for
1274 the slave side of ttys explicitely. Explain why.
1275
27f1db48
CF
12762010-04-20 Christopher Faylor <me+cygwin@cgf.cx>
1277
1278 * path.cc (cygwin_create_path): Free memory on error.
1279
9e40fe81
CV
12802010-04-20 Corinna Vinschen <corinna@vinschen.de>
1281
1282 * cygheap.h (struct init_cygheap): Add rlim_core member.
1283 * cygheap.cc (cygheap_init): Initialize rlim_core to RLIM_INFINITY.
1284 * exceptions.cc (stackdump): Drop extern declaration of rlim_core.
1285 Refer to cygheap->rlim_core instead.
1286 (exception::handle): Disable stackdumping if cygheap->rlim_core is 0.
1287 Don't set WCOREDUMP flag in exit code, if cygheap->rlim_core is 0.
1288 (sigpacket::process): Ditto.
1289 * resource.cc (rlim_core): Remove.
1290 (getrlimit): Fetch RLIMIT_CORE value from cygheap->rlim_core.
1291 (setrlimit): Store RLIMIT_CORE value in cygheap->rlim_core.
1292
2ac91a14
CF
12932010-04-19 Christopher Faylor <me+cygwin@cgf.cx>
1294
1295 * cygerrno.h: Nevermind.
1296
e1b57fc2
CF
12972010-04-19 Christopher Faylor <me+cygwin@cgf.cx>
1298
1299 * cygerrno.h: Protect use of NTSTATUS for only when we need it.
1300
13012010-04-19 Christopher Faylor <me+cygwin@cgf.cx>
1302
1303 * lib/_cygwin_crt0_common.cc: Remove unneeded declarations.
1304
b7b55e90
CV
13052010-04-19 Corinna Vinschen <corinna@vinschen.de>
1306
1307 * fhandler_tty.cc (fhandler_tty_slave::fch_set_sd): Remove commented out
1308 code.
1309
cc01c77f
CV
13102010-04-19 Corinna Vinschen <corinna@vinschen.de>
1311
1312 * autoload.cc (GetNamedPipeClientProcessId): Define.
1313 * fhandler.h (fhandler_tty_slave::fch_open_handles): Declare private.
1314 (fhandler_tty_slave::fch_close_handles): Ditto.
1315 (fhandler_tty_slave::cygserver_attach_tty): Drop declaration.
1316 (fhandler_tty_slave::fstat): Declare public.
1317 (fhandler_tty_slave::fchmod): Declare public.
1318 (fhandler_tty_slave::fchown): Declare public.
1319 (class fhandler_pty_master): Add master_ctl handle.
1320 (fhandler_pty_master::pty_master_thread): Declare public.
1321 * fhandler_termios.cc (fhandler_termios::tcinit): If the process
1322 is started from a non-Cygwin process, make it tty process group
1323 leader.
1324 * fhandler_tty.cc: Throughout accommodate additional security related
1325 arguments in calls to functions creating or opening objects.
1326 (close_maybe): Move to start of file to reuse it
1327 in other methods.
1328 (struct pipe_request): Define.
1329 (struct pipe_reply): Define.
1330 (fhandler_tty_slave::open): Throughout, try to open synchronization
1331 objects with MAXIMUM_ALLOWED permissions. Drop call to cygserver.
1332 Try to duplicate pipe handles via master_ctl pipe if duplicating
1333 directly doesn't work.
1334 (fhandler_tty_slave::cygserver_attach_tty): Remove.
1335 (fhandler_tty_slave::init): Close unused incoming pipe handle.
1336 (fhandler_pty_master::close): Send exit message to master control
1337 thread and close master_ctl handle.
1338 (fhandler_pty_master::pty_master_thread): New method, implementing the
1339 master control thread.
1340 (pty_master_thread): Static helper to start master control thread.
1341 (fhandler_pty_master::setup): Simplify creating pipe inheritance.
1342 Make sure we're the one creating the input_available_event. Add
1343 comment to explain why. Create master_ctl pipe and start master
1344 control thread. Close master_ctl handle in case of error.
1345 * security.cc (alloc_sd): Add code to handle tty objects. Add comments
1346 to explain what exactly is required.
1347 (get_object_sd): New function.
1348 (get_object_attribute): New function.
1349 (create_object_sd_from_attribute): New function.
1350 (set_object_sd): New function.
1351 (set_object_attribute): New function.
1352 (set_file_attribute): Change attribute type to mode_t.
1353 * security.h (set_file_attribute): Change attribute type to mode_t.
1354 (get_object_sd): Declare.
1355 (get_object_attribute): Declare.
1356 (create_object_sd_from_attribute): Declare.
1357 (set_object_sd): Declare.
1358 (set_object_attribute): Declare.
1359 * tty.cc (tty::slave_alive): Implement directly instead of via alive.
1360 (tty::exists): Open mutex handle with READ_CONTROL access.
1361 (tty::alive): Remove.
1362 (tty::open_output_mutex): Convert to inline method.
1363 (tty::open_input_mutex): Ditto.
1364 (tty::open_mutex): Take additional ACCESS_MASK parameter for the
1365 mutex open access mask.
1366 (tty::open_inuse): New method.
1367 (tty::create_inuse): Take PSECURITY_ATTRIBUTES parameter. Drop fmt
1368 name parameter. Always create TTY_SLAVE_ALIVE event.
1369 (tty::get_event): Take additional PSECURITY_ATTRIBUTES parameter for
1370 CreateEvent.
1371 * tty.h (class tty): Change declarations according to aforementioned
1372 changes.
1373 (tty::open_output_mutex): Implement as inline method.
1374 (tty::open_input_mutex): Ditto.
1375
02a33ea7
CV
13762010-04-19 Corinna Vinschen <corinna@vinschen.de>
1377
1378 * dtable.cc (dtable::init_std_file_from_handle): Set dev to
1379 valid content for ptys. Remove setting FILE_CREATE_PIPE_INSTANCE
1380 in access flags since it's not needed. Set the access mask for
1381 kernel objects according to what's returned by NtQueryInformationFile,
1382 info class FileAccessInformation.
1383
bc8a5a9f
CV
13842010-04-19 Corinna Vinschen <corinna@vinschen.de>
1385
1386 * syscalls.cc (rename): On STATUS_ACCESS_VIOLATION, retry to open
1387 for DELETE until the STATUS_ACCESS_VIOLATION goes away. Add comment
1388 to explain why.
1389
b5efa899
CV
13902010-04-17 Corinna Vinschen <corinna@vinschen.de>
1391
1392 * sec_helper.cc (get_null_sd): Make static. Use PSECURITY_DESCRIPTOR
1393 instead of SECURITY_DESCRIPTOR *.
1394 (sec_acl): Fix fomratting.
1395 * security.h (get_null_sd): Drop declaration.
1396
7cdcd90c
CV
13972010-04-16 Corinna Vinschen <corinna@vinschen.de>
1398
1399 * cygerrno.h (seterrno_from_nt_status): Declare.
1400 (__seterrno_from_nt_status): Call seterrno_from_nt_status.
1401 * errno.cc (seterrno_from_win_error): Set errno without calling
1402 set_errno to avoid packing strace output with errno messages.
1403 (seterrno_from_nt_status): New function to print NT status as well as
1404 resulting Windows error.
1405
6b0f100a
CV
14062010-04-15 Corinna Vinschen <corinna@vinschen.de>
1407
1408 * kernel32.cc (CreateEventW): Create event object with EVENT_ALL_ACCESS
1409 access mask.
1410 (CreateMutexW): Create mutex object with MUTEX_ALL_ACCESS access mask.
1411 (CreateSemaphoreW): Create semaphore object with SEMAPHORE_ALL_ACCESS
1412 access mask.
1413
b873ce06
CV
14142010-04-15 Corinna Vinschen <corinna@vinschen.de>
1415
1416 * sec_helper.cc (set_cygwin_privileges): Enable SE_DEBUG_PRIVILEGE, if
1417 available. Add comments.
1418
0ef4bb7c
CV
14192010-04-13 Corinna Vinschen <corinna@vinschen.de>
1420
1421 * fhandler_socket.cc (get_inet_addr): Only test the file for being a
1422 socket after opening it. Retry if opening failed with sharing
1423 violation. Explain why we do this.
1424 (fhandler_socket::bind): Create file with no sharing allowed.
1425
2bba259e
CV
14262010-04-13 John Bowman <bowman@math.ualberta.ca>
1427
1428 * cygheap.cc (cwcsdup): Fix allocation size to accommodate sizeof WCHAR.
1429 (cwcsdup1): Ditto.
1430
098f9c6e
CV
14312010-04-12 Corinna Vinschen <corinna@vinschen.de>
1432
1433 * include/cygwin/version.h: Bump DLL minor version number to 5.
1434
6b1c332f
CV
14352010-04-12 Corinna Vinschen <corinna@vinschen.de>
1436
1437 * posix.sgml (std-notes): Improve lseek description.
1438
42e9cefd
CV
14392010-04-12 Corinna Vinschen <corinna@vinschen.de>
1440
1441 * fhandler_tty.cc (fhandler_tty_slave::open): Add code to duplicate
1442 handles within a single process to simplify openpty case.
1443 (fhandler_tty_slave::cygserver_attach_tty): Correctly send Windows PID
1444 to cygserver, rather than the Cygwin PID.
1445
02507092
CV
14462010-04-11 Corinna Vinschen <corinna@vinschen.de>
1447
1448 * fhandler.h (class dev_console): Add backspace_keycode member.
1449 * fhandler_console.cc (fhandler_console::get_tty_stuff): Initialize
1450 backspace_keycode with CERASE.
1451 (fhandler_console::read): Return dev_state->backspace_keycode if the
1452 backspace key is pressed.
1453 (fhandler_console::char_command): Implement DECBKM escape sequence.
1454
1d6adee8
CF
14552010-04-10 Christopher Faylor <me+cygwin@cgf.cx>
1456
1457 * fhandler_console.cc (fhandler_console::read): Default to sending
1458 CERASE character if termios VERASE field is zero.
1459 (fhandler_console::fixup_after_fork_exec): Avoid a spurious debug
1460 message.
1461
89a903b8
CF
14622010-04-10 Christopher Faylor <me+cygwin@cgf.cx>
1463
1464 * mkvers.sh: Use modern date formats to construct the date.
1465
1691abe7
CV
14662010-04-09 Corinna Vinschen <corinna@vinschen.de>
1467
1468 * nlsfuncs.cc (__set_lc_time_from_win): Actually set
1469 _time_locale->md_order to the D_MD_ORDER value written to the buffer.
1470
412f3e61
CF
14712010-04-09 Christopher Faylor <me+cygwin@cgf.cx>
1472
1473 * path.cc (path_conv::set_normalized_path): Use crealloc_abort to avoid
1474 a memory leak.
1475 * path.h (path_conv::operator =): Just use cstrdup to allocate
1476 normalized_path, avoiding attempt to free a pointer which is allocated
1477 in another pc.
1478
f8fbd1ea
CV
14792010-04-07 Corinna Vinschen <corinna@vinschen.de>
1480
1481 * include/cygwin/version.h: Bump DLL minor version number to 4.
1482
385b0add
CV
14832010-04-06 Corinna Vinschen <corinna@vinschen.de>
1484
1485 * thread.cc (valid_sched_parameters): Declare extern here.
1486 (sched_set_thread_priority): Ditto.
1487
249ccad3
CV
14882010-04-06 Corinna Vinschen <corinna@vinschen.de>
1489
1490 * include/sched.h: Remove, overruled by newlib file.
1491 * include/sys/sched.h: Ditto.
1492
35297ebe
CF
14932010-04-06 Christopher Faylor <me+cygwin@cgf.cx>
1494
1495 * fhandler_fifo.cc (fhandler_fifo::open): Accommodate previous return
1496 value change to setup_overlapped.
1497
19085182
CF
14982010-04-02 Christopher Faylor <me+cygwin@cgf.cx>
1499
1500 * fhandler.h (fhandler_base::has_ongoing_io): Declare virtual method.
1501 * select.cc (peek_pipe): Reorganize slightly. Don't attempt to check a
1502 handle if it has ongoing I/O.
1503 (select_pipe_info::select_pipe_info): Delete definition.
1504 (select_pipe_info::~select_pipe_info): Delete definition.
1505 (thread_pipe): Get rid of WFMO call. Reorganize loop.
1506 (pipe_cleanup): Remove dependence on destructor.
1507 (thread_serial): Reorganize loop.
1508 * select.h (select_pipe_info): Empty this class since it no longer has
1509 any special requirements (for now).
1510
1511 * syscalls.cc (readv): Remove an unneeded debug printf.
1512
5151c80c
CF
15132010-04-02 Christopher Faylor <me+cygwin@cgf.cx>
1514
1515 * fhandler.h (fhandler_base::setup_overlapped): Delete virtual
1516 declaration.
1517 (fhandler_base::destroy_overlapped): Ditto.
1518 (fhandler_base_overlapped): Remove now-unneeded friend.
1519 (fhandler_base_overlapped::setup_overlapped): Return int, remove
1520 parameter.
1521 (fhandler_base_overlapped::get_overlapped): Return reference.
1522 (fhandler_base_overlapped::fhandler_base_overlapped): Be more assertive
1523 about zeroing everything.
1524 (fhandler_base_overlapped::fixup_after_fork): Declare new function.
1525 (fhandler_base_overlapped::fixup_after_exec): Ditto.
1526 (fhandler_base_overlapped::dup): Ditto.
1527 (fhandler_base_overlapped::close): Ditto.
1528 * fhandler_fifo.cc (fhandler_fifo::dup): Call
1529 fhandler_base_overlapped::dup rather than fhandler_base::dup.
1530 * pipe.cc (fhandler_pipe::dup): Ditto.
1531 (fhandler_pipe::init): Accommodate change in setup_overlapped arguments
1532 for "opened_properly" case.
1533
60efdd0c
CF
15342010-04-02 Christopher Faylor <me+cygwin@cgf.cx>
1535
1536 * fhandler_fifo.cc (fhandler_fifo::fhandler_fifo): Properly initialize
1537 overlapped part of this class.
1538
7c972c63
CV
15392010-04-02 Corinna Vinschen <corinna@vinschen.de>
1540
1541 * fhandler_tty.cc (fhandler_tty_slave::close): Revert previous change.
1542
dffe690c
CF
15432010-04-02 Christopher Faylor <me+cygwin@cgf.cx>
1544
1545 * select.h (select_pipe_info::add_watch_handle): Delete declaration.
baa671ea 1546 * select.cc (select_pipe_info::add_watch_handle): Delete definition.
dffe690c
CF
1547 (fhandler_pipe::select_read): Delete call to add_watch_handle.
1548 (fhandler_pipe::select_write): Ditto.
1549 (fhandler_pipe::select_except): Ditto.
1550
1ae0a7c5
CF
15512010-04-02 Christopher Faylor <me+cygwin@cgf.cx>
1552
1553 * dtable.cc (dtable::init_std_file_from_handle): Avoid adding fh to
1554 fdtab until we know that it is good.
1555 * fhandler_tty.cc (fhandler_tty_slave::fhandler_tty_slave): Handle
1556 error conditions more consistently. Avoid handle leakage on error.
1557
ed32dd89
CV
15582010-04-02 Corinna Vinschen <corinna@vinschen.de>
1559
1560 * fhandler_tty.cc (fhandler_tty_slave::close): Avoid potential crash
1561 if former open call has been unsuccessful.
1562
ce3124dc
CV
15632010-04-01 Corinna Vinschen <corinna@vinschen.de>
1564
1565 * nlsfuncs.cc: Fix indentation.
1566
57f7ebe1
CV
15672010-04-01 Corinna Vinschen <corinna@vinschen.de>
1568
1569 * nlsfuncs.cc (rebase_locale_buf): New helper function to rebase
1570 function pointers in locale structures. Explain why this is necessary.
1571 (__set_lc_time_from_win): Use rebase_locale_buf after realloc.
1572 (__set_lc_numeric_from_win): Ditto.
1573 (__set_lc_monetary_from_win): Ditto.
1574
bc3f0d64
CF
15752010-03-31 Christopher Faylor <me+cygwin@cgf.cx>
1576
1577 * sigproc.cc (wait_sig): Make sure that strace is activated on
1578 __SIGSTRACE by calling new strace::activate function.
1579 * strace.cc (strace::activate): Rename from strace::strace.
1580 * strace.h (strace::activate): Define new function.
1581 (strace::strace): Call activate.
1582
e446d6d0
CF
15832010-03-31 Christopher Faylor <me+cygwin@cgf.cx>
1584
1585 * fhandler.h (fhandler_base_overlapped): Temporarily (?) make
1586 select_pipe_info a friend until the fhandler_tty intertangling can be
1587 worked out.
1588 * select.cc (select_pipe_info::add_watch_handle): Don't inspect the
1589 overlapped event if we're not waiting for I/O.
1590 (fhandler_tty_common::select_*): Change to standard function. Don't do
1591 kludgy fhandler_pipe coercion.
1592
2aeef065
CF
15932010-03-31 Christopher Faylor <me+cygwin@cgf.cx>
1594
1595 * fhandler.cc (fhandler_base::dup): Call setup_overlapped
1596 unconditionally.
1597 (fhandler_base::fork_fixup): Ditto.
1598 (fhandler_base::fixup_after_fork): Ditto.
1599 (fhandler_base::fixup_after_exec): Ditto.
1600 (fhandler_base_overlapped::setup_overlapped): Move to this class from
1601 fhandler_base.
1602 (handler_base_overlapped::destroy_overlapped): Ditto.
1603 (fhandler_base_overlapped::wait_overlapped): Ditto. Track when we
1604 expect pending I/O.
1605 (fhandler_base_overlapped::read_overlapped): Move to this class from
1606 fhandler_base. Return error if ongoing I/O.
1607 (fhandler_base_overlapped::write_overlapped): Ditto.
1608 (fhandler_base_overlapped::has_ongoing_io): Semi-reinstate previous
1609 function.
1610 * fhandler.h (fhandler_base::wait_overlapped): Move to
1611 fhandler_base_overlapped class.
1612 (fhandler_base::write_overlapped): Ditto.
1613 (fhandler_base::get_overlapped): Ditto.
1614 (fhandler_base::get_overlapped_buffer): Ditto.
1615 (fhandler_base_overlapped): New class.
1616 (fhandler_pipe): Inherit from fhandler_base_overlapped. Remove
1617 overlapped stuff as a result.
1618 (fhandler_fifo): Ditto.
1619 * pipe.cc (fhandler_pipe::fhandler_pipe): Initialize fhandler_base_overlapped.
1620 (pipe): Put a descriptive name in the fhandler.
1621
d8b4cbe8
CV
16222010-03-30 Corinna Vinschen <corinna@vinschen.de>
1623
1624 * fhandler_socket.cc (fhandler_socket::wait_for_events): Remove call to
1625 sig_dispatch_pending.
1626
ca8eb333
CV
16272010-03-30 Thomas Wolff <towo@towo.net>
1628
b791ec4a
CF
1629 * fhandler.h (class dev_console): Drop vt100_graphics_mode_active. Add
1630 flags vt100_graphics_mode_G0, vt100_graphics_mode_G1 and iso_2022_G1.
ca8eb333
CV
1631 * fhandler_console.cc: Throughout, tune VT100 graphics mode switching
1632 to follow ISO 2022 strictly.
b791ec4a
CF
1633 (fhandler_console::write) Reset VT100 graphic mode flags on terminal
1634 full reset (ESC c).
ca8eb333 1635
298cf05c
CV
16362010-03-30 Corinna Vinschen <corinna@vinschen.de>
1637
1638 * syscalls.cc (open): Remove call to sig_dispatch_pending.
1639
83dddecb
CV
16402010-03-30 Corinna Vinschen <corinna@vinschen.de>
1641
1642 * net.cc: Remove calls to sig_dispatch_pending throughout.
1643 * libc/rexec.cc: Ditto.
1644
e23275a8
CV
16452010-03-30 Corinna Vinschen <corinna@vinschen.de>
1646
1647 * mount.cc (fs_info::update): Allow variable FILE_SUPPORTS_SPARSE_FILES
1648 flag in netapp flag test. Add comment.
1649
b3cbb06c
CV
16502010-03-29 Corinna Vinschen <corinna@vinschen.de>
1651
1652 * spawn.cc (find_exec): Enable finding paths in backslash notation,
1653 especially for the exec[vl]p functions.
1654
1655 * path.cc (symlink_info::check): Disable returning directories with
1656 suffix appended here.
1657
ef7fc145
CV
16582010-03-29 Corinna Vinschen <corinna@vinschen.de>
1659
1660 * include/cygwin/version.h: Bump DLL minor version number to 3.
1661
ce3d8993
CV
16622010-03-29 Corinna Vinschen <corinna@vinschen.de>
1663
1664 * fhandler.cc (fhandler_base::fstat): Keep st_ctime and st_birthtime
1665 fixed to 2006-12-01 00:00 UTC.
1666
f1c6730b
CV
16672010-03-29 Corinna Vinschen <corinna@vinschen.de>
1668
1669 * libc/rcmd.c: Enable IPv6.
1670
e2402ed8
CF
16712010-03-28 Christopher Faylor <me+cygwin@cgf.cx>
1672
7a2df116 1673 * fhandler.cc (fhandler_base::fstat): Set st_mtime to current time.
e2402ed8 1674
c019a66c
CF
16752010-03-28 Christopher Faylor <me+cygwin@cgf.cx>
1676
1677 * globals.cc (exit_status): Add new ES_EXIT_STARTING enum.
1678 * dcrt0.cc (cygwin_exit): Set exit_state to ES_EXIT_STARTING prior to
1679 calling real exit.
1680 * dll_init.cc (dll_list::detach): Remove dll from linked list and call
1681 destructors even if exiting. Don't call __cxa_finalize in exiting case.
1682
68b0fa82
CV
16832010-03-27 Corinna Vinschen <corinna@vinschen.de>
1684
1685 * nlsfuncs.cc (__set_charset_from_locale): Set default charset for
1686 locales defaulting to codepage 936 to GB2312.
1687
65b4b495
CV
16882010-03-22 Corinna Vinschen <corinna@vinschen.de>
1689
1690 * fhandler_socket.cc (fhandler_socket::evaluate_events): Make erase
1691 const in parameter list.
1692 (fhandler_socket::wait_for_events): Take a DWORD flags value instead of
1693 just a bool. Call evaluate_events with erase flag according to
1694 MSG_PEEK value in flags. Replace check for dontwait with check for
1695 MSG_DONTWAIT in flags.
1696 (fhandler_socket::connect): Call wait_for_events with 0 flags value.
1697 (fhandler_socket::accept4): Ditto.
1698 (fhandler_socket::recv_internal): Save flags in wait_flags. Drop
1699 dontwait variable. Call wait_for_events with wait_flags.
1700 (fhandler_socket::send_internal): Save MSG_DONTWAIT flag in wait_flags
1701 and call wait_for_events with wait_flags as argument. Drop dontwait
1702 variable.
1703 * fhandler.h (class fhandler_socket): Change second parameter in
1704 declaration of wait_for_events to const DWORD.
1705
0f6de51a
CV
17062010-03-19 Corinna Vinschen <corinna@vinschen.de>
1707
1708 * fhandler_disk_file.cc (fhandler_cygdrive::fstat): Add standard read
1709 permissions again.
1710
60698cf3
CF
17112010-03-18 Corinna Vinschen <corinna@vinschen.de>
1712
1713 * shared.cc (init_installation_root): Change to make sure that scope of
1714 the lock lasts the entire function.
1715
cef5dfd7
CF
17162010-03-15 Christopher Faylor <me+cygwin@cgf.cx>
1717
1718 * shared_info.h (user_info): Add dll_crt0_1 as a friend.
1719 (user_info::version): Make LONG to accommodate spinlock use.
1720 (user_info::create): New static function renamed from user_info_create.
1721 (user_info::initialize): New private function renamed from
1722 user_info_initialize.
1723 (SHARED_VERSION): Delete.
1724 (SHARED_VERSION_MAGIC): Ditto.
1725 (USER_VERSION_MAGIC): Ditto.
1726 (SHARED_INFO_CB): Ditto.
1727 (USER_VERSION): Ditto.
1728 (USER_VERSION_MAGIC): Ditto.
1729 (CURR_SHARED_MAGIC): Update.
1730 (CURR_USER_MAGIC): Ditto.
1731 (shared_info::version): Make LONG to accommodate spinlock use.
1732 (shared_info::create): New static function mirroring user_info::create.
1733 (dll_crt0_1): Accommodate change to user_info::initialize.
1734 * spinlock.h (spinlock::setto): New variable member.
1735 (spinlock::done): New function.
1736 (spinlock::spinlock): Generalize to allow arbitrary values and
1737 timeouts. Call done() when lock is not needed.
1738 * ntdll.h: Make multiple-inclusion safe.
1739 (NtQuerySystemTime): Declare.
1740 * shared.cc (installation_root_inited): Rename from shared_mem_inited.
1741 (init_installation_root): Make inline. Use a spinlock to ensure that
1742 this is initialized only once per session.
1743 (user_info::initialize): Rename from user_shared_initialize. Protect
1744 with spinlock on sversion and remove other spinlock-like things.
1745 Remove reference to user_shared since it is now implicit. Refer to
1746 spinlock version of multiple_cygwin_problem to ensure that any spinlock
1747 is released.
1748 (user_info::create): Rename from user_shared_create. Accommodate
1749 change from user_shared_initialize to user_info::initialize.
1750 (shared_info::create): New inline function.
1751 (shared_info::initialize): Protect with spinlock on sversion. Move
1752 heap_init back under specific control of shared_info spinlock. Remove
1753 reference to SHARED_INFO_CB and just use sizeof(*this).
1754 (memory_init): Move all locking into respective functions where it is
1755 needed. Accommodate name changes. Remove call to heap_init().
1756 * syscalls.cc (seteuid32): Accommodate name change to
1757 user_info::create().
1758
1759 * mount.cc (mount_info::create_root_entry): Report on errors from
1760 add_item since they should be nonexistent.
1761 (mount_info::init): Don't initialize nmounts. It should already be
1762 zero. Give more verbose error when root_idx < 0. Implicitly use this
1763 pointer rather than explicitly referencing mount_table->.
1764 (mount_info::add_item): Minor whitespace fix.
1765
654e623c
CF
17662010-03-15 Christopher Faylor <me+cygwin@cgf.cx>
1767
1768 * sigproc.cc (no_signals_available): Get sense of the test right for
1769 previous botched change.
1770
d1ef5f33
CF
17712010-03-15 Christopher Faylor <me+cygwin@cgf.cx>
1772
1773 * sigproc.cc (no_signals_available): Don't try to send a signal if
1774 still in cygwin startup code.
1775
f8af64be
CF
17762010-03-13 Christopher Faylor <me+cygwin@cgf.cx>
1777
1778 * spinlock.h: New file.
1779 (spinlock): New class.
1780 * shared.cc: Include spinlock.h.
1781 (memory_init): Use new spinlock methods rather than roll-your-own.
1782 Time out after ten seconds if shared_mem_inited is not initialized.
1783
1784 * sync.h: Update copyright. Remove vanity attribution.
1785
1786 * sigproc.cc (sigproc_terminate): Avoid attempts to kill the signal
1787 thread while we're still initializing or suffer a deadlock.
1788
084ea510
CF
17892010-03-12 Christopher Faylor <me+cygwin@cgf.cx>
1790
1791 Throughout change all calls of low_priority_sleep (0) to yield ().
1792 * miscfuncs.cc (yield): Rename from low_priority_sleep. Remove all of
1793 the logic which called Sleep() and just use SwitchToThread.
1794 * miscfuncs.h (yield): Rename from low_priority_sleep.
1795 (SLEEP_0_STAY_LOW): Delete unused define.
1796 * shared.cc (memory_init): Move heap_init() call directly after shared
1797 memory initialization to more closely mimic long-standing program flow.
1798 * tty.cc (tty_list::terminate): Replace call to low_priority_sleep with
1799 Sleep.
1800
c2fe02c4
CF
18012010-03-10 Christopher Faylor <me.cygwin@cgf.cx>
1802
1803 * shared.cc (memory_init): Fix comment. Fix indentation.
1804
bd3b3783
CF
18052010-03-09 Christopher Faylor <me+cygwin@cgf.cx>
1806
1807 * shared_info.h (open_shared): Create function wrapper for common use
1808 case.
1809 (open_shared): Change fifth argument to a pointer rather than a
1810 reference.
1811 * fhandler_console.cc (fhandler_console::get_tty_stuff): Eliminate use
1812 of dummy variable and call open_shared with constant.
1813 * fhandler_process.cc (format_process_mounts): Ditto.
1814 * pinfo.cc (pinfo::init): Pass pointer to shloc.
1815 * shared.cc (shared_mem_inited): New variable.
1816 (open_shared): Crate function wrapper for common use case.
1817 (open_shared): Accommodate change to fifth argument to a pointer.
1818 (shared_info::initialize): Remove spinlock test. Simplify function.
1819 Move get_session_parent_dir call back here.
1820 (memory_init): Protect global shared settings with shared_mem_inited
1821 spinlock. Move get_session_parent_dir call to shared_info::initialize.
1822
e8190d8f
CF
18232010-03-09 Christopher Faylor <me.cygwin@cgf.cx>
1824
1825 * shared.cc (inst_root_inited): Delete.
1826 * (shared_info::initialize): Reorganize. Move call to
1827 init_installation_root here under spinlock control. Move unneeded
1828 non-shared_info initialization out of this function.
1829 (memory_init): Remove call to init_installation_root. Call heap_init
1830 and get_session_parent_dir here.
1831
8e75995c
CV
18322010-03-04 Corinna Vinschen <corinna@vinschen.de>
1833
1834 * syscalls.cc (nt_path_has_executable_suffix): Change storage class of
1835 blessed_executable_suffixes to static.
1836 (rename): Revert meaning of old_explicit_suffix. Change the rules
1837 for appending a .exe suffix and (yikes!) document them.
1838
a9fd7424
CV
18392010-03-04 Charles Wilson <cygwin@cwilson.fastmail.fm>
1840
1841 * cygwin.din: Export __xdr functions.
1842 * include/cygwin/version.h: Bump version.
1843 * posix.sgml: Add a few more XDR functions to list
1844 of implemented Solaris functions.
1845
53c24915
CV
18462010-03-03 Charles Wilson <cygwin@cwilson.fastmail.fm>
1847
1848 Add XDR support.
1849 * cygwin.din: Export xdr functions.
1850 * include/cygwin/version.h: Bump version.
1851 * cygxdr.cc: New.
1852 * cygxdr.h: New.
1853 * dcrt0.cc (dll_crt0_1): Print the (rare) xdr-related
1854 error messages to stderr.
1855 * Makefile.in: Add cygxdr.
1856 * posix.sgml: Add new XDR functions to list of implemented Solaris
1857 functions.
1858
cf156945
CF
18592010-03-01 Christopher Faylor <me+cygwin@cgf.cx>
1860
1861 * cygtls.h: Replace /*gentls_offsets*/ at end.
1862
a9b112ec
CF
18632010-03-01 Christopher Faylor <me+cygwin@cgf.cx>
1864
1865 * exception.h: Fix copyright.
1866
98a97ac6
CF
18672010-02-27 Christopher Faylor <me+cygwin@cgf.cx>
1868
1869 Update some copyrights.
1870 * cygtls.cc (_cygtls::call): Invoke new exception protection here.
1871 (_cygtls::init_thread): Remove conditionalized exception handler setup.
1872 (exception_list): Delete declaration.
1873 (_cygtls::init_exception_handler): Delete obsolete function.
1874 * cygtls.h: Remove (now) unneeded include.
1875 (_cygtls): Make this a real C++ class.
1876 (_cygtls::handle_exceptions): Remove.
1877 (_cygtls::init_exception_handler): Remove.
1878 (_cygtls::call2): Make private.
1879 (myfault::faulted): Remove unneeded parentheses.
1880 * dcrt0.cc (dll_crt0_1): Remove exception handler setup.
1881 * dlfcn.cc (dlopen): Ditto.
1882 (dlclose): Ditto.
1883 * dll_init.cc (dll_dllcrt0_1): Ditto.
1884 (dll_list::detach): Use new exception handler protection.
1885 * exceptions.cc (dump_exception): Rename to prevent confusion with new
1886 class.
1887 (exception::handle): Rename from _cygtls::handle_exceptions.
1888 Accommodate new exception class. Accommodate rename to dump_exception.
1889 * tlsoffsets.h: Regenerate.
1890
d5d5bf4d
CF
18912010-02-26 Christopher Faylor <me+cygwin@cgf.cx>
1892
1893 * cygtls.h (_cygtls::init_exception_handler): Eliminate argument.
1894 (_cygtls::andreas): Convert to a pointer.
1895 (san): Convert to a real class with methods. Use a linked list to
1896 keep track of previous handlers on the "stack".
1897 (myfault): Rewrite to use new san class rather than calling directly
1898 into _cygtls.
1899 * cygtls.cc (_cygtls::init_exception_handler): Just assume that we're
1900 always using the standard exception handler.
1901 (_cygtls::init_thread): Reflect loss of argument to
1902 init_exception_handler.
1903 * dcrt0.cc (dll_crt0_1): Ditto.
1904 * dfcn.cc (dlopen): Ditto.
1905 (dlclose): Reset the exception handler after FreeLibrary.
1906 * dll_init.cc (dll_list::detach): Make sure that the exception handler
1907 is initialized before calling destructors.
1908 * exceptions.cc (_cygtls::handle_exceptions): Accommodate new andreas
1909 pointer.
1910 * thread.cc (verifyable_object_isvalid): Pass objectptr to faulted for
1911 explicit NULL pointer checking.
1912 * tlsoffsets.h: Regenerate.
1913
b6336c95
CF
19142010-02-26 Christopher Faylor <me+cygwin@cgf.cx>
1915
1916 * mkimport: cd away from temp directory or Windows will have problems
1917 removing the directory.
1918
75bd77d2
CV
19192010-02-26 Corinna Vinschen <corinna@vinschen.de>
1920
1921 * libc/strptime.cc: Implement support for era, alt_digits and POSIX
1922 padding and width modifiers.
1923 (era_info_t): New type.
1924 (free_era_info): New static function to free era_info_t storage.
1925 (get_era_info): New static function to create era_info_t storage
1926 from LC_TIME era information.
1927 (alt_digits_t): New type.
1928 (get_alt_digits): New static function to create alt_digits_t storage
1929 from LC_TIME alt_digits information.
1930 (free_alt_digits): New static function to free alt_digits_t storage.
1931 (find_alt_digits): New static function to scan input for alternative
1932 digits and return them, if any. Return NULL otherwise.
1933 (__strptime): New static function taking all code from strptime.
1934 Implement handling for E, O, +, 0, and width modifiers per POSIX-1.2008.
1935 (strptime): Convert into wrapper function to provide era_info and
1936 alt_digits pointers and call __strptime.
1937 (conv_num): Take additional alt_digits_t parameter and if it's not
1938 NULL, call find_alt_digits to convert.
1939
f467ede2
CV
19402010-02-26 Corinna Vinschen <corinna@vinschen.de>
1941
1942 * strsig.cc: Fix formatting and copyright.
1943
a90dc29d
PH
19442010-02-26 Pierre Humblet <Pierre.Humblet@ieee.org>
1945
1946 * security.cc (check_access): Use user.imp_token if appropriate.
f467ede2 1947 Set errno and return if DuplicateTokenEx fails .
a90dc29d 1948
d91ab868
CV
19492010-02-26 Corinna Vinschen <corinna@vinschen.de>
1950
1951 Remove all traces of __CYGWIN_USE_BIG_TYPES__.
1952
1953 * include/cygwin/config.h: Move Cygwin-specific build flags from
1954 newlib's sys/config.h here. Add a comment.
1955
0512608d
YS
19562010-02-25 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
1957
1958 * include/cygwin/signal.h: Define SIGPWR as synonym for SIGLOST.
1959 * strsig.cc: Ditto.
1960 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR.
1961
1550b620
CV
19622010-02-25 Corinna Vinschen <corinna@vinschen.de>
1963
1964 * lc_era.h (lc_era_t): Fix apparent glibc bug in ja_JP era definition.
1965
be71be8e
CV
19662010-02-24 Corinna Vinschen <corinna@vinschen.de>
1967
1968 * sec_auth.cc (get_full_privileged_inheritable_token): Fix dumb typo
1969 when checking linked token for being a primary token.
1970
c6a6b5a3
CF
19712010-02-24 Christopher Faylor <me+cygwin@cgf.cx>
1972
1973 * dlfcn.cc (dlopen): Make sure exception handler is really loaded after
1974 dynamic load.
1975
fd4a56af
CF
19762010-02-23 Christopher Faylor <me+cygwin@cgf.cx>
1977
1978 * cygtls.cc (_cygtls::init_exception_handler): Force installation of
1979 our exception handler to always be at the beginning.
1980
7414c24a
CF
19812010-02-23 Christopher Faylor <me+cygwin@cgf.cx>
1982
1983 * thread.cc (pthread_mutex::unlock): Don't attempt to unlock if there
1984 is an error.
1985
478ea460
CF
19862010-02-22 Christopher Faylor <me+cygwin@cgf.cx>
1987
1988 * include/sys/strace.h: Define _STRACE_SPECIAL.
1989 (strace_printf_wrap): Fix NOSTRACE definitions.
1990 (strace_printf_wrap1): Fix NOSTRACE definitions.
1991 (special_printf): Define.
1992
1993 * thread.cc: Perform minor syntax fix in a comment. Rename
1994 "is_good_initialzer*" to "is_initializer*" throughout. Use
1995 pthread_printf rather than debug_printf throughout. Add extra
1996 pthread_printf debugging throughout.
1997 (pthread_mutex::_new_mutex): New constant value.
1998 (pthread_mutex::_unlocked_mutex): Ditto.
1999 (pthread_mutex::_destroyed_mutex): Ditto.
2000 (pthread_mutex::no_owner): Define new function.
2001 (pthread_mutex::can_be_unlocked): Detect no_owner situation. Handle
2002 PTHREAD_MUTEX_NORMAL as a special case.
2003 (pthread::create_cancel_event): Use C++ boolean values.
2004 (pthread::precreate): Use method to set mutex type.
2005 (pthread_cond::pthread_cond): Ditto.
2006 (pthread_rwlock::pthread_rwlock): Ditto.
2007 (pthread_mutex::pthread_mutex): Set owner to _new_mutex initially.
2008 (pthread_mutex::~pthread_mutex): Reset various elements to make it
2009 clearer if they are incorrectly reused.
2010 (pthread_mutex::lock): Add clarifying comment.
2011 (pthread_mutex::unlock): Attempt to handle various mutex types
2012 correctly. In particular, reinstate ability to have one thread unlock
2013 another thread's mutex if type == PTHREAD_MUTEX_NORMAL.
2014 (semaphore::_fixup_after_fork): Avoid redundancy.
2015 (pthread_mutex::_fixup_after_fork): Ditto. Fix debugging statement.
2016 (__pthread_cond_dowait): Accommodate changes to remove previously
2017 inexplicable use can_be_unblocked() as a static function.
2018 * thread.h: Rename "is_good_initialzer*" to "is_initializer*"
2019 throughout.
2020 (pthread_mutex): Reorganize. Make many things private.
2021 (pthread_mutex::no_owner): Define new method.
2022 (pthread_mutex::_new_mutex): Define new constant.
2023 (pthread_mutex::_unlocked_mutex): Ditto.
2024 (pthread_mutex::_destroyed_mutex): Ditto.
2025
f2ecf0ee
CV
20262010-02-22 Corinna Vinschen <corinna@vinschen.de>
2027
2028 * lc_era.h: Redefine lc_era_t to keep
2029 default date and time formats as well to workaround YA Windows
2030 shortcoming. Refresh with latest data.
2031 * lc_msg.h: Refresh with latest data.
2032 * nlsfuncs.cc (__eval_datetimefmt): Revert latest change.
2033 (__set_lc_time_from_win): Rename res to era. Prefer default date and
2034 time formats from era array if available.
2035 (__set_lc_messages_from_win): Rename res to msg.
2036
5d765846
CV
20372010-02-20 Corinna Vinschen <corinna@vinschen.de>
2038
2039 * lc_era.h (lc_era): Fix "ja_JP" era_t_fmt entry to use traditional
2040 format.
2041 * nlsfuncs.cc (dt_flags): Remove DT_ERACAL since crippled era data
2042 in Windows makes it useless.
2043 (__eval_datetimefmt): Check if locale's default calender has
2044 non-gregorian start year. Use era year also in default date entries,
2045 if so.
2046
53a918f3
CV
20472010-02-20 Corinna Vinschen <corinna@vinschen.de>
2048
2049 * path.cc (warn_msdos): Enforce extended hex printing of multibyte
2050 pathnames.
2051
ff3e6bcb
CF
20522010-02-19 Christopher Faylor <me+cygwin@cgf.cx>
2053
2054 * include/sys/strace.h: Remove old code. Add support for ptrace
2055 tracing.
2056
6c36e83b
CV
20572010-02-19 Corinna Vinschen <corinna@vinschen.de>
2058
2059 * lc_era.h: New file.
2060 * nlsfuncs.cc: Include lc_era.h.
2061 (locale_cmp): convert arguments to char** to be usable for both types,
2062 lc_msg_t and lc_era_t.
2063 (__set_lc_time_from_win): Handle era-related data
2064
1929fc8e
CV
20652010-02-19 Corinna Vinschen <corinna@vinschen.de>
2066
2067 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Try to open
2068 directory with stat()-friendly access mask first. Explain why.
2069
eb676040
CV
20702010-02-19 Corinna Vinschen <corinna@vinschen.de>
2071
2072 * fhandler_disk_file.cc (fhandler_base::fstat_helper): Set st_rdev
2073 to same value as st_dev. Avoid useless debug output in executable
2074 check. Add filename to debug output.
2075 (fhandler_disk_file::facl): Simplify code calling fstat methods to
2076 just call fstat to avoid errors with the cygdrive directory.
2077
97c8d005
CV
20782010-02-18 Corinna Vinschen <corinna@vinschen.de>
2079
2080 * nlsfuncs.cc (eval_datetimefmt): Rename force to flags.
2081 (enum dt_flags): Define.
2082 (__eval_datetimefmt): Change force to flags and change type to
2083 dt_flags. Accommodate throughout.
2084 (__set_lc_time_from_win): Accommodate above change. Set era-related
2085 values to empty strings for now.
2086
90f5de33
CF
20872010-02-18 Christopher Faylor <me+cygwin@cgf.cx>
2088
2089 * fhandler.cc (fhandler_base::setup_overlapped): Revert to starting
2090 with handle in signalled state as it seems to fix some hangs.
2091
66f2d8f1
CV
20922010-02-15 Corinna Vinschen <corinna@vinschen.de>
2093
2094 * path.cc (path_conv::check): Treat native DOS paths as "noacl".
2095
93579594
CV
20962010-02-15 Corinna Vinschen <corinna@vinschen.de>
2097
2098 * mount.cc (mount_info::conv_to_win32_path): Set UNC path flags to
2099 cygdrive prefix path flags.
2100
8103e407
CF
21012010-02-14 Christopher Faylor <me+cygwin@cgf.cx>
2102
2103 * fhandler.cc (fhandler_base::setup_overlapped): Don't set signalled
2104 state to true initially.
2105 (fhandler_base::has_ongoing_io): Delete ill-advised function.
2106 (fhandler_base::read_overlapped): Rely on caller having checked
2107 nonblocking state. Don't attempt to (incorrectly) check it here.
2108 (fhandler_base::write_overlapped): Remove call to has_ongoing_io.
2109 * select.cc (peek_pipe): Ditto.
2110 * fhandler.h (fhandler_base::has_ongoing_io): Delete declaration.
2111
d67a6ce4
CF
21122010-02-14 Christopher Faylor <me+cygwin@cgf.cx>
2113
2114 * regex/regcomp.c (xwcrtomb): Fix one explicable and one inexcplicable
2115 C warning.
2116
15a9e176
CV
21172010-02-13 Corinna Vinschen <corinna@vinschen.de>
2118
2119 * regex/regcomp.c (xwcrtomb): Don't convert Unicode chars outside the
2120 base plane always to UTF-8. Call wcsnrtombs instead to allow arbitrary
2121 multibyte charsets.
2122
6b3f923f
CV
21232010-02-12 Corinna Vinschen <corinna@vinschen.de>
2124
2125 * regex/regcomp.c (wgetnext): Use size_t as type for n2 since that's
2126 what's returned by mbrtowc.
2127 * regex/regexec.c (xmbrtowc): Ditto.
2128
2b1407d3
CF
21292010-02-12 Christopher Faylor <me+cygwin@cgf.cx>
2130
2131 * pthread.cc (pthread_mutex_init): Explicitly fill out third arg to
2132 pthread_mutex::init.
2133 * thread.cc: Remov some obsolete comments.
2134 (verifyable_object_isvalid): Reflect change to use thread_magic_t for
2135 magic numbers.
2136 (pthread_mutex::pthread_mutex): Set magic number to invalid initially
2137 until we've verified that everything is valid.
2138 (pthread_mutex::unlock): Fix a comment.
2139 (verifyable_object::verifyable_object): Delete here.
2140 (~verifyable_object::~verifyable_object): Ditto.
2141 (pthread_mutex::init): Don't run is_good_initializer for non-static
2142 objects.
2143 * thread.h (thread_magic_t): New typedef.
2144 (verifyable_object::verifyable_object): Use thread_magic_t;
2145 (verifyable_object::magic): Ditto.
2146 (pthread_mutex::is_good_initializer_or_bad_object): Remove unneeded
2147 variable names.
2148 (pthread_mutex::can_be_unlocked): Ditto.
2149 (pthread_mutex::init): Ditto. Remove default for third argument.
2150
7bd2296c
CV
21512010-02-12 Corinna Vinschen <corinna@vinschen.de>
2152
2153 * regex/regcomp.c (xwcrtomb): New function to convert wide chars
2154 outside of the base plane to UTF-8. Call throughout instead of
2155 wcrtomb.
2156 (wgetnext): Handle surrogate pairs on UTF-16 systems.
2157 * regex/regexec.c (xmbrtowc): Ditto.
2158
e122c471
CV
21592010-02-12 Corinna Vinschen <corinna@vinschen.de>
2160
2161 * sec_auth.cc (get_user_local_groups): Retrieve name of well known
2162 builtin group from system. Explain why.
2163 * sec_helper.cc (well_known_builtin_sid): New SID for BUILTIN group.
2164 * security.h (well_known_builtin_sid): Declare.
2165
848dbc8f
PH
21662010-02-11 Pierre Humblet <Pierre.Humblet@ieee.org>
2167
97e5d3ff 2168 * registry.cc (get_registry_hive_path): Add space in string.
848dbc8f 2169
44caccfc
CV
21702010-02-11 Corinna Vinschen <corinna@vinschen.de>
2171
2172 * regex/engine.c (step): Drop Cygwin-specific definition.
2173 (NONCHAR): Better cast here to make the test work. Move comment
2174 from step here.
2175 (matcher): Disable skipping initial string in multibyte case.
2176 * regex/regcomp.c (p_bracket): Don't simplify singleton in the invert
2177 case.
2178 (p_b_term): Handle early end of pattern after dash in bracket
2179 expression.
2180 (singleton): Don't ignore the wides just because there's already a
2181 singleton in the single byte chars. Fix condition for a singleton
2182 wide accordingly.
2183 (findmust): Check for LC_CTYPE charset, rather than LC_COLLATE charset.
2184 * regex2.h (CHIN): Fix condition in the icase & invert case.
2185 (ISWORD): Fix wrong cast to unsigned char.
2186
87c09031
CV
21872010-02-11 Andy Koppe <andy.koppe@gmail.com>
2188
2189 * nlsfuncs.cc (initial_setlocale): Move check whether charset has
2190 changed from here...
2191 (internal_setlocale): ...to here, to avoid unnecessary work when invoked
2192 via CW_INT_SETLOCALE.
2193
4f1c922e
CV
21942010-02-10 Corinna Vinschen <corinna@vinschen.de>
2195
2196 * nlsfuncs.cc (__set_charset_from_locale): Allow "@euro" modifier only
2197 for locales which use EUR as currency.
2198
ae40237a
CV
21992010-02-10 Corinna Vinschen <corinna@vinschen.de>
2200
2201 * nlsfuncs.cc (__get_lcid_from_locale): Convert iu_CA to iu-Latn-CA
2202 rather than iu-Cans-CA on Vista and later.
2203 (__set_charset_from_locale): Set default charset for iu_CA to UTF-8.
2204
3700578e
CF
22052010-02-10 Christopher Faylor <me+cygwin@cgf.cx>
2206
2207 * dcrt0.cc (_dll_crt0): Set _main_tls as early as possible.
2208 * thread.cc (pthread_mutex::can_be_unlocked): Remove check for
2209 MUTEX_OWNER_ANONYMOUS since it is racy and unsafe.
2210 (pthread::init_mainthread): Initialize thread directly from _my_tls.
2211 (pthread::self): Ditto.
2212 (pthread::get_tls_self_pointer): Delete.
2213 (pthread_mutex::pthread_mutex): Use an event rather than a semaphore.
2214 (pthread_mutex::lock): Rename from _<func>. Derive self directly.
2215 (pthread_mutex::tryunlock): Ditto.
2216 (pthread_mutex::destroy): Ditto.
2217 (pthread_mutex::unlock): Ditto. Accommodate change from semaphore to
2218 event.
2219 (pthread_mutex::_fixup_after_fork): Accommodate change from semaphore
2220 to event.
2221 (pthread_mutex::init): Don't attempt to initialize a semaphore unless
2222 it is in an initialized state. Do this check under
2223 mutex_initialization_lock.lock
2224 * thread.h (fast_mutex::init): Use event rather than semaphore.
2225 (fast_mutex::lock): Ditto.
2226 (pthread_mutex::_lock): Delete.
2227 (pthread_mutex::_unlock): Ditto.
2228 (pthread_mutex::_trylock): Ditto.
2229 (pthread_mutex::_destroy): Ditto.
2230 (pthread_mutex::get_pthread_self): Ditto.
2231 (pthread_mutex::get_tls_self_pointer): Ditto.
2232 (pthread_mutex::lock): Un-inline.
2233 (pthread_mutex::unlock): Ditto.
2234 (pthread_mutex::trylock): Ditto.
2235 (pthread_mutex::destroy): Ditto.
2236
161387a7
CF
22372010-02-09 Christopher Faylor <me+cygwin@cgf.cx>
2238
2239 * cygtls.h (struct _cygtls): Remove unneeded elements.
2240 * thread.cc (pthread::exit): Avoid potential double call to
2241 _my_tls.remove.
2242 * tlsoffsets.h: Regenerate.
2243
ae40237a
CV
22442010-02-09 Corinna Vinschen <corinna@vinschen.de>
2245
2246 * nlsfuncs.cc (lc_wcstombs): Add `return_invalid' flag to specify
2247 whether invalid chars should be ignored or not. Change comment.
2248 (__set_lc_monetary_from_win): Call lc_wcstombs with return_invalid
2249 flag set.
2250 (__set_lc_messages_from_win): Simplify to accommodate the fact that
2251 lc_wcstombs just ignores invalid chars. Explain why.
2252
3d9e3644
CV
22532010-02-09 Corinna Vinschen <corinna@vinschen.de>
2254
2255 * nlsfuncs.cc (__set_lc_messages_from_win): Fix typo.
2256
9008eb40
CV
22572010-02-09 Corinna Vinschen <corinna@vinschen.de>
2258
2259 * lc_msg.h: New file, fix a problem in locales with modifiers.
2260
09dfe7e0
CV
22612010-02-09 Corinna Vinschen <corinna@vinschen.de>
2262
2263 * lc_msg.h: New file, generated from running Linux system.
2264
502a4f52
CV
22652010-02-09 Corinna Vinschen <corinna@vinschen.de>
2266
2267 * lc_msg.h: New file, autogenerated from CLDR data.
2268 * nlsfuncs.cc: Include lc_msg.h.
2269 (lc_time_buf): Remove.
2270 (lc_numeric_buf): Remove.
2271 (lc_monetary_buf): Remove.
2272 (lc_mbstowcs): Fix previous fix.
2273 (__set_lc_time_from_win): Take additional pointer to buffer pointer,
2274 defined in newlib.
2275 (__set_lc_numeric_from_win): Ditto.
2276 (__set_lc_monetary_from_win): Ditto.
2277 (locale_cmp): New static function.
2278 (__set_lc_messages_from_win): New function to be called from newlib.
2279
f5a73638
CV
22802010-02-08 Corinna Vinschen <corinna@vinschen.de>
2281
2282 * external.cc (cygwin_internal): Add CW_INT_SETLOCALE case to
2283 allow to call internal_setlocale().
2284 * nlsfuncs.cc (internal_setlocale): Make externally available.
2285 * include/cygwin/version.h: Bump API minor number.
2286 * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_INT_SETLOCALE.
2287
2288 * nlsfuncs.cc (lc_mbstowcs): Fix call to f_mbtowc.
2289 (__set_locale_from_locale_alias): Ignore "@cjknarrow" modifier.
2290
ab6ef080
CV
22912010-02-07 Corinna Vinschen <corinna@vinschen.de>
2292
2293 * nlsfuncs.cc (__get_lcid_from_locale): Handle "@cyrillic" modifier
2294 for uz_UZ locale here.
2295 (__set_charset_from_locale): Accommodate above change.
2296
07d061ae
CV
22972010-02-07 Corinna Vinschen <corinna@vinschen.de>
2298
2299 * nlsfuncs.cc (__set_locale_from_locale_alias): New function to read
2300 locale aliases from /usr/share/locale/locale.alias.
2301
689109a7
CV
23022010-02-06 Corinna Vinschen <corinna@vinschen.de>
2303
2304 * nlsfuncs.cc (__get_lcid_from_locale): Handle no_NO as nb_NO, rather
2305 than nn_NO.
2306
28d3c4fa
CV
23072010-02-06 Corinna Vinschen <corinna@vinschen.de>
2308
2309 * nlsfuncs.cc (has_modifier): MOve up in file to use in
2310 __get_lcid_from_locale as well.
2311 (__get_lcid_from_locale): Handle no_NO locale as alias for nn_NO.
2312 Default all sr_XY locales to Cyrillic script. Change lcid to Latin
2313 script if "@latin" modifier has been specified.
2314 (__set_charset_from_locale): Handle Serbian in codepage 1251 case as
2315 well. Also check for sr_BA lcid. Restrict "@euro" modifier to
2316 locales otherwise defaulting to ISO-8859-1.
2317
b6b23627
CV
23182010-02-06 Corinna Vinschen <corinna@vinschen.de>
2319
2320 * nlsfuncs.cc (__set_charset_from_locale): Set default charset for
2321 "ka_GE" locale to GEORGIAN-PS, for "kk_KZ" to PT154.
2322
38d9821d
CV
23232010-02-06 Corinna Vinschen <corinna@vinschen.de>
2324
2325 * path.cc (symlink_info::check_nfs_symlink): Reopen file with
2326 FILE_READ_EA access since, surprisingly, you need it to read EAs even
2327 on NFS.
2328
b96600ef
CV
23292010-02-06 Corinna Vinschen <corinna@vinschen.de>
2330
2331 * sec_auth.cc (get_full_privileged_inheritable_token): New function
2332 to fetch token with full privileges from logon token in Vista and
2333 later, and to make token inheritable. Add lengthy comments to explain
2334 the function's job.
2335 (cygwin_logon_user): Drop calling SetHandleInformation. Enable TCB
2336 privilege and call get_full_privileged_inheritable_token.
2337 (lsaauth): Don't fetch linked token and don't make handle inheritable
2338 here, just call get_full_privileged_inheritable_token instead.
2339 (lsaprivkeyauth): Ditto.
2340
207889c9
CV
23412010-02-05 Corinna Vinschen <corinna@vinschen.de>
2342
b6b23627 2343 * nlsfuncs.cc (__set_charset_from_locale): Set default charset for
207889c9
CV
2344 "uz_UZ" locale to ISO-8859-1, with the "@cyrillic" modifier to UTF-8.
2345
e7fd0883
CF
23462010-02-05 Christopher Faylor <me+cygwin@cgf.cx>
2347
2348 * dll_init.cc (per_module::run_dtors): Use consistent method for
2349 running destructors.
2350
6e3f2c62
CF
23512010-02-04 Christopher Faylor <me+cygwin@cgf.cx>
2352
2353 * regcomp.c (p_ere): Workaround incorrect compiler warning.
2354 * regerror.c (regatoi): Return non-const string or compiler complains
2355 in certain inexplicable situations.
2356
aec8c3d5
CV
23572010-02-04 Corinna Vinschen <corinna@vinschen.de>
2358
2359 * regex/engine.c (step): Declare and define with `int ch' rather than
2360 `wint_t ch' parameter. Explain why.
2361 (NONCHAR): Remove related Cygwin patch here, including wrong comment.
2362
e1e595a6
CV
23632010-02-04 Corinna Vinschen <corinna@vinschen.de>
2364
2365 Replace regex files with multibyte-aware version from FreeBSD.
2366 * Makefile.in (install-headers): Remove extra command to install
2367 regex.h.
2368 (uninstall-headers): Remove extra command to uninstall regex.h.
2369 * nlsfuncs.cc (collate_lcid): Make externally available to allow
2370 access to collation internals from regex functions.
2371 (collate_charset): Ditto.
2372 * wchar.h: Add __cplusplus guards to make C-clean.
2373 * include/regex.h: New file, replacing regex/regex.h. Remove UCB
2374 advertising clause.
2375 * regex/COPYRIGHT: Accommodate BSD license. Remove UCB advertising
2376 clause.
2377 * regex/cclass.h: Remove.
2378 * regex/cname.h: New file from FreeBSD.
2379 * regex/engine.c: Ditto.
2380 (NONCHAR): Tweak for Cygwin.
2381 * regex/engine.ih: Remove.
2382 * regex/mkh: Remove.
2383 * regex/regcomp.c: New file from FreeBSD. Tweak slightly for Cygwin.
2384 Import required collate internals from nlsfunc.cc.
2385 (p_ere_exp): Add GNU-specific \< and \> handling for word boundaries.
2386 (p_simp_re): Ditto.
2387 (__collate_range_cmp): Define.
2388 (p_b_term): Use Cygwin-specific collate internals.
2389 (findmust): Ditto.
2390 * regex/regcomp.ih: Remove.
2391 * regex/regerror.c: New file from FreeBSD. Fix a few compiler warnings.
2392 * regex/regerror.ih: Remove.
2393 * regex/regex.7: New file from FreeBSD. Remove UCB advertising clause.
2394 * regex/regex.h: Remove. Replaced by include/regex.h.
2395 * regex/regexec.c: New file from FreeBSD. Fix a few compiler warnings.
2396 * regex/regfree.c: New file from FreeBSD.
2397 * regex/tests: Remove.
2398 * regex/utils.h: New file from FreeBSD.
2399
66dd5c4f
CF
24002010-02-03 Christopher Faylor <me+cygwin@cgf.cx>
2401
2402 * sigproc.cc (get_proc_lock): Fix error message typo.
2403
4a49c715
CV
24042010-02-03 Corinna Vinschen <corinna@vinschen.de>
2405
2406 * fhandler_disk_file.cc (fhandler_base::fstat_helper): Workaround
2407 another bug in NWFS. Add comment to explain why. Improve debug output
2408 in case the NT calls to test for binary fail.
2409 * path.h (path_conv::fs_is_cifs): New method.
2410 (path_conv::fs_is_nwfs): New method.
2411
fac3c73b
CV
24122010-02-02 Corinna Vinschen <corinna@vinschen.de>
2413
2414 * include/paths.h (_PATH_MNTTAB): Define.
2415 (_PATH_MOUNTED): Define.
2416 * include/mntent.h: Include paths.h. Define MNTTAB and MOUNTED as their
2417 paths.h equivalents. Add comment.
2418
fc6a0dc8
CF
24192010-02-01 Christopher Faylor <me+cygwin@cgf.cx>
2420
2421 * dcrt0.cc (atexit_lock): Delete.
2422 (cygwin_exit): Remove atexit lock.
2423 (cygwin_atexit): Ditto. Rename parameter to match newlib. Call
2424 __cxa_atexit when invoked by a registered DLL.
2425 * dll_init.cc (remove_dll_atexit): Delete.
2426 (dll_list::find): New function.
2427 (dll_list::detach): Use dll_list::find to find dll associated with
2428 return address. Use __cxa_finalize to run atexit functions associated
2429 with the dll.
2430 (cygwin_detach_dll): Don't assume that HANDLE == void *.
2431 * dll_init.h (dll_list::find): Declare.
2432 (__cxa_atexit): Ditto.
2433 (__cxa_finalize): Ditto.
2434
2435 * init.cc (dll_entry): Clarify comment.
2436
a3906150
DK
24372010-02-02 Dave Korn <dave.korn.cygwin@gmail.com>
2438
2439 * how-startup-shutdown-works.txt: Add new document.
2440
54c4a926
CV
24412010-01-29 Corinna Vinschen <corinna@vinschen.de>
2442
2443 * sec_auth.cc (lsaauth): Use CYG_LSA_MAGIC as checksum start value to
2444 decouple from Cygwin release.
2445
0b189c1e
CV
24462010-01-29 Corinna Vinschen <corinna@vinschen.de>
2447
2448 * libc/strfmon.c (__setup_vars): Test for an empty string rather than
2449 for a NULL pointer.
2450
d5c4cd3f
CF
24512010-01-29 Christopher Faylor <me+cygwin@cgf.cx>
2452
2453 * dll_init.cc (remove_dll_atexit): New function.
2454 (dll_list::detach): Run any atexit handlers registered in the DLL prior
2455 to unloading.
2456
2b37c431
CF
24572010-01-29 Christopher Faylor <me+cygwin@cgf.cx>
2458
2459 * libc/strfmon.c (__setup_vars): Fix compiler warning about assigning
2460 const strings. Compare a pointer to NULL rather than '\0'.
2461
2462 * dll_init.cc (dll_dllcrt0_1): Minor comment fix.
2463
2464 * pipe.cc (fhandler_pipe::create_selectable): Remove Win9x
2465 accommodation.
2466
3432d6f1
CV
24672010-01-29 Corinna Vinschen <corinna@vinschen.de>
2468
2469 Throughout, use FileBothDirectoryInformation info class rather than
2470 FileDirectoryInformation info class to avoid problems with incomplete
2471 filesystem implementations. Fix comments accordingly.
2472 * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Set
2473 fname->Length to 0 in error case to avoid potential crash in debug
2474 output.
2475 (fhandler_disk_file::readdir): Try to speed up the working default case.
2476 Check for STATUS_INVALID_NETWORK_RESPONSE as potential status value
2477 returned by filesystems not implementing FileIdBothDirectoryInformation.
2478 * ntdll.h (STATUS_INVALID_NETWORK_RESPONSE): Define.
2479 (FILE_BOTH_DIRECTORY_INFORMATION): Rename to official name.
2480 * path.cc (symlink_info::check): Don't request FILE_READ_EA access, it's
2481 not required for NFS. Try to speed up the working default case. Check
2482 for STATUS_INVALID_NETWORK_RESPONSE as potential status value returned
2483 by filesystems not supporting non-NULL EA parameters. Fix the way
2484 fs.update is called. Improve debug output.
2485
1b52d127
CV
24862010-01-28 Corinna Vinschen <corinna@vinschen.de>
2487
2488 * Makefile.in (tags, ctags, CTAGS)): Add rules to create tags file.
2489
8944c6af
CV
24902010-01-25 Corinna Vinschen <corinna@vinschen.de>
2491
2492 * nlsfuncs.cc (__get_lcid_from_locale): Add comments. Fix typos in
2493 comments. Make sure to set last_lcid every time. Return locale
2494 without territory part as invalid. Handle modern serbian territory
2495 names per ISO 3166 on older systems as well. Add appropriate comment.
2496 (__set_charset_from_locale): Handle LCID for sr_CS as well to make older
2497 systems happy.
2498
0f8df291
CV
24992010-01-25 Corinna Vinschen <corinna@vinschen.de>
2500
2501 * nlsfuncs.cc (__set_charset_from_locale): Rearrange to set charset
2502 more closely aligned to Glibc.
2503
27ac6434
CV
25042010-01-25 Corinna Vinschen <corinna@vinschen.de>
2505
2506 * spawn.cc (spawn_guts): Only try to remove long path prefix from
2507 runpath if runpath is not NULL.
2508
4fc8ae4f
CV
25092010-01-25 Corinna Vinschen <corinna@vinschen.de>
2510
2511 * nlsfuncs.cc (__get_lcid_from_locale): Fix a comment. Handle special
2512 language/TERRITORY combinations explicitely. Explain why.
2513
05fab4a6
CV
25142010-01-24 Corinna Vinschen <corinna@vinschen.de>
2515
2516 * nlsfuncs.cc (__set_charset_from_locale): Fix comment.
2517
57c7e05e
CV
25182010-01-24 Corinna Vinschen <corinna@vinschen.de>
2519
2520 * nlsfuncs.cc (check_codepage): Move from syscalls.cc here.
2521 (internal_setlocale): Ditto.
2522 (initial_setlocale): Ditto.
2523 (setlocale): Ditto.
2524 * strfuncs.cc (__sjis_wctomb): Revert previous patch.
2525 (__sjis_mbtowc): Ditto.
2526 * syscalls.cc: Move setlocale-related functions to nlsfuncs.cc.
2527
6b121156
CV
25282010-01-23 Corinna Vinschen <corinna@vinschen.de>
2529
2530 * strfuncs.cc (__sjis_wctomb): Special handling for characters which
2531 differ between SJIS and Windows codepage 932, if charset is "SJIS".
2532 (__sjis_mbtowc): Ditto.
2533 (_jis_wctomb): Remove.
2534 (__jis_mbtowc): Remove.
2535
e020bfa8
CV
25362010-01-23 Corinna Vinschen <corinna@vinschen.de>
2537
2538 * nlsfuncs.cc (wcsxfrm): Call LCMapStringW with LCMAP_BYTEREV flag to
2539 allow correct comparison using wcscmp.
2540
bc9fcc28
CV
25412010-01-22 Corinna Vinschen <corinna@vinschen.de>
2542
2543 * posix.sgml (strfmon): Move to implemented SUSv4 API.
2544
326fb376
CV
25452010-01-22 Corinna Vinschen <corinna@vinschen.de>
2546
2547 * Makefile.in (DLL_OFILES): Add nlsfunc.o and strfmon.o.
2548 * autoload.cc (LocaleNameToLCID): Define.
2549 * cygwin.din (strfmon): Export.
2550 * nlsfuncs.cc: New file. Define a lot of internal functions called
2551 from setlocale.
2552 (wcscoll): Implement locale-aware here, using CompareStringW function.
2553 (strcoll): Ditto.
2554 (wcsxfrm): Implement locale-aware here, usingLCMapStringW function.
2555 (strxfrm): Ditto.
2556 (__set_charset_from_locale): Replace __set_charset_from_codepage.
2557 Return Linux-compatible charset.
2558 * strfuncs.cc (__set_charset_from_codepage): Remove.
2559 * wchar.h (__set_charset_from_codepage): Drop definition.
2560 * wincap.h (wincaps::has_localenames): New element.
2561 * wincap.cc: Implement above element throughout.
2562 * libc/strfmon.c: New file.
2563 * libc/strptime.cc: Remove locale constant strings in favor of
2564 access to locale-specifc data.
2565 (strptime): Point _CurrentTimeLocale to locale-specific data.
2566 Throughout use correct locale-specific format fields for all
2567 locale-specific formats.
2568 * include/monetary.h: New file.
2569 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2570
43b4aa0f
CV
25712010-01-18 Corinna Vinschen <corinna@vinschen.de>
2572
2573 * strfuncs.cc: Remove needless includes.
2574
62910474
CV
25752010-01-17 Corinna Vinschen <corinna@vinschen.de>
2576
2577 * syscalls.cc (internal_setlocale): Use UTF-8 internally if external
2578 charset is ASCII.
2579
011560c8
CV
25802010-01-15 Corinna Vinschen <corinna@vinschen.de>
2581
2582 * libc/fnmatch.c: Replace with multibyte capable version from FreeBSD.
2583
1a8d1e10
CV
25842010-01-15 Corinna Vinschen <corinna@vinschen.de>
2585
2586 * fhandler_socket.cc (fhandler_socket::accept4): Reset async flag
2587 on accepted socket.
2588
9d5bf1b1
CV
25892010-01-15 Pierre A. Humblet <phumblet@phumblet.no-ip.org>
2590
2591 * fhandler_socket.cc (fhandler_socket::accept4): Set nonblocking
2592 flag exactly according to flags, as on Linux.
2593 * net.cc (cygwin_accept): Maintain BSD semantics here.
2594
0d653155
CV
25952010-01-15 Corinna Vinschen <corinna@vinschen.de>
2596
2597 * cygwin.din (accept4): Export.
2598 * fhandler.h (fhandler_socket::accept4): Rename from accept. Take
2599 additional flag parameter.
2600 * fhandler_socket.cc (fhandler_socket::accept4): Ditto. Handle
2601 SOCK_NONBLOCK and SOCK_CLOEXEC flags.
2602 * net.cc (cygwin_socket): Handle SOCK_NONBLOCK and SOCK_CLOEXEC flags
2603 in type. Check for invalid flag values.
2604 (socketpair): Ditto.
2605 (cygwin_accept): Accommodate renaming of fhandler_socket::accept
2606 function to accept4.
2607 (accept4): New function.
2608 * posix.sgml: Mention accept4 as GNU extensions.
2609 * include/cygwin/socket.h (SOCK_NONBLOCK): Define.
2610 (SOCK_CLOEXEC): Define.
2611 (_SOCK_FLAG_MASK): Define when building Cygwin.
2612 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2613 * include/sys/socket.h (accept4): Declare.
2614
14c800a5
CV
26152010-01-15 Corinna Vinschen <corinna@vinschen.de>
2616
2617 * posix.sgml: Mention dup3 and pipe2 as GNU extensions.
2618
41d184bb
CV
26192010-01-14 Corinna Vinschen <corinna@vinschen.de>
2620
2621 * dcrt0.cc (dll_crt0_1): Reset locale to "C" at the last moment before
2622 calling the application's main.
2623 * syscalls.cc (internal_setlocale): Don't reset locale to "C here.
2624 Change comment accordingly.
2625
e70fdfb9
CV
26262010-01-14 Corinna Vinschen <corinna@vinschen.de>
2627
2628 * cygwin.din (dup3): Export.
2629 (pipe2): Export.
2630 * dtable.cc (dtable::dup_worker): Take additional flags parameter.
2631 Handle O_CLOEXEC flag.
2632 (dtable::dup3): Rename from dup2. Take additional flags parameter.
2633 Check for valid flags. Drop check for newfd == oldfd.
2634 * dtable.h (dtable::dup_worker): Add flags parameter.
2635 (dtable::dup3): Rename from dup2.
2636 * fcntl.cc (fcntl64): Add F_DUPFD_CLOEXEC case.
2637 * fhandler.h (fhandler_mailslot::get_object_attr): Add flags parameter.
2638 * fhandler.cc (fhandler_base::open): Use security attribute with
2639 inheritance according to setting of O_CLOEXEC flag.
2640 * fhandler_console.cc (fhandler_console::open): Ditto.
2641 * fhandler_fifo.cc (sec_user_cloexec): New inline function to
2642 create security attribute with inheritance according to setting of
2643 O_CLOEXEC flag.
2644 (fhandler_fifo::open): Call sec_user_cloexec to fetch security
2645 attribute.
2646 (fhandler_fifo::wait): Ditto.
2647 * fhandler_mem.cc (fhandler_dev_mem::open): Ditto.
2648 * fhandler_mailslot.cc (fhandler_mailslot::get_object_attr): Take
2649 additional flags parameter. Use security attribute with inheritance
2650 according to setting of O_CLOEXEC flag.
2651 (fhandler_mailslot::open): Call get_object_attr with flags parameter.
2652 * fhandler_registry.cc (fhandler_registry::open): Call set_close_on_exec
2653 on real handles to accommodate O_CLOEXEC flag.
2654 * fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
2655 * fhandler_tape.cc: Create mutex with inheritance according to setting
2656 of O_CLOEXEC flag.
2657 * pipe.cc: Replace usage of O_NOINHERIT with O_CLOEXEC.
2658 (fhandler_pipe::init): Simplify setting close_on_exec flag.
2659 (fhandler_pipe::open): Remove setting close_on_exec flag.
2660 (fhandler_pipe::create): Use security attribute with inheritance
2661 according to setting of O_CLOEXEC flag.
2662 (pipe2): New exported function.
2663 * posix_ipc.cc: Throughout, open backing files with O_CLOEXEC
2664 flag to follow POSIX semantics.
2665 * security.h (sec_none_cloexec): New define.
2666 * syscalls.cc (dup): Add missing extern "C" qualifier. Accommodate
2667 renaming of dtable::dup2 to dtable::dup3.
2668 (dup2): Ditto. Check newfd == oldfd here.
2669 (dup3): New function. Check newfd == oldfd here.
2670 (open): Set close_on_exec flag according to O_CLOEXEC flag before
2671 calling fhandler->open.
2672 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2673
811de4bf
CV
26742010-01-13 Corinna Vinschen <corinna@vinschen.de>
2675
2676 * include/fcntl.h (O_TTY_INIT): Define as 0.
2677
c0135201
CV
26782010-01-13 Corinna Vinschen <corinna@vinschen.de>
2679
2680 * fhandler_tty.cc (fhandler_tty_master::init): Don't erase all default
2681 termios settings of slave console.
2682
4bcdec72
CV
26832010-01-13 Corinna Vinschen <corinna@vinschen.de>
2684
2685 * syscalls.cc (rename): Don't exit prematurely with EROFS when trying
2686 to rename an AF_LOCAL socket or when trying to replace an AF_LOCAL
2687 socket.
2688
c04ed45d
CV
26892010-01-12 Corinna Vinschen <corinna@vinschen.de>
2690
2691 * globals.cc (ro_u_nwfs): New R/O unicode string.
2692 * mount.cc (fs_info::update): Check for NWFS filesystem. Set
2693 has_buggy_basic_info, if so. Add comment to explain why.
2694 (fillout_mntent): Add "nwfs" string to fs_names array.
2695 * mount.h (enum fs_info_type): Add nwfs.
2696 (class fs_info): Add has_buggy_basic_info status flag. Add accessors
2697 for has_buggy_basic_info and is_nwfs.
2698 * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Accommodate
2699 filesystems with broken FileBasicInformation handling.
2700 * path.cc (symlink_info::check): Ditto.
2701 * path.h (path_conv::has_buggy_basic_info): Add method.
2702
4ee93264
CV
27032010-01-12 Corinna Vinschen <corinna@vinschen.de>
2704
2705 * dtable.cc (build_fh_name_worker): Remove. Move all functionality
2706 back into build_fh_name.
2707 (build_fh_name): Drop unused HANDLE parameter. Drop call to pc.fillin.
2708 Remove disabled build_fh_name with UNICODE_STRING name parameter.
2709 * dtable.h (build_fh_name): Drop HANDLE parameter from declaration.
2710 Remove declaration for build_fh_name with UNICODE_STRING name parameter.
2711 * path.cc (path_conv::fillin): Remove.
2712 (symlink_info::check): Fix comment.
2713 * path.h (path_conv::fillin): Remove declaration.
2714 * dir.cc: Accommodate change in build_fh_name parameters throughout.
2715 * sec_acl.cc: Ditto.
2716 * syscalls.cc: Ditto.
2717
2718 * ntea.cc (getxattr_worker): Fix debug output.
2719 (setxattr_worker): Ditto.
2720 * times.cc (utimens_worker): Ditto.
2721
523a66d9
CV
27222010-01-11 Corinna Vinschen <corinna@vinschen.de>
2723
2724 * fhandler_proc.cc (format_proc_stat): Use new in_buf.
2725 (format_proc_cpuinfo): Replace szBuffer with a union in_buf. Use type
2726 correct throughout. Add a couple of missing or newer cpu flags. Allow
2727 certain AMD flags for intel as well.
2728
f1817d36
CV
27292010-01-10 Corinna Vinschen <corinna@vinschen.de>
2730
2731 * fhandler.h (fhandler_base::fstat_helper): Declare timestamps as
2732 PLARGE_INTEGER.
2733 * fhandler_disk_file.cc (fhandler_base::fstat_by_handle):
2734 Accommodate fstat_helper change of timestamp arguments.
2735 (fhandler_base::fstat_by_name): Ditto.
2736 (fhandler_base::fstat_helper): Define with timestamps as PLARGE_INTEGER.
2737 Accommodate in call to to_timestruc_t.
2738
9f00d746
CV
27392010-01-08 Corinna Vinschen <corinna@vinschen.de>
2740
2741 * sec_auth.cc (get_token_group_sidlist): Add BUILTIN\Users account
2742 to all created tokens.
2743 * sec_helper.cc (well_known_users_sid): Define as BUILTIN\Users.
2744 * security.h (well_known_users_sid): Declare.
2745
e1212c43
CF
27462010-01-01 Christopher Faylor <me+cygwin@cgf.cx>
2747
2748 * dcrt0.cc: Bump copyright.
2749
1afba8e5
CF
27502010-01-01 Christopher Faylor <me+cygwin@cgf.cx>
2751
2752 * dcrt0.cc (dll_crt0_1): Move internal locale setting prior to
2753 potential globify to prevent creation of unglobbed filenames in the
2754 wrong character set.
This page took 0.341709 seconds and 5 git commands to generate.