1 2009-06-22 Corinna Vinschen <corinna@vinschen.de>
3 * spawn.cc (spawn_guts): Don't run additional check for Win32
4 incompatible CWD if newargv.fixup bailed out already.
5 (av::fixup): Check shell scripts for executability.
7 2009-06-18 Corinna Vinschen <corinna@vinschen.de>
9 * path.cc (chdir): Check error conditions first.
11 2009-06-17 Corinna Vinschen <corinna@vinschen.de>
13 * fhandler_socket.cc (fhandler_socket::recv_internal): Mark WSARecvMsg
16 2009-06-16 Christopher Faylor <me+cygwin@cgf.cx>
18 * fhandler.cc (fhandler_base::read_overlapped): Use a better variable
21 2009-06-16 Christopher Faylor <me+cygwin@cgf.cx>
23 * fhandler.cc (fhandler_base::read_overlapped): Preserve len when
24 looping due to received signal.
26 2009-06-15 Corinna Vinschen <corinna@vinschen.de>
28 * net.cc (get_flags): New static function to generate interface flags
30 (get_ipv4fromreg_ipcnt): New static function to fetch number of
31 configured IPv4 addresses for a given NIC from registry.
32 (get_ipv4fromreg): New static function to fetch configured IPv4
33 addresses for a given NIC from registry.
34 (get_friendlyname): New static function to generate friendly name.
35 (get_hwaddr): New static function to copy hardware address.
36 (get_xp_ifs): Restructure slightly. Add code to generate IPv4 entries
37 entries for interfaces which are disconnected.
39 2009-06-14 Christopher Faylor <me+cygwin@cgf.cx>
41 * errno.cc (errmap): Add mapping for ERROR_IO_INCOMPLETE.
42 * fhandler.cc (fhandler_base::fcntl): Fix comment.
43 (fhandler_base::wait_overlapped): Accept an optional len parameter.
44 Use the len parameter when WriteFile fails with ERROR_IO_PENDING. Make
45 debug output less alarming.
46 (fhandler_base::write_overlapped): Pass len to wait_overlapped.
47 * fhandler.h (fhandler_base::wait_overlapped): Add an optional argument
48 denoting the number of characters intended to be written.
50 * fhandler_tty.cc (fhandler_pty_master::close): Don't close archetype
51 handles when cygwin is still initializing since the handles aren't
52 actually opened at that point.
54 2009-06-14 Corinna Vinschen <corinna@vinschen.de>
56 * localtime.cc (time2): Take another stab at fixing a compiler warning.
58 2009-06-14 Christopher Faylor <me+cygwin@cgf.cx>
60 * localtime.cc (time2): Take a stab at fixing a compiler warning.
62 2009-06-14 Christopher Faylor <me+cygwin@cgf.cx>
64 * fhandler.cc (fhandler_base::wait_overlapped): Honor nonblocking flag
65 for writes. Don't reset event handle when we see a ERROR_IO_PENDING.
67 * sigproc.cc (stopped_or_terminated): Use bool constants for
70 * wait.cc (wait4): Remove nonsensical comment.
72 2009-06-13 Corinna Vinschen <corinna@vinschen.de>
74 * fhandler_socket.cc (fhandler_socket::recv_internal): Set namelen
75 pointer to NULL if name pointer is NULL. Explain why.
77 2009-06-12 Corinna Vinschen <corinna@vinschen.de>
79 * localtime.cc (time2): Change "spring gap" to "spring forward gap"
82 2009-06-12 Corinna Vinschen <corinna@vinschen.de>
84 * localtime.cc (time2): Add workaround for spring forward gap problem.
85 Add explaining comment.
87 2009-06-12 Corinna Vinschen <corinna@vinschen.de>
89 * Makefile.in (SUBLIBS): Add librt.a.
90 (librt.a): New rule to build librt.a.
92 2009-06-12 Corinna Vinschen <corinna@vinschen.de>
94 * posix_ipc.cc (check_path): Fix typo in comment. Align naming
95 convention rules to Linux. Handle backslash same as slash. Add
98 2009-06-09 Corinna Vinschen <corinna@vinschen.de>
100 * autoload.cc (GetSystemTimes): Remove.
101 * fhandler_proc.cc (format_proc_uptime): Use global system_info rather
102 than retrieving a local copy of the SYSTEM_INFO. Drop call to
103 GetSystemTimes and retrieve SystemPerformanceInformation on all systems
104 again with buffer size big enough for 64 bit systems.
105 (format_proc_stat): Use global system_info rather than retrieving a
106 local copy of the SYSTEM_INFO. Retrieve SystemPerformanceInformation
107 with buffer size big enough for 64 bit systems.
109 2009-06-08 Corinna Vinschen <corinna@vinschen.de>
111 * autoload.cc (GetSystemTimes): Define.
112 * fhandler_proc.cc (format_proc_uptime): Use GetSystemInfo to retrieve
113 processor count. Use GetSystemTimes when available to retrieve system
114 idle time. Improve debug output.
115 (format_proc_stat): Use GetSystemInfo to retrieve processor
116 count. Improve debug output. Ignore if SystemPerformanceInformation
117 returns error. Explain why.
119 2009-06-08 Corinna Vinschen <corinna@vinschen.de>
121 * fork.cc (frok::parent): Remove ancient code erroneously flushing
124 2009-06-08 Corinna Vinschen <corinna@vinschen.de>
126 * cygerrno.h (save_errno::~save_errno): Set errno directly to avoid
127 flooding debug output.
129 2009-06-08 Corinna Vinschen <corinna@vinschen.de>
131 * path.cc (symlink_info::check): Return with error set to ENOENT if
132 STATUS_NO_MEDIA_IN_DEVICE is returned.
134 2009-06-07 Christopher Faylor <me+cygwin@cgf.cx>
136 * cygheap.h (mini_cygheap): New struct.
137 (init_cygheap): Inherit locale field via mini_cygheap.
138 * cygheap.cc (cygheap_at_start): Define new variable.
139 (cygheap): Initialize as cygheap_at_start so that locale information is
141 (cygheap_init): Initialize cygheap iff it is set to cygheap_at_start.
142 * shared_info.h (memory_init): Accommodate argument change.
143 * memory.cc (memory_init): Accept an argument indicating whether
144 cygheap should be initialized or not.
145 * dcrt0.cc (child_info_fork::handle_fork): Pass false to memory_init().
146 (child_info_spawn::handle_spawn): Ditto.
147 (dll_crt0_0): Pass true to memory_init when not forking or execing.
149 * cygheap.h (cygheap_types::HEAP_2_DLL): New enum.
150 * dll_init.h (dll): Remove unused namelen field.
151 (dll_list::load_after_fork): Accommodate change in arguments.
152 * dll_init.cc (dll_list::alloc): Allocate dll information in the cygwin
154 (dll_list::detach): Free dll information from the cygwin heap.
155 (dll_list::load_after_fork): Use dll information in the cygwin heap
156 directly rather than querying parent.
157 * fork.cc (frok::first_dll): Delete.
158 (frok::child): Don't report on first_dll. Don't pass it to
160 (frok::parent): Don't set first_dll.
163 2009-06-06 Corinna Vinschen <corinna@vinschen.de>
165 * dll_init.cc (dll_list::alloc): Allocate memory using a section
166 object. Explain why. Drop call to GetSystemInfo, rather call
167 getpagesize to get allocation granularity. Only align to allocation
168 granularity under WOW64. Use roundup2 to align.
169 (dll_list::detach): Call NtUnmapViewOfSection instead of VirtualFree.
171 2009-06-06 Corinna Vinschen <corinna@vinschen.de>
173 * mmap.cc: Use NtUnmapViewOfSection instead of UnmapViewOfFile
174 throughout for symmetry.
175 (fhandler_dev_mem::munmap): Use correct process handle in call to
176 NtUnmapViewOfSection.
178 2009-06-06 Corinna Vinschen <corinna@vinschen.de>
180 * dll_init.h (struct dll): Set size of name element to ANYSIZE_ARRAY.
181 * dll_init.cc: Fix formatting.
182 (dll_list::alloc): Only allocate as much memory for struct dll as
183 necessary for given DLL name.
184 (dll_list::load_after_fork): Only read a single page of parent memory.
185 Only read more if namelen indicates that it's necessary.
187 2009-06-05 Dave Korn <dave.korn.cygwin@gmail.com>
189 * winbase.h (ilockexch): Fix asm constraints.
190 (ilockcmpexch): Likewise.
192 2009-06-05 Corinna Vinschen <corinna@vinschen.de>
194 * heap.cc (heap_init): Fix typo in comment.
196 2009-06-04 Corinna Vinschen <corinna@vinschen.de>
198 * fhandler_clipboard.cc: Avoid calling system_printf.
199 (set_clipboard): Add basic error checking. Set errno here. Per MSDN,
200 don't call GlobalFree on data block transferred to clipboard.
201 (fhandler_dev_clipboard::write): Drop setting errno after call to
203 (fhandler_dev_clipboard::read): Add basic error checking. Simplify code.
205 2009-06-04 Corinna Vinschen <corinna@vinschen.de>
207 * fhandler_console.cc (set_console_title): Convert title string to
208 wchar_t and call SetConsoleTitleW.
210 2009-06-04 Corinna Vinschen <corinna@vinschen.de>
212 * fhandler_console.cc (fhandler_console::read): Allow Ctrl-Space to
215 2009-06-04 Dave Korn <dave.korn.cygwin@gmail.com>
217 * thread.cc (__cygwin_lock_lock): Delete racy optimisation.
218 (__cygwin_lock_unlock): Likewise.
220 2009-06-03 IWAMURO Motnori <deenheart@gmail.com>
222 * strfuncs.cc (sys_cp_mbstowcs): Fix condition.
224 2009-06-03 Corinna Vinschen <corinna@vinschen.de>
226 * strfuncs.cc (sys_cp_wcstombs): Implement reverse functionality
227 of the change to sys_cp_mbstowcs from 2009-05-30.
228 (sys_cp_mbstowcs): Slightly reformat. Fix comment to accommodate
229 change to sys_cp_wcstombs. Don't write to *ptr if dst is NULL.
231 2009-06-03 Corinna Vinschen <corinna@vinschen.de>
233 * fhandler_console.cc (fhandler_console::read): Convert Alt-Backspace
234 to \033\177 or to \377 dependent on the setting of dev_state->metabit.
236 2009-06-02 Corinna Vinschen <corinna@vinschen.de>
238 * path.cc (path_conv::check): Don't call set_exec for files on "noacl"
241 2009-05-30 Christopher Faylor <me+cygwin@cgf.cx>
243 * strfuncs.cc (sys_cp_mbstowcs): Treat src as unsigned char *. Convert
244 failure of f_mbtowc into a single malformed utf-16 value.
246 2009-05-30 Christopher Faylor <me+cygwin@cgf.cx>
248 * cygwin/include/sys/termios.h: Make default erase character "^?".
250 2009-05-30 Christopher Faylor <me+cygwin@cgf.cx>
252 * fhandler_console.cc (fhandler_console::read): Convert backspace key
255 2009-05-29 Christopher Faylor <me+cygwin@cgf.cx>
257 * path.cc (cwdstuff::set): Rewrite previous change to properly test the
260 2009-05-28 Christopher Faylor <me+cygwin@cgf.cx>
262 * path.cc (cwdstuff::set): Avoid removing a nonexistent trailing slash.
264 2009-05-20 Eric Blake <ebb9@byu.net>
266 * net.cc (gethostby_helper): Use correct signedness.
268 2009-05-18 Christopher Faylor <me+cygwin@cgf.cx>
270 * mount.cc (mount_info::add_item): Avoid using any-old '/' as
273 2009-05-18 Christopher Faylor <me+cygwin@cgf.cx>
275 * mount.cc (mount_info::got_usr_bin): Mark as NO_COPY.
276 (mount_info::got_usr_lib): Ditto.
277 (mount_info::root_idx): Ditto.
279 2009-05-14 Corinna Vinschen <corinna@vinschen.de>
281 * wchar.h (sys_mbstowcs): Add missing __stdcall attribute.
283 2009-05-14 Corinna Vinschen <corinna@vinschen.de>
285 * cygheap.cc (cygheap_init): Set Cygwin default locale values.
286 * cygheap.h (struct cygheap_locale): New structure.
287 (struct user_heap_info): Add cygheap_locale member locale.
288 * dcrt0.cc (dll_crt0_1): Revert to calling _setlocale_r so that only
289 the applications locale is reverted to "C".
290 * environ.cc (environ_init): Remove unused got_lc variable.
291 * fhandler.h (class dev_console): Remove now unsed locale variables.
292 * fhandler_console.cc (fhandler_console::get_tty_stuff): Remove
293 setting dev_console's locale members.
294 (dev_console::con_to_str): Use internal locale settings. Default to
295 __ascii_wctomb if charset is "ASCII".
296 (fhandler_console::write_normal): Ditto.
297 * strfuncs.cc (__ascii_wctomb): Drop declaration.
298 (__db_wctomb): Use fixed value 2 instead of not
299 necessarily matching MB_CUR_MAX.
300 (__eucjp_wctomb): Use 3 instead of MB_CUR_MAX.
301 (sys_cp_wcstombs): Remove special case for "C" locale.
302 (sys_wcstombs): Implement here. Use internal locale data stored on
304 (sys_cp_mbstowcs): Remove special case for "C" locale.
305 (sys_mbstowcs): Implement here. Use internal locale data stored on
307 * syscalls.cc (internal_setlocale): New function to set cygheap locale
308 data and to reset CWD posix path.
309 (setlocale): Just call internal_setlocale from here if necessary.
310 * wchar.h (__ascii_wctomb): Declare.
311 (sys_wcstombs): Don't define inline, just declare.
312 (sys_mbstowcs): Ditto.
314 2009-05-14 Christopher Faylor <me+cygwin@cgf.cx>
316 * mount.cc (mount_info::init): Remove MOUNT_CYGWIN_EXEC setting when
317 auto-mounting /usr/bin.
319 2009-05-14 Corinna Vinschen <corinna@vinschen.de>
321 * mount.cc (oopts): Add a no-op "auto" option.
322 (mount_info::create_root_entry): Set root dir to MOUNT_IMMUTABLE rather
323 than to MOUNT_OVERRIDE.
325 2009-05-13 Corinna Vinschen <corinna@vinschen.de>
326 Christopher Faylor <me+cygwin@cgf.cx>
328 * mount.cc (mount_info::got_usr_bin): Define.
329 (mount_info::got_usr_lib): Ditto.
330 (mount_info::root_idx): Ditto.
331 (mount_info::create_root_entry): Create root entry as immutable and
333 (mount_info::init): Remove "Huh? No /etc/fstab..." warning.
334 Unconditionally call from_fstab for user and system tables. Fill in
335 /usr/bin and /usr/lib if they have not been specified in /etc/fstab.
336 (oopts): Alphabetize. Add "override" option to allow overriding
337 immutable mount points.
338 (mount_info::add_item): Accommodate new MOUNT_IMMUTABLE flag intended
340 (mount_info::add_item): Detect "/usr/bin", "/usr/lib", and "/" and set
341 appropriate global state.
342 (fillout_mntent): Add ,auto to mount points added by Cygwin DLL.
343 (mount): Remove masking of MOUNT_SYSTEM. Allow user to shoot
344 themselves. Add comment.
345 * mount.h (mount_info::got_usr_bin): Declare.
346 (mount_info::got_usr_lib): Ditto.
347 (mount_info::root_idx): Ditto.
348 * include/sys/mount.h: Reformat enum.
349 Add MOUNT_{OVERRIDE,IMMUTABLE,AUTOMATIC}.
351 2009-05-13 Corinna Vinschen <corinna@vinschen.de>
353 * cygheap.h (cwdstuff): Convert to class. Make posix and dir private.
354 (cwdstuff::get_posix): New method.
355 (cwdstuff::reset_posix): New method.
356 * dcrt0.cc (dll_crt0_1): Call setlocale rather than _setlocale_r.
357 * environ.cc (environ_init): Ditto. Prefer "C" locale over current
358 codepage default locale.
359 * path.cc (chdir): Use cwdstuff::get_posix method instead of accessing
360 cwdstuff::posix directly.
361 (cwdstuff::set): Defer creating posix path to first usage.
362 (cwdstuff::get_posix): Create posix path if it's empty, and return it.
363 (cwdstuff::get): Create posix path if it's empty.
364 * strfuncs.cc (sys_cp_wcstombs): Use UTF-8 conversion in the "C"
366 (sys_cp_mbstowcs): Ditto.
367 * syscalls.cc (gen_full_path_at): Fetch CWD posix path locked.
368 (setlocale): Implement here. Reset CWD posix path.
370 2009-05-09 Christopher Faylor <me+cygwin@cgf.cx>
372 * cygwin/version.h (CYGWIN_VERSION_CYGWIN_CONV): New define.
374 2009-05-09 Corinna Vinschen <corinna@vinschen.de>
376 * dtable.cc (dtable::init_std_file_from_handle): Add workaround for
377 Windows 7 64 bit issue. Add lengthy comment to explain what happens.
378 * wincap.h (wincaps::has_console_handle_problem): New element.
379 * wincap.cc: Implement above element throughout.
380 (wincap_7): New wincaps structure for NT 6.1 kernels.
381 (wincapc::init): Set has_console_handle_problem to false for 32 bit
384 2009-05-09 Corinna Vinschen <corinna@vinschen.de>
386 * sec_auth.cc (str2uni_cat): Move from here...
387 * path.cc (str2uni_cat): ...to here. Simplify. Make static inline.
388 (get_nt_native_path): Use RtlAppendUnicodeToString rather than
389 str2uni_cat for constant strings for speed.
390 * security.h (str2uni_cat): Drop declaration.
392 2009-05-08 Corinna Vinschen <corinna@vinschen.de>
393 IWAMURO Motonori <deenheart@gmail.com>
395 * strfuncs.cc (sys_cp_wcstombs): save and restore previous errno value.
396 (sys_cp_mbstowcs): Ditto.
398 2009-05-08 IWAMURO Motonori <deenheart@gmail.com>
400 * strfuncs.cc (sys_cp_wcstombs): Set errno to 0 before converting
401 wide char to SO/UTF-8 sequence.
403 2009-05-08 Corinna Vinschen <corinna@vinschen.de>
405 * include/sys/select.h: Guard definitions with __USE_W32_SOCKETS as
406 the accompanying fd_set definitions in newlib's sys/types.h.
408 2009-05-06 Christopher Faylor <me+cygwin@cgf.cx>
410 * fhandler_console.cc (fhandler_console::ioctl): Properly treat
411 TIOCLINUX argument as a char.
412 * fhandler_tty.cc (fhandler_tty_slave::ioctl): Use coercion to properly
415 2009-05-06 Corinna Vinschen <corinna@vinschen.de>
417 * libc/minires.c (scanline): Fix type in calls to ctype functions
418 to stay in unsigned char range for char values >= 0x80.
419 * regex/regcomp.c: Ditto, throughout.
420 * regex/regex2.h (ISWORD): Ditto.
422 2009-05-06 Corinna Vinschen <corinna@vinschen.de>
424 * cygheap.cc (cygheap_init): Set umask to a sane default.
425 * uinfo.cc (cygheap_user::ontherange): Don't use HOMEDRIVE/HOMEPATH
426 to set HOME. Default to /home/USERNAME.
428 2009-05-03 Corinna Vinschen <corinna@vinschen.de>
430 * security.cc (set_file_sd): Drop using FILE_OPEN_FOR_RECOVERY flag in
432 * exceptions.cc (open_stackdumpfile): Ditto in call to NtCreateFile.
433 * fhandler.cc (fhandler_base::open): Ditto. Simplify setting
436 * mount.cc (fs_info::update): Recognize offline storage.
437 (fillout_mntent): Report UDF and offline storage.
438 * mount.h (class fs_info): Add is_csc_cache status flag.
440 2009-05-04 Christopher Faylor <me+cygwin@cgf.cx>
442 * fhandler_console.cc (fhandler_console::write_console): Eliminate
443 unneeded debugging output.
444 (fhandler_console::write_normal): Eliminate unneeded __seterrno.
446 2009-05-04 Christopher Faylor <me+cygwin@cgf.cx>
448 * libc/minires.c (scanline): Accommodate ctype changes which disallow
449 use of an unadorned char argument to is* macros.
450 * regex/regcomp.c: Ditto, throughout.
451 * regex/regex2.h (ISWORD): Ditto.
453 2009-05-03 Christopher Faylor <me+cygwin@cgf.cx>
455 * fhandler.h (fhandler_console::MAX_WRITE_CHARS): Declare.
456 (fhandler_console::write_replacement_char): Declare as inline.
457 (fhandler_console::write_console): Declare new function.
458 * fhandler_console.cc (fhandler_console::MAX_WRITE_CHARS): Define.
459 (handler_console::write_console): Define.
460 (fhandler_console::write_replacement_char): Define as inline.
461 (fhandler_console::write_normal): Use write_console when writing
462 buffers of unknown length.
464 2009-04-26 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
466 * include/cygwin/socket.h: Define SOL_IPV6.
468 2009-04-21 Corinna Vinschen <corinna@vinschen.de>
470 * ctype.cc (__set_ctype): Copy exact part of the current active
471 character class array.
473 2009-04-20 Corinna Vinschen <corinna@vinschen.de>
475 * flock.cc (lf_setlock): Handle border case which results in WFMO loop
476 exiting with ret == WAIT_TIMEOUT gracefully. Add a system_printf to
477 uncover other potential problems with WFMO loop.
479 2009-04-18 Christopher Faylor <me+cygwin@cgf.cx>
481 * mkimport: Specify .text for stub explicitly.
482 * speclib: Add a dummy '.idata$7' section referring to the dll
483 associated with the real import library.
485 2009-04-18 Corinna Vinschen <corinna@vinschen.de>
487 * dcrt0.cc (globify): Only call mbtowc for non-ascii chars.
489 2009-04-17 Corinna Vinschen <corinna@vinschen.de>
491 * dcrt0.cc (globify): Make multibyte-aware.
493 2009-04-17 Corinna Vinschen <corinna@vinschen.de>
495 * flock.cc (class inode_t): Add i_wait member and matching methods
496 wait(), unwait(), and waiting().
497 (inode_t::inode_t): Initialize i_wait to 0.
498 (fhandler_disk_file::lock): Only remove node if no other thread is
499 waiting for a blocking lock.
500 (lf_setlock): Manipulate node->i_wait to signal that a thread is
501 waiting for a blocking lock in this node.
502 (lf_findoverlap): Reinstantiate SELF test as in original code.
504 2009-04-16 Corinna Vinschen <corinna@vinschen.de>
506 * dlfcn.cc (get_full_path_of_dll): Just return a bool value. Drop
507 local path_conv in favor of getting it as parameter. Add local string
508 buffer instead of getting it as parameter.
509 (dlopen): Accommodate get_full_path_of_dll change. Fetch WCHAR Windows
510 path from path_conv variable and call LoadLibraryW.
512 2009-04-16 Corinna Vinschen <corinna@vinschen.de>
514 * ntdll.h (STATUS_LOCK_NOT_GRANTED): Define.
515 * syscalls.cc (unlink_nt): Handle STATUS_LOCK_NOT_GRANTED same as
516 STATUS_SHARING_VIOLATION. Add lengthy comment to explain why.
518 2009-04-15 Corinna Vinschen <corinna@vinschen.de>
520 * path.cc (path_conv::get_wide_win32_path): Allow relative paths.
521 (cygwin_conv_path): In case of CCP_POSIX_TO_WIN_W, convert relative
522 paths to absolute paths if the relative pathname length exceeds
525 2009-04-15 Corinna Vinschen <corinna@vinschen.de>
527 * libc/bsdlib.cc: Align copyright with upstream.
528 * libc/fnmatch.c: Ditto.
530 * libc/inet_addr.c: Ditto.
531 * libc/inet_network.c: Ditto.
532 * libc/rcmd.cc: Ditto.
533 * libc/rexec.cc: Ditto.
535 2009-04-14 Christopher Faylor <me+cygwin@cgf.cx>
537 * speclib: Really revert to using tempdir.
539 2009-04-14 Christopher Faylor <me+cygwin@cgf.cx>
541 * speclib: Revert to using tempdir.
543 2009-04-14 Corinna Vinschen <corinna@vinschen.de>
545 * localtime.cc (tzload): Implement setting __tzrule's offset member
546 using newlib's __gettzinfo () interface also when tzload returns
549 2009-04-13 Dave Korn <dave.korn.cygwin@gmail.com>
551 * include/stdint.h (intptr_t): Remove long from type.
552 (uintptr_t): Likewise.
553 (INTPTR_MIN): Remove 'L' suffix.
554 (INTPTR_MAX, UINTPTR_MAX): Likewise.
556 2009-04-12 Christopher Faylor <me+cygwin@cgf.cx>
558 * speclib: Initial stab at cleaning up temp files. More work needed.
561 2009-04-12 Christopher Faylor <me+cygwin@cgf.cx>
563 * Makefile.in (clean): Clean globals.h.
564 (LIBCOS): Depend on globals.h.
566 2009-04-11 Christopher Faylor <me+cygwin@cgf.cx>
568 * mkimport: New script to perform all operations necessary to create
572 * Makefile.in (toolopts): New variable which holds options relating to
574 (speclib): Use toolopts. Add symbols to avoid copying to special
576 (OBSOLETE_FUNCTIONS): Delete.
577 (NEW_FUNCTIONS): Change to represent an argument to new mkimport
579 (libcygwin.a): Use only new mkimport script to create libcygwin.a.
580 Only rely on ${LIBCOS}.
581 (*/lib*.a): Simplify speclib dependencies.
582 (speclib): Accept toolchain options. Convert every argument to
583 absolute path. Simplify parsing of nm output. Accommodate new
586 2009-04-11 Dave Korn <dave.korn.cygwin@googlemail.com>
588 * include/stdint.h (INTPTR_MIN, INTPTR_MAX): Add 'L' suffix.
589 (WINT_MAX): Add 'U' suffix.
591 2009-04-10 Christopher Faylor <me+cygwin@cgf.cx>
593 * speclib: Use a more robust method to derive full file path.
595 2009-04-09 Christopher Faylor <me+cygwin@cgf.cx>
597 * speclib: Semi-revert to previous version but don't try to generate
598 well-formed import library. Instead, just extract appropriate symbols
599 and let later libcygwin.a on link line fill in the rest of the import
601 * gendef: Hopefully no-op modification to allow easier post-processing
604 2009-04-09 Corinna Vinschen <corinna@vinschen.de>
606 * syscalls.cc (try_to_bin): Use tmp_pathbuf buffer to allocate infobuf
607 rather than using the stack.
609 2009-04-09 Corinna Vinschen <corinna@vinschen.de>
611 * syscalls.cc (try_to_bin): Fix alignment of infobuf.
613 2009-04-09 Corinna Vinschen <corinna@vinschen.de>
615 * fhandler_disk_file.cc (fhandler_disk_file::fchown): Catch an
616 error when changing the user account on a standalone Samba server.
618 * sec_acl.cc (setacl): Accommodate additional parameter to set_file_sd.
619 * sec_helper.cc (SECURITY_SAMBA_UNIX_AUTHORITY): Define.
620 (well_known_samba_unix_user_fake_sid): Define.
621 * security.cc (set_file_sd): Take additional parameter if ownership
622 should be changed. Restrict requested permissions accordingly.
623 (set_file_attribute): Accommodate additional parameter to set_file_sd.
624 * security.h (well_known_samba_unix_user_fake_sid): Declare.
625 (set_file_sd): Align declaration to above change.
627 2009-04-07 Corinna Vinschen <corinna@vinschen.de>
629 * include/stdint.h (int_least32_t): Define as int.
630 (uint_least32_t): Ditto, unsigned.
631 (int_fast16_t): Define as int.
632 (int_fast32_t): Ditto.
633 (uint_fast16_t): Ditto, unsigned.
634 (uint_fast32_t): Ditto.
635 (UINT32_MAX): Remove `L' long marker.
636 (UINT_LEAST32_MAX): Ditto.
637 (UINT_FAST16_MAX): Ditto.
638 (UINT_FAST32_MAX): Ditto.
642 2009-04-07 Corinna Vinschen <corinna@vinschen.de>
644 * strfuncs.cc: Change WCHAR to wchar_t in multibyte<->widechar
645 conversion functions throughout.
646 * wchar.h: Ditto in declarations. Guard them __INSIDE_CYGWIN__.
648 2009-04-07 Corinna Vinschen <corinna@vinschen.de>
650 * fhandler.h (class dev_console): Add members con_mbtowc, con_wctomb,
652 (dev_console::str_to_con): Take mbtowc function pointer and charset
653 as additional parameters.
654 * fhandler_console.cc (fhandler_console::get_tty_stuff): Initialize
655 aforementioned new members. Explain why.
656 (dev_console::con_to_str): Remove useless comment. Call new
657 sys_cp_wcstombs function rather than sys_wcstombs.
658 (dev_console::str_to_con): Take mbtowc function pointer and charset
659 as additional parameters. Call sys_cp_mbstowcs accordingly.
660 (fhandler_console::write_normal): Only initialize f_mbtowc and charset
661 once. Accommodate changed str_to_con.
662 * strfuncs.cc (sys_cp_wcstombs): Renamed from sys_wcstombs. Take
663 wctomb function pointer and charset as parameters. Use throughout.
664 (sys_cp_mbstowcs): Take wctomb function pointer and charset as
665 parameters instead of codepage. Remove matching local variables and
666 their initialization.
667 * wchar.h (ENCODING_LEN): Define as in newlib.
668 (__mbtowc): Use mbtowc_p typedef for declaration.
669 (wctomb_f): New type.
670 (wctomb_p): New type.
672 (__utf8_wctomb): Use wctomb_f typedef for declaration.
673 (sys_cp_wcstombs): Move declaration from winsup.h here.
674 (sys_wcstombs): Ditto.
675 (sys_wcstombs_alloc): Ditto.
676 (sys_cp_mbstowcs): Ditto.
677 (sys_mbstowcs): Ditto.
678 (sys_mbstowcs_alloc): Ditto.
679 * winsup.h: Move declaration of sys_FOO functions to wchar.h. Include
682 2009-04-06 Earl Chew <earl_chew@agilent.com>
684 * libc/rexec.cc (ruserpass): Use fstat64 instead of fstat.
686 2009-04-06 Corinna Vinschen <corinna@vinschen.de>
688 * strfuncs.cc: Add comment to explain why we can't support JIS
690 (__db_wctomb): Alwaus use WC_NO_BEST_FIT_CHARS.
691 (__jis_wctomb): Just call __ascii_wctomb from here.
692 (__eucjp_wctomb): Convert to standalone implementation to fix up the
693 difference between eucJP and CP 20932 affecting JIS-X-0212 characters.
695 (__kr_wctomb): Use codepage 949.
696 (__db_mbtowc): Reorder code slightly. Always use MB_ERR_INVALID_CHARS
697 in call to MultiByteToWideChar. Fix a problem with singlebyte
698 sequences. Fix a bug in '\0' handling. Reset state->__count on
699 successful return from non-zero state.
700 (__jis_mbtowc): Just call __ascii_mbtowc from here.
701 (__eucjp_mbtowc): Convert to standalone implementation to fix up the
702 difference between eucJP and CP 20932 affecting JIS-X-0212 characters.
703 (__kr_mbtowc): Use codepage 949.
704 (__set_charset_from_codepage): Handle codepage 20932 as eucJP.
706 2009-04-05 Christopher Faylor <me+cygwin@cgf.cx>
708 * Makefile.in: Use all compile options when calculating magic values.
709 * shared_info.h (CURR_SHARED_MAGIC): Revert erroneous value.
710 * child_info.h (CURR_CHILD_INFO_MAGIC): Update.
712 * fhandler.h (acquire_output_mutex): Remove unneeded ';'.
713 (release_output_mutex): Ditto.
715 2009-04-05 Christopher Faylor <me+cygwin@cgf.cx>
717 * net.cc: Undefine NOERROR and DELETE to avoid compiler warnings.
718 * shared_info.h (CURR_SHARED_MAGIC): Update.
719 * spawn.cc (spawn_guts): Avoid copying one line command line argument
720 if it hasn't been filled out.
722 2009-04-04 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
723 Corinna Vinschen <corinna@vinschen.de>
725 * include/asm/byteorder.h (__ntohl): Prototype before define to avoid
726 a warning with -Wmissing-prototypes. Use _ELIDABLE_INLINE macro from
730 2009-04-02 Corinna Vinschen <corinna@vinschen.de>
732 * environ.cc (build_env): Fix length calculation of resulting
733 wide char environment string.
735 2009-04-02 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
737 * include/netdb.h: #include <inttypes.h>, <netinet/in.h>,
738 and <sys/socket.h> per SUSv3.
740 2009-04-01 Corinna Vinschen <corinna@vinschen.de>
742 * strfuncs.cc (sys_cp_mbstowcs): Check if ASCII SO is followed by at
743 least two chars and the next byte is a valid UTF-8 start byte before
744 trying to convert the followup bytes as UTF-8 sequence.
746 2009-03-31 Corinna Vinschen <corinna@vinschen.de>
748 * shm.cc (struct shm_attached_list): Convert access type to ULONG.
749 (fixup_shms_after_fork): Fix comment. Use NtMapViewOfSection rather
750 than MapViewOfFileEx to recreate shared memory regions. Add function
751 name to api_fatal output.
752 (shmat): Use NtMapViewOfSection to create shared memory region
755 2009-03-31 Corinna Vinschen <corinna@vinschen.de>
757 * ctype.cc: Remove implementation of ctype functions in favor of
758 pointer-based newlib implementation.
760 (__ctype_cp): Move to newlib. Declare.
761 (__ctype_iso): Ditto.
762 (__set_ctype): Implement changing __ctype_ptr__. Only copy character
763 class data in applications built under older Cygwin.
764 * cygwin.din (__ctype_ptr__): Export.
765 * include/ctype.h: Remove in favor of newlib implementation.
766 * include/cygwin/config.h (__EXPORT): Define alongside __IMPORT.
767 * include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_OLD_CTYPE):
768 Define check for old vs. new ctype implementation.
769 Bump API minor number.
771 2009-03-28 Christopher Faylor <me+cygwin@cgf.cx>
773 * Makefile.in: Perform some minor cleanup. Revamp speclib handling.
774 * speclib: Rewrite to create libraries with dlltool rather than
775 attempting surgery on libcygwin.a.
777 2009-03-27 Corinna Vinschen <corinna@vinschen.de>
779 * net.cc (inet_ntop6): Convert to lowercase hex digits on the fly.
781 2009-03-27 Corinna Vinschen <corinna@vinschen.de>
783 * net.cc (cygwin_getaddrinfo): Check hints for non-NULL before
784 checking its content.
786 2009-03-27 Corinna Vinschen <corinna@vinschen.de>
788 * fhandler.h (class fhandler_fifo): Rename read/write methods to
790 * fhandler_fifo.cc: Ditto.
792 2009-03-27 Corinna Vinschen <corinna@vinschen.de>
794 * syscalls.cc (pathconf): Fix memory leak.
796 2009-03-26 Corinna Vinschen <corinna@vinschen.de>
798 * path.cc (symlink_worker): Write target filename as UTF-16 string
799 with leading BOM marker.
800 (symlink_info::check_shortcut): If check for leading BOM marker
801 succeeds, read filename as UTF-16 string.
802 (symlink_info::check_sysfile): Ditto.
804 2009-03-26 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
806 * include/asm/byteorder.h (__ntohl): Align definition to ISO C99.
809 2009-03-26 Corinna Vinschen <corinna@vinschen.de>
811 * strfuncs.cc (__set_charset_from_codepage): Revert to translating
812 codepage 936 to "GBK".
814 2009-03-25 Corinna Vinschen <corinna@vinschen.de>
816 * strfuncs.cc (sys_wcstombs): Don't convert ASCII SO into two
819 2009-03-25 Corinna Vinschen <corinna@vinschen.de>
821 * environ.cc (environ_init): Break from locale loop after first hit.
822 * fhandler_console.cc (fhandler_console::write_normal): Print a SO
823 sequence using always valid Unicode chars.
825 2009-03-25 Corinna Vinschen <corinna@vinschen.de>
827 * strfuncs.cc (__kr_wctomb): Use codepage 51949 rather than 50949.
828 (__kr_mbtowc): Ditto.
829 (__set_charset_from_codepage): Ditto. Translate codepage 936 to
830 "GB2312" and drop the charset name "GBK".
832 2009-03-24 Corinna Vinschen <corinna@vinschen.de>
834 * strfuncs.cc (__kr_wctomb): Use codepage 50949 rather than 949.
835 (__kr_mbtowc): Ditto.
836 (__set_charset_from_codepage): Translate codepages 949 and 50949 to
837 "EUCKR" and drop the charset name "CP949".
839 2009-03-24 Corinna Vinschen <corinna@vinschen.de>
841 * strfuncs.cc (sys_cp_mbstowcs): Don't read beyond src + nms.
843 2009-03-24 Corinna Vinschen <corinna@vinschen.de>
845 * shared_info.h (CURR_SHARED_MAGIC): Update.
847 2009-03-24 Corinna Vinschen <corinna@vinschen.de>
849 * wchar.h: Replace UINT with unsigned int.
851 2009-03-24 Corinna Vinschen <corinna@vinschen.de>
853 * wchar.h: Remove erroneous "C" specifier from extern declaration.
855 2009-03-24 Corinna Vinschen <corinna@vinschen.de>
857 * ctype.cc (_CTYPE_DATA_0_127): Add _B class to TAB character.
858 (__ctype_default): New character class array for default ASCII
860 (__ctype_iso): New array of character class array for ISO charsets.
861 (__ctype_cp): Ditto for singlebyte Windows codepages.
862 (tolower): Implement as distinct function to support any singlebyte
865 (__set_ctype): New function to copy singlebyte character classes
866 corresponding to current charset to ctype_b array.
867 Align copyright text to upstream.
868 * dcrt0.cc (dll_crt0_1): Reset current locale to "C" per POSIX.
869 * environ.cc (set_file_api_mode): Remove.
870 (codepage_init): Remove.
871 (parse_thing): Remove "codepage" setting.
872 (environ_init): Set locale according to environment settings, or
873 to current codepage, before converting environment to multibyte.
874 * fhandler.h (fhandler_console::write_replacement_char): Drop argument.
875 * fhandler_console.cc (dev_console::str_to_con): Call sys_cp_mbstowcs
876 rather than MultiByteToWideChar.
877 (fhandler_console::write_replacement_char): Always print a funny
878 half filled square if a character isn't in the current charset.
879 (fhandler_console::write_normal): Convert to using __mbtowc
880 rather than next_char.
881 * fork.cc (frok::child): Drop call to set_file_api_mode.
882 * globals.cc (enum codepage_type) Remove.
883 (current_codepage): Remove.
884 * miscfuncs.cc (cygwin_wcslwr): Unused, dangerous. Remove.
885 (cygwin_wcsupr): Ditto.
886 (is_cp_multibyte): Remove.
888 * miscfuncs.h (is_cp_multibyte): Drop declaration.
890 * strfuncs.cc (get_cp): Remove.
891 (__db_wctomb): New function to implement _wctomb_r functionality for
892 doublebyte charsets using WideCharToMultiByte.
893 (__sjis_wctomb): New function to replace unusable newlib function.
894 (__jis_wctomb): Ditto.
895 (__eucjp_wctomb): Ditto.
896 (__gbk_wctomb): New function.
897 (__kr_wctomb): Ditto.
898 (__big5_wctomb): Ditto.
899 (__db_mbtowc): New function to implement _mbtowc_r functionality for
900 doublebyte charsets using MultiByteToWideChar.
901 (__sjis_mbtowc): New function to replace unusable newlib function.
902 (__jis_mbtowc): Ditto.
903 (__eucjp_mbtowc): Ditto.
904 (__gbk_mbtowc): New function.
905 (__kr_mbtowc): New function
906 (__big5_mbtowc): New function
907 (__set_charset_from_codepage): New function.
908 (sys_wcstombs): Reimplement, basically using same wide char to multibyte
909 conversion as newlib's application level functions. Plus extras.
910 Add lengthy comment to explain. Change return type to size_t.
911 (sys_wcstombs_alloc): Just use sys_wcstombs. Change return type to
913 (sys_cp_mbstowcs): Replace sys_mbstowcs, take additional codepage
914 argument. Explain why. Change return type to size_t.
915 (sys_mbstowcs_alloc): Just use sys_mbstowcs. Change return type to
917 * wchar.h: Declare internal functions implemented in strfuncs.cc.
918 (wcscasecmp): Remove.
919 (wcsncasecmp): Remove.
922 * winsup.h (codepage_init): Remove declaration.
924 (sys_wcstombs): Align declaration to new implementation.
925 (sys_wcstombs_alloc): Ditto.
926 (sys_cp_mbstowcs): Add declaration.
927 (sys_mbstowcs): Define as inline function.
928 (sys_mbstowcs_alloc): Align declaration to new implementation.
929 (set_file_api_mode): Remove declaration.
930 * include/ctype.h (isblank): Redefine to use _B character class.
931 (toupper): Remove ASCII-only definition.
934 2009-03-24 Corinna Vinschen <corinna@vinschen.de>
936 * sec_auth.cc (str2buf2uni): Remove.
937 * security.h (str2buf2uni): Remove declaration.
939 2009-03-24 Yaakov Selkowitz <yselkowitz@cygwin.com>
941 * include/mntent.h: Remove declarations of nonexistant addmntent
942 and hasmntopt. Update and clarify the /etc/mtab comment.
944 2009-03-23 Corinna Vinschen <corinna@vinschen.de>
946 * smallprint.cc (__small_vsprintf): Handle NULL PWCHAR and
947 PUNICODE_STRING arguments.
948 (__small_vswprintf): Ditto.
950 2009-03-23 Corinna Vinschen <corinna@vinschen.de>
952 * include/asm/byteorder.h (__constant_ntohs): Remove declaration.
953 (__constant_ntohl): Ditto.
955 2009-03-23 Corinna Vinschen <corinna@vinschen.de>
957 * cygwin.din: Export wordexp, wordfree.
958 * posix.sgml: Move them to SUSv4 list.
959 * include/cygwin/version.h: Bump API minor number.
961 2009-03-22 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
963 * include/sys/un.h: #include <string.h> for strlen.
965 2009-03-19 Corinna Vinschen <corinna@vinschen.de>
967 * dlfcn.cc (get_full_path_of_dll): Revert patch from 2008-07-16.
969 2009-03-19 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
971 * cygwin.din: Export log2, log2f as functions.
972 * posix.sgml: Add them to SUSv4 list.
973 * include/cygwin/version.h: Bump API minor number.
975 2009-03-18 Corinna Vinschen <corinna@vinschen.de>
977 * sec_auth.cc (lsaauth): Remove local definitions of struct
978 _TOKEN_LINKED_TOKEN and TokenLinkedToken in favor of definitions
980 (lsaprivkeyauth): As in lsaauth, fetch linked token if available and
981 return that in favor of default token.
983 2009-03-15 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
985 * errno.cc (_sys_errlist): Add ESTRPIPE.
987 2009-03-15 Corinna Vinschen <corinna@vinschen.de>
989 * cygwin.din: Export wcsdup.
990 * posix.sgml: Add wcsdup to SUSv4 list.
991 * include/cygwin/version.h: Bump API minor number.
993 2009-03-15 Corinna Vinschen <corinna@vinschen.de>
995 * include/inttypes.h: Remove "l" size specifier from all 16 and 32 bit
998 2009-03-14 Christopher Faylor <me+cygwin@cgf.cx>
1000 * path.cc (warn_msdos): Don't warn about MS-DOS filenames encountered
1001 during initialization.
1003 2009-03-14 Corinna Vinschen <corinna@vinschen.de>
1005 * gendef: Remove STABS directives.
1007 2009-03-13 Corinna Vinschen <corinna@vinschen.de>
1009 * mktemp.cc: Remove STABS specific link-time warning. Align copyright
1012 2009-03-13 Corinna Vinschen <corinna@vinschen.de>
1014 * flock.cc: Fix lockf copyright to latest version.
1016 2009-03-12 Corinna Vinschen <corinna@vinschen.de>
1018 * fhandler_disk_file.cc (path_conv::isgood_inode): Move to be defined
1020 (get_ino_by_handle): Take additional path_conv argument, accommodate
1021 throughout. Only use FileId if isgood_inode check is true.
1022 (fhandler_base::open_fs): Simplify setting ino due to above change.
1023 (readdir_get_ino): Make sure to return always a non-zero inode number.
1024 (fhandler_disk_file::readdir): Always open file in dir with
1025 FILE_OPEN_REPARSE_POINT so as not to open wrong file.
1026 Drop call to isgood_inode here.
1027 * path.cc (symlink_info::check): Call fs.update in case we're fetching
1028 file information from call to NtQueryDirectoryFile.
1030 2009-03-12 Corinna Vinschen <corinna@vinschen.de>
1032 * flock.cc (fhandler_disk_file::lock): Don't test file open mode in
1033 case of flock-type locks. Explain why.
1035 2009-03-12 Brian Ford <Brian.Ford@FlightSafety.com>
1037 * gethostby_helper: Fix typos in DEBUGGING case.
1039 2009-03-11 Corinna Vinschen <corinna@vinschen.de>
1041 * cygwin.din: Export wcscasecmp, wcsncasecmp.
1042 * posix.sgml: Move wcscasecmp, wcsncasecmp to SUSv4 list.
1043 * include/cygwin/version.h: Bump API minor number.
1045 2009-03-11 Corinna Vinschen <corinna@vinschen.de>
1047 * cygwin.din: Export wscanf, fwscanf, swscanf, vwscanf, vfwscanf,
1049 * posix.sgml: Move fwscanf, swscanf, vwscanf, vfwscanf, vswscanf
1051 * include/cygwin/version.h: Bump API minor number.
1053 2009-03-09 Corinna Vinschen <corinna@vinschen.de>
1055 * fhandler.h (fhandler_socket::wait_for_events): Take additional
1056 parameter "dontwait".
1057 * fhandler_socket.cc (fhandler_socket::wait_for_events): Act as if the
1058 socket is non-blocking if dontwait is true.
1059 (fhandler_socket::recv_internal): Use incoming MSG_DONTWAIT flag to
1060 set the wait_for_events dontwait parameter.
1061 (fhandler_socket::send_internal): Ditto. Optimize code slightly.
1062 * include/cygwin/socket.h (MSG_DONTWAIT): Define.
1063 * include/cygwin/version.h: Bump API minor number.
1065 2009-03-09 Corinna Vinschen <corinna@vinschen.de>
1067 * cygwin.din: Export wcsftime.
1068 * posix.sgml: Move wcsftime to SUSv4 list.
1069 * include/cygwin/version.h: Bump API minor number.
1071 2009-03-06 Pierre A. Humblet <pierre@phumblet.no-ip.org>
1073 * cygwin.din: Export gethostbyname2.
1074 * net.cc: define _CYGWIN_IN_H and include resolv.h.
1075 (realloc_ent): New function.
1076 (dup_ent): Call realloc_ent.
1077 (memcpy4to6): New function.
1078 (dn_length1): New function.
1079 (gethostby_helper): New function.
1080 (gethostbyname2): New function.
1081 * posix.sgml: Add gethostbyname2.
1082 * include/cygwin/version.h: Bump API minor number.
1083 * libc/minires.c (get_options): Look for "inet6" and apply bounds
1084 to "retry" and "retrans".
1085 (res_ninit): Set the default options at the beginning.
1086 (dn_expand): Fix "off by one".
1088 2009-03-06 Corinna Vinschen <corinna@vinschen.de>
1090 * cygwin.din: Export wprintf, fwprintf, swprintf, vwprintf, vfwprintf,
1092 * posix.sgml: Move fwprintf, swprintf, vwprintf, vfwprintf, vswprintf
1093 to SUSv4 list. Sort SUSv4 list.
1094 * include/cygwin/version.h: Bump API minor number.
1096 2009-03-04 Corinna Vinschen <corinna@vinschen.de>
1098 * dcrt0.cc (disable_dep): Disable. Explain why.
1099 (dll_crt0_0): Disable calling disable_dep. Explain why.
1101 2009-03-03 Corinna Vinschen <corinna@vinschen.de>
1103 * net.cc: Include asm/byteorder.h.
1104 (htonl): Move to end of file. Add comment to explain why. Align
1105 definition to POSIX. Use related macro from asm/byteorder.h.
1109 * include/asm/byteorder.h: Revert previous patch.
1111 2009-03-03 Corinna Vinschen <corinna@vinschen.de>
1113 * include/asm/byteorder.h: Disable optimization when building
1114 Cygwin network code.
1116 2009-02-26 Christopher Faylor <me+cygwin@cgf.cx>
1118 * dtable.cc (dtable::select_read): Add ability to override fh.
1119 * fhandler.h (fhandler_fifo::select_read): Declare new function.
1120 (fhandler_fifo::select_write): Ditto.
1121 (fhandler_fifo::select_except): Ditto.
1122 * select.cc (peek_pipe): Treat certain classes of pipe errors as "no
1124 (fhandler_fifo::select_read): Define new function.
1125 (fhandler_fifo::select_write): Ditto.
1126 (fhandler_fifo::select_except): Ditto.
1128 * shared_info.h (CURR_SHARED_MAGIC): Update.
1130 2009-02-23 Sjors Gielen <mailinglist@dazjorz.com>
1132 * Makefile.in: Add DESTDIR functionality.
1134 2009-02-23 Corinna Vinschen <corinna@vinschen.de>
1136 * sec_auth.cc (get_user_local_groups): Simplify LookupAccountName code.
1138 2009-02-20 Corinna Vinschen <corinna@vinschen.de>
1140 * autoload.cc (NetLocalGroupEnum): Remove.
1141 (NetLocalGroupGetMembers): Remove.
1142 (NetUserGetLocalGroups): Add.
1143 * sec_auth.cc (is_group_member): Remove function.
1144 (get_user_local_groups): Get user as string instead of as SID.
1145 Call NetUserGetLocalGroups instead of NetLocalGroupEnum. Drop call
1147 (get_server_groups): Call get_user_local_groups with user name instead
1150 2009-02-19 Corinna Vinschen <corinna@vinschen.de>
1152 * winver.rc: Fix Copyright date.
1154 2009-02-19 Corinna Vinschen <corinna@vinschen.de>
1156 * cygwin.din: Export mbsnrtowcs and wcsnrtombs.
1157 * posix.sgml: Move mbsnrtowcs and wcsnrtombs to SUSv4 section.
1158 * include/cygwin/version.h: Bump API minor number.
1160 2009-02-18 Corinna Vinschen <corinna@vinschen.de>
1162 * cygwin.din: Export open_wmemstream.
1163 * posix.sgml: Move open_wmemstream to SUSv4 section.
1164 * include/cygwin/version.h: Bump API minor number.
1166 2009-02-16 Corinna Vinschen <corinna@vinschen.de>
1168 * cygwin.din: Export reallocf.
1169 * malloc_wrapper.cc( reallocf): New function.
1170 * posix.sgml: Add reallocf to BSD section.
1171 * include/cygwin/version.h: Bump API minor number.
1172 * libc/fts.c: Remove erroneous reallocf definition.
1174 2009-02-16 Corinna Vinschen <corinna@vinschen.de>
1176 * cygwin.din: Export wcstoimax, wcstoumax.
1177 * posix.sgml: Move wcstoimax and wcstoumax to SUSv4 section.
1178 * include/inttypes.h: Declare wcstoimax and wcstoumax.
1179 * include/cygwin/version.h: Bump API minor number.
1181 2009-02-13 Corinna Vinschen <corinna@vinschen.de>
1183 * cygwin.din: Export wcsnlen.
1184 * posix.sgml: Move wcsnlen to SUSv4 section.
1185 * include/cygwin/version.h: Bump API minor number.
1187 2009-02-13 Corinna Vinschen <corinna@vinschen.de>
1189 * environ.cc (_getenv_r): New function.
1191 2009-02-13 Corinna Vinschen <corinna@vinschen.de>
1193 * posix.sgml: Move dirfd to SUSv4 section.
1195 2009-02-13 Corinna Vinschen <corinna@vinschen.de>
1197 * posix.sgml: Move interfaces deprecated in SUSv4 to deprecated
1198 interfaces section. Move interfaces added in SUSv4 to SUSv4
1199 section or, if unimplemented, add them to the unimplemented interfaces
1202 2009-02-13 Corinna Vinschen <corinna@vinschen.de>
1204 * posix.sgml: Merge SUSv3 and SUSv4 section into a single SUSv4 section.
1205 Move Solaris calls now in SUSv4 to SUSv4 section. Rename unimplemented
1206 section to refer to SUSv4. Add note about missing interfaces.
1207 Move wcstod and wcstof from unimplemented to SUSv4 section.
1209 2009-02-13 Corinna Vinschen <corinna@vinschen.de>
1211 * mount.cc (mount_info::from_fstab_line): Make cygdrive posix=0 by
1212 default as documented.
1214 2009-02-13 Corinna Vinschen <corinna@vinschen.de>
1216 * cygwin.din: Export wcstod and wcstof.
1217 * include/cygwin/version.h: Bump API minor number.
1219 2009-02-11 Corinna Vinschen <corinna@vinschen.de>
1221 * syscalls.cc (open): Handle O_DIRECTORY flag.
1222 * include/fcntl.h: Add SUSv4 flags O_DIRECTORY, O_EXEC and O_SEARCH.
1223 * include/cygwin/version.h: Bump API minor number.
1225 2009-02-09 Corinna Vinschen <corinna@vinschen.de>
1227 * fhandler_floppy.cc (fhandler_dev_floppy::open): Fix format. Add
1228 code to allow to read disk and CD/DVD devices in full length. Explain
1230 (fhandler_dev_floppy::raw_read): Add current position to debug output.
1232 * include/sys/sched.h: New stub file to override newlib file with
1233 clashing definitions.
1235 2009-02-05 Corinna Vinschen <corinna@vinschen.de>
1237 * cygwin.din: Export wcstok.
1238 * posix.sgml: Move wcstok from unimplemented to susv3.
1239 * include/cygwin/version.h: Bump API minor number.
1241 2009-02-04 Corinna Vinschen <corinna@vinschen.de>
1243 * fhandler_proc.cc (proc_tab): Add entry for mounts symlink.
1244 (format_proc_mounts): New function to implement mounts symlink.
1245 * fhandler_process.cc (process_tab): Add entry for mounts file.
1246 (format_process_mounts): New function to implement mounts file.
1248 2009-02-04 Corinna Vinschen <corinna@vinschen.de>
1250 * security.cc (alloc_sd): Disable generating default permission entries
1253 2009-01-29 Corinna Vinschen <corinna@vinschen.de>
1255 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix inode number
1256 evaluation for faked "." entry.
1258 * mount.cc (fs_info::update): Move setting of is_cdrom after checking
1259 for caseinsensitivity. Recognize UDF in is_cdrom case and set
1260 caseinsensitive flag according to UDF brokenness determined by OS.
1261 Add comment to explain why.
1262 * mount.h (class fs_info): Add is_udf status flag.
1263 * path.cc (symlink_info::check): Add workaround for UDF bug in
1264 terms of casesensitivity on certain OSes.
1265 * wincap.h (wincaps::has_broken_udf): New element.
1266 * wincap.cc: Implement above element throughout.
1268 2009-01-27 Christopher Faylor <me+cygwin@cgf.cx>
1270 * fhandler.cc (fhandler_base::wait_overlapped): Set bytes to -1 on
1271 EINTR or real error.
1272 (fhandler_base::write_overlapped): Assume that bytes_written will
1273 contain proper error value.
1274 * pipe.cc (fhandler_pipe::fhandler_pipe): Set uninterruptible_io since
1275 signals are handled by pipe functions now.
1277 2009-01-26 Corinna Vinschen <corinna@vinschen.de>
1279 * shared.cc (shared_name): New function for WCHAR names.
1280 (open_shared): Take name parameter as WCHAR. Accommodate throughout.
1281 * shared_info.h ((CURR_SHARED_MAGIC): Redefine.
1282 (shared_name): Add declaration for function taking a WCHAR name.
1283 (open_shared): Change declaration according to above change.
1284 * pinfo.cc (pinfo::init) : Accommodate above change.
1286 2009-01-26 Corinna Vinschen <corinna@vinschen.de>
1288 * grp.cc (getgrgid_r): Simplify code by using stpcpy.
1289 (getgrnam_r): Ditto.
1290 * passwd.cc (getpwuid_r32): Simplify code by using stpcpy.
1291 (getpwnam_r): Ditto.
1293 2009-01-26 Corinna Vinschen <corinna@vinschen.de>
1295 * uinfo.cc (pwdgrp::load): Open file with FILE_OPEN_FOR_BACKUP_INTENT
1298 2009-01-24 Corinna Vinschen <corinna@vinschen.de>
1300 * mount.cc (mount_info::from_fstab): Open fstab file with
1301 FILE_OPEN_FOR_BACKUP_INTENT flag.
1303 2009-01-23 Corinna Vinschen <corinna@vinschen.de>
1305 * smallprint.cc (__small_vsprintf): Use already available buffer tmp
1308 2009-01-22 Christopher Faylor <me+cygwin@cgf.cx>
1310 * select.cc (peek_serial): Add hack to allow proper operation with
1313 2009-01-21 Corinna Vinschen <corinna@vinschen.de>
1315 Remove USE_SERVER define. Accommodate throughout.
1316 * configure.in: Remove --enable-server option.
1317 * configure: Regenerate.
1318 * environ.cc: Remove CYGWIN=server setting.
1320 2009-01-20 Corinna Vinschen <corinna@vinschen.de>
1322 * fhandler_procnet.cc: Reorganize global procnet content data into a
1323 new struct virt_tab_t. Accommodate throughout.
1325 * fhandler.h: Fix copyright dates.
1326 * fhandler_process.cc: Ditto.
1327 * fhandler_registry.cc: Ditto.
1329 2009-01-20 Corinna Vinschen <corinna@vinschen.de>
1331 * devices.h (FH_PROCESSFD): New device type.
1332 * dtable.cc (build_fh_pc): Add case for FH_PROCESSFD.
1333 * fhandler.h (class fhandler_virtual): Drop bufalloc member.
1334 * fhandler_virtual.h: New header.
1335 * fhandler_proc.cc: Remove types proc_type_t and proc_tab_t in favor
1336 of types virt_type_t and virt_tab_t from fhandler_virtual.h.
1337 Change prototypes of format_XXX functions accordingly.
1338 (proc_tab): Drop size member info.
1339 (fhandler_proc::fill_filebuf): Don't allocate filebuf here. Allocate
1340 it in the format_XXX functions.
1341 * fhandler_process.cc: Reorganize global process content data into a
1342 new struct virt_tab_t. Accommodate throughout.
1343 (format_process_winexename): New function.
1344 (format_process_winpid): New function.
1345 (format_process_exename): New function.
1346 (format_process_root): New function.
1347 (format_process_cwd): New function.
1348 (format_process_cmdline): New function.
1349 (format_process_ppid): New function.
1350 (format_process_uid): New function.
1351 (format_process_pgid): New function.
1352 (format_process_sid): New function.
1353 (format_process_gid): New function.
1354 (format_process_ctty): New function.
1355 (format_process_fd): New function.
1356 * fhandler_procnet.cc (fhandler_procnet::fill_filebuf): Don't use
1358 * fhandler_registry.cc (fhandler_registry::fill_filebuf): Define
1360 * fhandler_virtual.cc (fhandler_virtual::fhandler_virtual): Drop
1361 initialization of bufalloc.
1362 (fhandler_virtual::dup): Drop copying bufalloc.
1364 2009-01-20 Corinna Vinschen <corinna@vinschen.de>
1366 * thread.h (struct pthread_rwlock::RWLOCK_READER): Add counter n.
1367 * thread.cc (pthread_rwlock::rdlock): If a thread already owns a
1368 read lock, just count the number of locks for it, per SUSv4.
1369 (pthread_rwlock::tryrdlock): Ditto.
1370 (pthread_rwlock::unlock): If a thread has more than one concurrent
1371 read locks, just count down.
1373 2009-01-20 Corinna Vinschen <corinna@vinschen.de>
1375 * autoload.cc (WSAIoctl): Reintroduce.
1376 (WSASendMsg): Define.
1377 * fhandler.h (class fhandler_socket): Change definition of recv_internal
1378 and send_internal to take WSAMSG pointer as parameter.
1379 * fhandler_socket.cc (WSAID_WSARECVMSG): Define.
1380 (LPFN_WSARECVMSG): Define.
1381 (WSASendMsg): Declare.
1382 (get_ext_funcptr): New function to fetch address of WSARecvMsg.
1383 (fhandler_socket::recv_internal): Take just a LPWSAMSG parameter.
1384 Change code accordingly. If control information is requested,
1385 fetch address of WSARecvMsg and use that instead of WSARecvFrom.
1386 (fhandler_socket::recvfrom): Change return type to ssize_t as
1387 declared in fhandler.h. Accommodate changes to recv_internal.
1388 (fhandler_socket::recvmsg): Ditto. Make sure that control information
1389 is only requested if system, address family, and socket type support it.
1390 (fhandler_socket::send_internal): Take just a LPWSAMSG parameter
1391 and the flags. Change code accordingly. If control information is
1392 provided, use WSASendMsg instead of WSASendTo.
1393 (fhandler_socket::sendto): Drop useless comment. Accommodate changes
1395 (fhandler_socket::sendmsg): Ditto. Make sure that control information
1396 is only provided if system, address family, and socket type support it.
1397 * wincap.h (wincaps::has_recvmsg): New element.
1398 (wincaps::has_sendmsg): New element
1399 * wincap.cc: Implement above elements throughout.
1400 * include/cygwin/socket.h (CMSG_ALIGN): Phrase in terms of alignment
1401 of type struct cmsghdr.
1403 2009-01-17 Corinna Vinschen <corinna@vinschen.de>
1405 * mmap.cc (mmap64): Fix condition checking if anonymous mapping beyond
1408 2009-01-17 Corinna Vinschen <corinna@vinschen.de>
1410 * fhandler_proc.cc: Reorganize global proc content data into a new
1411 struct proc_tab_t. Accommodate throughout.
1412 (format_proc_version): New function.
1413 (format_proc_loadavg): New function.
1414 (format_proc_self): New function.
1416 * resource.cc (getrlimit): Return correct rlim_max value for
1419 2009-01-16 Corinna Vinschen <corinna@vinschen.de>
1421 * Fix copyright dates.
1423 2009-01-13 Corinna Vinschen <corinna@vinschen.de>
1425 * libc/getopt.c (parse_long_options): Use fix from NetBSD's getopt
1426 to avoid false ambiguities.
1428 2009-01-12 Corinna Vinschen <corinna@vinschen.de>
1430 * syscalls.cc (enum bin_status): New type.
1431 (try_to_bin): Return bin_status. Rename win32_path to pc. Rename h
1432 to fh. Rename fh to tmp_fh. Add code to set delete dispostion and
1433 more code to replace file moved to bin by another, temporary file.
1434 Add comments to explain why.
1435 (unlink_nt): Replace move_to_bin with bin_stat. Only set bin_stat
1436 to move_to_bin for non-remote files. As a last resort, call try_to_bin
1437 if setting delete-on-close failed. Only re-set R/O DOS attribute
1438 and only close handle if it's still valid.
1440 2009-01-11 Corinna Vinschen <corinna@vinschen.de>
1442 * errno.cc (errmap): Set errno to ENOENT instead of ENOSHARE throughout.
1443 * path.cc (path_conv::check): Set to and check for ENOENT instead of
1446 * path.cc (symlink_info::check): Fix Samba 3.2.x comment.
1448 2009-01-09 Corinna Vinschen <corinna@vinschen.de>
1450 * mount.cc (mount_info::from_fstab_line): Always convert drive
1451 letter in native path to uppercase.
1452 * path.cc (normalize_win32_path): Ditto.
1453 (path_prefix_p): Revert previous patch.
1455 * path.cc (symlink_info::check): Check for STATUS_INVALID_PARAMETER
1456 return code to circumvent weird behaviour of Samba 3.2.x shares.
1458 2009-01-09 Christopher Faylor <me+cygwin@cgf.cx>
1460 * include/sys/cygwin.h (CW_SETERRNO): Define.
1461 * external.cc (CW_SETERRNO): Implement.
1462 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 192 to
1463 reflect the above change.
1465 * path.cc (path_prefix_p): Treat X: as equivalent to x:.
1467 * mkglobals_h: Remove unneeded #define.
1469 * spawn.cc (spawn_guts): Avoid overly wordy initialization to zero.
1471 2009-01-08 Corinna Vinschen <corinna@vinschen.de>
1473 * libc/fts.c (fts_build): Use DT_DIR case on Cygwin.
1474 (fts_ufslinks): Fix using wrong structure member in Cygwin-specific
1477 2009-01-07 Corinna Vinschen <corinna@vinschen.de>
1479 * ntdll.h: Reorder NT status flags. Fix a case difference. Add
1480 STATUS_CANNOT_DELETE flag.
1481 * syscalls.cc (unlink_nt): Change initial NtOpenFile to request
1482 FILE_SHARE_DELETE sharing mode. Change comment accordingly.
1483 If setting delete disposition failed with STATUS_CANNOT_DELETE, try
1484 to delete using delete-on-close. Explain why.
1485 Rearrange setting R/O DOS attribute after trying to delete. Simplify
1488 2009-01-07 Corinna Vinschen <corinna@vinschen.de>
1490 * fhandler_disk_file.cc (fhandler_disk_file::link): Only add .exe if
1491 original file has .exe as well.
1492 * path.cc (path_conv::is_binary): Only recognize Windows 32 and 64 bit
1495 2009-01-02 Christopher Faylor <me+cygwin@cgf.cx>
1497 Remove unneeded header files from source files throughout.
1498 Update copyrights where appropriate.
1500 * globals.cc: New file for generic global variables.
1501 * mkglobals_h: New script to generate globals.h.
1502 * mkstatic: New script used to build a (currently non-working) static
1504 * Makefile.in: Add unused rule to build a non-working libcygwin_s.a.
1505 (DLL_OFILES): Add globals.o. Make all objects rely on globals.h.
1506 (globals.h): New target. Generate globals.h.
1507 * cygtls.h: Honor new CYGTLS_HANDLE define to control when the HANDLE
1508 operator is allowed in _cygtls.
1509 * dcrt0.cc: Move most globals to globals.cc.
1511 * environ.cc (strip_title_path): Remove now-unneeded extern.
1512 * fhandler_serial.cc (fhandler_serial::open): Ditto.
1514 (commune_process): Ditto.
1518 * exceptions.cc: Define CYGTLS_HANDLE before including winsup.h.
1519 * path.cc (stat_suffixes): Move here.
1520 * security.h: Add forward class path_conv declaration.
1521 * smallprint.cc (__small_vsprintf): Make a true c++ function.
1522 (__small_sprintf): Ditto.
1523 (small_printf): Ditto.
1524 (console_printf): Ditto.
1525 (__small_vswprintf): Ditto.
1526 (__small_swprintf): Ditto.
1527 * spawn.cc (spawn_guts): Remove _stdcall decoration in favor of
1529 (hExeced): Move to globals.cc
1530 * strfuncs.cc (current_codepage): Ditto.
1531 (active_codepage): Ditto.
1532 * sync.cc (lock_process::locker): Move here from dcrt0.cc.
1533 * syscalls.cc (stat_suffixes): Move to path.cc.
1534 * tty.cc (tty::create_master): Uncapitalize fatal warning for
1536 * winsup.h: Include globals.h to declare most of the grab bag list of
1537 globals which were previously defined here.
1539 * mount.h: Move USER_* defines back to shared_info.h.
1541 * speclib: Force temporary directory cleanup.
1543 2009-01-02 Christopher Faylor <me+cygwin@cgf.cx>
1545 * speclib: Rewrite completely in perl. Avoid multiple nm calls.