Commit Graph

7736 Commits

Author SHA1 Message Date
Corinna Vinschen 21c7d001dc * 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 16:22:55 +00:00
Corinna Vinschen 3d69426491 * setup2.sgml (setup-locale-console): New section to explain
console character set setting.
	* faq: Throughout, change references to User's Guide to references
	to 1.7 User's Guide temporarily.
	* faq-setup.html (faq.using.unicode): Rephrase slightly.
	(faq.using.weirdchars): New FAQ entry for console charset problems.
2009-04-07 13:04:43 +00:00
Corinna Vinschen 62755474e5 * 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-07 12:13:37 +00:00
Corinna Vinschen 6af3d60df9 * libc/rexec.cc (ruserpass): Use fstat64 instead of fstat. 2009-04-06 20:44:55 +00:00
Corinna Vinschen 2f9ee8fc90 * 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-06 10:50:11 +00:00
Corinna Vinschen 115655f1f3 * new-features.sgml (ov-new1.7-posix): Remove JIS from supported
charsets.
	* setup2.sgml (setup-locale-charsetlist): Ditto.
2009-04-06 10:30:02 +00:00
Corinna Vinschen 738c26083a * setup2.sgml (setup-locale-problems): Change title to be more clear
when referencing this section.
2009-04-06 10:25:28 +00:00
Christopher Faylor 50b2715c77 * 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 16:49:15 +00:00
Christopher Faylor 66eaf280ac * 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-05 04:23:50 +00:00
Corinna Vinschen 4fedce119c * 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-04 15:49:05 +00:00
Corinna Vinschen f5e097fa4b * Various syntactical and semantical fixes throughout. 2009-04-03 11:51:31 +00:00
Corinna Vinschen d10a1e5154 * utils.sgml: Various syntactical and semantical fixes.
* cygcheck.cc (usage): Fix --find-package explanation.
2009-04-03 11:50:26 +00:00
Corinna Vinschen eab96f6b22 * environ.cc (build_env): Fix length calculation of resulting
wide char environment string.
2009-04-02 17:44:01 +00:00
Corinna Vinschen be37a55086 * include/netdb.h: #include <inttypes.h>, <netinet/in.h>,
and <sys/socket.h> per SUSv3.
2009-04-02 08:48:03 +00:00
Corinna Vinschen cf7fdc0672 * faq-using.xml (faq.using.symlinkstoppedworking): Rename.
(faq.using.ipv6): New IPv6 FAQ.
	* gdb.sgml: Remove incorrect statement about Insight.
2009-04-01 16:56:08 +00:00
Corinna Vinschen b4bf8c7064 * 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-04-01 09:49:25 +00:00
Corinna Vinschen 1e4e6ee8f4 * 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 14:58:14 +00:00
Corinna Vinschen 83fb2c849c * setup2.sgml (setup-locale-problems): Fix an incomplete sentence. 2009-03-31 11:17:08 +00:00
Corinna Vinschen 7ccfe2c70e * faq-using.xml (faq.using.unicode): Modernize.
(faq.api.symlinkstoppedworking): Move here from faq-api.xml.
2009-03-31 10:54:28 +00:00
Corinna Vinschen a33fa76fed * 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-31 09:42:58 +00:00
Dave Korn 24bd1f86c2 * faq-using.xml (faq.using.bloda): Update with new entries. 2009-03-30 09:23:13 +00:00
Christopher Faylor 0390592140 * 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-28 04:55:36 +00:00
Corinna Vinschen 6f0c3cc88a * net.cc (inet_ntop6): Convert to lowercase hex digits on the fly. 2009-03-27 15:20:27 +00:00
Corinna Vinschen e5d5e036fd * net.cc (cygwin_getaddrinfo): Check hints for non-NULL before
checking its content.
2009-03-27 15:10:18 +00:00
Corinna Vinschen 52e26dc2ab * fhandler.h (class fhandler_fifo): Rename read/write methods to
raw_read/raw_write.
	* fhandler_fifo.cc: Ditto.
2009-03-27 15:04:42 +00:00
Corinna Vinschen 7a9f309bcd * syscalls.cc (pathconf): Fix memory leak. 2009-03-27 11:29:56 +00:00
Corinna Vinschen d6e045e614 * README: Remove "How to use" section, as CYGWIN="server" is
no longer required.
2009-03-27 10:17:48 +00:00
Corinna Vinschen 12ddd5e5b7 * utils.sgml (passwd -R): Remove references to CYGWIN="server". 2009-03-27 10:16:13 +00:00
Corinna Vinschen ffb5ddd565 * cygwinenv.sgml: Add text to explain new UTF-16 symlinks.
* faq-api.xml: Add FAQ entry "Why do some of my old symlinks don't
	work anymore?"
	* new-features.sgml: Fix symlink text.  Add new UTF-16 symlinks.
	* overview2.sgml: Add text about new UTF-16 symlinks and potential
	problems with old symlinks.
	* pathnames.sgml: Fix typo.
	* setup2.sgml: Extend text about problems with symlinks.
2009-03-26 12:25:11 +00:00
Corinna Vinschen 4d9c72800f * 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 12:12:11 +00:00
Corinna Vinschen 62818522c2 * include/asm/byteorder.h (__ntohl): Align definition to ISO C99.
(__ntohs): Ditto.
2009-03-26 10:40:29 +00:00
Corinna Vinschen 2aaa53221b * new-features.sgml: Replace GB2312 with GBK.
* setup2.sgml: Ditto.
2009-03-26 10:31:08 +00:00
Corinna Vinschen fa0853e168 * strfuncs.cc (__set_charset_from_codepage): Revert to translating
codepage 936 to "GBK".
2009-03-26 10:26:57 +00:00
Corinna Vinschen d84b37e24b * pathnames.sgml: Add a note that ASCII SO handling isn't foolproof
under all circumstances.
2009-03-25 14:33:05 +00:00
Corinna Vinschen b10a036a92 * strfuncs.cc (sys_wcstombs): Don't convert ASCII SO into two
ASCII SO's.
2009-03-25 13:54:41 +00:00
Corinna Vinschen 5354e13fe6 * 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 12:29:04 +00:00
Corinna Vinschen f276aab75a * new-features.sgml: Add missing GB2312 and eucKR character sets.
* pathnames.sgml: Change "DOS devices" title to "Invalid filenames"
	and rephrase that section.
	Add section "Filenames with unusual (foreign) characters".
	Fix an emphasis.
	* setup-net.sgml: Integrate setup-locale section.
	* setup2.sgml: Add locale variables to section "Environment Variables".
	Add section "Internationalization".
2009-03-25 10:37:06 +00:00
Corinna Vinschen 4747078502 * 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-25 09:02:22 +00:00
Corinna Vinschen 4098799105 * 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 18:20:01 +00:00
Corinna Vinschen ba8f298cbc * strfuncs.cc (sys_cp_mbstowcs): Don't read beyond src + nms. 2009-03-24 16:42:36 +00:00
Corinna Vinschen 8ce3e7abc8 * new-features.sgml: Add section about chaged (no)winsymlink default. 2009-03-24 13:51:25 +00:00
Corinna Vinschen 22836f13b6 * shared_info.h (CURR_SHARED_MAGIC): Update. 2009-03-24 13:44:53 +00:00
Corinna Vinschen 2971f07610 * cygcheck.cc (dump_sysinfo): Fix compiler warning in printf.
* strace.cc (proc_child): Ditto.
	* ldd.cc: Remove now useless undef wcscasecmp.
2009-03-24 13:35:08 +00:00
Corinna Vinschen db917b216e * wchar.h: Replace UINT with unsigned int. 2009-03-24 13:33:57 +00:00
Corinna Vinschen 10558efdef * wchar.h: Remove erroneous "C" specifier from extern declaration. 2009-03-24 13:21:23 +00:00
Corinna Vinschen 1c6743b74d * cygwinenv.sgml: Move "codepage:xxx" to the removed options section.
Change text accordingly.
	* new-features.sgml: Try to explain new way to define character sets.
2009-03-24 12:37:02 +00:00
Corinna Vinschen 161211d186 * 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 12:18:34 +00:00
Corinna Vinschen 6a32d500a9 * sec_auth.cc (str2buf2uni): Remove.
* security.h (str2buf2uni): Remove declaration.
2009-03-24 10:53:57 +00:00
Corinna Vinschen 0258b68722 * include/mntent.h: Remove declarations of nonexistant addmntent
and hasmntopt.  Update and clarify the /etc/mtab comment.
2009-03-24 09:19:37 +00:00
Corinna Vinschen 6199f417ab * passwd.c (usage): Change description for -d option according to
previous change.
	(main): Fix typo.
	* utils.sgml: Add missing description for passwd -d option.
2009-03-23 20:40:17 +00:00
Corinna Vinschen 0e0f5748e0 * passwd.c (caller_is_admin): New function to test if calling user
is an administrator by inspecting user token.
	(main): Drop fetching caller info from logonserver.  Only fetch
	server from environment when trying to change password for own
	account.  Drop admin check entirely in case of doing account
	maintainance.  Otherwise replace check for admin by result of
	caller_is_admin call.
2009-03-23 16:37:49 +00:00
Corinna Vinschen 7d2e8c04f2 * smallprint.cc (__small_vsprintf): Handle NULL PWCHAR and
PUNICODE_STRING arguments.
	(__small_vswprintf): Ditto.
2009-03-23 15:48:16 +00:00
Corinna Vinschen 1199a53979 * include/asm/byteorder.h (__constant_ntohs): Remove declaration.
(__constant_ntohl): Ditto.
2009-03-23 14:26:55 +00:00
Corinna Vinschen 9a1109002a * cygwin.din: Export wordexp, wordfree.
* posix.sgml: Move them to SUSv4 list.
	* include/cygwin/version.h: Bump API minor number.
2009-03-23 09:46:38 +00:00
Corinna Vinschen ab1739c0b9 * include/sys/un.h: #include <string.h> for strlen. 2009-03-23 08:45:18 +00:00
Corinna Vinschen a26691a67c * passwd.c (main): Always get logonserver from environment and
use when fetching user info for caller.
2009-03-22 19:18:26 +00:00
Corinna Vinschen 35aeac58b0 * ldd.cc: Fix compiler warning.
* passwd.c: Use mbstowcs instead of MultiByteToWideChar throughout.
	(main): Call setlocale.  Fix a bug in fetching the logon server from
	the environment.
2009-03-22 10:09:01 +00:00
Corinna Vinschen 576cc648d3 * cygserver-config: Remove misleading text describing the
"CYGWIN=server" setting for the client.
2009-03-20 11:54:16 +00:00
Corinna Vinschen d09a742ef4 * dlfcn.cc (get_full_path_of_dll): Revert patch from 2008-07-16. 2009-03-19 18:16:07 +00:00
Corinna Vinschen a9a520b62b * cygwin.din: Export log2, log2f as functions.
* posix.sgml: Add them to SUSv4 list.
	* include/cygwin/version.h: Bump API minor number.
