summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
Commit message (Collapse)AuthorAgeFilesLines
* * fhandler.h (fhandler_console::MAX_WRITE_CHARS): Declare.Christopher Faylor2009-05-043-15/+46
| | | | | | | | | | (fhandler_console::write_replacement_char): Declare as inline. (fhandler_console::write_console): Declare new function. * fhandler_console.cc (fhandler_console::MAX_WRITE_CHARS): Define. (handler_console::write_console): Define. (fhandler_console::write_replacement_char): Define as inline. (fhandler_console::write_normal): Use write_console when writing buffers of unknown length.
* * include/cygwin/socket.h: Define SOL_IPV6.Christopher Faylor2009-04-272-0/+5
|
* * ctype.cc (__set_ctype): Copy exact part of the current activeCorinna Vinschen2009-04-212-2/+7
| | | | character class array.
* * flock.cc (lf_setlock): Handle border case which results in WFMO loopCorinna Vinschen2009-04-202-0/+14
| | | | | exiting with ret == WAIT_TIMEOUT gracefully. Add a system_printf to uncover other potential problems with WFMO loop.
* * mkimport: Specify .text for stub explicitly.Christopher Faylor2009-04-183-7/+36
| | | | | * speclib: Add a dummy '.idata$7' section referring to the dll associated with the real import library.
* * dcrt0.cc (globify): Only call mbtowc for non-ascii chars.Corinna Vinschen2009-04-182-1/+5
|
* * dcrt0.cc (globify): Make multibyte-aware.Corinna Vinschen2009-04-172-1/+13
|
* * flock.cc (class inode_t): Add i_wait member and matching methodsCorinna Vinschen2009-04-172-4/+25
| | | | | | | | | | wait(), unwait(), and waiting(). (inode_t::inode_t): Initialize i_wait to 0. (fhandler_disk_file::lock): Only remove node if no other thread is waiting for a blocking lock. (lf_setlock): Manipulate node->i_wait to signal that a thread is waiting for a blocking lock in this node. (lf_findoverlap): Reinstantiate SELF test as in original code.
* * dlfcn.cc (get_full_path_of_dll): Just return a bool value. DropCorinna Vinschen2009-04-162-23/+31
| | | | | | | local path_conv in favor of getting it as parameter. Add local string buffer instead of getting it as parameter. (dlopen): Accommodate get_full_path_of_dll change. Fetch WCHAR Windows path from path_conv variable and call LoadLibraryW.
* * ntdll.h (STATUS_LOCK_NOT_GRANTED): Define.Corinna Vinschen2009-04-163-2/+19
| | | | | * syscalls.cc (unlink_nt): Handle STATUS_LOCK_NOT_GRANTED same as STATUS_SHARING_VIOLATION. Add lengthy comment to explain why.
* * path.cc (path_conv::get_wide_win32_path): Allow relative paths.Corinna Vinschen2009-04-152-6/+24
| | | | | | (cygwin_conv_path): In case of CCP_POSIX_TO_WIN_W, convert relative paths to absolute paths if the relative pathname length exceeds MAX_PATH.
* * libc/bsdlib.cc: Align copyright with upstream.Corinna Vinschen2009-04-158-27/+10
| | | | | | | | | * libc/fnmatch.c: Ditto. * libc/fts.c: Ditto. * libc/inet_addr.c: Ditto. * libc/inet_network.c: Ditto. * libc/rcmd.cc: Ditto. * libc/rexec.cc: Ditto.
* * speclib: Really revert to using tempdir.Christopher Faylor2009-04-142-2/+6
|
* * speclib: Revert to using tempdir.Christopher Faylor2009-04-142-1/+5
|
* * localtime.cc (tzload): Implement setting __tzrule's offset memberCorinna Vinschen2009-04-142-0/+10
| | | | | using newlib's __gettzinfo () interface also when tzload returns successfully.
* * include/stdint.h (intptr_t): Remove long from type.Dave Korn2009-04-132-5/+12
| | | | | | (uintptr_t): Likewise. (INTPTR_MIN): Remove 'L' suffix. (INTPTR_MAX, UINTPTR_MAX): Likewise.
* * speclib: Initial stab at cleaning up temp files. More work needed.Christopher Faylor2009-04-123-4/+14
| | | | * mkimport: Ditto.
* * Makefile.in (clean): Clean globals.h.Christopher Faylor2009-04-122-2/+7
| | | | (LIBCOS): Depend on globals.h.
* * mkimport: New script to perform all operations necessary to createChristopher Faylor2009-04-126-139/+188
| | | | | | | | | | | | | | | | libcygwin.a. * rmsym: Delete. * newsym: Delete. * Makefile.in (toolopts): New variable which holds options relating to binutils/gcc tools. (speclib): Use toolopts. Add symbols to avoid copying to special libraries. (OBSOLETE_FUNCTIONS): Delete. (NEW_FUNCTIONS): Change to represent an argument to new mkimport script. (libcygwin.a): Use only new mkimport script to create libcygwin.a. Only rely on ${LIBCOS}. (*/lib*.a): Simplify speclib dependencies. (speclib): Accept toolchain options. Convert every argument to absolute path. Simplify parsing of nm output. Accommodate new exclude option.
* * include/stdint.h (INTPTR_MIN, INTPTR_MAX): Add 'L' suffix.Corinna Vinschen2009-04-112-4/+9
| | | | (WINT_MAX): Add 'U' suffix.
* * speclib: Use a more robust method to derive full file path.Christopher Faylor2009-04-102-3/+7
|
* * speclib: Semi-revert to previous version but don't try to generateChristopher Faylor2009-04-094-52/+64
| | | | | | | 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.
* * syscalls.cc (try_to_bin): Use tmp_pathbuf buffer to allocate infobufCorinna Vinschen2009-04-092-10/+13
| | | | rather than using the stack.
* * syscalls.cc (try_to_bin): Fix alignment of infobuf.Corinna Vinschen2009-04-092-1/+7
|
* * fhandler_disk_file.cc (fhandler_disk_file::fchown): Catch anCorinna Vinschen2009-04-096-8/+56
| | | | | | | | | | | | | 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.
* * include/stdint.h (int_least32_t): Define as int.Corinna Vinschen2009-04-072-12/+27
| | | | | | | | | | | | | | (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.
* * strfuncs.cc: Change WCHAR to wchar_t in multibyte<->widecharCorinna Vinschen2009-04-073-13/+22
| | | | | conversion functions throughout. * wchar.h: Ditto in declarations. Guard them __INSIDE_CYGWIN__.
* * fhandler.h (class dev_console): Add members con_mbtowc, con_wctomb,Corinna Vinschen2009-04-076-50/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * libc/rexec.cc (ruserpass): Use fstat64 instead of fstat.Corinna Vinschen2009-04-062-3/+7
|
* * strfuncs.cc: Add comment to explain why we can't support JISCorinna Vinschen2009-04-062-40/+169
| | | | | | | | | | | | | | | | | | | 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.
* * Makefile.in: Use all compile options when calculating magic values.Christopher Faylor2009-04-055-6/+15
| | | | | | | * 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.
* * net.cc: Undefine NOERROR and DELETE to avoid compiler warnings.Christopher Faylor2009-04-054-2/+18
| | | | | | * 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.
* * include/asm/byteorder.h (__ntohl): Prototype before define to avoidCorinna Vinschen2009-04-042-8/+14
| | | | | | a warning with -Wmissing-prototypes. Use _ELIDABLE_INLINE macro from _ansi.h. (__ntohs): Ditto.
* * environ.cc (build_env): Fix length calculation of resultingCorinna Vinschen2009-04-022-2/+7
| | | | wide char environment string.
* * include/netdb.h: #include <inttypes.h>, <netinet/in.h>,Corinna Vinschen2009-04-022-2/+10
| | | | and <sys/socket.h> per SUSv3.
* * strfuncs.cc (sys_cp_mbstowcs): Check if ASCII SO is followed by atCorinna Vinschen2009-04-012-2/+12
| | | | | 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.
* * shm.cc (struct shm_attached_list): Convert access type to ULONG.Corinna Vinschen2009-03-312-13/+30
| | | | | | | | (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.
* * ctype.cc: Remove implementation of ctype functions in favor ofCorinna Vinschen2009-03-316-822/+48
| | | | | | | | | | | | | | | 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.
* * Makefile.in: Perform some minor cleanup. Revamp speclib handling.Christopher Faylor2009-03-283-97/+60
| | | | | * speclib: Rewrite to create libraries with dlltool rather than attempting surgery on libcygwin.a.
* * net.cc (inet_ntop6): Convert to lowercase hex digits on the fly.Corinna Vinschen2009-03-272-1/+10
|
* * net.cc (cygwin_getaddrinfo): Check hints for non-NULL beforeCorinna Vinschen2009-03-272-0/+6
| | | | checking its content.
* * fhandler.h (class fhandler_fifo): Rename read/write methods toCorinna Vinschen2009-03-273-4/+10
| | | | | raw_read/raw_write. * fhandler_fifo.cc: Ditto.
* * syscalls.cc (pathconf): Fix memory leak.Corinna Vinschen2009-03-272-5/+11
|
* * path.cc (symlink_worker): Write target filename as UTF-16 stringCorinna Vinschen2009-03-262-10/+46
| | | | | | | 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.
* * include/asm/byteorder.h (__ntohl): Align definition to ISO C99.Corinna Vinschen2009-03-262-5/+13
| | | | (__ntohs): Ditto.
* * strfuncs.cc (__set_charset_from_codepage): Revert to translatingCorinna Vinschen2009-03-262-2/+7
| | | | codepage 936 to "GBK".
* * strfuncs.cc (sys_wcstombs): Don't convert ASCII SO into twoCorinna Vinschen2009-03-252-3/+7
| | | | ASCII SO's.
* * environ.cc (environ_init): Break from locale loop after first hit.Corinna Vinschen2009-03-253-2/+29
| | | | | * fhandler_console.cc (fhandler_console::write_normal): Print a SO sequence using always valid Unicode chars.
* * strfuncs.cc (__kr_wctomb): Use codepage 51949 rather than 50949.Corinna Vinschen2009-03-252-5/+12
| | | | | | (__kr_mbtowc): Ditto. (__set_charset_from_codepage): Ditto. Translate codepage 936 to "GB2312" and drop the charset name "GBK".
* * strfuncs.cc (__kr_wctomb): Use codepage 50949 rather than 949.Corinna Vinschen2009-03-242-4/+12
| | | | | | (__kr_mbtowc): Ditto. (__set_charset_from_codepage): Translate codepages 949 and 50949 to "EUCKR" and drop the charset name "CP949".