OSDN Git Service

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