2009-03-19 09:22:01 +00:00
Christopher Faylor f48bb39e20 *** empty log message *** 2009-03-18 14:47:13 +00:00
Christopher Faylor c4509a7ac2 Re-add inexplicably missing ldh.cc. 2009-03-18 14:46:24 +00:00
Corinna Vinschen 9e112520ff * 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-18 13:58:35 +00:00
Corinna Vinschen da413e0a39 * winnt.h: Add Vista token security extensions.
(SID_HASH_SIZE): Define.
	(TOKEN_MANDATORY_POLICY_OFF, TOKEN_MANDATORY_POLICY_NO_WRITE_UP,
	TOKEN_MANDATORY_POLICY_NEW_PROCESS_MIN,
	TOKEN_MANDATORY_POLICY_VALID_MASK): Define.
	(SID_HASH_ENTRY): Define.
	(struct _SID_AND_ATTRIBUTES_HASH): Define.
	(struct _TOKEN_LINKED_TOKEN): Define.
	(struct _TOKEN_MANDATORY_LABEL): Define.
	(struct _TOKEN_MANDATORY_POLICY): Define.
	(struct _TOKEN_ELEVATION): Define.
	(struct _TOKEN_ACCESS_INFORMATION): Define.
	(enum _TOKEN_INFORMATION_CLASS): Conditionally define new Vista token
	information enumeration values.
2009-03-18 13:47:18 +00:00
Corinna Vinschen 49536558ef * cygwin-ug-net.in.sgml: Update date.
* cygwinenv.sgml: Fix codepage:utf8 text in terms of setting
	environment variables.
	* new-features.sgml: New file describing new Cygwin 1.7 features.
	Layout is preliminiary only.
	* overview.sgml: Insert content of new-features.sgml.
2009-03-18 11:29:27 +00:00
Corinna Vinschen 1233ba242b * overview2.sgml: Remove reference to CYGWIN=binmode.
* textbinary.sgml: Ditto.  Rephrase certain paragraphs to match
	Cygwin 1.7 behaviour.  Add popen(3) and pipe(2) behaviour.  Make
	quite clear that binmode is preferred.  Add *mode.o files to
	description for developers.
2009-03-18 11:05:45 +00:00
Christopher Faylor 2e13058eac * ldd.cc (load_dll): Start helper program rather than ldd.exe.
(set_entry_point_break): Rename from get_entry_point.
(print_dlls): Rename from print_dlls_and_kill_inferior.  Avoid printing
specific dll name if we're looking at a dll.
(report): Always dump dlls on process exit.  Don't allow thread creation.
Accommodate get_entry_point rename.
(start_process): Start process with DEBUG_ONLY_THIS_PROCESS.
(longopts): Eliminate "dll" option.
(main): Ditto.
* ldd.cc: Use wide character Win32 paths throughout.
(load_dll): Fix size expression (add fn) in realloc.
2009-03-18 04:19:05 +00:00
Corinna Vinschen 99438c631a * errno.cc (_sys_errlist): Add ESTRPIPE. 2009-03-15 13:46:56 +00:00
Corinna Vinschen 19b3c04bb0 * cygwin.din: Export wcsdup.
* posix.sgml: Add wcsdup to SUSv4 list.
	* include/cygwin/version.h: Bump API minor number.
2009-03-15 13:45:02 +00:00
Corinna Vinschen 7b011fb192 * include/inttypes.h: Remove "l" size specifier from all 16 and 32 bit
definitions.
2009-03-15 13:29:04 +00:00
Christopher Faylor d5e4f55b14 * ldd.cc (longopts): Add --dll option.
(get_module_filename): Generalized wrapper function which avoid path length
restrictions.
(load_dll): Handle special-case of inspecting a DLL.
(start_process): Accept an output parameter "isdll".  Detect when file to start
is a DLL and start a wrapper instead.
(print_dlls_and_kill_inferior): When dealing with a DLL, avoid printing
everything before the DLL itself first appears.  (This is not strictly correct
and should be fixed eventually)
(report): Deal with DLLs.  Don't set a breakpoint for DLLs, just let captive
ldd process terminate normally.  Pass dll info to print_dlls_and_kill_inferior.
(main): Handle special-case "--dll" option by loading the DLL and exiting.
2009-03-14 18:40:59 +00:00
Christopher Faylor 6612934a40 * path.cc (warn_msdos): Don't warn about MS-DOS filenames encountered during
initialization.
2009-03-14 18:35:26 +00:00
Corinna Vinschen 5c8c49cc43 * path.cc (from_fstab): Use wcstombs/mbstowcs instead of
WideCharToMultiByte/MultiByteToWideChar to accommodate current locale.
2009-03-14 14:58:05 +00:00
Corinna Vinschen 26fb7ef5e4 * wide_path.h (class wide_path): New class to convert Windows path
to WCHAR win32 path, including long path conversion if necessary.
	* cygcheck.cc: Use class wide_path throughout to call Win32 functions
	taking potentially long filenames.
	(display_error): Use snprintf rather than sprintf.
	(display_error_fmt): Ditto.
	(dump_sysinfo): Use FindFirstFileW/FindNextFileW.
	* cygpath.cc: Use class wide_path throughout to call Win32 functions
	taking potentially long filenames.
	(get_device_name): Raise buffer size to take long pathnames.
	(get_short_paths): Convert to using GetShortPathNameW.
	(get_short_name): Ditto.
	(get_long_path_name_w32impl): Convert to equivalent of GetLongPathNameW.
	(get_long_name): Convert to using GetLongPathNameW.
	(do_sysfolders): Raise buffer size for POSIX pathname to PATH_MAX.
	(do_pathconv): In case of POSIX->Win32 conversion, convert to wchar_t
	Win32 path name and drop long pathname prefix if possible.
	(main): Call setlocale to accommodate wide char/multibyte conversions.
2009-03-14 14:56:20 +00:00
Corinna Vinschen 01cdb57d40 * gendef: Remove STABS directives. 2009-03-14 09:14:47 +00:00
Christopher Faylor 962acfe58a * ldd.cc: Rework to detect missing DLLs.
(start_process): Change to expect windows filename as input.
(tocyg): New function - convert cygwin fn to windows fn.
(print_dlls_and_kill_inferior): Accept extra argument denoting whether to open
input and look for nonexistent DLLs.  Use tocyg to convert filename and pass it
to start_process.
(report): Flag when an DLL-not-found exception occurs and pass this information
to print_dlls_and_kill_inferior.
(filelist): New structure.
(saw_file): New function.
(dump_import_directory): Ditto.
(map_file): Ditto.
(skip_dos_stub): Ditto.
(get_directory_index): Ditto.
(process_file): Ditto.
2009-03-14 06:46:00 +00:00
Corinna Vinschen ad2c5ad9d2 * mktemp.cc: Remove STABS specific link-time warning. Align copyright
text to upstream.
2009-03-13 20:49:42 +00:00
Corinna Vinschen 8c0b8bc352 * flock.cc: Fix lockf copyright to latest version. 2009-03-13 09:33:55 +00:00
Corinna Vinschen 752c477b42 * 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 22:03:28 +00:00
Corinna Vinschen fc69f1aed5 * flock.cc (fhandler_disk_file::lock): Don't test file open mode in
case of flock-type locks.  Explain why.
2009-03-12 18:30:29 +00:00
Corinna Vinschen 2e0b52c9d8 * gethostby_helper: Fix typos in DEBUGGING case. 2009-03-12 15:54:49 +00:00
Corinna Vinschen cab0758eb2 * cygwin.din: Export wcscasecmp, wcsncasecmp.
* posix.sgml: Move wcscasecmp, wcsncasecmp to SUSv4 list.
	* include/cygwin/version.h: Bump API minor number.
2009-03-11 13:00:28 +00:00
Corinna Vinschen 32382e935a * 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-11 12:03:44 +00:00
Corinna Vinschen 71d13bca55 * 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 14:40:45 +00:00
Corinna Vinschen c47426aedb * cygwin.din: Export wcsftime.
* posix.sgml: Move wcsftime to SUSv4 list.
	* include/cygwin/version.h: Bump API minor number.
2009-03-09 13:22:37 +00:00
Corinna Vinschen f9f478ad80 * pathnames.sgml: Try to be more clear explain raw devices. 2009-03-09 10:23:44 +00:00
Corinna Vinschen 313fb10ba2 * utils.sgml: Fix typo. 2009-03-09 09:20:38 +00:00
Christopher Faylor 9caeaa61c0 * cygcheck.cc (usage): Fix typo. 2009-03-08 21:13:26 +00:00
Corinna Vinschen 6f57cb4a52 * 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 16:31:26 +00:00
Corinna Vinschen 45e20e47ba * 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-06 10:09:55 +00:00
Chris Sutcliffe 6e0e5a4fc2 2009-03-05 Kai Tietz <kai.tietz@onevision.com>
* pseudo-reloc.c: Rewrite to enable pseudo_reloc version 2.
2009-03-05 14:48:38 +00:00
Corinna Vinschen 06281845fb * dcrt0.cc (disable_dep): Disable. Explain why.
(dll_crt0_0): Disable calling disable_dep.  Explain why.
2009-03-04 11:45:58 +00:00
Corinna Vinschen 2895b8b502 * 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 11:44:18 +00:00
Corinna Vinschen ed296a4727 * include/asm/byteorder.h: Disable optimization when building
Cygwin network code.
2009-03-03 11:11:26 +00:00
Corinna Vinschen 92fa4552fd * faq-using.xml: Rework UTF FAQ to accommodate latest setlocale
change in newlib.
2009-03-03 10:36:59 +00:00
Corinna Vinschen e81ae92910 * pathnames.sgml: Remove reference to managed mountpoints in mount
entry example.
2009-03-03 09:11:45 +00:00
Corinna Vinschen 17a12c5065 * utils.sgml: Set example prompt to "$" throughout. Don't use "/"
as example cygdrive prefix.  Remove reference to -u and -s options.
	Add an example using the -o flag.
2009-03-02 10:56:19 +00:00
Corinna Vinschen 8262e64256 * mount.cc (mount_entries): Handle a "/" cygdrive prefix correctly.
Add comments.
2009-03-02 10:47:04 +00:00
Christopher Faylor c7ef20e7fa * 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-27 00:34:40 +00:00
Christopher Faylor 99fe2b7866 Add DESTDIR functionality to Makefile.in's. 2009-02-24 02:11:14 +00:00
Corinna Vinschen 8ec5da1ff6 * sec_auth.cc (get_user_local_groups): Simplify LookupAccountName code. 2009-02-23 18:27:48 +00:00
Corinna Vinschen b419b631b6 * faq-using.xml: Rework XEmacs FAQ. 2009-02-23 16:33:17 +00:00
Corinna Vinschen 348267bdf6 * 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-20 16:10:45 +00:00
Corinna Vinschen 964abbd08e * winver.rc: Fix Copyright date. 2009-02-19 16:12:02 +00:00
Corinna Vinschen 89b5579d3b * 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-19 09:22:51 +00:00
Corinna Vinschen 15fc34ac5a * cygwin.din: Export open_wmemstream.
* posix.sgml: Move open_wmemstream to SUSv4 section.
	* include/cygwin/version.h: Bump API minor number.
2009-02-18 17:38:16 +00:00
Corinna Vinschen c6b9747e04 * 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 20:22:38 +00:00
Corinna Vinschen de5c20c2de * 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-16 15:36:01 +00:00
Corinna Vinschen 4806c1f4f6 * faq-using.xml: Fix usage of ampersand in NT emacs script. 2009-02-14 20:56:48 +00:00
Corinna Vinschen 6ff3731ad4 * faq-using.xml: Expand Emacs entries. 2009-02-14 20:52:50 +00:00
Corinna Vinschen b36d8c6040 * overview.sgml: Fix 1.7 release date. 2009-02-13 18:41:32 +00:00
Corinna Vinschen c6d3735106 * cygwin.din: Export wcsnlen.
* posix.sgml: Move wcsnlen to SUSv4 section.
	* include/cygwin/version.h: Bump API minor number.
