1 2007-02-23 Corinna Vinschen <corinna@vinschen.de>
3 * fhandler.cc (fhandler_base::lseek): Drop 9x considerations.
4 * fhandler_disk_file.cc (fhandler_disk_file::lock): Ditto.
5 * wincap.cc: Remove lock_file_highword and has_64bit_file_access
9 2007-02-22 Corinna Vinschen <corinna@vinschen.de>
11 * cygheap.h (struct cwdstuff): Remove sync member and keep_in_sync
13 * external.cc (cygwin_internal): Drop call to cygheap->cwd.keep_in_sync.
14 * fhandler_disk_file.cc (fhandler_disk_file::link): Always presume
15 ability to create hard links.
16 * path.cc (cwdstuff::init): Drop 9x considerations.
17 (cwdstuff::keep_in_sync): Remove.
18 (cwdstuff::set): Take NT for granted.
19 * pinfo.h (cygwin_pid): Just return pid.
20 * wincap.cc: Remove has_hard_links, can_open_directories,
21 has_negative_pids, has_named_pipes, has_try_enter_critical_section,
22 cant_debug_dll_entry and detect_win16_exe throughout.
25 2007-02-22 Corinna Vinschen <corinna@vinschen.de>
27 * fhandler_console.cc (fhandler_console::read): Drop 9x specific
28 handling of AltGr key.
29 * mmap.cc: Take NT for granted throughout.
30 * wincap.cc: Remove map_view_of_file_ex_sucks, altgr_is_ctrl_alt,
31 has_working_copy_on_write, share_mmaps_only_by_name,
32 virtual_protect_works_on_shared_pages, has_mmap_alignment_bug and
33 has_working_virtual_lock throughout.
36 2007-02-22 Corinna Vinschen <corinna@vinschen.de>
38 * fhandler.cc (fhandler_base::set_no_inheritance): Always use
40 * fhandler_disk_file.cc (fhandler_disk_file::lock): Always use
41 UnlockFileEx/LockFileEx functions.
42 * net.cc (fdsock): Don't bother to duplicate socket for inheritance.
43 * sysconf.cc (get_nproc_values): Take NT for granted.
45 * syslog.cc (WIN95_EVENT_LOG_PATH): Remove define.
46 (get_win95_event_log_path): Remove.
47 (vsyslog): Fix formatting. Take NT for granted.
48 * wincap.cc: Remove has_lock_file_ex, has_signal_object_and_wait,
49 has_eventlog, has_set_handle_information,
50 has_set_handle_information_on_console_handles and supports_smp
54 2007-02-22 Corinna Vinschen <corinna@vinschen.de>
56 * dir.cc (rmdir): Move existance check in front of
57 has_dot_last_component check. Simplify setting errno in latter case.
59 2007-02-22 Corinna Vinschen <corinna@vinschen.de>
61 * fhandler.cc (fhandler_base::write): Remove wincap.has_lseek_bug case.
62 Simplify seek beyond EOF case.
63 * times.cc (times): Remove wincap.has_get_process_times case.
64 * wincap.cc: Remove has_delete_on_close, has_page_guard,
65 has_get_process_times and has_lseek_bug throughout.
68 2007-02-22 Corinna Vinschen <corinna@vinschen.de>
70 Throughout remove all usage of wincap.access_denied_on_delete.
71 * dir.cc (rmdir): Add existance check to be errno-compatible with Linux.
72 * fhandler_disk_file.cc (fhandler_disk_file::rmdir): Drop test for
73 non-existent dir on 9x share.
74 * syscalls.cc (unlink): Add comment.
75 * wincap.cc: Remove access_denied_on_delete flag throughout.
78 2007-02-22 Corinna Vinschen <corinna@vinschen.de>
80 * fhandler_disk_file.cc (fhandler_disk_file::closedir): Fix bug
81 introduced by switching to NtClose.
83 2007-02-22 Christopher Faylor <me@cgf.cx>
85 * dcrt0.cc (child_info_fork::alloc_stack_hard_way): Change sense of
86 guard test. Increase size of stack reserved and increase size before
87 the current stack pointer. Use pointers when doing arithmetic.
88 (dll_crt0_1): Initialize exception handler when we notice we're the
89 child of a fork from non-main thread.
90 * fork.cc (frok::parent): Make argument volatile.
92 (lock_signals): New class.
93 (lock_pthread): Ditto.
94 (hold_everhthing): Ditto.
95 (frok::parent): Move atforkprepare and atforkparent to lock_pthread
97 (fork): Make ischild boolean. Use hold_everything variable within
98 limited scope to set various mutexes in such a way as to avoid
100 * thread.h (pthread_mutex::tid): New variable, active when debugging
101 for tracking thread id of owner.
102 (pthread_mutex::set_owner): Set tid when debugging.
103 * thread.cc (pthread_mutex::pthread_mutex): Clear tid.
104 (pthread_mutex::_unlock): Ditto when unlocking.
105 (pthread_mutex::fixup_after_fork): Set tid to special value after
106 forking since owner is unknown.
108 2007-02-22 Corinna Vinschen <corinna@vinschen.de>
110 Throughout replace all usage of wincap.shared with the constant
111 FILE_SHARE_VALID_FLAGS.
112 * fhandler.cc (fhandler_base::open_9x): Drop local variable shared.
113 * wincap.cc: Remove shared member throughout.
116 2007-02-22 Corinna Vinschen <corinna@vinschen.de>
118 * Makefile.in (DLL_IMPORTS): Add libntdll.a.
119 * autoload.cc: Remove all symbols from advapi32.dll, kernel32.dll and
120 ntdll.dll available on all platforms since NT4.
122 Throughout remove all usage of wincap.is_winnt.
123 * dcrt0.cc (dll_crt0_0): Remove call to mmap_init.
124 * fhandler.h (class fhandler_base): Remove has_changed flag.
125 (fhandler_disk_file::touch_ctime): Remove declaration.
126 (fhandler_disk_file::readdir_9x): Ditto.
127 (fhandler_disk_file::touch_ctime): Remove.
128 (fhandler_disk_file::readdir_9x): Remove.
129 (fhandler_disk_file::closedir): Call NtClose instead of CloseHandle.
130 * mmap.cc: Throughout call CreateMapping and MapView directly.
131 (VirtualProt9x): Remove.
132 (VirtualProtNT): Remove.
133 (VirtualProtEx9x): Remove.
134 (VirtualProtExNT): Remove.
135 (VirtualProtect): Remove define.
136 (VirtualProtectEx): Remove define.
137 (CreateMapping9x): Remove.
138 (CreateMappingNT): Rename to CreateMapping.
140 (MapViewNT): Rename to MapView.
141 (struct mmap_func_t): Remove definition.
142 (mmap_funcs_9x): Remove.
143 (mmap_funcs_nt): Remove.
146 * net.cc (getdomainname): Drop comment. Use NT4 registry key only.
147 (get_95_ifconf): Remove.
148 * pinfo.cc (winpids::enumNT): Rename to winpids::enum_processes.
149 (winpids::enum9x): Remove.
150 (winpids::set): Just call enum_processes directly.
151 (winpids::enum_init): Ditto.
152 * pinfo.h (class winpids): Drop enum_processes pointer. Rename
153 enumNT to enum_processes. Drop enum9x declaration. Drop initialization
154 of enum_processes throughout.
155 * registry.cc (get_registry_hive_path): Just create NT key.
156 (load_registry_hive): Only load NT specific file.
157 * syscalls.cc (unlink_9x): Remove.
158 (unlink): Just call unlink_nt.
159 * wincap.cc: Remove is_winnt flag throughout.
161 * winsup.h: Remove mmap_init declaration.
163 2007-02-21 Corinna Vinschen <corinna@vinschen.de>
165 * wincap.cc (wincap_unknown): Change settings for unknown to reflect
166 the capabilities of NT4.
168 (wincap_95osr2): Remove.
170 (wincap_98se): Remove.
172 (wincap_nt3): Remove.
173 (wincapc::init): Temporarily bail out on any 9x system.
175 2007-02-20 Corinna Vinschen <corinna@vinschen.de>
177 * cygwin.din (sem_unlink): Export.
178 * posix_ipc.cc: Include thread.h and semaphore.h. Remove TODO
180 (ipc_names): Add max_len member. Set to maximum length of the path
181 before tacking on the prefix path. Set prefix path for named semaphors
182 to /dev/shm, as on Linux.
183 (enum ipc_type_t): Change sem to semaphore to avoid name conflicts.
184 (check_path): Detect empty paths. Use ipc_names's max_len member.
185 Use __small_sprintf to create full object path name. Special case
187 (ipc_cond_init): Drop superfluous strcpy.
188 (class ipc_flock): New class to simplify file locking in subsequent
190 (struct mq_hdr): Raise size of mqh_uname to allow adding a unique
192 (mq_open): Fix formatting. Create unique synchronization object names
193 using AllocateLocallyUniqueId.
194 (struct sem_finfo): New structure defining named semaphore file content.
195 (sem_open): Move here. Rework implementation to allow kernel
196 persistent implementation of POSIX named semaphores.
197 (_sem_close): Implement sem_close.
198 (sem_close): Move here. Just call _sem_close with do_close parameter
200 (sem_unlink): New function.
201 * pthread.cc (mangle_sem_name): Remove.
202 (sem_open): Move to posix_ipc.cc.
204 * syscalls.cc (close_all_files): Call semaphore::terminate here.
205 * thread.cc: Fix formatting. Rearrange semaphore functions so that
206 they are close together.
207 (semaphore::semaphore): Rework to play nicely with new named semaphore
209 (semaphore::_terminate): Call _sem_close if semaphore is a named
211 (semaphore::destroy): Don't destroy named semaphores. Return EINVAL
213 (semaphore::close): Only destroy named semaphores. Return EINVAL
215 (semaphore::open): Rework to play nicely with new named semaphore
216 implementation. Loop through existing semaphores to be able to
217 return same sem_t pointer as a former call on the same named semaphore.
218 (semaphore::getinternal): New function called from _sem_close.
219 * thread.h (class List): Make mx and head public.
220 (class semaphore): Fix formatting. Align method declarations with
221 implementation in thread.cc. Add members used for named semaphores.
222 (semaphore::terminate): New static method.
223 * include/semaphore.h: Redefine SEM_FAILED. Fix formatting.
224 (sem_unlink): Add declaration.
225 * include/cygwin/version.h: Bump API minor number.
227 2007-02-20 Christopher Faylor <me@cgf.cx>
229 * exceptions.cc (_cygtls::signal_exit): Only call myself.exit when when
230 exit_state indicates that we've visited do_exit.
231 * sync.h (lock_process::lock_process): Use renamed exit_state -
233 * winsup.h: Rename ES_MUTO_SET to ES_PROCESS_LOCKED.
235 2007-02-20 Corinna Vinschen <corinna@vinschen.de>
237 * fhandler_socket.cc (fhandler_socket::bind): Remove printing wrong
238 errno in debug output.
240 2007-02-19 Christopher Faylor <me@cgf.cx>
242 Remove extraneous whitespace.
243 * pinfo.cc (commune_process): Use default argument to lock_process.
244 * sigproc.cc: Update copyright.
247 2007-02-15 Corinna Vinschen <corinna@vinschen.de>
249 * posix_ipc.cc (mq_open): Avoid compiler warning. Initialize mqhdr
250 before using it in file exists case.
251 * include/mqueue.h (mqd_t): Make non-pointer type.
253 2007-02-15 Corinna Vinschen <corinna@vinschen.de>
255 * posix_ipc.cc (ipc_mutex_init): Create global object name.
256 (ipc_cond_init): Ditto.
257 (struct mq_hdr): Add mqh_uname member to store synchronization object
259 (mq_open): Create unique synchronization object name and store in
260 mq_hdr->mqh_uname. Use this name in calls to ipc_mutex_init and
263 2007-02-14 Corinna Vinschen <corinna@vinschen.de>
265 * Makefile.in (DLL_OFILES): Add posix_ipc.o.
266 * cygwin.din (mq_close): Export.
267 (mq_getattr): Export.
270 (mq_receive): Export.
272 (mq_setattr): Export.
273 (mq_timedreceive): Export.
274 (mq_timedsend): Export.
276 * posix_ipc.cc: New file implementing the above functions. Move
277 shm_open and shm_unlink from syscalls.cc here.
278 * sysconf.cc (sca): Set value of _SC_MQ_OPEN_MAX to MQ_OPEN_MAX,
279 _SC_MQ_PRIO_MAX to MQ_PRIO_MAX, _SC_MESSAGE_PASSING to
280 _POSIX_MESSAGE_PASSING.
281 * include/limits.h (MQ_OPEN_MAX): Define.
282 (MQ_PRIO_MAX): Define.
283 * include/mqueue.h: New file.
284 * include/cygwin/version.h: Bump API minor number.
286 2007-02-13 Corinna Vinschen <corinna@vinschen.de>
288 * include/cygwin/stdlib.h (valloc): Declare.
291 2007-02-09 Pierre A. Humblet <Pierre.Humblet@ieee.org>
293 * libc/minires-os-if.c (write_record): Handle DNS_TYPE_SRV and
296 2007-02-08 Corinna Vinschen <corinna@vinschen.de>
298 * syscalls.cc (check_shm): New static function to do path checking
299 common to shm_open and shm_unlink. Check for /dev/shm existance.
300 (shm_open): Call check_shm.
303 2007-02-08 Corinna Vinschen <corinna@vinschen.de>
305 * cygwin.din (shm_open): Export.
306 (shm_unlink): Export.
307 * syscalls.cc (shm_open): New function.
308 (shm_unlink): New function.
309 * sysconf.cc (sca): Set value of _SC_SHARED_MEMORY_OBJECTS to
310 _POSIX_SHARED_MEMORY_OBJECTS.
311 * include/cygwin/version.h: Bump API minor number.
312 * include/sys/mman.h (shm_open): Add prototype.
315 2007-02-08 Christopher Faylor <me@cgf.cx>
316 Corinna Vinschen <corinna@vinschen.de>
318 * cygmalloc.h (__set_ENOMEM): Declare.
319 (MALLOC_FAILURE_ACTION): Call __set_ENOMEM.
320 * malloc_wrapper.cc (malloc) Remove setting errno here.
325 (posix_memalign): Save and restore errno.
327 2007-02-07 Corinna Vinschen <corinna@vinschen.de>
329 * cygmalloc.h (MALLOC_FAILURE_ACTION): Move to correct #if branch.
331 2007-02-07 Corinna Vinschen <corinna@vinschen.de>
333 * cygmalloc.h (MALLOC_FAILURE_ACTION): Define empty.
334 * cygwin.din (posix_madvise): Export.
335 (posix_memalign): Export.
336 * fhandler.cc (fhandler_base::fpathconf): Return useful values in
337 _PC_VDISABLE, _PC_SYNC_IO and _PC_SYMLINK_MAX cases.
338 * malloc_wrapper.cc (malloc): Set errno here since it's not set in
344 (posix_memalign): New function.
345 * mmap.cc (posix_madvise): New function.
346 * sysconf.cc (get_open_max): New function.
347 (get_page_size): Ditto.
348 (get_nproc_values): Ditto.
351 (sca): New array to map _SC_xxx options to sysconf return values.
352 (sysconf): Reimplement using sca array.
353 * include/limits.h: Add all missing values as defined by SUSv3.
354 * include/pthread.h (PTHREAD_DESTRUCTOR_ITERATIONS): Move definition
356 (PTHREAD_KEYS_MAX): Ditto.
357 * include/semaphore.h (SEM_VALUE_MAX): Ditto.
358 * include/cygwin/stdlib.h (posix_memalign): Declare.
359 * include/cygwin/version.h: Bump API minor number.
360 * include/sys/mman.h: Add posix_madvise flags.
361 (posix_madvise): Declare.
362 * include/sys/termios.h (_POSIX_VDISABLE): Move definition to
365 2007-02-05 Corinna Vinschen <corinna@vinschen.de>
367 * fhandler_serial.cc (fhandler_serial::tcsetattr): Add support for
368 baud rates up to 3000000 baud. Add missing 128K and 256K cases.
369 (fhandler_serial::tcgetattr): Ditto.
370 * include/sys/termios.h: Add baud rate definitions from B460800 up to
373 2007-02-02 Corinna Vinschen <corinna@vinschen.de>
375 * syscalls.cc (unlink_nt): Add missing assignment in case NtClose fails.
377 2007-02-01 Corinna Vinschen <corinna@vinschen.de>
379 * net.cc (ga_dup): New function, taken from ga_clone with v4-in-v6
381 (ga_clone): Just call ga_dup from here.
382 (ga_duplist): New function to duplicate list of struct addrinfo.
383 (ga_echeck): Don't check ai_flags, it already happened in
385 (cygwin_freeaddrinfo): Always call ipv4_freeaddrinfo.
386 (cygwin_getaddrinfo): Use new wincap.supports_all_posix_ai_flags
387 flag rather than wincap.has_gaa_on_link_prefix. Always duplicate
388 WinSock's addrinfo list to a self-allocated list. Handle AI_V4MAPPED
389 for pre-Vista platforms supporting getaddrinfo.
390 * wincap.h (wincapc::supports_all_posix_ai_flags): New element.
391 * wincap.cc: Implement above element throughout.
392 * include/netdb.h: Note how AI_ADDRCONFIG is not supported pre-Vista.
393 Remove superfluous comment.
395 2007-02-01 Corinna Vinschen <corinna@vinschen.de>
397 * include/cygwin/socket.h: Add IPv6 socket options.
399 2007-01-31 Corinna Vinschen <corinna@vinschen.de>
401 * net.cc (cygwin_getaddrinfo): Fix thinko in AI_ADDRCONFIG handling.
403 2007-01-31 Corinna Vinschen <corinna@vinschen.de>
405 * net.cc (cygwin_getaddrinfo): Check ai_flags for valid values.
406 Handle AI_NUMERICSERV. Handle AI_ADDRCONFIG behaviour on Vista.
407 * include/netdb.h (AI_NUMERICSERV): Add missing flag.
409 2007-01-30 Corinna Vinschen <corinna@vinschen.de>
411 * fhandler_disk_file.cc (fhandler_disk_file::closedir): Add dir name
413 * syscalls.cc (try_to_bin): Enable code to move file to user specific
414 recycler dir to eliminate Vista problem.
415 (unlink_nt): Add comment that rename after opening for delete on close
418 2007-01-30 Corinna Vinschen <corinna@vinschen.de>
420 * sigproc.cc (child_info::child_info): Set msv_count to non-zero
421 value only on systems requiring it.
423 2007-01-28 Corinna Vinschen <corinna@vinschen.de>
425 * include/ftw.h: Include sys/cdefs.h.
427 2007-01-26 Corinna Vinschen <corinna@vinschen.de>
429 * fhandler_disk_file.cc (fhandler_disk_file::rmdir): Implement rmdir
430 on NT by calling unlink_nt. Check for directory here.
431 * syscalls.cc (try_to_bin): Fix buggy debug_printf statement.
432 (unlink_nt): Make non-static. Don't use delete-on-close semantics on
433 directories. Explain why.
435 2007-01-24 Corinna Vinschen <corinna@vinschen.de>
437 * net.cc (if_nametoindex): This time, really free IP_ADAPTER_ADDRESSES
439 (if_indextoname): Ditto.
441 2007-01-24 Corinna Vinschen <corinna@vinschen.de>
443 * security.h (pop_thread_privilege): Revert to previous state, not
444 to token used for impersonation.
446 2007-01-24 Corinna Vinschen <corinna@vinschen.de>
448 * cygheap.h (cygheap_user::deimpersonate): Always RevertToSelf.
450 2007-01-23 Corinna Vinschen <corinna@vinschen.de>
452 * net.cc (gai_errmap): Add EAI_OVERFLOW entry. Fix formatting.
453 (cygwin_gai_strerror): Drop using EAI_MAX.
454 (w32_to_gai_err): Ditto.
455 * include/netdb.h: Define EAI_OVERFLOW. Remove EAI_MAX.
457 2007-01-23 Corinna Vinschen <corinna@vinschen.de>
459 * include/netdb.h: Add AI_xxx flags available since Vista.
461 2007-01-23 Corinna Vinschen <corinna@vinschen.de>
463 * net.cc (if_nametoindex): Free IP_ADAPTER_ADDRESSES memory.
464 (if_indextoname): Ditto.
465 (if_nameindex): Ditto. Remove duplicate indexed entries in result.
467 2007-01-21 Corinna Vinschen <corinna@vinschen.de>
469 * autoload.cc (WSAIoctl): Define.
471 * cygwin.din: Export if_freenameindex, if_indextoname, if_nameindex and
473 * fhandler_procnet.cc: Drop including wchar.h. Drop definitions of
474 GAA_FLAG_INCLUDE_ALL_INTERFACES, IP_ADAPTER_UNICAST_ADDRESS_VISTA.
475 (fhandler_procnet::exists): Check for has_gaa_prefixes. Call
476 get_adapters_addresses here.
477 (fhandler_procnet::readdir): Ditto.
478 (prefix): Move to net.cc.
479 (fhandler_procnet::fill_filebuf): Call get_adapters_addresses here.
480 Simplify allocation. Use AdapterName rather than FriendlyName as
481 interface name. Use IfIndex if available, Ipv6IfIndex otherwise.
482 (in6_are_prefix_equal): Move to net.cc.
483 * fhandler_socket.cc: Define old SIOCGxxx values.
484 (CONV_OLD_TO_NEW_SIO): Convert old SIOCGxxx value to new one.
485 (struct __old_ifreq): Define old struct ifreq.
486 (fhandler_socket::ioctl): Handle old SIOCGxxx values. Handle new
487 SIOCGIFFRNDLYNAM command. Simplify copying ifreq data to user space.
488 Call get_ifconf with additional SOCKET parameter.
489 * net.cc (IP_ADAPTER_UNICAST_ADDRESS_LH): Define.
490 (IP_ADAPTER_ADDRESSES_LH): Define.
491 (SIO_GET_INTERFACE_LIST): Define.
492 (sockaddr_in6_old): Define.
493 (sockaddr_gen): Define.
494 (INTERFACE_INFO): Define.
495 (IN_LOOPBACK): Define.
496 (in_are_prefix_equal): New static function.
497 (ip_addr_prefix): New function, replaces prefix function, add AF_INET
499 (GAA_FLAG_INCLUDE_ALL_INTERFACES): Define.
500 (get_adapters_addresses): New function.
501 (WS_IFF_xxx): Define Winsock interface flag values.
502 (convert_ifr_flags): New function to convert Winsock interface flag
503 values to Cygwin interface flag values.
504 (get_xp_ifconf): New get_ifconf implementation for XP SP1 and above.
505 (get_2k_ifconf): Fix interface index. Fix formatting.
506 (get_nt_ifconf): Fix formatting.
507 (get_95_ifconf): Ditto.
508 (get_ifconf): Take additional SOCKET parameter. Call get_xp_ifconf
510 (if_nametoindex): New function.
511 (if_indextoname): New function.
512 (if_nameindex): New function.
513 (if_freenameindex): New function.
514 (in6_are_prefix_equal): Moved here from fhandler_procnet.cc.
515 * wincap.cc (wincap_xp): Define has_gaa_prefixes as true by default.
516 (wincapc::init): Assume has_osversioninfoex by default. Call
517 GetVersionEx with OSVERSIONINFOEX first. Call with OSVERSIONINFO only
518 if that fails. Simplify NT4 case and try to avoid strcmp. Check XP
519 Service Pack using version.wServicePackMajor to avoid strcmp.
520 * include/asm/socket.h (SIOCGIFFRNDLYNAM): Define.
521 * include/cygwin/if.h: Fix formatting.
522 (IFF_POINTTOPOINT): Define.
524 (IFF_LOWER_UP): Define.
525 (IFF_DORMANT): Define.
526 (struct if_nameindex): Define.
527 (IFRF_FRIENDLYNAMESIZ): Define.
528 (struct ifreq_frndlyname): Define.
529 (IFNAMSIZ): Redefine as 44.
530 (IF_NAMESIZE): Define.
531 (struct ifreq): Redefine ifru_flags as int. Define ifru_data. Pad size
532 to sizeof sockaddr_in6 for further extensions.
534 (ifr_frndlyname): Define.
535 (if_nametoindex): Declare.
536 (if_indextoname): Declare.
537 (if_nameindex): Declare.
538 (if_freenameindex): Declare.
539 * include/cygwin/version.h: Bump API minor number.
540 (CYGWIN_VERSION_CHECK_FOR_OLD_IFREQ): Define check for old vs. new
543 2007-01-18 Corinna Vinschen <corinna@vinschen.de>
545 * spawn.cc (spawn_guts): Don't set cwd for non-Cygwin child processes
546 on NT to allow starting them in virtual directories.
548 2007-01-18 Corinna Vinschen <corinna@vinschen.de>
550 * mmap.cc (list::hash): Fix type to __ino64_t.
551 (list::get_hash): Ditto.
552 (list::set): Add struct stat parameter. Use that instead of calling
554 (map::get_list_by_fd): Ditto.
555 (map::add_list): Ditto.
556 (mmap_is_attached_or_noreserve): Call get_list_by_fd appropriately.
557 (mmap_worker): Add pameters for map list and file stat information.
558 Propagate to called functions.
559 (mmap64): Use fstat on files early. Replace call to GetFileSize.
560 Call get_list_by_fd and mmap_worker appropriately.
562 2007-01-18 Corinna Vinschen <corinna@vinschen.de>
564 * fhandler_procnet.cc: Drop declaration of htonl and ntohs. Include
565 asm/byteorder.h instead.
567 2007-01-18 Corinna Vinschen <corinna@vinschen.de>
569 * include/cygwin/in6.h: Drop inclusion of asm/byteorder.h.
570 * fhandler_procnet.cc: Declare htonl and ntohs here.
572 2007-01-17 Corinna Vinschen <corinna@vinschen.de>
574 * Makefile.in (DLL_OFILES): Add fhandler_procnet.o.
575 * autoload.cc (GetAdaptersAddresses): Define.
576 * devices.h (FH_PROCNET): Define new device.
577 * devices.in (dev_procnet_storage): Add "/proc/net" entry.
578 * devices.cc: Regenerate.
579 * dir.cc (readdir_worker): Use isproc_dev macro.
580 * dtable.cc (build_fh_pc): Add FH_PROCNET.
581 * fhandler.h (class fhandler_procnet): New class.
582 * fhandler_proc.cc: Add "net" subdirectory handling.
583 * fhandler_procnet.cc: New file handling "/proc/net" directory.
584 * path.cc (isvirtual_dev): Move to path.h.
585 * path.h (isproc_dev): New macro to identify /proc files by device.
586 (isvirtual_dev): Moved here. Define using isproc_dev.
587 * syscalls.cc (unlink): Use isproc_dev macro.
588 * wincap.h (wincapc::has_gaa_prefixes): New element.
589 (wincapc::has_gaa_on_link_prefix): New element.
590 * wincap.cc: Implement above elements throughout.
591 (wincapc::init): Check XP for service pack and set has_gaa_prefixes
593 * include/cygwin/in6.h: Include asm/byteorder.h.
595 2007-01-17 Corinna Vinschen <corinna@vinschen.de>
597 * include/asm/socket.h (SIOGIFINDEX): Define.
599 2007-01-17 Corinna Vinschen <corinna@vinschen.de>
601 * mmap.cc (MapView9x): Note possible uselessness of retrying.
603 (mmap64): Fix pre-reservation to work for non NULL, non MAP_FIXED.
605 2007-01-16 Corinna Vinschen <corinna@vinschen.de>
607 * autoload.cc (RtlAnsiStringToUnicodeString): Define.
608 (RtlOemStringToUnicodeString): Define.
609 * ntdll.h (struct _RTL_USER_PROCESS_PARAMETERS): Define.
610 (struct _PEB): Redefine with a bit of content.
611 (RtlAnsiStringToUnicodeString): Declare.
612 (RtlOemStringToUnicodeString): Declare.
613 * path.cc: Include ntdll.h.
614 (_upp): New global variable pointing to user process parameter block.
615 (get_user_proc_parms): New static function to retrieve user process
617 (close_user_proc_parms_cwd_handle): New function to close handle to
618 current working directory in user process parameter block.
619 (cwdstuff::init): Drop redundant declaration of dynamically_loaded.
620 Set current dir only on 9x. Call close_user_proc_parms_cwd_handle
622 (cwdstuff::keep_in_sync): Only on 9x.
623 (cwdstuff::set): Keep behaviour on 9x. On NT write cwd path into user
624 process parameter block and set cwd handle to NULL. Fix comments to
625 reflect new behaviour.
627 2007-01-16 Corinna Vinschen <corinna@vinschen.de>
629 * fhandler_socket.cc (fhandler_socket::ioctl): Handle SIOCGIFINDEX.
630 * net.cc (get_2k_ifconf): Ditto.
631 (get_nt_ifconf): Fake SIOCGIFINDEX.
632 (get_95_ifconf): Ditto.
633 (get_ifconf): Handle SIOCGIFINDEX. Fake it for loopback on systems
634 not supporting IP Helper Lib.
635 * include/asm/socket.h (SIOCGIFINDEX): Define.
636 * include/cygwin/if.h (struct ifreq): Add member for interface index.
637 (ifr_ifindex): Define.
639 2007-01-16 Corinna Vinschen <corinna@vinschen.de>
641 * include/cygwin/in6.h (struct ipv6_mreq): Change type of interface
643 (struct in6_pktinfo): Ditto.
645 2007-01-16 Corinna Vinschen <corinna@vinschen.de>
647 * include/cygwin/in.h (struct ip_mreq_source): Define.
648 (struct ip_msfilter): Define.
649 (IP_MSFILTER_SIZE): Define.
650 (struct in_pktinfo): Define.
651 (struct group_req): Define.
652 (struct group_source_req): Define.
653 (struct group_filter): Define.
654 (GROUP_FILTER_SIZE): Define.
655 (INADDR_ALLRTRS_GROUP): Define.
656 * include/cygwin/socket.h: Define protocol agnostic multicast options.
658 2007-01-15 Corinna Vinschen <corinna@vinschen.de>
660 * CYGWIN_LICENSE: Fix web pages and contact information.
662 2007-01-15 Corinna Vinschen <corinna@vinschen.de>
664 * ntdll.h: Adjust status definitions.
666 2007-01-15 Corinna Vinschen <corinna@vinschen.de>
668 * cygheap.cc (cygheap_init): Add TODO comment.
670 2007-01-15 Corinna Vinschen <corinna@vinschen.de>
672 * ntdll.h (STATUS_SHARING_VIOLATION): Define.
674 2007-01-13 Corinna Vinschen <corinna@vinschen.de>
676 * syscalls.cc (unlink_nt): Don't move files to recycle bin which are
679 2007-01-13 Christopher Faylor <me@cgf.cx>
681 * glob.cc: Update copyright notice with latest from FreeBSD.
682 (glob0): Use correct type for c variable to propagate previously
685 2007-01-12 Corinna Vinschen <corinna@vinschen.de>
687 * cygheap.cc (_csbrk): Fix off-by-one error.
688 * cygwin.sc: Give .cygheap a minimum size of 512K.
690 2007-01-12 Christopher Faylor <me@cgf.cx>
692 * external.cc (sync_winenv): Use cur_environ () rather than
695 2007-01-12 Corinna Vinschen <corinna@vinschen.de>
697 * fork.cc (child_copy): Add missing Windows PID in debug output.
699 2007-01-12 Corinna Vinschen <corinna@vinschen.de>
701 * syscalls.cc: Update copyright.
703 2007-01-10 Corinna Vinschen <corinna@vinschen.de>
705 * mmap.cc (mmap64): Pre-Reserve space for the whole mapping to get a
706 useful, valid address before the actual mappings take place.
709 2007-01-10 Corinna Vinschen <corinna@vinschen.de>
711 * syscalls.cc (sync): Use b_drive for B: drive (Thanks to Howard Chu).
713 2007-01-09 Corinna Vinschen <corinna@vinschen.de>
715 * syscalls.cc (getpagesize): Change condition for clarity.
716 (getsystempagesize): Ditto.
718 2007-01-09 Corinna Vinschen <corinna@vinschen.de>
720 * mmap.cc: Do bookkeeping in 4K pages, rather than in 64K chunks.
722 2007-01-07 Corinna Vinschen <corinna@vinschen.de>
724 * security.h (setacl): Add parameter for writability flag.
725 * sec_acl.cc (setacl): Ditto. Set to true if any ACE with write
726 permissions is created.
727 * fhandler_disk_file.cc (fhandler_disk_file::facl): Reset
728 FILE_ATTRIBUTE_READONLY if ACL contains an ACE with write permissions.
730 2007-01-05 Corinna Vinschen <corinna@vinschen.de>
732 * include/strings.h: Don't include string.h. Only declare functions
735 2007-01-04 Corinna Vinschen <corinna@vinschen.de>
737 (get_ifconf): Set MTU for loopback to more correct value.
739 2007-01-04 Corinna Vinschen <corinna@vinschen.de>
741 * fhandler_socket.cc (fhandler_socket::ioctl): Don't fake results
742 for SIOCGIFFLAGS here. Call get_ifconf instead.
743 * net.cc (get_2k_ifconf): Clean up code to generate interface name.
744 Handle SIOCGIFFLAGS here.
745 (get_nt_ifconf): Fake SIOCGIFFLAGS here.
746 (get_95_ifconf): Ditto.
747 (get_ifconf): Don't fake loopback on systems with IP Helper Lib.
748 Set MTU for loopback to a more "modern" value.
750 2007-01-04 Brian Ford <Brian.Ford@FlightSafety.com>
751 Corinna Vinschen <corinna@vinschen.de>
753 * fhandler.h (PREFERRED_IO_BLKSIZE): Define as 64K.
754 * fhandler.cc (fhandler_base::fstat): Set st_blksize to
755 PREFERRED_IO_BLKSIZE.
756 * fhandler_disk_file.cc (fhandler_base::fstat_helper): Ditto.
757 * fhandler_mailslot.cc (fhandler_mailslot::fstat): Ditto.
758 * fhandler_raw.cc (fhandler_dev_raw::fstat): Ditto.
760 2007-01-01 Christopher Faylor <me@cgf.cx>
762 * spawn.cc (spawn_guts): Don't expect synchronization from a non-cygwin