OSDN Git Service

6337ff34b55e77e5700cf2bf8965ad4c7be4a757
[pf3gnuchains/pf3gnuchains4x.git] / winsup / cygwin / ChangeLog
1 2007-02-22  Corinna Vinschen  <corinna@vinschen.de>
2
3         Throughout replace all usage of wincap.shared with the constant
4         FILE_SHARE_VALID_FLAGS.
5         * fhandler.cc (fhandler_base::open_9x): Drop local variable shared.
6         * wincap.cc: Remove shared member throughout.
7         * wincap.h: Ditto.
8
9 2007-02-22  Corinna Vinschen  <corinna@vinschen.de>
10
11         * Makefile.in (DLL_IMPORTS): Add libntdll.a.
12         * autoload.cc: Remove all symbols from advapi32.dll, kernel32.dll and
13         ntdll.dll available on all platforms since NT4.
14         
15         Throughout remove all usage of wincap.is_winnt.
16         * dcrt0.cc (dll_crt0_0): Remove call to mmap_init.
17         * fhandler.h (class fhandler_base): Remove has_changed flag.
18         (fhandler_disk_file::touch_ctime): Remove declaration.
19         (fhandler_disk_file::readdir_9x): Ditto.
20         (fhandler_disk_file::touch_ctime): Remove.
21         (fhandler_disk_file::readdir_9x): Remove.
22         (fhandler_disk_file::closedir): Call NtClose instead of CloseHandle.
23         * mmap.cc: Throughout call CreateMapping and MapView directly.
24         (VirtualProt9x): Remove.
25         (VirtualProtNT): Remove.
26         (VirtualProtEx9x): Remove.
27         (VirtualProtExNT): Remove.
28         (VirtualProtect): Remove define.
29         (VirtualProtectEx): Remove define.
30         (CreateMapping9x): Remove.
31         (CreateMappingNT): Rename to CreateMapping.
32         (MapView9x): Remove.
33         (MapViewNT): Rename to MapView.
34         (struct mmap_func_t): Remove definition.
35         (mmap_funcs_9x): Remove.
36         (mmap_funcs_nt): Remove.
37         (mmap_func): Remove.
38         (mmap_init): Remove.
39         * net.cc (getdomainname): Drop comment. Use NT4 registry key only.
40         (get_95_ifconf): Remove.
41         * pinfo.cc (winpids::enumNT): Rename to winpids::enum_processes.
42         (winpids::enum9x): Remove.
43         (winpids::set): Just call enum_processes directly.
44         (winpids::enum_init): Ditto.
45         * pinfo.h (class winpids): Drop enum_processes pointer.  Rename
46         enumNT to enum_processes.  Drop enum9x declaration.  Drop initialization
47         of enum_processes throughout.
48         * registry.cc (get_registry_hive_path): Just create NT key.
49         (load_registry_hive): Only load NT specific file.
50         * syscalls.cc (unlink_9x): Remove.
51         (unlink): Just call unlink_nt.
52         * wincap.cc: Remove is_winnt flag throughout.
53         * wincap.h: Ditto.
54         * winsup.h: Remove mmap_init declaration.
55
56 2007-02-21  Corinna Vinschen  <corinna@vinschen.de>
57
58         * wincap.cc (wincap_unknown): Change settings for unknown to reflect
59         the capabilities of NT4.
60         (wincap_95): Remove.
61         (wincap_95osr2): Remove.
62         (wincap_98): Remove.
63         (wincap_98se): Remove.
64         (wincap_me): Remove.
65         (wincap_nt3): Remove.
66         (wincapc::init): Temporarily bail out on any 9x system.
67
68 2007-02-20  Corinna Vinschen  <corinna@vinschen.de>
69
70         * cygwin.din (sem_unlink): Export.
71         * posix_ipc.cc: Include thread.h and semaphore.h.  Remove TODO
72         comment.
73         (ipc_names): Add max_len member.  Set to maximum length of the path
74         before tacking on the prefix path.  Set prefix path for named semaphors
75         to /dev/shm, as on Linux.
76         (enum ipc_type_t): Change sem to semaphore to avoid name conflicts.
77         (check_path): Detect empty paths.  Use ipc_names's max_len member.
78         Use __small_sprintf to create full object path name.  Special case
79         semaphores.
80         (ipc_cond_init): Drop superfluous strcpy.
81         (class ipc_flock): New class to simplify file locking in subsequent
82         code.
83         (struct mq_hdr): Raise size of mqh_uname to allow adding a unique
84         LUID to the name.
85         (mq_open): Fix formatting.  Create unique synchronization object names
86         using AllocateLocallyUniqueId.
87         (struct sem_finfo): New structure defining named semaphore file content.
88         (sem_open): Move here.  Rework implementation to allow kernel
89         persistent implementation of POSIX named semaphores.
90         (_sem_close): Implement sem_close.
91         (sem_close): Move here.  Just call _sem_close with do_close parameter
92         set to true.
93         (sem_unlink): New function.
94         * pthread.cc (mangle_sem_name): Remove.
95         (sem_open): Move to posix_ipc.cc.
96         (sem_close): Ditto.
97         * syscalls.cc (close_all_files): Call semaphore::terminate here.
98         * thread.cc: Fix formatting.  Rearrange semaphore functions so that
99         they are close together.
100         (semaphore::semaphore): Rework to play nicely with new named semaphore
101         implementation.
102         (semaphore::_terminate): Call _sem_close if semaphore is a named
103         semaphore.
104         (semaphore::destroy): Don't destroy named semaphores.  Return EINVAL
105         instead.
106         (semaphore::close): Only destroy named semaphores.  Return EINVAL
107         otherwise.
108         (semaphore::open): Rework to play nicely with new named semaphore
109         implementation.  Loop through existing semaphores to be able to
110         return same sem_t pointer as a former call on the same named semaphore.
111         (semaphore::getinternal): New function called from _sem_close.
112         * thread.h (class List): Make mx and head public.
113         (class semaphore): Fix formatting.  Align method declarations with
114         implementation in thread.cc.  Add members used for named semaphores.
115         (semaphore::terminate): New static method.
116         * include/semaphore.h: Redefine SEM_FAILED.  Fix formatting.
117         (sem_unlink): Add declaration.
118         * include/cygwin/version.h: Bump API minor number.
119
120 2007-02-20  Christopher Faylor  <me@cgf.cx>
121
122         * exceptions.cc (_cygtls::signal_exit): Only call myself.exit when when
123         exit_state indicates that we've visited do_exit.
124         * sync.h (lock_process::lock_process): Use renamed exit_state -
125         ES_PROCESS_LOCKED.
126         * winsup.h: Rename ES_MUTO_SET to ES_PROCESS_LOCKED.
127
128 2007-02-20  Corinna Vinschen  <corinna@vinschen.de>
129
130         * fhandler_socket.cc (fhandler_socket::bind): Remove printing wrong
131         errno in debug output.
132
133 2007-02-19  Christopher Faylor  <me@cgf.cx>
134
135         Remove extraneous whitespace.
136         * pinfo.cc (commune_process): Use default argument to lock_process.
137         * sigproc.cc: Update copyright.
138         * select.cc: Ditto.
139
140 2007-02-15  Corinna Vinschen  <corinna@vinschen.de>
141
142         * posix_ipc.cc (mq_open): Avoid compiler warning.  Initialize mqhdr
143         before using it in file exists case.
144         * include/mqueue.h (mqd_t): Make non-pointer type.
145
146 2007-02-15  Corinna Vinschen  <corinna@vinschen.de>
147
148         * posix_ipc.cc (ipc_mutex_init): Create global object name.
149         (ipc_cond_init): Ditto.
150         (struct mq_hdr): Add mqh_uname member to store synchronization object
151         name.
152         (mq_open): Create unique synchronization object name and store in
153         mq_hdr->mqh_uname.  Use this name in calls to ipc_mutex_init and
154         ipc_cond_init.
155
156 2007-02-14  Corinna Vinschen  <corinna@vinschen.de>
157
158         * Makefile.in (DLL_OFILES): Add posix_ipc.o.
159         * cygwin.din (mq_close): Export.
160         (mq_getattr): Export.
161         (mq_notify): Export.
162         (mq_open): Export.
163         (mq_receive): Export.
164         (mq_send): Export.
165         (mq_setattr): Export.
166         (mq_timedreceive): Export.
167         (mq_timedsend): Export.
168         (mq_unlink): Export.
169         * posix_ipc.cc: New file implementing the above functions.  Move
170         shm_open and shm_unlink from syscalls.cc here.
171         * sysconf.cc (sca): Set value of _SC_MQ_OPEN_MAX to MQ_OPEN_MAX,
172         _SC_MQ_PRIO_MAX to MQ_PRIO_MAX, _SC_MESSAGE_PASSING to
173         _POSIX_MESSAGE_PASSING.
174         * include/limits.h (MQ_OPEN_MAX): Define.
175         (MQ_PRIO_MAX): Define.
176         * include/mqueue.h: New file.
177         * include/cygwin/version.h: Bump API minor number.
178
179 2007-02-13  Corinna Vinschen  <corinna@vinschen.de>
180
181         * include/cygwin/stdlib.h (valloc): Declare.
182         (memalign): Declare.
183
184 2007-02-09  Pierre A. Humblet  <Pierre.Humblet@ieee.org>
185
186         * libc/minires-os-if.c (write_record): Handle DNS_TYPE_SRV and
187         some obsolete types.
188
189 2007-02-08  Corinna Vinschen  <corinna@vinschen.de>
190
191         * syscalls.cc (check_shm): New static function to do path checking
192         common to shm_open and shm_unlink.  Check for /dev/shm existance.
193         (shm_open): Call check_shm.
194         (shm_unlink): Ditto.
195
196 2007-02-08  Corinna Vinschen  <corinna@vinschen.de>
197
198         * cygwin.din (shm_open): Export.
199         (shm_unlink): Export.
200         * syscalls.cc (shm_open): New function.
201         (shm_unlink): New function.
202         * sysconf.cc (sca): Set value of _SC_SHARED_MEMORY_OBJECTS to
203         _POSIX_SHARED_MEMORY_OBJECTS.
204         * include/cygwin/version.h: Bump API minor number.
205         * include/sys/mman.h (shm_open): Add prototype.
206         (shm_unlink): Ditto.
207
208 2007-02-08  Christopher Faylor <me@cgf.cx>
209             Corinna Vinschen  <corinna@vinschen.de>
210
211         * cygmalloc.h (__set_ENOMEM): Declare.
212         (MALLOC_FAILURE_ACTION): Call __set_ENOMEM.
213         * malloc_wrapper.cc (malloc) Remove setting errno here.
214         (realloc): Ditto.
215         (calloc): Ditto.
216         (memalign): Ditto.
217         (valloc): Ditto.
218         (posix_memalign): Save and restore errno.
219
220 2007-02-07  Corinna Vinschen  <corinna@vinschen.de>
221
222         * cygmalloc.h (MALLOC_FAILURE_ACTION): Move to correct #if branch.
223
224 2007-02-07  Corinna Vinschen  <corinna@vinschen.de>
225
226         * cygmalloc.h (MALLOC_FAILURE_ACTION): Define empty.
227         * cygwin.din (posix_madvise): Export.
228         (posix_memalign): Export.
229         * fhandler.cc (fhandler_base::fpathconf): Return useful values in
230         _PC_VDISABLE, _PC_SYNC_IO and _PC_SYMLINK_MAX cases.
231         * malloc_wrapper.cc (malloc): Set errno here since it's not set in
232         dlmalloc.c anymore.
233         (realloc): Ditto.
234         (calloc): Ditto.
235         (memalign): Ditto.
236         (valloc): Ditto.
237         (posix_memalign): New function.
238         * mmap.cc (posix_madvise): New function.
239         * sysconf.cc (get_open_max): New function.
240         (get_page_size): Ditto.
241         (get_nproc_values): Ditto.
242         (get_avphys): Ditto.
243         (sc_type): New type.
244         (sca): New array to map _SC_xxx options to sysconf return values.
245         (sysconf): Reimplement using sca array.
246         * include/limits.h: Add all missing values as defined by SUSv3.
247         * include/pthread.h (PTHREAD_DESTRUCTOR_ITERATIONS): Move definition
248         to sys/limits.h.
249         (PTHREAD_KEYS_MAX): Ditto.
250         * include/semaphore.h (SEM_VALUE_MAX): Ditto.
251         * include/cygwin/stdlib.h (posix_memalign): Declare.
252         * include/cygwin/version.h: Bump API minor number.
253         * include/sys/mman.h: Add posix_madvise flags.
254         (posix_madvise): Declare.
255         * include/sys/termios.h (_POSIX_VDISABLE): Move definition to
256         sys/limits.h.
257
258 2007-02-05  Corinna Vinschen  <corinna@vinschen.de>
259
260         * fhandler_serial.cc (fhandler_serial::tcsetattr): Add support for
261         baud rates up to 3000000 baud.  Add missing 128K and 256K cases.
262         (fhandler_serial::tcgetattr): Ditto.
263         * include/sys/termios.h: Add baud rate definitions from B460800 up to
264         B3000000.
265
266 2007-02-02  Corinna Vinschen  <corinna@vinschen.de>
267
268         * syscalls.cc (unlink_nt): Add missing assignment in case NtClose fails.
269
270 2007-02-01  Corinna Vinschen  <corinna@vinschen.de>
271
272         * net.cc (ga_dup): New function, taken from ga_clone with v4-in-v6
273         mapping addition.
274         (ga_clone): Just call ga_dup from here.
275         (ga_duplist): New function to duplicate list of struct addrinfo.
276         (ga_echeck): Don't check ai_flags, it already happened in
277         cygwin_getaddrinfo.
278         (cygwin_freeaddrinfo): Always call ipv4_freeaddrinfo.
279         (cygwin_getaddrinfo): Use new wincap.supports_all_posix_ai_flags
280         flag rather than wincap.has_gaa_on_link_prefix.  Always duplicate
281         WinSock's addrinfo list to a self-allocated list.  Handle AI_V4MAPPED
282         for pre-Vista platforms supporting getaddrinfo.
283         * wincap.h (wincapc::supports_all_posix_ai_flags): New element.
284         * wincap.cc: Implement above element throughout.
285         * include/netdb.h: Note how AI_ADDRCONFIG is not supported pre-Vista.
286         Remove superfluous comment.
287
288 2007-02-01  Corinna Vinschen  <corinna@vinschen.de>
289
290         * include/cygwin/socket.h: Add IPv6 socket options.
291
292 2007-01-31  Corinna Vinschen  <corinna@vinschen.de>
293
294         * net.cc (cygwin_getaddrinfo): Fix thinko in AI_ADDRCONFIG handling.
295
296 2007-01-31  Corinna Vinschen  <corinna@vinschen.de>
297
298         * net.cc (cygwin_getaddrinfo): Check ai_flags for valid values.
299         Handle AI_NUMERICSERV.  Handle AI_ADDRCONFIG behaviour on Vista.
300         * include/netdb.h (AI_NUMERICSERV): Add missing flag.
301
302 2007-01-30  Corinna Vinschen  <corinna@vinschen.de>
303
304         * fhandler_disk_file.cc (fhandler_disk_file::closedir): Add dir name
305         to debug output.
306         * syscalls.cc (try_to_bin): Enable code to move file to user specific
307         recycler dir to eliminate Vista problem.
308         (unlink_nt): Add comment that rename after opening for delete on close
309         only fails on XP.
310
311 2007-01-30  Corinna Vinschen  <corinna@vinschen.de>
312
313         * sigproc.cc (child_info::child_info): Set msv_count to non-zero
314         value only on systems requiring it.
315
316 2007-01-28  Corinna Vinschen  <corinna@vinschen.de>
317
318         * include/ftw.h: Include sys/cdefs.h.
319
320 2007-01-26  Corinna Vinschen  <corinna@vinschen.de>
321
322         * fhandler_disk_file.cc (fhandler_disk_file::rmdir): Implement rmdir
323         on NT by calling unlink_nt.  Check for directory here.
324         * syscalls.cc (try_to_bin): Fix buggy debug_printf statement.
325         (unlink_nt): Make non-static.  Don't use delete-on-close semantics on
326         directories.  Explain why.
327
328 2007-01-24  Corinna Vinschen  <corinna@vinschen.de>
329
330         * net.cc (if_nametoindex): This time, really free IP_ADAPTER_ADDRESSES
331         memory.
332         (if_indextoname): Ditto.
333
334 2007-01-24  Corinna Vinschen  <corinna@vinschen.de>
335
336         * security.h (pop_thread_privilege): Revert to previous state, not
337         to token used for impersonation.
338
339 2007-01-24  Corinna Vinschen  <corinna@vinschen.de>
340
341         * cygheap.h (cygheap_user::deimpersonate): Always RevertToSelf.
342
343 2007-01-23  Corinna Vinschen  <corinna@vinschen.de>
344
345         * net.cc (gai_errmap): Add EAI_OVERFLOW entry.  Fix formatting.
346         (cygwin_gai_strerror): Drop using EAI_MAX.
347         (w32_to_gai_err): Ditto.
348         * include/netdb.h: Define EAI_OVERFLOW. Remove EAI_MAX.
349
350 2007-01-23  Corinna Vinschen  <corinna@vinschen.de>
351
352         * include/netdb.h: Add AI_xxx flags available since Vista.
353
354 2007-01-23  Corinna Vinschen  <corinna@vinschen.de>
355
356         * net.cc (if_nametoindex): Free IP_ADAPTER_ADDRESSES memory.
357         (if_indextoname): Ditto.
358         (if_nameindex): Ditto.  Remove duplicate indexed entries in result.
359
360 2007-01-21  Corinna Vinschen  <corinna@vinschen.de>
361
362         * autoload.cc (WSAIoctl): Define.
363         (SendARP): Define.
364         * cygwin.din: Export if_freenameindex, if_indextoname, if_nameindex and
365         if_nametoindex.
366         * fhandler_procnet.cc: Drop including wchar.h.  Drop definitions of
367         GAA_FLAG_INCLUDE_ALL_INTERFACES, IP_ADAPTER_UNICAST_ADDRESS_VISTA.
368         (fhandler_procnet::exists): Check for has_gaa_prefixes.  Call
369         get_adapters_addresses here.
370         (fhandler_procnet::readdir): Ditto.
371         (prefix): Move to net.cc.
372         (fhandler_procnet::fill_filebuf): Call get_adapters_addresses here.
373         Simplify allocation.  Use AdapterName rather than FriendlyName as
374         interface name.  Use IfIndex if available, Ipv6IfIndex otherwise.
375         (in6_are_prefix_equal): Move to net.cc.
376         * fhandler_socket.cc: Define old SIOCGxxx values.
377         (CONV_OLD_TO_NEW_SIO): Convert old SIOCGxxx value to new one.
378         (struct __old_ifreq): Define old struct ifreq.
379         (fhandler_socket::ioctl): Handle old SIOCGxxx values.  Handle new
380         SIOCGIFFRNDLYNAM command.  Simplify copying ifreq data to user space.
381         Call get_ifconf with additional SOCKET parameter.
382         * net.cc (IP_ADAPTER_UNICAST_ADDRESS_LH): Define.
383         (IP_ADAPTER_ADDRESSES_LH): Define.
384         (SIO_GET_INTERFACE_LIST): Define.
385         (sockaddr_in6_old): Define.
386         (sockaddr_gen): Define.
387         (INTERFACE_INFO): Define.
388         (IN_LOOPBACK): Define.
389         (in_are_prefix_equal): New static function.
390         (ip_addr_prefix): New function, replaces prefix function, add AF_INET
391         handling.
392         (GAA_FLAG_INCLUDE_ALL_INTERFACES): Define.
393         (get_adapters_addresses): New function.
394         (WS_IFF_xxx): Define Winsock interface flag values.
395         (convert_ifr_flags): New function to convert Winsock interface flag
396         values to Cygwin interface flag values.
397         (get_xp_ifconf): New get_ifconf implementation for XP SP1 and above.
398         (get_2k_ifconf): Fix interface index.  Fix formatting.
399         (get_nt_ifconf): Fix formatting.
400         (get_95_ifconf): Ditto.
401         (get_ifconf): Take additional SOCKET parameter.  Call get_xp_ifconf
402         on XP SP1 and above.
403         (if_nametoindex): New function.
404         (if_indextoname): New function.
405         (if_nameindex): New function.
406         (if_freenameindex): New function.
407         (in6_are_prefix_equal): Moved here from fhandler_procnet.cc.
408         * wincap.cc (wincap_xp): Define has_gaa_prefixes as true by default.
409         (wincapc::init): Assume has_osversioninfoex by default.  Call
410         GetVersionEx with OSVERSIONINFOEX first.  Call with OSVERSIONINFO only
411         if that fails.  Simplify NT4 case and try to avoid strcmp.  Check XP
412         Service Pack using version.wServicePackMajor to avoid strcmp.
413         * include/asm/socket.h (SIOCGIFFRNDLYNAM): Define.
414         * include/cygwin/if.h: Fix formatting.
415         (IFF_POINTTOPOINT): Define.
416         (IFF_NOARP): Define.
417         (IFF_LOWER_UP): Define.
418         (IFF_DORMANT): Define.
419         (struct if_nameindex): Define.
420         (IFRF_FRIENDLYNAMESIZ): Define.
421         (struct ifreq_frndlyname): Define.
422         (IFNAMSIZ): Redefine as 44.
423         (IF_NAMESIZE): Define.
424         (struct ifreq): Redefine ifru_flags as int.  Define ifru_data.  Pad size
425         to sizeof sockaddr_in6 for further extensions.
426         (ifr_data): Define.
427         (ifr_frndlyname): Define.
428         (if_nametoindex): Declare.
429         (if_indextoname): Declare.
430         (if_nameindex): Declare.
431         (if_freenameindex): Declare.
432         * include/cygwin/version.h: Bump API minor number.
433         (CYGWIN_VERSION_CHECK_FOR_OLD_IFREQ): Define check for old vs. new
434         ifreq structure.
435
436 2007-01-18  Corinna Vinschen  <corinna@vinschen.de>
437
438         * spawn.cc (spawn_guts): Don't set cwd for non-Cygwin child processes
439         on NT to allow starting them in virtual directories.
440
441 2007-01-18  Corinna Vinschen  <corinna@vinschen.de>
442
443         * mmap.cc (list::hash): Fix type to __ino64_t.
444         (list::get_hash): Ditto.
445         (list::set): Add struct stat parameter.  Use that instead of calling
446         fstat.
447         (map::get_list_by_fd): Ditto.
448         (map::add_list): Ditto.
449         (mmap_is_attached_or_noreserve): Call get_list_by_fd appropriately.
450         (mmap_worker): Add pameters for map list and file stat information.
451         Propagate to called functions.
452         (mmap64): Use fstat on files early.  Replace call to GetFileSize.
453         Call get_list_by_fd and mmap_worker appropriately.
454
455 2007-01-18  Corinna Vinschen  <corinna@vinschen.de>
456
457         * fhandler_procnet.cc: Drop declaration of htonl and ntohs.  Include
458         asm/byteorder.h instead.
459
460 2007-01-18  Corinna Vinschen  <corinna@vinschen.de>
461
462         * include/cygwin/in6.h: Drop inclusion of asm/byteorder.h.
463         * fhandler_procnet.cc: Declare htonl and ntohs here.
464
465 2007-01-17  Corinna Vinschen  <corinna@vinschen.de>
466
467         * Makefile.in (DLL_OFILES): Add fhandler_procnet.o.
468         * autoload.cc (GetAdaptersAddresses): Define.
469         * devices.h (FH_PROCNET): Define new device.
470         * devices.in (dev_procnet_storage): Add "/proc/net" entry.
471         * devices.cc: Regenerate.
472         * dir.cc (readdir_worker): Use isproc_dev macro.
473         * dtable.cc (build_fh_pc): Add FH_PROCNET.
474         * fhandler.h (class fhandler_procnet): New class.
475         * fhandler_proc.cc: Add "net" subdirectory handling.
476         * fhandler_procnet.cc: New file handling "/proc/net" directory.
477         * path.cc (isvirtual_dev): Move to path.h.
478         * path.h (isproc_dev): New macro to identify /proc files by device.
479         (isvirtual_dev): Moved here.  Define using isproc_dev.
480         * syscalls.cc (unlink): Use isproc_dev macro.
481         * wincap.h (wincapc::has_gaa_prefixes): New element.
482         (wincapc::has_gaa_on_link_prefix): New element.
483         * wincap.cc: Implement above elements throughout.
484         (wincapc::init): Check XP for service pack and set has_gaa_prefixes
485         appropriately.
486         * include/cygwin/in6.h: Include asm/byteorder.h.
487
488 2007-01-17  Corinna Vinschen  <corinna@vinschen.de>
489
490         * include/asm/socket.h (SIOGIFINDEX): Define.
491
492 2007-01-17  Corinna Vinschen  <corinna@vinschen.de>
493
494         * mmap.cc (MapView9x): Note possible uselessness of retrying.
495         (MapViewNT): Ditto.
496         (mmap64): Fix pre-reservation to work for non NULL, non MAP_FIXED.
497
498 2007-01-16  Corinna Vinschen  <corinna@vinschen.de>
499
500         * autoload.cc (RtlAnsiStringToUnicodeString): Define.
501         (RtlOemStringToUnicodeString): Define.
502         * ntdll.h (struct _RTL_USER_PROCESS_PARAMETERS): Define.
503         (struct _PEB): Redefine with a bit of content.
504         (RtlAnsiStringToUnicodeString): Declare.
505         (RtlOemStringToUnicodeString): Declare.
506         * path.cc: Include ntdll.h.
507         (_upp): New global variable pointing to user process parameter block.
508         (get_user_proc_parms): New static function to retrieve user process
509         parameter block.
510         (close_user_proc_parms_cwd_handle): New function to close handle to
511         current working directory in user process parameter block.
512         (cwdstuff::init): Drop redundant declaration of dynamically_loaded.
513         Set current dir only on 9x.  Call close_user_proc_parms_cwd_handle
514         on NT instead.
515         (cwdstuff::keep_in_sync): Only on 9x.
516         (cwdstuff::set): Keep behaviour on 9x.  On NT write cwd path into user
517         process parameter block and set cwd handle to NULL.  Fix comments to
518         reflect new behaviour.
519
520 2007-01-16  Corinna Vinschen  <corinna@vinschen.de>
521
522         * fhandler_socket.cc (fhandler_socket::ioctl): Handle SIOCGIFINDEX.
523         * net.cc (get_2k_ifconf): Ditto.
524         (get_nt_ifconf): Fake SIOCGIFINDEX.
525         (get_95_ifconf): Ditto.
526         (get_ifconf): Handle SIOCGIFINDEX.  Fake it for loopback on systems
527         not supporting IP Helper Lib.
528         * include/asm/socket.h (SIOCGIFINDEX): Define.
529         * include/cygwin/if.h (struct ifreq): Add member for interface index.
530         (ifr_ifindex): Define.
531
532 2007-01-16  Corinna Vinschen  <corinna@vinschen.de>
533
534         * include/cygwin/in6.h (struct ipv6_mreq): Change type of interface
535         member to uint32_t.
536         (struct in6_pktinfo): Ditto.
537
538 2007-01-16  Corinna Vinschen  <corinna@vinschen.de>
539
540         * include/cygwin/in.h (struct ip_mreq_source): Define.
541         (struct ip_msfilter): Define.
542         (IP_MSFILTER_SIZE): Define.
543         (struct in_pktinfo): Define.
544         (struct group_req): Define.
545         (struct group_source_req): Define.
546         (struct group_filter): Define.
547         (GROUP_FILTER_SIZE): Define.
548         (INADDR_ALLRTRS_GROUP): Define.
549         * include/cygwin/socket.h: Define protocol agnostic multicast options.
550
551 2007-01-15  Corinna Vinschen  <corinna@vinschen.de>
552
553         * CYGWIN_LICENSE: Fix web pages and contact information.
554
555 2007-01-15  Corinna Vinschen  <corinna@vinschen.de>
556
557         * ntdll.h: Adjust status definitions.
558
559 2007-01-15  Corinna Vinschen  <corinna@vinschen.de>
560
561         * cygheap.cc (cygheap_init): Add TODO comment.
562
563 2007-01-15  Corinna Vinschen  <corinna@vinschen.de>
564
565         * ntdll.h (STATUS_SHARING_VIOLATION): Define.
566
567 2007-01-13  Corinna Vinschen  <corinna@vinschen.de>
568
569         * syscalls.cc (unlink_nt): Don't move files to recycle bin which are
570         not in use.
571
572 2007-01-13  Christopher Faylor  <me@cgf.cx>
573
574         * glob.cc: Update copyright notice with latest from FreeBSD.
575         (glob0): Use correct type for c variable to propagate previously
576         detected protection.
577
578 2007-01-12  Corinna Vinschen  <corinna@vinschen.de>
579
580         * cygheap.cc (_csbrk): Fix off-by-one error.
581         * cygwin.sc: Give .cygheap a minimum size of 512K.
582
583 2007-01-12  Christopher Faylor  <me@cgf.cx>
584
585         * external.cc (sync_winenv): Use cur_environ () rather than
586         __cygwin_environ.
587
588 2007-01-12  Corinna Vinschen  <corinna@vinschen.de>
589
590         * fork.cc (child_copy): Add missing Windows PID in debug output.
591
592 2007-01-12  Corinna Vinschen  <corinna@vinschen.de>
593
594         * syscalls.cc: Update copyright.
595
596 2007-01-10  Corinna Vinschen  <corinna@vinschen.de>
597
598         * mmap.cc (mmap64): Pre-Reserve space for the whole mapping to get a
599         useful, valid address before the actual mappings take place.
600         Fix typo in comment.
601
602 2007-01-10  Corinna Vinschen  <corinna@vinschen.de>
603
604         * syscalls.cc (sync): Use b_drive for B: drive (Thanks to Howard Chu).
605
606 2007-01-09  Corinna Vinschen  <corinna@vinschen.de>
607
608         * syscalls.cc (getpagesize): Change condition for clarity.
609         (getsystempagesize): Ditto.
610
611 2007-01-09  Corinna Vinschen  <corinna@vinschen.de>
612
613         * mmap.cc: Do bookkeeping in 4K pages, rather than in 64K chunks.
614
615 2007-01-07  Corinna Vinschen  <corinna@vinschen.de>
616
617         * security.h (setacl): Add parameter for writability flag.
618         * sec_acl.cc (setacl): Ditto.  Set to true if any ACE with write
619         permissions is created.
620         * fhandler_disk_file.cc (fhandler_disk_file::facl): Reset
621         FILE_ATTRIBUTE_READONLY if ACL contains an ACE with write permissions.
622
623 2007-01-05  Corinna Vinschen  <corinna@vinschen.de>
624
625         * include/strings.h: Don't include string.h.  Only declare functions
626         according to SUSv3.
627
628 2007-01-04  Corinna Vinschen  <corinna@vinschen.de>
629
630         (get_ifconf): Set MTU for loopback to more correct value.
631
632 2007-01-04  Corinna Vinschen  <corinna@vinschen.de>
633
634         * fhandler_socket.cc (fhandler_socket::ioctl): Don't fake results
635         for SIOCGIFFLAGS here.  Call get_ifconf instead.
636         * net.cc (get_2k_ifconf): Clean up code to generate interface name.
637         Handle SIOCGIFFLAGS here.
638         (get_nt_ifconf): Fake SIOCGIFFLAGS here.
639         (get_95_ifconf): Ditto.
640         (get_ifconf): Don't fake loopback on systems with IP Helper Lib.
641         Set MTU for loopback to a more "modern" value.
642
643 2007-01-04  Brian Ford  <Brian.Ford@FlightSafety.com>
644             Corinna Vinschen  <corinna@vinschen.de>
645
646         * fhandler.h (PREFERRED_IO_BLKSIZE): Define as 64K.
647         * fhandler.cc (fhandler_base::fstat): Set st_blksize to
648         PREFERRED_IO_BLKSIZE.
649         * fhandler_disk_file.cc (fhandler_base::fstat_helper): Ditto.
650         * fhandler_mailslot.cc (fhandler_mailslot::fstat): Ditto.
651         * fhandler_raw.cc (fhandler_dev_raw::fstat): Ditto.
652
653 2007-01-01  Christopher Faylor  <me@cgf.cx>
654
655         * spawn.cc (spawn_guts): Don't expect synchronization from a non-cygwin
656         _P_NOWAIT process.