2009-02-13 18:39:37 +00:00
Corinna Vinschen 4b1b39e758 * environ.cc (_getenv_r): New function. 2009-02-13 17:49:37 +00:00
Corinna Vinschen 22e138ad6b * posix.sgml: Move dirfd to SUSv4 section. 2009-02-13 12:45:02 +00:00
Corinna Vinschen 52d132e48e * cygwin-api.in.sgml: Fix API section layout. 2009-02-13 12:23:21 +00:00
Corinna Vinschen b0e662b8d6 * 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 12:19:25 +00:00
Corinna Vinschen f2ba21b1a4 * 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 11:33:32 +00:00
Corinna Vinschen 06d60a915d * pathnames.sgml: Add a cygdrive section. 2009-02-13 10:13:28 +00:00
Corinna Vinschen 0211e37a62 * mount.cc (mount_info::from_fstab_line): Make cygdrive posix=0 by
default as documented.
2009-02-13 09:05:42 +00:00
Corinna Vinschen 8cf4b71e1f * pathnames.sgml: Replace "binmode" with new "binary" output of mount. 2009-02-13 09:04:51 +00:00
Corinna Vinschen cc9054ccce * cygwin.din: Export wcstod and wcstof.
* include/cygwin/version.h: Bump API minor number.
2009-02-13 08:33:11 +00:00
Corinna Vinschen 545b4d2b57 * faq-using.xml: First cut on Emacs. 2009-02-12 15:30:03 +00:00
Corinna Vinschen 45105145e1 * faq-setup.xml: Revamp for Cygwin 1.7.
* faq-using.xml: Ditto.
2009-02-12 14:45:50 +00:00
Corinna Vinschen c2da1d6ebf * faq-programming.xml: Revamp (mostely) for Cygwin 1.7.
* faq-what.xml: Ditto.
2009-02-11 18:22:50 +00:00
Corinna Vinschen bb549dfed8 * Makefile.in (FAQ_SOURCES): Define FAQ sources.
(faq/faq.html): Depend on FAQ sources.
	(faq/faq-nochunks.html): Ditto.
	* faq-api.xml: Revamp for Cygwin 1.7.
	* faq-problems.xml: Remove.
	* faq-sections.xml: Accommodate removal of faq-problems.xml.
	* faq.xml: Ditto.
2009-02-11 16:44:13 +00:00
Corinna Vinschen 64d6e1d43e * 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-11 16:06:39 +00:00
Corinna Vinschen 29915d8ef2 * 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-09 18:28:53 +00:00
Corinna Vinschen 9a1d57ec13 * include/winioctl.h (FSCTL_ALLOW_EXTENDED_DASD_IO): Copy definition
from ddk/ntifs.h.
2009-02-09 18:22:08 +00:00
Keith Marshall ce6ef36015 MinGW-Feature-Request [2222263]: Make getopt() GNU / BSD compatibile. 2009-02-08 18:02:17 +00:00
Chris Sutcliffe f8471cd023 2009-02-06 Linton Miller <Linton.Miller@trivininc.com>
* include/wtsapi32.h (WTS_CURRENT_SESSION): Fix definition.
2009-02-07 04:34:27 +00:00
Corinna Vinschen 11acb173d9 * cygwin.din: Export wcstok.
* posix.sgml: Move wcstok from unimplemented to susv3.
	* include/cygwin/version.h: Bump API minor number.
2009-02-05 17:30:17 +00:00
Corinna Vinschen 8c71dc5878 * 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 16:40:04 +00:00
Corinna Vinschen 29e22d07d6 * security.cc (alloc_sd): Disable generating default permission entries
for directories.
2009-02-04 15:26:22 +00:00
Corinna Vinschen f01ffdd1e5 * pathnames.sgml: Rephrase the "Case sensitive filenames" chapter
slightly.
2009-02-03 09:03:18 +00:00
Corinna Vinschen 43616e5526 * 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-29 20:32:08 +00:00
Corinna Vinschen bacd5877ba * cygcheck.cc (dump_sysinfo): Evaluate and print state of
obcaseinsensitive kernel flag.
2009-01-29 19:31:04 +00:00
Christopher Faylor 1ae0cd1335 * 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-27 05:21:08 +00:00
Corinna Vinschen 555a908c17 * 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 13:42:37 +00:00
Corinna Vinschen b89fb103f2 * 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 13:20:46 +00:00
Corinna Vinschen 93e884989a * uinfo.cc (pwdgrp::load): Open file with FILE_OPEN_FOR_BACKUP_INTENT
flag.
2009-01-26 13:03:49 +00:00
Corinna Vinschen 01d2675aea * mount.cc (mount_info::from_fstab): Open fstab file with
FILE_OPEN_FOR_BACKUP_INTENT flag.
2009-01-24 16:30:09 +00:00
Corinna Vinschen 7d01164900 * pathnames.sgml: Add requirement for world-readability of special
/etc files.
2009-01-24 15:31:18 +00:00
Corinna Vinschen 998f82685e * pathnames.sgml: Add section about accessing /etc files. 2009-01-24 12:26:10 +00:00
Corinna Vinschen dcf6bd1e04 * smallprint.cc (__small_vsprintf): Use already available buffer tmp
in wfillin case.
2009-01-23 13:59:13 +00:00
Christopher Faylor 9895091d0d * select.cc (peek_serial): Add hack to allow proper operation with com0com
driver.
2009-01-22 16:00:58 +00:00
Corinna Vinschen 7ffaa17c80 ChangeLog:
* configure.in: Remove --enable-server option.  Allways add the
	cygserver directory to $SUBDIRS.
	* configure: Regenerate.

cygwin/ChangeLog:

	Remove USE_SERVER define.  Accommodate throughout.
	* configure.in: Remove --enable-server option.
	* configure: Regenerate.
	* environ.cc: Remove CYGWIN=server setting.

cygserver/ChangeLog:

	* client.cc (allow_server): Remove variable.
	(client_request_get_version::client_request_get_version): Drop checking
	allow_server.

utils/ChangeLog:

	* passwd.c: Remove CYGWIN=server requirement from usage text.

