Commit Graph

7445 Commits

Author SHA1 Message Date
Chris Sutcliffe 370a1171d8 2009-04-11 Danny Smith <dannsymith@users.sourceforge.net>
* include/stdint.h (int_fast8_t): Specify as signed char.
        (INT8_C, UINT8_C, INT16_C, UINT16_C): Simplify: just allow promotion to int.
        (INT32_C, UINT32_C): Remove 'L' type specifier on constant.
2009-04-11 12:41:09 +00:00
Corinna Vinschen 1b98373a40 * include/stdint.h (INTPTR_MIN, INTPTR_MAX): Add 'L' suffix.
(WINT_MAX):  Add 'U' suffix.
2009-04-11 08:07:30 +00:00
Christopher Faylor 1318037e44 * speclib: Use a more robust method to derive full file path. 2009-04-10 04:29:25 +00:00
Christopher Faylor 59328e28c4 * speclib: Semi-revert to previous version but don't try to generate
well-formed import library.  Instead, just extract appropriate symbols and let
later libcygwin.a on link line fill in the rest of the import stuff.
* gendef: Hopefully no-op modification to allow easier post-processing on
symbol values.
2009-04-09 21:02:53 +00:00
Corinna Vinschen 0c4023011d * syscalls.cc (try_to_bin): Use tmp_pathbuf buffer to allocate infobuf
rather than using the stack.
2009-04-09 17:55:01 +00:00
Corinna Vinschen 214a0e67fd * syscalls.cc (try_to_bin): Fix alignment of infobuf. 2009-04-09 17:00:35 +00:00
Corinna Vinschen 2d647173bb * fhandler_disk_file.cc (fhandler_disk_file::fchown): Catch an
error when changing the user account on a standalone Samba server.
	Explain why.
	* sec_acl.cc (setacl): Accommodate additional parameter to set_file_sd.
	* sec_helper.cc (SECURITY_SAMBA_UNIX_AUTHORITY): Define.
	(well_known_samba_unix_user_fake_sid): Define.
	* security.cc (set_file_sd): Take additional parameter if ownership
	should be changed.  Restrict requested permissions accordingly.
	(set_file_attribute): Accommodate additional parameter to set_file_sd.
	* security.h (well_known_samba_unix_user_fake_sid): Declare.
	(set_file_sd): Align declaration to above change.
2009-04-09 09:19:03 +00:00
Corinna Vinschen 8dc102b20b * include/stdint.h (int_least32_t): Define as int.
(uint_least32_t): Ditto, unsigned.
	(int_fast16_t): Define as int.
	(int_fast32_t): Ditto.
	(uint_fast16_t): Ditto, unsigned.
	(uint_fast32_t): Ditto.
	(UINT32_MAX): Remove `L' long marker.
	(UINT_LEAST32_MAX): Ditto.
	(UINT_FAST16_MAX): Ditto.
	(UINT_FAST32_MAX): Ditto.
	(INT32_C): Ditto.
	(UINT32_C): Ditto.
2009-04-07 17:23:20 +00:00
Corinna Vinschen 18ac7638b9 * path.cc (readlink): Accommodate new UTF-16 symlinks. 2009-04-07 16:24:50 +00:00
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