OSDN Git Service

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