1 2009-07-18 Dave Korn <dave.korn.cygwin@gmail.com>
3 * libstdcxx_wrapper.cc (operator delete): Remove stray space in
6 2009-07-17 Christopher Faylor <me+cygwin@cgf.cx>
8 * cygtls.cc (_cygtls::init_exception_handler): Test for e, not e->prev
9 or we could still end up adding our handler twice. Add comment
10 explaining what we're doing.
11 * dll_init.cc (dll_dllcrt0_1): Clarify comment.
13 2009-07-17 Christopher Faylor <me+cygwin@cgf.cx>
15 * cygtls.cc (_cygtls::init_exception_handler): Avoid adding our
16 exception handler twice.
18 2009-07-17 Corinna Vinschen <corinna@vinschen.de>
20 * syscalls.cc (unlink_nt): Just return when a sharing violation
21 occurs on remote filesystems.
23 2009-07-17 Corinna Vinschen <corinna@vinschen.de>
25 * globals.cc: Improve comment on R/O UNICODE_STRINGs.
26 * mount.h (class fs_info): Add is_mvfs bit.
27 * mount.cc (fs_info::update): Recognize MVFS remote filesystem.
28 (fillout_mntent): Reorder filesystem checks for speed. Add
29 mvfs, unixfs, and sunwnfs filesystem types.
30 * path.h (class path_conv): Add fs_is_mvfs method.
31 * path.cc (symlink_worker): On MVFS, always create symlinks as
32 Windows shortcuts. Explain why.
34 2009-07-16 Corinna Vinschen <corinna@vinschen.de>
36 * syscalls.cc (unlink_nt): First remove the R/O DOS attribute with
37 FILE_WRITE_ATTRIBUTES access only, then re-open the file for DELETE.
40 2009-07-16 Corinna Vinschen <corinna@vinschen.de>
42 * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Remove file
43 attribute check already done in NtSetAttributesFile.
45 2009-07-15 Corinna Vinschen <corinna@vinschen.de>
47 * globals.cc: Reorder constant UNICODE_STRINGs for clarity.
48 * mount.h (fs_info::sttaus): Move filesystem type flags into
49 substructure. Add union to allow simple test for having set any
50 one filesystem type flag. Replace has_buggy_open flag with is_sunwnfs
51 flag. Replace has_buggy_fileid_dirinfo with is_unixfs flag.
52 (fs_info::got_fs): New private method.
53 (fs_info::has_buggy_open): New explicit implementation.
54 (fs_info::has_buggy_fileid_dirinfo): Ditto.
55 * mount.cc (fs_info::update): Optimize filesystem checks for speed.
56 * winsup.h (IMPLEMENT_STATUS_FLAG): Change write accessor to return
59 2009-07-15 Corinna Vinschen <corinna@vinschen.de>
61 * fhandler_netdrive.cc (GET_RESOURCE_INFO): Remove.
62 (thread_netdrive): Drop GET_RESOURCE_INFO case.
63 (fhandler_netdrive::exists): Use GET_RESOURCE_OPENENUM info class
64 to check for existance.
66 2009-07-15 Corinna Vinschen <corinna@vinschen.de>
68 * fhandler_netdrive.cc (fhandler_netdrive::readdir): Remove useless
71 2009-07-15 Corinna Vinschen <corinna@vinschen.de>
73 * path.cc (cwdstuff::set): Only fix up UNC path in win32 so as not
74 to overwrite incoming path.
76 2009-07-14 Corinna Vinschen <corinna@vinschen.de>
78 Throughout avoid having to initialize constant UNICODE_STRINGs.
79 * globals.cc: Define constant UNICODE_STRINGs and store in .rdata
81 * fhandler_disk_file.cc: Throughout, use readonly UNICODE_STRINGs
82 rather then initializing local UNICODE_STRING variable where
84 * fhandler_mem.cc (fhandler_dev_mem::open): Ditto.
85 * flock.cc (inode_t::inode_t): Ditto.
88 * mount.cc (fs_info::update): Ditto.
91 * ntdll.h (RtlEqualUnicodePathPrefix): Redefine to take prefix as
93 (RtlEqualUnicodePathSuffix): Redefine to take suffix as UNICODE_STRING.
94 * fhandler_disk_file.cc: Accommodate throughout.
95 * mount.cc (fs_info::update): Ditto.
96 * path.cc (cwdstuff::set): Ditto.
99 2009-07-14 Corinna Vinschen <corinna@vinschen.de>
101 * globals.cc (active_codepage): Remove.
103 2009-07-12 Christopher Faylor <me+cygwin@cgf.cx>
105 * how-spawn-works.txt: Add "out of date" note.
106 * how-vfork-works.txt: Ditto.
108 2009-07-12 Christopher Faylor <me+cygwin@cgf.cx>
110 * Makefile.in: Don't do anything special with any RCS directories.
112 * ntdll.h (PROCESSINFOCLASS): Remove unneeded trailing comma.
114 * pinfo.cc (_pinfo::dup_proc_pipe): Remove unneeded assignment.
116 * sigproc.cc (sig_send): Don't send signal to myself if this is an exec
119 2009-07-12 Corinna Vinschen <corinna@vinschen.de>
121 * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Don't use
122 FileAllInformation info class since it needs a big buffer. Add a
125 2009-07-07 Dave Korn <dave.korn.cygwin@gmail.com>
127 * winbase.h (ilockexch): Avoid making 'ret' volatile.
128 (ilockcmpexch): Likewise.
130 2009-07-07 Dave Korn <dave.korn.cygwin@gmail.com>
132 * Makefile.in (DLL_OFILES): Add libstdcxx_wrapper.o
133 (libstdcxx_wrapper_CFLAGS): Add flags for new module.
134 (_cygwin_crt0_common_STDINCFLAGS): Define per-file override.
135 (libstdcxx_wrapper_STDINCFLAGS, cxx_STDINCFLAGS): Likewise.
136 * cxx.cc: Include "cygwin-cxx.h".
137 (operator new): Tweak prototype for full standards compliance.
138 (operator new[]): Likewise.
139 (operator new (nothrow)): New fallback function.
140 (operator new[] (nothrow), operator delete (nothrow),
141 operator delete[] (nothrow)): Likewise.
142 (default_cygwin_cxx_malloc): New struct of pointers to the above,
143 for final last-resort fallback default.
144 * cygwin-cxx.h: New file.
145 (struct per_process_cxx_malloc): Define.
146 (default_cygwin_cxx_malloc): Declare extern.
147 * cygwin.din (__wrap__ZdaPv): Export new wrapper.
148 (__wrap__ZdaPvRKSt9nothrow_t, __wrap__ZdlPv,
149 __wrap__ZdlPvRKSt9nothrow_t, __wrap__Znaj,
150 __wrap__ZnajRKSt9nothrow_t, __wrap__Znwj,
151 __wrap__ZnwjRKSt9nothrow_t): Likewise.
152 * globals.cc (__cygwin_user_data): Init newly-repurposed 'forkee'
153 field (now 'cxx_malloc') to point to default_cygwin_cxx_malloc.
154 * libstdcxx_wrapper.cc: New file.
155 (__wrap__ZdaPv, __wrap__ZdaPvRKSt9nothrow_t, __wrap__ZdlPv,
156 __wrap__ZdlPvRKSt9nothrow_t, __wrap__Znaj,
157 __wrap__ZnajRKSt9nothrow_t, __wrap__Znwj,
158 __wrap__ZnwjRKSt9nothrow_t): Define wrapper functions for libstdc++
159 malloc operators and their overrides.
160 * winsup.h (default_cygwin_cxx_malloc): Declare extern.
161 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
162 * include/sys/cygwin.h (struct per_process_cxx_malloc): Forward
164 (struct per_process::forkee): Rename and repurpose from this ...
165 (struct per_process::cxx_malloc): ... to this.
166 * lib/_cygwin_crt0_common.cc: Include cygwin-cxx.h.
167 (WEAK): Define shorthand helper macro.
168 (__cygwin_cxx_malloc): Define and populate with weak references
169 to whatever libstdc++ malloc operators will be visible at final
170 link time for Cygwin apps and dlls.
171 (_cygwin_crt0_common): Always look up cygwin DLL's internal
172 per_process data, and don't test for (impossible) failure. Inherit
173 any members of __cygwin_cxx_malloc that we don't have overrides
174 for from the DLL's default and store the resulting overall set of
175 overrides back into the DLL's global per_process data.
177 2009-07-07 Corinna Vinschen <corinna@vinschen.de>
179 * cygtls.cc (_cygtls::remove): Fix typo.
181 2009-07-06 Christopher Faylor <me+cygwin@cgf.cx>
183 * Makefile.in (clean): Clean generated files in srcdir.
184 * tlsoffsets.h: Regenerate.
186 2009-07-06 Christopher Faylor <me+cygwin@cgf.cx>
188 * cygtls.cc (_cygtls::remove): Avoid closing a NULL handle.
190 2009-07-06 Corinna Vinschen <corinna@vinschen.de>
192 * fhandler_socket.cc (fhandler_socket::recv_internal): Convert wsabuf
193 and wsacnt to references. Fix handling of WSAEMSGSIZE.
195 2009-07-06 Corinna Vinschen <corinna@vinschen.de>
197 * cygtls.h (struct _local_storage): Add thread storage pointers for
198 memory used by socket select functions. Combine them into a single
200 * cygtls.cc: Accommodate above change throughout.
201 (_cygtls::init_thread): Drop initalizing of sockevt to
202 INVALID_HANDLE_VALUE.
203 (_cygtls::fixup_after_fork): Reset sockevt to NULL.
204 (_cygtls::remove): Don't use sockevt value to bail out prematurely.
205 Set sockevt to NULL. Free malloced select members.
206 * select.h (struct select_socket_info): Drop max_w4 member.
207 * select.cc (thread_socket): Use INFINITE timeout value if number of
208 objects to wait for is <= MAXIMUM_WAIT_OBJECTS. Use num_w4 member
209 of select_socket_info struct rather than dropped max_w4.
210 (init_tls_select_info): New inline function to initialize TLS select
212 (start_thread_socket): Just call init_tls_select_info to initialize TLS
213 select members and use them later on.
214 (socket_cleanup): Don't free select_socket_info pointer members since
215 they are thread local now.
217 2009-07-06 Christopher Faylor <me+cygwin@cgf.cx>
219 * dtable.cc (handle_to_fn): Detect failing NtQueryObject.
221 2009-07-06 Corinna Vinschen <corinna@vinschen.de>
223 * autoload.cc: Delete stray CR.
225 2009-07-05 Christopher Faylor <me+cygwin@cgf.cx>
227 * fhandler_console.cc: Change workstation -> windows station
230 2009-07-04 Christopher Faylor <me+cygwin@cgf.cx>
232 * autoload.cc (SetParent): Add new import.
233 * fhandler.h (fhandler_console::create_invisible_console): Declare new
235 (create_invisible_console_workaround): Ditto.
236 * fhandler_console.cc (fhandler_console::create_invisible_console):
238 (create_invisible_console_workaround): Ditto. Add too much code to
239 deal with broken Windows 7. Use a helper app to start an invisible
241 (fhandler_console::need_invisible): Reorganize to use helper functions
242 to create invisible console.
244 * spawn.cc (spawn_guts): Avoid zeroing already zeroed fields in si.
246 2009-07-04 Dave Korn <dave.korn.cygwin@gmail.com>
248 * autoload.cc (AttachConsole): Correct size of args.
250 2009-07-03 Christopher Faylor <me+cygwin@cgf.cx>
252 * dcrt0.cc (jit_debug): New global.
253 (initial_env): Set jit_debug when we are automatically starting a gdb
255 * dtable.cc (dtable::get_debugger_info): Don't tty tricks when we are
256 being debugged by our own captive gdb, as determined by jit_debug ==
258 (dtable::init_std_file_from_handle): Detect errors when initializing a
259 tty early rather than at random points later.
260 * fhandler.h (fhandler_*::init): Return int to indicate
262 * fhandler.cc (fhandler_base::init): Reflect change in return value.
263 * pipe.cc (fhandler_pipe::init): Ditto.
264 (fhandler_pipe::create_selectable): Don't say we're retrying when we
266 * fhandler_console.cc (fhandler_console::init): Ditto. Return
268 * fhandler_serial.cc (fhandler_serial::init): Ditto.
269 * fhandler_tty.cc (fhandler_tty_slave::init): Ditto.
270 (fhandler_tty_slave::open): Make debugging output more detailed.
271 * tty.cc (tty_list::terminate): Don't close I/O handles before all
272 slaves have checked in.
273 (tty::slave_alive): Make a non-inlined function. Check if tty pipe
274 handles can be created as an additional exists check.
275 * tty.h (tty::slave_alive): Just define here.
277 2009-07-03 Corinna Vinschen <corinna@vinschen.de>
279 * posix.sgml: Add fpurge and mkstemps to BSD list.
281 2009-07-03 Eric Blake <ebb9@byu.net>
283 * cygwin.din (fpurge, mkstemps): New exports.
284 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
285 * mktemp.cc (_gettemp): Add parameter.
286 (mkstemps): New function.
287 (mkstemp, mkdtemp, mktemp): Adjust clients.
289 2009-07-03 Corinna Vinschen <corinna@vinschen.de>
291 * autoload.cc: Fix typo in comment.
292 (ShowWindowAsync): Define.
293 (AttachConsole): Define.
294 * fhandler_console.cc (fhandler_console::need_invisible): Add band-aid
295 for Windows 7 AllocConsole bug.
297 2009-07-01 Corinna Vinschen <corinna@vinschen.de>
299 * net.cc (get_xp_ifs): Fix typo in comment.
301 2009-07-01 Corinna Vinschen <corinna@vinschen.de>
303 * fhandler.h (class fhandler_socket): Add class members and methods
304 to store and retrieve the SO_RCVBUF and SO_SNDBUF sizes.
305 * fhandler_socket.cc (fhandler_socket::dup): Duplicate new members.
306 (fhandler_socket::send_internal): Check for SO_SNDBUF size and
307 restrict send to 1 byte less per KB 823764. Leave loop immediately
308 if WSASendMsg has been used.
309 * net.cc (fdsock): Change comment again. Set buffer sizes to 65536.
310 Store values in fhandler_socket.
311 (cygwin_setsockopt): Store SO_RCVBUF and SO_SNDBUF sizes in
313 (cygwin_sendto): Drop call to sig_dispatch_pending.
314 (cygwin_recvfrom): Ditto.
315 (cygwin_recvmsg): Ditto.
316 (cygwin_sendmsg): Ditto.
318 2009-06-30 Christopher Faylor <me+cygwin@cgf.cx>
320 * select.h: New file split from fhandler.h.
321 (select_record::select_record): Define do-nothing constructor for "new"
322 to avoid gratuitous zeroing.
323 (select_info): New base class.
324 (select_pipe_info): New class with methods for dealing with pipes.
325 (select_socket_info): New class with methods for dealing with sockets.
326 (select_serial_info): Dummy class for serial.
327 (select_mailslot_info): Dummy class for mailslots.
328 (select_stuff): Define device_specific_* as actual classes rather than
330 * dtable.h (dtable::select_read): Accommodate return value change to
331 'bool' and argument change to "select_stuff".
332 (dtable::select_write): Ditto.
333 (dtable::select_except): Ditto.
334 * dtable.cc (dtable::select_read): Accommodate return value change to
335 'bool' and argument change to "select_stuff".
336 (dtable::select_write): Ditto.
337 (dtable::select_except): Ditto.
338 * fhandler.h: Excise select-related classes.
339 (fhandler_*::select_read): Change argument to select_stuff.
340 (fhandler_*::select_write): Ditto.
341 (fhandler_*::select_except): Ditto.
342 * select.cc (UNIX_FD_ZERO): Use memset rather than bzero.
343 (select_stuff::test_and_set): Change return type to bool. Allocate
344 select_record on entry and let fhandler_*::select_* operate on the
345 start.next field of select_stuff.
347 (select_pipe_info::select_pipe_info): New constructor. Allocates event
348 for controlling pipe waits.
349 (select_pipe_info::~select_pipe_info): New destructor. Destroy event.
351 (select_pipe_info::add_watch_handle): New function.
352 (thread_pipe): Wait for the hEvent part of any overlapped pipes before
354 (start_thread_pipe): Don't allocate device_specific_pipe stuff here.
355 Assume that it has been allocated earlier.
356 (pipe_cleanup): Rely on select_pipe_info destructor to clean up pipe
358 (fhandler_*::select_*): Derive select_record from new select_stuff
360 (fhandler_pipe::select_*): Ditto. Allocate pipe-specific field if not
363 (thread_serial): serialinf -> select_serial_info.
364 (fhandler_base::ready_for_read): Rewrite to accommodate change in
365 argument to fhandler_*::select_*.
367 (thread_socket): socketinf -> select_socket_info.
368 (mailslotinf): Delete.
369 (thread_mailslot): mailslotinf -> select_mailslot_info.
371 2009-06-30 Christopher Faylor <me+cygwin@cgf.cx>
373 * fhandler.cc (fhandler_base::has_ongoing_io): Accept an argument
374 indicating whether the overlapped event should be tested.
375 (fhandler_base::read_overlapped): Pass is_overlapped state to
377 (fhandler_base::write_overlapped): Ditto.
378 * fhandler.h (fhandler_base::has_ongoing_io): Accommodate argument
380 * select.cc (peek_pipe): Ditto.
382 2009-06-30 Corinna Vinschen <corinna@vinschen.de>
384 * net.cc (fdsock): Set default socket buffer sizes to 65520. Change
386 * fhandler_socket.cc (fhandler_socket::send_internal): Set maximum
387 send size to 65520 as well.
389 2009-06-29 Christopher Faylor <me+cygwin@cgf.cx>
391 * select.cc (peek_pipe): Turn on (temporarily?) the experimental code
392 which tries to determine when a pipe is writable.
394 2009-06-28 Christopher Faylor <me+cygwin@cgf.cx>
396 * select.cc (peek_pipe): Use has_ongoing_io() to determine if the pipe
397 is ready for writing rather than performing brute-force checks.
399 2009-06-28 Christopher Faylor <me+cygwin@cgf.cx>
401 * fhandler.h (fhandler_base::has_ongoing_io): Declare new function.
402 * fhandler.cc (fhandler_base::has_ongoing_io): Define new function.
403 (fhandler_base::read_overlapped): Use has_ongoing_io to avoid writing
404 when handle has not completed last I/O.
405 (fhandler_base::write_overlapped): Ditto.
406 * select.cc (peek_pipe): Be more careful about accessing hEvent field
407 from get_overlapped().
409 2009-06-28 Christopher Faylor <me+cygwin@cgf.cx>
411 * gendef (cleanup): Rename from 'nocr'. Remove comments and trailing
413 * cygwin.din: Add long-needed comment describing what
414 dll_crt0__FP11per_process demangles to.
416 * select.cc (peek_pipe): Flag handle as not ready for write if event is
418 * fhandler.cc (fhandler_base::setup_overlapped): Establish event as
420 (fhandler_base::wait_overlapped): Don't reset event after we've
421 successfully waited. MSDN documentation says that this happens
422 automatically after a WriteFileEx/ReadFileEx.
424 2009-06-26 Corinna Vinschen <corinna@vinschen.de>
426 * wincap.h (wincaps::has_broken_alloc_console): New element.
427 * wincap.cc: Implement above element throughout.
429 2009-06-25 Corinna Vinschen <corinna@vinschen.de>
431 * sec_auth.cc (lsaauth): Close unused handle.
432 (lsaprivkeyauth): Ditto.
434 2009-06-23 Corinna Vinschen <corinna@vinschen.de>
436 * sec_auth.cc (get_server_groups): Ignore errors from
437 get_user_local_groups.
439 2009-06-22 Corinna Vinschen <corinna@vinschen.de>
441 * spawn.cc (spawn_guts): Don't run additional check for Win32
442 incompatible CWD if newargv.fixup bailed out already.
443 (av::fixup): Check shell scripts for executability.
445 2009-06-18 Corinna Vinschen <corinna@vinschen.de>
447 * path.cc (chdir): Check error conditions first.
449 2009-06-17 Corinna Vinschen <corinna@vinschen.de>
451 * fhandler_socket.cc (fhandler_socket::recv_internal): Mark WSARecvMsg
454 2009-06-16 Christopher Faylor <me+cygwin@cgf.cx>
456 * fhandler.cc (fhandler_base::read_overlapped): Use a better variable
459 2009-06-16 Christopher Faylor <me+cygwin@cgf.cx>
461 * fhandler.cc (fhandler_base::read_overlapped): Preserve len when
462 looping due to received signal.
464 2009-06-15 Corinna Vinschen <corinna@vinschen.de>
466 * net.cc (get_flags): New static function to generate interface flags
468 (get_ipv4fromreg_ipcnt): New static function to fetch number of
469 configured IPv4 addresses for a given NIC from registry.
470 (get_ipv4fromreg): New static function to fetch configured IPv4
471 addresses for a given NIC from registry.
472 (get_friendlyname): New static function to generate friendly name.
473 (get_hwaddr): New static function to copy hardware address.
474 (get_xp_ifs): Restructure slightly. Add code to generate IPv4 entries
475 entries for interfaces which are disconnected.
477 2009-06-14 Christopher Faylor <me+cygwin@cgf.cx>
479 * errno.cc (errmap): Add mapping for ERROR_IO_INCOMPLETE.
480 * fhandler.cc (fhandler_base::fcntl): Fix comment.
481 (fhandler_base::wait_overlapped): Accept an optional len parameter.
482 Use the len parameter when WriteFile fails with ERROR_IO_PENDING. Make
483 debug output less alarming.
484 (fhandler_base::write_overlapped): Pass len to wait_overlapped.
485 * fhandler.h (fhandler_base::wait_overlapped): Add an optional argument
486 denoting the number of characters intended to be written.
488 * fhandler_tty.cc (fhandler_pty_master::close): Don't close archetype
489 handles when cygwin is still initializing since the handles aren't
490 actually opened at that point.
492 2009-06-14 Corinna Vinschen <corinna@vinschen.de>
494 * localtime.cc (time2): Take another stab at fixing a compiler warning.
496 2009-06-14 Christopher Faylor <me+cygwin@cgf.cx>
498 * localtime.cc (time2): Take a stab at fixing a compiler warning.
500 2009-06-14 Christopher Faylor <me+cygwin@cgf.cx>
502 * fhandler.cc (fhandler_base::wait_overlapped): Honor nonblocking flag
503 for writes. Don't reset event handle when we see a ERROR_IO_PENDING.
505 * sigproc.cc (stopped_or_terminated): Use bool constants for
508 * wait.cc (wait4): Remove nonsensical comment.
510 2009-06-13 Corinna Vinschen <corinna@vinschen.de>
512 * fhandler_socket.cc (fhandler_socket::recv_internal): Set namelen
513 pointer to NULL if name pointer is NULL. Explain why.
515 2009-06-12 Corinna Vinschen <corinna@vinschen.de>
517 * localtime.cc (time2): Change "spring gap" to "spring forward gap"
520 2009-06-12 Corinna Vinschen <corinna@vinschen.de>
522 * localtime.cc (time2): Add workaround for spring forward gap problem.
523 Add explaining comment.
525 2009-06-12 Corinna Vinschen <corinna@vinschen.de>
527 * Makefile.in (SUBLIBS): Add librt.a.
528 (librt.a): New rule to build librt.a.
530 2009-06-12 Corinna Vinschen <corinna@vinschen.de>
532 * posix_ipc.cc (check_path): Fix typo in comment. Align naming
533 convention rules to Linux. Handle backslash same as slash. Add
536 2009-06-09 Corinna Vinschen <corinna@vinschen.de>
538 * autoload.cc (GetSystemTimes): Remove.
539 * fhandler_proc.cc (format_proc_uptime): Use global system_info rather
540 than retrieving a local copy of the SYSTEM_INFO. Drop call to
541 GetSystemTimes and retrieve SystemPerformanceInformation on all systems
542 again with buffer size big enough for 64 bit systems.
543 (format_proc_stat): Use global system_info rather than retrieving a
544 local copy of the SYSTEM_INFO. Retrieve SystemPerformanceInformation
545 with buffer size big enough for 64 bit systems.
547 2009-06-08 Corinna Vinschen <corinna@vinschen.de>
549 * autoload.cc (GetSystemTimes): Define.
550 * fhandler_proc.cc (format_proc_uptime): Use GetSystemInfo to retrieve
551 processor count. Use GetSystemTimes when available to retrieve system
552 idle time. Improve debug output.
553 (format_proc_stat): Use GetSystemInfo to retrieve processor
554 count. Improve debug output. Ignore if SystemPerformanceInformation
555 returns error. Explain why.
557 2009-06-08 Corinna Vinschen <corinna@vinschen.de>
559 * fork.cc (frok::parent): Remove ancient code erroneously flushing
562 2009-06-08 Corinna Vinschen <corinna@vinschen.de>
564 * cygerrno.h (save_errno::~save_errno): Set errno directly to avoid
565 flooding debug output.
567 2009-06-08 Corinna Vinschen <corinna@vinschen.de>
569 * path.cc (symlink_info::check): Return with error set to ENOENT if
570 STATUS_NO_MEDIA_IN_DEVICE is returned.
572 2009-06-07 Christopher Faylor <me+cygwin@cgf.cx>
574 * cygheap.h (mini_cygheap): New struct.
575 (init_cygheap): Inherit locale field via mini_cygheap.
576 * cygheap.cc (cygheap_at_start): Define new variable.
577 (cygheap): Initialize as cygheap_at_start so that locale information is
579 (cygheap_init): Initialize cygheap iff it is set to cygheap_at_start.
580 * shared_info.h (memory_init): Accommodate argument change.
581 * memory.cc (memory_init): Accept an argument indicating whether
582 cygheap should be initialized or not.
583 * dcrt0.cc (child_info_fork::handle_fork): Pass false to memory_init().
584 (child_info_spawn::handle_spawn): Ditto.
585 (dll_crt0_0): Pass true to memory_init when not forking or execing.
587 * cygheap.h (cygheap_types::HEAP_2_DLL): New enum.
588 * dll_init.h (dll): Remove unused namelen field.
589 (dll_list::load_after_fork): Accommodate change in arguments.
590 * dll_init.cc (dll_list::alloc): Allocate dll information in the cygwin
592 (dll_list::detach): Free dll information from the cygwin heap.
593 (dll_list::load_after_fork): Use dll information in the cygwin heap
594 directly rather than querying parent.
595 * fork.cc (frok::first_dll): Delete.
596 (frok::child): Don't report on first_dll. Don't pass it to
598 (frok::parent): Don't set first_dll.
601 2009-06-06 Corinna Vinschen <corinna@vinschen.de>
603 * dll_init.cc (dll_list::alloc): Allocate memory using a section
604 object. Explain why. Drop call to GetSystemInfo, rather call
605 getpagesize to get allocation granularity. Only align to allocation
606 granularity under WOW64. Use roundup2 to align.
607 (dll_list::detach): Call NtUnmapViewOfSection instead of VirtualFree.
609 2009-06-06 Corinna Vinschen <corinna@vinschen.de>
611 * mmap.cc: Use NtUnmapViewOfSection instead of UnmapViewOfFile
612 throughout for symmetry.
613 (fhandler_dev_mem::munmap): Use correct process handle in call to
614 NtUnmapViewOfSection.
616 2009-06-06 Corinna Vinschen <corinna@vinschen.de>
618 * dll_init.h (struct dll): Set size of name element to ANYSIZE_ARRAY.
619 * dll_init.cc: Fix formatting.
620 (dll_list::alloc): Only allocate as much memory for struct dll as
621 necessary for given DLL name.
622 (dll_list::load_after_fork): Only read a single page of parent memory.
623 Only read more if namelen indicates that it's necessary.
625 2009-06-05 Dave Korn <dave.korn.cygwin@gmail.com>
627 * winbase.h (ilockexch): Fix asm constraints.
628 (ilockcmpexch): Likewise.
630 2009-06-05 Corinna Vinschen <corinna@vinschen.de>
632 * heap.cc (heap_init): Fix typo in comment.
634 2009-06-04 Corinna Vinschen <corinna@vinschen.de>
636 * fhandler_clipboard.cc: Avoid calling system_printf.
637 (set_clipboard): Add basic error checking. Set errno here. Per MSDN,
638 don't call GlobalFree on data block transferred to clipboard.
639 (fhandler_dev_clipboard::write): Drop setting errno after call to
641 (fhandler_dev_clipboard::read): Add basic error checking. Simplify code.
643 2009-06-04 Corinna Vinschen <corinna@vinschen.de>
645 * fhandler_console.cc (set_console_title): Convert title string to
646 wchar_t and call SetConsoleTitleW.
648 2009-06-04 Corinna Vinschen <corinna@vinschen.de>
650 * fhandler_console.cc (fhandler_console::read): Allow Ctrl-Space to
653 2009-06-04 Dave Korn <dave.korn.cygwin@gmail.com>
655 * thread.cc (__cygwin_lock_lock): Delete racy optimisation.
656 (__cygwin_lock_unlock): Likewise.
658 2009-06-03 IWAMURO Motnori <deenheart@gmail.com>
660 * strfuncs.cc (sys_cp_mbstowcs): Fix condition.
662 2009-06-03 Corinna Vinschen <corinna@vinschen.de>
664 * strfuncs.cc (sys_cp_wcstombs): Implement reverse functionality
665 of the change to sys_cp_mbstowcs from 2009-05-30.
666 (sys_cp_mbstowcs): Slightly reformat. Fix comment to accommodate
667 change to sys_cp_wcstombs. Don't write to *ptr if dst is NULL.
669 2009-06-03 Corinna Vinschen <corinna@vinschen.de>
671 * fhandler_console.cc (fhandler_console::read): Convert Alt-Backspace
672 to \033\177 or to \377 dependent on the setting of dev_state->metabit.
674 2009-06-02 Corinna Vinschen <corinna@vinschen.de>
676 * path.cc (path_conv::check): Don't call set_exec for files on "noacl"
679 2009-05-30 Christopher Faylor <me+cygwin@cgf.cx>
681 * strfuncs.cc (sys_cp_mbstowcs): Treat src as unsigned char *. Convert
682 failure of f_mbtowc into a single malformed utf-16 value.
684 2009-05-30 Christopher Faylor <me+cygwin@cgf.cx>
686 * cygwin/include/sys/termios.h: Make default erase character "^?".
688 2009-05-30 Christopher Faylor <me+cygwin@cgf.cx>
690 * fhandler_console.cc (fhandler_console::read): Convert backspace key
693 2009-05-29 Christopher Faylor <me+cygwin@cgf.cx>
695 * path.cc (cwdstuff::set): Rewrite previous change to properly test the
698 2009-05-28 Christopher Faylor <me+cygwin@cgf.cx>
700 * path.cc (cwdstuff::set): Avoid removing a nonexistent trailing slash.
702 2009-05-20 Eric Blake <ebb9@byu.net>
704 * net.cc (gethostby_helper): Use correct signedness.
706 2009-05-18 Christopher Faylor <me+cygwin@cgf.cx>
708 * mount.cc (mount_info::add_item): Avoid using any-old '/' as
711 2009-05-18 Christopher Faylor <me+cygwin@cgf.cx>
713 * mount.cc (mount_info::got_usr_bin): Mark as NO_COPY.
714 (mount_info::got_usr_lib): Ditto.
715 (mount_info::root_idx): Ditto.
717 2009-05-14 Corinna Vinschen <corinna@vinschen.de>
719 * wchar.h (sys_mbstowcs): Add missing __stdcall attribute.
721 2009-05-14 Corinna Vinschen <corinna@vinschen.de>
723 * cygheap.cc (cygheap_init): Set Cygwin default locale values.
724 * cygheap.h (struct cygheap_locale): New structure.
725 (struct user_heap_info): Add cygheap_locale member locale.
726 * dcrt0.cc (dll_crt0_1): Revert to calling _setlocale_r so that only
727 the applications locale is reverted to "C".
728 * environ.cc (environ_init): Remove unused got_lc variable.
729 * fhandler.h (class dev_console): Remove now unsed locale variables.
730 * fhandler_console.cc (fhandler_console::get_tty_stuff): Remove
731 setting dev_console's locale members.
732 (dev_console::con_to_str): Use internal locale settings. Default to
733 __ascii_wctomb if charset is "ASCII".
734 (fhandler_console::write_normal): Ditto.
735 * strfuncs.cc (__ascii_wctomb): Drop declaration.
736 (__db_wctomb): Use fixed value 2 instead of not
737 necessarily matching MB_CUR_MAX.
738 (__eucjp_wctomb): Use 3 instead of MB_CUR_MAX.
739 (sys_cp_wcstombs): Remove special case for "C" locale.
740 (sys_wcstombs): Implement here. Use internal locale data stored on
742 (sys_cp_mbstowcs): Remove special case for "C" locale.
743 (sys_mbstowcs): Implement here. Use internal locale data stored on
745 * syscalls.cc (internal_setlocale): New function to set cygheap locale
746 data and to reset CWD posix path.
747 (setlocale): Just call internal_setlocale from here if necessary.
748 * wchar.h (__ascii_wctomb): Declare.
749 (sys_wcstombs): Don't define inline, just declare.
750 (sys_mbstowcs): Ditto.
752 2009-05-14 Christopher Faylor <me+cygwin@cgf.cx>
754 * mount.cc (mount_info::init): Remove MOUNT_CYGWIN_EXEC setting when
755 auto-mounting /usr/bin.
757 2009-05-14 Corinna Vinschen <corinna@vinschen.de>
759 * mount.cc (oopts): Add a no-op "auto" option.
760 (mount_info::create_root_entry): Set root dir to MOUNT_IMMUTABLE rather
761 than to MOUNT_OVERRIDE.
763 2009-05-13 Corinna Vinschen <corinna@vinschen.de>
764 Christopher Faylor <me+cygwin@cgf.cx>
766 * mount.cc (mount_info::got_usr_bin): Define.
767 (mount_info::got_usr_lib): Ditto.
768 (mount_info::root_idx): Ditto.
769 (mount_info::create_root_entry): Create root entry as immutable and
771 (mount_info::init): Remove "Huh? No /etc/fstab..." warning.
772 Unconditionally call from_fstab for user and system tables. Fill in
773 /usr/bin and /usr/lib if they have not been specified in /etc/fstab.
774 (oopts): Alphabetize. Add "override" option to allow overriding
775 immutable mount points.
776 (mount_info::add_item): Accommodate new MOUNT_IMMUTABLE flag intended
778 (mount_info::add_item): Detect "/usr/bin", "/usr/lib", and "/" and set
779 appropriate global state.
780 (fillout_mntent): Add ,auto to mount points added by Cygwin DLL.
781 (mount): Remove masking of MOUNT_SYSTEM. Allow user to shoot
782 themselves. Add comment.
783 * mount.h (mount_info::got_usr_bin): Declare.
784 (mount_info::got_usr_lib): Ditto.
785 (mount_info::root_idx): Ditto.
786 * include/sys/mount.h: Reformat enum.
787 Add MOUNT_{OVERRIDE,IMMUTABLE,AUTOMATIC}.
789 2009-05-13 Corinna Vinschen <corinna@vinschen.de>
791 * cygheap.h (cwdstuff): Convert to class. Make posix and dir private.
792 (cwdstuff::get_posix): New method.
793 (cwdstuff::reset_posix): New method.
794 * dcrt0.cc (dll_crt0_1): Call setlocale rather than _setlocale_r.
795 * environ.cc (environ_init): Ditto. Prefer "C" locale over current
796 codepage default locale.
797 * path.cc (chdir): Use cwdstuff::get_posix method instead of accessing
798 cwdstuff::posix directly.
799 (cwdstuff::set): Defer creating posix path to first usage.
800 (cwdstuff::get_posix): Create posix path if it's empty, and return it.
801 (cwdstuff::get): Create posix path if it's empty.
802 * strfuncs.cc (sys_cp_wcstombs): Use UTF-8 conversion in the "C"
804 (sys_cp_mbstowcs): Ditto.
805 * syscalls.cc (gen_full_path_at): Fetch CWD posix path locked.
806 (setlocale): Implement here. Reset CWD posix path.
808 2009-05-09 Christopher Faylor <me+cygwin@cgf.cx>
810 * cygwin/version.h (CYGWIN_VERSION_CYGWIN_CONV): New define.
812 2009-05-09 Corinna Vinschen <corinna@vinschen.de>
814 * dtable.cc (dtable::init_std_file_from_handle): Add workaround for
815 Windows 7 64 bit issue. Add lengthy comment to explain what happens.
816 * wincap.h (wincaps::has_console_handle_problem): New element.
817 * wincap.cc: Implement above element throughout.
818 (wincap_7): New wincaps structure for NT 6.1 kernels.
819 (wincapc::init): Set has_console_handle_problem to false for 32 bit
822 2009-05-09 Corinna Vinschen <corinna@vinschen.de>
824 * sec_auth.cc (str2uni_cat): Move from here...
825 * path.cc (str2uni_cat): ...to here. Simplify. Make static inline.
826 (get_nt_native_path): Use RtlAppendUnicodeToString rather than
827 str2uni_cat for constant strings for speed.
828 * security.h (str2uni_cat): Drop declaration.
830 2009-05-08 Corinna Vinschen <corinna@vinschen.de>
831 IWAMURO Motonori <deenheart@gmail.com>
833 * strfuncs.cc (sys_cp_wcstombs): save and restore previous errno value.
834 (sys_cp_mbstowcs): Ditto.
836 2009-05-08 IWAMURO Motonori <deenheart@gmail.com>
838 * strfuncs.cc (sys_cp_wcstombs): Set errno to 0 before converting
839 wide char to SO/UTF-8 sequence.
841 2009-05-08 Corinna Vinschen <corinna@vinschen.de>
843 * include/sys/select.h: Guard definitions with __USE_W32_SOCKETS as
844 the accompanying fd_set definitions in newlib's sys/types.h.
846 2009-05-06 Christopher Faylor <me+cygwin@cgf.cx>
848 * fhandler_console.cc (fhandler_console::ioctl): Properly treat
849 TIOCLINUX argument as a char.
850 * fhandler_tty.cc (fhandler_tty_slave::ioctl): Use coercion to properly
853 2009-05-06 Corinna Vinschen <corinna@vinschen.de>
855 * libc/minires.c (scanline): Fix type in calls to ctype functions
856 to stay in unsigned char range for char values >= 0x80.
857 * regex/regcomp.c: Ditto, throughout.
858 * regex/regex2.h (ISWORD): Ditto.
860 2009-05-06 Corinna Vinschen <corinna@vinschen.de>
862 * cygheap.cc (cygheap_init): Set umask to a sane default.
863 * uinfo.cc (cygheap_user::ontherange): Don't use HOMEDRIVE/HOMEPATH
864 to set HOME. Default to /home/USERNAME.
866 2009-05-03 Corinna Vinschen <corinna@vinschen.de>
868 * security.cc (set_file_sd): Drop using FILE_OPEN_FOR_RECOVERY flag in
870 * exceptions.cc (open_stackdumpfile): Ditto in call to NtCreateFile.
871 * fhandler.cc (fhandler_base::open): Ditto. Simplify setting
874 * mount.cc (fs_info::update): Recognize offline storage.
875 (fillout_mntent): Report UDF and offline storage.
876 * mount.h (class fs_info): Add is_csc_cache status flag.
878 2009-05-04 Christopher Faylor <me+cygwin@cgf.cx>
880 * fhandler_console.cc (fhandler_console::write_console): Eliminate
881 unneeded debugging output.
882 (fhandler_console::write_normal): Eliminate unneeded __seterrno.
884 2009-05-04 Christopher Faylor <me+cygwin@cgf.cx>
886 * libc/minires.c (scanline): Accommodate ctype changes which disallow
887 use of an unadorned char argument to is* macros.
888 * regex/regcomp.c: Ditto, throughout.
889 * regex/regex2.h (ISWORD): Ditto.
891 2009-05-03 Christopher Faylor <me+cygwin@cgf.cx>
893 * fhandler.h (fhandler_console::MAX_WRITE_CHARS): Declare.
894 (fhandler_console::write_replacement_char): Declare as inline.
895 (fhandler_console::write_console): Declare new function.
896 * fhandler_console.cc (fhandler_console::MAX_WRITE_CHARS): Define.
897 (handler_console::write_console): Define.
898 (fhandler_console::write_replacement_char): Define as inline.
899 (fhandler_console::write_normal): Use write_console when writing
900 buffers of unknown length.
902 2009-04-26 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
904 * include/cygwin/socket.h: Define SOL_IPV6.
906 2009-04-21 Corinna Vinschen <corinna@vinschen.de>
908 * ctype.cc (__set_ctype): Copy exact part of the current active
909 character class array.
911 2009-04-20 Corinna Vinschen <corinna@vinschen.de>
913 * flock.cc (lf_setlock): Handle border case which results in WFMO loop
914 exiting with ret == WAIT_TIMEOUT gracefully. Add a system_printf to
915 uncover other potential problems with WFMO loop.
917 2009-04-18 Christopher Faylor <me+cygwin@cgf.cx>
919 * mkimport: Specify .text for stub explicitly.
920 * speclib: Add a dummy '.idata$7' section referring to the dll
921 associated with the real import library.
923 2009-04-18 Corinna Vinschen <corinna@vinschen.de>
925 * dcrt0.cc (globify): Only call mbtowc for non-ascii chars.
927 2009-04-17 Corinna Vinschen <corinna@vinschen.de>
929 * dcrt0.cc (globify): Make multibyte-aware.
931 2009-04-17 Corinna Vinschen <corinna@vinschen.de>
933 * flock.cc (class inode_t): Add i_wait member and matching methods
934 wait(), unwait(), and waiting().
935 (inode_t::inode_t): Initialize i_wait to 0.
936 (fhandler_disk_file::lock): Only remove node if no other thread is
937 waiting for a blocking lock.
938 (lf_setlock): Manipulate node->i_wait to signal that a thread is
939 waiting for a blocking lock in this node.
940 (lf_findoverlap): Reinstantiate SELF test as in original code.
942 2009-04-16 Corinna Vinschen <corinna@vinschen.de>
944 * dlfcn.cc (get_full_path_of_dll): Just return a bool value. Drop
945 local path_conv in favor of getting it as parameter. Add local string
946 buffer instead of getting it as parameter.
947 (dlopen): Accommodate get_full_path_of_dll change. Fetch WCHAR Windows
948 path from path_conv variable and call LoadLibraryW.
950 2009-04-16 Corinna Vinschen <corinna@vinschen.de>
952 * ntdll.h (STATUS_LOCK_NOT_GRANTED): Define.
953 * syscalls.cc (unlink_nt): Handle STATUS_LOCK_NOT_GRANTED same as
954 STATUS_SHARING_VIOLATION. Add lengthy comment to explain why.
956 2009-04-15 Corinna Vinschen <corinna@vinschen.de>
958 * path.cc (path_conv::get_wide_win32_path): Allow relative paths.
959 (cygwin_conv_path): In case of CCP_POSIX_TO_WIN_W, convert relative
960 paths to absolute paths if the relative pathname length exceeds
963 2009-04-15 Corinna Vinschen <corinna@vinschen.de>
965 * libc/bsdlib.cc: Align copyright with upstream.
966 * libc/fnmatch.c: Ditto.
968 * libc/inet_addr.c: Ditto.
969 * libc/inet_network.c: Ditto.
970 * libc/rcmd.cc: Ditto.
971 * libc/rexec.cc: Ditto.
973 2009-04-14 Christopher Faylor <me+cygwin@cgf.cx>
975 * speclib: Really revert to using tempdir.
977 2009-04-14 Christopher Faylor <me+cygwin@cgf.cx>
979 * speclib: Revert to using tempdir.
981 2009-04-14 Corinna Vinschen <corinna@vinschen.de>
983 * localtime.cc (tzload): Implement setting __tzrule's offset member
984 using newlib's __gettzinfo () interface also when tzload returns
987 2009-04-13 Dave Korn <dave.korn.cygwin@gmail.com>
989 * include/stdint.h (intptr_t): Remove long from type.
990 (uintptr_t): Likewise.
991 (INTPTR_MIN): Remove 'L' suffix.
992 (INTPTR_MAX, UINTPTR_MAX): Likewise.
994 2009-04-12 Christopher Faylor <me+cygwin@cgf.cx>
996 * speclib: Initial stab at cleaning up temp files. More work needed.
999 2009-04-12 Christopher Faylor <me+cygwin@cgf.cx>
1001 * Makefile.in (clean): Clean globals.h.
1002 (LIBCOS): Depend on globals.h.
1004 2009-04-11 Christopher Faylor <me+cygwin@cgf.cx>
1006 * mkimport: New script to perform all operations necessary to create
1010 * Makefile.in (toolopts): New variable which holds options relating to
1012 (speclib): Use toolopts. Add symbols to avoid copying to special
1014 (OBSOLETE_FUNCTIONS): Delete.
1015 (NEW_FUNCTIONS): Change to represent an argument to new mkimport
1017 (libcygwin.a): Use only new mkimport script to create libcygwin.a.
1018 Only rely on ${LIBCOS}.
1019 (*/lib*.a): Simplify speclib dependencies.
1020 (speclib): Accept toolchain options. Convert every argument to
1021 absolute path. Simplify parsing of nm output. Accommodate new
1024 2009-04-11 Dave Korn <dave.korn.cygwin@googlemail.com>
1026 * include/stdint.h (INTPTR_MIN, INTPTR_MAX): Add 'L' suffix.
1027 (WINT_MAX): Add 'U' suffix.
1029 2009-04-10 Christopher Faylor <me+cygwin@cgf.cx>
1031 * speclib: Use a more robust method to derive full file path.
1033 2009-04-09 Christopher Faylor <me+cygwin@cgf.cx>
1035 * speclib: Semi-revert to previous version but don't try to generate
1036 well-formed import library. Instead, just extract appropriate symbols
1037 and let later libcygwin.a on link line fill in the rest of the import
1039 * gendef: Hopefully no-op modification to allow easier post-processing
1042 2009-04-09 Corinna Vinschen <corinna@vinschen.de>
1044 * syscalls.cc (try_to_bin): Use tmp_pathbuf buffer to allocate infobuf
1045 rather than using the stack.
1047 2009-04-09 Corinna Vinschen <corinna@vinschen.de>
1049 * syscalls.cc (try_to_bin): Fix alignment of infobuf.
1051 2009-04-09 Corinna Vinschen <corinna@vinschen.de>
1053 * fhandler_disk_file.cc (fhandler_disk_file::fchown): Catch an
1054 error when changing the user account on a standalone Samba server.
1056 * sec_acl.cc (setacl): Accommodate additional parameter to set_file_sd.
1057 * sec_helper.cc (SECURITY_SAMBA_UNIX_AUTHORITY): Define.
1058 (well_known_samba_unix_user_fake_sid): Define.
1059 * security.cc (set_file_sd): Take additional parameter if ownership
1060 should be changed. Restrict requested permissions accordingly.
1061 (set_file_attribute): Accommodate additional parameter to set_file_sd.
1062 * security.h (well_known_samba_unix_user_fake_sid): Declare.
1063 (set_file_sd): Align declaration to above change.
1065 2009-04-07 Corinna Vinschen <corinna@vinschen.de>
1067 * include/stdint.h (int_least32_t): Define as int.
1068 (uint_least32_t): Ditto, unsigned.
1069 (int_fast16_t): Define as int.
1070 (int_fast32_t): Ditto.
1071 (uint_fast16_t): Ditto, unsigned.
1072 (uint_fast32_t): Ditto.
1073 (UINT32_MAX): Remove `L' long marker.
1074 (UINT_LEAST32_MAX): Ditto.
1075 (UINT_FAST16_MAX): Ditto.
1076 (UINT_FAST32_MAX): Ditto.
1080 2009-04-07 Corinna Vinschen <corinna@vinschen.de>
1082 * strfuncs.cc: Change WCHAR to wchar_t in multibyte<->widechar
1083 conversion functions throughout.
1084 * wchar.h: Ditto in declarations. Guard them __INSIDE_CYGWIN__.
1086 2009-04-07 Corinna Vinschen <corinna@vinschen.de>
1088 * fhandler.h (class dev_console): Add members con_mbtowc, con_wctomb,
1090 (dev_console::str_to_con): Take mbtowc function pointer and charset
1091 as additional parameters.
1092 * fhandler_console.cc (fhandler_console::get_tty_stuff): Initialize
1093 aforementioned new members. Explain why.
1094 (dev_console::con_to_str): Remove useless comment. Call new
1095 sys_cp_wcstombs function rather than sys_wcstombs.
1096 (dev_console::str_to_con): Take mbtowc function pointer and charset
1097 as additional parameters. Call sys_cp_mbstowcs accordingly.
1098 (fhandler_console::write_normal): Only initialize f_mbtowc and charset
1099 once. Accommodate changed str_to_con.
1100 * strfuncs.cc (sys_cp_wcstombs): Renamed from sys_wcstombs. Take
1101 wctomb function pointer and charset as parameters. Use throughout.
1102 (sys_cp_mbstowcs): Take wctomb function pointer and charset as
1103 parameters instead of codepage. Remove matching local variables and
1104 their initialization.
1105 * wchar.h (ENCODING_LEN): Define as in newlib.
1106 (__mbtowc): Use mbtowc_p typedef for declaration.
1107 (wctomb_f): New type.
1108 (wctomb_p): New type.
1109 (__wctomb): Declare.
1110 (__utf8_wctomb): Use wctomb_f typedef for declaration.
1111 (sys_cp_wcstombs): Move declaration from winsup.h here.
1112 (sys_wcstombs): Ditto.
1113 (sys_wcstombs_alloc): Ditto.
1114 (sys_cp_mbstowcs): Ditto.
1115 (sys_mbstowcs): Ditto.
1116 (sys_mbstowcs_alloc): Ditto.
1117 * winsup.h: Move declaration of sys_FOO functions to wchar.h. Include
1120 2009-04-06 Earl Chew <earl_chew@agilent.com>
1122 * libc/rexec.cc (ruserpass): Use fstat64 instead of fstat.
1124 2009-04-06 Corinna Vinschen <corinna@vinschen.de>
1126 * strfuncs.cc: Add comment to explain why we can't support JIS
1128 (__db_wctomb): Alwaus use WC_NO_BEST_FIT_CHARS.
1129 (__jis_wctomb): Just call __ascii_wctomb from here.
1130 (__eucjp_wctomb): Convert to standalone implementation to fix up the
1131 difference between eucJP and CP 20932 affecting JIS-X-0212 characters.
1133 (__kr_wctomb): Use codepage 949.
1134 (__db_mbtowc): Reorder code slightly. Always use MB_ERR_INVALID_CHARS
1135 in call to MultiByteToWideChar. Fix a problem with singlebyte
1136 sequences. Fix a bug in '\0' handling. Reset state->__count on
1137 successful return from non-zero state.
1138 (__jis_mbtowc): Just call __ascii_mbtowc from here.
1139 (__eucjp_mbtowc): Convert to standalone implementation to fix up the
1140 difference between eucJP and CP 20932 affecting JIS-X-0212 characters.
1141 (__kr_mbtowc): Use codepage 949.
1142 (__set_charset_from_codepage): Handle codepage 20932 as eucJP.
1144 2009-04-05 Christopher Faylor <me+cygwin@cgf.cx>
1146 * Makefile.in: Use all compile options when calculating magic values.
1147 * shared_info.h (CURR_SHARED_MAGIC): Revert erroneous value.
1148 * child_info.h (CURR_CHILD_INFO_MAGIC): Update.
1150 * fhandler.h (acquire_output_mutex): Remove unneeded ';'.
1151 (release_output_mutex): Ditto.
1153 2009-04-05 Christopher Faylor <me+cygwin@cgf.cx>
1155 * net.cc: Undefine NOERROR and DELETE to avoid compiler warnings.
1156 * shared_info.h (CURR_SHARED_MAGIC): Update.
1157 * spawn.cc (spawn_guts): Avoid copying one line command line argument
1158 if it hasn't been filled out.
1160 2009-04-04 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
1161 Corinna Vinschen <corinna@vinschen.de>
1163 * include/asm/byteorder.h (__ntohl): Prototype before define to avoid
1164 a warning with -Wmissing-prototypes. Use _ELIDABLE_INLINE macro from
1168 2009-04-02 Corinna Vinschen <corinna@vinschen.de>
1170 * environ.cc (build_env): Fix length calculation of resulting
1171 wide char environment string.
1173 2009-04-02 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
1175 * include/netdb.h: #include <inttypes.h>, <netinet/in.h>,
1176 and <sys/socket.h> per SUSv3.
1178 2009-04-01 Corinna Vinschen <corinna@vinschen.de>
1180 * strfuncs.cc (sys_cp_mbstowcs): Check if ASCII SO is followed by at
1181 least two chars and the next byte is a valid UTF-8 start byte before
1182 trying to convert the followup bytes as UTF-8 sequence.
1184 2009-03-31 Corinna Vinschen <corinna@vinschen.de>
1186 * shm.cc (struct shm_attached_list): Convert access type to ULONG.
1187 (fixup_shms_after_fork): Fix comment. Use NtMapViewOfSection rather
1188 than MapViewOfFileEx to recreate shared memory regions. Add function
1189 name to api_fatal output.
1190 (shmat): Use NtMapViewOfSection to create shared memory region
1193 2009-03-31 Corinna Vinschen <corinna@vinschen.de>
1195 * ctype.cc: Remove implementation of ctype functions in favor of
1196 pointer-based newlib implementation.
1197 (_ctype_b): Declare.
1198 (__ctype_cp): Move to newlib. Declare.
1199 (__ctype_iso): Ditto.
1200 (__set_ctype): Implement changing __ctype_ptr__. Only copy character
1201 class data in applications built under older Cygwin.
1202 * cygwin.din (__ctype_ptr__): Export.
1203 * include/ctype.h: Remove in favor of newlib implementation.
1204 * include/cygwin/config.h (__EXPORT): Define alongside __IMPORT.
1205 * include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_OLD_CTYPE):
1206 Define check for old vs. new ctype implementation.
1207 Bump API minor number.
1209 2009-03-28 Christopher Faylor <me+cygwin@cgf.cx>
1211 * Makefile.in: Perform some minor cleanup. Revamp speclib handling.
1212 * speclib: Rewrite to create libraries with dlltool rather than
1213 attempting surgery on libcygwin.a.
1215 2009-03-27 Corinna Vinschen <corinna@vinschen.de>
1217 * net.cc (inet_ntop6): Convert to lowercase hex digits on the fly.
1219 2009-03-27 Corinna Vinschen <corinna@vinschen.de>
1221 * net.cc (cygwin_getaddrinfo): Check hints for non-NULL before
1222 checking its content.
1224 2009-03-27 Corinna Vinschen <corinna@vinschen.de>
1226 * fhandler.h (class fhandler_fifo): Rename read/write methods to
1228 * fhandler_fifo.cc: Ditto.
1230 2009-03-27 Corinna Vinschen <corinna@vinschen.de>
1232 * syscalls.cc (pathconf): Fix memory leak.
1234 2009-03-26 Corinna Vinschen <corinna@vinschen.de>
1236 * path.cc (symlink_worker): Write target filename as UTF-16 string
1237 with leading BOM marker.
1238 (symlink_info::check_shortcut): If check for leading BOM marker
1239 succeeds, read filename as UTF-16 string.
1240 (symlink_info::check_sysfile): Ditto.
1242 2009-03-26 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
1244 * include/asm/byteorder.h (__ntohl): Align definition to ISO C99.
1247 2009-03-26 Corinna Vinschen <corinna@vinschen.de>
1249 * strfuncs.cc (__set_charset_from_codepage): Revert to translating
1250 codepage 936 to "GBK".
1252 2009-03-25 Corinna Vinschen <corinna@vinschen.de>
1254 * strfuncs.cc (sys_wcstombs): Don't convert ASCII SO into two
1257 2009-03-25 Corinna Vinschen <corinna@vinschen.de>
1259 * environ.cc (environ_init): Break from locale loop after first hit.
1260 * fhandler_console.cc (fhandler_console::write_normal): Print a SO
1261 sequence using always valid Unicode chars.
1263 2009-03-25 Corinna Vinschen <corinna@vinschen.de>
1265 * strfuncs.cc (__kr_wctomb): Use codepage 51949 rather than 50949.
1266 (__kr_mbtowc): Ditto.
1267 (__set_charset_from_codepage): Ditto. Translate codepage 936 to
1268 "GB2312" and drop the charset name "GBK".
1270 2009-03-24 Corinna Vinschen <corinna@vinschen.de>
1272 * strfuncs.cc (__kr_wctomb): Use codepage 50949 rather than 949.
1273 (__kr_mbtowc): Ditto.
1274 (__set_charset_from_codepage): Translate codepages 949 and 50949 to
1275 "EUCKR" and drop the charset name "CP949".
1277 2009-03-24 Corinna Vinschen <corinna@vinschen.de>
1279 * strfuncs.cc (sys_cp_mbstowcs): Don't read beyond src + nms.
1281 2009-03-24 Corinna Vinschen <corinna@vinschen.de>
1283 * shared_info.h (CURR_SHARED_MAGIC): Update.
1285 2009-03-24 Corinna Vinschen <corinna@vinschen.de>
1287 * wchar.h: Replace UINT with unsigned int.
1289 2009-03-24 Corinna Vinschen <corinna@vinschen.de>
1291 * wchar.h: Remove erroneous "C" specifier from extern declaration.
1293 2009-03-24 Corinna Vinschen <corinna@vinschen.de>
1295 * ctype.cc (_CTYPE_DATA_0_127): Add _B class to TAB character.
1296 (__ctype_default): New character class array for default ASCII
1298 (__ctype_iso): New array of character class array for ISO charsets.
1299 (__ctype_cp): Ditto for singlebyte Windows codepages.
1300 (tolower): Implement as distinct function to support any singlebyte
1303 (__set_ctype): New function to copy singlebyte character classes
1304 corresponding to current charset to ctype_b array.
1305 Align copyright text to upstream.
1306 * dcrt0.cc (dll_crt0_1): Reset current locale to "C" per POSIX.
1307 * environ.cc (set_file_api_mode): Remove.
1308 (codepage_init): Remove.
1309 (parse_thing): Remove "codepage" setting.
1310 (environ_init): Set locale according to environment settings, or
1311 to current codepage, before converting environment to multibyte.
1312 * fhandler.h (fhandler_console::write_replacement_char): Drop argument.
1313 * fhandler_console.cc (dev_console::str_to_con): Call sys_cp_mbstowcs
1314 rather than MultiByteToWideChar.
1315 (fhandler_console::write_replacement_char): Always print a funny
1316 half filled square if a character isn't in the current charset.
1317 (fhandler_console::write_normal): Convert to using __mbtowc
1318 rather than next_char.
1319 * fork.cc (frok::child): Drop call to set_file_api_mode.
1320 * globals.cc (enum codepage_type) Remove.
1321 (current_codepage): Remove.
1322 * miscfuncs.cc (cygwin_wcslwr): Unused, dangerous. Remove.
1323 (cygwin_wcsupr): Ditto.
1324 (is_cp_multibyte): Remove.
1325 (next_char): Remove.
1326 * miscfuncs.h (is_cp_multibyte): Drop declaration.
1328 * strfuncs.cc (get_cp): Remove.
1329 (__db_wctomb): New function to implement _wctomb_r functionality for
1330 doublebyte charsets using WideCharToMultiByte.
1331 (__sjis_wctomb): New function to replace unusable newlib function.
1332 (__jis_wctomb): Ditto.
1333 (__eucjp_wctomb): Ditto.
1334 (__gbk_wctomb): New function.
1335 (__kr_wctomb): Ditto.
1336 (__big5_wctomb): Ditto.
1337 (__db_mbtowc): New function to implement _mbtowc_r functionality for
1338 doublebyte charsets using MultiByteToWideChar.
1339 (__sjis_mbtowc): New function to replace unusable newlib function.
1340 (__jis_mbtowc): Ditto.
1341 (__eucjp_mbtowc): Ditto.
1342 (__gbk_mbtowc): New function.
1343 (__kr_mbtowc): New function
1344 (__big5_mbtowc): New function
1345 (__set_charset_from_codepage): New function.
1346 (sys_wcstombs): Reimplement, basically using same wide char to multibyte
1347 conversion as newlib's application level functions. Plus extras.
1348 Add lengthy comment to explain. Change return type to size_t.
1349 (sys_wcstombs_alloc): Just use sys_wcstombs. Change return type to
1351 (sys_cp_mbstowcs): Replace sys_mbstowcs, take additional codepage
1352 argument. Explain why. Change return type to size_t.
1353 (sys_mbstowcs_alloc): Just use sys_mbstowcs. Change return type to
1355 * wchar.h: Declare internal functions implemented in strfuncs.cc.
1356 (wcscasecmp): Remove.
1357 (wcsncasecmp): Remove.
1360 * winsup.h (codepage_init): Remove declaration.
1362 (sys_wcstombs): Align declaration to new implementation.
1363 (sys_wcstombs_alloc): Ditto.
1364 (sys_cp_mbstowcs): Add declaration.
1365 (sys_mbstowcs): Define as inline function.
1366 (sys_mbstowcs_alloc): Align declaration to new implementation.
1367 (set_file_api_mode): Remove declaration.
1368 * include/ctype.h (isblank): Redefine to use _B character class.
1369 (toupper): Remove ASCII-only definition.
1372 2009-03-24 Corinna Vinschen <corinna@vinschen.de>
1374 * sec_auth.cc (str2buf2uni): Remove.
1375 * security.h (str2buf2uni): Remove declaration.
1377 2009-03-24 Yaakov Selkowitz <yselkowitz@cygwin.com>
1379 * include/mntent.h: Remove declarations of nonexistant addmntent
1380 and hasmntopt. Update and clarify the /etc/mtab comment.
1382 2009-03-23 Corinna Vinschen <corinna@vinschen.de>
1384 * smallprint.cc (__small_vsprintf): Handle NULL PWCHAR and
1385 PUNICODE_STRING arguments.
1386 (__small_vswprintf): Ditto.
1388 2009-03-23 Corinna Vinschen <corinna@vinschen.de>
1390 * include/asm/byteorder.h (__constant_ntohs): Remove declaration.
1391 (__constant_ntohl): Ditto.
1393 2009-03-23 Corinna Vinschen <corinna@vinschen.de>
1395 * cygwin.din: Export wordexp, wordfree.
1396 * posix.sgml: Move them to SUSv4 list.
1397 * include/cygwin/version.h: Bump API minor number.
1399 2009-03-22 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
1401 * include/sys/un.h: #include <string.h> for strlen.
1403 2009-03-19 Corinna Vinschen <corinna@vinschen.de>
1405 * dlfcn.cc (get_full_path_of_dll): Revert patch from 2008-07-16.
1407 2009-03-19 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
1409 * cygwin.din: Export log2, log2f as functions.
1410 * posix.sgml: Add them to SUSv4 list.
1411 * include/cygwin/version.h: Bump API minor number.
1413 2009-03-18 Corinna Vinschen <corinna@vinschen.de>
1415 * sec_auth.cc (lsaauth): Remove local definitions of struct
1416 _TOKEN_LINKED_TOKEN and TokenLinkedToken in favor of definitions
1418 (lsaprivkeyauth): As in lsaauth, fetch linked token if available and
1419 return that in favor of default token.
1421 2009-03-15 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
1423 * errno.cc (_sys_errlist): Add ESTRPIPE.
1425 2009-03-15 Corinna Vinschen <corinna@vinschen.de>
1427 * cygwin.din: Export wcsdup.
1428 * posix.sgml: Add wcsdup to SUSv4 list.
1429 * include/cygwin/version.h: Bump API minor number.
1431 2009-03-15 Corinna Vinschen <corinna@vinschen.de>
1433 * include/inttypes.h: Remove "l" size specifier from all 16 and 32 bit
1436 2009-03-14 Christopher Faylor <me+cygwin@cgf.cx>
1438 * path.cc (warn_msdos): Don't warn about MS-DOS filenames encountered
1439 during initialization.
1441 2009-03-14 Corinna Vinschen <corinna@vinschen.de>
1443 * gendef: Remove STABS directives.
1445 2009-03-13 Corinna Vinschen <corinna@vinschen.de>
1447 * mktemp.cc: Remove STABS specific link-time warning. Align copyright
1450 2009-03-13 Corinna Vinschen <corinna@vinschen.de>
1452 * flock.cc: Fix lockf copyright to latest version.
1454 2009-03-12 Corinna Vinschen <corinna@vinschen.de>
1456 * fhandler_disk_file.cc (path_conv::isgood_inode): Move to be defined
1458 (get_ino_by_handle): Take additional path_conv argument, accommodate
1459 throughout. Only use FileId if isgood_inode check is true.
1460 (fhandler_base::open_fs): Simplify setting ino due to above change.
1461 (readdir_get_ino): Make sure to return always a non-zero inode number.
1462 (fhandler_disk_file::readdir): Always open file in dir with
1463 FILE_OPEN_REPARSE_POINT so as not to open wrong file.
1464 Drop call to isgood_inode here.
1465 * path.cc (symlink_info::check): Call fs.update in case we're fetching
1466 file information from call to NtQueryDirectoryFile.
1468 2009-03-12 Corinna Vinschen <corinna@vinschen.de>
1470 * flock.cc (fhandler_disk_file::lock): Don't test file open mode in
1471 case of flock-type locks. Explain why.
1473 2009-03-12 Brian Ford <Brian.Ford@FlightSafety.com>
1475 * gethostby_helper: Fix typos in DEBUGGING case.
1477 2009-03-11 Corinna Vinschen <corinna@vinschen.de>
1479 * cygwin.din: Export wcscasecmp, wcsncasecmp.
1480 * posix.sgml: Move wcscasecmp, wcsncasecmp to SUSv4 list.
1481 * include/cygwin/version.h: Bump API minor number.
1483 2009-03-11 Corinna Vinschen <corinna@vinschen.de>
1485 * cygwin.din: Export wscanf, fwscanf, swscanf, vwscanf, vfwscanf,
1487 * posix.sgml: Move fwscanf, swscanf, vwscanf, vfwscanf, vswscanf
1489 * include/cygwin/version.h: Bump API minor number.
1491 2009-03-09 Corinna Vinschen <corinna@vinschen.de>
1493 * fhandler.h (fhandler_socket::wait_for_events): Take additional
1494 parameter "dontwait".
1495 * fhandler_socket.cc (fhandler_socket::wait_for_events): Act as if the
1496 socket is non-blocking if dontwait is true.
1497 (fhandler_socket::recv_internal): Use incoming MSG_DONTWAIT flag to
1498 set the wait_for_events dontwait parameter.
1499 (fhandler_socket::send_internal): Ditto. Optimize code slightly.
1500 * include/cygwin/socket.h (MSG_DONTWAIT): Define.
1501 * include/cygwin/version.h: Bump API minor number.
1503 2009-03-09 Corinna Vinschen <corinna@vinschen.de>
1505 * cygwin.din: Export wcsftime.
1506 * posix.sgml: Move wcsftime to SUSv4 list.
1507 * include/cygwin/version.h: Bump API minor number.
1509 2009-03-06 Pierre A. Humblet <pierre@phumblet.no-ip.org>
1511 * cygwin.din: Export gethostbyname2.
1512 * net.cc: define _CYGWIN_IN_H and include resolv.h.
1513 (realloc_ent): New function.
1514 (dup_ent): Call realloc_ent.
1515 (memcpy4to6): New function.
1516 (dn_length1): New function.
1517 (gethostby_helper): New function.
1518 (gethostbyname2): New function.
1519 * posix.sgml: Add gethostbyname2.
1520 * include/cygwin/version.h: Bump API minor number.
1521 * libc/minires.c (get_options): Look for "inet6" and apply bounds
1522 to "retry" and "retrans".
1523 (res_ninit): Set the default options at the beginning.
1524 (dn_expand): Fix "off by one".
1526 2009-03-06 Corinna Vinschen <corinna@vinschen.de>
1528 * cygwin.din: Export wprintf, fwprintf, swprintf, vwprintf, vfwprintf,
1530 * posix.sgml: Move fwprintf, swprintf, vwprintf, vfwprintf, vswprintf
1531 to SUSv4 list. Sort SUSv4 list.
1532 * include/cygwin/version.h: Bump API minor number.
1534 2009-03-04 Corinna Vinschen <corinna@vinschen.de>
1536 * dcrt0.cc (disable_dep): Disable. Explain why.
1537 (dll_crt0_0): Disable calling disable_dep. Explain why.
1539 2009-03-03 Corinna Vinschen <corinna@vinschen.de>
1541 * net.cc: Include asm/byteorder.h.
1542 (htonl): Move to end of file. Add comment to explain why. Align
1543 definition to POSIX. Use related macro from asm/byteorder.h.
1547 * include/asm/byteorder.h: Revert previous patch.
1549 2009-03-03 Corinna Vinschen <corinna@vinschen.de>
1551 * include/asm/byteorder.h: Disable optimization when building
1552 Cygwin network code.
1554 2009-02-26 Christopher Faylor <me+cygwin@cgf.cx>
1556 * dtable.cc (dtable::select_read): Add ability to override fh.
1557 * fhandler.h (fhandler_fifo::select_read): Declare new function.
1558 (fhandler_fifo::select_write): Ditto.
1559 (fhandler_fifo::select_except): Ditto.
1560 * select.cc (peek_pipe): Treat certain classes of pipe errors as "no
1562 (fhandler_fifo::select_read): Define new function.
1563 (fhandler_fifo::select_write): Ditto.
1564 (fhandler_fifo::select_except): Ditto.
1566 * shared_info.h (CURR_SHARED_MAGIC): Update.
1568 2009-02-23 Sjors Gielen <mailinglist@dazjorz.com>
1570 * Makefile.in: Add DESTDIR functionality.
1572 2009-02-23 Corinna Vinschen <corinna@vinschen.de>
1574 * sec_auth.cc (get_user_local_groups): Simplify LookupAccountName code.
1576 2009-02-20 Corinna Vinschen <corinna@vinschen.de>
1578 * autoload.cc (NetLocalGroupEnum): Remove.
1579 (NetLocalGroupGetMembers): Remove.
1580 (NetUserGetLocalGroups): Add.
1581 * sec_auth.cc (is_group_member): Remove function.
1582 (get_user_local_groups): Get user as string instead of as SID.
1583 Call NetUserGetLocalGroups instead of NetLocalGroupEnum. Drop call
1585 (get_server_groups): Call get_user_local_groups with user name instead
1588 2009-02-19 Corinna Vinschen <corinna@vinschen.de>
1590 * winver.rc: Fix Copyright date.
1592 2009-02-19 Corinna Vinschen <corinna@vinschen.de>
1594 * cygwin.din: Export mbsnrtowcs and wcsnrtombs.
1595 * posix.sgml: Move mbsnrtowcs and wcsnrtombs to SUSv4 section.
1596 * include/cygwin/version.h: Bump API minor number.
1598 2009-02-18 Corinna Vinschen <corinna@vinschen.de>
1600 * cygwin.din: Export open_wmemstream.
1601 * posix.sgml: Move open_wmemstream to SUSv4 section.
1602 * include/cygwin/version.h: Bump API minor number.
1604 2009-02-16 Corinna Vinschen <corinna@vinschen.de>
1606 * cygwin.din: Export reallocf.
1607 * malloc_wrapper.cc( reallocf): New function.
1608 * posix.sgml: Add reallocf to BSD section.
1609 * include/cygwin/version.h: Bump API minor number.
1610 * libc/fts.c: Remove erroneous reallocf definition.
1612 2009-02-16 Corinna Vinschen <corinna@vinschen.de>
1614 * cygwin.din: Export wcstoimax, wcstoumax.
1615 * posix.sgml: Move wcstoimax and wcstoumax to SUSv4 section.
1616 * include/inttypes.h: Declare wcstoimax and wcstoumax.
1617 * include/cygwin/version.h: Bump API minor number.
1619 2009-02-13 Corinna Vinschen <corinna@vinschen.de>
1621 * cygwin.din: Export wcsnlen.
1622 * posix.sgml: Move wcsnlen to SUSv4 section.
1623 * include/cygwin/version.h: Bump API minor number.
1625 2009-02-13 Corinna Vinschen <corinna@vinschen.de>
1627 * environ.cc (_getenv_r): New function.
1629 2009-02-13 Corinna Vinschen <corinna@vinschen.de>
1631 * posix.sgml: Move dirfd to SUSv4 section.
1633 2009-02-13 Corinna Vinschen <corinna@vinschen.de>
1635 * posix.sgml: Move interfaces deprecated in SUSv4 to deprecated
1636 interfaces section. Move interfaces added in SUSv4 to SUSv4
1637 section or, if unimplemented, add them to the unimplemented interfaces
1640 2009-02-13 Corinna Vinschen <corinna@vinschen.de>
1642 * posix.sgml: Merge SUSv3 and SUSv4 section into a single SUSv4 section.
1643 Move Solaris calls now in SUSv4 to SUSv4 section. Rename unimplemented
1644 section to refer to SUSv4. Add note about missing interfaces.
1645 Move wcstod and wcstof from unimplemented to SUSv4 section.
1647 2009-02-13 Corinna Vinschen <corinna@vinschen.de>
1649 * mount.cc (mount_info::from_fstab_line): Make cygdrive posix=0 by
1650 default as documented.
1652 2009-02-13 Corinna Vinschen <corinna@vinschen.de>
1654 * cygwin.din: Export wcstod and wcstof.
1655 * include/cygwin/version.h: Bump API minor number.
1657 2009-02-11 Corinna Vinschen <corinna@vinschen.de>
1659 * syscalls.cc (open): Handle O_DIRECTORY flag.
1660 * include/fcntl.h: Add SUSv4 flags O_DIRECTORY, O_EXEC and O_SEARCH.
1661 * include/cygwin/version.h: Bump API minor number.
1663 2009-02-09 Corinna Vinschen <corinna@vinschen.de>
1665 * fhandler_floppy.cc (fhandler_dev_floppy::open): Fix format. Add
1666 code to allow to read disk and CD/DVD devices in full length. Explain
1668 (fhandler_dev_floppy::raw_read): Add current position to debug output.
1670 * include/sys/sched.h: New stub file to override newlib file with
1671 clashing definitions.
1673 2009-02-05 Corinna Vinschen <corinna@vinschen.de>
1675 * cygwin.din: Export wcstok.
1676 * posix.sgml: Move wcstok from unimplemented to susv3.
1677 * include/cygwin/version.h: Bump API minor number.
1679 2009-02-04 Corinna Vinschen <corinna@vinschen.de>
1681 * fhandler_proc.cc (proc_tab): Add entry for mounts symlink.
1682 (format_proc_mounts): New function to implement mounts symlink.
1683 * fhandler_process.cc (process_tab): Add entry for mounts file.
1684 (format_process_mounts): New function to implement mounts file.
1686 2009-02-04 Corinna Vinschen <corinna@vinschen.de>
1688 * security.cc (alloc_sd): Disable generating default permission entries
1691 2009-01-29 Corinna Vinschen <corinna@vinschen.de>
1693 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix inode number
1694 evaluation for faked "." entry.
1696 * mount.cc (fs_info::update): Move setting of is_cdrom after checking
1697 for caseinsensitivity. Recognize UDF in is_cdrom case and set
1698 caseinsensitive flag according to UDF brokenness determined by OS.
1699 Add comment to explain why.
1700 * mount.h (class fs_info): Add is_udf status flag.
1701 * path.cc (symlink_info::check): Add workaround for UDF bug in
1702 terms of casesensitivity on certain OSes.
1703 * wincap.h (wincaps::has_broken_udf): New element.
1704 * wincap.cc: Implement above element throughout.
1706 2009-01-27 Christopher Faylor <me+cygwin@cgf.cx>
1708 * fhandler.cc (fhandler_base::wait_overlapped): Set bytes to -1 on
1709 EINTR or real error.
1710 (fhandler_base::write_overlapped): Assume that bytes_written will
1711 contain proper error value.
1712 * pipe.cc (fhandler_pipe::fhandler_pipe): Set uninterruptible_io since
1713 signals are handled by pipe functions now.
1715 2009-01-26 Corinna Vinschen <corinna@vinschen.de>
1717 * shared.cc (shared_name): New function for WCHAR names.
1718 (open_shared): Take name parameter as WCHAR. Accommodate throughout.
1719 * shared_info.h ((CURR_SHARED_MAGIC): Redefine.
1720 (shared_name): Add declaration for function taking a WCHAR name.
1721 (open_shared): Change declaration according to above change.
1722 * pinfo.cc (pinfo::init) : Accommodate above change.
1724 2009-01-26 Corinna Vinschen <corinna@vinschen.de>
1726 * grp.cc (getgrgid_r): Simplify code by using stpcpy.
1727 (getgrnam_r): Ditto.
1728 * passwd.cc (getpwuid_r32): Simplify code by using stpcpy.
1729 (getpwnam_r): Ditto.
1731 2009-01-26 Corinna Vinschen <corinna@vinschen.de>
1733 * uinfo.cc (pwdgrp::load): Open file with FILE_OPEN_FOR_BACKUP_INTENT
1736 2009-01-24 Corinna Vinschen <corinna@vinschen.de>
1738 * mount.cc (mount_info::from_fstab): Open fstab file with
1739 FILE_OPEN_FOR_BACKUP_INTENT flag.
1741 2009-01-23 Corinna Vinschen <corinna@vinschen.de>
1743 * smallprint.cc (__small_vsprintf): Use already available buffer tmp
1746 2009-01-22 Christopher Faylor <me+cygwin@cgf.cx>
1748 * select.cc (peek_serial): Add hack to allow proper operation with
1751 2009-01-21 Corinna Vinschen <corinna@vinschen.de>
1753 Remove USE_SERVER define. Accommodate throughout.
1754 * configure.in: Remove --enable-server option.
1755 * configure: Regenerate.
1756 * environ.cc: Remove CYGWIN=server setting.
1758 2009-01-20 Corinna Vinschen <corinna@vinschen.de>
1760 * fhandler_procnet.cc: Reorganize global procnet content data into a
1761 new struct virt_tab_t. Accommodate throughout.
1763 * fhandler.h: Fix copyright dates.
1764 * fhandler_process.cc: Ditto.
1765 * fhandler_registry.cc: Ditto.
1767 2009-01-20 Corinna Vinschen <corinna@vinschen.de>
1769 * devices.h (FH_PROCESSFD): New device type.
1770 * dtable.cc (build_fh_pc): Add case for FH_PROCESSFD.
1771 * fhandler.h (class fhandler_virtual): Drop bufalloc member.
1772 * fhandler_virtual.h: New header.
1773 * fhandler_proc.cc: Remove types proc_type_t and proc_tab_t in favor
1774 of types virt_type_t and virt_tab_t from fhandler_virtual.h.
1775 Change prototypes of format_XXX functions accordingly.
1776 (proc_tab): Drop size member info.
1777 (fhandler_proc::fill_filebuf): Don't allocate filebuf here. Allocate
1778 it in the format_XXX functions.
1779 * fhandler_process.cc: Reorganize global process content data into a
1780 new struct virt_tab_t. Accommodate throughout.
1781 (format_process_winexename): New function.
1782 (format_process_winpid): New function.
1783 (format_process_exename): New function.
1784 (format_process_root): New function.
1785 (format_process_cwd): New function.
1786 (format_process_cmdline): New function.
1787 (format_process_ppid): New function.
1788 (format_process_uid): New function.
1789 (format_process_pgid): New function.
1790 (format_process_sid): New function.
1791 (format_process_gid): New function.
1792 (format_process_ctty): New function.
1793 (format_process_fd): New function.
1794 * fhandler_procnet.cc (fhandler_procnet::fill_filebuf): Don't use
1796 * fhandler_registry.cc (fhandler_registry::fill_filebuf): Define
1798 * fhandler_virtual.cc (fhandler_virtual::fhandler_virtual): Drop
1799 initialization of bufalloc.
1800 (fhandler_virtual::dup): Drop copying bufalloc.
1802 2009-01-20 Corinna Vinschen <corinna@vinschen.de>
1804 * thread.h (struct pthread_rwlock::RWLOCK_READER): Add counter n.
1805 * thread.cc (pthread_rwlock::rdlock): If a thread already owns a
1806 read lock, just count the number of locks for it, per SUSv4.
1807 (pthread_rwlock::tryrdlock): Ditto.
1808 (pthread_rwlock::unlock): If a thread has more than one concurrent
1809 read locks, just count down.
1811 2009-01-20 Corinna Vinschen <corinna@vinschen.de>
1813 * autoload.cc (WSAIoctl): Reintroduce.
1814 (WSASendMsg): Define.
1815 * fhandler.h (class fhandler_socket): Change definition of recv_internal
1816 and send_internal to take WSAMSG pointer as parameter.
1817 * fhandler_socket.cc (WSAID_WSARECVMSG): Define.
1818 (LPFN_WSARECVMSG): Define.
1819 (WSASendMsg): Declare.
1820 (get_ext_funcptr): New function to fetch address of WSARecvMsg.
1821 (fhandler_socket::recv_internal): Take just a LPWSAMSG parameter.
1822 Change code accordingly. If control information is requested,
1823 fetch address of WSARecvMsg and use that instead of WSARecvFrom.
1824 (fhandler_socket::recvfrom): Change return type to ssize_t as
1825 declared in fhandler.h. Accommodate changes to recv_internal.
1826 (fhandler_socket::recvmsg): Ditto. Make sure that control information
1827 is only requested if system, address family, and socket type support it.
1828 (fhandler_socket::send_internal): Take just a LPWSAMSG parameter
1829 and the flags. Change code accordingly. If control information is
1830 provided, use WSASendMsg instead of WSASendTo.
1831 (fhandler_socket::sendto): Drop useless comment. Accommodate changes
1833 (fhandler_socket::sendmsg): Ditto. Make sure that control information
1834 is only provided if system, address family, and socket type support it.
1835 * wincap.h (wincaps::has_recvmsg): New element.
1836 (wincaps::has_sendmsg): New element
1837 * wincap.cc: Implement above elements throughout.
1838 * include/cygwin/socket.h (CMSG_ALIGN): Phrase in terms of alignment
1839 of type struct cmsghdr.
1841 2009-01-17 Corinna Vinschen <corinna@vinschen.de>
1843 * mmap.cc (mmap64): Fix condition checking if anonymous mapping beyond
1846 2009-01-17 Corinna Vinschen <corinna@vinschen.de>
1848 * fhandler_proc.cc: Reorganize global proc content data into a new
1849 struct proc_tab_t. Accommodate throughout.
1850 (format_proc_version): New function.
1851 (format_proc_loadavg): New function.
1852 (format_proc_self): New function.
1854 * resource.cc (getrlimit): Return correct rlim_max value for
1857 2009-01-16 Corinna Vinschen <corinna@vinschen.de>
1859 * Fix copyright dates.
1861 2009-01-13 Corinna Vinschen <corinna@vinschen.de>
1863 * libc/getopt.c (parse_long_options): Use fix from NetBSD's getopt
1864 to avoid false ambiguities.
1866 2009-01-12 Corinna Vinschen <corinna@vinschen.de>
1868 * syscalls.cc (enum bin_status): New type.
1869 (try_to_bin): Return bin_status. Rename win32_path to pc. Rename h
1870 to fh. Rename fh to tmp_fh. Add code to set delete dispostion and
1871 more code to replace file moved to bin by another, temporary file.
1872 Add comments to explain why.
1873 (unlink_nt): Replace move_to_bin with bin_stat. Only set bin_stat
1874 to move_to_bin for non-remote files. As a last resort, call try_to_bin
1875 if setting delete-on-close failed. Only re-set R/O DOS attribute
1876 and only close handle if it's still valid.
1878 2009-01-11 Corinna Vinschen <corinna@vinschen.de>
1880 * errno.cc (errmap): Set errno to ENOENT instead of ENOSHARE throughout.
1881 * path.cc (path_conv::check): Set to and check for ENOENT instead of
1884 * path.cc (symlink_info::check): Fix Samba 3.2.x comment.
1886 2009-01-09 Corinna Vinschen <corinna@vinschen.de>
1888 * mount.cc (mount_info::from_fstab_line): Always convert drive
1889 letter in native path to uppercase.
1890 * path.cc (normalize_win32_path): Ditto.
1891 (path_prefix_p): Revert previous patch.
1893 * path.cc (symlink_info::check): Check for STATUS_INVALID_PARAMETER
1894 return code to circumvent weird behaviour of Samba 3.2.x shares.
1896 2009-01-09 Christopher Faylor <me+cygwin@cgf.cx>
1898 * include/sys/cygwin.h (CW_SETERRNO): Define.
1899 * external.cc (CW_SETERRNO): Implement.
1900 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 192 to
1901 reflect the above change.
1903 * path.cc (path_prefix_p): Treat X: as equivalent to x:.
1905 * mkglobals_h: Remove unneeded #define.
1907 * spawn.cc (spawn_guts): Avoid overly wordy initialization to zero.
1909 2009-01-08 Corinna Vinschen <corinna@vinschen.de>
1911 * libc/fts.c (fts_build): Use DT_DIR case on Cygwin.
1912 (fts_ufslinks): Fix using wrong structure member in Cygwin-specific
1915 2009-01-07 Corinna Vinschen <corinna@vinschen.de>
1917 * ntdll.h: Reorder NT status flags. Fix a case difference. Add
1918 STATUS_CANNOT_DELETE flag.
1919 * syscalls.cc (unlink_nt): Change initial NtOpenFile to request
1920 FILE_SHARE_DELETE sharing mode. Change comment accordingly.
1921 If setting delete disposition failed with STATUS_CANNOT_DELETE, try
1922 to delete using delete-on-close. Explain why.
1923 Rearrange setting R/O DOS attribute after trying to delete. Simplify
1926 2009-01-07 Corinna Vinschen <corinna@vinschen.de>
1928 * fhandler_disk_file.cc (fhandler_disk_file::link): Only add .exe if
1929 original file has .exe as well.
1930 * path.cc (path_conv::is_binary): Only recognize Windows 32 and 64 bit
1933 2009-01-02 Christopher Faylor <me+cygwin@cgf.cx>
1935 Remove unneeded header files from source files throughout.
1936 Update copyrights where appropriate.
1938 * globals.cc: New file for generic global variables.
1939 * mkglobals_h: New script to generate globals.h.
1940 * mkstatic: New script used to build a (currently non-working) static
1942 * Makefile.in: Add unused rule to build a non-working libcygwin_s.a.
1943 (DLL_OFILES): Add globals.o. Make all objects rely on globals.h.
1944 (globals.h): New target. Generate globals.h.
1945 * cygtls.h: Honor new CYGTLS_HANDLE define to control when the HANDLE
1946 operator is allowed in _cygtls.
1947 * dcrt0.cc: Move most globals to globals.cc.
1949 * environ.cc (strip_title_path): Remove now-unneeded extern.
1950 * fhandler_serial.cc (fhandler_serial::open): Ditto.
1952 (commune_process): Ditto.
1956 * exceptions.cc: Define CYGTLS_HANDLE before including winsup.h.
1957 * path.cc (stat_suffixes): Move here.
1958 * security.h: Add forward class path_conv declaration.
1959 * smallprint.cc (__small_vsprintf): Make a true c++ function.
1960 (__small_sprintf): Ditto.
1961 (small_printf): Ditto.
1962 (console_printf): Ditto.
1963 (__small_vswprintf): Ditto.
1964 (__small_swprintf): Ditto.
1965 * spawn.cc (spawn_guts): Remove _stdcall decoration in favor of
1967 (hExeced): Move to globals.cc
1968 * strfuncs.cc (current_codepage): Ditto.
1969 (active_codepage): Ditto.
1970 * sync.cc (lock_process::locker): Move here from dcrt0.cc.
1971 * syscalls.cc (stat_suffixes): Move to path.cc.
1972 * tty.cc (tty::create_master): Uncapitalize fatal warning for
1974 * winsup.h: Include globals.h to declare most of the grab bag list of
1975 globals which were previously defined here.
1977 * mount.h: Move USER_* defines back to shared_info.h.
1979 * speclib: Force temporary directory cleanup.
1981 2009-01-02 Christopher Faylor <me+cygwin@cgf.cx>
1983 * speclib: Rewrite completely in perl. Avoid multiple nm calls.