1 2007-02-14 Corinna Vinschen <corinna@vinschen.de>
3 * Makefile.in (DLL_OFILES): Add posix_ipc.o.
4 * cygwin.din (mq_close): Export.
11 (mq_timedreceive): Export.
12 (mq_timedsend): 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.
24 2007-02-13 Corinna Vinschen <corinna@vinschen.de>
26 * include/cygwin/stdlib.h (valloc): Declare.
29 2007-02-09 Pierre A. Humblet <Pierre.Humblet@ieee.org>
31 * libc/minires-os-if.c (write_record): Handle DNS_TYPE_SRV and
34 2007-02-08 Corinna Vinschen <corinna@vinschen.de>
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.
41 2007-02-08 Corinna Vinschen <corinna@vinschen.de>
43 * cygwin.din (shm_open): 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.
53 2007-02-08 Christopher Faylor <me@cgf.cx>
54 Corinna Vinschen <corinna@vinschen.de>
56 * cygmalloc.h (__set_ENOMEM): Declare.
57 (MALLOC_FAILURE_ACTION): Call __set_ENOMEM.
58 * malloc_wrapper.cc (malloc) Remove setting errno here.
63 (posix_memalign): Save and restore errno.
65 2007-02-07 Corinna Vinschen <corinna@vinschen.de>
67 * cygmalloc.h (MALLOC_FAILURE_ACTION): Move to correct #if branch.
69 2007-02-07 Corinna Vinschen <corinna@vinschen.de>
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
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.
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
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
103 2007-02-05 Corinna Vinschen <corinna@vinschen.de>
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
111 2007-02-02 Corinna Vinschen <corinna@vinschen.de>
113 * syscalls.cc (unlink_nt): Add missing assignment in case NtClose fails.
115 2007-02-01 Corinna Vinschen <corinna@vinschen.de>
117 * net.cc (ga_dup): New function, taken from ga_clone with v4-in-v6
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
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.
133 2007-02-01 Corinna Vinschen <corinna@vinschen.de>
135 * include/cygwin/socket.h: Add IPv6 socket options.
137 2007-01-31 Corinna Vinschen <corinna@vinschen.de>
139 * net.cc (cygwin_getaddrinfo): Fix thinko in AI_ADDRCONFIG handling.
141 2007-01-31 Corinna Vinschen <corinna@vinschen.de>
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.
147 2007-01-30 Corinna Vinschen <corinna@vinschen.de>
149 * fhandler_disk_file.cc (fhandler_disk_file::closedir): Add dir name
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
156 2007-01-30 Corinna Vinschen <corinna@vinschen.de>
158 * sigproc.cc (child_info::child_info): Set msv_count to non-zero
159 value only on systems requiring it.
161 2007-01-28 Corinna Vinschen <corinna@vinschen.de>
163 * include/ftw.h: Include sys/cdefs.h.
165 2007-01-26 Corinna Vinschen <corinna@vinschen.de>
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.
173 2007-01-24 Corinna Vinschen <corinna@vinschen.de>
175 * net.cc (if_nametoindex): This time, really free IP_ADAPTER_ADDRESSES
177 (if_indextoname): Ditto.
179 2007-01-24 Corinna Vinschen <corinna@vinschen.de>
181 * security.h (pop_thread_privilege): Revert to previous state, not
182 to token used for impersonation.
184 2007-01-24 Corinna Vinschen <corinna@vinschen.de>
186 * cygheap.h (cygheap_user::deimpersonate): Always RevertToSelf.
188 2007-01-23 Corinna Vinschen <corinna@vinschen.de>
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.
195 2007-01-23 Corinna Vinschen <corinna@vinschen.de>
197 * include/netdb.h: Add AI_xxx flags available since Vista.
199 2007-01-23 Corinna Vinschen <corinna@vinschen.de>
201 * net.cc (if_nametoindex): Free IP_ADAPTER_ADDRESSES memory.
202 (if_indextoname): Ditto.
203 (if_nameindex): Ditto. Remove duplicate indexed entries in result.
205 2007-01-21 Corinna Vinschen <corinna@vinschen.de>
207 * autoload.cc (WSAIoctl): Define.
209 * cygwin.din: Export if_freenameindex, if_indextoname, if_nameindex and
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
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
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.
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.
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
281 2007-01-18 Corinna Vinschen <corinna@vinschen.de>
283 * spawn.cc (spawn_guts): Don't set cwd for non-Cygwin child processes
284 on NT to allow starting them in virtual directories.
286 2007-01-18 Corinna Vinschen <corinna@vinschen.de>
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
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.
300 2007-01-18 Corinna Vinschen <corinna@vinschen.de>
302 * fhandler_procnet.cc: Drop declaration of htonl and ntohs. Include
303 asm/byteorder.h instead.
305 2007-01-18 Corinna Vinschen <corinna@vinschen.de>
307 * include/cygwin/in6.h: Drop inclusion of asm/byteorder.h.
308 * fhandler_procnet.cc: Declare htonl and ntohs here.
310 2007-01-17 Corinna Vinschen <corinna@vinschen.de>
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
331 * include/cygwin/in6.h: Include asm/byteorder.h.
333 2007-01-17 Corinna Vinschen <corinna@vinschen.de>
335 * include/asm/socket.h (SIOGIFINDEX): Define.
337 2007-01-17 Corinna Vinschen <corinna@vinschen.de>
339 * mmap.cc (MapView9x): Note possible uselessness of retrying.
341 (mmap64): Fix pre-reservation to work for non NULL, non MAP_FIXED.
343 2007-01-16 Corinna Vinschen <corinna@vinschen.de>
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
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
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.
365 2007-01-16 Corinna Vinschen <corinna@vinschen.de>
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.
377 2007-01-16 Corinna Vinschen <corinna@vinschen.de>
379 * include/cygwin/in6.h (struct ipv6_mreq): Change type of interface
381 (struct in6_pktinfo): Ditto.
383 2007-01-16 Corinna Vinschen <corinna@vinschen.de>
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.
396 2007-01-15 Corinna Vinschen <corinna@vinschen.de>
398 * CYGWIN_LICENSE: Fix web pages and contact information.
400 2007-01-15 Corinna Vinschen <corinna@vinschen.de>
402 * ntdll.h: Adjust status definitions.
404 2007-01-15 Corinna Vinschen <corinna@vinschen.de>
406 * cygheap.cc (cygheap_init): Add TODO comment.
408 2007-01-15 Corinna Vinschen <corinna@vinschen.de>
410 * ntdll.h (STATUS_SHARING_VIOLATION): Define.
412 2007-01-13 Corinna Vinschen <corinna@vinschen.de>
414 * syscalls.cc (unlink_nt): Don't move files to recycle bin which are
417 2007-01-13 Christopher Faylor <me@cgf.cx>
419 * glob.cc: Update copyright notice with latest from FreeBSD.
420 (glob0): Use correct type for c variable to propagate previously
423 2007-01-12 Corinna Vinschen <corinna@vinschen.de>
425 * cygheap.cc (_csbrk): Fix off-by-one error.
426 * cygwin.sc: Give .cygheap a minimum size of 512K.
428 2007-01-12 Christopher Faylor <me@cgf.cx>
430 * external.cc (sync_winenv): Use cur_environ () rather than
433 2007-01-12 Corinna Vinschen <corinna@vinschen.de>
435 * fork.cc (child_copy): Add missing Windows PID in debug output.
437 2007-01-12 Corinna Vinschen <corinna@vinschen.de>
439 * syscalls.cc: Update copyright.
441 2007-01-10 Corinna Vinschen <corinna@vinschen.de>
443 * mmap.cc (mmap64): Pre-Reserve space for the whole mapping to get a
444 useful, valid address before the actual mappings take place.
447 2007-01-10 Corinna Vinschen <corinna@vinschen.de>
449 * syscalls.cc (sync): Use b_drive for B: drive (Thanks to Howard Chu).
451 2007-01-09 Corinna Vinschen <corinna@vinschen.de>
453 * syscalls.cc (getpagesize): Change condition for clarity.
454 (getsystempagesize): Ditto.
456 2007-01-09 Corinna Vinschen <corinna@vinschen.de>
458 * mmap.cc: Do bookkeeping in 4K pages, rather than in 64K chunks.
460 2007-01-07 Corinna Vinschen <corinna@vinschen.de>
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.
468 2007-01-05 Corinna Vinschen <corinna@vinschen.de>
470 * include/strings.h: Don't include string.h. Only declare functions
473 2007-01-04 Corinna Vinschen <corinna@vinschen.de>
475 (get_ifconf): Set MTU for loopback to more correct value.
477 2007-01-04 Corinna Vinschen <corinna@vinschen.de>
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.
488 2007-01-04 Brian Ford <Brian.Ford@FlightSafety.com>
489 Corinna Vinschen <corinna@vinschen.de>
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.
498 2007-01-01 Christopher Faylor <me@cgf.cx>
500 * spawn.cc (spawn_guts): Don't expect synchronization from a non-cygwin