1 2011-04-04 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
2 Corinna Vinschen <corinna@vinschen.de>
4 * devices.h (fh_devices): Define FH_PROC_MIN_MINOR.
5 Reorder major-0 devices so that all /proc directories fall
6 between FH_PROC and FH_PROC_MIN_MINOR.
7 * path.h (isproc_dev): Redefine accordingly.
9 2011-04-04 Corinna Vinschen <corinna@vinschen.de>
11 * cygserver_setpwd.h (setlsapwd): Add username parameter to declaration.
12 * external.cc (cygwin_internal): In the CW_SET_PRIV_KEY case, fetch
13 additional username parameter.
14 * setlsapwd.cc (setlsapwd): Add username parameter. Allow admin to
15 set the hidden password for other users.
17 2011-04-04 Corinna Vinschen <corinna@vinschen.de>
19 * sec_auth.cc (get_user_groups): Mark well-known groups as well-known.
20 (get_user_local_groups): Ditto.
21 (verify_token): Drop useless label.
22 * sec_helper.cc (cygsid::get_sid): Check for well-known SID if
24 * security.h (well_known_sid_type): New inline function.
26 2011-04-02 Corinna Vinschen <corinna@vinschen.de>
28 * autoload.cc (FindFirstVolumeA): Remove.
29 (FindNextVolumeA): Remove.
30 (FindVolumeClose): Remove.
31 (GetVolumeNameForVolumeMountPointA): Remove.
32 * ntdll.h (NtFlushBuffersFile): Declare.
33 * syscalls.cc (sync_worker): Rewrite using native NT functions.
36 2011-04-02 Corinna Vinschen <corinna@vinschen.de>
38 * fhandler_proc.cc (format_proc_partitions): Express length in WCHAR
41 2011-04-02 Corinna Vinschen <corinna@vinschen.de>
43 * autoload.cc (GetExtendedTcpTable): Remove.
44 (GetTcpTable): Remove.
45 (CharNextExA): Remove.
46 (FindWindowA): Remove.
47 (ShowWindowAsync): Remove.
48 * dcrt0.cc (disable_dep): Remove unused function.
49 (dll_crt0_0): Drop comment babbling about TS & DEP.
50 * fhandler_socket.cc (address_in_use): Remove unused function.
51 * wincap.cc: Throughout, drop ts_has_dep_problem from wincaps.
52 (wincapc::init): Drop code setting ts_has_dep_problem flag.
53 * wincap.h (struct wincaps): Drop ts_has_dep_problem flags and method.
55 2011-04-01 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
57 Implement /proc/sysvipc/*
58 * devices.in (dev_procsysvipc_storage): Add.
59 * devices.cc: Regenerate.
60 * devices.h (fh_devices): Add FH_PROCSYSVIPC.
61 * dtable.cc (build_fh_pc): Add case FH_PROCSYSVIPC.
62 * fhandler.h (class fhandler_procsysvipc): Declare.
63 (fhandler_union): Add __procsysvipc.
64 * fhandler_proc.cc (proc_tab): Add sysvipc virt_directory.
65 * fhandler_procsysvipc.cc: New file.
66 * Makefile.in (DLL_OFILES): Add fhandler_procsysvipc.o.
67 * path.h (isproc_dev): Add FH_PROCSYSVIPC to conditional.
69 2011-04-01 Corinna Vinschen <corinna@vinschen.de>
71 * Makefile.in (DLL_OFILES): Add avapi32.o.
72 * advapi32.cc: New file.
73 * autoload.cc: Add block of remaining advapi32 functions used by
74 Cygwin. Keep commented out. Explain why.
76 2011-04-01 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
78 * fhandler_proc.cc (format_proc_loadavg): Add running/total
79 processes as fourth component of output.
80 * fhandler_process.cc (get_process_state): Make non-static.
81 Add FIXME about generating an 'O' flag.
83 2011-04-01 Corinna Vinschen <corinna@vinschen.de>
85 * fhandler_random.cc (fhandler_dev_random::crypt_gen_random):
86 Use CryptAcquireContextW.
87 * ntdll.h (STATUS_PROCEDURE_NOT_FOUND): Define.
88 * sec_auth.cc (open_local_policy): Rename NTSTATUS variable ret to
89 status. Drop usage of LsaNtStatusToWinError.
90 (verify_token): Call NtQuerySecurityObject instead of
91 GetKernelObjectSecurity.
92 (create_token): Rename NTSTATUS variable ret to status. Rename ret2 to
93 sub_status. Drop usage of LsaNtStatusToWinError. In case LsaLogonUser
94 fails, report the sub_status as well.
96 2011-04-01 Corinna Vinschen <corinna@vinschen.de>
98 * libc/strptime.c: Remove misleading comment.
100 2011-03-31 Corinna Vinschen <corinna@vinschen.de>
102 * ntdll.h: Allow usage from plain C code.
103 (FSCTL_PIPE_IMPERSONATE): Define.
104 (enum _THREAD_INFORMATION_CLASS): Define.
105 (RTL_QUERY_REGISTRY_xxx): Define.
106 (RTL_REGISTRY_xxx): Define.
107 (PRTL_QUERY_REGISTRY_ROUTINE): Define.
108 (struct _RTL_QUERY_REGISTRY_TABLE): Define.
109 (enum _KEY_VALUE_INFORMATION_CLASS): Define.
110 (struct _KEY_VALUE_PARTIAL_INFORMATION): Define.
111 (NtAccessCheck): Declare.
112 (NtAllocateLocallyUniqueId): Declare.
113 (NtCreateKey): Declare.
114 (NtDuplicateToken): Declare.
115 (NtLoadKey): Declare.
116 (NtOpenKey): Declare.
117 (NtOpenProcessToken): Declare.
118 (NtOpenThreadToken): Declare.
119 (NtPrivilegeCheck): Declare.
120 (NtQueryInformationToken): Declare.
121 (NtQueryValueKey): Declare.
122 (NtSetInformationThread): Declare.
123 (NtSetInformationToken): Declare.
124 (NtSetValueKey): Declare.
125 (RtlAbsoluteToSelfRelativeSD): Declare.
126 (RtlAddAccessAllowedAce): Declare.
127 (RtlAddAccessDeniedAce): Declare.
128 (RtlAddAce): Declare.
129 (RtlCheckRegistryKey): Declare.
130 (RtlCopySid): Declare.
131 (RtlCreateAcl): Declare.
132 (RtlCreateRegistryKey): Declare.
133 (RtlCreateSecurityDescriptor): Declare.
134 (RtlEqualPrefixSid): Declare.
135 (RtlEqualSid): Declare.
136 (RtlFirstFreeAce): Declare.
137 (RtlGetAce): Declare.
138 (RtlGetDaclSecurityDescriptor): Declare.
139 (RtlGetGroupSecurityDescriptor): Declare.
140 (RtlGetOwnerSecurityDescriptor): Declare.
141 (RtlIdentifierAuthoritySid): Declare.
142 (RtlInitializeSid): Declare.
143 (RtlLengthSid): Declare.
144 (RtlQueryRegistryValues): Declare.
145 (RtlSetControlSecurityDescriptor): Declare.
146 (RtlSetDaclSecurityDescriptor): Declare.
147 (RtlSetGroupSecurityDescriptor): Declare.
148 (RtlSetOwnerSecurityDescriptor): Declare.
149 (RtlSubAuthorityCountSid): Declare.
150 (RtlSubAuthoritySid): Declare.
151 (RtlWriteRegistryValue): Declare.
153 2011-03-31 Corinna Vinschen <corinna@vinschen.de>
155 * uinfo.cc (cygheap_user::init): Don't call GetUserName. Fetch username
156 from Windows environment instead. Explain why.
157 (cygheap_user::env_domain): Use MAX_DOMAIN_NAME_LEN rather than DNLEN
158 to specify the size of the domain name buffer.
160 2011-03-30 Corinna Vinschen <corinna@vinschen.de>
162 * hires.h: Fix copyright.
164 (FACTOR): Add comment.
166 (JITTER): New definition. Comment.
167 (systime_ns): Avoid gratuitous copying of the value returned by
168 GetSystemTimeAsFileTime.
169 (corelocaltime, localtime, gmtime): Remove very old, unused code block.
170 (cygwin_tzset): Remove.
171 (hires_ms::timeGetTime_ns): Add missing semicolon in comment.
172 (hires_ms::nsecs): Redefine check for difference between internal
173 timer value and system time.
175 2011-03-30 Corinna Vinschen <corinna@vinschen.de>
177 * times.cc (hires_ms::resolution): Make sure resolution is never 0.
178 (clock_setres): Ditto.
180 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
182 * cygtls.h (struct _local_storage): Redefine process_ident as wchar_t
184 * syslog.cc (CYGWIN_LOG_NAME): Convert to wide char constant.
185 (openlog): Convert incoming ident string to wide char. Fix formatting.
186 (vsyslog): Print ident string as wide char string. Convert message
187 string to wide char and call UNICODE Win32 Event functions to make sure
188 to use correct codeset.
189 * tlsoffset.h: Regenerate.
191 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
193 * fhandler_socket.cc (get_inet_addr): Make externally available.
194 * autoload.cc (GetUdpTable): Define.
195 * syslog.cc (connect_syslogd): Use get_inet_addr rather than _stat64
196 to check for local socket file. Create socket with type returned by
197 get_inet_addr. If connect on UDP socket works, test if there's
198 really a listening peer, otherwise fall back to Windows event log.
199 (try_connect_syslogd): Use syslogd_inited flag to check if syslogd
202 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
204 * uinfo.cc (cygheap_user::env_domain): Use LookupAccountSidW and
205 convert user and domain to multibyte strings to make sure to use
208 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
210 * autoload.cc (UuidCreate): Remove.
211 (UuidCreateSequential): Remove.
212 * passwd.cc (internal_getpwsid): Avoid a strict-aliasing compiler
213 error with gcc 4.5.1.
214 * fhandler_floppy.cc (fhandler_dev_floppy::get_drive_info): Ditto.
215 * ntdll.h (NtAllocateUuids): Declare.
216 * syscalls.cc (gethostid): Use NtAllocateUuids function rather than
217 UuidCreateSequential/UuidCreate to get rid of rpcrt4 dependency.
219 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
221 * cygwin.din (pthread_spin_destroy): Export.
222 (pthread_spin_init): Export.
223 (pthread_spin_lock): Export.
224 (pthread_spin_trylock): Export.
225 (pthread_spin_unlock): Export.
226 * posix.sgml (std-susv4): Add pthread_spin_destroy, pthread_spin_init,
227 pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock.
228 (std-notimpl): Remove pthread_spin_[...].
229 * pthread.cc (pthread_spin_init): New function.
230 * thread.cc (pthread_spinlock::is_good_object): New function.
231 (pthread_mutex::pthread_mutex): Rearrange initializers to accommodate
232 protected data in pthread_mutex.
233 (pthread_spinlock::pthread_spinlock): New constructor.
234 (pthread_spinlock::lock): New method.
235 (pthread_spinlock::unlock): New method.
236 (pthread_spinlock::init): New method.
237 (pthread_spin_lock): New function.
238 (pthread_spin_trylock): New function.
239 (pthread_spin_unlock): New function.
240 (pthread_spin_destroy): New function.
241 * thread.h (PTHREAD_SPINLOCK_MAGIC): Define.
242 (class pthread_mutex): Change access level of members shared with
243 derived classes to protected.
244 (pthread_mutex::set_shared): New protected method.
245 (class pthread_spinlock): New class, derived class of pthread_mutex.
246 * include/pthread.h (pthread_spin_destroy): Declare.
247 (pthread_spin_init): Declare.
248 (pthread_spin_lock): Declare.
249 (pthread_spin_trylock): Declare.
250 (pthread_spin_unlock): Declare.
251 * include/cygwin/types.h (pthread_spinlock_t): New typedef.
252 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
254 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
256 * net.cc (SIO_BASE_HANDLE): Define.
257 (fdsock): If we got an LSP handle, try to create a copy of the base
258 handle instead. Change comment to explain.
260 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
262 * include/cygwin/version.h: Bump CYGWIN_VERSION_DLL_MINOR to 10.
264 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
266 * autoload.cc (winmm): Remove time functions. Don't treat
267 unloadable wave functions as fatal.
268 * hires.h (hires_ms::timeGetTime_ns): New private method.
269 (hires_ms::dmsecs): Call timeGetTime_ns here.
270 * ntdll.h (struct _KSYSTEM_TIME): Define.
271 (KUSER_SHARED_DATA): Redefine to allow access to InterruptTime.
272 (SharedUserData): Define here.
273 (NtQueryTimerResolution): Declare.
274 (NtSetTimerResolution): Declare.
275 * path.cc (SharedUserData): Move to ntdll.h.
276 * times.cc (hires_ms::timeGetTime_ns): New private method.
277 Use throughout instead of timeGetTime. Document entire functionality
278 of timeGetTime in case we need it.
279 (hires_ms::resolution): Try a call to NtQueryTimerResolution
280 to fetch current period. Fall back to heuristic if that fails.
281 Cast to DWORD in assignments to minperiod.
282 (clock_setres): Align period to possible values per a call to
283 NtQueryTimerResolution. Explain why. Replace calls to timeBeginPeriod
284 and timeEndPeriod with underlying call to NtSetTimerResolution. Use
285 status code from NtSetTimerResolution to compute errno.
286 Convert period to ULONGLONG and store 100ns value to simplify code.
288 2011-03-29 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
289 Corinna Vinschen <corinna@vinschen.de>
291 * include/sys/xattr.h: New file.
293 2011-03-28 Jon TURNEY <jon.turney@dronecode.org.uk>
295 * thread.cc (semaphore::init, destroy, close): Standards conformance
296 fix. On a failure, return -1 and set errno.
297 * thread.h (semaphore::terminate): Save errno since semaphore::close()
300 2011-03-27 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
302 * cygwin.din (strchrnul): Export.
303 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
304 * posix.sgml (std-gnu): Add strchrnul.
306 2011-03-27 Christopher Faylor <me.cygwin2011@cgf.cx>
308 * dll_init.cc (dll::init): Accommodate ill-behaved dlls who don't fill
311 2011-03-25 Corinna Vinschen <corinna@vinschen.de>
313 * mmap.cc (mmap64): Add a cheat to let a certain autoconf test succeed
314 on 64 bit systems. Explain why.
316 2011-03-23 Christopher Faylor <me.cygwin2011@cgf.cx>
318 * wincap.cc (wincap_2003): Set use_dont_resolve_hack to true.
320 2011-03-23 Christopher Faylor <me.cygwin2011@cgf.cx>
322 * autoload.cc (dll_load): Change error message to make it clear if a
323 newer DLL is being run.
325 2011-03-20 Corinna Vinschen <corinna@vinschen.de>
327 * fenv.cc (_feinitialise): Don't use SSE instructions on systems not
329 * wincap.h (wincaps::supports_sse): New element.
330 * wincap.cc: Implement above element throughout.
332 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
334 * cygwin.sc: Raise default cygheap size to 2 Megs.
336 2011-03-18 Christopher Faylor <me.cygwin2011@cgf.cx>
338 * fhandler.h (DEFAULT_PIPEBUFSIZE): Reset to 64K.
340 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
342 * mmap.cc (mmap_record::alloc_fh): Initialize name strings in fdev to
343 empty strings or suffer a SEGV. Drop second parameter in call to
346 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
348 * mmap.cc (class mmap_record): Pack 4 byte-aligned. Convert member dev
350 (mmap_record::alloc_fh): Create temporary device from dev and use in
351 call to build_fh_dev.
353 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
355 * mmap.cc (mmap_record::page_map): Define as variable array rather than
357 (mmap_record::alloc_page_map): Remove.
358 (mmap_record::free_page_map): Remove.
359 (mmap_record::init_page_map): New method.
360 (mmap_record::add_record): Take mmap_record parameter by reference
361 rather than by value.
362 (mmap_record::map_pages): Fix comment.
363 (mmap_list::add_record): Allocate space for mmap_record including the
364 page_map in a single ccalloc call. Call init_page_map afterwards.
365 (mmap_list::del_record): Remove call to mmap_record::free_page_map.
367 2011-03-16 Corinna Vinschen <corinna@vinschen.de>
369 * crt0.c (mainCRTStartup): Move call to _feinitialise from here...
370 * dcrt0.cc (_dll_crt0): ...to here.
372 2011-03-16 Corinna Vinschen <corinna@vinschen.de>
374 * winver.rc: Fix copyright dates.
376 2011-03-14 Corinna Vinschen <corinna@vinschen.de>
378 * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Only use
379 file id as inode number if it masters the isgood_inode check.
381 2011-03-13 Christopher Faylor <me.cygwin2011@cgf.cx>
383 * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Remove
384 special treatment for ERROR_NO_SYSTEM_RESOURCES. Cancel I/O and reset
385 the overlapped handle on error.
386 (fhandler_base_overlapped::write_overlapped): Limit writes to
387 max_atomic_write bytes in blocking case. Incorporate code from
388 now-defunct write_overlapped_fallback. Fix serious oversight where ptr
389 was not advanced as buffer was written.
390 (fhandler_base_overlapped::write_overlapped_fallback): Eliminate.
391 * fhandler.h (fhandler_base_overlapped::write_overlapped_fallback):
392 Ditto for declaration.
393 (DEFAULT_PIPEBUFSIZE): Lower size to slightly less than documented
394 worst-case atomic write size.
395 (fhandler_overlapped::wait_return): Remove unused element.
397 2011-03-09 Christopher Faylor <me.cygwin2011@cgf.cx>
399 * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Handle
400 overlapped_fallback error condition like other error conditions. Set
401 res carefully and specifically for each condition rather than resorting
403 (fhandler_base_overlapped::write_overlapped): Preserve errno in
404 overlapped_fallback condition. Correct write_overlapped_fallback to
405 avoid inappropriate looping.
406 (fhandler_base_overlapped::write_overlapped_fallback): Add some more
409 2011-03-09 Christopher Faylor <me.cygwin2011@cgf.cx>
411 * fhandler.cc (fhandler_base_overlapped::write_overlapp): Oops!
412 Accommodate change in arguments to wait_overlapped.
414 2011-03-09 Christopher Faylor <me+cygwin@cgf.cx>
416 * errno.cc (errmap): Change mapping of NO_SYSTEM_RESOURCES to EFBIG.
417 * fhandler.cc (MAX_OVERLAPPED_WRITE_LEN): New constant.
418 (MIN_OVERLAPPED_WRITE_LEN): Ditto.
419 (fhandler_base_overlapped::close): Accommodate change in arguments to
421 (fhandler_base_overlapped::setup_overlapped): Add __stdcall and regparm
423 (fhandler_base_overlapped::destroy_overlapped): Ditto.
424 (fhandler_base_overlapped::has_ongoing_io): Ditto.
425 (fhandler_base_overlapped::wait_overlapped): Modify to return an enum
426 returning various states. Accept nonblocking parameter.
427 (fhandler_base_overlapped::read_overlapped): Add __stdcall and regparm
428 modifiers. Rework to attempt to be smarter about reacting to states
429 returned by wait_overlapped.
430 (fhandler_base_overlapped::write_overlapped): Ditto. Add fallback
431 option for when wait_overlapped detects that smaller chunks must be
433 (fhandler_base_overlapped::write_overlapped_fallback): Ditto.
434 * fhandler.h (DEFAULT_PIPEBUFSIZE): Move definition here from pipe.cc.
435 (fhandler_base::has_ongoing_io): Define with __stdcall and regparm
437 (fhandler_base_overlapped::wait_return): New enum.
438 (fhandler_base_overlapped::max_atomic_write): New variable.
439 (fhandler_base_overlapped:: wait_overlapped): Accommodate changes
440 mentioned above to arguments and modifiers.
441 (fhandler_base_overlapped::setup_overlapped): Ditto for modifiers.
442 (fhandler_base_overlapped::read_overlapped): Ditto.
443 (fhandler_base_overlapped::write_overlapped): Ditto.
444 (fhandler_base_overlapped::destroy_overlapped): Ditto.
445 (fhandler_base_overlapped::has_ongoing_io): Ditto.
446 (fhandler_base_overlapped::fhandler_base_overlapped): Zero
448 * fhandler_fifo.cc (fhandler_fifo::fhandler_fifo): Set max_atomic_write
449 to the size of the DEFAULT_PIPEBUFSIZE.
450 (fhandler_fifo::wait): Accommodate change in arguments to
452 * pipe.cc (fhandler_pipe::fhandler_pipe): Set max_atomic_write to the
453 size of the DEFAULT_PIPEBUFSIZE.
454 (fhandler_pipe::create_selectable): Allow minimum size of DEFAULT_PIPEBUFSIZE.
455 (DEFAULT_PIPEBUFSIZE): Delete here, move to fhandler.h.
457 2011-03-08 Corinna Vinschen <corinna@vinschen.de>
459 * security.cc: Fix copyright dates.
461 2011-03-08 Corinna Vinschen <corinna@vinschen.de>
463 * fhandler.cc (fhandler_base::open): When creating a file on a
464 filesystem supporting ACLs, create the file with WRITE_DAC access.
466 * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Ditto for
468 * fhandler_socket.cc (fhandler_socket::bind): Ditto for sockets.
469 * path.cc (symlink_worker): Ditto for symlinks.
470 * security.cc (get_file_sd): Always call GetSecurityInfo for directories
471 on XP and Server 2003. Improve comment to explain why.
472 (set_file_attribute): Explicitely cast mode_t value to bool in call to
474 * wincap.h (wincaps::use_get_sec_info_on_dirs): New element.
475 * wincap.cc: Implement above element throughout.
477 2011-03-04 Corinna Vinschen <corinna@vinschen.de>
479 * fhandler_procsys.cc (fhandler_procsys::exists): Rewrite.
480 (fhandler_procsys::fill_filebuf): Fill buffer with valid string even if
481 reading the symlink fails.
483 2011-03-03 Corinna Vinschen <corinna@vinschen.de>
485 * posix_ipc.cc (ipc_cond_timedwait): If ipc_mutex_unlock fails, return
487 (_mq_send): Break loop if ipc_cond_timedwait returns with error.
488 (_mq_receive): Ditto.
490 2011-03-03 Corinna Vinschen <corinna@vinschen.de>
492 * errno.cc (__xpg_strerror_r): Add accidentally missing condition.
494 2011-03-02 Corinna Vinschen <corinna@vinschen.de>
496 * fhandler_procsys.cc (fhandler_procsys::open): Call worker exists
497 method, rather than wrapper.
499 2011-03-01 Christopher Faylor <me+cygwin@cgf.cx>
501 * autoload.cc (dll_load): Avoid in_forkee test since this apparently
502 fails even when not forked.
504 2011-03-01 Christopher Faylor <me+cygwin@cgf.cx>
506 * include/cygwin/version.h: Bump CYGWIN_VERSION_DLL_MINOR to 9.
508 2011-02-28 Christopher Faylor <me+cygwin@cgf.cx>
510 * autoload.cc (dll_load): Only perform DONT_RESOLVE_DLL_REFERENCES hack
511 on systems which need it.
512 * wincap.cc (use_dont_resolve_hack): Set as appropriate.
513 * wincap.h (use_dont_resolve_hack): Define.
515 2011-02-28 Christopher Faylor <me+cygwin@cgf.cx>
517 * autoload.cc (dll_load): Make inline. Clarify logic.
519 2011-02-27 Corinna Vinschen <corinna@vinschen.de>
521 * autoload.cc (dll_load): Only call LoadLibraryExW with
522 DONT_RESOLVE_DLL_REFERENCES if a normal LoadLibrary call failed with
523 ERROR_INVALID_ADDRESS.
524 (LsaRegisterLogonProcess): Align comment to previous change.
526 2011-02-26 Christopher Faylor <me+cygwin@cgf.cx>
528 * autoload.cc: Use LoadDLLfuncEx3 for all winmm functions. Accommodate
529 changes to LoadDLLprime.
530 (LoadDLLprime): Take an extra argument indicating whether this dll
531 needs special handling on fork. Place this information in the "handle"
533 (LoadDLLfuncEx3): Eliminate "func" handling. Pass new
534 no_resolve_on_fork argument to LoadDLLprime.
535 (dll_load): New function.
536 (std_dll_init): Accommodate changes to dll_info::handle. Use dll_load
537 to load DLL in both cases where it is used.
539 2011-02-26 Corinna Vinschen <corinna@vinschen.de>
541 * autoload.cc: Make autoloaded ntdll function non-optional. Ditto for
542 secur32 functions, except for LsaRegisterLogonProcess. Change return
543 value to ERROR_PROC_NOT_FOUND. Explain why.
544 * sec_auth.cc (lsaauth): Handle ERROR_PROC_NOT_FOUND from call to
545 LsaRegisterLogonProcess when generating the errno value.
547 2011-02-22 Corinna Vinschen <corinna@vinschen.de>
549 * dcrt0.cc: Fix copyright dates.
551 * syscalls.cc (_read): Move EXPORT_ALIAS to its rightful place.
553 2011-02-21 Christopher Faylor <me+cygwin@cgf.cx>
555 * cygwin.din: Mark __assert* and _abort as NOSIGFE.
557 2011-02-21 Corinna Vinschen <corinna@vinschen.de>
559 * fhandler_socket (fhandler_socket::readv): Call recv_internal directly,
561 (fhandler_socket::writev): Call send_internal directly, rather than
563 * net.cc (cygwin_recv): Call fhandler_socket::recvfrom directly, rather
564 than cygwin_recvfrom.
565 (cygwin_send): Call fhandler_socket::sendto directly, rather than
568 2011-02-20 Christopher Faylor <me+cygwin@cgf.cx>
570 * fhandler.cc (fhandler_base_overlapped::close): Finish any pending I/O
572 (fhandler_base_overlapped::wait_overlapped): Defensively zero bytes
573 read. Add more info to debugging output.
575 2011-02-18 Christopher Faylor <me+cygwin@cgf.cx>
577 * dcrt0.cc (dll_crt0_1): Add a CYGHEAP_DEBUG conditional for debugging
578 which allocates a lot of space at startup.
580 2011-02-18 Corinna Vinschen <corinna@vinschen.de>
582 * cygwin.sc: Set alignment of .cygheap section to 64K.
584 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
586 * spawn.cc (spawn_guts): Only set PID_NOTCYGWIN in _P_OVERLAY mode.
587 Drop flag if creating new process failed.
589 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
591 * Throughout fix copyright dates.
593 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
595 * devices.in: Throughout use slashes instead of backslashes in the
596 native path of devices not backed by native NT devices.
597 * devices.cc: Regenerate.
598 * globals.cc (ro_u_pmem): Use correct case.
599 (ro_u_globalroot): New R/O unicode string.
600 * path.cc (path_conv::check): Fix incorrect handling of /proc/sys
601 block devices if they are just visited due to a component check.
602 (symlink_info::posixify): Fix typo in comment.
603 (cygwin_conv_path): Use ro_u_globalroot instead of string constant.
604 (fast_cwd_version): New shared variable to store FAST_CWD version
606 (find_fast_cwd_pointer): Rename from find_fast_cwd_pointers. Don't
607 set global fast_cwd_ptr pointer here. Return pointer value instead.
608 (find_fast_cwd): New function to set fast_cwd_ptr and fast_cwd_version.
609 (cwdstuff::override_win32_cwd): Call find_fast_cwd from here.
610 Check for fast_cwd_version to differ between old and new FAST_CWD
611 structure. Check old_cwd for NULL to avoid SEGV. Don't set CWD if
612 we have neitehr a valid fast_cwd_ptr, nor a valid CWD handle in the
613 process parameter block.
614 (cwdstuff::set): Create Win32 path taking /proc/sys paths into account.
615 * spawn.cc (spawn_guts): Recode creating runpath. Also take /proc/sys
616 paths into account. Drop special CWD handling when starting non-Cygwin
619 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
621 * fhandler_procsys.cc (fhandler_procsys::opendir): Avoid SEGV if
622 opening object directory fails.
623 * fhandler_virtual.cc (fhandler_virtual::opendir): Don't leak memory.
625 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
627 * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Don't
628 append slash if there is one already.
630 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
632 Revert change from 2010-08-31:
633 * path.cc (normalize_posix_path): Drop support for //./ and //?/
635 (path_conv::check): Ditto.
637 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
639 * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Use POSIX
640 path to check for symlink.
642 2011-02-14 Corinna Vinschen <corinna@vinschen.de>
644 * config/i386/profile.h: Sync with Mingw.
646 2011-02-13 Corinna Vinschen <corinna@vinschen.de>
648 * path.cc (struct _FAST_CWD): Redefine to new layout used since patch
649 for KB 2393802. Adjust comments throughout.
650 (struct _FAST_CWD_OLD): Rename former definition.
651 (cwdstuff::override_win32_cwd): Check if the OS is using the old or the
652 new FAST_CWD structure layout and handle accordingly.
654 2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
656 * mkstatic: Make sure that we are not cd'ed to temporary directory on
657 exit to avoid bogus warnings on directory cleanup.
661 2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
663 * cygwin.sc: Eliminate __cygheap_mid.
666 2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
668 * cygheap.cc (_cygheap_mid): Drop unneeded section attribute.
669 (cygheap_init): Just zero cygheap structure.
670 * cygwin.sc: Keep 16 byte alignment but drop all other alignments
671 related to cygheap. Eliminate unused __cygheap_end1.
673 2011-02-11 Corinna Vinschen <corinna@vinschen.de>
675 * cygwin.sc: Raise default cygheap size to 1 Meg. Set alignment to
678 2011-02-11 Corinna Vinschen <corinna@vinschen.de>
680 * include/endian.h: Move definitions of __BIG_ENDIAN, __LITTLE_ENDIAN,
681 and __BYTE_ORDER into ...
682 * include/bits/endian.h: New file.
683 * include/arpa/nameser_compat.h: Include endian.h rather than defining
685 * include/asm/byteorder.h: Include bits/endian.h. Drop definition of
687 * include/netinet/ip.h: Include bits/endian.h. Drop definitions of
688 BIG_ENDIAN, LITTLE_ENDIAN, and BYTE_ORDER. Use underscored variants
689 of aforementioned constants.
690 * include/netinet/tcp.h: Ditto.
691 * include/sys/param.h: Drop disabled definitions of BIG_ENDIAN,
692 LITTLE_ENDIAN, and BYTE_ORDER.
694 * include/netinet/ip.h: Reformat. Define setsockopt IP_TOS options
695 matching recent RFCs. Tweak comments.
697 2011-02-10 Eric Blake <eblake@redhat.com>
699 * errno.cc (includes): Avoid compilation failure if <string.h>
700 settles on wrong strerror_r signature.
702 * errno.cc (__xpg_strerror_r): New function.
703 (strerror_r): Update to copy newlib's fixes.
704 (strerror): Set errno on failure.
705 (_sys_errlist): Cause EINVAL failure for reserved values.
706 * cygwin.din: Export new function.
707 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Combine
710 2011-02-09 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
712 * cygwin.din (pthread_yield): Export as alias to sched_yield.
713 * include/pthread.h (pthread_yield): Declare.
714 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
715 * posix.sgml (std-deprec): Add pthread_yield.
717 2011-02-09 Christopher Faylor <me+cygwin@cgf.cx>
719 * cygheap.cc: Add some __stdcall decoration where appropriate.
720 * lib/cygwin_crt0.c: __attribute -> __attribute__.
722 2011-02-09 Christopher Faylor <me+cygwin@cgf.cx>
724 * hookapi.cc (hook_or_detect_cygwin): Prevent i from being considered
725 uninitialized by gcc.
727 2011-02-09 Christopher Faylor <me+cygwin@cgf.cx>
729 * exception.h: Remove DEBUG_EXCEPTION left over debugging ifdef.
731 2011-02-08 Christopher Faylor <me+cygwin@cgf.cx>
733 * dll_init.cc: Fix typo in comment.
735 2011-02-07 Corinna Vinschen <corinna@vinschen.de>
737 * configure.in: Remove AC_ALLOCA test and test for __builtin_memset.
738 * configure: Regenerate.
740 2011-02-07 Corinna Vinschen <corinna@vinschen.de>
742 * fhandler_console.cc (fhandler_console::write_normal): Remove
743 erroneous premature return after collecting truncated multibyte
744 sequence in trunc_buf. Rather fall through to printing routine.
745 Fix return value to take trunc_buf content into account. Improve
748 2011-02-05 Christopher Faylor <me+cygwin@cgf.cx>
750 * autoload.cc (wsock_init): Properly define WSAStartup function pointer
751 to avoid stack damage.
753 2011-02-02 Corinna Vinschen <corinna@vinschen.de>
755 * libc/bsdlib.cc: Include err.h.
757 2011-02-02 Eric Blake <eblake@redhat.com>
759 * include/err.h: Fix loss of semicolons in previous patch.
761 2011-02-02 Corinna Vinschen <corinna@vinschen.de>
763 * include/err.h (err): Add noreturn attribute.
768 2011-02-02 Corinna Vinschen <corinna@vinschen.de>
770 * path.cc (conv_path_list): Remove enclosing quotes and trailing
771 backslashes from Win32 environment path lists.
773 2011-02-01 Christian Franke <franke@computer.org>
775 * fhandler.cc (fhandler_base::fsync): Ignore ERROR_INVALID_FUNCTION
776 error from FlushFileBuffers().
778 2011-01-31 Corinna Vinschen <corinna@vinschen.de>
780 * syscalls.cc (utmp_data): Fix potential buffer overflow.
782 2011-01-31 Corinna Vinschen <corinna@vinschen.de>
784 * fhandler_socket.cc (address_in_use): Improve comment readability.
786 2011-01-30 Corinna Vinschen <corinna@vinschen.de>
788 * fhandler_socket.cc (address_in_use): Disable. Add comment.
789 (fhandler_socket::bind): Change comment to explain setting the
790 SO_EXCLUSIVEADDRUSE socket option. Remove code which checks for
792 * net.cc (cygwin_setsockopt): Never set SO_REUSEADDR option. Improve
793 comment to compensate for the deleted comment in fhandler_socket::bind.
794 * wincap.cc: Throughout, drop has_enhanced_socket_security from wincaps.
795 * wincap.h (struct wincaps): Drop has_enhanced_socket_security flags
798 2011-01-28 Peter Foley <jpfoley2@verizon.net>
800 * configure.in: Define LIBSERVER regardless of cross_host.
801 * configure: Regenerate.
803 2011-01-28 Corinna Vinschen <corinna@vinschen.de>
805 * fhandler_socket.cc (fhandler_socket::wait_for_events): Call
806 pthread_testcancel in case of timeout to enable pthread_cancel
809 2011-01-27 Corinna Vinschen <corinna@vinschen.de>
811 * include/features.h (__STDC_ISO_10646__): Move to newlib's
814 2011-01-26 Corinna Vinschen <corinna@vinschen.de>
816 * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Fix
817 computation of st_blocks.
818 (fhandler_base::fstat_helper): Fix formatting.
820 2011-01-24 Corinna Vinschen <corinna@vinschen.de>
822 * include/features.h (__STDC_ISO_10646__): Define. Add comment.
824 2011-01-21 Corinna Vinschen <corinna@vinschen.de>
826 * syscalls.cc (rename): Fix permission problem with symlinks on NFS.
827 Rework how NtOpenFile gets called to make it more readable. Change
830 2011-01-20 Corinna Vinschen <corinna@vinschen.de>
832 * exec.cc: Include pinfo.h.
833 * winf.h: Move definitions of _P_PATH_TYPE_EXEC and _P_MODE from here...
834 * pinfo.h: ...to here.
835 (_P_PATH_TYPE_EXEC): Redefine to be bigger than _P_SYSTEM.
836 (_P_MODE): Redefine so as not to mask out _P_SYSTEM.
837 * spawn.cc (spawnlp): Add _P_PATH_TYPE_EXEC flag in call to spawnve.
841 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
843 * spawn.cc (av::fixup): Reenable #! handling for all exec functions.
844 Return ENOEXEC in !p_type_exec case only for unrecognized files.
845 Fix comment formatting.
847 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
849 * exec.cc (execlp): Add missing _P_PATH_TYPE_EXEC flag in call to
852 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
854 * exec.cc: Rearrange functions in alphabetical order.
855 (_execve): Drop temporary define and drop export alias.
856 (execl): Call spawnve.
857 (execle): New function.
858 (execlp): New function.
859 (execv): Call spawnve.
860 (execve): Drop converting NULL envp to emtpy envp.
861 (execvp): Call spawnve.
862 (execvpe): Drop converting NULL envp to emtpy envp. Call spawnve.
863 (fexecve): Call spawnve.
864 * spawn.cc (spawnve): Convert NULL envp to emtpy envp. Remove outdated
866 (spawnlp): Call spawnve.
869 (spawnvpe): Fix formatting.
871 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
873 * exec.cc (strccpy): Move function from here...
874 * strfuncs.cc (strccpy): ...to here.
875 * string.h (strccpy): Declare.
876 * winsup.h (strccpy): Drop declaration.
878 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
880 * errno.cc (errmap): Add error codes for invalid binaries.
881 * exec.cc (execvp): Call spawnve with _P_PATH_TYPE_EXEC flag
884 * spawn.cc (spawn_guts): Filter _P_PATH_TYPE_EXEC from mode and
885 store in p_type_exec. Call av::fixup with addtional p_type_exec
887 (spawnve): Check for filtered mode.
888 (spawnvpe): Add _P_PATH_TYPE_EXEC flag when calling spawnve.
889 (av::fixup): Accept additional bool parameter p_type_exec. Only check
890 for script if p_type_exec is true.
891 * winf.h (_P_PATH_TYPE_EXEC): Define.
893 (av::fixup): Declare with additional bool parameter.
895 2011-01-17 Corinna Vinschen <corinna@vinschen.de>
897 * fhandler_proc.cc (format_proc_partitions): Fix compiler warning.
899 2011-01-17 Corinna Vinschen <corinna@vinschen.de>
901 * path.cc (path_conv::check): Don't follow reparse point symlinks if
902 PC_SYM_NOFOLLOW_REP flag is set.
903 (cygwin_conv_path): Set PC_SYM_NOFOLLOW_REP flag when converting from
905 * path.h (enum pathconv_arg): Define PC_SYM_NOFOLLOW_REP flag.
907 2011-01-17 Corinna Vinschen <corinna@vinschen.de>
909 * fhandler_proc.cc (proc_tab_cmp): Fix typo in comment.
910 (fhandler_proc::fill_filebuf): Handle return value of 0 from format
912 (format_proc_stat): Set errno when returning 0 size.
913 (format_proc_partitions): Rewrite method to fetch partition info.
915 2011-01-13 Corinna Vinschen <corinna@vinschen.de>
917 * fhandler_disk_file.cc (fhandler_base::fstat_helper): Always set
918 st_size of directories to 0. Explain why.
920 2011-01-12 Corinna Vinschen <corinna@vinschen.de>
922 * posix.sgml: Add madvise to BSD list.
924 2011-01-12 Corinna Vinschen <corinna@vinschen.de>
926 * cygwin.din (madvise): Export posix_madvise as madvise.
927 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR.
928 * include/sys/mman.h: Define madvise constants, keep Linux-specific
932 2011-01-12 Corinna Vinschen <corinna@vinschen.de>
934 * fhandler.h (struct part_t): New type.
935 (class fhandler_dev_floppy): Convert partitions to part_t pointer.
936 Add lock_partition method.
937 * fhandler_floppy.cc (fhandler_dev_floppy::lock_partition): New method
938 to implement ondemand partition locking.
939 (fhandler_dev_floppy::write_file): Call lock_partition from here if
940 writing failed due to a potential write restriction on a disk
942 (fhandler_dev_floppy::open): Don't lock partitions here.
943 (fhandler_dev_floppy::close): Keep track of partition handle reference
944 count. Close handles and remove partitions pointer ony if count is 0.
945 (fhandler_dev_floppy::dup): Just copy partitions pointer and increment
948 2011-01-11 Corinna Vinschen <corinna@vinschen.de>
950 * fhandler.h (MAX_PARTITIONS): New definition.
951 (class fhandler_dev_floppy): Add partitions array member. Add close
953 * fhandler_floppy.cc (fhandler_dev_floppy::fhandler_dev_floppy): Zero
954 out partitions array.
955 (fhandler_dev_floppy::open): Fix "entire disk" condition for call to
956 DeviceIoControl (FSCTL_ALLOW_EXTENDED_DASD_IO).
957 When opening disks for writing, call DeviceIoControl (FSCTL_LOCK_VOLUME)
958 on all affected disk partitions starting with Vista.
959 (fhandler_dev_floppy::close): New method.
960 (fhandler_dev_floppy::dup): Duplicate handles in partitions, if any.
961 * wincap.h (wincaps::has_restricted_raw_disk_access): New element.
962 * wincap.cc: Implement above element throughout.
964 2011-01-11 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
966 * termios.cc (cfgetospeed, cfgetispeed): Constify argument per POSIX.
967 * include/sys/termios.h (cfgetospeed, cfgetispeed): Declare functions.
968 Move macros after declarations and make conditional on !__cplusplus.
970 2011-01-11 Corinna Vinschen <corinna@vinschen.de>
972 * cygtls.cc (_cygtls::init_thread): Call _REENT_INIT_PTR. Drop setting
973 current locale and calling srand48.
975 2011-01-02 Christopher Faylor <me+cygwin@cgf.cx>
977 * ChangeLog-2010: Create from ChangeLog.
978 * ChangeLog: Start fresh.