doc/ChangeLog:

	* cygserver.sgml: Remove the "How to use the Cygserver services"
	section.
	* cygwinenv.sgml: Move "(no)server" to the removed options section.
	* faq-programming.xml: Remove CYGWIN=server requirement for running
	the Cygwin testsuite.
	* ntsec.sgml: Ditto for using `passwd -R'.
2009-01-21 17:14:39 +00:00
Corinna Vinschen d9ad7a9c4e * 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 18:04:32 +00:00
Corinna Vinschen 38f50ae4d5 * 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 17:22:11 +00:00
Corinna Vinschen f8190b5705 * 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 12:40:31 +00:00
Corinna Vinschen 3787b37ef2 * 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-20 11:16:59 +00:00
Corinna Vinschen ddc0c0d3f5 * include/winbase.h (enum _DEP_SYSTEM_POLICY_TYPE): Fix version guard. 2009-01-19 15:36:14 +00:00
Andreas Schwab b50494eedc Remove conflict marker. 2009-01-19 09:42:13 +00:00
Corinna Vinschen 895d15b81e * mmap.cc (mmap64): Fix condition checking if anonymous mapping beyond
EOF is required.
2009-01-17 17:20:37 +00:00
Chris Sutcliffe 96ed5e2441 2009-01-11 Henry Nestler <henry@bigfoot.de>
* lib/ddk/ntoskrnl.def: Enable ZwQueryEaFile, ZwSetEaFile, NtQueryEaFile,
        NtSetEaFile.
2009-01-17 17:00:07 +00:00
Corinna Vinschen 2ac273a946 * Makefile.in: Fix copyright date.
* cygcheck.cc (scan_registry): Take additional parameter and add code
	to avoid recursion in Wow6432Node subkey.  Rename variable cygnus to
	cygwin.  Scan for "Cygwin" instead of for "cygnus" substring.
	(dump_sysinfo): Drop unused calls to scan_registry.  Drop scanning
	HKEY_CURRENT_CONFIG.
2009-01-17 11:59:16 +00:00
Corinna Vinschen 40255b64d4 * 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-17 10:16:42 +00:00
Corinna Vinschen 165cb24581 * Fix copyright dates. 2009-01-16 12:17:28 +00:00
Corinna Vinschen ab30b9e352 * cygcheck.cc (dump_sysinfo): Raise size of osname. Add Windows 7
and Windows 2008 R2 as recognized OSes.  Update products array to
	the latest documented list.
2009-01-16 12:10:02 +00:00
Corinna Vinschen 8c3efc4901 * libc/getopt.c (parse_long_options): Use fix from NetBSD's getopt
to avoid false ambiguities.
2009-01-13 09:58:43 +00:00
Corinna Vinschen 8a0f3bbf2d * 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-12 15:51:23 +00:00
Corinna Vinschen b98c66ee2c * 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-11 16:13:11 +00:00
Chris Sutcliffe 45cda16a7f 2009-01-10 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/_mingw.h: Increment version to 3.15.2.
2009-01-10 18:42:32 +00:00
Corinna Vinschen 54a83cc65a * 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 16:20:26 +00:00
Christopher Faylor d95d8c5393 * 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-09 05:18:02 +00:00
Christopher Faylor 086dc27fec * ldd.cc: New file. First stab at implementing ldd-like functionality for
Cygwin.
* Makefile.in (CYGWIN_BINS): Add ldd.
(ldd.exe): Use -lpsapi.
2009-01-09 05:11:57 +00:00
Corinna Vinschen aa9f366548 * libc/fts.c (fts_build): Use DT_DIR case on Cygwin.
(fts_ufslinks): Fix using wrong structure member in Cygwin-specific
	code.
2009-01-08 21:12:46 +00:00
Corinna Vinschen f4ad04049f * 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 18:18:23 +00:00
Corinna Vinschen 3bee7767a8 * 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-07 14:12:40 +00:00
Corinna Vinschen 49a0cd95c0 * include/winbase.h (SCS_64BIT_BINARY): Define. 2009-01-07 14:11:57 +00:00
Pierre Humblet 952801c27e * cygcheck.cc (dump_sysinfo_services): Quote the path for popen. 2009-01-06 04:11:23 +00:00
Keith Marshall f1170e02f2 Fix MinGW-Bug [2445962]; (reported by Keishi Suenaga). 2009-01-04 17:35:36 +00:00
Christopher Faylor 952783ba77 * Makefile.in (CFLAGS): Look in cygwin's build directory for header files. 2009-01-03 05:37:34 +00:00
Christopher Faylor 8bb2521761 correct 2009-01-03 05:13:35 +00:00
Christopher Faylor 66a83f3eac Remove unneeded header files from source files throughout. Update copyrights
where appropriate.
* globals.cc: New file for generic global variables.
* mkglobals_h: New file 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-03 05:12:22 +00:00
Christopher Faylor 258776ce91 Year-end rollover. 2009-01-03 02:27:46 +00:00
Christopher Faylor 944c817a60 * speclib: Rewrite completely in perl. Avoid multiple nm calls. 2009-01-02 06:57:14 +00:00
Christopher Faylor feb2075569 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 191. 2008-12-31 21:47:45 +00:00
Christopher Faylor ecd5bc4ea8 * glob_pattern_p.cc: New file.
* Makefile.in (DLL_OFILES): Add glob_pattern_p.o.
* glob.h: Add declaration for glob_pattern_p.
* pinfo.cc (pinfo::thisproc): Remove __stdcall attribute.
2008-12-31 21:33:34 +00:00
Keith Marshall 762cf3ee22 Correct mishandling of invalid characters in printf() format specs. 2008-12-31 15:34:09 +00:00
Christopher Faylor 0c94c057a4 * include/bits/wordsize.h: New linux-compatibility header. 2008-12-31 04:12:44 +00:00
Pierre Humblet 0b451bb524 * cygcheck.cc (pretty_id): Quote the path for popen.
(dump_sysinfo_services): Ditto.
2008-12-31 01:44:36 +00:00
Christopher Faylor b837af5478 * exceptions.cc (try_to_debug): Avoid creating a huge buffer on the stack. 2008-12-30 18:18:09 +00:00
Christopher Faylor 5829832825 * mount.cc: Change comment.
(smb_extended_info): Move here from path.cc.
(fs_info::update): Ditto.
(mount_info::create_root_entry): Delay conversion to slashes and use passed in
buffer to figure out fs type.
* path.cc (smb_extended_info): Move.
(fs_info::update): Ditto.
* mount.h: New file.  Move mount information here.
* path.h: (fs_info::update): Move.
* shared_info.h (mount_item): Ditto.
2008-12-25 15:55:31 +00:00
Christopher Faylor 58402a3f63 * path.cc (symlink_info::check_shortcut): Ensure that symlink handle is closed
on successful return.
2008-12-24 16:34:38 +00:00
Christopher Faylor 9a8597c13a * fhandler.h (fhandler_base_setup_overlapped): Add new argument.
(fhandler_base::get_overlapped_buffer): Declare new function.
(fhandler_base::set_overlapped): Ditto.
(fhandler_pipe::overlapped): New variable.
(fhandler_pipe::get_overlapped): Rework to return contents of overlapped
variable.
(fhandler_pipe::set_overlapped): Set overlapped variable based on argument.
(fhandler_fifo::get_overlapped_buffer): Return pointer to io_status.
* fhandler.cc (handler_base::setup_overlapped): Set to overlapped pointer to
NULL if new doit parameter is false.  Otherwise set up overlapped event as
usual.
(fhandler_base::wait_overlapped): Return inres if this isn't an overlapped
operation.
(fhandler_base::read_overlapped): Remove inappropriate asserts.
* pipe.cc (fhandler_pipe::fhandler_pipe): Zero overlapped element.
(struct pipesync): Delete.
(getov_result): Ditto.
(pipe_handler): Ditto.
(pipesync::pipesync): Ditto.
(fhandler_pipe::init): Don't set up pipesync thread.  Just pass opened_properly
flag along to overlapped setup.
2008-12-23 18:22:33 +00:00
Christopher Faylor 6ef31d2336 * pipe.cc (getov_result): Minor cleanup. 2008-12-22 19:18:00 +00:00
Christopher Faylor 91ad1942a2 * pipe.cc (getov_result): Add parameters to facilitate better EOF checking.
(pipe_handler): Pass extra arguments to getov_result.
2008-12-21 01:54:32 +00:00
Christopher Faylor 0cf888799b * fhandler.cc (fhandler_base::wait_overlapped): Reorganize to eliminate gotos
and to hopefully eliminate one race when a signal is detected or there is a
WFMO error.
2008-12-20 19:20:00 +00:00
Christopher Faylor 9ac421686a * pinfo.h (pinfo::thisproc): Declare. Rename from set_myself.
* pinfo.cc (pinfo::thisproc): Define.  Rename from set_myself.  Set procinfo to
NULL to avoid confusing subsequent init.
(pinfo_init): Accommodate set_myself -> pinfo::thisproc rename.
* dcrt0.cc (child_info_fork::handle_fork): Ditto.
(child_info_spawn::handle_spawn): Ditto.
2008-12-20 17:32:31 +00:00
Corinna Vinschen e9982f2a2b * pwdgrp.h (pwdgrp::refresh): Fix indentation.
* uinfo.cc (pwdgrp::load): Open file synchronized to avoid truncated
	read.  Drop local variable off.
2008-12-20 09:35:18 +00:00
Chris Sutcliffe 99c7be03b2 2008-12-16 Danny Smith <dannysmith@users.sourceforge.net>
* msvcrt.def.in (___lc_codepage_func, ___lc_collate_cp_func,
        ___lc_handle_func, ___mb_cur_max_func, ___setlc_active_func,
        ___unguarded_readlc_active_add_func, __crtCompareStringW,
        __crtGetStringTypeW, __crtLCMapStringW, __pctype_func,
        __pwctype_func, __iob_func, __uncaught_exception, __wcserror,
        __CxxDetectRethrow, __CxxExceptionFilter, __CxxQueryExceptionSize,
        __CxxRegisterExceptionObject, __CxxUnregisterExceptionObject,
        __CxxCallUnwindDtor, __DestructExceptionObject, _aligned_free,
        _aligned_malloc, _aligned_offset_malloc, _aligned_offset_realloc,
        _aligned_realloc, _cgetws, _cputws, _cwprintf, _cwscanf, _getwch,
        _getwche, _putwch, _resetstkoflw, _scprintf, _scwprintf,
        _set_SSE2_enable, _snscanf, _snwscanf, _strtoi64, _strtoui64,
        _ungetwch, _vscprintf, _vscwprintf, _wcserror, _wcstoi64,
        _wcstoui64, _wctype, _wtof, _get_heap_handle): Always export.
2008-12-20 03:55:37 +00:00
Christopher Faylor 1af6bb97a4 * pinfo.cc (pinfo_basic): New class.
(pinfo_basic::pinfo_basic): Define constructor for new class.
(myself): Initialize from myself_initial.
(set_myself): Set pid and progname from already myself_initial.
* strace.cc (strace::strace): Split apart strace::hello.  Send notification to
strace as early as possible.
(strace::hello): Just send clause which describes the current process.  This
can now be preceded by early initialization strace output.
* include/sys/strace.h (strace::strace): Declare new constructor.
2008-12-19 19:09:51 +00:00
Corinna Vinschen 887eb76fca * fhandler_registry.cc (perf_data_files): New table.
(PERF_DATA_FILE_COUNT): New constant.
	(fhandler_registry::exists): Add check for HKEY_PERFORMANCE_DATA
	value names.
	(fhandler_registry::fstat): For HKEY_PERFORMANCE_DATA, return
	default values only.
	(fhandler_registry::readdir): For HKEY_PERFORMANCE_DATA, list
	names from perf_data_files only.
	(fhandler_registry::fill_filebuf): Use larger buffer to speed up
	access to HKEY_PERFORMANCE_DATA values.  Remove check for possible
	subkey.  Add RegCloseKey ().
	(open_key): Replace goto by break, remove label.  Do not try to
	open subkey of HKEY_PERFORMANCE_DATA.  Add missing RegCloseKey ()
	after open subkey error.
2008-12-19 14:31:40 +00:00
Corinna Vinschen 292c99741d * path.cc (path_conv::check): Handle incoming DOS paths non-POSIXy,
always case-insensitive, always ignoring ACLs.
2008-12-19 12:15:33 +00:00
Corinna Vinschen a4fc1198a4 * fhandler_disk_file.cc: Set 4th parameter of NtQueryDirectoryFile to
NULL throughout.
	(fhandler_disk_file::facl): Fix a condition so that fstat_by_handle
	is actually used.
	(fhandler_disk_file::readdir): Don't print debug message on a simple
	STATUS_NO_MORE_FILES status code.
2008-12-18 18:54:25 +00:00
Corinna Vinschen dc7dfa3a82 * path.cc (symlin_info::check): Set 4th parameter of
NtQueryDirectoryFile to NULL instead of 0 since it's a pointer.
	Simplify label and break from loop handling in symlink evaluation
	conditional expression.  Drop a now useless break statement.  Fix
	behaviour when searching for `foo' and then finding a `foo.lnk'
	which is no shortcut.
2008-12-18 15:37:19 +00:00
Corinna Vinschen 5c86c94db7 * utils.sgml: Fix typo in passwd screen text. 2008-12-16 10:56:33 +00:00
Corinna Vinschen 2cc8b9e014 * fhandler_registry.cc (DEFAULT_VALUE_NAME): Remove constant.
(encode_regname): Encode empty (default) name to "@".
	Encode "@" to "%40".  Change error return to -1.
	(decode_regname): Decode "@" to empty name.  Decode "%40" to "@".
	(fhandler_registry::exists): Skip check for keys if name is empty.
	Remove check for DEFAULT_VALUE_NAME, now handled by decode_regname ().
	(fhandler_registry::readdir): Remove check for empty name, now
	handled by encode_regname ().
	(fhandler_registry::open): Remove check for DEFAULT_VALUE_NAME.
	(fhandler_registry::open_key): Fail with ENOENT if key name is empty.
2008-12-16 09:20:05 +00:00
Corinna Vinschen 1348f65bb9 * syscalls.cc (gen_full_path_at): Use isabspath instead of isdirsep
to recognize absolute path.
2008-12-15 20:53:18 +00:00
Corinna Vinschen 658fe9ec36 * sec_auth.cc (open_local_policy): Set lsa handle to
INVALID_HANDLE_VALUE when LsaOpenPolicy fails.  Explain why.
2008-12-15 20:25:44 +00:00
Corinna Vinschen 63a89e8464 * setlsapwd.cc (setlsapwd): Simplify code. Only try to call cygserver
if opening local policy fails.  Don't treat removing non-existant
	private data as error.
2008-12-15 18:07:35 +00:00
Corinna Vinschen faded04e6c * setpwd.cc (client_request_setpwd::serve): Don't treat removing
non-existant private data as error.
2008-12-15 18:05:50 +00:00
Corinna Vinschen 85fd77a145 * setlsapwd.cc (setlsapwd): Explicitely erase password buffer content
after usage.
2008-12-15 17:39:39 +00:00
Corinna Vinschen d08afb78d1 * setpwd.cc (client_request_setpwd::serve): Explicitely erase password
buffer content after usage.
2008-12-15 17:39:21 +00:00
Corinna Vinschen 8d12bd32cd * passwd.c (main): Put how to delete the registry password on its own
line in passwd -R output.
2008-12-15 17:33:08 +00:00
Corinna Vinschen 6452986601 * fhandler_registry.cc (fhandler_registry::exists): Handle EACCES.
(fhandler_registry::open): Ditto.
2008-12-15 12:51:46 +00:00
Corinna Vinschen f8a41da921 * cygwin.din: Export fgetwc, fgetws, fputwc, fputws, fwide, getwc,
getwchar, putwc, putwchar, ungetwc.
	* posix.sgml: Move above functions (add missing) into "implemented
	SUSv3" section.
	* include/cygwin/version.h: Bump api minor number.
2008-12-15 12:40:29 +00:00
Corinna Vinschen 305b19d738 * fhandler.h (class fhandler_registry): Declare dup method.
* fhandler_registry.cc (fhandler_registry::exists): Fix missing
	parenthesis.
	(fhandler_registry::dup): New method.
2008-12-15 12:33:27 +00:00
Corinna Vinschen 12406f25fb * gcc.sgml: Use 'bash$' as Cygwin prompt throughout.
* gdb.sgml: Ditto.
	* pathnames.sgml: Ditto.  Fix the @ expansion example.
