1 2011-04-28 Corinna Vinschen <corinna@vinschen.de>
3 * autoload.cc (GetSecurityInfo): Remove.
4 * ntdll.h (RtlConvertToAutoInheritSecurityObject): Declare.
5 (RtlDeleteSecurityObject): Declare.
6 (RtlGetControlSecurityDescriptor): Declare.
7 (RtlLengthSecurityDescriptor): Declare.
8 * security.cc (file_mapping): New global variable.
9 (get_file_sd): Rewrite. Clean up code. Get rid of GetSecurityInfo
11 (alloc_sd): Call RtlSetControlSecurityDescriptor to set
12 SE_DACL_PROTECTED flag.
13 (check_file_access): Remove mapping. Use file_mapping instead.
14 (check_registry_access): Rename mapping to reg_mapping.
15 * wincap.cc: Througout, drop use_get_sec_info_on_dirs,
16 * wincap.h (struct wincaps): Drop use_get_sec_info_on_dirs.
18 2011-04-24 Corinna Vinschen <corinna@vinschen.de>
20 * include/fenv.h: Add missing _FENV_H_ define.
22 2011-04-23 Corinna Vinschen <corinna@vinschen.de>
24 * registry.cc (reg_key::get_dword): Rename from get_int, use DWORD
25 rather than int type. Avoid compiler warning.
26 (reg_key::set_dword): Rename from set_int, use DWORD rather than int
27 type. Change return type to NTSTATUS.
28 (reg_key::get_string): Change return type to NTSTATUS.
29 (reg_key::set_string): Ditto.
30 * registry.h: Accommodate above changes.
31 * environ.cc (regopt): Test return value of reg_key::get_string as
33 * sched.cc (sched_rr_get_interval): Change local int vars to DWORD.
34 Call reg_key::get_dword instead of reg_key::get_int.
35 * shared.cc (init_installation_root): Test return value of
36 reg_key::get_string as NTSTATUS.
37 (shared_info::heap_slop_size): Call reg_key::get_dword rather than
39 (shared_info::heap_chunk_size): Ditto.
40 * shared_info.h (CURR_SHARED_MAGIC): Update.
41 (class shared_info): Change heap_chunk and heap_slop to DWORD values.
43 2011-04-21 Corinna Vinschen <corinna@vinschen.de>
45 * cygtls.cc (_cygtls::init_thread): Drop setting locals.process_logmask.
46 * cygtls.cc (_cygtls::remove): Always free mallocated TLS storage on
47 thread exit. Drop freeing locals.process_ident.
48 * cygtls.h (struct _local_storage): Remove syslog-related members.
49 * syslog.cc (syslog_globals): New static storage for global syslog
50 settings. Use throughout instead of _my_tls.locals.
51 (openlog): Set new syslog_globals.process_ident value more carefully.
52 * tlsoffsets.h: Regenerate.
54 2011-04-21 Thomas Stalder <cygwinml@gmail.com>
56 * include/sys/poll.h: Include signal.h to get definition of sigset_t.
58 2011-04-20 Christopher Faylor <me.cygwin2011@cgf.cx>
60 * cygheap.cc (init_cygheap::close_ctty): Avoid closing console-cttys
61 since they don't use archetypes and this will just result in double
63 * dll_init.cc (dll_list::protect): Define.
64 (dll_list::alloc): Guard list access.
65 (dll_list::detach): Ditto.
66 * dll_init.h (dll_list::protect): Declare new muto.
67 (dll_list::guard): Define/declare function to guard list access.
68 * fhandler_termios.cc (fhandler_termios::sigflush): Avoid SEGV in
69 pathological condition of get_ttyp() == NULL.
71 2011-04-20 Christopher Faylor <me.cygwin2011@cgf.cx>
73 * select.cc (serial_cleanup): Make sure that device_specific_pipe is
74 always deleted regardless of whether it has a unique thread associated
76 (socket_cleanup): Ditto.
77 (mailslot_cleanup): Ditto.
79 2011-04-20 Corinna Vinschen <corinna@vinschen.de>
81 * devices.h: Renumber internal devices so that FH_PROCESS is part of
82 the /proc family of virtual devices.
83 (FH_PROC_MAX_MINOR): Define.
84 * path.h (isproc_dev): Use FH_PROC_MAX_MINOR rather than FH_PROC.
86 2011-04-19 Peter Rosin <peda@lysator.liu.se>
88 * select.cc (pipe_cleanup): Make sure that device_specific_pipe is
89 always deleted regardless of whether it has a unique thread associated
92 2011-04-19 Jon TURNEY <jon.turney@dronecode.org.uk>
94 * thread.cc (semaphore::init): We cannot reliably infer anything from
95 the existing contents of sem, so merely warn rather than return EBUSY
96 if it looks like we are reinitialising a semaphore.
98 2011-04-19 Corinna Vinschen <corinna@vinschen.de>
100 * autoload.cc (GetConsoleWindow): Drop.
101 (GetSystemWindowsDirectoryW): Drop.
102 * fhandler_console.cc (beep): Call GetSystemWindowsDirectoryW instead of
103 GetWindowsDirectoryW.
104 * uinfo.cc (cygheap_user::env_systemroot): Call
105 GetSystemWindowsDirectoryW and convert to multibyte on the fly.
106 * winlean.h (GetWindowsDirectoryW): Redefine to something invalid.
109 2011-04-19 Corinna Vinschen <corinna@vinschen.de>
111 * Makefile.in (DLL_IMPORTS): Drop advapi32.dll.
112 * autoload.cc: Enable autoloading advapi32 functions.
113 * environ.cc (regopt): Use wide char arguments in reg_key functions.
114 * fhandler_console.cc (beep): Ditto. Use WCHAR throughout.
115 * registry.cc (reg_key): Rewrite reg_key class to use native NT registry
116 functions. Use WCHAR string parameters throughout. Use PCWSTR rather
117 than const WCHAR. Drop multibyte char functionality. Drop unused
119 (get_registry_hive_path): Use RtlQueryRegistryValues to fetch path from
121 (load_registry_hive): Drop useless check for user hive being available.
122 Load hive using NtLoadKey.
123 * registry.h: Accommodate above changes.
124 * sched.cc (sched_rr_get_interval): Use wide char arguments in reg_key
126 * shared.cc (init_installation_root): Ditto.
127 (shared_info::init_obcaseinsensitive): Use RtlQueryRegistryValues to
128 fetch obcaseinsensitive value.
129 (shared_info::heap_slop_size): Use wide char arguments in reg_key
131 (shared_info::heap_chunk_size): Ditto.
132 * syscalls.cc (gethostid): Ditto.
133 * winsup.h (__WIDE): Define.
135 * libc/minires-os-if.c (get_registry_dns_items): Don't fetch values
136 from registry. Just extract them from given UNICODE_STRING parameter.
137 (get_registry_dns): Fetch all registry values at once using
138 RtlQueryRegistryValues.
140 2011-04-19 Corinna Vinschen <corinna@vinschen.de>
142 * net.cc (get_ipv4fromreg_ipcnt): Rearrange to fetch all registry
143 values at once using RtlQueryRegistryValues.
144 (get_ipv4fromreg): Ditto.
146 2011-04-19 Corinna Vinschen <corinna@vinschen.de>
148 * fhandler_registry.cc (fhandler_registry::fstat): Use RegQueryInfoKeyW.
150 2011-04-19 Corinna Vinschen <corinna@vinschen.de>
152 * fhandler_proc.cc (read_value): Remove definition.
154 (format_proc_cpuinfo): Drop useless call to GetSystemInfo. Rearrange
155 to use Rtl registry functions. Rename dwOldThreadAffinityMask to
158 2011-04-18 Corinna Vinschen <corinna@vinschen.de>
160 * localtime.cc (tzload): Don't change global timezone information
161 when called from gmtime or gmtime_r.
164 2011-04-18 Corinna Vinschen <corinna@vinschen.de>
166 * cygtls.cc (_cygtls::remove): Always close sockevt handle.
168 2011-04-18 Corinna Vinschen <corinna@vinschen.de>
170 * cygwin.din (ppoll): Export.
171 * poll.cc (ppoll): Implement.
172 * posix.sgml (std-gnu): Add ppoll.
173 * include/cygwin/version.h: Bump API minor number.
174 * include/sys/poll.h (ppoll): Declare.
176 2011-04-18 Corinna Vinschen <corinna@vinschen.de>
178 * fhandler_socket.cc (fhandler_socket::evaluate_events): Handle the
179 FD_CLOSE event specially when called from accept. Explain why.
180 (fhandler_socket::shutdown): Fake success on not-connected socket and
181 trigger socket event if the read side of a socket is affected. Explain
183 * poll.cc (poll): Check for saw_shutdown_read on sockets to generate
186 2011-04-18 Corinna Vinschen <corinna@vinschen.de>
188 * Fix various copyrights.
190 2011-04-17 Christopher Faylor <me.cygwin2011@cgf.cx>
192 * signal.cc (_pinfo::kill): Set this_process_state when process
195 2011-04-17 Christopher Faylor <me.cygwin2011@cgf.cx>
197 * signal.cc (_pinfo::kill): Return 0 when attempting to test for
198 existence of an existed process which has not yet been reaped.
200 2011-04-17 Christopher Faylor <me.cygwin2011@cgf.cx>
202 * cygheap.h (init_cygheap::ctty): Use base class so that console can
204 * dtable.cc (dtable::stdio_init): Remove special-case call to
206 * exceptions.cc (sigpacket::process): Conditionally flush terminal
207 input on certain signals.
208 * fhandler.h (fhandler_console::get_tty_stuff): Make non-static.
209 (fhandler_termios::get_ttyp): Move here.
210 (fhandler_termios::sigflush): Declare.
211 (fhandler_tty_common::get_ttyp): Delete.
212 * fhandler_console.cc (fhandler_console::get_tty_stuff): Pass this as
214 (set_console_ctty): Delete.
215 (tty_list::get_tty): Just return pointer to shared console region,
216 delaying get_tty_stuff until open().
217 (fhandler_console::init): Treat NULL handle as signifying that console
218 should be opened with O_NOCTTY flag. Rename handle argument to the
220 * fhandler_termios.cc (fhandler_termios::sigflush): Define.
221 * fhandler_tty.cc (handler_tty_master::init_console): Pass NULL as
222 first argument to fhandler_console::init.
223 * pinfo.cc (_pinfo::set_ctty): Change third parameter to
224 fhandler_termios *. Add extra debugging.
225 * pinfo.h (_pinfo::set_ctty): Change third parameter to
228 * sigproc.cc (handle_sigsuspend): Don't special-case non-main threads.
230 2011-04-15 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
232 * thread.cc (pthread_setschedprio): New function.
233 * include/pthread.h (pthread_setschedprio): Declare.
234 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
235 * cygwin.din (pthread_setschedprio): Export.
236 * posix.sgml (std-notimpl) Move pthread_setschedprio from here...
237 (std-susv4) ...to here.
239 2011-04-10 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
241 * fhandler_proc.cc (proc_tab): Add /proc/swaps virtual file.
242 (format_proc_swaps): New function.
244 2011-04-06 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
246 * Makefile.in: Move srcdir definition before others which uses it.
248 2011-04-06 Jon TURNEY <jon.turney@dronecode.org.uk>
250 * dll_init.cc (reserve_at, release_at): New functions.
251 (load_after_fork): If the DLL was loaded higher than the required
252 address, assume that it loaded at it's base address and also reserve
253 memory there to force it to be relocated.
255 2011-04-04 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
257 * include/cygwin/types.h: Move #include <sys/sysmacros.h> to
258 end of header so that it gets the dev_t typedef.
259 * include/sys/sysmacros.h (gnu_dev_major, gnu_dev_minor,
260 gnu_dev_makedev): Prototype and define as inline functions.
261 (major, minor, makedev): Redefine in terms of gnu_dev_*.
263 2011-04-04 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
265 * include/cygwin/types.h: Move multiple inclusion guards to
266 beginning and end of header.
268 2011-04-04 Christopher Faylor <me.cygwin2011@cgf.cx>
270 * Makefile.in: Move Makefile.common include earlier to fix problems
271 with relative ${srcdir} path which confuses make.
273 2011-04-04 Corinna Vinschen <corinna@vinschen.de>
276 * autoload.cc (DnsQuery_A): Fatal if not available.
277 (DnsRecordListFree): Ditto.
278 (DsGetDcNameW): Ditto.
279 (NetGetAnyDCName): Remove.
280 (NetGetDCName): Remove.
281 (EnumProcessModules): Fatal if not available.
282 (GetModuleFileNameExW): Ditto.
283 (GetModuleInformation): Ditto.
284 (GetProcessMemoryInfo): Ditto.
285 (QueryWorkingSet): Ditto.
286 (LsaRegisterLogonProcess): Ditto.
287 * fenv.cc (_feinitialise): Drop supports_sse condition.
288 * fhandler_disk_file.cc (path_conv::isgood_inode): Fix comment.
289 (fhandler_base::fstat_by_name): Drop has_fileid_dirinfo condition.
290 (fhandler_disk_file::opendir): Ditto.
291 * fhandler_netdrive.cc (fhandler_netdrive::readdir): Fix comment.
292 * fhandler_proc.cc (format_proc_partitions): Drop NT4-only code.
293 * fhandler_process.cc (get_process_state): Ditto.
294 * kernel32.cc (GetWindowsDirectoryW): Remove.
295 (GetWindowsDirectoryA): Remove.
296 * miscfuncs.cc (nice_to_winprio): Drop NT4-only code.
297 * mount.cc (fs_info::update): Fix comments.
298 * net.cc (get_2k_ifs): Drop NT4-only code.
299 * sec_auth.cc (get_logon_server): Ditto.
300 (lsaauth): Drop NT4-specific error handling.
301 * security.cc (alloc_sd): Set SE_DACL_PROTECTED unconditionally.
302 * select.cc (select_stuff::wait): Always use MWMO_INPUTAVAILABLE.
303 (peek_windows): Drop NT4-only condition in call to PeekMessage.
304 * syscalls.cc (gethostid): Remove NT4-only workaround.
305 * wincap.cc: Througout, drop has_dacl_protect,
306 has_broken_if_oper_status, has_process_io_counters,
307 has_terminal_services, has_extended_priority_class, has_guid_volumes,
308 has_fileid_dirinfo, has_mwmo_inputavailable and supports_sse from
310 (wincap_nt4sp4): Remove.
311 (wincap_minimal): Set to wincap_2000.
312 (wincapc::init): Rely on availability of OSVERSIONINFOEX structure.
313 Treat error from GetVersionEx as fatal. Treat NT4 as fatal.
314 * wincap.h (struct wincaps): Drop has_dacl_protect,
315 has_broken_if_oper_status, has_process_io_counters,
316 has_terminal_services, has_extended_priority_class, has_guid_volumes,
317 has_fileid_dirinfo, has_mwmo_inputavailable and supports_sse flags
319 * winlean.h (GetWindowsDirectoryW) Define as GetSystemWindowsDirectoryW.
320 (GetWindowsDirectoryA): Define as GetSystemWindowsDirectoryA.
322 2011-04-04 Corinna Vinschen <corinna@vinschen.de>
324 * dtable.cc (dtable::init_std_file_from_handle): Fix a comment to
325 reflect the current state.
327 2011-04-04 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
329 * Makefile.in (fhandler_proc_CFLAGS): Define USERNAME, HOSTNAME,
331 * fhandler_proc.cc (format_proc_version): Add build machine and GCC
332 version information as on Linux.
334 2011-04-04 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
335 Corinna Vinschen <corinna@vinschen.de>
337 * devices.h (fh_devices): Define FH_PROC_MIN_MINOR.
338 Reorder major-0 devices so that all /proc directories fall
339 between FH_PROC and FH_PROC_MIN_MINOR.
340 * path.h (isproc_dev): Redefine accordingly.
342 2011-04-04 Corinna Vinschen <corinna@vinschen.de>
344 * cygserver_setpwd.h (setlsapwd): Add username parameter to declaration.
345 * external.cc (cygwin_internal): In the CW_SET_PRIV_KEY case, fetch
346 additional username parameter.
347 * setlsapwd.cc (setlsapwd): Add username parameter. Allow admin to
348 set the hidden password for other users.
350 2011-04-04 Corinna Vinschen <corinna@vinschen.de>
352 * sec_auth.cc (get_user_groups): Mark well-known groups as well-known.
353 (get_user_local_groups): Ditto.
354 (verify_token): Drop useless label.
355 * sec_helper.cc (cygsid::get_sid): Check for well-known SID if
356 well_known isn't set.
357 * security.h (well_known_sid_type): New inline function.
359 2011-04-02 Corinna Vinschen <corinna@vinschen.de>
361 * autoload.cc (FindFirstVolumeA): Remove.
362 (FindNextVolumeA): Remove.
363 (FindVolumeClose): Remove.
364 (GetVolumeNameForVolumeMountPointA): Remove.
365 * ntdll.h (NtFlushBuffersFile): Declare.
366 * syscalls.cc (sync_worker): Rewrite using native NT functions.
369 2011-04-02 Corinna Vinschen <corinna@vinschen.de>
371 * fhandler_proc.cc (format_proc_partitions): Express length in WCHAR
374 2011-04-02 Corinna Vinschen <corinna@vinschen.de>
376 * autoload.cc (GetExtendedTcpTable): Remove.
377 (GetTcpTable): Remove.
378 (CharNextExA): Remove.
379 (FindWindowA): Remove.
380 (ShowWindowAsync): Remove.
381 * dcrt0.cc (disable_dep): Remove unused function.
382 (dll_crt0_0): Drop comment babbling about TS & DEP.
383 * fhandler_socket.cc (address_in_use): Remove unused function.
384 * wincap.cc: Throughout, drop ts_has_dep_problem from wincaps.
385 (wincapc::init): Drop code setting ts_has_dep_problem flag.
386 * wincap.h (struct wincaps): Drop ts_has_dep_problem flags and method.
388 2011-04-01 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
390 Implement /proc/sysvipc/*
391 * devices.in (dev_procsysvipc_storage): Add.
392 * devices.cc: Regenerate.
393 * devices.h (fh_devices): Add FH_PROCSYSVIPC.
394 * dtable.cc (build_fh_pc): Add case FH_PROCSYSVIPC.
395 * fhandler.h (class fhandler_procsysvipc): Declare.
396 (fhandler_union): Add __procsysvipc.
397 * fhandler_proc.cc (proc_tab): Add sysvipc virt_directory.
398 * fhandler_procsysvipc.cc: New file.
399 * Makefile.in (DLL_OFILES): Add fhandler_procsysvipc.o.
400 * path.h (isproc_dev): Add FH_PROCSYSVIPC to conditional.
402 2011-04-01 Corinna Vinschen <corinna@vinschen.de>
404 * Makefile.in (DLL_OFILES): Add avapi32.o.
405 * advapi32.cc: New file.
406 * autoload.cc: Add block of remaining advapi32 functions used by
407 Cygwin. Keep commented out. Explain why.
409 2011-04-01 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
411 * fhandler_proc.cc (format_proc_loadavg): Add running/total
412 processes as fourth component of output.
413 * fhandler_process.cc (get_process_state): Make non-static.
414 Add FIXME about generating an 'O' flag.
416 2011-04-01 Corinna Vinschen <corinna@vinschen.de>
418 * fhandler_random.cc (fhandler_dev_random::crypt_gen_random):
419 Use CryptAcquireContextW.
420 * ntdll.h (STATUS_PROCEDURE_NOT_FOUND): Define.
421 * sec_auth.cc (open_local_policy): Rename NTSTATUS variable ret to
422 status. Drop usage of LsaNtStatusToWinError.
423 (verify_token): Call NtQuerySecurityObject instead of
424 GetKernelObjectSecurity.
425 (create_token): Rename NTSTATUS variable ret to status. Rename ret2 to
426 sub_status. Drop usage of LsaNtStatusToWinError. In case LsaLogonUser
427 fails, report the sub_status as well.
429 2011-04-01 Corinna Vinschen <corinna@vinschen.de>
431 * libc/strptime.c: Remove misleading comment.
433 2011-03-31 Corinna Vinschen <corinna@vinschen.de>
435 * ntdll.h: Allow usage from plain C code.
436 (FSCTL_PIPE_IMPERSONATE): Define.
437 (enum _THREAD_INFORMATION_CLASS): Define.
438 (RTL_QUERY_REGISTRY_xxx): Define.
439 (RTL_REGISTRY_xxx): Define.
440 (PRTL_QUERY_REGISTRY_ROUTINE): Define.
441 (struct _RTL_QUERY_REGISTRY_TABLE): Define.
442 (enum _KEY_VALUE_INFORMATION_CLASS): Define.
443 (struct _KEY_VALUE_PARTIAL_INFORMATION): Define.
444 (NtAccessCheck): Declare.
445 (NtAllocateLocallyUniqueId): Declare.
446 (NtCreateKey): Declare.
447 (NtDuplicateToken): Declare.
448 (NtLoadKey): Declare.
449 (NtOpenKey): Declare.
450 (NtOpenProcessToken): Declare.
451 (NtOpenThreadToken): Declare.
452 (NtPrivilegeCheck): Declare.
453 (NtQueryInformationToken): Declare.
454 (NtQueryValueKey): Declare.
455 (NtSetInformationThread): Declare.
456 (NtSetInformationToken): Declare.
457 (NtSetValueKey): Declare.
458 (RtlAbsoluteToSelfRelativeSD): Declare.
459 (RtlAddAccessAllowedAce): Declare.
460 (RtlAddAccessDeniedAce): Declare.
461 (RtlAddAce): Declare.
462 (RtlCheckRegistryKey): Declare.
463 (RtlCopySid): Declare.
464 (RtlCreateAcl): Declare.
465 (RtlCreateRegistryKey): Declare.
466 (RtlCreateSecurityDescriptor): Declare.
467 (RtlEqualPrefixSid): Declare.
468 (RtlEqualSid): Declare.
469 (RtlFirstFreeAce): Declare.
470 (RtlGetAce): Declare.
471 (RtlGetDaclSecurityDescriptor): Declare.
472 (RtlGetGroupSecurityDescriptor): Declare.
473 (RtlGetOwnerSecurityDescriptor): Declare.
474 (RtlIdentifierAuthoritySid): Declare.
475 (RtlInitializeSid): Declare.
476 (RtlLengthSid): Declare.
477 (RtlQueryRegistryValues): Declare.
478 (RtlSetControlSecurityDescriptor): Declare.
479 (RtlSetDaclSecurityDescriptor): Declare.
480 (RtlSetGroupSecurityDescriptor): Declare.
481 (RtlSetOwnerSecurityDescriptor): Declare.
482 (RtlSubAuthorityCountSid): Declare.
483 (RtlSubAuthoritySid): Declare.
484 (RtlWriteRegistryValue): Declare.
486 2011-03-31 Corinna Vinschen <corinna@vinschen.de>
488 * uinfo.cc (cygheap_user::init): Don't call GetUserName. Fetch username
489 from Windows environment instead. Explain why.
490 (cygheap_user::env_domain): Use MAX_DOMAIN_NAME_LEN rather than DNLEN
491 to specify the size of the domain name buffer.
493 2011-03-30 Corinna Vinschen <corinna@vinschen.de>
495 * hires.h: Fix copyright.
497 (FACTOR): Add comment.
499 (JITTER): New definition. Comment.
500 (systime_ns): Avoid gratuitous copying of the value returned by
501 GetSystemTimeAsFileTime.
502 (corelocaltime, localtime, gmtime): Remove very old, unused code block.
503 (cygwin_tzset): Remove.
504 (hires_ms::timeGetTime_ns): Add missing semicolon in comment.
505 (hires_ms::nsecs): Redefine check for difference between internal
506 timer value and system time.
508 2011-03-30 Corinna Vinschen <corinna@vinschen.de>
510 * times.cc (hires_ms::resolution): Make sure resolution is never 0.
511 (clock_setres): Ditto.
513 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
515 * cygtls.h (struct _local_storage): Redefine process_ident as wchar_t
517 * syslog.cc (CYGWIN_LOG_NAME): Convert to wide char constant.
518 (openlog): Convert incoming ident string to wide char. Fix formatting.
519 (vsyslog): Print ident string as wide char string. Convert message
520 string to wide char and call UNICODE Win32 Event functions to make sure
521 to use correct codeset.
522 * tlsoffset.h: Regenerate.
524 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
526 * fhandler_socket.cc (get_inet_addr): Make externally available.
527 * autoload.cc (GetUdpTable): Define.
528 * syslog.cc (connect_syslogd): Use get_inet_addr rather than _stat64
529 to check for local socket file. Create socket with type returned by
530 get_inet_addr. If connect on UDP socket works, test if there's
531 really a listening peer, otherwise fall back to Windows event log.
532 (try_connect_syslogd): Use syslogd_inited flag to check if syslogd
535 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
537 * uinfo.cc (cygheap_user::env_domain): Use LookupAccountSidW and
538 convert user and domain to multibyte strings to make sure to use
541 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
543 * autoload.cc (UuidCreate): Remove.
544 (UuidCreateSequential): Remove.
545 * passwd.cc (internal_getpwsid): Avoid a strict-aliasing compiler
546 error with gcc 4.5.1.
547 * fhandler_floppy.cc (fhandler_dev_floppy::get_drive_info): Ditto.
548 * ntdll.h (NtAllocateUuids): Declare.
549 * syscalls.cc (gethostid): Use NtAllocateUuids function rather than
550 UuidCreateSequential/UuidCreate to get rid of rpcrt4 dependency.
552 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
554 * cygwin.din (pthread_spin_destroy): Export.
555 (pthread_spin_init): Export.
556 (pthread_spin_lock): Export.
557 (pthread_spin_trylock): Export.
558 (pthread_spin_unlock): Export.
559 * posix.sgml (std-susv4): Add pthread_spin_destroy, pthread_spin_init,
560 pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock.
561 (std-notimpl): Remove pthread_spin_[...].
562 * pthread.cc (pthread_spin_init): New function.
563 * thread.cc (pthread_spinlock::is_good_object): New function.
564 (pthread_mutex::pthread_mutex): Rearrange initializers to accommodate
565 protected data in pthread_mutex.
566 (pthread_spinlock::pthread_spinlock): New constructor.
567 (pthread_spinlock::lock): New method.
568 (pthread_spinlock::unlock): New method.
569 (pthread_spinlock::init): New method.
570 (pthread_spin_lock): New function.
571 (pthread_spin_trylock): New function.
572 (pthread_spin_unlock): New function.
573 (pthread_spin_destroy): New function.
574 * thread.h (PTHREAD_SPINLOCK_MAGIC): Define.
575 (class pthread_mutex): Change access level of members shared with
576 derived classes to protected.
577 (pthread_mutex::set_shared): New protected method.
578 (class pthread_spinlock): New class, derived class of pthread_mutex.
579 * include/pthread.h (pthread_spin_destroy): Declare.
580 (pthread_spin_init): Declare.
581 (pthread_spin_lock): Declare.
582 (pthread_spin_trylock): Declare.
583 (pthread_spin_unlock): Declare.
584 * include/cygwin/types.h (pthread_spinlock_t): New typedef.
585 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
587 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
589 * net.cc (SIO_BASE_HANDLE): Define.
590 (fdsock): If we got an LSP handle, try to create a copy of the base
591 handle instead. Change comment to explain.
593 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
595 * include/cygwin/version.h: Bump CYGWIN_VERSION_DLL_MINOR to 10.
597 2011-03-29 Corinna Vinschen <corinna@vinschen.de>
599 * autoload.cc (winmm): Remove time functions. Don't treat
600 unloadable wave functions as fatal.
601 * hires.h (hires_ms::timeGetTime_ns): New private method.
602 (hires_ms::dmsecs): Call timeGetTime_ns here.
603 * ntdll.h (struct _KSYSTEM_TIME): Define.
604 (KUSER_SHARED_DATA): Redefine to allow access to InterruptTime.
605 (SharedUserData): Define here.
606 (NtQueryTimerResolution): Declare.
607 (NtSetTimerResolution): Declare.
608 * path.cc (SharedUserData): Move to ntdll.h.
609 * times.cc (hires_ms::timeGetTime_ns): New private method.
610 Use throughout instead of timeGetTime. Document entire functionality
611 of timeGetTime in case we need it.
612 (hires_ms::resolution): Try a call to NtQueryTimerResolution
613 to fetch current period. Fall back to heuristic if that fails.
614 Cast to DWORD in assignments to minperiod.
615 (clock_setres): Align period to possible values per a call to
616 NtQueryTimerResolution. Explain why. Replace calls to timeBeginPeriod
617 and timeEndPeriod with underlying call to NtSetTimerResolution. Use
618 status code from NtSetTimerResolution to compute errno.
619 Convert period to ULONGLONG and store 100ns value to simplify code.
621 2011-03-29 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
622 Corinna Vinschen <corinna@vinschen.de>
624 * include/sys/xattr.h: New file.
626 2011-03-28 Jon TURNEY <jon.turney@dronecode.org.uk>
628 * thread.cc (semaphore::init, destroy, close): Standards conformance
629 fix. On a failure, return -1 and set errno.
630 * thread.h (semaphore::terminate): Save errno since semaphore::close()
633 2011-03-27 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
635 * cygwin.din (strchrnul): Export.
636 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
637 * posix.sgml (std-gnu): Add strchrnul.
639 2011-03-27 Christopher Faylor <me.cygwin2011@cgf.cx>
641 * dll_init.cc (dll::init): Accommodate ill-behaved dlls who don't fill
644 2011-03-25 Corinna Vinschen <corinna@vinschen.de>
646 * mmap.cc (mmap64): Add a cheat to let a certain autoconf test succeed
647 on 64 bit systems. Explain why.
649 2011-03-23 Christopher Faylor <me.cygwin2011@cgf.cx>
651 * wincap.cc (wincap_2003): Set use_dont_resolve_hack to true.
653 2011-03-23 Christopher Faylor <me.cygwin2011@cgf.cx>
655 * autoload.cc (dll_load): Change error message to make it clear if a
656 newer DLL is being run.
658 2011-03-20 Corinna Vinschen <corinna@vinschen.de>
660 * fenv.cc (_feinitialise): Don't use SSE instructions on systems not
662 * wincap.h (wincaps::supports_sse): New element.
663 * wincap.cc: Implement above element throughout.
665 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
667 * cygwin.sc: Raise default cygheap size to 2 Megs.
669 2011-03-18 Christopher Faylor <me.cygwin2011@cgf.cx>
671 * fhandler.h (DEFAULT_PIPEBUFSIZE): Reset to 64K.
673 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
675 * mmap.cc (mmap_record::alloc_fh): Initialize name strings in fdev to
676 empty strings or suffer a SEGV. Drop second parameter in call to
679 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
681 * mmap.cc (class mmap_record): Pack 4 byte-aligned. Convert member dev
683 (mmap_record::alloc_fh): Create temporary device from dev and use in
684 call to build_fh_dev.
686 2011-03-18 Corinna Vinschen <corinna@vinschen.de>
688 * mmap.cc (mmap_record::page_map): Define as variable array rather than
690 (mmap_record::alloc_page_map): Remove.
691 (mmap_record::free_page_map): Remove.
692 (mmap_record::init_page_map): New method.
693 (mmap_record::add_record): Take mmap_record parameter by reference
694 rather than by value.
695 (mmap_record::map_pages): Fix comment.
696 (mmap_list::add_record): Allocate space for mmap_record including the
697 page_map in a single ccalloc call. Call init_page_map afterwards.
698 (mmap_list::del_record): Remove call to mmap_record::free_page_map.
700 2011-03-16 Corinna Vinschen <corinna@vinschen.de>
702 * crt0.c (mainCRTStartup): Move call to _feinitialise from here...
703 * dcrt0.cc (_dll_crt0): ...to here.
705 2011-03-16 Corinna Vinschen <corinna@vinschen.de>
707 * winver.rc: Fix copyright dates.
709 2011-03-14 Corinna Vinschen <corinna@vinschen.de>
711 * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Only use
712 file id as inode number if it masters the isgood_inode check.
714 2011-03-13 Christopher Faylor <me.cygwin2011@cgf.cx>
716 * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Remove
717 special treatment for ERROR_NO_SYSTEM_RESOURCES. Cancel I/O and reset
718 the overlapped handle on error.
719 (fhandler_base_overlapped::write_overlapped): Limit writes to
720 max_atomic_write bytes in blocking case. Incorporate code from
721 now-defunct write_overlapped_fallback. Fix serious oversight where ptr
722 was not advanced as buffer was written.
723 (fhandler_base_overlapped::write_overlapped_fallback): Eliminate.
724 * fhandler.h (fhandler_base_overlapped::write_overlapped_fallback):
725 Ditto for declaration.
726 (DEFAULT_PIPEBUFSIZE): Lower size to slightly less than documented
727 worst-case atomic write size.
728 (fhandler_overlapped::wait_return): Remove unused element.
730 2011-03-09 Christopher Faylor <me.cygwin2011@cgf.cx>
732 * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Handle
733 overlapped_fallback error condition like other error conditions. Set
734 res carefully and specifically for each condition rather than resorting
736 (fhandler_base_overlapped::write_overlapped): Preserve errno in
737 overlapped_fallback condition. Correct write_overlapped_fallback to
738 avoid inappropriate looping.
739 (fhandler_base_overlapped::write_overlapped_fallback): Add some more
742 2011-03-09 Christopher Faylor <me.cygwin2011@cgf.cx>
744 * fhandler.cc (fhandler_base_overlapped::write_overlapp): Oops!
745 Accommodate change in arguments to wait_overlapped.
747 2011-03-09 Christopher Faylor <me+cygwin@cgf.cx>
749 * errno.cc (errmap): Change mapping of NO_SYSTEM_RESOURCES to EFBIG.
750 * fhandler.cc (MAX_OVERLAPPED_WRITE_LEN): New constant.
751 (MIN_OVERLAPPED_WRITE_LEN): Ditto.
752 (fhandler_base_overlapped::close): Accommodate change in arguments to
754 (fhandler_base_overlapped::setup_overlapped): Add __stdcall and regparm
756 (fhandler_base_overlapped::destroy_overlapped): Ditto.
757 (fhandler_base_overlapped::has_ongoing_io): Ditto.
758 (fhandler_base_overlapped::wait_overlapped): Modify to return an enum
759 returning various states. Accept nonblocking parameter.
760 (fhandler_base_overlapped::read_overlapped): Add __stdcall and regparm
761 modifiers. Rework to attempt to be smarter about reacting to states
762 returned by wait_overlapped.
763 (fhandler_base_overlapped::write_overlapped): Ditto. Add fallback
764 option for when wait_overlapped detects that smaller chunks must be
766 (fhandler_base_overlapped::write_overlapped_fallback): Ditto.
767 * fhandler.h (DEFAULT_PIPEBUFSIZE): Move definition here from pipe.cc.
768 (fhandler_base::has_ongoing_io): Define with __stdcall and regparm
770 (fhandler_base_overlapped::wait_return): New enum.
771 (fhandler_base_overlapped::max_atomic_write): New variable.
772 (fhandler_base_overlapped:: wait_overlapped): Accommodate changes
773 mentioned above to arguments and modifiers.
774 (fhandler_base_overlapped::setup_overlapped): Ditto for modifiers.
775 (fhandler_base_overlapped::read_overlapped): Ditto.
776 (fhandler_base_overlapped::write_overlapped): Ditto.
777 (fhandler_base_overlapped::destroy_overlapped): Ditto.
778 (fhandler_base_overlapped::has_ongoing_io): Ditto.
779 (fhandler_base_overlapped::fhandler_base_overlapped): Zero
781 * fhandler_fifo.cc (fhandler_fifo::fhandler_fifo): Set max_atomic_write
782 to the size of the DEFAULT_PIPEBUFSIZE.
783 (fhandler_fifo::wait): Accommodate change in arguments to
785 * pipe.cc (fhandler_pipe::fhandler_pipe): Set max_atomic_write to the
786 size of the DEFAULT_PIPEBUFSIZE.
787 (fhandler_pipe::create_selectable): Allow minimum size of DEFAULT_PIPEBUFSIZE.
788 (DEFAULT_PIPEBUFSIZE): Delete here, move to fhandler.h.
790 2011-03-08 Corinna Vinschen <corinna@vinschen.de>
792 * security.cc: Fix copyright dates.
794 2011-03-08 Corinna Vinschen <corinna@vinschen.de>
796 * fhandler.cc (fhandler_base::open): When creating a file on a
797 filesystem supporting ACLs, create the file with WRITE_DAC access.
799 * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Ditto for
801 * fhandler_socket.cc (fhandler_socket::bind): Ditto for sockets.
802 * path.cc (symlink_worker): Ditto for symlinks.
803 * security.cc (get_file_sd): Always call GetSecurityInfo for directories
804 on XP and Server 2003. Improve comment to explain why.
805 (set_file_attribute): Explicitely cast mode_t value to bool in call to
807 * wincap.h (wincaps::use_get_sec_info_on_dirs): New element.
808 * wincap.cc: Implement above element throughout.
810 2011-03-04 Corinna Vinschen <corinna@vinschen.de>
812 * fhandler_procsys.cc (fhandler_procsys::exists): Rewrite.
813 (fhandler_procsys::fill_filebuf): Fill buffer with valid string even if
814 reading the symlink fails.
816 2011-03-03 Corinna Vinschen <corinna@vinschen.de>
818 * posix_ipc.cc (ipc_cond_timedwait): If ipc_mutex_unlock fails, return
820 (_mq_send): Break loop if ipc_cond_timedwait returns with error.
821 (_mq_receive): Ditto.
823 2011-03-03 Corinna Vinschen <corinna@vinschen.de>
825 * errno.cc (__xpg_strerror_r): Add accidentally missing condition.
827 2011-03-02 Corinna Vinschen <corinna@vinschen.de>
829 * fhandler_procsys.cc (fhandler_procsys::open): Call worker exists
830 method, rather than wrapper.
832 2011-03-01 Christopher Faylor <me+cygwin@cgf.cx>
834 * autoload.cc (dll_load): Avoid in_forkee test since this apparently
835 fails even when not forked.
837 2011-03-01 Christopher Faylor <me+cygwin@cgf.cx>
839 * include/cygwin/version.h: Bump CYGWIN_VERSION_DLL_MINOR to 9.
841 2011-02-28 Christopher Faylor <me+cygwin@cgf.cx>
843 * autoload.cc (dll_load): Only perform DONT_RESOLVE_DLL_REFERENCES hack
844 on systems which need it.
845 * wincap.cc (use_dont_resolve_hack): Set as appropriate.
846 * wincap.h (use_dont_resolve_hack): Define.
848 2011-02-28 Christopher Faylor <me+cygwin@cgf.cx>
850 * autoload.cc (dll_load): Make inline. Clarify logic.
852 2011-02-27 Corinna Vinschen <corinna@vinschen.de>
854 * autoload.cc (dll_load): Only call LoadLibraryExW with
855 DONT_RESOLVE_DLL_REFERENCES if a normal LoadLibrary call failed with
856 ERROR_INVALID_ADDRESS.
857 (LsaRegisterLogonProcess): Align comment to previous change.
859 2011-02-26 Christopher Faylor <me+cygwin@cgf.cx>
861 * autoload.cc: Use LoadDLLfuncEx3 for all winmm functions. Accommodate
862 changes to LoadDLLprime.
863 (LoadDLLprime): Take an extra argument indicating whether this dll
864 needs special handling on fork. Place this information in the "handle"
866 (LoadDLLfuncEx3): Eliminate "func" handling. Pass new
867 no_resolve_on_fork argument to LoadDLLprime.
868 (dll_load): New function.
869 (std_dll_init): Accommodate changes to dll_info::handle. Use dll_load
870 to load DLL in both cases where it is used.
872 2011-02-26 Corinna Vinschen <corinna@vinschen.de>
874 * autoload.cc: Make autoloaded ntdll function non-optional. Ditto for
875 secur32 functions, except for LsaRegisterLogonProcess. Change return
876 value to ERROR_PROC_NOT_FOUND. Explain why.
877 * sec_auth.cc (lsaauth): Handle ERROR_PROC_NOT_FOUND from call to
878 LsaRegisterLogonProcess when generating the errno value.
880 2011-02-22 Corinna Vinschen <corinna@vinschen.de>
882 * dcrt0.cc: Fix copyright dates.
884 * syscalls.cc (_read): Move EXPORT_ALIAS to its rightful place.
886 2011-02-21 Christopher Faylor <me+cygwin@cgf.cx>
888 * cygwin.din: Mark __assert* and _abort as NOSIGFE.
890 2011-02-21 Corinna Vinschen <corinna@vinschen.de>
892 * fhandler_socket (fhandler_socket::readv): Call recv_internal directly,
894 (fhandler_socket::writev): Call send_internal directly, rather than
896 * net.cc (cygwin_recv): Call fhandler_socket::recvfrom directly, rather
897 than cygwin_recvfrom.
898 (cygwin_send): Call fhandler_socket::sendto directly, rather than
901 2011-02-20 Christopher Faylor <me+cygwin@cgf.cx>
903 * fhandler.cc (fhandler_base_overlapped::close): Finish any pending I/O
905 (fhandler_base_overlapped::wait_overlapped): Defensively zero bytes
906 read. Add more info to debugging output.
908 2011-02-18 Christopher Faylor <me+cygwin@cgf.cx>
910 * dcrt0.cc (dll_crt0_1): Add a CYGHEAP_DEBUG conditional for debugging
911 which allocates a lot of space at startup.
913 2011-02-18 Corinna Vinschen <corinna@vinschen.de>
915 * cygwin.sc: Set alignment of .cygheap section to 64K.
917 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
919 * spawn.cc (spawn_guts): Only set PID_NOTCYGWIN in _P_OVERLAY mode.
920 Drop flag if creating new process failed.
922 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
924 * Throughout fix copyright dates.
926 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
928 * devices.in: Throughout use slashes instead of backslashes in the
929 native path of devices not backed by native NT devices.
930 * devices.cc: Regenerate.
931 * globals.cc (ro_u_pmem): Use correct case.
932 (ro_u_globalroot): New R/O unicode string.
933 * path.cc (path_conv::check): Fix incorrect handling of /proc/sys
934 block devices if they are just visited due to a component check.
935 (symlink_info::posixify): Fix typo in comment.
936 (cygwin_conv_path): Use ro_u_globalroot instead of string constant.
937 (fast_cwd_version): New shared variable to store FAST_CWD version
939 (find_fast_cwd_pointer): Rename from find_fast_cwd_pointers. Don't
940 set global fast_cwd_ptr pointer here. Return pointer value instead.
941 (find_fast_cwd): New function to set fast_cwd_ptr and fast_cwd_version.
942 (cwdstuff::override_win32_cwd): Call find_fast_cwd from here.
943 Check for fast_cwd_version to differ between old and new FAST_CWD
944 structure. Check old_cwd for NULL to avoid SEGV. Don't set CWD if
945 we have neitehr a valid fast_cwd_ptr, nor a valid CWD handle in the
946 process parameter block.
947 (cwdstuff::set): Create Win32 path taking /proc/sys paths into account.
948 * spawn.cc (spawn_guts): Recode creating runpath. Also take /proc/sys
949 paths into account. Drop special CWD handling when starting non-Cygwin
952 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
954 * fhandler_procsys.cc (fhandler_procsys::opendir): Avoid SEGV if
955 opening object directory fails.
956 * fhandler_virtual.cc (fhandler_virtual::opendir): Don't leak memory.
958 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
960 * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Don't
961 append slash if there is one already.
963 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
965 Revert change from 2010-08-31:
966 * path.cc (normalize_posix_path): Drop support for //./ and //?/
968 (path_conv::check): Ditto.
970 2011-02-15 Corinna Vinschen <corinna@vinschen.de>
972 * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Use POSIX
973 path to check for symlink.
975 2011-02-14 Corinna Vinschen <corinna@vinschen.de>
977 * config/i386/profile.h: Sync with Mingw.
979 2011-02-13 Corinna Vinschen <corinna@vinschen.de>
981 * path.cc (struct _FAST_CWD): Redefine to new layout used since patch
982 for KB 2393802. Adjust comments throughout.
983 (struct _FAST_CWD_OLD): Rename former definition.
984 (cwdstuff::override_win32_cwd): Check if the OS is using the old or the
985 new FAST_CWD structure layout and handle accordingly.
987 2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
989 * mkstatic: Make sure that we are not cd'ed to temporary directory on
990 exit to avoid bogus warnings on directory cleanup.
994 2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
996 * cygwin.sc: Eliminate __cygheap_mid.
999 2011-02-11 Christopher Faylor <me+cygwin@cgf.cx>
1001 * cygheap.cc (_cygheap_mid): Drop unneeded section attribute.
1002 (cygheap_init): Just zero cygheap structure.
1003 * cygwin.sc: Keep 16 byte alignment but drop all other alignments
1004 related to cygheap. Eliminate unused __cygheap_end1.
1006 2011-02-11 Corinna Vinschen <corinna@vinschen.de>
1008 * cygwin.sc: Raise default cygheap size to 1 Meg. Set alignment to
1011 2011-02-11 Corinna Vinschen <corinna@vinschen.de>
1013 * include/endian.h: Move definitions of __BIG_ENDIAN, __LITTLE_ENDIAN,
1014 and __BYTE_ORDER into ...
1015 * include/bits/endian.h: New file.
1016 * include/arpa/nameser_compat.h: Include endian.h rather than defining
1018 * include/asm/byteorder.h: Include bits/endian.h. Drop definition of
1020 * include/netinet/ip.h: Include bits/endian.h. Drop definitions of
1021 BIG_ENDIAN, LITTLE_ENDIAN, and BYTE_ORDER. Use underscored variants
1022 of aforementioned constants.
1023 * include/netinet/tcp.h: Ditto.
1024 * include/sys/param.h: Drop disabled definitions of BIG_ENDIAN,
1025 LITTLE_ENDIAN, and BYTE_ORDER.
1027 * include/netinet/ip.h: Reformat. Define setsockopt IP_TOS options
1028 matching recent RFCs. Tweak comments.
1030 2011-02-10 Eric Blake <eblake@redhat.com>
1032 * errno.cc (includes): Avoid compilation failure if <string.h>
1033 settles on wrong strerror_r signature.
1035 * errno.cc (__xpg_strerror_r): New function.
1036 (strerror_r): Update to copy newlib's fixes.
1037 (strerror): Set errno on failure.
1038 (_sys_errlist): Cause EINVAL failure for reserved values.
1039 * cygwin.din: Export new function.
1040 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Combine
1041 this into minor 236.
1043 2011-02-09 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
1045 * cygwin.din (pthread_yield): Export as alias to sched_yield.
1046 * include/pthread.h (pthread_yield): Declare.
1047 * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
1048 * posix.sgml (std-deprec): Add pthread_yield.
1050 2011-02-09 Christopher Faylor <me+cygwin@cgf.cx>
1052 * cygheap.cc: Add some __stdcall decoration where appropriate.
1053 * lib/cygwin_crt0.c: __attribute -> __attribute__.
1055 2011-02-09 Christopher Faylor <me+cygwin@cgf.cx>
1057 * hookapi.cc (hook_or_detect_cygwin): Prevent i from being considered
1058 uninitialized by gcc.
1060 2011-02-09 Christopher Faylor <me+cygwin@cgf.cx>
1062 * exception.h: Remove DEBUG_EXCEPTION left over debugging ifdef.
1064 2011-02-08 Christopher Faylor <me+cygwin@cgf.cx>
1066 * dll_init.cc: Fix typo in comment.
1068 2011-02-07 Corinna Vinschen <corinna@vinschen.de>
1070 * configure.in: Remove AC_ALLOCA test and test for __builtin_memset.
1071 * configure: Regenerate.
1073 2011-02-07 Corinna Vinschen <corinna@vinschen.de>
1075 * fhandler_console.cc (fhandler_console::write_normal): Remove
1076 erroneous premature return after collecting truncated multibyte
1077 sequence in trunc_buf. Rather fall through to printing routine.
1078 Fix return value to take trunc_buf content into account. Improve
1081 2011-02-05 Christopher Faylor <me+cygwin@cgf.cx>
1083 * autoload.cc (wsock_init): Properly define WSAStartup function pointer
1084 to avoid stack damage.
1086 2011-02-02 Corinna Vinschen <corinna@vinschen.de>
1088 * libc/bsdlib.cc: Include err.h.
1090 2011-02-02 Eric Blake <eblake@redhat.com>
1092 * include/err.h: Fix loss of semicolons in previous patch.
1094 2011-02-02 Corinna Vinschen <corinna@vinschen.de>
1096 * include/err.h (err): Add noreturn attribute.
1101 2011-02-02 Corinna Vinschen <corinna@vinschen.de>
1103 * path.cc (conv_path_list): Remove enclosing quotes and trailing
1104 backslashes from Win32 environment path lists.
1106 2011-02-01 Christian Franke <franke@computer.org>
1108 * fhandler.cc (fhandler_base::fsync): Ignore ERROR_INVALID_FUNCTION
1109 error from FlushFileBuffers().
1111 2011-01-31 Corinna Vinschen <corinna@vinschen.de>
1113 * syscalls.cc (utmp_data): Fix potential buffer overflow.
1115 2011-01-31 Corinna Vinschen <corinna@vinschen.de>
1117 * fhandler_socket.cc (address_in_use): Improve comment readability.
1119 2011-01-30 Corinna Vinschen <corinna@vinschen.de>
1121 * fhandler_socket.cc (address_in_use): Disable. Add comment.
1122 (fhandler_socket::bind): Change comment to explain setting the
1123 SO_EXCLUSIVEADDRUSE socket option. Remove code which checks for
1125 * net.cc (cygwin_setsockopt): Never set SO_REUSEADDR option. Improve
1126 comment to compensate for the deleted comment in fhandler_socket::bind.
1127 * wincap.cc: Throughout, drop has_enhanced_socket_security from wincaps.
1128 * wincap.h (struct wincaps): Drop has_enhanced_socket_security flags
1131 2011-01-28 Peter Foley <jpfoley2@verizon.net>
1133 * configure.in: Define LIBSERVER regardless of cross_host.
1134 * configure: Regenerate.
1136 2011-01-28 Corinna Vinschen <corinna@vinschen.de>
1138 * fhandler_socket.cc (fhandler_socket::wait_for_events): Call
1139 pthread_testcancel in case of timeout to enable pthread_cancel
1142 2011-01-27 Corinna Vinschen <corinna@vinschen.de>
1144 * include/features.h (__STDC_ISO_10646__): Move to newlib's
1147 2011-01-26 Corinna Vinschen <corinna@vinschen.de>
1149 * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Fix
1150 computation of st_blocks.
1151 (fhandler_base::fstat_helper): Fix formatting.
1153 2011-01-24 Corinna Vinschen <corinna@vinschen.de>
1155 * include/features.h (__STDC_ISO_10646__): Define. Add comment.
1157 2011-01-21 Corinna Vinschen <corinna@vinschen.de>
1159 * syscalls.cc (rename): Fix permission problem with symlinks on NFS.
1160 Rework how NtOpenFile gets called to make it more readable. Change
1163 2011-01-20 Corinna Vinschen <corinna@vinschen.de>
1165 * exec.cc: Include pinfo.h.
1166 * winf.h: Move definitions of _P_PATH_TYPE_EXEC and _P_MODE from here...
1167 * pinfo.h: ...to here.
1168 (_P_PATH_TYPE_EXEC): Redefine to be bigger than _P_SYSTEM.
1169 (_P_MODE): Redefine so as not to mask out _P_SYSTEM.
1170 * spawn.cc (spawnlp): Add _P_PATH_TYPE_EXEC flag in call to spawnve.
1174 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
1176 * spawn.cc (av::fixup): Reenable #! handling for all exec functions.
1177 Return ENOEXEC in !p_type_exec case only for unrecognized files.
1178 Fix comment formatting.
1180 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
1182 * exec.cc (execlp): Add missing _P_PATH_TYPE_EXEC flag in call to
1185 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
1187 * exec.cc: Rearrange functions in alphabetical order.
1188 (_execve): Drop temporary define and drop export alias.
1189 (execl): Call spawnve.
1190 (execle): New function.
1191 (execlp): New function.
1192 (execv): Call spawnve.
1193 (execve): Drop converting NULL envp to emtpy envp.
1194 (execvp): Call spawnve.
1195 (execvpe): Drop converting NULL envp to emtpy envp. Call spawnve.
1196 (fexecve): Call spawnve.
1197 * spawn.cc (spawnve): Convert NULL envp to emtpy envp. Remove outdated
1199 (spawnlp): Call spawnve.
1202 (spawnvpe): Fix formatting.
1204 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
1206 * exec.cc (strccpy): Move function from here...
1207 * strfuncs.cc (strccpy): ...to here.
1208 * string.h (strccpy): Declare.
1209 * winsup.h (strccpy): Drop declaration.
1211 2011-01-19 Corinna Vinschen <corinna@vinschen.de>
1213 * errno.cc (errmap): Add error codes for invalid binaries.
1214 * exec.cc (execvp): Call spawnve with _P_PATH_TYPE_EXEC flag
1217 * spawn.cc (spawn_guts): Filter _P_PATH_TYPE_EXEC from mode and
1218 store in p_type_exec. Call av::fixup with addtional p_type_exec
1220 (spawnve): Check for filtered mode.
1221 (spawnvpe): Add _P_PATH_TYPE_EXEC flag when calling spawnve.
1222 (av::fixup): Accept additional bool parameter p_type_exec. Only check
1223 for script if p_type_exec is true.
1224 * winf.h (_P_PATH_TYPE_EXEC): Define.
1226 (av::fixup): Declare with additional bool parameter.
1228 2011-01-17 Corinna Vinschen <corinna@vinschen.de>
1230 * fhandler_proc.cc (format_proc_partitions): Fix compiler warning.
1232 2011-01-17 Corinna Vinschen <corinna@vinschen.de>
1234 * path.cc (path_conv::check): Don't follow reparse point symlinks if
1235 PC_SYM_NOFOLLOW_REP flag is set.
1236 (cygwin_conv_path): Set PC_SYM_NOFOLLOW_REP flag when converting from
1238 * path.h (enum pathconv_arg): Define PC_SYM_NOFOLLOW_REP flag.
1240 2011-01-17 Corinna Vinschen <corinna@vinschen.de>
1242 * fhandler_proc.cc (proc_tab_cmp): Fix typo in comment.
1243 (fhandler_proc::fill_filebuf): Handle return value of 0 from format
1245 (format_proc_stat): Set errno when returning 0 size.
1246 (format_proc_partitions): Rewrite method to fetch partition info.
1248 2011-01-13 Corinna Vinschen <corinna@vinschen.de>
1250 * fhandler_disk_file.cc (fhandler_base::fstat_helper): Always set
1251 st_size of directories to 0. Explain why.
1253 2011-01-12 Corinna Vinschen <corinna@vinschen.de>
1255 * posix.sgml: Add madvise to BSD list.
1257 2011-01-12 Corinna Vinschen <corinna@vinschen.de>
1259 * cygwin.din (madvise): Export posix_madvise as madvise.
1260 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR.
1261 * include/sys/mman.h: Define madvise constants, keep Linux-specific
1262 constants undefined.
1265 2011-01-12 Corinna Vinschen <corinna@vinschen.de>
1267 * fhandler.h (struct part_t): New type.
1268 (class fhandler_dev_floppy): Convert partitions to part_t pointer.
1269 Add lock_partition method.
1270 * fhandler_floppy.cc (fhandler_dev_floppy::lock_partition): New method
1271 to implement ondemand partition locking.
1272 (fhandler_dev_floppy::write_file): Call lock_partition from here if
1273 writing failed due to a potential write restriction on a disk
1275 (fhandler_dev_floppy::open): Don't lock partitions here.
1276 (fhandler_dev_floppy::close): Keep track of partition handle reference
1277 count. Close handles and remove partitions pointer ony if count is 0.
1278 (fhandler_dev_floppy::dup): Just copy partitions pointer and increment
1281 2011-01-11 Corinna Vinschen <corinna@vinschen.de>
1283 * fhandler.h (MAX_PARTITIONS): New definition.
1284 (class fhandler_dev_floppy): Add partitions array member. Add close
1286 * fhandler_floppy.cc (fhandler_dev_floppy::fhandler_dev_floppy): Zero
1287 out partitions array.
1288 (fhandler_dev_floppy::open): Fix "entire disk" condition for call to
1289 DeviceIoControl (FSCTL_ALLOW_EXTENDED_DASD_IO).
1290 When opening disks for writing, call DeviceIoControl (FSCTL_LOCK_VOLUME)
1291 on all affected disk partitions starting with Vista.
1292 (fhandler_dev_floppy::close): New method.
1293 (fhandler_dev_floppy::dup): Duplicate handles in partitions, if any.
1294 * wincap.h (wincaps::has_restricted_raw_disk_access): New element.
1295 * wincap.cc: Implement above element throughout.
1297 2011-01-11 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
1299 * termios.cc (cfgetospeed, cfgetispeed): Constify argument per POSIX.
1300 * include/sys/termios.h (cfgetospeed, cfgetispeed): Declare functions.
1301 Move macros after declarations and make conditional on !__cplusplus.
1303 2011-01-11 Corinna Vinschen <corinna@vinschen.de>
1305 * cygtls.cc (_cygtls::init_thread): Call _REENT_INIT_PTR. Drop setting
1306 current locale and calling srand48.
1308 2011-01-02 Christopher Faylor <me+cygwin@cgf.cx>
1310 * ChangeLog-2010: Create from ChangeLog.
1311 * ChangeLog: Start fresh.