1 2009-07-23 Corinna Vinschen <corinna@vinschen.de>
3 * mount.cc (fs_info::update): Revert to open filesystem with access set
4 to READ_CONTROL. If that fails, try additionally with FILE_READ_DATA.
6 2009-07-22 Eric Blake <ebb9@byu.net>
8 * exceptions.cc (handle_exceptions): Set si_addr according to
11 2009-07-22 Corinna Vinschen <corinna@vinschen.de>
13 * mount.cc (fs_info::update): Open filesystem with access set to 0.
16 2009-07-22 Corinna Vinschen <corinna@vinschen.de>
18 * mount.cc: Revert accidental checkin.
20 2009-07-22 Corinna Vinschen <corinna@vinschen.de>
22 * path.cc (symlink_info::check): Handle STATUS_NOT_SUPPORTED from
23 NtCreateFile just like STATUS_EAS_NOT_SUPPORTED.
25 2009-07-22 Corinna Vinschen <corinna@vinschen.de>
27 * mount.cc (fillout_mntent): Fix typo (noexec -> notexec).
29 2009-07-22 Corinna Vinschen <corinna@vinschen.de>
31 * path.cc (symlink_info::check): Fix typo in comment.
33 2009-07-22 Corinna Vinschen <corinna@vinschen.de>
35 * fhandler.h (enum del_lock_called_from): New enumeration.
36 (fhandler_base::del_my_locks): Declare taking a del_lock_called_from
38 * fhandler.cc (fhandler_base::close): Call del_my_locks with "on_close".
39 (fhandler_base::fixup_after_fork): Call del_my_locks with "after_fork".
40 (fhandler_base::fixup_after_exec): Call del_my_locks with "after_exec".
41 * flock.cc (fhandler_base::del_my_locks): Take del_lock_called_from
42 as argument. Call node->del_my_locks with NULL handle in after_exec
45 2009-07-21 Eric Blake <ebb9@byu.net>
47 * dtable.cc (dup2): Correct return value for no-op.
49 2009-07-21 Corinna Vinschen <corinna@vinschen.de>
50 Eric Blake <ebb9@byu.net>
52 * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Add special case
53 for MVFS. Explain why.
54 (fhandler_disk_file::utimens): Drop local variables lastaccess and
55 lastwrite. Copy timestamps right into FILE_BASIC_INFORMATION structure
56 to avoid copying them twice.
58 2009-07-20 Corinna Vinschen <corinna@vinschen.de>
60 * wincap.h (wincaps::has_always_all_codepages): New element.
61 * wincap.cc: Implement above element throughout.
62 * wchar.h (__sjis_mbtowc): Declare.
63 (__eucjp_mbtowc): Ditto.
64 (__gbk_mbtowc): Ditto.
66 (__big5_mbtowc): Ditto.
67 * syscalls.cc (internal_setlocale): Convert to char * function.
68 Return parameter by default. Return NULL if request to use a
69 charset can't be satisfied due to missing codepage support in the
70 underlying OS. Fix comment.
71 (setlocale): Store original locale. Restore to original locale if
72 internal_setlocale returns NULL.
74 2009-07-20 Corinna Vinschen <corinna@vinschen.de>
76 * fork.cc (fork): Create local tmp_pathbuf. Explain why.
78 2009-07-18 Christopher Faylor <me+cygwin@cgf.cx>
80 * exceptions.cc (sig_handle_tty_stop): Set stopsig to SIGCONT when
82 (stopped_or_terminated): Honor WCONTINUED.
83 * wait.cc (wait4): Ditto.
84 * include/cygwin/wait.h (WCONTINUED): Define.
85 (__W_CONTINUED): Ditto.
86 (WIFCONTINUED): Ditto.
88 2009-07-18 Dave Korn <dave.korn.cygwin@gmail.com>
90 * libstdcxx_wrapper.cc (operator delete): Remove stray space in
93 2009-07-17 Christopher Faylor <me+cygwin@cgf.cx>
95 * cygtls.cc (_cygtls::init_exception_handler): Test for e, not e->prev
96 or we could still end up adding our handler twice. Add comment
97 explaining what we're doing.
98 * dll_init.cc (dll_dllcrt0_1): Clarify comment.
100 2009-07-17 Christopher Faylor <me+cygwin@cgf.cx>
102 * cygtls.cc (_cygtls::init_exception_handler): Avoid adding our
103 exception handler twice.
105 2009-07-17 Corinna Vinschen <corinna@vinschen.de>
107 * syscalls.cc (unlink_nt): Just return when a sharing violation
108 occurs on remote filesystems.
110 2009-07-17 Corinna Vinschen <corinna@vinschen.de>
112 * globals.cc: Improve comment on R/O UNICODE_STRINGs.
113 * mount.h (class fs_info): Add is_mvfs bit.
114 * mount.cc (fs_info::update): Recognize MVFS remote filesystem.
115 (fillout_mntent): Reorder filesystem checks for speed. Add
116 mvfs, unixfs, and sunwnfs filesystem types.
117 * path.h (class path_conv): Add fs_is_mvfs method.
118 * path.cc (symlink_worker): On MVFS, always create symlinks as
119 Windows shortcuts. Explain why.
121 2009-07-16 Corinna Vinschen <corinna@vinschen.de>
123 * syscalls.cc (unlink_nt): First remove the R/O DOS attribute with
124 FILE_WRITE_ATTRIBUTES access only, then re-open the file for DELETE.
127 2009-07-16 Corinna Vinschen <corinna@vinschen.de>
129 * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Remove file
130 attribute check already done in NtSetAttributesFile.
132 2009-07-15 Corinna Vinschen <corinna@vinschen.de>
134 * globals.cc: Reorder constant UNICODE_STRINGs for clarity.
135 * mount.h (fs_info::sttaus): Move filesystem type flags into
136 substructure. Add union to allow simple test for having set any
137 one filesystem type flag. Replace has_buggy_open flag with is_sunwnfs
138 flag. Replace has_buggy_fileid_dirinfo with is_unixfs flag.
139 (fs_info::got_fs): New private method.
140 (fs_info::has_buggy_open): New explicit implementation.
141 (fs_info::has_buggy_fileid_dirinfo): Ditto.
142 * mount.cc (fs_info::update): Optimize filesystem checks for speed.
143 * winsup.h (IMPLEMENT_STATUS_FLAG): Change write accessor to return
146 2009-07-15 Corinna Vinschen <corinna@vinschen.de>
148 * fhandler_netdrive.cc (GET_RESOURCE_INFO): Remove.
149 (thread_netdrive): Drop GET_RESOURCE_INFO case.
150 (fhandler_netdrive::exists): Use GET_RESOURCE_OPENENUM info class
151 to check for existance.
153 2009-07-15 Corinna Vinschen <corinna@vinschen.de>
155 * fhandler_netdrive.cc (fhandler_netdrive::readdir): Remove useless
158 2009-07-15 Corinna Vinschen <corinna@vinschen.de>
160 * path.cc (cwdstuff::set): Only fix up UNC path in win32 so as not
161 to overwrite incoming path.
163 2009-07-14 Corinna Vinschen <corinna@vinschen.de>
165 Throughout avoid having to initialize constant UNICODE_STRINGs.
166 * globals.cc: Define constant UNICODE_STRINGs and store in .rdata
168 * fhandler_disk_file.cc: Throughout, use readonly UNICODE_STRINGs
169 rather then initializing local UNICODE_STRING variable where
171 * fhandler_mem.cc (fhandler_dev_mem::open): Ditto.
172 * flock.cc (inode_t::inode_t): Ditto.
174 * syscalls.cc: Ditto.
175 * mount.cc (fs_info::update): Ditto.
178 * ntdll.h (RtlEqualUnicodePathPrefix): Redefine to take prefix as
180 (RtlEqualUnicodePathSuffix): Redefine to take suffix as UNICODE_STRING.
181 * fhandler_disk_file.cc: Accommodate throughout.
182 * mount.cc (fs_info::update): Ditto.
183 * path.cc (cwdstuff::set): Ditto.
184 * syscalls.cc: Ditto.
186 2009-07-14 Corinna Vinschen <corinna@vinschen.de>
188 * globals.cc (active_codepage): Remove.
190 2009-07-12 Christopher Faylor <me+cygwin@cgf.cx>
192 * how-spawn-works.txt: Add "out of date" note.
193 * how-vfork-works.txt: Ditto.
195 2009-07-12 Christopher Faylor <me+cygwin@cgf.cx>
197 * Makefile.in: Don't do anything special with any RCS directories.
199 * ntdll.h (PROCESSINFOCLASS): Remove unneeded trailing comma.
201 * pinfo.cc (_pinfo::dup_proc_pipe): Remove unneeded assignment.
203 * sigproc.cc (sig_send): Don't send signal to myself if this is an exec
206 2009-07-12 Corinna Vinschen <corinna@vinschen.de>
208 * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Don't use
209 FileAllInformation info class since it needs a big buffer. Add a
212 2009-07-07 Dave Korn <dave.korn.cygwin@gmail.com>
214 * winbase.h (ilockexch): Avoid making 'ret' volatile.
215 (ilockcmpexch): Likewise.
217 2009-07-07 Dave Korn <dave.korn.cygwin@gmail.com>
219 * Makefile.in (DLL_OFILES): Add libstdcxx_wrapper.o
220 (libstdcxx_wrapper_CFLAGS): Add flags for new module.
221 (_cygwin_crt0_common_STDINCFLAGS): Define per-file override.
222 (libstdcxx_wrapper_STDINCFLAGS, cxx_STDINCFLAGS): Likewise.
223 * cxx.cc: Include "cygwin-cxx.h".
224 (operator new): Tweak prototype for full standards compliance.
225 (operator new[]): Likewise.
226 (operator new (nothrow)): New fallback function.
227 (operator new[] (nothrow), operator delete (nothrow),
228 operator delete[] (nothrow)): Likewise.
229 (default_cygwin_cxx_malloc): New struct of pointers to the above,
230 for final last-resort fallback default.
231 * cygwin-cxx.h: New file.
232 (struct per_process_cxx_malloc): Define.
233 (default_cygwin_cxx_malloc): Declare extern.
234 * cygwin.din (__wrap__ZdaPv): Export new wrapper.
235 (__wrap__ZdaPvRKSt9nothrow_t, __wrap__ZdlPv,
236 __wrap__ZdlPvRKSt9nothrow_t, __wrap__Znaj,
237 __wrap__ZnajRKSt9nothrow_t, __wrap__Znwj,
238 __wrap__ZnwjRKSt9nothrow_t): Likewise.
239 * globals.cc (__cygwin_user_data): Init newly-repurposed 'forkee'
240 field (now 'cxx_malloc') to point to default_cygwin_cxx_malloc.
241 * libstdcxx_wrapper.cc: New file.
242 (__wrap__ZdaPv, __wrap__ZdaPvRKSt9nothrow_t, __wrap__ZdlPv,
243 __wrap__ZdlPvRKSt9nothrow_t, __wrap__Znaj,
244 __wrap__ZnajRKSt9nothrow_t, __wrap__Znwj,
245 __wrap__ZnwjRKSt9nothrow_t): Define wrapper functions for libstdc++
246 malloc operators and their overrides.
247 * winsup.h (default_cygwin_cxx_malloc): Declare extern.
248 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
249 * include/sys/cygwin.h (struct per_process_cxx_malloc): Forward
251 (struct per_process::forkee): Rename and repurpose from this ...
252 (struct per_process::cxx_malloc): ... to this.
253 * lib/_cygwin_crt0_common.cc: Include cygwin-cxx.h.
254 (WEAK): Define shorthand helper macro.
255 (__cygwin_cxx_malloc): Define and populate with weak references
256 to whatever libstdc++ malloc operators will be visible at final
257 link time for Cygwin apps and dlls.
258 (_cygwin_crt0_common): Always look up cygwin DLL's internal
259 per_process data, and don't test for (impossible) failure. Inherit
260 any members of __cygwin_cxx_malloc that we don't have overrides
261 for from the DLL's default and store the resulting overall set of
262 overrides back into the DLL's global per_process data.
264 2009-07-07 Corinna Vinschen <corinna@vinschen.de>
266 * cygtls.cc (_cygtls::remove): Fix typo.
268 2009-07-06 Christopher Faylor <me+cygwin@cgf.cx>
270 * Makefile.in (clean): Clean generated files in srcdir.
271 * tlsoffsets.h: Regenerate.
273 2009-07-06 Christopher Faylor <me+cygwin@cgf.cx>
275 * cygtls.cc (_cygtls::remove): Avoid closing a NULL handle.
277 2009-07-06 Corinna Vinschen <corinna@vinschen.de>
279 * fhandler_socket.cc (fhandler_socket::recv_internal): Convert wsabuf
280 and wsacnt to references. Fix handling of WSAEMSGSIZE.
282 2009-07-06 Corinna Vinschen <corinna@vinschen.de>
284 * cygtls.h (struct _local_storage): Add thread storage pointers for
285 memory used by socket select functions. Combine them into a single
287 * cygtls.cc: Accommodate above change throughout.
288 (_cygtls::init_thread): Drop initalizing of sockevt to
289 INVALID_HANDLE_VALUE.
290 (_cygtls::fixup_after_fork): Reset sockevt to NULL.
291 (_cygtls::remove): Don't use sockevt value to bail out prematurely.
292 Set sockevt to NULL. Free malloced select members.
293 * select.h (struct select_socket_info): Drop max_w4 member.
294 * select.cc (thread_socket): Use INFINITE timeout value if number of
295 objects to wait for is <= MAXIMUM_WAIT_OBJECTS. Use num_w4 member
296 of select_socket_info struct rather than dropped max_w4.
297 (init_tls_select_info): New inline function to initialize TLS select
299 (start_thread_socket): Just call init_tls_select_info to initialize TLS
300 select members and use them later on.
301 (socket_cleanup): Don't free select_socket_info pointer members since
302 they are thread local now.
304 2009-07-06 Christopher Faylor <me+cygwin@cgf.cx>
306 * dtable.cc (handle_to_fn): Detect failing NtQueryObject.
308 2009-07-06 Corinna Vinschen <corinna@vinschen.de>
310 * autoload.cc: Delete stray CR.
312 2009-07-05 Christopher Faylor <me+cygwin@cgf.cx>
314 * fhandler_console.cc: Change workstation -> windows station
317 2009-07-04 Christopher Faylor <me+cygwin@cgf.cx>
319 * autoload.cc (SetParent): Add new import.
320 * fhandler.h (fhandler_console::create_invisible_console): Declare new
322 (create_invisible_console_workaround): Ditto.
323 * fhandler_console.cc (fhandler_console::create_invisible_console):
325 (create_invisible_console_workaround): Ditto. Add too much code to
326 deal with broken Windows 7. Use a helper app to start an invisible
328 (fhandler_console::need_invisible): Reorganize to use helper functions
329 to create invisible console.
331 * spawn.cc (spawn_guts): Avoid zeroing already zeroed fields in si.
333 2009-07-04 Dave Korn <dave.korn.cygwin@gmail.com>
335 * autoload.cc (AttachConsole): Correct size of args.
337 2009-07-03 Christopher Faylor <me+cygwin@cgf.cx>
339 * dcrt0.cc (jit_debug): New global.
340 (initial_env): Set jit_debug when we are automatically starting a gdb
342 * dtable.cc (dtable::get_debugger_info): Don't tty tricks when we are
343 being debugged by our own captive gdb, as determined by jit_debug ==
345 (dtable::init_std_file_from_handle): Detect errors when initializing a
346 tty early rather than at random points later.
347 * fhandler.h (fhandler_*::init): Return int to indicate
349 * fhandler.cc (fhandler_base::init): Reflect change in return value.
350 * pipe.cc (fhandler_pipe::init): Ditto.
351 (fhandler_pipe::create_selectable): Don't say we're retrying when we
353 * fhandler_console.cc (fhandler_console::init): Ditto. Return
355 * fhandler_serial.cc (fhandler_serial::init): Ditto.
356 * fhandler_tty.cc (fhandler_tty_slave::init): Ditto.
357 (fhandler_tty_slave::open): Make debugging output more detailed.
358 * tty.cc (tty_list::terminate): Don't close I/O handles before all
359 slaves have checked in.
360 (tty::slave_alive): Make a non-inlined function. Check if tty pipe
361 handles can be created as an additional exists check.
362 * tty.h (tty::slave_alive): Just define here.
364 2009-07-03 Corinna Vinschen <corinna@vinschen.de>
366 * posix.sgml: Add fpurge and mkstemps to BSD list.
368 2009-07-03 Eric Blake <ebb9@byu.net>
370 * cygwin.din (fpurge, mkstemps): New exports.
371 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
372 * mktemp.cc (_gettemp): Add parameter.
373 (mkstemps): New function.
374 (mkstemp, mkdtemp, mktemp): Adjust clients.
376 2009-07-03 Corinna Vinschen <corinna@vinschen.de>
378 * autoload.cc: Fix typo in comment.
379 (ShowWindowAsync): Define.
380 (AttachConsole): Define.
381 * fhandler_console.cc (fhandler_console::need_invisible): Add band-aid
382 for Windows 7 AllocConsole bug.
384 2009-07-01 Corinna Vinschen <corinna@vinschen.de>
386 * net.cc (get_xp_ifs): Fix typo in comment.
388 2009-07-01 Corinna Vinschen <corinna@vinschen.de>
390 * fhandler.h (class fhandler_socket): Add class members and methods
391 to store and retrieve the SO_RCVBUF and SO_SNDBUF sizes.
392 * fhandler_socket.cc (fhandler_socket::dup): Duplicate new members.
393 (fhandler_socket::send_internal): Check for SO_SNDBUF size and
394 restrict send to 1 byte less per KB 823764. Leave loop immediately
395 if WSASendMsg has been used.
396 * net.cc (fdsock): Change comment again. Set buffer sizes to 65536.
397 Store values in fhandler_socket.
398 (cygwin_setsockopt): Store SO_RCVBUF and SO_SNDBUF sizes in
400 (cygwin_sendto): Drop call to sig_dispatch_pending.
401 (cygwin_recvfrom): Ditto.
402 (cygwin_recvmsg): Ditto.
403 (cygwin_sendmsg): Ditto.
405 2009-06-30 Christopher Faylor <me+cygwin@cgf.cx>
407 * select.h: New file split from fhandler.h.
408 (select_record::select_record): Define do-nothing constructor for "new"
409 to avoid gratuitous zeroing.
410 (select_info): New base class.
411 (select_pipe_info): New class with methods for dealing with pipes.
412 (select_socket_info): New class with methods for dealing with sockets.
413 (select_serial_info): Dummy class for serial.
414 (select_mailslot_info): Dummy class for mailslots.
415 (select_stuff): Define device_specific_* as actual classes rather than
417 * dtable.h (dtable::select_read): Accommodate return value change to
418 'bool' and argument change to "select_stuff".
419 (dtable::select_write): Ditto.
420 (dtable::select_except): Ditto.
421 * dtable.cc (dtable::select_read): Accommodate return value change to
422 'bool' and argument change to "select_stuff".
423 (dtable::select_write): Ditto.
424 (dtable::select_except): Ditto.
425 * fhandler.h: Excise select-related classes.
426 (fhandler_*::select_read): Change argument to select_stuff.
427 (fhandler_*::select_write): Ditto.
428 (fhandler_*::select_except): Ditto.
429 * select.cc (UNIX_FD_ZERO): Use memset rather than bzero.
430 (select_stuff::test_and_set): Change return type to bool. Allocate
431 select_record on entry and let fhandler_*::select_* operate on the
432 start.next field of select_stuff.
434 (select_pipe_info::select_pipe_info): New constructor. Allocates event
435 for controlling pipe waits.
436 (select_pipe_info::~select_pipe_info): New destructor. Destroy event.
438 (select_pipe_info::add_watch_handle): New function.
439 (thread_pipe): Wait for the hEvent part of any overlapped pipes before
441 (start_thread_pipe): Don't allocate device_specific_pipe stuff here.
442 Assume that it has been allocated earlier.
443 (pipe_cleanup): Rely on select_pipe_info destructor to clean up pipe
445 (fhandler_*::select_*): Derive select_record from new select_stuff
447 (fhandler_pipe::select_*): Ditto. Allocate pipe-specific field if not
450 (thread_serial): serialinf -> select_serial_info.
451 (fhandler_base::ready_for_read): Rewrite to accommodate change in
452 argument to fhandler_*::select_*.
454 (thread_socket): socketinf -> select_socket_info.
455 (mailslotinf): Delete.
456 (thread_mailslot): mailslotinf -> select_mailslot_info.
458 2009-06-30 Christopher Faylor <me+cygwin@cgf.cx>
460 * fhandler.cc (fhandler_base::has_ongoing_io): Accept an argument
461 indicating whether the overlapped event should be tested.
462 (fhandler_base::read_overlapped): Pass is_overlapped state to
464 (fhandler_base::write_overlapped): Ditto.
465 * fhandler.h (fhandler_base::has_ongoing_io): Accommodate argument
467 * select.cc (peek_pipe): Ditto.
469 2009-06-30 Corinna Vinschen <corinna@vinschen.de>
471 * net.cc (fdsock): Set default socket buffer sizes to 65520. Change
473 * fhandler_socket.cc (fhandler_socket::send_internal): Set maximum
474 send size to 65520 as well.
476 2009-06-29 Christopher Faylor <me+cygwin@cgf.cx>
478 * select.cc (peek_pipe): Turn on (temporarily?) the experimental code
479 which tries to determine when a pipe is writable.
481 2009-06-28 Christopher Faylor <me+cygwin@cgf.cx>
483 * select.cc (peek_pipe): Use has_ongoing_io() to determine if the pipe
484 is ready for writing rather than performing brute-force checks.
486 2009-06-28 Christopher Faylor <me+cygwin@cgf.cx>
488 * fhandler.h (fhandler_base::has_ongoing_io): Declare new function.
489 * fhandler.cc (fhandler_base::has_ongoing_io): Define new function.
490 (fhandler_base::read_overlapped): Use has_ongoing_io to avoid writing
491 when handle has not completed last I/O.
492 (fhandler_base::write_overlapped): Ditto.
493 * select.cc (peek_pipe): Be more careful about accessing hEvent field
494 from get_overlapped().
496 2009-06-28 Christopher Faylor <me+cygwin@cgf.cx>
498 * gendef (cleanup): Rename from 'nocr'. Remove comments and trailing
500 * cygwin.din: Add long-needed comment describing what
501 dll_crt0__FP11per_process demangles to.
503 * select.cc (peek_pipe): Flag handle as not ready for write if event is
505 * fhandler.cc (fhandler_base::setup_overlapped): Establish event as
507 (fhandler_base::wait_overlapped): Don't reset event after we've
508 successfully waited. MSDN documentation says that this happens
509 automatically after a WriteFileEx/ReadFileEx.
511 2009-06-26 Corinna Vinschen <corinna@vinschen.de>
513 * wincap.h (wincaps::has_broken_alloc_console): New element.
514 * wincap.cc: Implement above element throughout.
516 2009-06-25 Corinna Vinschen <corinna@vinschen.de>
518 * sec_auth.cc (lsaauth): Close unused handle.
519 (lsaprivkeyauth): Ditto.
521 2009-06-23 Corinna Vinschen <corinna@vinschen.de>
523 * sec_auth.cc (get_server_groups): Ignore errors from
524 get_user_local_groups.
526 2009-06-22 Corinna Vinschen <corinna@vinschen.de>
528 * spawn.cc (spawn_guts): Don't run additional check for Win32
529 incompatible CWD if newargv.fixup bailed out already.
530 (av::fixup): Check shell scripts for executability.
532 2009-06-18 Corinna Vinschen <corinna@vinschen.de>
534 * path.cc (chdir): Check error conditions first.
536 2009-06-17 Corinna Vinschen <corinna@vinschen.de>
538 * fhandler_socket.cc (fhandler_socket::recv_internal): Mark WSARecvMsg
541 2009-06-16 Christopher Faylor <me+cygwin@cgf.cx>
543 * fhandler.cc (fhandler_base::read_overlapped): Use a better variable
546 2009-06-16 Christopher Faylor <me+cygwin@cgf.cx>
548 * fhandler.cc (fhandler_base::read_overlapped): Preserve len when
549 looping due to received signal.
551 2009-06-15 Corinna Vinschen <corinna@vinschen.de>
553 * net.cc (get_flags): New static function to generate interface flags
555 (get_ipv4fromreg_ipcnt): New static function to fetch number of
556 configured IPv4 addresses for a given NIC from registry.
557 (get_ipv4fromreg): New static function to fetch configured IPv4
558 addresses for a given NIC from registry.
559 (get_friendlyname): New static function to generate friendly name.
560 (get_hwaddr): New static function to copy hardware address.
561 (get_xp_ifs): Restructure slightly. Add code to generate IPv4 entries
562 entries for interfaces which are disconnected.
564 2009-06-14 Christopher Faylor <me+cygwin@cgf.cx>
566 * errno.cc (errmap): Add mapping for ERROR_IO_INCOMPLETE.
567 * fhandler.cc (fhandler_base::fcntl): Fix comment.
568 (fhandler_base::wait_overlapped): Accept an optional len parameter.
569 Use the len parameter when WriteFile fails with ERROR_IO_PENDING. Make
570 debug output less alarming.
571 (fhandler_base::write_overlapped): Pass len to wait_overlapped.
572 * fhandler.h (fhandler_base::wait_overlapped): Add an optional argument
573 denoting the number of characters intended to be written.
575 * fhandler_tty.cc (fhandler_pty_master::close): Don't close archetype
576 handles when cygwin is still initializing since the handles aren't
577 actually opened at that point.
579 2009-06-14 Corinna Vinschen <corinna@vinschen.de>
581 * localtime.cc (time2): Take another stab at fixing a compiler warning.
583 2009-06-14 Christopher Faylor <me+cygwin@cgf.cx>
585 * localtime.cc (time2): Take a stab at fixing a compiler warning.
587 2009-06-14 Christopher Faylor <me+cygwin@cgf.cx>
589 * fhandler.cc (fhandler_base::wait_overlapped): Honor nonblocking flag
590 for writes. Don't reset event handle when we see a ERROR_IO_PENDING.
592 * sigproc.cc (stopped_or_terminated): Use bool constants for
595 * wait.cc (wait4): Remove nonsensical comment.
597 2009-06-13 Corinna Vinschen <corinna@vinschen.de>
599 * fhandler_socket.cc (fhandler_socket::recv_internal): Set namelen
600 pointer to NULL if name pointer is NULL. Explain why.
602 2009-06-12 Corinna Vinschen <corinna@vinschen.de>
604 * localtime.cc (time2): Change "spring gap" to "spring forward gap"
607 2009-06-12 Corinna Vinschen <corinna@vinschen.de>
609 * localtime.cc (time2): Add workaround for spring forward gap problem.
610 Add explaining comment.
612 2009-06-12 Corinna Vinschen <corinna@vinschen.de>
614 * Makefile.in (SUBLIBS): Add librt.a.
615 (librt.a): New rule to build librt.a.
617 2009-06-12 Corinna Vinschen <corinna@vinschen.de>
619 * posix_ipc.cc (check_path): Fix typo in comment. Align naming
620 convention rules to Linux. Handle backslash same as slash. Add
623 2009-06-09 Corinna Vinschen <corinna@vinschen.de>
625 * autoload.cc (GetSystemTimes): Remove.
626 * fhandler_proc.cc (format_proc_uptime): Use global system_info rather
627 than retrieving a local copy of the SYSTEM_INFO. Drop call to
628 GetSystemTimes and retrieve SystemPerformanceInformation on all systems
629 again with buffer size big enough for 64 bit systems.
630 (format_proc_stat): Use global system_info rather than retrieving a
631 local copy of the SYSTEM_INFO. Retrieve SystemPerformanceInformation
632 with buffer size big enough for 64 bit systems.
634 2009-06-08 Corinna Vinschen <corinna@vinschen.de>
636 * autoload.cc (GetSystemTimes): Define.
637 * fhandler_proc.cc (format_proc_uptime): Use GetSystemInfo to retrieve
638 processor count. Use GetSystemTimes when available to retrieve system
639 idle time. Improve debug output.
640 (format_proc_stat): Use GetSystemInfo to retrieve processor
641 count. Improve debug output. Ignore if SystemPerformanceInformation
642 returns error. Explain why.
644 2009-06-08 Corinna Vinschen <corinna@vinschen.de>
646 * fork.cc (frok::parent): Remove ancient code erroneously flushing
649 2009-06-08 Corinna Vinschen <corinna@vinschen.de>
651 * cygerrno.h (save_errno::~save_errno): Set errno directly to avoid
652 flooding debug output.
654 2009-06-08 Corinna Vinschen <corinna@vinschen.de>
656 * path.cc (symlink_info::check): Return with error set to ENOENT if
657 STATUS_NO_MEDIA_IN_DEVICE is returned.
659 2009-06-07 Christopher Faylor <me+cygwin@cgf.cx>
661 * cygheap.h (mini_cygheap): New struct.
662 (init_cygheap): Inherit locale field via mini_cygheap.
663 * cygheap.cc (cygheap_at_start): Define new variable.
664 (cygheap): Initialize as cygheap_at_start so that locale information is
666 (cygheap_init): Initialize cygheap iff it is set to cygheap_at_start.
667 * shared_info.h (memory_init): Accommodate argument change.
668 * memory.cc (memory_init): Accept an argument indicating whether
669 cygheap should be initialized or not.
670 * dcrt0.cc (child_info_fork::handle_fork): Pass false to memory_init().
671 (child_info_spawn::handle_spawn): Ditto.
672 (dll_crt0_0): Pass true to memory_init when not forking or execing.
674 * cygheap.h (cygheap_types::HEAP_2_DLL): New enum.
675 * dll_init.h (dll): Remove unused namelen field.
676 (dll_list::load_after_fork): Accommodate change in arguments.
677 * dll_init.cc (dll_list::alloc): Allocate dll information in the cygwin
679 (dll_list::detach): Free dll information from the cygwin heap.
680 (dll_list::load_after_fork): Use dll information in the cygwin heap
681 directly rather than querying parent.
682 * fork.cc (frok::first_dll): Delete.
683 (frok::child): Don't report on first_dll. Don't pass it to
685 (frok::parent): Don't set first_dll.
688 2009-06-06 Corinna Vinschen <corinna@vinschen.de>
690 * dll_init.cc (dll_list::alloc): Allocate memory using a section
691 object. Explain why. Drop call to GetSystemInfo, rather call
692 getpagesize to get allocation granularity. Only align to allocation
693 granularity under WOW64. Use roundup2 to align.
694 (dll_list::detach): Call NtUnmapViewOfSection instead of VirtualFree.
696 2009-06-06 Corinna Vinschen <corinna@vinschen.de>
698 * mmap.cc: Use NtUnmapViewOfSection instead of UnmapViewOfFile
699 throughout for symmetry.
700 (fhandler_dev_mem::munmap): Use correct process handle in call to
701 NtUnmapViewOfSection.
703 2009-06-06 Corinna Vinschen <corinna@vinschen.de>
705 * dll_init.h (struct dll): Set size of name element to ANYSIZE_ARRAY.
706 * dll_init.cc: Fix formatting.
707 (dll_list::alloc): Only allocate as much memory for struct dll as
708 necessary for given DLL name.
709 (dll_list::load_after_fork): Only read a single page of parent memory.
710 Only read more if namelen indicates that it's necessary.
712 2009-06-05 Dave Korn <dave.korn.cygwin@gmail.com>
714 * winbase.h (ilockexch): Fix asm constraints.
715 (ilockcmpexch): Likewise.
717 2009-06-05 Corinna Vinschen <corinna@vinschen.de>
719 * heap.cc (heap_init): Fix typo in comment.
721 2009-06-04 Corinna Vinschen <corinna@vinschen.de>
723 * fhandler_clipboard.cc: Avoid calling system_printf.
724 (set_clipboard): Add basic error checking. Set errno here. Per MSDN,
725 don't call GlobalFree on data block transferred to clipboard.
726 (fhandler_dev_clipboard::write): Drop setting errno after call to
728 (fhandler_dev_clipboard::read): Add basic error checking. Simplify code.
730 2009-06-04 Corinna Vinschen <corinna@vinschen.de>
732 * fhandler_console.cc (set_console_title): Convert title string to
733 wchar_t and call SetConsoleTitleW.
735 2009-06-04 Corinna Vinschen <corinna@vinschen.de>
737 * fhandler_console.cc (fhandler_console::read): Allow Ctrl-Space to
740 2009-06-04 Dave Korn <dave.korn.cygwin@gmail.com>
742 * thread.cc (__cygwin_lock_lock): Delete racy optimisation.
743 (__cygwin_lock_unlock): Likewise.
745 2009-06-03 IWAMURO Motnori <deenheart@gmail.com>
747 * strfuncs.cc (sys_cp_mbstowcs): Fix condition.
749 2009-06-03 Corinna Vinschen <corinna@vinschen.de>
751 * strfuncs.cc (sys_cp_wcstombs): Implement reverse functionality
752 of the change to sys_cp_mbstowcs from 2009-05-30.
753 (sys_cp_mbstowcs): Slightly reformat. Fix comment to accommodate
754 change to sys_cp_wcstombs. Don't write to *ptr if dst is NULL.
756 2009-06-03 Corinna Vinschen <corinna@vinschen.de>
758 * fhandler_console.cc (fhandler_console::read): Convert Alt-Backspace
759 to \033\177 or to \377 dependent on the setting of dev_state->metabit.
761 2009-06-02 Corinna Vinschen <corinna@vinschen.de>
763 * path.cc (path_conv::check): Don't call set_exec for files on "noacl"
766 2009-05-30 Christopher Faylor <me+cygwin@cgf.cx>
768 * strfuncs.cc (sys_cp_mbstowcs): Treat src as unsigned char *. Convert
769 failure of f_mbtowc into a single malformed utf-16 value.
771 2009-05-30 Christopher Faylor <me+cygwin@cgf.cx>
773 * cygwin/include/sys/termios.h: Make default erase character "^?".
775 2009-05-30 Christopher Faylor <me+cygwin@cgf.cx>
777 * fhandler_console.cc (fhandler_console::read): Convert backspace key
780 2009-05-29 Christopher Faylor <me+cygwin@cgf.cx>
782 * path.cc (cwdstuff::set): Rewrite previous change to properly test the
785 2009-05-28 Christopher Faylor <me+cygwin@cgf.cx>
787 * path.cc (cwdstuff::set): Avoid removing a nonexistent trailing slash.
789 2009-05-20 Eric Blake <ebb9@byu.net>
791 * net.cc (gethostby_helper): Use correct signedness.
793 2009-05-18 Christopher Faylor <me+cygwin@cgf.cx>
795 * mount.cc (mount_info::add_item): Avoid using any-old '/' as
798 2009-05-18 Christopher Faylor <me+cygwin@cgf.cx>
800 * mount.cc (mount_info::got_usr_bin): Mark as NO_COPY.
801 (mount_info::got_usr_lib): Ditto.
802 (mount_info::root_idx): Ditto.
804 2009-05-14 Corinna Vinschen <corinna@vinschen.de>
806 * wchar.h (sys_mbstowcs): Add missing __stdcall attribute.
808 2009-05-14 Corinna Vinschen <corinna@vinschen.de>
810 * cygheap.cc (cygheap_init): Set Cygwin default locale values.
811 * cygheap.h (struct cygheap_locale): New structure.
812 (struct user_heap_info): Add cygheap_locale member locale.
813 * dcrt0.cc (dll_crt0_1): Revert to calling _setlocale_r so that only
814 the applications locale is reverted to "C".
815 * environ.cc (environ_init): Remove unused got_lc variable.
816 * fhandler.h (class dev_console): Remove now unsed locale variables.
817 * fhandler_console.cc (fhandler_console::get_tty_stuff): Remove
818 setting dev_console's locale members.
819 (dev_console::con_to_str): Use internal locale settings. Default to
820 __ascii_wctomb if charset is "ASCII".
821 (fhandler_console::write_normal): Ditto.
822 * strfuncs.cc (__ascii_wctomb): Drop declaration.
823 (__db_wctomb): Use fixed value 2 instead of not
824 necessarily matching MB_CUR_MAX.
825 (__eucjp_wctomb): Use 3 instead of MB_CUR_MAX.
826 (sys_cp_wcstombs): Remove special case for "C" locale.
827 (sys_wcstombs): Implement here. Use internal locale data stored on
829 (sys_cp_mbstowcs): Remove special case for "C" locale.
830 (sys_mbstowcs): Implement here. Use internal locale data stored on
832 * syscalls.cc (internal_setlocale): New function to set cygheap locale
833 data and to reset CWD posix path.
834 (setlocale): Just call internal_setlocale from here if necessary.
835 * wchar.h (__ascii_wctomb): Declare.
836 (sys_wcstombs): Don't define inline, just declare.
837 (sys_mbstowcs): Ditto.
839 2009-05-14 Christopher Faylor <me+cygwin@cgf.cx>
841 * mount.cc (mount_info::init): Remove MOUNT_CYGWIN_EXEC setting when
842 auto-mounting /usr/bin.
844 2009-05-14 Corinna Vinschen <corinna@vinschen.de>
846 * mount.cc (oopts): Add a no-op "auto" option.
847 (mount_info::create_root_entry): Set root dir to MOUNT_IMMUTABLE rather
848 than to MOUNT_OVERRIDE.
850 2009-05-13 Corinna Vinschen <corinna@vinschen.de>
851 Christopher Faylor <me+cygwin@cgf.cx>
853 * mount.cc (mount_info::got_usr_bin): Define.
854 (mount_info::got_usr_lib): Ditto.
855 (mount_info::root_idx): Ditto.
856 (mount_info::create_root_entry): Create root entry as immutable and
858 (mount_info::init): Remove "Huh? No /etc/fstab..." warning.
859 Unconditionally call from_fstab for user and system tables. Fill in
860 /usr/bin and /usr/lib if they have not been specified in /etc/fstab.
861 (oopts): Alphabetize. Add "override" option to allow overriding
862 immutable mount points.
863 (mount_info::add_item): Accommodate new MOUNT_IMMUTABLE flag intended
865 (mount_info::add_item): Detect "/usr/bin", "/usr/lib", and "/" and set
866 appropriate global state.
867 (fillout_mntent): Add ,auto to mount points added by Cygwin DLL.
868 (mount): Remove masking of MOUNT_SYSTEM. Allow user to shoot
869 themselves. Add comment.
870 * mount.h (mount_info::got_usr_bin): Declare.
871 (mount_info::got_usr_lib): Ditto.
872 (mount_info::root_idx): Ditto.
873 * include/sys/mount.h: Reformat enum.
874 Add MOUNT_{OVERRIDE,IMMUTABLE,AUTOMATIC}.
876 2009-05-13 Corinna Vinschen <corinna@vinschen.de>
878 * cygheap.h (cwdstuff): Convert to class. Make posix and dir private.
879 (cwdstuff::get_posix): New method.
880 (cwdstuff::reset_posix): New method.
881 * dcrt0.cc (dll_crt0_1): Call setlocale rather than _setlocale_r.
882 * environ.cc (environ_init): Ditto. Prefer "C" locale over current
883 codepage default locale.
884 * path.cc (chdir): Use cwdstuff::get_posix method instead of accessing
885 cwdstuff::posix directly.
886 (cwdstuff::set): Defer creating posix path to first usage.
887 (cwdstuff::get_posix): Create posix path if it's empty, and return it.
888 (cwdstuff::get): Create posix path if it's empty.
889 * strfuncs.cc (sys_cp_wcstombs): Use UTF-8 conversion in the "C"
891 (sys_cp_mbstowcs): Ditto.
892 * syscalls.cc (gen_full_path_at): Fetch CWD posix path locked.
893 (setlocale): Implement here. Reset CWD posix path.
895 2009-05-09 Christopher Faylor <me+cygwin@cgf.cx>
897 * cygwin/version.h (CYGWIN_VERSION_CYGWIN_CONV): New define.
899 2009-05-09 Corinna Vinschen <corinna@vinschen.de>
901 * dtable.cc (dtable::init_std_file_from_handle): Add workaround for
902 Windows 7 64 bit issue. Add lengthy comment to explain what happens.
903 * wincap.h (wincaps::has_console_handle_problem): New element.
904 * wincap.cc: Implement above element throughout.
905 (wincap_7): New wincaps structure for NT 6.1 kernels.
906 (wincapc::init): Set has_console_handle_problem to false for 32 bit
909 2009-05-09 Corinna Vinschen <corinna@vinschen.de>
911 * sec_auth.cc (str2uni_cat): Move from here...
912 * path.cc (str2uni_cat): ...to here. Simplify. Make static inline.
913 (get_nt_native_path): Use RtlAppendUnicodeToString rather than
914 str2uni_cat for constant strings for speed.
915 * security.h (str2uni_cat): Drop declaration.
917 2009-05-08 Corinna Vinschen <corinna@vinschen.de>
918 IWAMURO Motonori <deenheart@gmail.com>
920 * strfuncs.cc (sys_cp_wcstombs): save and restore previous errno value.
921 (sys_cp_mbstowcs): Ditto.
923 2009-05-08 IWAMURO Motonori <deenheart@gmail.com>
925 * strfuncs.cc (sys_cp_wcstombs): Set errno to 0 before converting
926 wide char to SO/UTF-8 sequence.
928 2009-05-08 Corinna Vinschen <corinna@vinschen.de>
930 * include/sys/select.h: Guard definitions with __USE_W32_SOCKETS as
931 the accompanying fd_set definitions in newlib's sys/types.h.
933 2009-05-06 Christopher Faylor <me+cygwin@cgf.cx>
935 * fhandler_console.cc (fhandler_console::ioctl): Properly treat
936 TIOCLINUX argument as a char.
937 * fhandler_tty.cc (fhandler_tty_slave::ioctl): Use coercion to properly
940 2009-05-06 Corinna Vinschen <corinna@vinschen.de>
942 * libc/minires.c (scanline): Fix type in calls to ctype functions
943 to stay in unsigned char range for char values >= 0x80.
944 * regex/regcomp.c: Ditto, throughout.
945 * regex/regex2.h (ISWORD): Ditto.
947 2009-05-06 Corinna Vinschen <corinna@vinschen.de>
949 * cygheap.cc (cygheap_init): Set umask to a sane default.
950 * uinfo.cc (cygheap_user::ontherange): Don't use HOMEDRIVE/HOMEPATH
951 to set HOME. Default to /home/USERNAME.
953 2009-05-03 Corinna Vinschen <corinna@vinschen.de>
955 * security.cc (set_file_sd): Drop using FILE_OPEN_FOR_RECOVERY flag in
957 * exceptions.cc (open_stackdumpfile): Ditto in call to NtCreateFile.
958 * fhandler.cc (fhandler_base::open): Ditto. Simplify setting
961 * mount.cc (fs_info::update): Recognize offline storage.
962 (fillout_mntent): Report UDF and offline storage.
963 * mount.h (class fs_info): Add is_csc_cache status flag.
965 2009-05-04 Christopher Faylor <me+cygwin@cgf.cx>
967 * fhandler_console.cc (fhandler_console::write_console): Eliminate
968 unneeded debugging output.
969 (fhandler_console::write_normal): Eliminate unneeded __seterrno.
971 2009-05-04 Christopher Faylor <me+cygwin@cgf.cx>
973 * libc/minires.c (scanline): Accommodate ctype changes which disallow
974 use of an unadorned char argument to is* macros.
975 * regex/regcomp.c: Ditto, throughout.
976 * regex/regex2.h (ISWORD): Ditto.
978 2009-05-03 Christopher Faylor <me+cygwin@cgf.cx>
980 * fhandler.h (fhandler_console::MAX_WRITE_CHARS): Declare.
981 (fhandler_console::write_replacement_char): Declare as inline.
982 (fhandler_console::write_console): Declare new function.
983 * fhandler_console.cc (fhandler_console::MAX_WRITE_CHARS): Define.
984 (handler_console::write_console): Define.
985 (fhandler_console::write_replacement_char): Define as inline.
986 (fhandler_console::write_normal): Use write_console when writing
987 buffers of unknown length.
989 2009-04-26 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
991 * include/cygwin/socket.h: Define SOL_IPV6.
993 2009-04-21 Corinna Vinschen <corinna@vinschen.de>
995 * ctype.cc (__set_ctype): Copy exact part of the current active
996 character class array.
998 2009-04-20 Corinna Vinschen <corinna@vinschen.de>
1000 * flock.cc (lf_setlock): Handle border case which results in WFMO loop
1001 exiting with ret == WAIT_TIMEOUT gracefully. Add a system_printf to
1002 uncover other potential problems with WFMO loop.
1004 2009-04-18 Christopher Faylor <me+cygwin@cgf.cx>
1006 * mkimport: Specify .text for stub explicitly.
1007 * speclib: Add a dummy '.idata$7' section referring to the dll
1008 associated with the real import library.
1010 2009-04-18 Corinna Vinschen <corinna@vinschen.de>
1012 * dcrt0.cc (globify): Only call mbtowc for non-ascii chars.
1014 2009-04-17 Corinna Vinschen <corinna@vinschen.de>
1016 * dcrt0.cc (globify): Make multibyte-aware.
1018 2009-04-17 Corinna Vinschen <corinna@vinschen.de>
1020 * flock.cc (class inode_t): Add i_wait member and matching methods
1021 wait(), unwait(), and waiting().
1022 (inode_t::inode_t): Initialize i_wait to 0.
1023 (fhandler_disk_file::lock): Only remove node if no other thread is
1024 waiting for a blocking lock.
1025 (lf_setlock): Manipulate node->i_wait to signal that a thread is
1026 waiting for a blocking lock in this node.
1027 (lf_findoverlap): Reinstantiate SELF test as in original code.
1029 2009-04-16 Corinna Vinschen <corinna@vinschen.de>
1031 * dlfcn.cc (get_full_path_of_dll): Just return a bool value. Drop
1032 local path_conv in favor of getting it as parameter. Add local string
1033 buffer instead of getting it as parameter.
1034 (dlopen): Accommodate get_full_path_of_dll change. Fetch WCHAR Windows
1035 path from path_conv variable and call LoadLibraryW.
1037 2009-04-16 Corinna Vinschen <corinna@vinschen.de>
1039 * ntdll.h (STATUS_LOCK_NOT_GRANTED): Define.
1040 * syscalls.cc (unlink_nt): Handle STATUS_LOCK_NOT_GRANTED same as
1041 STATUS_SHARING_VIOLATION. Add lengthy comment to explain why.
1043 2009-04-15 Corinna Vinschen <corinna@vinschen.de>
1045 * path.cc (path_conv::get_wide_win32_path): Allow relative paths.
1046 (cygwin_conv_path): In case of CCP_POSIX_TO_WIN_W, convert relative
1047 paths to absolute paths if the relative pathname length exceeds
1050 2009-04-15 Corinna Vinschen <corinna@vinschen.de>
1052 * libc/bsdlib.cc: Align copyright with upstream.
1053 * libc/fnmatch.c: Ditto.
1054 * libc/fts.c: Ditto.
1055 * libc/inet_addr.c: Ditto.
1056 * libc/inet_network.c: Ditto.
1057 * libc/rcmd.cc: Ditto.
1058 * libc/rexec.cc: Ditto.
1060 2009-04-14 Christopher Faylor <me+cygwin@cgf.cx>
1062 * speclib: Really revert to using tempdir.
1064 2009-04-14 Christopher Faylor <me+cygwin@cgf.cx>
1066 * speclib: Revert to using tempdir.
1068 2009-04-14 Corinna Vinschen <corinna@vinschen.de>
1070 * localtime.cc (tzload): Implement setting __tzrule's offset member
1071 using newlib's __gettzinfo () interface also when tzload returns
1074 2009-04-13 Dave Korn <dave.korn.cygwin@gmail.com>
1076 * include/stdint.h (intptr_t): Remove long from type.
1077 (uintptr_t): Likewise.
1078 (INTPTR_MIN): Remove 'L' suffix.
1079 (INTPTR_MAX, UINTPTR_MAX): Likewise.
1081 2009-04-12 Christopher Faylor <me+cygwin@cgf.cx>
1083 * speclib: Initial stab at cleaning up temp files. More work needed.
1086 2009-04-12 Christopher Faylor <me+cygwin@cgf.cx>
1088 * Makefile.in (clean): Clean globals.h.
1089 (LIBCOS): Depend on globals.h.
1091 2009-04-11 Christopher Faylor <me+cygwin@cgf.cx>
1093 * mkimport: New script to perform all operations necessary to create
1097 * Makefile.in (toolopts): New variable which holds options relating to
1099 (speclib): Use toolopts. Add symbols to avoid copying to special
1101 (OBSOLETE_FUNCTIONS): Delete.
1102 (NEW_FUNCTIONS): Change to represent an argument to new mkimport
1104 (libcygwin.a): Use only new mkimport script to create libcygwin.a.
1105 Only rely on ${LIBCOS}.
1106 (*/lib*.a): Simplify speclib dependencies.
1107 (speclib): Accept toolchain options. Convert every argument to
1108 absolute path. Simplify parsing of nm output. Accommodate new
1111 2009-04-11 Dave Korn <dave.korn.cygwin@googlemail.com>
1113 * include/stdint.h (INTPTR_MIN, INTPTR_MAX): Add 'L' suffix.
1114 (WINT_MAX): Add 'U' suffix.
1116 2009-04-10 Christopher Faylor <me+cygwin@cgf.cx>
1118 * speclib: Use a more robust method to derive full file path.
1120 2009-04-09 Christopher Faylor <me+cygwin@cgf.cx>
1122 * speclib: Semi-revert to previous version but don't try to generate
1123 well-formed import library. Instead, just extract appropriate symbols
1124 and let later libcygwin.a on link line fill in the rest of the import
1126 * gendef: Hopefully no-op modification to allow easier post-processing
1129 2009-04-09 Corinna Vinschen <corinna@vinschen.de>
1131 * syscalls.cc (try_to_bin): Use tmp_pathbuf buffer to allocate infobuf
1132 rather than using the stack.
1134 2009-04-09 Corinna Vinschen <corinna@vinschen.de>
1136 * syscalls.cc (try_to_bin): Fix alignment of infobuf.
1138 2009-04-09 Corinna Vinschen <corinna@vinschen.de>
1140 * fhandler_disk_file.cc (fhandler_disk_file::fchown): Catch an
1141 error when changing the user account on a standalone Samba server.
1143 * sec_acl.cc (setacl): Accommodate additional parameter to set_file_sd.
1144 * sec_helper.cc (SECURITY_SAMBA_UNIX_AUTHORITY): Define.
1145 (well_known_samba_unix_user_fake_sid): Define.
1146 * security.cc (set_file_sd): Take additional parameter if ownership
1147 should be changed. Restrict requested permissions accordingly.
1148 (set_file_attribute): Accommodate additional parameter to set_file_sd.
1149 * security.h (well_known_samba_unix_user_fake_sid): Declare.
1150 (set_file_sd): Align declaration to above change.
1152 2009-04-07 Corinna Vinschen <corinna@vinschen.de>
1154 * include/stdint.h (int_least32_t): Define as int.
1155 (uint_least32_t): Ditto, unsigned.
1156 (int_fast16_t): Define as int.
1157 (int_fast32_t): Ditto.
1158 (uint_fast16_t): Ditto, unsigned.
1159 (uint_fast32_t): Ditto.
1160 (UINT32_MAX): Remove `L' long marker.
1161 (UINT_LEAST32_MAX): Ditto.
1162 (UINT_FAST16_MAX): Ditto.
1163 (UINT_FAST32_MAX): Ditto.
1167 2009-04-07 Corinna Vinschen <corinna@vinschen.de>
1169 * strfuncs.cc: Change WCHAR to wchar_t in multibyte<->widechar
1170 conversion functions throughout.
1171 * wchar.h: Ditto in declarations. Guard them __INSIDE_CYGWIN__.
1173 2009-04-07 Corinna Vinschen <corinna@vinschen.de>
1175 * fhandler.h (class dev_console): Add members con_mbtowc, con_wctomb,
1177 (dev_console::str_to_con): Take mbtowc function pointer and charset
1178 as additional parameters.
1179 * fhandler_console.cc (fhandler_console::get_tty_stuff): Initialize
1180 aforementioned new members. Explain why.
1181 (dev_console::con_to_str): Remove useless comment. Call new
1182 sys_cp_wcstombs function rather than sys_wcstombs.
1183 (dev_console::str_to_con): Take mbtowc function pointer and charset
1184 as additional parameters. Call sys_cp_mbstowcs accordingly.
1185 (fhandler_console::write_normal): Only initialize f_mbtowc and charset
1186 once. Accommodate changed str_to_con.
1187 * strfuncs.cc (sys_cp_wcstombs): Renamed from sys_wcstombs. Take
1188 wctomb function pointer and charset as parameters. Use throughout.
1189 (sys_cp_mbstowcs): Take wctomb function pointer and charset as
1190 parameters instead of codepage. Remove matching local variables and
1191 their initialization.
1192 * wchar.h (ENCODING_LEN): Define as in newlib.
1193 (__mbtowc): Use mbtowc_p typedef for declaration.
1194 (wctomb_f): New type.
1195 (wctomb_p): New type.
1196 (__wctomb): Declare.
1197 (__utf8_wctomb): Use wctomb_f typedef for declaration.
1198 (sys_cp_wcstombs): Move declaration from winsup.h here.
1199 (sys_wcstombs): Ditto.
1200 (sys_wcstombs_alloc): Ditto.
1201 (sys_cp_mbstowcs): Ditto.
1202 (sys_mbstowcs): Ditto.
1203 (sys_mbstowcs_alloc): Ditto.
1204 * winsup.h: Move declaration of sys_FOO functions to wchar.h. Include
1207 2009-04-06 Earl Chew <earl_chew@agilent.com>
1209 * libc/rexec.cc (ruserpass): Use fstat64 instead of fstat.
1211 2009-04-06 Corinna Vinschen <corinna@vinschen.de>
1213 * strfuncs.cc: Add comment to explain why we can't support JIS
1215 (__db_wctomb): Alwaus use WC_NO_BEST_FIT_CHARS.
1216 (__jis_wctomb): Just call __ascii_wctomb from here.
1217 (__eucjp_wctomb): Convert to standalone implementation to fix up the
1218 difference between eucJP and CP 20932 affecting JIS-X-0212 characters.
1220 (__kr_wctomb): Use codepage 949.
1221 (__db_mbtowc): Reorder code slightly. Always use MB_ERR_INVALID_CHARS
1222 in call to MultiByteToWideChar. Fix a problem with singlebyte
1223 sequences. Fix a bug in '\0' handling. Reset state->__count on
1224 successful return from non-zero state.
1225 (__jis_mbtowc): Just call __ascii_mbtowc from here.
1226 (__eucjp_mbtowc): Convert to standalone implementation to fix up the
1227 difference between eucJP and CP 20932 affecting JIS-X-0212 characters.
1228 (__kr_mbtowc): Use codepage 949.
1229 (__set_charset_from_codepage): Handle codepage 20932 as eucJP.
1231 2009-04-05 Christopher Faylor <me+cygwin@cgf.cx>
1233 * Makefile.in: Use all compile options when calculating magic values.
1234 * shared_info.h (CURR_SHARED_MAGIC): Revert erroneous value.
1235 * child_info.h (CURR_CHILD_INFO_MAGIC): Update.
1237 * fhandler.h (acquire_output_mutex): Remove unneeded ';'.
1238 (release_output_mutex): Ditto.
1240 2009-04-05 Christopher Faylor <me+cygwin@cgf.cx>
1242 * net.cc: Undefine NOERROR and DELETE to avoid compiler warnings.
1243 * shared_info.h (CURR_SHARED_MAGIC): Update.
1244 * spawn.cc (spawn_guts): Avoid copying one line command line argument
1245 if it hasn't been filled out.
1247 2009-04-04 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
1248 Corinna Vinschen <corinna@vinschen.de>
1250 * include/asm/byteorder.h (__ntohl): Prototype before define to avoid
1251 a warning with -Wmissing-prototypes. Use _ELIDABLE_INLINE macro from
1255 2009-04-02 Corinna Vinschen <corinna@vinschen.de>
1257 * environ.cc (build_env): Fix length calculation of resulting
1258 wide char environment string.
1260 2009-04-02 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
1262 * include/netdb.h: #include <inttypes.h>, <netinet/in.h>,
1263 and <sys/socket.h> per SUSv3.
1265 2009-04-01 Corinna Vinschen <corinna@vinschen.de>
1267 * strfuncs.cc (sys_cp_mbstowcs): Check if ASCII SO is followed by at
1268 least two chars and the next byte is a valid UTF-8 start byte before
1269 trying to convert the followup bytes as UTF-8 sequence.
1271 2009-03-31 Corinna Vinschen <corinna@vinschen.de>
1273 * shm.cc (struct shm_attached_list): Convert access type to ULONG.
1274 (fixup_shms_after_fork): Fix comment. Use NtMapViewOfSection rather
1275 than MapViewOfFileEx to recreate shared memory regions. Add function
1276 name to api_fatal output.
1277 (shmat): Use NtMapViewOfSection to create shared memory region
1280 2009-03-31 Corinna Vinschen <corinna@vinschen.de>
1282 * ctype.cc: Remove implementation of ctype functions in favor of
1283 pointer-based newlib implementation.
1284 (_ctype_b): Declare.
1285 (__ctype_cp): Move to newlib. Declare.
1286 (__ctype_iso): Ditto.
1287 (__set_ctype): Implement changing __ctype_ptr__. Only copy character
1288 class data in applications built under older Cygwin.
1289 * cygwin.din (__ctype_ptr__): Export.
1290 * include/ctype.h: Remove in favor of newlib implementation.
1291 * include/cygwin/config.h (__EXPORT): Define alongside __IMPORT.
1292 * include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_OLD_CTYPE):
1293 Define check for old vs. new ctype implementation.
1294 Bump API minor number.
1296 2009-03-28 Christopher Faylor <me+cygwin@cgf.cx>
1298 * Makefile.in: Perform some minor cleanup. Revamp speclib handling.
1299 * speclib: Rewrite to create libraries with dlltool rather than
1300 attempting surgery on libcygwin.a.
1302 2009-03-27 Corinna Vinschen <corinna@vinschen.de>
1304 * net.cc (inet_ntop6): Convert to lowercase hex digits on the fly.
1306 2009-03-27 Corinna Vinschen <corinna@vinschen.de>
1308 * net.cc (cygwin_getaddrinfo): Check hints for non-NULL before
1309 checking its content.
1311 2009-03-27 Corinna Vinschen <corinna@vinschen.de>
1313 * fhandler.h (class fhandler_fifo): Rename read/write methods to
1315 * fhandler_fifo.cc: Ditto.
1317 2009-03-27 Corinna Vinschen <corinna@vinschen.de>
1319 * syscalls.cc (pathconf): Fix memory leak.
1321 2009-03-26 Corinna Vinschen <corinna@vinschen.de>
1323 * path.cc (symlink_worker): Write target filename as UTF-16 string
1324 with leading BOM marker.
1325 (symlink_info::check_shortcut): If check for leading BOM marker
1326 succeeds, read filename as UTF-16 string.
1327 (symlink_info::check_sysfile): Ditto.
1329 2009-03-26 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
1331 * include/asm/byteorder.h (__ntohl): Align definition to ISO C99.
1334 2009-03-26 Corinna Vinschen <corinna@vinschen.de>
1336 * strfuncs.cc (__set_charset_from_codepage): Revert to translating
1337 codepage 936 to "GBK".
1339 2009-03-25 Corinna Vinschen <corinna@vinschen.de>
1341 * strfuncs.cc (sys_wcstombs): Don't convert ASCII SO into two
1344 2009-03-25 Corinna Vinschen <corinna@vinschen.de>
1346 * environ.cc (environ_init): Break from locale loop after first hit.
1347 * fhandler_console.cc (fhandler_console::write_normal): Print a SO
1348 sequence using always valid Unicode chars.
1350 2009-03-25 Corinna Vinschen <corinna@vinschen.de>
1352 * strfuncs.cc (__kr_wctomb): Use codepage 51949 rather than 50949.
1353 (__kr_mbtowc): Ditto.
1354 (__set_charset_from_codepage): Ditto. Translate codepage 936 to
1355 "GB2312" and drop the charset name "GBK".
1357 2009-03-24 Corinna Vinschen <corinna@vinschen.de>
1359 * strfuncs.cc (__kr_wctomb): Use codepage 50949 rather than 949.
1360 (__kr_mbtowc): Ditto.
1361 (__set_charset_from_codepage): Translate codepages 949 and 50949 to
1362 "EUCKR" and drop the charset name "CP949".
1364 2009-03-24 Corinna Vinschen <corinna@vinschen.de>
1366 * strfuncs.cc (sys_cp_mbstowcs): Don't read beyond src + nms.
1368 2009-03-24 Corinna Vinschen <corinna@vinschen.de>
1370 * shared_info.h (CURR_SHARED_MAGIC): Update.
1372 2009-03-24 Corinna Vinschen <corinna@vinschen.de>
1374 * wchar.h: Replace UINT with unsigned int.
1376 2009-03-24 Corinna Vinschen <corinna@vinschen.de>
1378 * wchar.h: Remove erroneous "C" specifier from extern declaration.
1380 2009-03-24 Corinna Vinschen <corinna@vinschen.de>
1382 * ctype.cc (_CTYPE_DATA_0_127): Add _B class to TAB character.
1383 (__ctype_default): New character class array for default ASCII
1385 (__ctype_iso): New array of character class array for ISO charsets.
1386 (__ctype_cp): Ditto for singlebyte Windows codepages.
1387 (tolower): Implement as distinct function to support any singlebyte
1390 (__set_ctype): New function to copy singlebyte character classes
1391 corresponding to current charset to ctype_b array.
1392 Align copyright text to upstream.
1393 * dcrt0.cc (dll_crt0_1): Reset current locale to "C" per POSIX.
1394 * environ.cc (set_file_api_mode): Remove.
1395 (codepage_init): Remove.
1396 (parse_thing): Remove "codepage" setting.
1397 (environ_init): Set locale according to environment settings, or
1398 to current codepage, before converting environment to multibyte.
1399 * fhandler.h (fhandler_console::write_replacement_char): Drop argument.
1400 * fhandler_console.cc (dev_console::str_to_con): Call sys_cp_mbstowcs
1401 rather than MultiByteToWideChar.
1402 (fhandler_console::write_replacement_char): Always print a funny
1403 half filled square if a character isn't in the current charset.
1404 (fhandler_console::write_normal): Convert to using __mbtowc
1405 rather than next_char.
1406 * fork.cc (frok::child): Drop call to set_file_api_mode.
1407 * globals.cc (enum codepage_type) Remove.
1408 (current_codepage): Remove.
1409 * miscfuncs.cc (cygwin_wcslwr): Unused, dangerous. Remove.
1410 (cygwin_wcsupr): Ditto.
1411 (is_cp_multibyte): Remove.
1412 (next_char): Remove.
1413 * miscfuncs.h (is_cp_multibyte): Drop declaration.
1415 * strfuncs.cc (get_cp): Remove.
1416 (__db_wctomb): New function to implement _wctomb_r functionality for
1417 doublebyte charsets using WideCharToMultiByte.
1418 (__sjis_wctomb): New function to replace unusable newlib function.
1419 (__jis_wctomb): Ditto.
1420 (__eucjp_wctomb): Ditto.
1421 (__gbk_wctomb): New function.
1422 (__kr_wctomb): Ditto.
1423 (__big5_wctomb): Ditto.
1424 (__db_mbtowc): New function to implement _mbtowc_r functionality for
1425 doublebyte charsets using MultiByteToWideChar.
1426 (__sjis_mbtowc): New function to replace unusable newlib function.
1427 (__jis_mbtowc): Ditto.
1428 (__eucjp_mbtowc): Ditto.
1429 (__gbk_mbtowc): New function.
1430 (__kr_mbtowc): New function
1431 (__big5_mbtowc): New function
1432 (__set_charset_from_codepage): New function.
1433 (sys_wcstombs): Reimplement, basically using same wide char to multibyte
1434 conversion as newlib's application level functions. Plus extras.
1435 Add lengthy comment to explain. Change return type to size_t.
1436 (sys_wcstombs_alloc): Just use sys_wcstombs. Change return type to
1438 (sys_cp_mbstowcs): Replace sys_mbstowcs, take additional codepage
1439 argument. Explain why. Change return type to size_t.
1440 (sys_mbstowcs_alloc): Just use sys_mbstowcs. Change return type to
1442 * wchar.h: Declare internal functions implemented in strfuncs.cc.
1443 (wcscasecmp): Remove.
1444 (wcsncasecmp): Remove.
1447 * winsup.h (codepage_init): Remove declaration.
1449 (sys_wcstombs): Align declaration to new implementation.
1450 (sys_wcstombs_alloc): Ditto.
1451 (sys_cp_mbstowcs): Add declaration.
1452 (sys_mbstowcs): Define as inline function.
1453 (sys_mbstowcs_alloc): Align declaration to new implementation.
1454 (set_file_api_mode): Remove declaration.
1455 * include/ctype.h (isblank): Redefine to use _B character class.
1456 (toupper): Remove ASCII-only definition.
1459 2009-03-24 Corinna Vinschen <corinna@vinschen.de>
1461 * sec_auth.cc (str2buf2uni): Remove.
1462 * security.h (str2buf2uni): Remove declaration.
1464 2009-03-24 Yaakov Selkowitz <yselkowitz@cygwin.com>
1466 * include/mntent.h: Remove declarations of nonexistant addmntent
1467 and hasmntopt. Update and clarify the /etc/mtab comment.
1469 2009-03-23 Corinna Vinschen <corinna@vinschen.de>
1471 * smallprint.cc (__small_vsprintf): Handle NULL PWCHAR and
1472 PUNICODE_STRING arguments.
1473 (__small_vswprintf): Ditto.
1475 2009-03-23 Corinna Vinschen <corinna@vinschen.de>
1477 * include/asm/byteorder.h (__constant_ntohs): Remove declaration.
1478 (__constant_ntohl): Ditto.
1480 2009-03-23 Corinna Vinschen <corinna@vinschen.de>
1482 * cygwin.din: Export wordexp, wordfree.
1483 * posix.sgml: Move them to SUSv4 list.
1484 * include/cygwin/version.h: Bump API minor number.
1486 2009-03-22 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
1488 * include/sys/un.h: #include <string.h> for strlen.
1490 2009-03-19 Corinna Vinschen <corinna@vinschen.de>
1492 * dlfcn.cc (get_full_path_of_dll): Revert patch from 2008-07-16.
1494 2009-03-19 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
1496 * cygwin.din: Export log2, log2f as functions.
1497 * posix.sgml: Add them to SUSv4 list.
1498 * include/cygwin/version.h: Bump API minor number.
1500 2009-03-18 Corinna Vinschen <corinna@vinschen.de>
1502 * sec_auth.cc (lsaauth): Remove local definitions of struct
1503 _TOKEN_LINKED_TOKEN and TokenLinkedToken in favor of definitions
1505 (lsaprivkeyauth): As in lsaauth, fetch linked token if available and
1506 return that in favor of default token.
1508 2009-03-15 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
1510 * errno.cc (_sys_errlist): Add ESTRPIPE.
1512 2009-03-15 Corinna Vinschen <corinna@vinschen.de>
1514 * cygwin.din: Export wcsdup.
1515 * posix.sgml: Add wcsdup to SUSv4 list.
1516 * include/cygwin/version.h: Bump API minor number.
1518 2009-03-15 Corinna Vinschen <corinna@vinschen.de>
1520 * include/inttypes.h: Remove "l" size specifier from all 16 and 32 bit
1523 2009-03-14 Christopher Faylor <me+cygwin@cgf.cx>
1525 * path.cc (warn_msdos): Don't warn about MS-DOS filenames encountered
1526 during initialization.
1528 2009-03-14 Corinna Vinschen <corinna@vinschen.de>
1530 * gendef: Remove STABS directives.
1532 2009-03-13 Corinna Vinschen <corinna@vinschen.de>
1534 * mktemp.cc: Remove STABS specific link-time warning. Align copyright
1537 2009-03-13 Corinna Vinschen <corinna@vinschen.de>
1539 * flock.cc: Fix lockf copyright to latest version.
1541 2009-03-12 Corinna Vinschen <corinna@vinschen.de>
1543 * fhandler_disk_file.cc (path_conv::isgood_inode): Move to be defined
1545 (get_ino_by_handle): Take additional path_conv argument, accommodate
1546 throughout. Only use FileId if isgood_inode check is true.
1547 (fhandler_base::open_fs): Simplify setting ino due to above change.
1548 (readdir_get_ino): Make sure to return always a non-zero inode number.
1549 (fhandler_disk_file::readdir): Always open file in dir with
1550 FILE_OPEN_REPARSE_POINT so as not to open wrong file.
1551 Drop call to isgood_inode here.
1552 * path.cc (symlink_info::check): Call fs.update in case we're fetching
1553 file information from call to NtQueryDirectoryFile.
1555 2009-03-12 Corinna Vinschen <corinna@vinschen.de>
1557 * flock.cc (fhandler_disk_file::lock): Don't test file open mode in
1558 case of flock-type locks. Explain why.
1560 2009-03-12 Brian Ford <Brian.Ford@FlightSafety.com>
1562 * gethostby_helper: Fix typos in DEBUGGING case.
1564 2009-03-11 Corinna Vinschen <corinna@vinschen.de>
1566 * cygwin.din: Export wcscasecmp, wcsncasecmp.
1567 * posix.sgml: Move wcscasecmp, wcsncasecmp to SUSv4 list.
1568 * include/cygwin/version.h: Bump API minor number.
1570 2009-03-11 Corinna Vinschen <corinna@vinschen.de>
1572 * cygwin.din: Export wscanf, fwscanf, swscanf, vwscanf, vfwscanf,
1574 * posix.sgml: Move fwscanf, swscanf, vwscanf, vfwscanf, vswscanf
1576 * include/cygwin/version.h: Bump API minor number.
1578 2009-03-09 Corinna Vinschen <corinna@vinschen.de>
1580 * fhandler.h (fhandler_socket::wait_for_events): Take additional
1581 parameter "dontwait".
1582 * fhandler_socket.cc (fhandler_socket::wait_for_events): Act as if the
1583 socket is non-blocking if dontwait is true.
1584 (fhandler_socket::recv_internal): Use incoming MSG_DONTWAIT flag to
1585 set the wait_for_events dontwait parameter.
1586 (fhandler_socket::send_internal): Ditto. Optimize code slightly.
1587 * include/cygwin/socket.h (MSG_DONTWAIT): Define.
1588 * include/cygwin/version.h: Bump API minor number.
1590 2009-03-09 Corinna Vinschen <corinna@vinschen.de>
1592 * cygwin.din: Export wcsftime.
1593 * posix.sgml: Move wcsftime to SUSv4 list.
1594 * include/cygwin/version.h: Bump API minor number.
1596 2009-03-06 Pierre A. Humblet <pierre@phumblet.no-ip.org>
1598 * cygwin.din: Export gethostbyname2.
1599 * net.cc: define _CYGWIN_IN_H and include resolv.h.
1600 (realloc_ent): New function.
1601 (dup_ent): Call realloc_ent.
1602 (memcpy4to6): New function.
1603 (dn_length1): New function.
1604 (gethostby_helper): New function.
1605 (gethostbyname2): New function.
1606 * posix.sgml: Add gethostbyname2.
1607 * include/cygwin/version.h: Bump API minor number.
1608 * libc/minires.c (get_options): Look for "inet6" and apply bounds
1609 to "retry" and "retrans".
1610 (res_ninit): Set the default options at the beginning.
1611 (dn_expand): Fix "off by one".
1613 2009-03-06 Corinna Vinschen <corinna@vinschen.de>
1615 * cygwin.din: Export wprintf, fwprintf, swprintf, vwprintf, vfwprintf,
1617 * posix.sgml: Move fwprintf, swprintf, vwprintf, vfwprintf, vswprintf
1618 to SUSv4 list. Sort SUSv4 list.
1619 * include/cygwin/version.h: Bump API minor number.
1621 2009-03-04 Corinna Vinschen <corinna@vinschen.de>
1623 * dcrt0.cc (disable_dep): Disable. Explain why.
1624 (dll_crt0_0): Disable calling disable_dep. Explain why.
1626 2009-03-03 Corinna Vinschen <corinna@vinschen.de>
1628 * net.cc: Include asm/byteorder.h.
1629 (htonl): Move to end of file. Add comment to explain why. Align
1630 definition to POSIX. Use related macro from asm/byteorder.h.
1634 * include/asm/byteorder.h: Revert previous patch.
1636 2009-03-03 Corinna Vinschen <corinna@vinschen.de>
1638 * include/asm/byteorder.h: Disable optimization when building
1639 Cygwin network code.
1641 2009-02-26 Christopher Faylor <me+cygwin@cgf.cx>
1643 * dtable.cc (dtable::select_read): Add ability to override fh.
1644 * fhandler.h (fhandler_fifo::select_read): Declare new function.
1645 (fhandler_fifo::select_write): Ditto.
1646 (fhandler_fifo::select_except): Ditto.
1647 * select.cc (peek_pipe): Treat certain classes of pipe errors as "no
1649 (fhandler_fifo::select_read): Define new function.
1650 (fhandler_fifo::select_write): Ditto.
1651 (fhandler_fifo::select_except): Ditto.
1653 * shared_info.h (CURR_SHARED_MAGIC): Update.
1655 2009-02-23 Sjors Gielen <mailinglist@dazjorz.com>
1657 * Makefile.in: Add DESTDIR functionality.
1659 2009-02-23 Corinna Vinschen <corinna@vinschen.de>
1661 * sec_auth.cc (get_user_local_groups): Simplify LookupAccountName code.
1663 2009-02-20 Corinna Vinschen <corinna@vinschen.de>
1665 * autoload.cc (NetLocalGroupEnum): Remove.
1666 (NetLocalGroupGetMembers): Remove.
1667 (NetUserGetLocalGroups): Add.
1668 * sec_auth.cc (is_group_member): Remove function.
1669 (get_user_local_groups): Get user as string instead of as SID.
1670 Call NetUserGetLocalGroups instead of NetLocalGroupEnum. Drop call
1672 (get_server_groups): Call get_user_local_groups with user name instead
1675 2009-02-19 Corinna Vinschen <corinna@vinschen.de>
1677 * winver.rc: Fix Copyright date.
1679 2009-02-19 Corinna Vinschen <corinna@vinschen.de>
1681 * cygwin.din: Export mbsnrtowcs and wcsnrtombs.
1682 * posix.sgml: Move mbsnrtowcs and wcsnrtombs to SUSv4 section.
1683 * include/cygwin/version.h: Bump API minor number.
1685 2009-02-18 Corinna Vinschen <corinna@vinschen.de>
1687 * cygwin.din: Export open_wmemstream.
1688 * posix.sgml: Move open_wmemstream to SUSv4 section.
1689 * include/cygwin/version.h: Bump API minor number.
1691 2009-02-16 Corinna Vinschen <corinna@vinschen.de>
1693 * cygwin.din: Export reallocf.
1694 * malloc_wrapper.cc( reallocf): New function.
1695 * posix.sgml: Add reallocf to BSD section.
1696 * include/cygwin/version.h: Bump API minor number.
1697 * libc/fts.c: Remove erroneous reallocf definition.
1699 2009-02-16 Corinna Vinschen <corinna@vinschen.de>
1701 * cygwin.din: Export wcstoimax, wcstoumax.
1702 * posix.sgml: Move wcstoimax and wcstoumax to SUSv4 section.
1703 * include/inttypes.h: Declare wcstoimax and wcstoumax.
1704 * include/cygwin/version.h: Bump API minor number.
1706 2009-02-13 Corinna Vinschen <corinna@vinschen.de>
1708 * cygwin.din: Export wcsnlen.
1709 * posix.sgml: Move wcsnlen to SUSv4 section.
1710 * include/cygwin/version.h: Bump API minor number.
1712 2009-02-13 Corinna Vinschen <corinna@vinschen.de>
1714 * environ.cc (_getenv_r): New function.
1716 2009-02-13 Corinna Vinschen <corinna@vinschen.de>
1718 * posix.sgml: Move dirfd to SUSv4 section.
1720 2009-02-13 Corinna Vinschen <corinna@vinschen.de>
1722 * posix.sgml: Move interfaces deprecated in SUSv4 to deprecated
1723 interfaces section. Move interfaces added in SUSv4 to SUSv4
1724 section or, if unimplemented, add them to the unimplemented interfaces
1727 2009-02-13 Corinna Vinschen <corinna@vinschen.de>
1729 * posix.sgml: Merge SUSv3 and SUSv4 section into a single SUSv4 section.
1730 Move Solaris calls now in SUSv4 to SUSv4 section. Rename unimplemented
1731 section to refer to SUSv4. Add note about missing interfaces.
1732 Move wcstod and wcstof from unimplemented to SUSv4 section.
1734 2009-02-13 Corinna Vinschen <corinna@vinschen.de>
1736 * mount.cc (mount_info::from_fstab_line): Make cygdrive posix=0 by
1737 default as documented.
1739 2009-02-13 Corinna Vinschen <corinna@vinschen.de>
1741 * cygwin.din: Export wcstod and wcstof.
1742 * include/cygwin/version.h: Bump API minor number.
1744 2009-02-11 Corinna Vinschen <corinna@vinschen.de>
1746 * syscalls.cc (open): Handle O_DIRECTORY flag.
1747 * include/fcntl.h: Add SUSv4 flags O_DIRECTORY, O_EXEC and O_SEARCH.
1748 * include/cygwin/version.h: Bump API minor number.
1750 2009-02-09 Corinna Vinschen <corinna@vinschen.de>
1752 * fhandler_floppy.cc (fhandler_dev_floppy::open): Fix format. Add
1753 code to allow to read disk and CD/DVD devices in full length. Explain
1755 (fhandler_dev_floppy::raw_read): Add current position to debug output.
1757 * include/sys/sched.h: New stub file to override newlib file with
1758 clashing definitions.
1760 2009-02-05 Corinna Vinschen <corinna@vinschen.de>
1762 * cygwin.din: Export wcstok.
1763 * posix.sgml: Move wcstok from unimplemented to susv3.
1764 * include/cygwin/version.h: Bump API minor number.
1766 2009-02-04 Corinna Vinschen <corinna@vinschen.de>
1768 * fhandler_proc.cc (proc_tab): Add entry for mounts symlink.
1769 (format_proc_mounts): New function to implement mounts symlink.
1770 * fhandler_process.cc (process_tab): Add entry for mounts file.
1771 (format_process_mounts): New function to implement mounts file.
1773 2009-02-04 Corinna Vinschen <corinna@vinschen.de>
1775 * security.cc (alloc_sd): Disable generating default permission entries
1778 2009-01-29 Corinna Vinschen <corinna@vinschen.de>
1780 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix inode number
1781 evaluation for faked "." entry.
1783 * mount.cc (fs_info::update): Move setting of is_cdrom after checking
1784 for caseinsensitivity. Recognize UDF in is_cdrom case and set
1785 caseinsensitive flag according to UDF brokenness determined by OS.
1786 Add comment to explain why.
1787 * mount.h (class fs_info): Add is_udf status flag.
1788 * path.cc (symlink_info::check): Add workaround for UDF bug in
1789 terms of casesensitivity on certain OSes.
1790 * wincap.h (wincaps::has_broken_udf): New element.
1791 * wincap.cc: Implement above element throughout.
1793 2009-01-27 Christopher Faylor <me+cygwin@cgf.cx>
1795 * fhandler.cc (fhandler_base::wait_overlapped): Set bytes to -1 on
1796 EINTR or real error.
1797 (fhandler_base::write_overlapped): Assume that bytes_written will
1798 contain proper error value.
1799 * pipe.cc (fhandler_pipe::fhandler_pipe): Set uninterruptible_io since
1800 signals are handled by pipe functions now.
1802 2009-01-26 Corinna Vinschen <corinna@vinschen.de>
1804 * shared.cc (shared_name): New function for WCHAR names.
1805 (open_shared): Take name parameter as WCHAR. Accommodate throughout.
1806 * shared_info.h ((CURR_SHARED_MAGIC): Redefine.
1807 (shared_name): Add declaration for function taking a WCHAR name.
1808 (open_shared): Change declaration according to above change.
1809 * pinfo.cc (pinfo::init) : Accommodate above change.
1811 2009-01-26 Corinna Vinschen <corinna@vinschen.de>
1813 * grp.cc (getgrgid_r): Simplify code by using stpcpy.
1814 (getgrnam_r): Ditto.
1815 * passwd.cc (getpwuid_r32): Simplify code by using stpcpy.
1816 (getpwnam_r): Ditto.
1818 2009-01-26 Corinna Vinschen <corinna@vinschen.de>
1820 * uinfo.cc (pwdgrp::load): Open file with FILE_OPEN_FOR_BACKUP_INTENT
1823 2009-01-24 Corinna Vinschen <corinna@vinschen.de>
1825 * mount.cc (mount_info::from_fstab): Open fstab file with
1826 FILE_OPEN_FOR_BACKUP_INTENT flag.
1828 2009-01-23 Corinna Vinschen <corinna@vinschen.de>
1830 * smallprint.cc (__small_vsprintf): Use already available buffer tmp
1833 2009-01-22 Christopher Faylor <me+cygwin@cgf.cx>
1835 * select.cc (peek_serial): Add hack to allow proper operation with
1838 2009-01-21 Corinna Vinschen <corinna@vinschen.de>
1840 Remove USE_SERVER define. Accommodate throughout.
1841 * configure.in: Remove --enable-server option.
1842 * configure: Regenerate.
1843 * environ.cc: Remove CYGWIN=server setting.
1845 2009-01-20 Corinna Vinschen <corinna@vinschen.de>
1847 * fhandler_procnet.cc: Reorganize global procnet content data into a
1848 new struct virt_tab_t. Accommodate throughout.
1850 * fhandler.h: Fix copyright dates.
1851 * fhandler_process.cc: Ditto.
1852 * fhandler_registry.cc: Ditto.
1854 2009-01-20 Corinna Vinschen <corinna@vinschen.de>
1856 * devices.h (FH_PROCESSFD): New device type.
1857 * dtable.cc (build_fh_pc): Add case for FH_PROCESSFD.
1858 * fhandler.h (class fhandler_virtual): Drop bufalloc member.
1859 * fhandler_virtual.h: New header.
1860 * fhandler_proc.cc: Remove types proc_type_t and proc_tab_t in favor
1861 of types virt_type_t and virt_tab_t from fhandler_virtual.h.
1862 Change prototypes of format_XXX functions accordingly.
1863 (proc_tab): Drop size member info.
1864 (fhandler_proc::fill_filebuf): Don't allocate filebuf here. Allocate
1865 it in the format_XXX functions.
1866 * fhandler_process.cc: Reorganize global process content data into a
1867 new struct virt_tab_t. Accommodate throughout.
1868 (format_process_winexename): New function.
1869 (format_process_winpid): New function.
1870 (format_process_exename): New function.
1871 (format_process_root): New function.
1872 (format_process_cwd): New function.
1873 (format_process_cmdline): New function.
1874 (format_process_ppid): New function.
1875 (format_process_uid): New function.
1876 (format_process_pgid): New function.
1877 (format_process_sid): New function.
1878 (format_process_gid): New function.
1879 (format_process_ctty): New function.
1880 (format_process_fd): New function.
1881 * fhandler_procnet.cc (fhandler_procnet::fill_filebuf): Don't use
1883 * fhandler_registry.cc (fhandler_registry::fill_filebuf): Define
1885 * fhandler_virtual.cc (fhandler_virtual::fhandler_virtual): Drop
1886 initialization of bufalloc.
1887 (fhandler_virtual::dup): Drop copying bufalloc.
1889 2009-01-20 Corinna Vinschen <corinna@vinschen.de>
1891 * thread.h (struct pthread_rwlock::RWLOCK_READER): Add counter n.
1892 * thread.cc (pthread_rwlock::rdlock): If a thread already owns a
1893 read lock, just count the number of locks for it, per SUSv4.
1894 (pthread_rwlock::tryrdlock): Ditto.
1895 (pthread_rwlock::unlock): If a thread has more than one concurrent
1896 read locks, just count down.
1898 2009-01-20 Corinna Vinschen <corinna@vinschen.de>
1900 * autoload.cc (WSAIoctl): Reintroduce.
1901 (WSASendMsg): Define.
1902 * fhandler.h (class fhandler_socket): Change definition of recv_internal
1903 and send_internal to take WSAMSG pointer as parameter.
1904 * fhandler_socket.cc (WSAID_WSARECVMSG): Define.
1905 (LPFN_WSARECVMSG): Define.
1906 (WSASendMsg): Declare.
1907 (get_ext_funcptr): New function to fetch address of WSARecvMsg.
1908 (fhandler_socket::recv_internal): Take just a LPWSAMSG parameter.
1909 Change code accordingly. If control information is requested,
1910 fetch address of WSARecvMsg and use that instead of WSARecvFrom.
1911 (fhandler_socket::recvfrom): Change return type to ssize_t as
1912 declared in fhandler.h. Accommodate changes to recv_internal.
1913 (fhandler_socket::recvmsg): Ditto. Make sure that control information
1914 is only requested if system, address family, and socket type support it.
1915 (fhandler_socket::send_internal): Take just a LPWSAMSG parameter
1916 and the flags. Change code accordingly. If control information is
1917 provided, use WSASendMsg instead of WSASendTo.
1918 (fhandler_socket::sendto): Drop useless comment. Accommodate changes
1920 (fhandler_socket::sendmsg): Ditto. Make sure that control information
1921 is only provided if system, address family, and socket type support it.
1922 * wincap.h (wincaps::has_recvmsg): New element.
1923 (wincaps::has_sendmsg): New element
1924 * wincap.cc: Implement above elements throughout.
1925 * include/cygwin/socket.h (CMSG_ALIGN): Phrase in terms of alignment
1926 of type struct cmsghdr.
1928 2009-01-17 Corinna Vinschen <corinna@vinschen.de>
1930 * mmap.cc (mmap64): Fix condition checking if anonymous mapping beyond
1933 2009-01-17 Corinna Vinschen <corinna@vinschen.de>
1935 * fhandler_proc.cc: Reorganize global proc content data into a new
1936 struct proc_tab_t. Accommodate throughout.
1937 (format_proc_version): New function.
1938 (format_proc_loadavg): New function.
1939 (format_proc_self): New function.
1941 * resource.cc (getrlimit): Return correct rlim_max value for
1944 2009-01-16 Corinna Vinschen <corinna@vinschen.de>
1946 * Fix copyright dates.
1948 2009-01-13 Corinna Vinschen <corinna@vinschen.de>
1950 * libc/getopt.c (parse_long_options): Use fix from NetBSD's getopt
1951 to avoid false ambiguities.
1953 2009-01-12 Corinna Vinschen <corinna@vinschen.de>
1955 * syscalls.cc (enum bin_status): New type.
1956 (try_to_bin): Return bin_status. Rename win32_path to pc. Rename h
1957 to fh. Rename fh to tmp_fh. Add code to set delete dispostion and
1958 more code to replace file moved to bin by another, temporary file.
1959 Add comments to explain why.
1960 (unlink_nt): Replace move_to_bin with bin_stat. Only set bin_stat
1961 to move_to_bin for non-remote files. As a last resort, call try_to_bin
1962 if setting delete-on-close failed. Only re-set R/O DOS attribute
1963 and only close handle if it's still valid.
1965 2009-01-11 Corinna Vinschen <corinna@vinschen.de>
1967 * errno.cc (errmap): Set errno to ENOENT instead of ENOSHARE throughout.
1968 * path.cc (path_conv::check): Set to and check for ENOENT instead of
1971 * path.cc (symlink_info::check): Fix Samba 3.2.x comment.
1973 2009-01-09 Corinna Vinschen <corinna@vinschen.de>
1975 * mount.cc (mount_info::from_fstab_line): Always convert drive
1976 letter in native path to uppercase.
1977 * path.cc (normalize_win32_path): Ditto.
1978 (path_prefix_p): Revert previous patch.
1980 * path.cc (symlink_info::check): Check for STATUS_INVALID_PARAMETER
1981 return code to circumvent weird behaviour of Samba 3.2.x shares.
1983 2009-01-09 Christopher Faylor <me+cygwin@cgf.cx>
1985 * include/sys/cygwin.h (CW_SETERRNO): Define.
1986 * external.cc (CW_SETERRNO): Implement.
1987 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 192 to
1988 reflect the above change.
1990 * path.cc (path_prefix_p): Treat X: as equivalent to x:.
1992 * mkglobals_h: Remove unneeded #define.
1994 * spawn.cc (spawn_guts): Avoid overly wordy initialization to zero.
1996 2009-01-08 Corinna Vinschen <corinna@vinschen.de>
1998 * libc/fts.c (fts_build): Use DT_DIR case on Cygwin.
1999 (fts_ufslinks): Fix using wrong structure member in Cygwin-specific
2002 2009-01-07 Corinna Vinschen <corinna@vinschen.de>
2004 * ntdll.h: Reorder NT status flags. Fix a case difference. Add
2005 STATUS_CANNOT_DELETE flag.
2006 * syscalls.cc (unlink_nt): Change initial NtOpenFile to request
2007 FILE_SHARE_DELETE sharing mode. Change comment accordingly.
2008 If setting delete disposition failed with STATUS_CANNOT_DELETE, try
2009 to delete using delete-on-close. Explain why.
2010 Rearrange setting R/O DOS attribute after trying to delete. Simplify
2013 2009-01-07 Corinna Vinschen <corinna@vinschen.de>
2015 * fhandler_disk_file.cc (fhandler_disk_file::link): Only add .exe if
2016 original file has .exe as well.
2017 * path.cc (path_conv::is_binary): Only recognize Windows 32 and 64 bit
2020 2009-01-02 Christopher Faylor <me+cygwin@cgf.cx>
2022 Remove unneeded header files from source files throughout.
2023 Update copyrights where appropriate.
2025 * globals.cc: New file for generic global variables.
2026 * mkglobals_h: New script to generate globals.h.
2027 * mkstatic: New script used to build a (currently non-working) static
2029 * Makefile.in: Add unused rule to build a non-working libcygwin_s.a.
2030 (DLL_OFILES): Add globals.o. Make all objects rely on globals.h.
2031 (globals.h): New target. Generate globals.h.
2032 * cygtls.h: Honor new CYGTLS_HANDLE define to control when the HANDLE
2033 operator is allowed in _cygtls.
2034 * dcrt0.cc: Move most globals to globals.cc.
2036 * environ.cc (strip_title_path): Remove now-unneeded extern.
2037 * fhandler_serial.cc (fhandler_serial::open): Ditto.
2039 (commune_process): Ditto.
2043 * exceptions.cc: Define CYGTLS_HANDLE before including winsup.h.
2044 * path.cc (stat_suffixes): Move here.
2045 * security.h: Add forward class path_conv declaration.
2046 * smallprint.cc (__small_vsprintf): Make a true c++ function.
2047 (__small_sprintf): Ditto.
2048 (small_printf): Ditto.
2049 (console_printf): Ditto.
2050 (__small_vswprintf): Ditto.
2051 (__small_swprintf): Ditto.
2052 * spawn.cc (spawn_guts): Remove _stdcall decoration in favor of
2054 (hExeced): Move to globals.cc
2055 * strfuncs.cc (current_codepage): Ditto.
2056 (active_codepage): Ditto.
2057 * sync.cc (lock_process::locker): Move here from dcrt0.cc.
2058 * syscalls.cc (stat_suffixes): Move to path.cc.
2059 * tty.cc (tty::create_master): Uncapitalize fatal warning for
2061 * winsup.h: Include globals.h to declare most of the grab bag list of
2062 globals which were previously defined here.
2064 * mount.h: Move USER_* defines back to shared_info.h.
2066 * speclib: Force temporary directory cleanup.
2068 2009-01-02 Christopher Faylor <me+cygwin@cgf.cx>
2070 * speclib: Rewrite completely in perl. Avoid multiple nm calls.