2008-12-15 09:37:50 +00:00
Christopher Faylor ec4eb70c33 * fhandler_disk_file.cc (readdir_get_ino): Don't complain about MS-DOS paths
since the function could be fed one by an internal call.
2008-12-14 06:01:46 +00:00
Christopher Faylor 2b0c1c0d44 * utils.sgml: Convert some backslashes to slashes. 2008-12-13 22:43:54 +00:00
Christopher Faylor 693862058a * pathnames.sgml: Convert some backslashes to slashes. 2008-12-13 21:14:44 +00:00
Christopher Faylor 9fe25af7a6 * cygheap.cc (cygheap_user::~cygheap_user): Remove unneeded if 0'ed code.
* fhandler_registry.cc (fhandler_registry::exists): Recode goto as if/else to
avoid a gcc4 compiler warning.
(fhandler_registry::open): Ditto.  Use one goto rather than two.
* gentls_offsets: Fix compiler warning in generated output.
* tlsoffsets.h: Regenerate.
* mount.cc (fillout_mntent): slashify native paths returned via getmntent.
2008-12-13 21:05:31 +00:00
Corinna Vinschen baaa8b9140 * pathnames.sgml: New section for /proc/registry. Document registry
name encoding.
2008-12-12 15:14:06 +00:00
Corinna Vinschen 373e8a118b * resolv.h: #include <netinet/in.h> for sockaddr_in typedef. 2008-12-09 16:09:46 +00:00
Danny Smith cf2f4a6aef Committed as obvious.
2008-12-08  Dmitry G. Gorbachev  <d.g.gorbachev@gmail.com>

	* cpu_features.c (__cpu_features_init): Remove erroneous ';'.
2008-12-09 02:42:21 +00:00
Corinna Vinschen d27ebea923 * fhandler_registry.cc (encode_regname): Add Parameter add_val.
Append "%val" if add_val is set.
	(decode_regname): Remove trailing "%val". Change returncode accordingly.
	(__DIR_hash): New class.
	(d_hash): New macro.
	(key_exists): New function.
	(fhandler_registry::exists): Remove encode of registry name before path
	compare, decode file part of path instead.  Skip checks for keys if
	trailing "%val" detected.
	(fhandler_registry::fstat): Change check of return value of
	decode_regname ().
	(fhandler_registry::readdir): Allocate __DIR_hash.  Record key names in
	hash table. Append "%val" if key with same name exists. Fix error
	handling of encode_regname ().  Set dirent.d_type.
	(fhandler_registry::closedir): Delete __DIR_hash.
	(fhandler_registry::open): Don't open key if trailing "%val" detected
	by decode_regname ().
	(open_key): Ditto.
2008-12-08 11:45:18 +00:00
Chris Sutcliffe 4864a38c34 2008-12-05 Chris Sutcliffe <ir0nh34d@users.sf.net>
* include/w32api.h: Increment version to 3.13.
        * Makefile.in: Ditto.
2008-12-06 02:25:28 +00:00
Chris Sutcliffe 8310aa78b2 2008-12-05 Chris Sutcliffe <ir0nh34d@users.sf.net>
* lib/glut.def: remove.
        * lib/glut32.def: ditto.
2008-12-06 02:19:57 +00:00
Corinna Vinschen edff4e3d94 * ntsec.sgml: Fix typo. 2008-12-04 10:07:54 +00:00
Corinna Vinschen e1984134be * libc/minires.c (open_sock): Set non blocking and close on exec.
(res_ninit): Set id pseudo-randomly.
	(res_nsend): Do not set close on exec. Initialize server from id.
	Flush socket. Tighten rules for answer acceptance.
	(res_nmkquery): Update id using current data.
2008-12-03 16:37:53 +00:00
Corinna Vinschen 5875a5e7d5 * ntsec.sgml: Revamp parts of the doc for clearness. 2008-12-03 11:47:27 +00:00
Corinna Vinschen f5e7a77023 * ntsec.sgml: Fix a few typos. 2008-12-02 19:29:37 +00:00
Corinna Vinschen fcbc8f1968 * cygserver.sgml: Fix cross reference to the ntsec documentation. 2008-12-02 17:39:39 +00:00
Corinna Vinschen 798afebc20 * cygserver.sgml: Document new feature to store hidden passwords
for seteuid.
2008-12-02 17:32:38 +00:00
Corinna Vinschen e39e660c54 * ntsec.sgml: Finishing up changes for 1.7. 2008-12-02 17:07:40 +00:00
Corinna Vinschen 1a3e844b43 * fhandler_registry.cc (must_encode): Fix condition changed for testing. 2008-12-02 11:44:58 +00:00
Corinna Vinschen 651d8393c8 * fhandler_registry.cc (must_encode): New function.
(encode_regname): Ditto.
	(decode_regname): Ditto.
	(fhandler_registry::exists): Encode name before path compare.
	(fhandler_registry::fstat): Pass decoded name to win32 registry call.
	(fhandler_registry::readdir): Return encoded name to user.
	(fhandler_registry::open): Store decoded name into value_name.
	(open_key): Pass decoded name to win32 registry call.
2008-12-02 11:40:13 +00:00
Corinna Vinschen d973def200 * ntsec.sgml: Further changes for 1.7. Switch from "NT" to "Windows".
Add preliminary text.  Try to be more clear in description.  Remove
	useless chapters.  Finish the permission related chapters.
2008-12-01 18:34:44 +00:00
Christopher Faylor 83448783d5 fix typo 2008-11-30 22:42:24 +00:00
Christopher Faylor 51aa4c032b * faq-using.xml: Remove assertion that lpr doesn't exit.
* faq-what.xml: Remove ancient who's who data.
2008-11-30 22:37:45 +00:00
Christopher Faylor 4ff5152887 * exceptions.c (sigpacket::process): Set tls on return since it is assumed to
be set to a valid value by the caller.
2008-11-29 02:41:38 +00:00
Christopher Faylor 412ec1f444 * include/cygwin/version.h: Bump api minor number to 189 to flag the
implementation of dirent.d_type.
2008-11-29 01:39:53 +00:00
Christopher Faylor d92ed436e3 * exceptions.cc (sigpacket::process): Rework previous change. tls could still
become NULL.
2008-11-28 16:41:54 +00:00
Corinna Vinschen fa421c7a75 * dir.cc (readdir_worker): Initialize dirent.d_type and __d_unused1.
* fhandler_disk_file.cc (fhandler_disk_file::readdir_helper):
	Set dirent.d_type based on FILE_ATTRIBUTE_*.
	* include/sys/dirent.h: Define _DIRENT_HAVE_D_TYPE (enables DT_*
	declarations).
	(struct dirent): Add d_type. Adjust __d_unused1 size to preserve layout.
2008-11-28 09:04:35 +00:00
Christopher Faylor 65ebf94e53 * exceptions.cc (sigpacket::process): Make sure that 'tls' is never NULL when
used.
2008-11-28 02:56:09 +00:00
Christopher Faylor 15c509b515 clarify entry 2008-11-26 17:21:20 +00:00
Christopher Faylor 025c1fac6e Remove unneeded whitespace.
* fhandler_fifo.cc (fhandler_fifo::open): Rework to cause errno to be set to
ENXIO when opening a fifo write/nonblocking.
* environ.cc (ucreqenv): Rename to ucenv.  Move code from old ucenv here and
conditionalize it on create_upcaseenv.
(ucenv): Delete.
(environ_init): Fix compiler warning by moving create_upcaseenv test to ucenv.
Don't bother checking for child_proc_info when calling ucenv since it is
assumed to be NULL at the point where the function is called.
* path.cc (symlink_worker): Turn off MS-DOS path warnings when dealing with
devices since the device handler passes in a translated MS-DOS path.
* sec_auth.cc (lsaprivkeyauth): Avoid variable initialization which causes a
compiler error.
* fhandler_netdrive.cc: Update copyright.
2008-11-26 17:21:04 +00:00
Christopher Faylor f43f75a09d * Revert erroneous checkin. 2008-11-26 16:42:27 +00:00
Christopher Faylor b73c50e86a update copyright 2008-11-26 16:42:00 +00:00
Christopher Faylor 81fa789153 * Makefile.in: Revert erroneous checkin.
* Makefile.common: Tweak to work better with new utils/mingw front-end.
2008-11-26 16:40:29 +00:00
Corinna Vinschen d865502063 * passwd.c (longopts): Add --reg-store-pwd option.
(opts): Add -R option.
	(usage): Add text for -R/--reg-store-pwd option.
	(main): Fix size of local user and password string arrays.
	Handle -R option.
	* utils.sgml: Add text for passwd -R/--reg-store-pwd option.
2008-11-26 10:19:09 +00:00
Corinna Vinschen d4db08d7a6 * Makefile.in (OBJS): Add setpwd.o.
* README: Explain new service to store passwords in the LSA registry
	area.
	* bsd_helper.cc (get_token_info): Make externally available.
	* bsd_helper.h (get_token_info): Declare.
	* client.cc (client_request::handle_request): Add case for
	CYGSERVER_REQUEST_SETPWD request.
	* setpwd.cc: New file implementing the CYGSERVER_REQUEST_SETPWD
	request.
2008-11-26 10:18:53 +00:00
Corinna Vinschen 51303cbd0c * Makefile.in (DLL_OFILES): Add setlsapwd.o.
* cygserver.h (CYGWIN_SERVER_VERSION_API): Bump.
	(request_code_t): Define CYGSERVER_REQUEST_SETPWD request type.
	* cygserver_msg.h (client_request_msg::retval): Use default value of -1
	for retval if msglen is 0.
	* cygserver_sem.h (client_request_sem::retval): Ditto.
	* cygserver_shm.h (client_request_shm::retval): Ditto.
	* cygserver_setpwd.h: New file.
	* external.cc (cygwin_internal): Implement new CW_SET_PRIV_KEY type.
	* sec_auth.cc (open_local_policy): Make externally available.
	Get ACCESS_MASK as argument.
	(create_token): Accommodate change to open_local_policy.
	(lsaauth): Ditto.
	(lsaprivkeyauth): New function fetching token by retrieving
	password stored in Cygwin or Interix LSA private data area and
	calling LogonUser with it.
	* security.h (lsaprivkeyauth): Declare.
	(open_local_policy): Declare.
	* setlsapwd.cc: New file implementing setting LSA private data password
	using LsaStorePrivateData or by calling cygserver if available.
	* syscalls.cc (seteuid32): Add workaround to get the original token
	when switching back to the original privileged user, even if
	setgroups group list is still active.  Add long comment to explain why.
	Call lsaprivkeyauth first, only if that fails call lsaauth or
	create_token.
	* include/cygwin/version.h: Bump API minor number.
	* include/sys/cygwin.h (cygwin_getinfo_types): Add CW_SET_PRIV_KEY.
2008-11-26 10:18:10 +00:00
Christopher Faylor b94518ea98 * overview2.sgml: Reorganize and make minor wording changes. 2008-11-25 16:39:58 +00:00
Christopher Faylor a5032b7899 * overview2.sgml: Clarify unix-specific automatic updates section. 2008-11-25 16:20:30 +00:00
Corinna Vinschen 06c4c61863 * overview2.sgml: Add text that no automatic updates are provided. 2008-11-25 09:54:50 +00:00
Corinna Vinschen 99abc9526e * fhandler_floppy.cc (fhandler_dev_floppy::raw_read): Drop
initialization of bytes_to_read.  Set bytes_to_read to len in
	non-buffered case.  Call read_bytes correctly with bytes_to_read
	instead of len.
2008-11-21 13:46:17 +00:00
Corinna Vinschen b007725e34 * mmap.cc (MapView): Add NT status to debug output. 2008-11-21 10:52:10 +00:00
Corinna Vinschen babd4a9c62 * autoload.cc (GetSystemDEPPolicy): Define.
(GetProcessDEPPolicy): Ditto.
	(SetProcessDEPPolicy): Ditto.
	* dcrt0.cc (disable_dep): New static function.
	(dll_crt0_0): Call disable_dep on platforms requiring it.  Add longish
	comment to explain the circumstances.
	* wincap.h (wincaps::ts_has_dep_problem): New element.
	* wincap.cc: Implement above element throughout.
	(wincapc::init): Set ts_has_dep_problem to true on 2008 Terminal
	Servers.
	* winsup.h (WINVER): Set to 0x0601.
