OSDN Git Service

* net.cc (ga_dup): New function, taken from ga_clone with v4-in-v6
[pf3gnuchains/pf3gnuchains3x.git] / winsup / cygwin / ChangeLog
1 2007-02-01  Corinna Vinschen  <corinna@vinschen.de>
2
3         * net.cc (ga_dup): New function, taken from ga_clone with v4-in-v6
4         mapping addition.
5         (ga_clone): Just call ga_dup from here.
6         (ga_duplist): New function to duplicate list of struct addrinfo.
7         (ga_echeck): Don't check a_flags, it already happened in
8         cygwin_getaddrinfo.
9         (cygwin_freeaddrinfo): Always call ipv4_freeaddrinfo.
10         (cygwin_getaddrinfo): Use new wincap.supports_all_posix_ai_flags
11         flag rather than wincap.has_gaa_on_link_prefix.  Always duplicate
12         WinSock's addrinfo list to a self-allocated list.  Handle AI_V4MAPPED
13         for pre-Vista platforms supporting getaddrinfo.
14         * wincap.h (wincapc::supports_all_posix_ai_flags): New element.
15         * wincap.cc: Implement above element throughout.
16         * include/netdb.h: Note how AI_ADDRCONFIG is not supported pre-Vista.
17         Remove superfluous comment.
18
19 2007-02-01  Corinna Vinschen  <corinna@vinschen.de>
20
21         * include/cygwin/socket.h: Add IPv6 socket options.
22
23 2007-01-31  Corinna Vinschen  <corinna@vinschen.de>
24
25         * net.cc (cygwin_getaddrinfo): Fix thinko in AI_ADDRCONFIG handling.
26
27 2007-01-31  Corinna Vinschen  <corinna@vinschen.de>
28
29         * net.cc (cygwin_getaddrinfo): Check ai_flags for valid values.
30         Handle AI_NUMERICSERV.  Handle AI_ADDRCONFIG behaviour on Vista.
31         * include/netdb.h (AI_NUMERICSERV): Add missing flag.
32
33 2007-01-30  Corinna Vinschen  <corinna@vinschen.de>
34
35         * fhandler_disk_file.cc (fhandler_disk_file::closedir): Add dir name
36         to debug output.
37         * syscalls.cc (try_to_bin): Enable code to move file to user specific
38         recycler dir to eliminate Vista problem.
39         (unlink_nt): Add comment that rename after opening for delete on close
40         only fails on XP.
41
42 2007-01-30  Corinna Vinschen  <corinna@vinschen.de>
43
44         * sigproc.cc (child_info::child_info): Set msv_count to non-zero
45         value only on systems requiring it.
46
47 2007-01-28  Corinna Vinschen  <corinna@vinschen.de>
48
49         * include/ftw.h: Include sys/cdefs.h.
50
51 2007-01-26  Corinna Vinschen  <corinna@vinschen.de>
52
53         * fhandler_disk_file.cc (fhandler_disk_file::rmdir): Implement rmdir
54         on NT by calling unlink_nt.  Check for directory here.
55         * syscalls.cc (try_to_bin): Fix buggy debug_printf statement.
56         (unlink_nt): Make non-static.  Don't use delete-on-close semantics on
57         directories.  Explain why.
58
59 2007-01-24  Corinna Vinschen  <corinna@vinschen.de>
60
61         * net.cc (if_nametoindex): This time, really free IP_ADAPTER_ADDRESSES
62         memory.
63         (if_indextoname): Ditto.
64
65 2007-01-24  Corinna Vinschen  <corinna@vinschen.de>
66
67         * security.h (pop_thread_privilege): Revert to previous state, not
68         to token used for impersonation.
69
70 2007-01-24  Corinna Vinschen  <corinna@vinschen.de>
71
72         * cygheap.h (cygheap_user::deimpersonate): Always RevertToSelf.
73
74 2007-01-23  Corinna Vinschen  <corinna@vinschen.de>
75
76         * net.cc (gai_errmap): Add EAI_OVERFLOW entry.  Fix formatting.
77         (cygwin_gai_strerror): Drop using EAI_MAX.
78         (w32_to_gai_err): Ditto.
79         * include/netdb.h: Define EAI_OVERFLOW. Remove EAI_MAX.
80
81 2007-01-23  Corinna Vinschen  <corinna@vinschen.de>
82
83         * include/netdb.h: Add AI_xxx flags available since Vista.
84
85 2007-01-23  Corinna Vinschen  <corinna@vinschen.de>
86
87         * net.cc (if_nametoindex): Free IP_ADAPTER_ADDRESSES memory.
88         (if_indextoname): Ditto.
89         (if_nameindex): Ditto.  Remove duplicate indexed entries in result.
90
91 2007-01-21  Corinna Vinschen  <corinna@vinschen.de>
92
93         * autoload.cc (WSAIoctl): Define.
94         (SendARP): Define.
95         * cygwin.din: Export if_freenameindex, if_indextoname, if_nameindex and
96         if_nametoindex.
97         * fhandler_procnet.cc: Drop including wchar.h.  Drop definitions of
98         GAA_FLAG_INCLUDE_ALL_INTERFACES, IP_ADAPTER_UNICAST_ADDRESS_VISTA.
99         (fhandler_procnet::exists): Check for has_gaa_prefixes.  Call
100         get_adapters_addresses here.
101         (fhandler_procnet::readdir): Ditto.
102         (prefix): Move to net.cc.
103         (fhandler_procnet::fill_filebuf): Call get_adapters_addresses here.
104         Simplify allocation.  Use AdapterName rather than FriendlyName as
105         interface name.  Use IfIndex if available, Ipv6IfIndex otherwise.
106         (in6_are_prefix_equal): Move to net.cc.
107         * fhandler_socket.cc: Define old SIOCGxxx values.
108         (CONV_OLD_TO_NEW_SIO): Convert old SIOCGxxx value to new one.
109         (struct __old_ifreq): Define old struct ifreq.
110         (fhandler_socket::ioctl): Handle old SIOCGxxx values.  Handle new
111         SIOCGIFFRNDLYNAM command.  Simplify copying ifreq data to user space.
112         Call get_ifconf with additional SOCKET parameter.
113         * net.cc (IP_ADAPTER_UNICAST_ADDRESS_LH): Define.
114         (IP_ADAPTER_ADDRESSES_LH): Define.
115         (SIO_GET_INTERFACE_LIST): Define.
116         (sockaddr_in6_old): Define.
117         (sockaddr_gen): Define.
118         (INTERFACE_INFO): Define.
119         (IN_LOOPBACK): Define.
120         (in_are_prefix_equal): New static function.
121         (ip_addr_prefix): New function, replaces prefix function, add AF_INET
122         handling.
123         (GAA_FLAG_INCLUDE_ALL_INTERFACES): Define.
124         (get_adapters_addresses): New function.
125         (WS_IFF_xxx): Define Winsock interface flag values.
126         (convert_ifr_flags): New function to convert Winsock interface flag
127         values to Cygwin interface flag values.
128         (get_xp_ifconf): New get_ifconf implementation for XP SP1 and above.
129         (get_2k_ifconf): Fix interface index.  Fix formatting.
130         (get_nt_ifconf): Fix formatting.
131         (get_95_ifconf): Ditto.
132         (get_ifconf): Take additional SOCKET parameter.  Call get_xp_ifconf
133         on XP SP1 and above.
134         (if_nametoindex): New function.
135         (if_indextoname): New function.
136         (if_nameindex): New function.
137         (if_freenameindex): New function.
138         (in6_are_prefix_equal): Moved here from fhandler_procnet.cc.
139         * wincap.cc (wincap_xp): Define has_gaa_prefixes as true by default.
140         (wincapc::init): Assume has_osversioninfoex by default.  Call
141         GetVersionEx with OSVERSIONINFOEX first.  Call with OSVERSIONINFO only
142         if that fails.  Simplify NT4 case and try to avoid strcmp.  Check XP
143         Service Pack using version.wServicePackMajor to avoid strcmp.
144         * include/asm/socket.h (SIOCGIFFRNDLYNAM): Define.
145         * include/cygwin/if.h: Fix formatting.
146         (IFF_POINTTOPOINT): Define.
147         (IFF_NOARP): Define.
148         (IFF_LOWER_UP): Define.
149         (IFF_DORMANT): Define.
150         (struct if_nameindex): Define.
151         (IFRF_FRIENDLYNAMESIZ): Define.
152         (struct ifreq_frndlyname): Define.
153         (IFNAMSIZ): Redefine as 44.
154         (IF_NAMESIZE): Define.
155         (struct ifreq): Redefine ifru_flags as int.  Define ifru_data.  Pad size
156         to sizeof sockaddr_in6 for further extensions.
157         (ifr_data): Define.
158         (ifr_frndlyname): Define.
159         (if_nametoindex): Declare.
160         (if_indextoname): Declare.
161         (if_nameindex): Declare.
162         (if_freenameindex): Declare.
163         * include/cygwin/version.h: Bump API minor number.
164         (CYGWIN_VERSION_CHECK_FOR_OLD_IFREQ): Define check for old vs. new
165         ifreq structure.
166
167 2007-01-18  Corinna Vinschen  <corinna@vinschen.de>
168
169         * spawn.cc (spawn_guts): Don't set cwd for non-Cygwin child processes
170         on NT to allow starting them in virtual directories.
171
172 2007-01-18  Corinna Vinschen  <corinna@vinschen.de>
173
174         * mmap.cc (list::hash): Fix type to __ino64_t.
175         (list::get_hash): Ditto.
176         (list::set): Add struct stat parameter.  Use that instead of calling
177         fstat.
178         (map::get_list_by_fd): Ditto.
179         (map::add_list): Ditto.
180         (mmap_is_attached_or_noreserve): Call get_list_by_fd appropriately.
181         (mmap_worker): Add pameters for map list and file stat information.
182         Propagate to called functions.
183         (mmap64): Use fstat on files early.  Replace call to GetFileSize.
184         Call get_list_by_fd and mmap_worker appropriately.
185
186 2007-01-18  Corinna Vinschen  <corinna@vinschen.de>
187
188         * fhandler_procnet.cc: Drop declaration of htonl and ntohs.  Include
189         asm/byteorder.h instead.
190
191 2007-01-18  Corinna Vinschen  <corinna@vinschen.de>
192
193         * include/cygwin/in6.h: Drop inclusion of asm/byteorder.h.
194         * fhandler_procnet.cc: Declare htonl and ntohs here.
195
196 2007-01-17  Corinna Vinschen  <corinna@vinschen.de>
197
198         * Makefile.in (DLL_OFILES): Add fhandler_procnet.o.
199         * autoload.cc (GetAdaptersAddresses): Define.
200         * devices.h (FH_PROCNET): Define new device.
201         * devices.in (dev_procnet_storage): Add "/proc/net" entry.
202         * devices.cc: Regenerate.
203         * dir.cc (readdir_worker): Use isproc_dev macro.
204         * dtable.cc (build_fh_pc): Add FH_PROCNET.
205         * fhandler.h (class fhandler_procnet): New class.
206         * fhandler_proc.cc: Add "net" subdirectory handling.
207         * fhandler_procnet.cc: New file handling "/proc/net" directory.
208         * path.cc (isvirtual_dev): Move to path.h.
209         * path.h (isproc_dev): New macro to identify /proc files by device.
210         (isvirtual_dev): Moved here.  Define using isproc_dev.
211         * syscalls.cc (unlink): Use isproc_dev macro.
212         * wincap.h (wincapc::has_gaa_prefixes): New element.
213         (wincapc::has_gaa_on_link_prefix): New element.
214         * wincap.cc: Implement above elements throughout.
215         (wincapc::init): Check XP for service pack and set has_gaa_prefixes
216         appropriately.
217         * include/cygwin/in6.h: Include asm/byteorder.h.
218
219 2007-01-17  Corinna Vinschen  <corinna@vinschen.de>
220
221         * include/asm/socket.h (SIOGIFINDEX): Define.
222
223 2007-01-17  Corinna Vinschen  <corinna@vinschen.de>
224
225         * mmap.cc (MapView9x): Note possible uselessness of retrying.
226         (MapViewNT): Ditto.
227         (mmap64): Fix pre-reservation to work for non NULL, non MAP_FIXED.
228
229 2007-01-16  Corinna Vinschen  <corinna@vinschen.de>
230
231         * autoload.cc (RtlAnsiStringToUnicodeString): Define.
232         (RtlOemStringToUnicodeString): Define.
233         * ntdll.h (struct _RTL_USER_PROCESS_PARAMETERS): Define.
234         (struct _PEB): Redefine with a bit of content.
235         (RtlAnsiStringToUnicodeString): Declare.
236         (RtlOemStringToUnicodeString): Declare.
237         * path.cc: Include ntdll.h.
238         (_upp): New global variable pointing to user process parameter block.
239         (get_user_proc_parms): New static function to retrieve user process
240         parameter block.
241         (close_user_proc_parms_cwd_handle): New function to close handle to
242         current working directory in user process parameter block.
243         (cwdstuff::init): Drop redundant declaration of dynamically_loaded.
244         Set current dir only on 9x.  Call close_user_proc_parms_cwd_handle
245         on NT instead.
246         (cwdstuff::keep_in_sync): Only on 9x.
247         (cwdstuff::set): Keep behaviour on 9x.  On NT write cwd path into user
248         process parameter block and set cwd handle to NULL.  Fix comments to
249         reflect new behaviour.
250
251 2007-01-16  Corinna Vinschen  <corinna@vinschen.de>
252
253         * fhandler_socket.cc (fhandler_socket::ioctl): Handle SIOCGIFINDEX.
254         * net.cc (get_2k_ifconf): Ditto.
255         (get_nt_ifconf): Fake SIOCGIFINDEX.
256         (get_95_ifconf): Ditto.
257         (get_ifconf): Handle SIOCGIFINDEX.  Fake it for loopback on systems
258         not supporting IP Helper Lib.
259         * include/asm/socket.h (SIOCGIFINDEX): Define.
260         * include/cygwin/if.h (struct ifreq): Add member for interface index.
261         (ifr_ifindex): Define.
262
263 2007-01-16  Corinna Vinschen  <corinna@vinschen.de>
264
265         * include/cygwin/in6.h (struct ipv6_mreq): Change type of interface
266         member to uint32_t.
267         (struct in6_pktinfo): Ditto.
268
269 2007-01-16  Corinna Vinschen  <corinna@vinschen.de>
270
271         * include/cygwin/in.h (struct ip_mreq_source): Define.
272         (struct ip_msfilter): Define.
273         (IP_MSFILTER_SIZE): Define.
274         (struct in_pktinfo): Define.
275         (struct group_req): Define.
276         (struct group_source_req): Define.
277         (struct group_filter): Define.
278         (GROUP_FILTER_SIZE): Define.
279         (INADDR_ALLRTRS_GROUP): Define.
280         * include/cygwin/socket.h: Define protocol agnostic multicast options.
281
282 2007-01-15  Corinna Vinschen  <corinna@vinschen.de>
283
284         * CYGWIN_LICENSE: Fix web pages and contact information.
285
286 2007-01-15  Corinna Vinschen  <corinna@vinschen.de>
287
288         * ntdll.h: Adjust status definitions.
289
290 2007-01-15  Corinna Vinschen  <corinna@vinschen.de>
291
292         * cygheap.cc (cygheap_init): Add TODO comment.
293
294 2007-01-15  Corinna Vinschen  <corinna@vinschen.de>
295
296         * ntdll.h (STATUS_SHARING_VIOLATION): Define.
297
298 2007-01-13  Corinna Vinschen  <corinna@vinschen.de>
299
300         * syscalls.cc (unlink_nt): Don't move files to recycle bin which are
301         not in use.
302
303 2007-01-13  Christopher Faylor  <me@cgf.cx>
304
305         * glob.cc: Update copyright notice with latest from FreeBSD.
306         (glob0): Use correct type for c variable to propagate previously
307         detected protection.
308
309 2007-01-12  Corinna Vinschen  <corinna@vinschen.de>
310
311         * cygheap.cc (_csbrk): Fix off-by-one error.
312         * cygwin.sc: Give .cygheap a minimum size of 512K.
313
314 2007-01-12  Christopher Faylor  <me@cgf.cx>
315
316         * external.cc (sync_winenv): Use cur_environ () rather than
317         __cygwin_environ.
318
319 2007-01-12  Corinna Vinschen  <corinna@vinschen.de>
320
321         * fork.cc (child_copy): Add missing Windows PID in debug output.
322
323 2007-01-12  Corinna Vinschen  <corinna@vinschen.de>
324
325         * syscalls.cc: Update copyright.
326
327 2007-01-10  Corinna Vinschen  <corinna@vinschen.de>
328
329         * mmap.cc (mmap64): Pre-Reserve space for the whole mapping to get a
330         useful, valid address before the actual mappings take place.
331         Fix typo in comment.
332
333 2007-01-10  Corinna Vinschen  <corinna@vinschen.de>
334
335         * syscalls.cc (sync): Use b_drive for B: drive (Thanks to Howard Chu).
336
337 2007-01-09  Corinna Vinschen  <corinna@vinschen.de>
338
339         * syscalls.cc (getpagesize): Change condition for clarity.
340         (getsystempagesize): Ditto.
341
342 2007-01-09  Corinna Vinschen  <corinna@vinschen.de>
343
344         * mmap.cc: Do bookkeeping in 4K pages, rather than in 64K chunks.
345
346 2007-01-07  Corinna Vinschen  <corinna@vinschen.de>
347
348         * security.h (setacl): Add parameter for writability flag.
349         * sec_acl.cc (setacl): Ditto.  Set to true if any ACE with write
350         permissions is created.
351         * fhandler_disk_file.cc (fhandler_disk_file::facl): Reset
352         FILE_ATTRIBUTE_READONLY if ACL contains an ACE with write permissions.
353
354 2007-01-05  Corinna Vinschen  <corinna@vinschen.de>
355
356         * include/strings.h: Don't include string.h.  Only declare functions
357         according to SUSv3.
358
359 2007-01-04  Corinna Vinschen  <corinna@vinschen.de>
360
361         (get_ifconf): Set MTU for loopback to more correct value.
362
363 2007-01-04  Corinna Vinschen  <corinna@vinschen.de>
364
365         * fhandler_socket.cc (fhandler_socket::ioctl): Don't fake results
366         for SIOCGIFFLAGS here.  Call get_ifconf instead.
367         * net.cc (get_2k_ifconf): Clean up code to generate interface name.
368         Handle SIOCGIFFLAGS here.
369         (get_nt_ifconf): Fake SIOCGIFFLAGS here.
370         (get_95_ifconf): Ditto.
371         (get_ifconf): Don't fake loopback on systems with IP Helper Lib.
372         Set MTU for loopback to a more "modern" value.
373
374 2007-01-04  Brian Ford  <Brian.Ford@FlightSafety.com>
375             Corinna Vinschen  <corinna@vinschen.de>
376
377         * fhandler.h (PREFERRED_IO_BLKSIZE): Define as 64K.
378         * fhandler.cc (fhandler_base::fstat): Set st_blksize to
379         PREFERRED_IO_BLKSIZE.
380         * fhandler_disk_file.cc (fhandler_base::fstat_helper): Ditto.
381         * fhandler_mailslot.cc (fhandler_mailslot::fstat): Ditto.
382         * fhandler_raw.cc (fhandler_dev_raw::fstat): Ditto.
383
384 2007-01-01  Christopher Faylor  <me@cgf.cx>
385
386         * spawn.cc (spawn_guts): Don't expect synchronization from a non-cygwin
387         _P_NOWAIT process.