newlib/winsup/cygwin/ChangeLog

1119 lines
40 KiB
Plaintext

2009-05-03 Corinna Vinschen <corinna@vinschen.de>
* security.cc (set_file_sd): Drop using FILE_OPEN_FOR_RECOVERY flag in
call to NtOpenFile.
* exceptions.cc (open_stackdumpfile): Ditto in call to NtCreateFile.
* fhandler.cc (fhandler_base::open): Ditto. Simplify setting
create_options.
* mount.cc (fs_info::update): Recognize offline storage.
(fillout_mntent): Report UDF and offline storage.
* mount.h (class fs_info): Add is_csc_cache status flag.
2009-05-04 Christopher Faylor <me+cygwin@cgf.cx>
* fhandler_console.cc (fhandler_console::write_console): Eliminate
unneeded debugging output.
(fhandler_console::write_normal): Eliminate unneeded __seterrno.
2009-05-04 Christopher Faylor <me+cygwin@cgf.cx>
* libc/minires.c (scanline): Accommodate ctype changes which disallow
use of an unadorned char argument to is* macros.
* regex/regcomp.c: Ditto, throughout.
* regex/regex2.h (ISWORD): Ditto.
2009-05-03 Christopher Faylor <me+cygwin@cgf.cx>
* fhandler.h (fhandler_console::MAX_WRITE_CHARS): Declare.
(fhandler_console::write_replacement_char): Declare as inline.
(fhandler_console::write_console): Declare new function.
* fhandler_console.cc (fhandler_console::MAX_WRITE_CHARS): Define.
(handler_console::write_console): Define.
(fhandler_console::write_replacement_char): Define as inline.
(fhandler_console::write_normal): Use write_console when writing
buffers of unknown length.
2009-04-26 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* include/cygwin/socket.h: Define SOL_IPV6.
2009-04-21 Corinna Vinschen <corinna@vinschen.de>
* ctype.cc (__set_ctype): Copy exact part of the current active
character class array.
2009-04-20 Corinna Vinschen <corinna@vinschen.de>
* flock.cc (lf_setlock): Handle border case which results in WFMO loop
exiting with ret == WAIT_TIMEOUT gracefully. Add a system_printf to
uncover other potential problems with WFMO loop.
2009-04-18 Christopher Faylor <me+cygwin@cgf.cx>
* mkimport: Specify .text for stub explicitly.
* speclib: Add a dummy '.idata$7' section referring to the dll
associated with the real import library.
2009-04-18 Corinna Vinschen <corinna@vinschen.de>
* dcrt0.cc (globify): Only call mbtowc for non-ascii chars.
2009-04-17 Corinna Vinschen <corinna@vinschen.de>
* dcrt0.cc (globify): Make multibyte-aware.
2009-04-17 Corinna Vinschen <corinna@vinschen.de>
* flock.cc (class inode_t): Add i_wait member and matching methods
wait(), unwait(), and waiting().
(inode_t::inode_t): Initialize i_wait to 0.
(fhandler_disk_file::lock): Only remove node if no other thread is
waiting for a blocking lock.
(lf_setlock): Manipulate node->i_wait to signal that a thread is
waiting for a blocking lock in this node.
(lf_findoverlap): Reinstantiate SELF test as in original code.
2009-04-16 Corinna Vinschen <corinna@vinschen.de>
* dlfcn.cc (get_full_path_of_dll): Just return a bool value. Drop
local path_conv in favor of getting it as parameter. Add local string
buffer instead of getting it as parameter.
(dlopen): Accommodate get_full_path_of_dll change. Fetch WCHAR Windows
path from path_conv variable and call LoadLibraryW.
2009-04-16 Corinna Vinschen <corinna@vinschen.de>
* ntdll.h (STATUS_LOCK_NOT_GRANTED): Define.
* syscalls.cc (unlink_nt): Handle STATUS_LOCK_NOT_GRANTED same as
STATUS_SHARING_VIOLATION. Add lengthy comment to explain why.
2009-04-15 Corinna Vinschen <corinna@vinschen.de>
* path.cc (path_conv::get_wide_win32_path): Allow relative paths.
(cygwin_conv_path): In case of CCP_POSIX_TO_WIN_W, convert relative
paths to absolute paths if the relative pathname length exceeds
MAX_PATH.
2009-04-15 Corinna Vinschen <corinna@vinschen.de>
* libc/bsdlib.cc: Align copyright with upstream.
* libc/fnmatch.c: Ditto.
* libc/fts.c: Ditto.
* libc/inet_addr.c: Ditto.
* libc/inet_network.c: Ditto.
* libc/rcmd.cc: Ditto.
* libc/rexec.cc: Ditto.
2009-04-14 Christopher Faylor <me+cygwin@cgf.cx>
* speclib: Really revert to using tempdir.
2009-04-14 Christopher Faylor <me+cygwin@cgf.cx>
* speclib: Revert to using tempdir.
2009-04-14 Corinna Vinschen <corinna@vinschen.de>
* localtime.cc (tzload): Implement setting __tzrule's offset member
using newlib's __gettzinfo () interface also when tzload returns
successfully.
2009-04-13 Dave Korn <dave.korn.cygwin@gmail.com>
* include/stdint.h (intptr_t): Remove long from type.
(uintptr_t): Likewise.
(INTPTR_MIN): Remove 'L' suffix.
(INTPTR_MAX, UINTPTR_MAX): Likewise.
2009-04-12 Christopher Faylor <me+cygwin@cgf.cx>
* speclib: Initial stab at cleaning up temp files. More work needed.
* mkimport: Ditto.
2009-04-12 Christopher Faylor <me+cygwin@cgf.cx>
* Makefile.in (clean): Clean globals.h.
(LIBCOS): Depend on globals.h.
2009-04-11 Christopher Faylor <me+cygwin@cgf.cx>
* mkimport: New script to perform all operations necessary to create
libcygwin.a.
* rmsym: Delete.
* newsym: Delete.
* Makefile.in (toolopts): New variable which holds options relating to
binutils/gcc tools.
(speclib): Use toolopts. Add symbols to avoid copying to special
libraries.
(OBSOLETE_FUNCTIONS): Delete.
(NEW_FUNCTIONS): Change to represent an argument to new mkimport
script.
(libcygwin.a): Use only new mkimport script to create libcygwin.a.
Only rely on ${LIBCOS}.
(*/lib*.a): Simplify speclib dependencies.
(speclib): Accept toolchain options. Convert every argument to
absolute path. Simplify parsing of nm output. Accommodate new
exclude option.
2009-04-11 Dave Korn <dave.korn.cygwin@googlemail.com>
* include/stdint.h (INTPTR_MIN, INTPTR_MAX): Add 'L' suffix.
(WINT_MAX): Add 'U' suffix.
2009-04-10 Christopher Faylor <me+cygwin@cgf.cx>
* speclib: Use a more robust method to derive full file path.
2009-04-09 Christopher Faylor <me+cygwin@cgf.cx>
* speclib: Semi-revert to previous version but don't try to generate
well-formed import library. Instead, just extract appropriate symbols
and let later libcygwin.a on link line fill in the rest of the import
stuff.
* gendef: Hopefully no-op modification to allow easier post-processing
on symbol values.
2009-04-09 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (try_to_bin): Use tmp_pathbuf buffer to allocate infobuf
rather than using the stack.
2009-04-09 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (try_to_bin): Fix alignment of infobuf.
2009-04-09 Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (fhandler_disk_file::fchown): Catch an
error when changing the user account on a standalone Samba server.
Explain why.
* sec_acl.cc (setacl): Accommodate additional parameter to set_file_sd.
* sec_helper.cc (SECURITY_SAMBA_UNIX_AUTHORITY): Define.
(well_known_samba_unix_user_fake_sid): Define.
* security.cc (set_file_sd): Take additional parameter if ownership
should be changed. Restrict requested permissions accordingly.
(set_file_attribute): Accommodate additional parameter to set_file_sd.
* security.h (well_known_samba_unix_user_fake_sid): Declare.
(set_file_sd): Align declaration to above change.
2009-04-07 Corinna Vinschen <corinna@vinschen.de>
* include/stdint.h (int_least32_t): Define as int.
(uint_least32_t): Ditto, unsigned.
(int_fast16_t): Define as int.
(int_fast32_t): Ditto.
(uint_fast16_t): Ditto, unsigned.
(uint_fast32_t): Ditto.
(UINT32_MAX): Remove `L' long marker.
(UINT_LEAST32_MAX): Ditto.
(UINT_FAST16_MAX): Ditto.
(UINT_FAST32_MAX): Ditto.
(INT32_C): Ditto.
(UINT32_C): Ditto.
2009-04-07 Corinna Vinschen <corinna@vinschen.de>
* strfuncs.cc: Change WCHAR to wchar_t in multibyte<->widechar
conversion functions throughout.
* wchar.h: Ditto in declarations. Guard them __INSIDE_CYGWIN__.
2009-04-07 Corinna Vinschen <corinna@vinschen.de>
* fhandler.h (class dev_console): Add members con_mbtowc, con_wctomb,
and con_charset.
(dev_console::str_to_con): Take mbtowc function pointer and charset
as additional parameters.
* fhandler_console.cc (fhandler_console::get_tty_stuff): Initialize
aforementioned new members. Explain why.
(dev_console::con_to_str): Remove useless comment. Call new
sys_cp_wcstombs function rather than sys_wcstombs.
(dev_console::str_to_con): Take mbtowc function pointer and charset
as additional parameters. Call sys_cp_mbstowcs accordingly.
(fhandler_console::write_normal): Only initialize f_mbtowc and charset
once. Accommodate changed str_to_con.
* strfuncs.cc (sys_cp_wcstombs): Renamed from sys_wcstombs. Take
wctomb function pointer and charset as parameters. Use throughout.
(sys_cp_mbstowcs): Take wctomb function pointer and charset as
parameters instead of codepage. Remove matching local variables and
their initialization.
* wchar.h (ENCODING_LEN): Define as in newlib.
(__mbtowc): Use mbtowc_p typedef for declaration.
(wctomb_f): New type.
(wctomb_p): New type.
(__wctomb): Declare.
(__utf8_wctomb): Use wctomb_f typedef for declaration.
(sys_cp_wcstombs): Move declaration from winsup.h here.
(sys_wcstombs): Ditto.
(sys_wcstombs_alloc): Ditto.
(sys_cp_mbstowcs): Ditto.
(sys_mbstowcs): Ditto.
(sys_mbstowcs_alloc): Ditto.
* winsup.h: Move declaration of sys_FOO functions to wchar.h. Include
wchar.h instead.
2009-04-06 Earl Chew <earl_chew@agilent.com>
* libc/rexec.cc (ruserpass): Use fstat64 instead of fstat.
2009-04-06 Corinna Vinschen <corinna@vinschen.de>
* strfuncs.cc: Add comment to explain why we can't support JIS
for now.
(__db_wctomb): Alwaus use WC_NO_BEST_FIT_CHARS.
(__jis_wctomb): Just call __ascii_wctomb from here.
(__eucjp_wctomb): Convert to standalone implementation to fix up the
difference between eucJP and CP 20932 affecting JIS-X-0212 characters.
Explain.
(__kr_wctomb): Use codepage 949.
(__db_mbtowc): Reorder code slightly. Always use MB_ERR_INVALID_CHARS
in call to MultiByteToWideChar. Fix a problem with singlebyte
sequences. Fix a bug in '\0' handling. Reset state->__count on
successful return from non-zero state.
(__jis_mbtowc): Just call __ascii_mbtowc from here.
(__eucjp_mbtowc): Convert to standalone implementation to fix up the
difference between eucJP and CP 20932 affecting JIS-X-0212 characters.
(__kr_mbtowc): Use codepage 949.
(__set_charset_from_codepage): Handle codepage 20932 as eucJP.
2009-04-05 Christopher Faylor <me+cygwin@cgf.cx>
* Makefile.in: Use all compile options when calculating magic values.
* shared_info.h (CURR_SHARED_MAGIC): Revert erroneous value.
* child_info.h (CURR_CHILD_INFO_MAGIC): Update.
* fhandler.h (acquire_output_mutex): Remove unneeded ';'.
(release_output_mutex): Ditto.
2009-04-05 Christopher Faylor <me+cygwin@cgf.cx>
* net.cc: Undefine NOERROR and DELETE to avoid compiler warnings.
* shared_info.h (CURR_SHARED_MAGIC): Update.
* spawn.cc (spawn_guts): Avoid copying one line command line argument
if it hasn't been filled out.
2009-04-04 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Corinna Vinschen <corinna@vinschen.de>
* include/asm/byteorder.h (__ntohl): Prototype before define to avoid
a warning with -Wmissing-prototypes. Use _ELIDABLE_INLINE macro from
_ansi.h.
(__ntohs): Ditto.
2009-04-02 Corinna Vinschen <corinna@vinschen.de>
* environ.cc (build_env): Fix length calculation of resulting
wide char environment string.
2009-04-02 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* include/netdb.h: #include <inttypes.h>, <netinet/in.h>,
and <sys/socket.h> per SUSv3.
2009-04-01 Corinna Vinschen <corinna@vinschen.de>
* strfuncs.cc (sys_cp_mbstowcs): Check if ASCII SO is followed by at
least two chars and the next byte is a valid UTF-8 start byte before
trying to convert the followup bytes as UTF-8 sequence.
2009-03-31 Corinna Vinschen <corinna@vinschen.de>
* shm.cc (struct shm_attached_list): Convert access type to ULONG.
(fixup_shms_after_fork): Fix comment. Use NtMapViewOfSection rather
than MapViewOfFileEx to recreate shared memory regions. Add function
name to api_fatal output.
(shmat): Use NtMapViewOfSection to create shared memory region
top-down.
2009-03-31 Corinna Vinschen <corinna@vinschen.de>
* ctype.cc: Remove implementation of ctype functions in favor of
pointer-based newlib implementation.
(_ctype_b): Declare.
(__ctype_cp): Move to newlib. Declare.
(__ctype_iso): Ditto.
(__set_ctype): Implement changing __ctype_ptr__. Only copy character
class data in applications built under older Cygwin.
* cygwin.din (__ctype_ptr__): Export.
* include/ctype.h: Remove in favor of newlib implementation.
* include/cygwin/config.h (__EXPORT): Define alongside __IMPORT.
* include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_OLD_CTYPE):
Define check for old vs. new ctype implementation.
Bump API minor number.
2009-03-28 Christopher Faylor <me+cygwin@cgf.cx>
* Makefile.in: Perform some minor cleanup. Revamp speclib handling.
* speclib: Rewrite to create libraries with dlltool rather than
attempting surgery on libcygwin.a.
2009-03-27 Corinna Vinschen <corinna@vinschen.de>
* net.cc (inet_ntop6): Convert to lowercase hex digits on the fly.
2009-03-27 Corinna Vinschen <corinna@vinschen.de>
* net.cc (cygwin_getaddrinfo): Check hints for non-NULL before
checking its content.
2009-03-27 Corinna Vinschen <corinna@vinschen.de>
* fhandler.h (class fhandler_fifo): Rename read/write methods to
raw_read/raw_write.
* fhandler_fifo.cc: Ditto.
2009-03-27 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (pathconf): Fix memory leak.
2009-03-26 Corinna Vinschen <corinna@vinschen.de>
* path.cc (symlink_worker): Write target filename as UTF-16 string
with leading BOM marker.
(symlink_info::check_shortcut): If check for leading BOM marker
succeeds, read filename as UTF-16 string.
(symlink_info::check_sysfile): Ditto.
2009-03-26 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* include/asm/byteorder.h (__ntohl): Align definition to ISO C99.
(__ntohs): Ditto.
2009-03-26 Corinna Vinschen <corinna@vinschen.de>
* strfuncs.cc (__set_charset_from_codepage): Revert to translating
codepage 936 to "GBK".
2009-03-25 Corinna Vinschen <corinna@vinschen.de>
* strfuncs.cc (sys_wcstombs): Don't convert ASCII SO into two
ASCII SO's.
2009-03-25 Corinna Vinschen <corinna@vinschen.de>
* environ.cc (environ_init): Break from locale loop after first hit.
* fhandler_console.cc (fhandler_console::write_normal): Print a SO
sequence using always valid Unicode chars.
2009-03-25 Corinna Vinschen <corinna@vinschen.de>
* strfuncs.cc (__kr_wctomb): Use codepage 51949 rather than 50949.
(__kr_mbtowc): Ditto.
(__set_charset_from_codepage): Ditto. Translate codepage 936 to
"GB2312" and drop the charset name "GBK".
2009-03-24 Corinna Vinschen <corinna@vinschen.de>
* strfuncs.cc (__kr_wctomb): Use codepage 50949 rather than 949.
(__kr_mbtowc): Ditto.
(__set_charset_from_codepage): Translate codepages 949 and 50949 to
"EUCKR" and drop the charset name "CP949".
2009-03-24 Corinna Vinschen <corinna@vinschen.de>
* strfuncs.cc (sys_cp_mbstowcs): Don't read beyond src + nms.
2009-03-24 Corinna Vinschen <corinna@vinschen.de>
* shared_info.h (CURR_SHARED_MAGIC): Update.
2009-03-24 Corinna Vinschen <corinna@vinschen.de>
* wchar.h: Replace UINT with unsigned int.
2009-03-24 Corinna Vinschen <corinna@vinschen.de>
* wchar.h: Remove erroneous "C" specifier from extern declaration.
2009-03-24 Corinna Vinschen <corinna@vinschen.de>
* ctype.cc (_CTYPE_DATA_0_127): Add _B class to TAB character.
(__ctype_default): New character class array for default ASCII
character set.
(__ctype_iso): New array of character class array for ISO charsets.
(__ctype_cp): Ditto for singlebyte Windows codepages.
(tolower): Implement as distinct function to support any singlebyte
charset.
(toupper): Ditto.
(__set_ctype): New function to copy singlebyte character classes
corresponding to current charset to ctype_b array.
Align copyright text to upstream.
* dcrt0.cc (dll_crt0_1): Reset current locale to "C" per POSIX.
* environ.cc (set_file_api_mode): Remove.
(codepage_init): Remove.
(parse_thing): Remove "codepage" setting.
(environ_init): Set locale according to environment settings, or
to current codepage, before converting environment to multibyte.
* fhandler.h (fhandler_console::write_replacement_char): Drop argument.
* fhandler_console.cc (dev_console::str_to_con): Call sys_cp_mbstowcs
rather than MultiByteToWideChar.
(fhandler_console::write_replacement_char): Always print a funny
half filled square if a character isn't in the current charset.
(fhandler_console::write_normal): Convert to using __mbtowc
rather than next_char.
* fork.cc (frok::child): Drop call to set_file_api_mode.
* globals.cc (enum codepage_type) Remove.
(current_codepage): Remove.
* miscfuncs.cc (cygwin_wcslwr): Unused, dangerous. Remove.
(cygwin_wcsupr): Ditto.
(is_cp_multibyte): Remove.
(next_char): Remove.
* miscfuncs.h (is_cp_multibyte): Drop declaration.
(next_char): Ditto.
* strfuncs.cc (get_cp): Remove.
(__db_wctomb): New function to implement _wctomb_r functionality for
doublebyte charsets using WideCharToMultiByte.
(__sjis_wctomb): New function to replace unusable newlib function.
(__jis_wctomb): Ditto.
(__eucjp_wctomb): Ditto.
(__gbk_wctomb): New function.
(__kr_wctomb): Ditto.
(__big5_wctomb): Ditto.
(__db_mbtowc): New function to implement _mbtowc_r functionality for
doublebyte charsets using MultiByteToWideChar.
(__sjis_mbtowc): New function to replace unusable newlib function.
(__jis_mbtowc): Ditto.
(__eucjp_mbtowc): Ditto.
(__gbk_mbtowc): New function.
(__kr_mbtowc): New function
(__big5_mbtowc): New function
(__set_charset_from_codepage): New function.
(sys_wcstombs): Reimplement, basically using same wide char to multibyte
conversion as newlib's application level functions. Plus extras.
Add lengthy comment to explain. Change return type to size_t.
(sys_wcstombs_alloc): Just use sys_wcstombs. Change return type to
size_t.
(sys_cp_mbstowcs): Replace sys_mbstowcs, take additional codepage
argument. Explain why. Change return type to size_t.
(sys_mbstowcs_alloc): Just use sys_mbstowcs. Change return type to
size_t.
* wchar.h: Declare internal functions implemented in strfuncs.cc.
(wcscasecmp): Remove.
(wcsncasecmp): Remove.
(wcslwr): Remove.
(wcsupr): Remove.
* winsup.h (codepage_init): Remove declaration.
(get_cp): Ditto.
(sys_wcstombs): Align declaration to new implementation.
(sys_wcstombs_alloc): Ditto.
(sys_cp_mbstowcs): Add declaration.
(sys_mbstowcs): Define as inline function.
(sys_mbstowcs_alloc): Align declaration to new implementation.
(set_file_api_mode): Remove declaration.
* include/ctype.h (isblank): Redefine to use _B character class.
(toupper): Remove ASCII-only definition.
(tolower): Ditto.
2009-03-24 Corinna Vinschen <corinna@vinschen.de>
* sec_auth.cc (str2buf2uni): Remove.
* security.h (str2buf2uni): Remove declaration.
2009-03-24 Yaakov Selkowitz <yselkowitz@cygwin.com>
* include/mntent.h: Remove declarations of nonexistant addmntent
and hasmntopt. Update and clarify the /etc/mtab comment.
2009-03-23 Corinna Vinschen <corinna@vinschen.de>
* smallprint.cc (__small_vsprintf): Handle NULL PWCHAR and
PUNICODE_STRING arguments.
(__small_vswprintf): Ditto.
2009-03-23 Corinna Vinschen <corinna@vinschen.de>
* include/asm/byteorder.h (__constant_ntohs): Remove declaration.
(__constant_ntohl): Ditto.
2009-03-23 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Export wordexp, wordfree.
* posix.sgml: Move them to SUSv4 list.
* include/cygwin/version.h: Bump API minor number.
2009-03-22 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* include/sys/un.h: #include <string.h> for strlen.
2009-03-19 Corinna Vinschen <corinna@vinschen.de>
* dlfcn.cc (get_full_path_of_dll): Revert patch from 2008-07-16.
2009-03-19 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* cygwin.din: Export log2, log2f as functions.
* posix.sgml: Add them to SUSv4 list.
* include/cygwin/version.h: Bump API minor number.
2009-03-18 Corinna Vinschen <corinna@vinschen.de>
* sec_auth.cc (lsaauth): Remove local definitions of struct
_TOKEN_LINKED_TOKEN and TokenLinkedToken in favor of definitions
from winnt.h.
(lsaprivkeyauth): As in lsaauth, fetch linked token if available and
return that in favor of default token.
2009-03-15 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* errno.cc (_sys_errlist): Add ESTRPIPE.
2009-03-15 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Export wcsdup.
* posix.sgml: Add wcsdup to SUSv4 list.
* include/cygwin/version.h: Bump API minor number.
2009-03-15 Corinna Vinschen <corinna@vinschen.de>
* include/inttypes.h: Remove "l" size specifier from all 16 and 32 bit
definitions.
2009-03-14 Christopher Faylor <me+cygwin@cgf.cx>
* path.cc (warn_msdos): Don't warn about MS-DOS filenames encountered
during initialization.
2009-03-14 Corinna Vinschen <corinna@vinschen.de>
* gendef: Remove STABS directives.
2009-03-13 Corinna Vinschen <corinna@vinschen.de>
* mktemp.cc: Remove STABS specific link-time warning. Align copyright
text to upstream.
2009-03-13 Corinna Vinschen <corinna@vinschen.de>
* flock.cc: Fix lockf copyright to latest version.
2009-03-12 Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (path_conv::isgood_inode): Move to be defined
earlier.
(get_ino_by_handle): Take additional path_conv argument, accommodate
throughout. Only use FileId if isgood_inode check is true.
(fhandler_base::open_fs): Simplify setting ino due to above change.
(readdir_get_ino): Make sure to return always a non-zero inode number.
(fhandler_disk_file::readdir): Always open file in dir with
FILE_OPEN_REPARSE_POINT so as not to open wrong file.
Drop call to isgood_inode here.
* path.cc (symlink_info::check): Call fs.update in case we're fetching
file information from call to NtQueryDirectoryFile.
2009-03-12 Corinna Vinschen <corinna@vinschen.de>
* flock.cc (fhandler_disk_file::lock): Don't test file open mode in
case of flock-type locks. Explain why.
2009-03-12 Brian Ford <Brian.Ford@FlightSafety.com>
* gethostby_helper: Fix typos in DEBUGGING case.
2009-03-11 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Export wcscasecmp, wcsncasecmp.
* posix.sgml: Move wcscasecmp, wcsncasecmp to SUSv4 list.
* include/cygwin/version.h: Bump API minor number.
2009-03-11 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Export wscanf, fwscanf, swscanf, vwscanf, vfwscanf,
vswscanf.
* posix.sgml: Move fwscanf, swscanf, vwscanf, vfwscanf, vswscanf
to SUSv4 list.
* include/cygwin/version.h: Bump API minor number.
2009-03-09 Corinna Vinschen <corinna@vinschen.de>
* fhandler.h (fhandler_socket::wait_for_events): Take additional
parameter "dontwait".
* fhandler_socket.cc (fhandler_socket::wait_for_events): Act as if the
socket is non-blocking if dontwait is true.
(fhandler_socket::recv_internal): Use incoming MSG_DONTWAIT flag to
set the wait_for_events dontwait parameter.
(fhandler_socket::send_internal): Ditto. Optimize code slightly.
* include/cygwin/socket.h (MSG_DONTWAIT): Define.
* include/cygwin/version.h: Bump API minor number.
2009-03-09 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Export wcsftime.
* posix.sgml: Move wcsftime to SUSv4 list.
* include/cygwin/version.h: Bump API minor number.
2009-03-06 Pierre A. Humblet <pierre@phumblet.no-ip.org>
* cygwin.din: Export gethostbyname2.
* net.cc: define _CYGWIN_IN_H and include resolv.h.
(realloc_ent): New function.
(dup_ent): Call realloc_ent.
(memcpy4to6): New function.
(dn_length1): New function.
(gethostby_helper): New function.
(gethostbyname2): New function.
* posix.sgml: Add gethostbyname2.
* include/cygwin/version.h: Bump API minor number.
* libc/minires.c (get_options): Look for "inet6" and apply bounds
to "retry" and "retrans".
(res_ninit): Set the default options at the beginning.
(dn_expand): Fix "off by one".
2009-03-06 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Export wprintf, fwprintf, swprintf, vwprintf, vfwprintf,
vswprintf. Sort.
* posix.sgml: Move fwprintf, swprintf, vwprintf, vfwprintf, vswprintf
to SUSv4 list. Sort SUSv4 list.
* include/cygwin/version.h: Bump API minor number.
2009-03-04 Corinna Vinschen <corinna@vinschen.de>
* dcrt0.cc (disable_dep): Disable. Explain why.
(dll_crt0_0): Disable calling disable_dep. Explain why.
2009-03-03 Corinna Vinschen <corinna@vinschen.de>
* net.cc: Include asm/byteorder.h.
(htonl): Move to end of file. Add comment to explain why. Align
definition to POSIX. Use related macro from asm/byteorder.h.
(ntohl): Ditto.
(htons): Ditto.
(ntohs): Ditto.
* include/asm/byteorder.h: Revert previous patch.
2009-03-03 Corinna Vinschen <corinna@vinschen.de>
* include/asm/byteorder.h: Disable optimization when building
Cygwin network code.
2009-02-26 Christopher Faylor <me+cygwin@cgf.cx>
* dtable.cc (dtable::select_read): Add ability to override fh.
* fhandler.h (fhandler_fifo::select_read): Declare new function.
(fhandler_fifo::select_write): Ditto.
(fhandler_fifo::select_except): Ditto.
* select.cc (peek_pipe): Treat certain classes of pipe errors as "no
data".
(fhandler_fifo::select_read): Define new function.
(fhandler_fifo::select_write): Ditto.
(fhandler_fifo::select_except): Ditto.
* shared_info.h (CURR_SHARED_MAGIC): Update.
2009-02-23 Sjors Gielen <mailinglist@dazjorz.com>
* Makefile.in: Add DESTDIR functionality.
2009-02-23 Corinna Vinschen <corinna@vinschen.de>
* sec_auth.cc (get_user_local_groups): Simplify LookupAccountName code.
2009-02-20 Corinna Vinschen <corinna@vinschen.de>
* autoload.cc (NetLocalGroupEnum): Remove.
(NetLocalGroupGetMembers): Remove.
(NetUserGetLocalGroups): Add.
* sec_auth.cc (is_group_member): Remove function.
(get_user_local_groups): Get user as string instead of as SID.
Call NetUserGetLocalGroups instead of NetLocalGroupEnum. Drop call
to is_group_member.
(get_server_groups): Call get_user_local_groups with user name instead
of user SID.
2009-02-19 Corinna Vinschen <corinna@vinschen.de>
* winver.rc: Fix Copyright date.
2009-02-19 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Export mbsnrtowcs and wcsnrtombs.
* posix.sgml: Move mbsnrtowcs and wcsnrtombs to SUSv4 section.
* include/cygwin/version.h: Bump API minor number.
2009-02-18 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Export open_wmemstream.
* posix.sgml: Move open_wmemstream to SUSv4 section.
* include/cygwin/version.h: Bump API minor number.
2009-02-16 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Export reallocf.
* malloc_wrapper.cc( reallocf): New function.
* posix.sgml: Add reallocf to BSD section.
* include/cygwin/version.h: Bump API minor number.
* libc/fts.c: Remove erroneous reallocf definition.
2009-02-16 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Export wcstoimax, wcstoumax.
* posix.sgml: Move wcstoimax and wcstoumax to SUSv4 section.
* include/inttypes.h: Declare wcstoimax and wcstoumax.
* include/cygwin/version.h: Bump API minor number.
2009-02-13 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Export wcsnlen.
* posix.sgml: Move wcsnlen to SUSv4 section.
* include/cygwin/version.h: Bump API minor number.
2009-02-13 Corinna Vinschen <corinna@vinschen.de>
* environ.cc (_getenv_r): New function.
2009-02-13 Corinna Vinschen <corinna@vinschen.de>
* posix.sgml: Move dirfd to SUSv4 section.
2009-02-13 Corinna Vinschen <corinna@vinschen.de>
* posix.sgml: Move interfaces deprecated in SUSv4 to deprecated
interfaces section. Move interfaces added in SUSv4 to SUSv4
section or, if unimplemented, add them to the unimplemented interfaces
section.
2009-02-13 Corinna Vinschen <corinna@vinschen.de>
* posix.sgml: Merge SUSv3 and SUSv4 section into a single SUSv4 section.
Move Solaris calls now in SUSv4 to SUSv4 section. Rename unimplemented
section to refer to SUSv4. Add note about missing interfaces.
Move wcstod and wcstof from unimplemented to SUSv4 section.
2009-02-13 Corinna Vinschen <corinna@vinschen.de>
* mount.cc (mount_info::from_fstab_line): Make cygdrive posix=0 by
default as documented.
2009-02-13 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Export wcstod and wcstof.
* include/cygwin/version.h: Bump API minor number.
2009-02-11 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (open): Handle O_DIRECTORY flag.
* include/fcntl.h: Add SUSv4 flags O_DIRECTORY, O_EXEC and O_SEARCH.
* include/cygwin/version.h: Bump API minor number.
2009-02-09 Corinna Vinschen <corinna@vinschen.de>
* fhandler_floppy.cc (fhandler_dev_floppy::open): Fix format. Add
code to allow to read disk and CD/DVD devices in full length. Explain
why.
(fhandler_dev_floppy::raw_read): Add current position to debug output.
* include/sys/sched.h: New stub file to override newlib file with
clashing definitions.
2009-02-05 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din: Export wcstok.
* posix.sgml: Move wcstok from unimplemented to susv3.
* include/cygwin/version.h: Bump API minor number.
2009-02-04 Corinna Vinschen <corinna@vinschen.de>
* fhandler_proc.cc (proc_tab): Add entry for mounts symlink.
(format_proc_mounts): New function to implement mounts symlink.
* fhandler_process.cc (process_tab): Add entry for mounts file.
(format_process_mounts): New function to implement mounts file.
2009-02-04 Corinna Vinschen <corinna@vinschen.de>
* security.cc (alloc_sd): Disable generating default permission entries
for directories.
2009-01-29 Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix inode number
evaluation for faked "." entry.
* mount.cc (fs_info::update): Move setting of is_cdrom after checking
for caseinsensitivity. Recognize UDF in is_cdrom case and set
caseinsensitive flag according to UDF brokenness determined by OS.
Add comment to explain why.
* mount.h (class fs_info): Add is_udf status flag.
* path.cc (symlink_info::check): Add workaround for UDF bug in
terms of casesensitivity on certain OSes.
* wincap.h (wincaps::has_broken_udf): New element.
(wincaps::has_broken_udf): New element
2009-01-27 Christopher Faylor <me+cygwin@cgf.cx>
* fhandler.cc (fhandler_base::wait_overlapped): Set bytes to -1 on
EINTR or real error.
(fhandler_base::write_overlapped): Assume that bytes_written will
contain proper error value.
* pipe.cc (fhandler_pipe::fhandler_pipe): Set uninterruptible_io since
signals are handled by pipe functions now.
2009-01-26 Corinna Vinschen <corinna@vinschen.de>
* shared.cc (shared_name): New function for WCHAR names.
(open_shared): Take name parameter as WCHAR. Accommodate throughout.
* shared_info.h ((CURR_SHARED_MAGIC): Redefine.
(shared_name): Add declaration for function taking a WCHAR name.
(open_shared): Change declaration according to above change.
* pinfo.cc (pinfo::init) : Accommodate above change.
2009-01-26 Corinna Vinschen <corinna@vinschen.de>
* grp.cc (getgrgid_r): Simplify code by using stpcpy.
(getgrnam_r): Ditto.
* passwd.cc (getpwuid_r32): Simplify code by using stpcpy.
(getpwnam_r): Ditto.
2009-01-26 Corinna Vinschen <corinna@vinschen.de>
* uinfo.cc (pwdgrp::load): Open file with FILE_OPEN_FOR_BACKUP_INTENT
flag.
2009-01-24 Corinna Vinschen <corinna@vinschen.de>
* mount.cc (mount_info::from_fstab): Open fstab file with
FILE_OPEN_FOR_BACKUP_INTENT flag.
2009-01-23 Corinna Vinschen <corinna@vinschen.de>
* smallprint.cc (__small_vsprintf): Use already available buffer tmp
in wfillin case.
2009-01-22 Christopher Faylor <me+cygwin@cgf.cx>
* select.cc (peek_serial): Add hack to allow proper operation with
com0com driver.
2009-01-21 Corinna Vinschen <corinna@vinschen.de>
Remove USE_SERVER define. Accommodate throughout.
* configure.in: Remove --enable-server option.
* configure: Regenerate.
* environ.cc: Remove CYGWIN=server setting.
2009-01-20 Corinna Vinschen <corinna@vinschen.de>
* fhandler_procnet.cc: Reorganize global procnet content data into a
new struct virt_tab_t. Accommodate throughout.
* fhandler.h: Fix copyright dates.
* fhandler_process.cc: Ditto.
* fhandler_registry.cc: Ditto.
2009-01-20 Corinna Vinschen <corinna@vinschen.de>
* devices.h (FH_PROCESSFD): New device type.
* dtable.cc (build_fh_pc): Add case for FH_PROCESSFD.
* fhandler.h (class fhandler_virtual): Drop bufalloc member.
* fhandler_virtual.h: New header.
* fhandler_proc.cc: Remove types proc_type_t and proc_tab_t in favor
of types virt_type_t and virt_tab_t from fhandler_virtual.h.
Change prototypes of format_XXX functions accordingly.
(proc_tab): Drop size member info.
(fhandler_proc::fill_filebuf): Don't allocate filebuf here. Allocate
it in the format_XXX functions.
* fhandler_process.cc: Reorganize global process content data into a
new struct virt_tab_t. Accommodate throughout.
(format_process_winexename): New function.
(format_process_winpid): New function.
(format_process_exename): New function.
(format_process_root): New function.
(format_process_cwd): New function.
(format_process_cmdline): New function.
(format_process_ppid): New function.
(format_process_uid): New function.
(format_process_pgid): New function.
(format_process_sid): New function.
(format_process_gid): New function.
(format_process_ctty): New function.
(format_process_fd): New function.
* fhandler_procnet.cc (fhandler_procnet::fill_filebuf): Don't use
bufalloc.
* fhandler_registry.cc (fhandler_registry::fill_filebuf): Define
bufalloc locally.
* fhandler_virtual.cc (fhandler_virtual::fhandler_virtual): Drop
initialization of bufalloc.
(fhandler_virtual::dup): Drop copying bufalloc.
2009-01-20 Corinna Vinschen <corinna@vinschen.de>
* thread.h (struct pthread_rwlock::RWLOCK_READER): Add counter n.
* thread.cc (pthread_rwlock::rdlock): If a thread already owns a
read lock, just count the number of locks for it, per SUSv4.
(pthread_rwlock::tryrdlock): Ditto.
(pthread_rwlock::unlock): If a thread has more than one concurrent
read locks, just count down.
2009-01-20 Corinna Vinschen <corinna@vinschen.de>
* autoload.cc (WSAIoctl): Reintroduce.
(WSASendMsg): Define.
* fhandler.h (class fhandler_socket): Change definition of recv_internal
and send_internal to take WSAMSG pointer as parameter.
* fhandler_socket.cc (WSAID_WSARECVMSG): Define.
(LPFN_WSARECVMSG): Define.
(WSASendMsg): Declare.
(get_ext_funcptr): New function to fetch address of WSARecvMsg.
(fhandler_socket::recv_internal): Take just a LPWSAMSG parameter.
Change code accordingly. If control information is requested,
fetch address of WSARecvMsg and use that instead of WSARecvFrom.
(fhandler_socket::recvfrom): Change return type to ssize_t as
declared in fhandler.h. Accommodate changes to recv_internal.
(fhandler_socket::recvmsg): Ditto. Make sure that control information
is only requested if system, address family, and socket type support it.
(fhandler_socket::send_internal): Take just a LPWSAMSG parameter
and the flags. Change code accordingly. If control information is
provided, use WSASendMsg instead of WSASendTo.
(fhandler_socket::sendto): Drop useless comment. Accommodate changes
to send_internal.
(fhandler_socket::sendmsg): Ditto. Make sure that control information
is only provided if system, address family, and socket type support it.
* wincap.h (wincaps::has_recvmsg): New element.
(wincaps::has_sendmsg): New element
* wincap.cc: Implement above elements throughout.
* include/cygwin/socket.h (CMSG_ALIGN): Phrase in terms of alignment
of type struct cmsghdr.
2009-01-17 Corinna Vinschen <corinna@vinschen.de>
* mmap.cc (mmap64): Fix condition checking if anonymous mapping beyond
EOF is required.
2009-01-17 Corinna Vinschen <corinna@vinschen.de>
* fhandler_proc.cc: Reorganize global proc content data into a new
struct proc_tab_t. Accommodate throughout.
(format_proc_version): New function.
(format_proc_loadavg): New function.
(format_proc_self): New function.
* resource.cc (getrlimit): Return correct rlim_max value for
RLIMIT_NOFILE.
2009-01-16 Corinna Vinschen <corinna@vinschen.de>
* Fix copyright dates.
2009-01-13 Corinna Vinschen <corinna@vinschen.de>
* libc/getopt.c (parse_long_options): Use fix from NetBSD's getopt
to avoid false ambiguities.
2009-01-12 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (enum bin_status): New type.
(try_to_bin): Return bin_status. Rename win32_path to pc. Rename h
to fh. Rename fh to tmp_fh. Add code to set delete dispostion and
more code to replace file moved to bin by another, temporary file.
Add comments to explain why.
(unlink_nt): Replace move_to_bin with bin_stat. Only set bin_stat
to move_to_bin for non-remote files. As a last resort, call try_to_bin
if setting delete-on-close failed. Only re-set R/O DOS attribute
and only close handle if it's still valid.
2009-01-11 Corinna Vinschen <corinna@vinschen.de>
* errno.cc (errmap): Set errno to ENOENT instead of ENOSHARE throughout.
* path.cc (path_conv::check): Set to and check for ENOENT instead of
ENOSHARE.
* path.cc (symlink_info::check): Fix Samba 3.2.x comment.
2009-01-09 Corinna Vinschen <corinna@vinschen.de>
* mount.cc (mount_info::from_fstab_line): Always convert drive
letter in native path to uppercase.
* path.cc (normalize_win32_path): Ditto.
(path_prefix_p): Revert previous patch.
* path.cc (symlink_info::check): Check for STATUS_INVALID_PARAMETER
return code to circumvent weird behaviour of Samba 3.2.x shares.
2009-01-09 Christopher Faylor <me+cygwin@cgf.cx>
* include/sys/cygwin.h (CW_SETERRNO): Define.
* external.cc (CW_SETERRNO): Implement.
* include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 192 to
reflect the above change.
* path.cc (path_prefix_p): Treat X: as equivalent to x:.
* mkglobals_h: Remove unneeded #define.
* spawn.cc (spawn_guts): Avoid overly wordy initialization to zero.
2009-01-08 Corinna Vinschen <corinna@vinschen.de>
* libc/fts.c (fts_build): Use DT_DIR case on Cygwin.
(fts_ufslinks): Fix using wrong structure member in Cygwin-specific
code.
2009-01-07 Corinna Vinschen <corinna@vinschen.de>
* ntdll.h: Reorder NT status flags. Fix a case difference. Add
STATUS_CANNOT_DELETE flag.
* syscalls.cc (unlink_nt): Change initial NtOpenFile to request
FILE_SHARE_DELETE sharing mode. Change comment accordingly.
If setting delete disposition failed with STATUS_CANNOT_DELETE, try
to delete using delete-on-close. Explain why.
Rearrange setting R/O DOS attribute after trying to delete. Simplify
comment.
2009-01-07 Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (fhandler_disk_file::link): Only add .exe if
original file has .exe as well.
* path.cc (path_conv::is_binary): Only recognize Windows 32 and 64 bit
apps as binaries.
2009-01-02 Christopher Faylor <me+cygwin@cgf.cx>
Remove unneeded header files from source files throughout.
Update copyrights where appropriate.
* globals.cc: New file for generic global variables.
* mkglobals_h: New script to generate globals.h.
* mkstatic: New script used to build a (currently non-working) static
libcygwin_s.a.
* Makefile.in: Add unused rule to build a non-working libcygwin_s.a.
(DLL_OFILES): Add globals.o. Make all objects rely on globals.h.
(globals.h): New target. Generate globals.h.
* cygtls.h: Honor new CYGTLS_HANDLE define to control when the HANDLE
operator is allowed in _cygtls.
* dcrt0.cc: Move most globals to globals.cc.
* init.cc: Ditto.
* environ.cc (strip_title_path): Remove now-unneeded extern.
* fhandler_serial.cc (fhandler_serial::open): Ditto.
* pinfo.cc: Ditto.
(commune_process): Ditto.
* shared.cc: Ditto.
* glob.cc: Ditto.
* strace.cc: Ditto.
* exceptions.cc: Define CYGTLS_HANDLE before including winsup.h.
* path.cc (stat_suffixes): Move here.
* security.h: Add forward class path_conv declaration.
* smallprint.cc (__small_vsprintf): Make a true c++ function.
(__small_sprintf): Ditto.
(small_printf): Ditto.
(console_printf): Ditto.
(__small_vswprintf): Ditto.
(__small_swprintf): Ditto.
* spawn.cc (spawn_guts): Remove _stdcall decoration in favor of
regparm.
(hExeced): Move to globals.cc
* strfuncs.cc (current_codepage): Ditto.
(active_codepage): Ditto.
* sync.cc (lock_process::locker): Move here from dcrt0.cc.
* syscalls.cc (stat_suffixes): Move to path.cc.
* tty.cc (tty::create_master): Uncapitalize fatal warning for
consistency.
* winsup.h: Include globals.h to declare most of the grab bag list of
globals which were previously defined here.
* mount.h: Move USER_* defines back to shared_info.h.
* speclib: Force temporary directory cleanup.
2009-01-02 Christopher Faylor <me+cygwin@cgf.cx>
* speclib: Rewrite completely in perl. Avoid multiple nm calls.