2008-11-12 11:04:27 +00:00
Corinna Vinschen bef8896587 * include/winbase.h (PROCESS_DEP_ENABLE,
PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION): Define for >= Vista SP1.
	(enum _DEP_SYSTEM_POLICY_TYPE): Ditto.
	(GetProcessDEPPolicy, GetSystemDEPPolicy, SetProcessDEPPolicy): Ditto.
2008-11-11 14:44:54 +00:00
Corinna Vinschen 2348e4f3c6 * mount.cc (mount_info::cygdrive_win32_path): Always upper case
DOS drive letter to accommodate case sensitivity.
	(cygdrive_getmntent): Ditto.
	* path.cc (path_conv::check): Invalidate wide_path after making path
	relative.
2008-11-11 11:45:05 +00:00
Corinna Vinschen 9df1dbeac6 * cygwinenv.sgml: Add description for upcaseenv option. 2008-11-11 10:51:45 +00:00
Corinna Vinschen 188fb31537 * environ.cc (create_upcaseenv): New static variable.
(renv_arr): New static array to keep track of environment variables
	which have to be always uppercased.
	(idx_arr): Ditto.
	(start_at): Ditto.
	(ucreqenv): New function to uppercase only the environment variables
	from renv_arr.
	(parse_thing): Add "upcaseenv" setting.
	(environ_init): Parse $CYGWIN before doing anything else.  Call
	ucreqenv instead of ucenv if CYGWIN=noupcaseenv is set.
2008-11-11 10:51:03 +00:00
Christopher Faylor 6865f89087 * path.cc (normalize_win32_path): Don't add a trailing '\' if the cwd returns a
path with a trailing '\'.
2008-11-11 03:51:55 +00:00
Christopher Faylor dc74da050c * pthread.cc (pthread_mutex::_unlock): Avoid unlocking a mutex if the
recursion_counter is already 0.
(pthread_mutex::_destroy): Don't consider a mutex busy if its recursion_counter
== 0.
(pthread_mutex::_fixup_after_fork): Set recursion_counter to 0 to flag that
we've just forked.  Don't reset the owner of this mutex since the forkee may
think it still owns the mutex.  Reinstate initialization of win32_obj_id.
* fhandler_floppy.cc (fhandler_dev_floppy::raw_read): Initialize a variable to
bypass a C++ warning.
2008-11-07 18:32:41 +00:00
Corinna Vinschen c6b7418c89 * environ.cc (environ_init): Avoid evaluating $CYGWIN twice. 2008-11-05 11:57:44 +00:00
Christopher Faylor 029d147e94 * Makefile.in: Use -static-libgcc when creating cygserver.exe. 2008-10-30 13:17:42 +00:00
Christopher Faylor b2e5367846 * Makefile.in (ALL_LDFLAGS): Link libgcc statically for everything here. 2008-10-29 13:13:26 +00:00
Keith Marshall 2004f7603f Correct some binary distribution packaging defects. 2008-10-28 23:55:39 +00:00
Corinna Vinschen 8937c103ed * wincap.cc (all wincaps): Store in .cygwin_dll_common section same as
wincap.  Add comment to explain why.
2008-10-23 21:00:45 +00:00
Corinna Vinschen 3e97726f98 * autoload.cc (GetSystemWindowsDirectoryW): Define.
* kernel32.cc (GetWindowsDirectoryW): Implement to abstract from
	running under Terminal Services or not.
	(GetWindowsDirectoryA): Ditto.
2008-10-22 13:30:42 +00:00
Corinna Vinschen df54adb746 * passwd.cc (pwdgrp::read_passwd): Check if we're called within
user_shared initialization and ignore myself, if so.  Reformat
	conditional expression.
2008-10-21 16:47:28 +00:00
Corinna Vinschen 669bdeb822 * ntdll.h (NtSetAttributesFile): New inline function.
* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Use
	NtSetAttributesFile.
	* path.cc (symlink_worker): Ditto.
	* syscalls.cc (unlink_nt): Ditto.
	(rename): Omit FILE_SHARE_DELETE when opening files on Samba.  Add
	comment to explain why.
2008-10-20 19:30:06 +00:00
Keith Marshall 87ab6bfb62 Fix MinGW-Bug [2136252]: Remove extraneous radix point in printf( "%.0f", v ) for v < 0.5 2008-10-18 14:33:48 +00:00
Corinna Vinschen edf5a5bd15 * dtable.cc (dtable::get_debugger_info): Call SetStdHandle
for the newly opened handle.  Explain why.
	(dtable::stdio_init): Don't duplicate standard error handle
	when stderr has already been created under debugger control.
2008-10-17 16:24:20 +00:00
Keith Marshall 206473437f Fix MinGW-Bug [2160227]: Eliminate conflicting declarations and implementations of scalb(). 2008-10-13 22:47:58 +00:00
Corinna Vinschen 5f9ca0d25a * sec_acl.cc (setacl): Align standard owner and group permissions
with alloc_sd.  Strip FILE_READ_ATTRIBUTES fromn setting
	FILE_GENERIC_EXECUTE permissions same as in alloc_sd.
	* security.cc (alloc_sd): Reformat expression.  Strip EA permission
	bits from owner_deny and group_deny computation.
2008-10-13 16:01:50 +00:00
Christopher Faylor 423fd4f2f4 fix typo 2008-10-13 00:57:47 +00:00
Christopher Faylor 6e9b938063 * mingw: Set sawcfile when -xc* is detected. Extend list of detected source
filew.
2008-10-13 00:56:09 +00:00
Christopher Faylor a7844a1841 * Makefile.in: Use a different method to invoke gcc in a cygwin-hosted
environment.
* mingwex/Makefile.in: Ditto.
* profile/Makefile.in: Ditto.
* configure.in: Record mingw front-end for building under Cygwin.
* mingwex/configure.in: Ditto.
* profile/configure.in: Ditto.
* configure: Regenerate.
* mingwex/configure: Ditto.
* profile/configure: Ditto.
2008-10-12 23:58:17 +00:00
Christopher Faylor 391f2a8eed * mingw: Add more checks to allow more varied use. 2008-10-12 23:54:03 +00:00
Christopher Faylor 4941ce49c5 * Makefile.in: Rearrange to avoid -mno-cygwin.
* configure.in: Use mingw front-end from utils directory as compiler front-end.
* configure: Regenerate.
* cyglsa.c (cyglsa_printf): Rename from 'printf' to avoid a compiler error.
(print_sid, print_groups, print_privs, print_dacl, print_tokinf,
LsaApLogonUserEx): Ditto.
2008-10-12 23:53:26 +00:00
Christopher Faylor 12c819e204 * mingw: Use a better method to find where mingw directory lives. 2008-10-12 03:20:37 +00:00
Christopher Faylor 9401a0f805 Dummy check-in to get right revision log:
* mingw: New front-end script to control building of MinGW files without using
the deprecated -mno-cygwin option.
* Makefile.in: Use mingw front-end.
2008-10-12 03:08:33 +00:00
Christopher Faylor fd49ac277f * Makefile.in: Tweak to work better with new utils/mingw front-end.
In utils:
2008-10-12 03:06:12 +00:00
Keith Marshall 374349395e Use de-facto standard Makefile goals to invoke test suite. 2008-10-11 21:59:04 +00:00
Keith Marshall 3c68dd9313 Make strtod() inline definition C89 compliant. 2008-10-11 21:47:56 +00:00
Chris Sutcliffe 90ba302a29 2008-10-09 Chris Sutcliffe <ir0nh34d@users.sf.net>
* include/mmsystem.h (sndAlias): Correct GCC4 warning.
2008-10-10 02:04:37 +00:00
Corinna Vinschen 079db16bf7 * fhandler_disk_file.cc (fhandler_base::fstat_helper): Check
for executable suffixes here in case we're on a file system
	not supporting permission.
	* path.cc (path_conv::check): Drop check for executable suffixes.
2008-10-09 14:23:09 +00:00
Corinna Vinschen 3059d18288 * fhandler_floppy.cc (fhandler_dev_floppy::raw_read): Keep track of
current position in non-buffered case, too.
2008-10-09 12:41:52 +00:00
Corinna Vinschen 2768ae50dd * grp.cc (pwdgrp::read_group): Generate more speaking group name
if passwd gid exists under different gid in /etc/group.
2008-10-09 11:52:54 +00:00
Corinna Vinschen c7a8139540 Fix ChangeLog entry 2008-10-09 10:01:49 +00:00
Corinna Vinschen c32849c5bc * path.cc (path_conv::is_binary): Always check for GetBinaryType.
* syscalls.cc (rename): Fix test for just changing case of name on
	case insensitive filesystems.
2008-10-09 09:43:02 +00:00
Corinna Vinschen 4e88323ba0 * path.cc (symlink_info::check_shortcut): Don't check for executability
here.
	(symlink_info::check_sysfile): Ditto.
2008-10-09 08:56:09 +00:00
Corinna Vinschen 3ae5cb32c5 * path.cc (path_conv::path_conv): Only assume executability by suffix
on file systems not supporting permissions.
2008-10-08 14:58:26 +00:00
Christopher Faylor c4cb50b3a8 * pthread.cc (pthread_create): Very minor formatting change.
* timer.cc (timer_thread): Ensure that any created thread defaults to detached
state.
2008-10-07 23:28:30 +00:00
Christopher Faylor f241db6f60 * cygtls.h (_cygtls::initialized): Remove bogus stack check which would when
checking the current thread from the current thread.
2008-10-07 02:38:15 +00:00
Christopher Faylor 585697536f * dcrt0.cc (dll_crt0_0): Don't initialize signals early when dynamically
loaded.
(dll_crt0_1): Wait until this phase to initialize signals when dynamically
loaded.
2008-10-05 16:48:30 +00:00
Chris Sutcliffe 665ca5231d 2008-10-04 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/_mingw.h: Increment version to 3.15.1 and introduce
        __MINGW32_PATCHLEVEL variable.
