1 2011-04-18 Corinna Vinschen <corinna@vinschen.de>
3 * cygtls.cc (_cygtls::remove): Always close sockevt handle.
5 2011-04-18 Corinna Vinschen <corinna@vinschen.de>
7 * cygwin.din (ppoll): Export.
8 * poll.cc (ppoll): Implement.
9 * posix.sgml (std-gnu): Add ppoll.
10 * include/cygwin/version.h: Bump API minor number.
11 * include/sys/poll.h (ppoll): Declare.
13 2011-04-18 Corinna Vinschen <corinna@vinschen.de>
15 * fhandler_socket.cc (fhandler_socket::evaluate_events): Handle the
16 FD_CLOSE event specially when called from accept. Explain why.
17 (fhandler_socket::shutdown): Fake success on not-connected socket and
18 trigger socket event if the read side of a socket is affected. Explain
20 * poll.cc (poll): Check for saw_shutdown_read on sockets to generate
23 2011-04-18 Corinna Vinschen <corinna@vinschen.de>
25 * Fix various copyrights.
27 2011-04-17 Christopher Faylor <me.cygwin2011@cgf.cx>
29 * signal.cc (_pinfo::kill): Set this_process_state when process
32 2011-04-17 Christopher Faylor <me.cygwin2011@cgf.cx>
34 * signal.cc (_pinfo::kill): Return 0 when attempting to test for
35 existence of an existed process which has not yet been reaped.
37 2011-04-17 Christopher Faylor <me.cygwin2011@cgf.cx>
39 * cygheap.h (init_cygheap::ctty): Use base class so that console can
41 * dtable.cc (dtable::stdio_init): Remove special-case call to
43 * exceptions.cc (sigpacket::process): Conditionally flush terminal
44 input on certain signals.
45 * fhandler.h (fhandler_console::get_tty_stuff): Make non-static.
46 (fhandler_termios::get_ttyp): Move here.
47 (fhandler_termios::sigflush): Declare.
48 (fhandler_tty_common::get_ttyp): Delete.
49 * fhandler_console.cc (fhandler_console::get_tty_stuff): Pass this as
51 (set_console_ctty): Delete.
52 (tty_list::get_tty): Just return pointer to shared console region,
53 delaying get_tty_stuff until open().
54 (fhandler_console::init): Treat NULL handle as signifying that console
55 should be opened with O_NOCTTY flag. Rename handle argument to the
57 * fhandler_termios.cc (fhandler_termios::sigflush): Define.
58 * fhandler_tty.cc (handler_tty_master::init_console): Pass NULL as
59 first argument to fhandler_console::init.
60 * pinfo.cc (_pinfo::set_ctty): Change third parameter to
61 fhandler_termios *. Add extra debugging.
62 * pinfo.h (_pinfo::set_ctty): Change third parameter to
65 * sigproc.cc (handle_sigsuspend): Don't special-case non-main threads.
67 2011-04-15 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
69 * thread.cc (pthread_setschedprio): New function.
70 * include/pthread.h (pthread_setschedprio): Declare.
71 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
72 * cygwin.din (pthread_setschedprio): Export.
73 * posix.sgml (std-notimpl) Move pthread_setschedprio from here...
74 (std-susv4) ...to here.
76 2011-04-10 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
78 * fhandler_proc.cc (proc_tab): Add /proc/swaps virtual file.
79 (format_proc_swaps): New function.
81 2011-04-06 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
83 * Makefile.in: Move srcdir definition before others which uses it.
85 2011-04-06 Jon TURNEY <jon.turney@dronecode.org.uk>
87 * dll_init.cc (reserve_at, release_at): New functions.
88 (load_after_fork): If the DLL was loaded higher than the required
89 address, assume that it loaded at it's base address and also reserve
90 memory there to force it to be relocated.
92 2011-04-04 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
94 * include/cygwin/types.h: Move #include <sys/sysmacros.h> to
95 end of header so that it gets the dev_t typedef.
96 * include/sys/sysmacros.h (gnu_dev_major, gnu_dev_minor,
97 gnu_dev_makedev): Prototype and define as inline functions.
98 (major, minor, makedev): Redefine in terms of gnu_dev_*.
100 2011-04-04 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
102 * include/cygwin/types.h: Move multiple inclusion guards to
103 beginning and end of header.
105 2011-04-04 Christopher Faylor <me.cygwin2011@cgf.cx>
107 * Makefile.in: Move Makefile.common include earlier to fix problems
108 with relative ${srcdir} path which confuses make.
110 2011-04-04 Corinna Vinschen <corinna@vinschen.de>
113 * autoload.cc (DnsQuery_A): Fatal if not available.
114 (DnsRecordListFree): Ditto.
115 (DsGetDcNameW): Ditto.
116 (NetGetAnyDCName): Remove.
117 (NetGetDCName): Remove.
118 (EnumProcessModules): Fatal if not available.
119 (GetModuleFileNameExW): Ditto.
120 (GetModuleInformation): Ditto.
121 (GetProcessMemoryInfo): Ditto.
122 (QueryWorkingSet): Ditto.
123 (LsaRegisterLogonProcess): Ditto.
124 * fenv.cc (_feinitialise): Drop supports_sse condition.
125 * fhandler_disk_file.cc (path_conv::isgood_inode): Fix comment.
126 (fhandler_base::fstat_by_name): Drop has_fileid_dirinfo condition.
127 (fhandler_disk_file::opendir): Ditto.
128 * fhandler_netdrive.cc (fhandler_netdrive::readdir): Fix comment.
129 * fhandler_proc.cc (format_proc_partitions): Drop NT4-only code.
130 * fhandler_process.cc (get_process_state): Ditto.
131 * kernel32.cc (GetWindowsDirectoryW): Remove.
132 (GetWindowsDirectoryA): Remove.
133 * miscfuncs.cc (nice_to_winprio): Drop NT4-only code.
134 * mount.cc (fs_info::update): Fix comments.
135 * net.cc (get_2k_ifs): Drop NT4-only code.
136 * sec_auth.cc (get_logon_server): Ditto.
137 (lsaauth): Drop NT4-specific error handling.
138 * security.cc (alloc_sd): Set SE_DACL_PROTECTED unconditionally.
139 * select.cc (select_stuff::wait): Always use MWMO_INPUTAVAILABLE.
140 (peek_windows): Drop NT4-only condition in call to PeekMessage.
141 * syscalls.cc (gethostid): Remove NT4-only workaround.
142 * wincap.cc: Througout, drop has_dacl_protect,
143 has_broken_if_oper_status, has_process_io_counters,
144 has_terminal_services, has_extended_priority_class, has_guid_volumes,
145 has_fileid_dirinfo, has_mwmo_inputavailable and supports_sse from
147 (wincap_nt4sp4): Remove.
148 (wincap_minimal): Set to wincap_2000.
149 (wincapc::init): Rely on availability of OSVERSIONINFOEX structure.
150 Treat error from GetVersionEx as fatal. Treat NT4 as fatal.
151 * wincap.h (struct wincaps): Drop has_dacl_protect,
152 has_broken_if_oper_status, has_process_io_counters,
153 has_terminal_services, has_extended_priority_class, has_guid_volumes,
154 has_fileid_dirinfo, has_mwmo_inputavailable and supports_sse flags
156 * winlean.h (GetWindowsDirectoryW) Define as GetSystemWindowsDirectoryW.
157 (GetWindowsDirectoryA): Define as GetSystemWindowsDirectoryA.
159 2011-04-04 Corinna Vinschen <corinna@vinschen.de>
161 * dtable.cc (dtable::init_std_file_from_handle): Fix a comment to
162 reflect the current state.
164 2011-04-04 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
166 * Makefile.in (fhandler_proc_CFLAGS): Define USERNAME, HOSTNAME,
168 * fhandler_proc.cc (format_proc_version): Add build machine and GCC
169 version information as on Linux.
171 2011-04-04 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
172 Corinna Vinschen <corinna@vinschen.de>
174 * devices.h (fh_devices): Define FH_PROC_MIN_MINOR.
175 Reorder major-0 devices so that all /proc directories fall
176 between FH_PROC and FH_PROC_MIN_MINOR.
177 * path.h (isproc_dev): Redefine accordingly.
179 2011-04-04 Corinna Vinschen <corinna@vinschen.de>
181 * cygserver_setpwd.h (setlsapwd): Add username parameter to declaration.
182 * external.cc (cygwin_internal): In the CW_SET_PRIV_KEY case, fetch
183 additional username parameter.
184 * setlsapwd.cc (setlsapwd): Add username parameter. Allow admin to
185 set the hidden password for other users.
187 2011-04-04 Corinna Vinschen <corinna@vinschen.de>
189 * sec_auth.cc (get_user_groups): Mark well-known groups as well-known.
190 (get_user_local_groups): Ditto.
191 (verify_token): Drop useless label.
192 * sec_helper.cc (cygsid::get_sid): Check for well-known SID if
193 well_known isn't set.
194 * security.h (well_known_sid_type): New inline function.
196 2011-04-02 Corinna Vinschen <corinna@vinschen.de>
198 * autoload.cc (FindFirstVolumeA): Remove.
199 (FindNextVolumeA): Remove.
200 (FindVolumeClose): Remove.
201 (GetVolumeNameForVolumeMountPointA): Remove.
202 * ntdll.h (NtFlushBuffersFile): Declare.
203 * syscalls.cc (sync_worker): Rewrite using native NT functions.
206 2011-04-02 Corinna Vinschen <corinna@vinschen.de>
208 * fhandler_proc.cc (format_proc_partitions): Express length in WCHAR
211 2011-04-02 Corinna Vinschen <corinna@vinschen.de>
213 * autoload.cc (GetExtendedTcpTable): Remove.
214 (GetTcpTable): Remove.
215 (CharNextExA): Remove.
216 (FindWindowA): Remove.
217 (ShowWindowAsync): Remove.
218 * dcrt0.cc (disable_dep): Remove unused function.
219 (dll_crt0_0): Drop comment babbling about TS & DEP.
220 * fhandler_socket.cc (address_in_use): Remove unused function.
221 * wincap.cc: Throughout, drop ts_has_dep_problem from wincaps.
222 (wincapc::init): Drop code setting ts_has_dep_problem flag.
223 * wincap.h (struct wincaps): Drop ts_has_dep_problem flags and method.
225 2011-04-01 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
227 Implement /proc/sysvipc/*
228 * devices.in (dev_procsysvipc_storage): Add.
229 * devices.cc: Regenerate.
230 * devices.h (fh_devices): Add FH_PROCSYSVIPC.
231 * dtable.cc (build_fh_pc): Add case FH_PROCSYSVIPC.
232 * fhandler.h (class fhandler_procsysvipc): Declare.
233 (fhandler_union): Add __procsysvipc.
234 * fhandler_proc.cc (proc_tab): Add sysvipc virt_directory.
235 * fhandler_procsysvipc.cc: New file.
236 * Makefile.in (DLL_OFILES): Add fhandler_procsysvipc.o.
237 * path.h (isproc_dev): Add FH_PROCSYSVIPC to conditional.
239 2011-04-01 Corinna Vinschen <corinna@vinschen.de>
241 * Makefile.in (DLL_OFILES): Add avapi32.o.
242 * advapi32.cc: New file.
243 * autoload.cc: Add block of remaining advapi32 functions used by
244 Cygwin. Keep commented out. Explain why.
246 2011-04-01 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
248 * fhandler_proc.cc (format_proc_loadavg): Add running/total
249 processes as fourth component of output.
250 * fhandler_process.cc (get_process_state): Make non-static.
251 Add FIXME about generating an 'O' flag.
253 2011-04-01 Corinna Vinschen <corinna@vinschen.de>
255 * fhandler_random.cc (fhandler_dev_random::crypt_gen_random):
256 Use CryptAcquireContextW.
257 * ntdll.h (STATUS_PROCEDURE_NOT_FOUND): Define.
258 * sec_auth.cc (open_local_policy): Rename NTSTATUS variable ret to
259 status. Drop usage of LsaNtStatusToWinError.
260 (verify_token): Call NtQuerySecurityObject instead of
261 GetKernelObjectSecurity.
262 (create_token): Rename NTSTATUS variable ret to status. Rename ret2 to
263 sub_status. Drop usage of LsaNtStatusToWinError. In case LsaLogonUser
264 fails, report the sub_status as well.
266 2011-04-01 Corinna Vinschen <corinna@vinschen.de>
268 * libc/strptime.c: Remove misleading comment.
270 2011-03-31 Corinna Vinschen <corinna@vinschen.de>
272 * ntdll.h: Allow usage from plain C code.
273 (FSCTL_PIPE_IMPERSONATE): Define.
274 (enum _THREAD_INFORMATION_CLASS): Define.
275 (RTL_QUERY_REGISTRY_xxx): Define.
276 (RTL_REGISTRY_xxx): Define.
277 (PRTL_QUERY_REGISTRY_ROUTINE): Define.
278 (struct _RTL_QUERY_REGISTRY_TABLE): Define.
279 (enum _KEY_VALUE_INFORMATION_CLASS): Define.
280 (struct _KEY_VALUE_PARTIAL_INFORMATION): Define.
281 (NtAccessCheck): Declare.
282 (NtAllocateLocallyUniqueId): Declare.
283 (NtCreateKey): Declare.
284 (NtDuplicateToken): Declare.
285 (NtLoadKey): Declare.
286 (NtOpenKey): Declare.
287 (NtOpenProcessToken): Declare.
288 (NtOpenThreadToken): Declare.
289 (NtPrivilegeCheck): Declare.
290 (NtQueryInformationToken): Declare.
291 (NtQueryValueKey): Declare.
292 (NtSetInformationThread): Declare.
293 (NtSetInformationToken): Declare.
294 (NtSetValueKey): Declare.
295 (RtlAbsoluteToSelfRelativeSD): Declare.
296 (RtlAddAccessAllowedAce): Declare.
297 (RtlAddAccessDeniedAce): Declare.
298 (RtlAddAce): Declare.
299 (RtlCheckRegistryKey): Declare.
300 (RtlCopySid): Declare.
301 (RtlCreateAcl): Declare.
302 (RtlCreateRegistryKey): Declare.
303 (RtlCreateSecurityDescriptor): Declare.
304 (RtlEqualPrefixSid): Declare.
305 (RtlEqualSid): Declare.
306 (RtlFirstFreeAce): Declare.
307 (RtlGetAce): Declare.
308 (RtlGetDaclSecurityDescriptor): Declare.
309 (RtlGetGroupSecurityDescriptor): Declare.
310 (RtlGetOwnerSecurityDescriptor): Declare.
311 (RtlIdentifierAuthoritySid): Declare.
312 (RtlInitializeSid): Declare.
313 (RtlLengthSid): Declare.
314 (RtlQueryRegistryValues): Declare.
315 (RtlSetControlSecurityDescriptor): Declare.
316 (RtlSetDaclSecurityDescriptor): Declare.
317 (RtlSetGroupSecurityDescriptor): Declare.
318 (RtlSetOwnerSecurityDescriptor): Declare.
319 (RtlSubAuthorityCountSid): Declare.
320 (RtlSubAuthoritySid): Declare.
321 (RtlWriteRegistryValue): Declare.
323 2011-03-31 Corinna Vinschen <corinna@vinschen.de>
325 * uinfo.cc (cygheap_user::init): Don't call GetUserName. Fetch username
326 from Windows environment instead. Explain why.
327 (cygheap_user::env_domain): Use MAX_DOMAIN_NAME_LEN rather than DNLEN
328 to specify the size of the domain name buffer.
330 2011-03-30 Corinna Vinschen <corinna@vinschen.de>
332 * hires.h: Fix copyright.
334 (FACTOR): Add comment.
336 (JITTER): New definition. Comment.
337 (systime_ns): Avoid gratuitous copying of the value returned by
338 GetSystemTimeAsFileTime.
339 (corelocaltime, localtime, gmtime): Remove very old, unused code block.
340 (cygwin_tzset): Remove.
341 (hires_ms::timeGetTime_ns): Add missing semicolon in comment.
342 (hires_ms::nsecs): Redefine check for difference between internal
343 timer value and system time.
345 2011-03-30 Corinna Vinschen <corinna@vinschen.de>
347 * times.cc (hires_ms::resolution): Make sure resolution is never 0.
348 (clock_setres): Ditto.
350 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
352 * cygtls.h (struct _local_storage): Redefine process_ident as wchar_t
354 * syslog.cc (CYGWIN_LOG_NAME): Convert to wide char constant.
355 (openlog): Convert incoming ident string to wide char. Fix formatting.
356 (vsyslog): Print ident string as wide char string. Convert message
357 string to wide char and call UNICODE Win32 Event functions to make sure
358 to use correct codeset.
359 * tlsoffset.h: Regenerate.
361 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
363 * fhandler_socket.cc (get_inet_addr): Make externally available.
364 * autoload.cc (GetUdpTable): Define.
365 * syslog.cc (connect_syslogd): Use get_inet_addr rather than _stat64
366 to check for local socket file. Create socket with type returned by
367 get_inet_addr. If connect on UDP socket works, test if there's
368 really a listening peer, otherwise fall back to Windows event log.
369 (try_connect_syslogd): Use syslogd_inited flag to check if syslogd
372 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
374 * uinfo.cc (cygheap_user::env_domain): Use LookupAccountSidW and
375 convert user and domain to multibyte strings to make sure to use
378 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
380 * autoload.cc (UuidCreate): Remove.
381 (UuidCreateSequential): Remove.
382 * passwd.cc (internal_getpwsid): Avoid a strict-aliasing compiler
383 error with gcc 4.5.1.
384 * fhandler_floppy.cc (fhandler_dev_floppy::get_drive_info): Ditto.
385 * ntdll.h (NtAllocateUuids): Declare.
386 * syscalls.cc (gethostid): Use NtAllocateUuids function rather than
387 UuidCreateSequential/UuidCreate to get rid of rpcrt4 dependency.
389 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
391 * cygwin.din (pthread_spin_destroy): Export.
392 (pthread_spin_init): Export.
393 (pthread_spin_lock): Export.
394 (pthread_spin_trylock): Export.
395 (pthread_spin_unlock): Export.
396 * posix.sgml (std-susv4): Add pthread_spin_destroy, pthread_spin_init,
397 pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock.
398 (std-notimpl): Remove pthread_spin_[...].
399 * pthread.cc (pthread_spin_init): New function.
400 * thread.cc (pthread_spinlock::is_good_object): New function.
401 (pthread_mutex::pthread_mutex): Rearrange initializers to accommodate
402 protected data in pthread_mutex.
403 (pthread_spinlock::pthread_spinlock): New constructor.
404 (pthread_spinlock::lock): New method.
405 (pthread_spinlock::unlock): New method.
406 (pthread_spinlock::init): New method.
407 (pthread_spin_lock): New function.
408 (pthread_spin_trylock): New function.
409 (pthread_spin_unlock): New function.
410 (pthread_spin_destroy): New function.
411 * thread.h (PTHREAD_SPINLOCK_MAGIC): Define.
412 (class pthread_mutex): Change access level of members shared with
413 derived classes to protected.
414 (pthread_mutex::set_shared): New protected method.
415 (class pthread_spinlock): New class, derived class of pthread_mutex.
416 * include/pthread.h (pthread_spin_destroy): Declare.
417 (pthread_spin_init): Declare.
418 (pthread_spin_lock): Declare.
419 (pthread_spin_trylock): Declare.
420 (pthread_spin_unlock): Declare.
421 * include/cygwin/types.h (pthread_spinlock_t): New typedef.
422 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
424 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
426 * net.cc (SIO_BASE_HANDLE): Define.
427 (fdsock): If we got an LSP handle, try to create a copy of the base
428 handle instead. Change comment to explain.
430 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
432 * include/cygwin/version.h: Bump CYGWIN_VERSION_DLL_MINOR to 10.
434 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
436 * autoload.cc (winmm): Remove time functions. Don't treat
437 unloadable wave functions as fatal.
438 * hires.h (hires_ms::timeGetTime_ns): New private method.
439 (hires_ms::dmsecs): Call timeGetTime_ns here.
440 * ntdll.h (struct _KSYSTEM_TIME): Define.
441 (KUSER_SHARED_DATA): Redefine to allow access to InterruptTime.
442 (SharedUserData): Define here.
443 (NtQueryTimerResolution): Declare.
444 (NtSetTimerResolution): Declare.
445 * path.cc (SharedUserData): Move to ntdll.h.
446 * times.cc (hires_ms::timeGetTime_ns): New private method.
447 Use throughout instead of timeGetTime. Document entire functionality
448 of timeGetTime in case we need it.
449 (hires_ms::resolution): Try a call to NtQueryTimerResolution
450 to fetch current period. Fall back to heuristic if that fails.
451 Cast to DWORD in assignments to minperiod.
452 (clock_setres): Align period to possible values per a call to
453 NtQueryTimerResolution. Explain why. Replace calls to timeBeginPeriod
454 and timeEndPeriod with underlying call to NtSetTimerResolution. Use
455 status code from NtSetTimerResolution to compute errno.
456 Convert period to ULONGLONG and store 100ns value to simplify code.
458 2011-03-29 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
459 Corinna Vinschen <corinna@vinschen.de>
461 * include/sys/xattr.h: New file.
463 2011-03-28 Jon TURNEY <jon.turney@dronecode.org.uk>
465 * thread.cc (semaphore::init, destroy, close): Standards conformance
466 fix. On a failure, return -1 and set errno.
467 * thread.h (semaphore::terminate): Save errno since semaphore::close()
470 2011-03-27 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
472 * cygwin.din (strchrnul): Export.
473 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
474 * posix.sgml (std-gnu): Add strchrnul.
476 2011-03-27 Christopher Faylor <me.cygwin2011@cgf.cx>
478 * dll_init.cc (dll::init): Accommodate ill-behaved dlls who don't fill
481 2011-03-25 Corinna Vinschen <corinna@vinschen.de>
483 * mmap.cc (mmap64): Add a cheat to let a certain autoconf test succeed
484 on 64 bit systems. Explain why.
486 2011-03-23 Christopher Faylor <me.cygwin2011@cgf.cx>
488 * wincap.cc (wincap_2003): Set use_dont_resolve_hack to true.
490 2011-03-23 Christopher Faylor <me.cygwin2011@cgf.cx>
492 * autoload.cc (dll_load): Change error message to make it clear if a
493 newer DLL is being run.
495 2011-03-20 Corinna Vinschen <corinna@vinschen.de>
497 * fenv.cc (_feinitialise): Don't use SSE instructions on systems not
499 * wincap.h (wincaps::supports_sse): New element.
500 * wincap.cc: Implement above element throughout.
502 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
504 * cygwin.sc: Raise default cygheap size to 2 Megs.
506 2011-03-18 Christopher Faylor <me.cygwin2011@cgf.cx>
508 * fhandler.h (DEFAULT_PIPEBUFSIZE): Reset to 64K.
510 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
512 * mmap.cc (mmap_record::alloc_fh): Initialize name strings in fdev to
513 empty strings or suffer a SEGV. Drop second parameter in call to
516 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
518 * mmap.cc (class mmap_record): Pack 4 byte-aligned. Convert member dev
520 (mmap_record::alloc_fh): Create temporary device from dev and use in
521 call to build_fh_dev.
523 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
525 * mmap.cc (mmap_record::page_map): Define as variable array rather than
527 (mmap_record::alloc_page_map): Remove.
528 (mmap_record::free_page_map): Remove.
529 (mmap_record::init_page_map): New method.
530 (mmap_record::add_record): Take mmap_record parameter by reference
531 rather than by value.
532 (mmap_record::map_pages): Fix comment.
533 (mmap_list::add_record): Allocate space for mmap_record including the
534 page_map in a single ccalloc call. Call init_page_map afterwards.
535 (mmap_list::del_record): Remove call to mmap_record::free_page_map.
537 2011-03-16 Corinna Vinschen <corinna@vinschen.de>
539 * crt0.c (mainCRTStartup): Move call to _feinitialise from here...
540 * dcrt0.cc (_dll_crt0): ...to here.
542 2011-03-16 Corinna Vinschen <corinna@vinschen.de>
544 * winver.rc: Fix copyright dates.
546 2011-03-14 Corinna Vinschen <corinna@vinschen.de>
548 * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Only use
549 file id as inode number if it masters the isgood_inode check.
551 2011-03-13 Christopher Faylor <me.cygwin2011@cgf.cx>
553 * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Remove
554 special treatment for ERROR_NO_SYSTEM_RESOURCES. Cancel I/O and reset
555 the overlapped handle on error.
556 (fhandler_base_overlapped::write_overlapped): Limit writes to
557 max_atomic_write bytes in blocking case. Incorporate code from
558 now-defunct write_overlapped_fallback. Fix serious oversight where ptr
559 was not advanced as buffer was written.
560 (fhandler_base_overlapped::write_overlapped_fallback): Eliminate.
561 * fhandler.h (fhandler_base_overlapped::write_overlapped_fallback):
562 Ditto for declaration.
563 (DEFAULT_PIPEBUFSIZE): Lower size to slightly less than documented
564 worst-case atomic write size.
565 (fhandler_overlapped::wait_return): Remove unused element.
567 2011-03-09 Christopher Faylor <me.cygwin2011@cgf.cx>
569 * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Handle
570 overlapped_fallback error condition like other error conditions. Set
571 res carefully and specifically for each condition rather than resorting
573 (fhandler_base_overlapped::write_overlapped): Preserve errno in
574 overlapped_fallback condition. Correct write_overlapped_fallback to
575 avoid inappropriate looping.
576 (fhandler_base_overlapped::write_overlapped_fallback): Add some more
579 2011-03-09 Christopher Faylor <me.cygwin2011@cgf.cx>
581 * fhandler.cc (fhandler_base_overlapped::write_overlapp): Oops!
582 Accommodate change in arguments to wait_overlapped.
584 2011-03-09 Christopher Faylor <me+cygwin@cgf.cx>
586 * errno.cc (errmap): Change mapping of NO_SYSTEM_RESOURCES to EFBIG.
587 * fhandler.cc (MAX_OVERLAPPED_WRITE_LEN): New constant.
588 (MIN_OVERLAPPED_WRITE_LEN): Ditto.
589 (fhandler_base_overlapped::close): Accommodate change in arguments to
591 (fhandler_base_overlapped::setup_overlapped): Add __stdcall and regparm
593 (fhandler_base_overlapped::destroy_overlapped): Ditto.
594 (fhandler_base_overlapped::has_ongoing_io): Ditto.
595 (fhandler_base_overlapped::wait_overlapped): Modify to return an enum
596 returning various states. Accept nonblocking parameter.
597 (fhandler_base_overlapped::read_overlapped): Add __stdcall and regparm
598 modifiers. Rework to attempt to be smarter about reacting to states
599 returned by wait_overlapped.
600 (fhandler_base_overlapped::write_overlapped): Ditto. Add fallback
601 option for when wait_overlapped detects that smaller chunks must be
603 (fhandler_base_overlapped::write_overlapped_fallback): Ditto.
604 * fhandler.h (DEFAULT_PIPEBUFSIZE): Move definition here from pipe.cc.
605 (fhandler_base::has_ongoing_io): Define with __stdcall and regparm
607 (fhandler_base_overlapped::wait_return): New enum.
608 (fhandler_base_overlapped::max_atomic_write): New variable.
609 (fhandler_base_overlapped:: wait_overlapped): Accommodate changes
610 mentioned above to arguments and modifiers.
611 (fhandler_base_overlapped::setup_overlapped): Ditto for modifiers.
612 (fhandler_base_overlapped::read_overlapped): Ditto.
613 (fhandler_base_overlapped::write_overlapped): Ditto.
614 (fhandler_base_overlapped::destroy_overlapped): Ditto.
615 (fhandler_base_overlapped::has_ongoing_io): Ditto.
616 (fhandler_base_overlapped::fhandler_base_overlapped): Zero
618 * fhandler_fifo.cc (fhandler_fifo::fhandler_fifo): Set max_atomic_write
619 to the size of the DEFAULT_PIPEBUFSIZE.
620 (fhandler_fifo::wait): Accommodate change in arguments to
622 * pipe.cc (fhandler_pipe::fhandler_pipe): Set max_atomic_write to the
623 size of the DEFAULT_PIPEBUFSIZE.
624 (fhandler_pipe::create_selectable): Allow minimum size of DEFAULT_PIPEBUFSIZE.
625 (DEFAULT_PIPEBUFSIZE): Delete here, move to fhandler.h.
627 2011-03-08 Corinna Vinschen <corinna@vinschen.de>
629 * security.cc: Fix copyright dates.
631 2011-03-08 Corinna Vinschen <corinna@vinschen.de>
633 * fhandler.cc (fhandler_base::open): When creating a file on a
634 filesystem supporting ACLs, create the file with WRITE_DAC access.
636 * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Ditto for
638 * fhandler_socket.cc (fhandler_socket::bind): Ditto for sockets.
639 * path.cc (symlink_worker): Ditto for symlinks.
640 * security.cc (get_file_sd): Always call GetSecurityInfo for directories
641 on XP and Server 2003. Improve comment to explain why.
642 (set_file_attribute): Explicitely cast mode_t value to bool in call to
644 * wincap.h (wincaps::use_get_sec_info_on_dirs): New element.
645 * wincap.cc: Implement above element throughout.
647 2011-03-04 Corinna Vinschen <corinna@vinschen.de>
649 * fhandler_procsys.cc (fhandler_procsys::exists): Rewrite.
650 (fhandler_procsys::fill_filebuf): Fill buffer with valid string even if
651 reading the symlink fails.
653 2011-03-03 Corinna Vinschen <corinna@vinschen.de>
655 * posix_ipc.cc (ipc_cond_timedwait): If ipc_mutex_unlock fails, return
657 (_mq_send): Break loop if ipc_cond_timedwait returns with error.
658 (_mq_receive): Ditto.
660 2011-03-03 Corinna Vinschen <corinna@vinschen.de>
662 * errno.cc (__xpg_strerror_r): Add accidentally missing condition.
664 2011-03-02 Corinna Vinschen <corinna@vinschen.de>
666 * fhandler_procsys.cc (fhandler_procsys::open): Call worker exists
667 method, rather than wrapper.
669 2011-03-01 Christopher Faylor <me+cygwin@cgf.cx>
671 * autoload.cc (dll_load): Avoid in_forkee test since this apparently
672 fails even when not forked.
674 2011-03-01 Christopher Faylor <me+cygwin@cgf.cx>
676 * include/cygwin/version.h: Bump CYGWIN_VERSION_DLL_MINOR to 9.
678 2011-02-28 Christopher Faylor <me+cygwin@cgf.cx>
680 * autoload.cc (dll_load): Only perform DONT_RESOLVE_DLL_REFERENCES hack
681 on systems which need it.
682 * wincap.cc (use_dont_resolve_hack): Set as appropriate.
683 * wincap.h (use_dont_resolve_hack): Define.
685 2011-02-28 Christopher Faylor <me+cygwin@cgf.cx>
687 * autoload.cc (dll_load): Make inline. Clarify logic.
689 2011-02-27 Corinna Vinschen <corinna@vinschen.de>
691 * autoload.cc (dll_load): Only call LoadLibraryExW with
692 DONT_RESOLVE_DLL_REFERENCES if a normal LoadLibrary call failed with
693 ERROR_INVALID_ADDRESS.
694 (LsaRegisterLogonProcess): Align comment to previous change.
696 2011-02-26 Christopher Faylor <me+cygwin@cgf.cx>
698 * autoload.cc: Use LoadDLLfuncEx3 for all winmm functions. Accommodate
699 changes to LoadDLLprime.
700 (LoadDLLprime): Take an extra argument indicating whether this dll
701 needs special handling on fork. Place this information in the "handle"
703 (LoadDLLfuncEx3): Eliminate "func" handling. Pass new
704 no_resolve_on_fork argument to LoadDLLprime.
705 (dll_load): New function.
706 (std_dll_init): Accommodate changes to dll_info::handle. Use dll_load
707 to load DLL in both cases where it is used.
709 2011-02-26 Corinna Vinschen <corinna@vinschen.de>
711 * autoload.cc: Make autoloaded ntdll function non-optional. Ditto for
712 secur32 functions, except for LsaRegisterLogonProcess. Change return
713 value to ERROR_PROC_NOT_FOUND. Explain why.
714 * sec_auth.cc (lsaauth): Handle ERROR_PROC_NOT_FOUND from call to
715 LsaRegisterLogonProcess when generating the errno value.
717 2011-02-22 Corinna Vinschen <corinna@vinschen.de>
719 * dcrt0.cc: Fix copyright dates.
721 * syscalls.cc (_read): Move EXPORT_ALIAS to its rightful place.
723 2011-02-21 Christopher Faylor <me+cygwin@cgf.cx>
725 * cygwin.din: Mark __assert* and _abort as NOSIGFE.
727 2011-02-21 Corinna Vinschen <corinna@vinschen.de>
729 * fhandler_socket (fhandler_socket::readv): Call recv_internal directly,
731 (fhandler_socket::writev): Call send_internal directly, rather than
733 * net.cc (cygwin_recv): Call fhandler_socket::recvfrom directly, rather
734 than cygwin_recvfrom.
735 (cygwin_send): Call fhandler_socket::sendto directly, rather than
738 2011-02-20 Christopher Faylor <me+cygwin@cgf.cx>
740 * fhandler.cc (fhandler_base_overlapped::close): Finish any pending I/O
742 (fhandler_base_overlapped::wait_overlapped): Defensively zero bytes
743 read. Add more info to debugging output.
745 2011-02-18 Christopher Faylor <me+cygwin@cgf.cx>
747 * dcrt0.cc (dll_crt0_1): Add a CYGHEAP_DEBUG conditional for debugging
748 which allocates a lot of space at startup.
750 2011-02-18 Corinna Vinschen <corinna@vinschen.de>
752 * cygwin.sc: Set alignment of .cygheap section to 64K.
754 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
756 * spawn.cc (spawn_guts): Only set PID_NOTCYGWIN in _P_OVERLAY mode.
757 Drop flag if creating new process failed.
759 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
761 * Throughout fix copyright dates.
763 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
765 * devices.in: Throughout use slashes instead of backslashes in the
766 native path of devices not backed by native NT devices.
767 * devices.cc: Regenerate.
768 * globals.cc (ro_u_pmem): Use correct case.
769 (ro_u_globalroot): New R/O unicode string.
770 * path.cc (path_conv::check): Fix incorrect handling of /proc/sys
771 block devices if they are just visited due to a component check.
772 (symlink_info::posixify): Fix typo in comment.
773 (cygwin_conv_path): Use ro_u_globalroot instead of string constant.
774 (fast_cwd_version): New shared variable to store FAST_CWD version
776 (find_fast_cwd_pointer): Rename from find_fast_cwd_pointers. Don't
777 set global fast_cwd_ptr pointer here. Return pointer value instead.
778 (find_fast_cwd): New function to set fast_cwd_ptr and fast_cwd_version.
779 (cwdstuff::override_win32_cwd): Call find_fast_cwd from here.
780 Check for fast_cwd_version to differ between old and new FAST_CWD
781 structure. Check old_cwd for NULL to avoid SEGV. Don't set CWD if
782 we have neitehr a valid fast_cwd_ptr, nor a valid CWD handle in the
783 process parameter block.
784 (cwdstuff::set): Create Win32 path taking /proc/sys paths into account.
785 * spawn.cc (spawn_guts): Recode creating runpath. Also take /proc/sys
786 paths into account. Drop special CWD handling when starting non-Cygwin
789 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
791 * fhandler_procsys.cc (fhandler_procsys::opendir): Avoid SEGV if
792 opening object directory fails.
793 * fhandler_virtual.cc (fhandler_virtual::opendir): Don't leak memory.
795 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
797 * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Don't
798 append slash if there is one already.
800 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
802 Revert change from 2010-08-31:
803 * path.cc (normalize_posix_path): Drop support for //./ and //?/
805 (path_conv::check): Ditto.
807 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
809 * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Use POSIX
810 path to check for symlink.
812 2011-02-14 Corinna Vinschen <corinna@vinschen.de>
814 * config/i386/profile.h: Sync with Mingw.
816 2011-02-13 Corinna Vinschen <corinna@vinschen.de>
818 * path.cc (struct _FAST_CWD): Redefine to new layout used since patch
819 for KB 2393802. Adjust comments throughout.
820 (struct _FAST_CWD_OLD): Rename former definition.
821 (cwdstuff::override_win32_cwd): Check if the OS is using the old or the
822 new FAST_CWD structure layout and handle accordingly.
824 2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
826 * mkstatic: Make sure that we are not cd'ed to temporary directory on
827 exit to avoid bogus warnings on directory cleanup.
831 2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
833 * cygwin.sc: Eliminate __cygheap_mid.
836 2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
838 * cygheap.cc (_cygheap_mid): Drop unneeded section attribute.
839 (cygheap_init): Just zero cygheap structure.
840 * cygwin.sc: Keep 16 byte alignment but drop all other alignments
841 related to cygheap. Eliminate unused __cygheap_end1.
843 2011-02-11 Corinna Vinschen <corinna@vinschen.de>
845 * cygwin.sc: Raise default cygheap size to 1 Meg. Set alignment to
848 2011-02-11 Corinna Vinschen <corinna@vinschen.de>
850 * include/endian.h: Move definitions of __BIG_ENDIAN, __LITTLE_ENDIAN,
851 and __BYTE_ORDER into ...
852 * include/bits/endian.h: New file.
853 * include/arpa/nameser_compat.h: Include endian.h rather than defining
855 * include/asm/byteorder.h: Include bits/endian.h. Drop definition of
857 * include/netinet/ip.h: Include bits/endian.h. Drop definitions of
858 BIG_ENDIAN, LITTLE_ENDIAN, and BYTE_ORDER. Use underscored variants
859 of aforementioned constants.
860 * include/netinet/tcp.h: Ditto.
861 * include/sys/param.h: Drop disabled definitions of BIG_ENDIAN,
862 LITTLE_ENDIAN, and BYTE_ORDER.
864 * include/netinet/ip.h: Reformat. Define setsockopt IP_TOS options
865 matching recent RFCs. Tweak comments.
867 2011-02-10 Eric Blake <eblake@redhat.com>
869 * errno.cc (includes): Avoid compilation failure if <string.h>
870 settles on wrong strerror_r signature.
872 * errno.cc (__xpg_strerror_r): New function.
873 (strerror_r): Update to copy newlib's fixes.
874 (strerror): Set errno on failure.
875 (_sys_errlist): Cause EINVAL failure for reserved values.
876 * cygwin.din: Export new function.
877 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Combine
880 2011-02-09 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
882 * cygwin.din (pthread_yield): Export as alias to sched_yield.
883 * include/pthread.h (pthread_yield): Declare.
884 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
885 * posix.sgml (std-deprec): Add pthread_yield.
887 2011-02-09 Christopher Faylor <me+cygwin@cgf.cx>
889 * cygheap.cc: Add some __stdcall decoration where appropriate.
890 * lib/cygwin_crt0.c: __attribute -> __attribute__.
892 2011-02-09 Christopher Faylor <me+cygwin@cgf.cx>
894 * hookapi.cc (hook_or_detect_cygwin): Prevent i from being considered
895 uninitialized by gcc.
897 2011-02-09 Christopher Faylor <me+cygwin@cgf.cx>
899 * exception.h: Remove DEBUG_EXCEPTION left over debugging ifdef.
901 2011-02-08 Christopher Faylor <me+cygwin@cgf.cx>
903 * dll_init.cc: Fix typo in comment.
905 2011-02-07 Corinna Vinschen <corinna@vinschen.de>
907 * configure.in: Remove AC_ALLOCA test and test for __builtin_memset.
908 * configure: Regenerate.
910 2011-02-07 Corinna Vinschen <corinna@vinschen.de>
912 * fhandler_console.cc (fhandler_console::write_normal): Remove
913 erroneous premature return after collecting truncated multibyte
914 sequence in trunc_buf. Rather fall through to printing routine.
915 Fix return value to take trunc_buf content into account. Improve
918 2011-02-05 Christopher Faylor <me+cygwin@cgf.cx>
920 * autoload.cc (wsock_init): Properly define WSAStartup function pointer
921 to avoid stack damage.
923 2011-02-02 Corinna Vinschen <corinna@vinschen.de>
925 * libc/bsdlib.cc: Include err.h.
927 2011-02-02 Eric Blake <eblake@redhat.com>
929 * include/err.h: Fix loss of semicolons in previous patch.
931 2011-02-02 Corinna Vinschen <corinna@vinschen.de>
933 * include/err.h (err): Add noreturn attribute.
938 2011-02-02 Corinna Vinschen <corinna@vinschen.de>
940 * path.cc (conv_path_list): Remove enclosing quotes and trailing
941 backslashes from Win32 environment path lists.
943 2011-02-01 Christian Franke <franke@computer.org>
945 * fhandler.cc (fhandler_base::fsync): Ignore ERROR_INVALID_FUNCTION
946 error from FlushFileBuffers().
948 2011-01-31 Corinna Vinschen <corinna@vinschen.de>
950 * syscalls.cc (utmp_data): Fix potential buffer overflow.
952 2011-01-31 Corinna Vinschen <corinna@vinschen.de>
954 * fhandler_socket.cc (address_in_use): Improve comment readability.
956 2011-01-30 Corinna Vinschen <corinna@vinschen.de>
958 * fhandler_socket.cc (address_in_use): Disable. Add comment.
959 (fhandler_socket::bind): Change comment to explain setting the
960 SO_EXCLUSIVEADDRUSE socket option. Remove code which checks for
962 * net.cc (cygwin_setsockopt): Never set SO_REUSEADDR option. Improve
963 comment to compensate for the deleted comment in fhandler_socket::bind.
964 * wincap.cc: Throughout, drop has_enhanced_socket_security from wincaps.
965 * wincap.h (struct wincaps): Drop has_enhanced_socket_security flags
968 2011-01-28 Peter Foley <jpfoley2@verizon.net>
970 * configure.in: Define LIBSERVER regardless of cross_host.
971 * configure: Regenerate.
973 2011-01-28 Corinna Vinschen <corinna@vinschen.de>
975 * fhandler_socket.cc (fhandler_socket::wait_for_events): Call
976 pthread_testcancel in case of timeout to enable pthread_cancel
979 2011-01-27 Corinna Vinschen <corinna@vinschen.de>
981 * include/features.h (__STDC_ISO_10646__): Move to newlib's
984 2011-01-26 Corinna Vinschen <corinna@vinschen.de>
986 * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Fix
987 computation of st_blocks.
988 (fhandler_base::fstat_helper): Fix formatting.
990 2011-01-24 Corinna Vinschen <corinna@vinschen.de>
992 * include/features.h (__STDC_ISO_10646__): Define. Add comment.
994 2011-01-21 Corinna Vinschen <corinna@vinschen.de>
996 * syscalls.cc (rename): Fix permission problem with symlinks on NFS.
997 Rework how NtOpenFile gets called to make it more readable. Change
1000 2011-01-20 Corinna Vinschen <corinna@vinschen.de>
1002 * exec.cc: Include pinfo.h.
1003 * winf.h: Move definitions of _P_PATH_TYPE_EXEC and _P_MODE from here...
1004 * pinfo.h: ...to here.
1005 (_P_PATH_TYPE_EXEC): Redefine to be bigger than _P_SYSTEM.
1006 (_P_MODE): Redefine so as not to mask out _P_SYSTEM.
1007 * spawn.cc (spawnlp): Add _P_PATH_TYPE_EXEC flag in call to spawnve.
1011 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
1013 * spawn.cc (av::fixup): Reenable #! handling for all exec functions.
1014 Return ENOEXEC in !p_type_exec case only for unrecognized files.
1015 Fix comment formatting.
1017 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
1019 * exec.cc (execlp): Add missing _P_PATH_TYPE_EXEC flag in call to
1022 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
1024 * exec.cc: Rearrange functions in alphabetical order.
1025 (_execve): Drop temporary define and drop export alias.
1026 (execl): Call spawnve.
1027 (execle): New function.
1028 (execlp): New function.
1029 (execv): Call spawnve.
1030 (execve): Drop converting NULL envp to emtpy envp.
1031 (execvp): Call spawnve.
1032 (execvpe): Drop converting NULL envp to emtpy envp. Call spawnve.
1033 (fexecve): Call spawnve.
1034 * spawn.cc (spawnve): Convert NULL envp to emtpy envp. Remove outdated
1036 (spawnlp): Call spawnve.
1039 (spawnvpe): Fix formatting.
1041 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
1043 * exec.cc (strccpy): Move function from here...
1044 * strfuncs.cc (strccpy): ...to here.
1045 * string.h (strccpy): Declare.
1046 * winsup.h (strccpy): Drop declaration.
1048 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
1050 * errno.cc (errmap): Add error codes for invalid binaries.
1051 * exec.cc (execvp): Call spawnve with _P_PATH_TYPE_EXEC flag
1054 * spawn.cc (spawn_guts): Filter _P_PATH_TYPE_EXEC from mode and
1055 store in p_type_exec. Call av::fixup with addtional p_type_exec
1057 (spawnve): Check for filtered mode.
1058 (spawnvpe): Add _P_PATH_TYPE_EXEC flag when calling spawnve.
1059 (av::fixup): Accept additional bool parameter p_type_exec. Only check
1060 for script if p_type_exec is true.
1061 * winf.h (_P_PATH_TYPE_EXEC): Define.
1063 (av::fixup): Declare with additional bool parameter.
1065 2011-01-17 Corinna Vinschen <corinna@vinschen.de>
1067 * fhandler_proc.cc (format_proc_partitions): Fix compiler warning.
1069 2011-01-17 Corinna Vinschen <corinna@vinschen.de>
1071 * path.cc (path_conv::check): Don't follow reparse point symlinks if
1072 PC_SYM_NOFOLLOW_REP flag is set.
1073 (cygwin_conv_path): Set PC_SYM_NOFOLLOW_REP flag when converting from
1075 * path.h (enum pathconv_arg): Define PC_SYM_NOFOLLOW_REP flag.
1077 2011-01-17 Corinna Vinschen <corinna@vinschen.de>
1079 * fhandler_proc.cc (proc_tab_cmp): Fix typo in comment.
1080 (fhandler_proc::fill_filebuf): Handle return value of 0 from format
1082 (format_proc_stat): Set errno when returning 0 size.
1083 (format_proc_partitions): Rewrite method to fetch partition info.
1085 2011-01-13 Corinna Vinschen <corinna@vinschen.de>
1087 * fhandler_disk_file.cc (fhandler_base::fstat_helper): Always set
1088 st_size of directories to 0. Explain why.
1090 2011-01-12 Corinna Vinschen <corinna@vinschen.de>
1092 * posix.sgml: Add madvise to BSD list.
1094 2011-01-12 Corinna Vinschen <corinna@vinschen.de>
1096 * cygwin.din (madvise): Export posix_madvise as madvise.
1097 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR.
1098 * include/sys/mman.h: Define madvise constants, keep Linux-specific
1099 constants undefined.
1102 2011-01-12 Corinna Vinschen <corinna@vinschen.de>
1104 * fhandler.h (struct part_t): New type.
1105 (class fhandler_dev_floppy): Convert partitions to part_t pointer.
1106 Add lock_partition method.
1107 * fhandler_floppy.cc (fhandler_dev_floppy::lock_partition): New method
1108 to implement ondemand partition locking.
1109 (fhandler_dev_floppy::write_file): Call lock_partition from here if
1110 writing failed due to a potential write restriction on a disk
1112 (fhandler_dev_floppy::open): Don't lock partitions here.
1113 (fhandler_dev_floppy::close): Keep track of partition handle reference
1114 count. Close handles and remove partitions pointer ony if count is 0.
1115 (fhandler_dev_floppy::dup): Just copy partitions pointer and increment
1118 2011-01-11 Corinna Vinschen <corinna@vinschen.de>
1120 * fhandler.h (MAX_PARTITIONS): New definition.
1121 (class fhandler_dev_floppy): Add partitions array member. Add close
1123 * fhandler_floppy.cc (fhandler_dev_floppy::fhandler_dev_floppy): Zero
1124 out partitions array.
1125 (fhandler_dev_floppy::open): Fix "entire disk" condition for call to
1126 DeviceIoControl (FSCTL_ALLOW_EXTENDED_DASD_IO).
1127 When opening disks for writing, call DeviceIoControl (FSCTL_LOCK_VOLUME)
1128 on all affected disk partitions starting with Vista.
1129 (fhandler_dev_floppy::close): New method.
1130 (fhandler_dev_floppy::dup): Duplicate handles in partitions, if any.
1131 * wincap.h (wincaps::has_restricted_raw_disk_access): New element.
1132 * wincap.cc: Implement above element throughout.
1134 2011-01-11 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
1136 * termios.cc (cfgetospeed, cfgetispeed): Constify argument per POSIX.
1137 * include/sys/termios.h (cfgetospeed, cfgetispeed): Declare functions.
1138 Move macros after declarations and make conditional on !__cplusplus.
1140 2011-01-11 Corinna Vinschen <corinna@vinschen.de>
1142 * cygtls.cc (_cygtls::init_thread): Call _REENT_INIT_PTR. Drop setting
1143 current locale and calling srand48.
1145 2011-01-02 Christopher Faylor <me+cygwin@cgf.cx>
1147 * ChangeLog-2010: Create from ChangeLog.
1148 * ChangeLog: Start fresh.