d84985f7942008-03-11 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston
2008-03-11 19:13:30 +0000
88348faf5b2008-03-11 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston
2008-03-11 19:08:39 +0000
5b7296f637* cygcheck.cc (find_app_on_path): Make buffer SYMLINK_MAX + 1 chars.
Brian Dessent
2008-03-11 18:43:11 +0000
60efa4e546* cygcheck.cc (dirname): New static function. (find_app_on_path): Use SYMLINK_MAX. Resolve symlink relative to link's location. Adjust to the fact that cygpath already normalizes its return value. * path.cc (rel_vconcat): Add cwd parameter, and use it instead of calling GetCurrentDirectory() if possible. Rename throughout. (vcygpath): Rename from cygpath and accept cwd and va_list. Pass cwd on to rel_vconcat(). (cygpath_rel): New front end for vcygpath. (cygpath): Ditto. * path.h (cygpath_rel): Declare. (SYMLINK_MAX): Define to 4095.
Brian Dessent
2008-03-11 17:20:02 +0000
0c4cb56009* dlfcn.cc (get_full_path_of_dll): Allow paths up to PATH_MAX. (dlopen): Call get_full_path_of_dll with path buffer allocate by tmp_pathbuf.
Corinna Vinschen
2008-03-11 13:35:55 +0000
4855f6c517* spawn.cc (find_exec): Use tmp_pathbuf to allocate path buffer.
Corinna Vinschen
2008-03-11 13:26:40 +0000
ab5d348d30* dtable.cc (dtable::init_std_file_from_handle): Use tmp_pathbuf to allocate path buffer. (handle_to_fn): Ditto. Allocate fnbuf big enough to get long path names.
Corinna Vinschen
2008-03-11 13:17:52 +0000
6c968f611b* path.cc (cwdstuff::set): Make sure drive_length is 0 for virtual paths. Add comments. * spawn.cc (spawn_guts): Don't allow to start a native Win32 application from a long path or a virtual path. Print an error message to stderr.
Corinna Vinschen
2008-03-11 12:34:08 +0000
becf251f67* environ.cc (parse_options): Use tmp_pathbuf to allocate buffer. (regopt): Take tmp buffer as additional argument. (environ_init): Alllcate tmpbuf earlier. Use as temporary buffer in call to regopt. * tls_pbuf.cc (tmp_pathbuf::c_get): Allocate one additional char. (tmp_pathbuf::w_get): Allocate one additional WCHAR. * winf.cc (av::unshift): Use tmp_pathbuf to allocate buffer.
Corinna Vinschen
2008-03-11 11:42:00 +0000
ff488124ff* syscalls.cc (sync): Use MAX_PATH rather than CYG_MAX_PATH.
Corinna Vinschen
2008-03-11 11:12:09 +0000
949c0ec28c* fhandler.h (class fhandler_console): Add write_buf as pointer to temporary buffer space. * fhandler_console.cc (CONVERT_LIMIT): Define as NT_MAX_PATH. Add comment. (fhandler_console::write_normal): Use write_buf throughout. (fhandler_console::write): Use tmp_pathbuf to allocate write_buf.
Corinna Vinschen
2008-03-10 17:23:50 +0000
3e148838af* fhandler.h (dev_console::con_to_str): Declare returning DWORD. * fhandler_console.cc (dev_console::con_to_str): Return number of multibyte char bytes. (fhandler_console::read): Set nread to number of multibyte char bytes returned from con_to_str. (fhandler_console::write_normal): Reorder trunc buffer preocessing. Return after writing valid multibyte sequence out of trunc buffer. Change comments slightly.
Corinna Vinschen
2008-03-10 16:22:38 +0000
3461c83a052008-03-09 Paul Brook <paul@codesourcery.com>
Paul Brook
2008-03-09 13:23:29 +0000
92108f4e26* Makefile.in (install): Don't install the testsuite.
Brian Dessent
2008-03-09 09:41:42 +0000
59fb00ae07* Makefile.in: Add a 'check' target that builds and runs testsuite.exe from path-testsuite.o and testsuite.o. * path.cc: Include testsuite.h. (struct mnt): Change to a mnt_t typedef and don't define mount_table when TESTSUITE is defined. (find2): Don't include when TESTSUITE is defined to avoid warning. (get_cygdrive0): Ditto. (get_cygdrive): Ditto. (read_mounts): Provide empty implementation when TESTSUITE is defined. (vconcat): Use the isslash macro. (unconvert_slashes): New helper to convert to backslashses. (rel_vconcat): Handle relative paths more gracefully. (cygpath): Skip a leading "./" sequence. Avoid double-slashes. Normalize final output to backslashes and remove redundant path sequences. * testsuite.cc: New file implementing testsuite driver. * testsuite.h: New header implementing harness mount table and series of tests.
Brian Dessent
2008-03-09 04:10:10 +0000
68d2dd03a3* Makefile.in: Reorganize considerably, using GNU make's static pattern rules and target-specific variables.
Brian Dessent
2008-03-08 17:52:49 +0000
ca6fd6300a* fhandler_disk_file.cc (DIR_BUF_SIZE): Define required space for file name in terms of sizeof(WCHAR). (fhandler_disk_file::readdir_helper): Convert *all* of fname. * path.cc (fillout_mntent): Use tmp_pathbuf for path buffer. (symlink_worker): Ditto. (SCAN_JUSTCHECKTHIS): New state for suffix_scan to define that only the actual name gets cheked and a suffix is never attached. (suffix_scan::has): If filename + suffix would be > NAME_MAX, start in SCAN_JUSTCHECKTHIS state. (suffix_scan::next): Add case for SCAN_JUSTCHECKTHIS. (symlink_info::check): Use tmp_pathbuf for path buffer. Goto file_not_symlink in case of invalid file name. (realpath): Use tmp_pathbuf for path buffer.
Corinna Vinschen
2008-03-08 17:28:40 +0000
23c6ed0394* dtable.cc (handle_to_fn): Null-terminate posix_fn in the case of justslash = true.
Brian Dessent
2008-03-08 03:28:34 +0000
244191b6a9* fhandler.cc (fhandler_base::open): Use %S for PUNICODE_STRING. * syscalls.cc (setmode): Ditto.
Brian Dessent
2008-03-08 01:33:22 +0000
c6228428652008-03-07 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston
2008-03-07 18:16:35 +0000
0382d267272008-03-07 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston
2008-03-07 16:45:04 +0000
360b05b451* fhandler_socket.cc (fhandler_socket::sendto): Never send more than 64K. Add comment to explain why. (fhandler_socket::sendmsg): Ditto.
Corinna Vinschen
2008-03-07 14:47:48 +0000
752b16ce35* Makefile.in (DLL_OFILES): Add tls_pbuf.o. * autoload.cc (CreateDesktopW): Replace CreateDesktopA. (CreateWindowStationW): Replace CreateWindowStationA. (GetUserObjectInformationW): Replace GetUserObjectInformationA. * cygheap.h (cwdstuff::get): Assume default buffer size NT_MAX_PATH. * cygtls.cc (_cygtls::remove): Free temporary TLS path buffers. * cygtls.h (TP_NUM_C_BUFS): Define. (TP_NUM_W_BUFS): Define. (class tls_pathbuf): New class to store pointers to thread local temporary path buffers. (_local_storage::pathbufs): New member. * environ.cc (win_env::add_cache): Use temporary TLS path buffer instead of stack based buffer. (posify): Get temporary outenv buffer from calling function. (environ_init): Create temporary TLS path buffer for posify. (build_env): Create Windows environment block as WCHAR buffer. * environ.h (build_env): Change declaration accordingly. * external.cc (sync_winenv): Accommodate build_env change. * fhandler_console.cc (fhandler_console::need_invisible): Use GetUserObjectInformationW and CreateWindowStationW. * fhandler_process.cc (format_process_maps): Use temporary TLS path buffer instead of stack based buffer. * fork.cc (frok::parent): Convert to use CreateProcessW. * path.cc: Throughout use temporary TLS path buffers instead of stack based buffer. Replace checks for CYG_MAX_PATH by checks for NT_MAX_PATH. (getfileattr): New function to replace GetFileAttributesA. (normalize_win32_path): Remove Win32 and NT long path prefixes. (getwd): Assume PATH_MAX + 1 buffer per SUSv3. * path.h (class path_conv): Set path buffer to size NT_MAX_PATH. (iswdrive): Define. * pinfo.cc (commune_process): Use temporary TLS path buffer instead of stack based buffer. * registry.cc (get_registry_hive_path): Ditto. (load_registry_hive): Ditto. * spawn.cc (spawn_guts): Convert to use CreateProcessW and CreateProcessAsUserW. (av::fixup): Open/close file using NtOpenFile/NtClose. * syscalls.cc (mknod_worker): Allow PATH_MAX file name. (mknod32): Ditto. (getusershell): Ditto. * tls_pbuf.cc: New file implementing tls_pathbuf and tmp_pathbuf methods. * tls_pbuf.h: New header for files using tmp_pathbuf. * tlsoffsets.h: Regenerate. * winsup.h (NT_MAX_PATH): Define as 32767 to avoid USHORT overflow.
Corinna Vinschen
2008-03-07 11:24:51 +0000
d8e218442b2008-03-06 Florian Krohm <fkrohm@us.ibm.com>
Andreas Krebbel
2008-03-06 12:01:11 +0000
8a889eff57* child_info.h (~child_info_spawn): Check moreinfo->myself_pinfo for NULL before closing. * spawn.cc (spawn_guts): Don't close moreinfo->myself_pinfo explicitely in case of failing CloseProcess.
Corinna Vinschen
2008-03-05 18:31:09 +0000
e3bf57046b2008-03-04 Paul Brook <paul@codesourcery.com>
Paul Brook
2008-03-05 01:31:26 +0000
beb0ab6466Fix strtod("nan()", ptr). * libc/stdlib/gdtoa-hexnan.c (hexnan): When the optional n-char-sequence is omitted, still parse the (). -------------------------------------------------------------------
Eric Blake
2008-03-04 18:27:01 +0000
4d35ce43512008-02-28 Joseph Myers <joseph@codesourcery.com>
Chris Sutcliffe
2008-03-04 02:42:44 +0000
9ae00e9e07Fix ftell bug after ungetc. * libc/stdio/ftell.c (_ftell_r): Don't flush ungetc buffer on ftell. * libc/stdio64/ftello64.c (_ftello64_r): Likewise. * libc/stdio/fflush.c (_fflush_r): Clear unget buffer when repositioning underlying fd offset. -------------------------------------------------------------------
Eric Blake
2008-03-04 02:22:36 +0000
be62101c602008-03-02 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston
2008-03-03 19:47:59 +0000
193b9a616d* dwarf2.h: (enum dwarf_location_atom): Add new DW_OP, DW_OP_PGI_omp_thread_num.
Nick Clifton
2008-03-03 10:19:01 +0000
003b55e3defix typo
Christopher Faylor
2008-03-02 23:11:00 +0000
6452eb1f2a* cygtls.cc (_cygtls::init_exception_handler): Semi-revert to making only ourselves the exception handler and nothing else. * exceptions.cc (open_stackdumpfile): Use correct format specifiers for unicode when printing nameof stackdump file. (stack_info::walk): Stop walking if ebp points into cygwin itself. (_cygtls::handle_exceptions): Detect when signal is masked and treat as if it was not caught. Reinitialize exception handler to known state to avoid subsequent attempts to call Windows exception handlers if an exception occurs in a signal handler. Revert to a 'return 0' rather than using a goto. * strfuncs.cc (sys_wcstombs_alloc): Minor formatting tweak. * winsup.h: Fix comment typo.
Christopher Faylor
2008-03-02 22:51:19 +0000
1264c4d4fa* smallprint.cc (__small_vsprintf): Free allocated buffer rather than pointer into the buffer.
Christopher Faylor
2008-03-02 22:25:07 +0000
da061b9cd2Update ChangeLog.
Christopher Faylor
2008-03-01 14:55:07 +0000
2d80b55b4e* cygtls.h (_cygtls::handle_threadlist_exception): Eliminate. (_cygtls::init_threadlist_exceptions): Ditto. * cygtls.cc (_cygtls::handle_threadlist_exception): Eliminate. (_cygtls::init_threadlist_exceptions): Ditto. (_cygtls::find_tls): Use myfault handling to deal with errors caused by nonexistent threads.
Christopher Faylor
2008-03-01 14:53:44 +0000
f78f85ce6d* cygtls.cc (_cygtls::init_exception_handler): Just return.
Christopher Faylor
2008-03-01 13:19:08 +0000
813767de3d* exceptions.cc (_cygtls::handle_exceptions): Only call rtl_unwind when exiting. Just return, don't set thread context. * gendef (_setjmp): Store %fs:0 in jmp_buf. (_sjfault): Ditto. (_ljfault): Restore %fs:0 from jmp_buf. (_longjmp): Ditto.
Christopher Faylor
2008-03-01 13:18:22 +0000
76ff710cfa2008-02-29 Gregory Pietsch <gpietsch@comcast.net>
Jeff Johnston
2008-02-29 21:11:57 +0000
86a4b0c733* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Call close_fs instead of close to avoid calling close from wrong class when changing a file system based device node. (fhandler_disk_file::fchown): Ditto. (fhandler_disk_file::facl): Ditto.
Corinna Vinschen
2008-02-29 16:38:51 +0000
fb91cb7a41Change accreditation for patch for PR3134
Nick Clifton
2008-02-29 14:43:17 +0000
83082b6a68* exceptions.cc (_cygtls::handle_exceptions): When being debugged, leave through SetThreadContext, too, to keep exception handler stack intact.
Corinna Vinschen
2008-02-28 17:57:42 +0000
b23bf2fbf9Fix date
Corinna Vinschen
2008-02-27 17:53:39 +0000
bad25c125b* (struct __DIR_cache): Switch order of members so that the buffer given to NtQueryDirectoryFile is 8 byte aligned.
Corinna Vinschen
2008-02-27 17:52:33 +0000
8ba248a94b* cygtls.cc (_cygtls::handle_threadlist_exception): Make it clear that the function never actually returns. * exceptions.cc (_cygtls::handle_exceptions): Jump out of function rather than returning to avoid meddling by previously installed exception handlers.
Christopher Faylor
2008-02-27 17:16:46 +0000
ca504a0deePR 3134 * h8300.h (h8_opcodes): Add an encoding for a mov.l instruction with a 32-bit displacement but without the top bit of the 4th byte set.
Nick Clifton
2008-02-27 12:33:42 +0000
5ab0b5cf52* dcrt0.cc (initial_env): Only use local buffer "buf" if DEBUGGING is enabled. Replace calls to GetEnvironmentVariable by calls to GetEnvironmentVariableA for clarity. Call GetEnvironmentVariableA with NULL buffer. (cygbench): Ditto, drop local buffer. * environ.cc (getearly): Call GetEnvironmentVariableA. (environ_init): Retrieve unicode environment and convert to current codepage locally. (getwinenveq): Ditto. * exceptions.cc (try_to_debug): Accommodate new sys_mbstowcs calling convention. * fhandler_clipboard.cc (set_clipboard): Call sys_mbstowcs to retrieve required buffer length. * fork.cc (frok::child): Call GetEnvironmentVariableA. * miscfuncs.cc: Accommodate changed arguments in calls to sys_mbstowcs. * sec_auth.cc: Ditto. * strfuncs.cc (sys_wcstombs_alloc): Fix formatting. (sys_mbstowcs): Change arguments to allow specifying a source string length. (sys_mbstowcs_alloc): Ditto. * uinfo.cc (cygheap_user::ontherange): Accommodate changed arguments in calls to sys_mbstowcs. * winsup.h (sys_mbstowcs): Adjust declaration. (sys_mbstowcs_alloc): Ditto.
Corinna Vinschen
2008-02-25 18:32:23 +0000
ff42f5b1e32008-02-24 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
Chris Sutcliffe
2008-02-24 10:57:02 +0000
7f9ab780cd2008-02-23 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
Chris Sutcliffe
2008-02-24 02:34:18 +0000
7a44c13ecbFix strtod("-0x", NULL). * libc/stdlib/strtod.c (_strtod_r): Fall back to 0 if hex parse fails.
Eric Blake
2008-02-21 17:14:14 +0000
1f71763a62config: 2008-02-20 Uros Bizjak <ubizjak@gmail.com>
Paolo Bonzini
2008-02-20 16:28:09 +0000
44464b0156* path.cc (cwdstuff::set): Revert error handling change in case DuplicateHandle fails, because it breaks Vista/Longhorn workaround.
Corinna Vinschen
2008-02-20 14:42:29 +0000
6532abb6242008-02-20 Paolo Bonzini <bonzini@gnu.org>
Paolo Bonzini
2008-02-20 14:26:59 +0000
9feffba7d9* sigproc.cc (sig_send): Use sigmask of target thread if it is specified otherwise default to main sigmask.
Christopher Faylor
2008-02-19 21:42:48 +0000
344f17f1fa* cr16.h (cr16_num_optab): Declared. * cr16-opc.c (cr16_num_optab): Defined
Nick Clifton
2008-02-18 13:46:45 +0000
49fdf406ac2008-02-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Paolo Bonzini
2008-02-16 15:26:46 +0000
a5c1103914* include/sys/cygwin.h (__INT_MAX_PATH): Define to 32K. (external_pinfo): Set size to __INT_MAX_PATH.
Corinna Vinschen
2008-02-15 20:11:06 +0000
e5f8ee9e61* include/sys/cygwin.h (external_pinfo): Define program_long size using external buffer size rather than cygwin-internal buffer size.
Christopher Faylor
2008-02-15 18:07:07 +0000
70300fdb1cPerform whitespace cleanup throughout. * dcrt0.cc (signal_shift_subtract): Eliminate ancient backwards compatibility. (check_sanity_and_sync): Ditto. * winsup.h (SIGTOMASK): Ditto. Just use constant in signal calculation. * include/cygwin/version: Remove backwards signal mask compatibility define. * path.cc (symlink_info::check_sysfile): Cosmetic change. * registry.cc (get_registry_hive_path): Remove unneeded variable. * exceptions.cc (handle_sigsuspend): Eliminate thread signal mask and use either main sigmask or current thread sigmask. (set_process_mask): Ditto. (sighold): Ditto. (sigrelse): Ditto. (sigset): Ditto. (set_process_mask_delta): Ditto. (_cygtls::call_signal_handler): Ditto. * fhandler_process.cc (format_process_status): Ditto. * fhandler_termios.cc (fhandler_termios::bg_check): Ditto. * pinfo.h (class pinfo): Ditto. * select.cc (pselect): Ditto. * signal.cc (sigprocmask): Ditto. (abort): Ditto. (sigpause): Ditto. (sigsend): Ditto. (wait_sig): Ditto. * thread.h (pthread::parent_tls): New member. * thread.cc (pthread::pthread): Record parent_tls here. (pthread::thread_init_wrapper): Initialize sigmask from parent thread.
Christopher Faylor
2008-02-15 17:53:11 +0000
b40597cb2e* syscalls.cc (_isatty): Define as an alias to isatty to override newlib version. * thread.cc (pthread_kill): Deal with signal 0 as per POSIX and also avoid manipulating an invalid thread.
Christopher Faylor
2008-02-13 17:21:05 +0000
a9414ca6d8* posix.sgml: Move llrint, llrintf, llrintl, lrintl, rintl, wcstol, wcstoll, wcstoul, wcstoull, wcsxfrm from unimplemented to implemented POSIX interfaces. Change headline of "GNU extensions" to "GNU and Linux extensions". Add fgetxattr, flistxattr, fremovexattr, fsetxattr, getxattr, lgetxattr, listxattr, llistxattr, lremovexattr, lsetxattr, removexattr, setxattr, wcpcpy and wcpncpy to list of implemented GNU functions.
Corinna Vinschen
2008-02-13 14:50:39 +0000
5cb998e66c* cygtls.cc (_cygtls::init_exception_handler): Revert patch from 2005-12-02. * exceptions.cc (stack_info::walk): Add workaround for NT 5.2 64 bit OSes. * wincap.h (wincaps::has_restricted_stack_args): New element. * wincap.cc: Implement above element throughout. (wincapc::init): Reset has_restricted_stack_args if not running under WOW64.
Corinna Vinschen
2008-02-13 09:42:22 +0000
9cb5dea0e22008-02-11 Patrick Mansfield <patmans@us.ibm.com>
Jeff Johnston
2008-02-12 21:21:13 +0000
de20111eba2008-02-12 Jeff Johnston <jjohnstn@redhat.com>
Jeff Johnston
2008-02-12 18:07:55 +0000
f46f40b54e2008-02-12 Peter Rosin <peda@lysator.liu.se>
Jeff Johnston
2008-02-12 17:20:09 +0000
025ce65fcb2008-02-02 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
Chris Sutcliffe
2008-02-12 01:31:52 +0000
74d928bf7a2008-02-11 Patrick Mansfield <patmans@us.ibm.com>
Jeff Johnston
2008-02-11 22:19:59 +0000
9b924fc3042008-02-11 Patrick Mansfield <patmans@us.ibm.com>
Jeff Johnston
2008-02-11 22:14:46 +0000
001e850653* xtensa-config.h (XCHAL_HAVE_THREADPTR): Redefine to zero. (XCHAL_NUM_AREGS, XCHAL_MAX_INSTRUCTION_SIZE): New.
Bob Wilson
2008-02-11 17:53:04 +0000
6542ddc3be* dcrt0.cc (dll_crt0_1): Fix typo in call to sys_wcstombs. * miscfuncs.cc (next_char): Initialize ret to keep gcc happy.
Corinna Vinschen
2008-02-11 16:39:06 +0000
50450dcc5f* Makefile.in (DLL_OFILES): Add ntea.o. * cygwin.din (getxattr, listxattr, removexattr, setxattr, lgetxattr, llistxattr, lremovexattr, lsetxattr, fgetxattr, flistxattr, fremovexattr, fsetxattr): Export Linux extended attribute functions. Sort. * errno.cc (errmap): Add mappings for ERROR_EAS_DIDNT_FIT, ERROR_EAS_NOT_SUPPORTED, ERROR_EA_LIST_INCONSISTENT, ERROR_EA_TABLE_FULL, ERROR_FILE_CORRUPT, ERROR_INVALID_EA_NAME. * fhandler.h (class fhandler_base): Declare new fgetxattr and fsetxattr methods. (class fhandler_disk_file): Ditto. * fhandler.cc (fhandler_base::fgetxattr): New method. (fhandler_base::fsetxattr): New method. * fhandler_disk_file.cc (fhandler_disk_file::fgetxattr): New method. (fhandler_disk_file::fsetxattr): New method. * ntdll.h (STATUS_EA_TOO_LARGE): Define. (STATUS_NONEXISTENT_EA_ENTRY): Define. (STATUS_NO_EAS_ON_FILE): Define. * ntea.cc (read_ea): Rewrite for long pathnames and for using with Linux extended attribute functions. (write_ea): Ditto. (getxattr_worker): New static function. (getxattr): New function. (lgetxattr): New function. (fgetxattr): New function. (listxattr): New function. (llistxattr): New function. (flistxattr): New function. (setxattr_worker): New static function. (setxattr): New function. (lsetxattr): New function. (fsetxattr): New function. (removexattr): New function. (lsetxattr): New function. (fsetxattr): New function. * security.h (read_ea): Change declaration according to above changes. (write_ea): Ditto. * include/cygwin/version.h: Bump API minor version.
Corinna Vinschen
2008-02-10 15:43:04 +0000
4248960e2f* dtable.cc (dtable::init_std_file_from_handle): Set access to read/write of handle is connected to a tty or console. * fhandler_dsp.cc (fhandler_dev_dsp::dup): Set open flags correctly after duplicating from archetype. * fhandler_tty.cc (fhandler_tty_slave::dup): Ditto. (fhandler_pty_master::dup): Ditto.
Corinna Vinschen
2008-02-07 18:59:40 +0000
62688407cb* bsd_helper.cc: Replace %E __small_printf format specifier with %lu and call to GetLastError throughout. * bsd_mutex.cc: Ditto. * sysv_sem.cc (semget): Replace %X __small_printf format specifier with %llx.
Corinna Vinschen
2008-02-06 22:30:38 +0000
fb7331e34cRemove dependency from Cygwin internal code. * Makefile.in (CYGWIN_OBJS): Remove smallprint.o. (cygserver.exe): Remove strfuncs.o (strfuncs.o): Drop rule. * bsd_log.cc (_vlog): Use snprintf/vsnprintf instead of __small_sprintf/__small_vsprintf. * sysv_sem.cc (seminit): Use sys_malloc instead of malloc. Use snprintf instead of __small_sprintf. (semunload): Free the above allocated sema_mtx names here.
Corinna Vinschen
2008-02-06 22:01:30 +0000
4b65f19045* fhandler.h (fhandler_console::trunc_buf): Add to use as cache for truncated multibyte characters on input. (fhandler_console::write_replacement_char): Declare new method. * fhandler_console.cc (CONVERT_LIMIT): Raise to 64K. (fhandler_console::fhandler_console): Initialize trunc_buf. (ERR): Define as independent value again. (fhandler_console::write_replacement_char): New method to print replacement chars. (fhandler_console::write_normal): Add handling for truncated multibyte sequences. Call next_char instead of pathetic CharNextExA function. Don't change src, rather just work with found later on. * miscfuncs.cc (is_cp_multibyte): Move here from strfuncs.cc. Don't call Windows function, restrict to well-known ANSI/OEM codepages and UTF-8. (next_char): Call CharNextExA only for doublebyte codepages. Implement for UTF-8 here. * strfuncs.cc (is_cp_multibyte): Move to miscfuncs.cc. * winsup.h (next_char): Declare. * include/limits.h (MB_LEN_MAX): Set to maximum value of MB_CUR_MAX as defined by newlib for now.
Corinna Vinschen
2008-02-06 18:24:50 +0000
a7197550f3* autoload.cc (CharToOemA): Remove. (CharNextExA): Define. * environ.cc (codepage_init): Un-static. Set active_codepage to active codepage. Default to ansi regardless of buf pointer. * fhandler.h (dev_console::get_console_cp): New method. (dev_console::con_to_str): Change declaration according to new implementation. (dev_console::str_to_con): Ditto. * fhandler_console.cc (cp_convert): Remove. (dev_console::con_to_str): Redefine to take WCHAR as incoming console char. (dev_console::get_console_cp): Return correct codepage according to alternate_charset_active setting. (dev_console::str_to_con): Redefine to create WCHAR buffer for console output. (fhandler_console::read): Read console input as WCHARs. (base_chars): Fix typo in comment. (fhandler_console::char_command): Save and restore console output buffer using UNICODE functions. (fhandler_console::write_normal): Convert to write output in UNICODE. Use CharNextExA to recognize multibyte characters in input. Workaround problem with UTF-8 and MultiByteToWideChar. Simplify the loop for printing "normal" characters. * strfuncs.cc (active_codepage): New variable to store active codepage. (get_cp): Call codepage_init() if active_codepage is uninitialized. Just return active_codepage. (is_cp_multibyte): New function. * winsup.h (active_codepage): Declare. (codepage_init): Declare. (is_cp_multibyte): Declare.
Corinna Vinschen
2008-02-05 17:37:10 +0000