2008-10-04 22:27:15 +00:00
Chris Sutcliffe 32c4e2bca7 Fix incorrect guard added in last commit 2008-10-04 19:56:26 +00:00
Chris Sutcliffe b36289958c 2008-10-04 Chris Sutcliffe <ir0nh34d@users.sf.net>
* include/shellapi.h (NOTIFYICON_VERSION_4): Define.
2008-10-04 18:11:48 +00:00
Keith Marshall e77c4e6672 Fix MinGW-Bug [2144266]: getopt() sets `optind' incorrectly. 2008-10-03 22:56:18 +00:00
Keith Marshall 13ff1518ee Improve package identification in configure script. 2008-10-03 22:48:22 +00:00
Christopher Faylor 36670cc234 * thread.cc (pthread_mutex::_fixup_after_fork): Reinstate DEBUGGING
conditional.
2008-09-30 02:39:07 +00:00
Christopher Faylor 18f43099f7 * thread.cc (pthread_mutex::_fixup_after_fork): Just reset lock to pristine
state after fork.  Don't recreate a mutex since it may not actually be needed.
2008-09-30 02:22:39 +00:00
Corinna Vinschen e7afe579f5 * flock.cc (inode_t::get_all_locks_list): Fix typo.
* posix.sgml: Add cfmakeraw to list of implemented BSD functions.
2008-09-29 17:03:49 +00:00
Chris Sutcliffe 3a3affe5f9 2008-09-25 Chris Sutcliffe <ir0nh34d@users.sf.net>
* include/vfw.h (capSendMessage): Rename to __capSendMessage.
2008-09-26 01:20:21 +00:00
Keith Marshall 32bdff5294 Fix MinGW-Bug [2125708]. 2008-09-25 21:53:17 +00:00
Chris Sutcliffe 62470d09ad 2008-09-24 Chris Sutcliffe <ir0nh34d@users.sf.net>
* include/vfw.h (WM_CAP_SET_CALLBACK_ERRORA, WM_CAP_SET_CALLBACK_ERRORW,
        WM_CAP_SET_CALLBACK_STATUS, WM_CAP_SET_CALLBACK_YIELD,
        WM_CAP_SET_CALLBACK_FRAMEA, WM_CAP_SET_CALLBACK_FRAMEW,
        WM_CAP_SET_CALLBACK_VIDEOSTREAM, WM_CAP_SET_CALLBACK_WAVESTREAM,
        WM_CAP_GET_USER_DATA, WM_CAP_SET_USER_DATA, WM_CAP_DRIVER_CONNECT,
        WM_CAP_DRIVER_DISCONNECT, WM_CAP_DRIVER_GET_NAMEA, WM_CAP_DRIVER_GET_NAMEW,
        WM_CAP_DRIVER_GET_VERSIONA, WM_CAP_DRIVER_GET_VERSIONW,
        WM_CAP_DRIVER_GET_CAPS, WM_CAP_FILE_SET_CAPTURE_FILEA,
        WM_CAP_FILE_SET_CAPTURE_FILEW, WM_CAP_FILE_GET_CAPTURE_FILEA,
        WM_CAP_FILE_GET_CAPTURE_FILEW, WM_CAP_FILE_ALLOCATE, WM_CAP_FILE_SAVEASA,
        WM_CAP_FILE_SAVEASW, WM_CAP_FILE_SET_INFOCHUNK, WM_CAP_FILE_SAVEDIBA,
        WM_CAP_FILE_SAVEDIBW, WM_CAP_EDIT_COPY, WM_CAP_SET_AUDIOFORMAT,
        WM_CAP_GET_AUDIOFORMAT, WM_CAP_DLG_VIDEOFORMAT, WM_CAP_DLG_VIDEOSOURCE,
        WM_CAP_DLG_VIDEODISPLAY, WM_CAP_GET_VIDEOFORMAT, WM_CAP_SET_VIDEOFORMAT,
        WM_CAP_DLG_VIDEOCOMPRESSION, WM_CAP_SET_PREVIEW, WM_CAP_SET_OVERLAY,
        WM_CAP_SET_PREVIEWRATE, WM_CAP_SET_SCALE, WM_CAP_GET_STATUS,
        WM_CAP_SET_SCROLL, WM_CAP_GRAB_FRAME, WM_CAP_GRAB_FRAME_NOSTOP,
        WM_CAP_SEQUENCE, WM_CAP_SEQUENCE_NOFILE, WM_CAP_SET_SEQUENCE_SETUP,
        WM_CAP_GET_SEQUENCE_SETUP, WM_CAP_SET_MCI_DEVICEA, WM_CAP_SET_MCI_DEVICEW,
        WM_CAP_GET_MCI_DEVICEA, WM_CAP_GET_MCI_DEVICEW, WM_CAP_STOP, WM_CAP_ABORT,
        WM_CAP_SINGLE_FRAME_OPEN, WM_CAP_SINGLE_FRAME_CLOSE, WM_CAP_SINGLE_FRAME,
        WM_CAP_PAL_OPENA, WM_CAP_PAL_OPENW, WM_CAP_PAL_SAVEA, WM_CAP_PAL_SAVEW,
        WM_CAP_PAL_PASTE, WM_CAP_PAL_AUTOCREATE, WM_CAP_PAL_MANUALCREATE,
        WM_CAP_SET_CALLBACK_CAPCONTROL): Define using WM_USER.
        (capSendMessage): Don't undef.
2008-09-24 23:32:42 +00:00
Chris Sutcliffe 85f457567b 2008-09-23 Chris Sutcliffe <ir0nh34d@users.sf.net>
* Makefile.in: Don't include host_os as part of snapshot filename.
2008-09-24 00:59:03 +00:00
Christopher Faylor 4fb7bbb985 * setup2.sgml: Clarify heap allocation. 2008-09-22 16:55:30 +00:00
Chris Sutcliffe 80e6df1389 2008-09-21 Chris Sutcliffe <ir0nh34d@users.sf.net>
* incude/sspi.h: include subauth.h to fix issue of UNICODE_STRING being
        undefined.
2008-09-21 16:56:45 +00:00
Eric Blake ddf8700121 * errno.cc (_sys_errlist): Add ECANCELED, ENOTRECOVERABLE, EOWNERDEAD. 2008-09-19 23:29:24 +00:00
Keith Marshall acf5111a6f Fix MinGW-Bug [2119504]. 2008-09-19 22:41:01 +00:00
Keith Marshall be66dbed41 Fix MinGW-Bug [2117379]. 2008-09-19 21:32:42 +00:00
Christopher Faylor f2c11dadcf * cygtls.h (unionent): Move from net.cc.
(unionent::struct_type): Move enum here.
(_local_storage::hostent_buf): Define as unionent.
(_local_storage::protoent_buf): Ditto.
(_local_storage::servent_buf): Ditto.
* net.cc (unionent): Move to cygtls.h.
(struct_type): Ditto.
(dup_ent): Define one function per {host,proto,serv}ent type.
(cygwin_getprotobyname): Simplify dup_ent call.  Removed now-unneeded return
type coercion.
(cygwin_getprotobynumber): Ditto.
(cygwin_getservbyname): Ditto.
(cygwin_getservbyport): Ditto.
(cygwin_gethostbyname): Ditto.
(cygwin_gethostbyaddr): Ditto.  tlsoffsets.h: Regenerate.
2008-09-16 02:04:27 +00:00
Chris Sutcliffe fb4e8779d0 2008-09-13 mega-squall <mega-squall@users.sf.net>
* include/winnt.h (SUBLANG_BENGALI_INDIA, SUBLANG_PUNJABI_INDIA,
        SUBLANG_ROMANIAN_ROMANIA): Correct definition.
        (SUBLANG_BENGALI_BANGLADESH, SUBLANG_PUNJABI_PAKISTAN,
        SUBLANG_ROMANIAN_MOLDOVA): Define.
2008-09-13 12:03:26 +00:00
Christopher Faylor a35d9f1a67 * cygcheck.cc (pathlike::check_existence): Remove class name from declaration.
(display_internet_error): Use proper format specifier for DWORD.
(environ): Remove unneeded declaration.
(main): Use brace around nested if to avoid an overly-helpful compiler warning.
* dump_setup.cc (parse_filename): Reorganize nested if to avoid an
overly-helpful compiler warning.
* path.cc (GUID_shortcut): Use braces around part of initializer which needs
them.
(conv_fstab_spaces): Parenthesize assignment in while loop to avoid a compiler
warning.
(struct opt): Make static.
* ps.cc (main): Reorganize nested if to avoid an overly-helpful compiler
warning.
* regtool.cc: Make some anonymous structs static to avoid a compiler warning.
* ssp.c (lookup_thread_id): Initialize *tix to zero to avoid potential
uninitialized use.
* strace.cc (add_child): Use proper format specifier for DWORD.
(remove_child): Ditto.
(proc_child): Ditto.
2008-09-12 22:43:10 +00:00
Christopher Faylor 175742d8c8 * Makefile.in: Add -c option which is now removed from COMPILE_C*.
* cygwin.din (cfmakeraw): Export.
* termios.cc (cfmakeraw): Implement.
* include/sys/termios.h (cfmakeraw): Declare.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2008-09-12 22:32:07 +00:00
Chris Sutcliffe 7df9b8ba8e 2008-09-11 Chris Sutcliffe <ir0nh34d@users.sf.net>
* include/shlwapi.h (ASSOCSTR): Update enum.
2008-09-12 01:47:03 +00:00
Christopher Faylor c4ca0e800a * cygwin.din (sys_sigabbrev): Add this here.
* dcrt0.cc (__argc,__argv,_check_for_executable): Remove dllexport decoration
since it is already handled in cygwin.din.
* errno.cc (_sys_errlist): Ditto.
* strsig.cc (sys_sigabbrev): Ditto.
* include/cygwin/signal.h: Protect use of dllimport when __INSIDE_CYGWIN__.
* libc/getopt.c: Revert previous changes.  Define __INSIDE_CYGWIN__.
2008-09-11 06:22:31 +00:00
Christopher Faylor cb7e1879ee * localtime.cc (increment_overflow): Mark as non-inline to prevent compiler
from complaining about the very thing we're trying to test.
* ntea.cc (read_ea): Reorganize to avoid a new compiler warning/error.
* sched.cc (sched_rr_get_interval): Ditto.
* select.cc (peek_serial): Ditto.
* libc/rexec.cc (ruserpass): Ditto.
* posix_ipc.cc (ipc_names): Make static to avoid a compiler warning
(and it's the right thing to do anyway).
2008-09-11 05:43:11 +00:00
Christopher Faylor 81ba2b77de * net.cc (in6addr_any, in6addr_loopback): Add appropriate number of braces
around initializer.
(dup_ent): Try harder to coerce the first argument to deal with more stringent
compiler.
(get_2k_ifs): Remove extraneous typedef.
(get_2k_ifs): Reorganize expression to avoid a compiler warning.
(get_xp_ifs): Ditto.
(get_nt_ifs): Ditto.
2008-09-11 04:58:45 +00:00
Christopher Faylor e3cbf1cc48 * fhandler.h (fhandler_pipe::raw_read): Remove __stdcall decoration.
* pipe.cc (fhandler_pipe::raw_read): Ditto.
2008-09-11 04:41:24 +00:00
Christopher Faylor 7b9e380f03 * cygheap.cc (creturn): Reorganize to avoid a new compiler warning/error.
* dtable.cc (handle_to_fn): Ditto.
* fhandler_console.cc (fhandler_console::read): Ditto.
(fhandler_console::scroll_screen): Ditto.
(dev_console::set_color): Ditto.
* fhandler_dsp.cc (fhandler_dev_dsp::write): Ditto.
(fhandler_dev_dsp::read): Ditto.
* fhandler_tape.cc (mtinfo_drive::get_status): Ditto.
* hookapi.cc (find_first_notloaded_dll): Ditto.
* mmap.cc (msync): Ditto.
* pipe.cc (pipesync::pipesync): Ditto.
* sec_acl.cc (getace): Ditto.
* sec_auth.cc (create_token): Ditto.
(lsaauth): Ditto.
* select.cc (peek_pipe): Ditto.
* spawn.cc (av::fixup): Ditto.
* syscalls.cc (popen): Ditto.
* tty.cc (tty::init_session): Ditto.
* uinfo.cc (pwdgrp::load): Ditto.
* fhandler.cc (fhandler_base::setup_overlapped): Ditto.
(fhandler_base::wait_overlapped): Rename second use of res variable to wres or
errors are not returned correctly.
* dcrt0.cc: Remove obsolete variable.
* dll_init.cc (release_upto): Fix typo involving incorrect use of '|'.
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Avoid a compiler
warning regarding coercing type-punned variables.
(fhandler_base::fstat_by_name): Ditto.  fhandler_fifo.cc
(fhandler_fifo::open_nonserver): Fix = vs.  == typo.
(fhandler_fifo::wait): Add all conditions to switch statement to avoid a
compiler warning.
* fhandler_process.cc: Avoid unneeded initialization of variables to zero.
(fhandler_socket::listen): Add braces around initializer.
* flock.cc (inode_t::get_all_locks_list): Reorganize to avoid a compiler
warning.  Fix problem with EWOULDBLOCK error return.
* path.cc (GUID_shortcut): Use braces around struct initializer.
(cygwin_conv_path): Reorganize to avoid a compiler warning.
* random.cc (dummy): Mark variable as volatile to avoid a "used uninitialized"
warning.
* libc/getopt.c: Mark some variables as dllexport although gcc doesn't seem to
do the right thing with them.
* libc/minires-os-if.c (get_registry_dns_items): Coerce some function arguments
to avoid a compiler warning.
2008-09-11 04:34:24 +00:00
Chris Sutcliffe 49c5a1a6b2 2008-09-07 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/_mingw.h: Increment version to 3.15.
2008-09-07 21:35:38 +00:00
Chris Sutcliffe cef0517a23 2008-09-07 Chris Sutcliffe <ir0nh34d@users.sf.net>
* include/w32api.h: Increment version to 3.12.
        * Makefile.in: Ditto.
2008-09-07 20:49:43 +00:00
Chris Sutcliffe 3c795f6f1f 2008-09-07 Michael Hentschel <mikeh42@users.sourceforge.net>
* include/shlwapi.h (STIF_DEFAULT, STIF_SUPPORT_HEX): Define.
2008-09-07 17:12:46 +00:00
Chris Sutcliffe daa52c3509 2008-09-07 alsemm <alsemm@users.sourceforge.net>
* include/mlang.h (IMLangFontLink2::MapFont): Fix definition.
2008-09-07 17:11:49 +00:00
Danny Smith ee1482b2de Committed as obvious.
* include/ws2tcpip.h (IPV6_MREQ): Fix typo.
	Thanks to Richard Hughes for report.
2008-09-07 08:03:11 +00:00
Chris Sutcliffe 07aed2eee8 2008-09-06 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* Makefile.in: Adjust to new naming standard for MinGW while maintaining old
        naming standard for Cygwin.
2008-09-07 02:07:29 +00:00
Keith Marshall f43d60be62 Reimplement getopt.c to add getopt_long_only() function. 2008-08-31 22:27:58 +00:00
Keith Marshall 31966e0931 Erase all file content, preparatory to rewrite. 2008-08-31 22:26:52 +00:00
Chris Sutcliffe 34d29530d9 2008-08-30 Bo Yang <techrazy@users.sourceforge.net>
* include/sspi.h: Fix PSecurityFunctionTableW structure.
2008-08-30 23:19:14 +00:00
Chris Sutcliffe 953c58045b 2008-08-29 Andy Grover <andy.grover@oracle.com>
* include/ddk/scsi.h: Define READ_TOC formats.

        * lib/ddk/scsiport.def (ScsiPortGetDeviceBase): Fix export.
2008-08-30 23:14:26 +00:00
Chris Sutcliffe 1c931bf118 2008-08-29 Andy Grover <andy.grover@oracle.com>
* include/ddk/ndis.h (NDIS_MINIPORT_MAJOR_VERSION, NDIS_MINIPORT_MINOR_VERSION,
        struct NDIS_TASK_OFFLOAD_HEADER, PROTOCOL_RESERVED_SIZE_IN_PACKET,
        NdisGetFirstBufferFromPacketSafe, NdisMIndicateReceivePacket,
        NdisSetPacketPoolProtocolId, NdisMInitializeTimer, NdisMSetPeriodicTimer,
        NdisMCancelTimer): Define.
        (enum NDIS_ENCAPSULATION, struct NDIS_ENCAPSULATION_FORMAT): move in file.
        (struct _NDIS_PACKET): Define using _ANONYMOUS_UNION and ANONYMOUS_STRUCT to
        eliminate warnings.
        (NdisReinitializePacket): Rename from NdisReinitializePacketCounts.
        * lib/ddk/ndis.def (NdisInitAnsiString, NdisInitUnicodeString, NdisMCancelTimer,
        NdisMInitializeTimer, NdisMSetPeriodicTimer, NdisSetPacketPoolProtocolId):
        Export.
2008-08-30 23:08:11 +00:00
Chris Sutcliffe 1138964dd8 2008-08-29 Andy Grover <andy.grover@oracle.com>
* include/ddk/winddk.h (RtlStringCbCopyA, RtlStringCbPrintfA,
        RtlStringCbVPrintfA): define in terms of POSIX string functions.
2008-08-30 23:03:37 +00:00
Chris Sutcliffe ce11563e34 2008-08-29 Andy Grover <andy.grover@oracle.com>
* include/ddk/winddk.h (KeRaiseIrql): Define.
        (KfRaiseIrql, KfLowerIrql): remove incorrect definitions.
2008-08-30 22:58:51 +00:00
Keith Marshall 20167d0a5f Implement conditional replacement for printf() family functions. 2008-08-30 17:27:18 +00:00
Chris Sutcliffe 782ac76f36 2008-08-29 Andy Grover <andy.grover@oracle.com>
* include/ddk/winddk.h (KeFlushQueuedDpcs, KeMemoryBarrier): Define.
        (KeGetCurrentProcessorNumber): Fix incorrect member reference.
        (InterlockedIncrement, InterlockedDecrement): fix warning.
        * lib/ddk/ntoskrnl.def (KeFlushQueuedDpcs, KeMemoryBarrier): Export.
        (KeNumberProcessors): Export.
2008-08-30 02:16:11 +00:00
Christopher Faylor 5f05c64ce4 * fhandler_tty.cc (close_maybe): Check for both types of invalid handle before
attempting CloseHandle.
(fhandler_pty_master::setup): Only set inheritance on pty handles, not tty
handles.
2008-08-27 21:55:19 +00:00
Keith Marshall 05a6cb1bb2 Avoid access violations, passing NULL to printf( "...%s..." ). 2008-08-27 20:23:42 +00:00
Christopher Faylor 25687b0f76 * cygcheck.cc (nuke): Use malloc rather than alloca for environment variables.
(load_cygwin): Ditto.
* dump_setup.cc (parse_filename): Cosmetic changes.
(get_packages): Ditto.
2008-08-27 20:11:11 +00:00
Christopher Faylor 7e73b9cfd7 * shared_info.h (shared_info::create_root_entry): Remove extraneous
mount_info:: from declaration.
2008-08-26 16:56:30 +00:00
Corinna Vinschen a5d4ae5c5b * fhandler.h (class fhandler_pipe): Rename read and write
declarations to raw_read and raw_write.
	* pipe.cc (fhandler_pipe::raw_read): Rename from read.
	(fhandler_pipe::raw_write): Rename from write.
2008-08-26 15:39:17 +00:00
Chris Sutcliffe a47ee4d624 2008-08-22 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/shlwapi.h (ASSOCF_INIT_NOREMAPCLSID, ASSOCF_INIT_BYEXENAME,
        ASSOCF_OPEN_BYEXENAME, ASSOCF_INIT_DEFAULTTOSTAR,
        ASSOCF_INIT_DEFAULTTOFOLDER, ASSOCF_NOUSERSETTINGS, ASSOCF_NOTRUNCATE,
        ASSOCF_VERIFY, ASSOCF_REMAPRUNDLL, ASSOCF_NOFIXUPS, ASSOCF_IGNOREBASECLASS,
        ASSOCF_INIT_IGNOREUNKNOWN): Define.
2008-08-26 03:34:10 +00:00
Christopher Faylor 30caac0569 add comments 2008-08-25 17:27:06 +00:00
Corinna Vinschen 328b090f29 * mkgroup.c (enum_local_groups): Don't skip printing groups when
print_current is set and group SID is not curr_pgrp.
	(enum_groups): Ditto.
	(main): Fix condition when SYSTEM group gets printed.
	* mkpasswd.c (enum_users): Don't skip printing users when print_current
	is set and user SID is not curr_user.
	(main): Allow printing standard accounts even when print_current is set.
2008-08-25 09:38:14 +00:00
Chris Sutcliffe 41e29fbdcf 2008-08-22 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/commctrl.h (LVN_MARQUEEBEGIN): Define.

        Thanks to Tim Kosse <botg at users dot sf dot net>.
2008-08-22 23:54:47 +00:00
Chris Sutcliffe 5f8dcee09f 2008-08-22 Bo Yang <techrazy@users.sourceforge.net>
* include/winnt.h (OWNER_SECURITY_INFORMATION, GROUP_SECURITY_INFORMATION,
        DACL_SECURITY_INFORMATION, SACL_SECURITY_INFORMATION): Correct.
        * include/winnt.h (OWNER_SECURITY_INFORMATION, GROUP_SECURITY_INFORMATION,
        DACL_SECURITY_INFORMATION, SACL_SECURITY_INFORMATION,
        LABEL_SECURITY_INFORMATION, UNPROTECTED_SACL_SECURITY_INFORMATION,
        UNPROTECTED_DACL_SECURITY_INFORMATION, PROTECTED_SACL_SECURITY_INFORMATION,
        PROTECTED_DACL_SECURITY_INFORMATION): Define.
2008-08-22 23:02:50 +00:00
Christopher Faylor 8b2ed8e20a * fhandler.cc (fhandler_base::wait_overlapped): Reorganize again to accommodate
what appears to be an MSDN hint about not resetting the overlapped event prior
to calling GetOverlappedResult.
2008-08-22 04:06:01 +00:00
Corinna Vinschen 7d0a7940e6 * path.cc (symlink_info::check_shortcut): If file can't be opened,
treat it as non-symlink rather than generating an EIO error.
	(symlink_info::check_sysfile): Ditto.
2008-08-20 10:53:54 +00:00
Chris Sutcliffe 236c21ee9e 2008-08-19 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/wtsapi32.h (_WTS_INFO_CLASS, _WTS_CONNECTSTATE_CLASS,
        WTSQuerySessionInformation, WTSFreeMemory): Define.
2008-08-20 02:30:05 +00:00
Christopher Faylor fbf39a58cb * fhandler.cc (fhandler_base::wait_overlapped): Always assume that bytes will
be non-NULL.  Distinguish input result from result derived from WFMO and
GetOverlappedResult or res can never be -1.  Only raise SIGPIPE when writing.
* fhandler.h (fhandler_base::wait_overlapped): Pass first argument by value.
* fhandler_fifo.cc (fhandler_fifo::wait): Pass in dummy byte count to
wait_overlapped.
* pipe.cc (DEFAULT_PIPEBUFSIZE): Define to 65536 explicitly.
2008-08-20 02:25:06 +00:00
Corinna Vinschen ec8a7e416f * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Drop fattr variable
and use FILE_ATTRIBUTE_DIRECTORY directly in call to NtCreateFile.
	* posix_ipc.cc (ipc_mutex_init): Fix format string when creating IPC
	object name.
	(ipc_cond_init): Ditto.
	* security.cc (alloc_sd): Add parentheses to fix setting initial
	owner_allow value.
2008-08-19 09:46:31 +00:00
Christopher Faylor 46c6def37f * fhandler.cc (fhandler_base::wait_overlapped): Don't treat ERROR_BROKEN_PIPE
as a non-error.  Do raise SIGPIPE when it is detected.
2008-08-19 02:56:28 +00:00
Corinna Vinschen bba4895394 * mkgroup.c (enum_local_groups): Use NetLocalGroupGetInfo to find out
if a group exists, rather than just allocating a buffer and going ahead.
2008-08-18 12:56:59 +00:00
Corinna Vinschen 2d1bfd524d * mkgroup.c (enum_local_groups): Call print_win_error with GetLastError
as argument when LookupAccountXXX failed.
	(enum_groups): Ditto.
2008-08-18 12:42:44 +00:00
Corinna Vinschen 5a62582162 * mkgroup.c (enum_local_groups): Return failure if looking for a single
group succeeded.  Add comment.
2008-08-18 08:58:21 +00:00