Commit Graph

7745 Commits

Author SHA1 Message Date
Corinna Vinschen c6b9d71981 * cygcheck.cc (dump_sysinfo): Remove "not yet supported" text. 2009-07-13 10:40:42 +00:00
Chris Sutcliffe 4f615d3ffe 2009-07-12 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* mingwex/stdio/pformat.c: Fix compiler warnings with GCC 4.4.0.
2009-07-12 23:02:10 +00:00
Chris Sutcliffe 15e114f5c5 2009-06-28 Ozkan Sezer <sezero@users.sourceforge.net>
* mingwex/gdtoa/README.mingw mingwex/gdtoa/gdtoa_fltrnds.h: New files.
        * mingwex/gdtoa/README mingwex/gdtoa/dmisc.c mingwex/gdtoa/dtoa.c
        mingwex/gdtoa/g__fmt.c mingwex/gdtoa/g_dfmt.c mingwex/gdtoa/g_ffmt.c
        mingwex/gdtoa/g_xfmt.c mingwex/gdtoa/gd_arith.h mingwex/gdtoa/gd_qnan.h
        mingwex/gdtoa/gdtoa.c mingwex/gdtoa/gdtoa.h mingwex/gdtoa/gdtoaimp.h
        mingwex/gdtoa/gethex.c mingwex/gdtoa/gmisc.c mingwex/gdtoa/hd_init.c
        mingwex/gdtoa/hexnan.c mingwex/gdtoa/misc.c mingwex/gdtoa/qnan.c
        mingwex/gdtoa/smisc.c mingwex/gdtoa/strtodg.c mingwex/gdtoa/strtodnrp.c
        mingwex/gdtoa/strtof.c mingwex/gdtoa/strtopx.c mingwex/gdtoa/sum.c
        mingwex/gdtoa/ulp.c:  Update the gdtoa library to match the netlib.org
        sources as of Apr. 20, 2009.  Update further to match the sources in
        the mingw-w64 tree as of June 28, 2009, by removing IBM, CRAY and VAX
        code, removing KR_headers, ANSI, Void and Char ifdefs, renaming the
        double/ulong union from U to dbl_union for better grepping and white-
        space tidy-ups.
2009-07-12 22:44:37 +00:00
Christopher Faylor 62fb43a722 * how-spawn-works.txt: Add "out of date" note.
* how-vfork-works.txt: Ditto.
2009-07-12 21:26:40 +00:00
Christopher Faylor 4a42a25876 * Makefile.in: Don't do anything special with any RCS directories.
* ntdll.h (PROCESSINFOCLASS): Remove unneeded trailing comma.
* pinfo.cc (_pinfo::dup_proc_pipe): Remove unneeded assignment.
* sigproc.cc (sig_send): Don't send signal to myself if this is an exec stub.
2009-07-12 21:15:47 +00:00
Corinna Vinschen 77dcafa5ad * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Don't use
FileAllInformation info class since it needs a big buffer.  Add a
	comment.
2009-07-12 13:00:36 +00:00
Christopher Faylor b2cbcab19f * pathnames.sgml: Fix typo. 2009-07-08 23:23:02 +00:00
Dave Korn 97bef5b7fd * winbase.h (ilockexch): Avoid making 'ret' volatile.
(ilockcmpexch): Likewise.
2009-07-07 21:41:43 +00:00
Dave Korn cd6c79f4fe * ChangeLog: Assorted minor whitespace fixes in old entries. 2009-07-07 20:25:34 +00:00
Dave Korn b602bb90e2 winsup/ChangeLog:
* Makefile.common (COMPILE_CXX): Add support for per-file overrides
	to exclude $(nostdinc) and $(nostdincxx) from compiler flags.
	(COMPILE_CC): Likewise for $(nostdinc).

winsup/cygwin/ChangeLog:

	* Makefile.in (DLL_OFILES): Add libstdcxx_wrapper.o
	(libstdcxx_wrapper_CFLAGS): Add flags for new module.
	(_cygwin_crt0_common_STDINCFLAGS): Define per-file override.
	(libstdcxx_wrapper_STDINCFLAGS, cxx_STDINCFLAGS): Likewise.
	* cxx.cc: Include "cygwin-cxx.h".
	(operator new): Tweak prototype for full standards compliance.
	(operator new[]): Likewise.
	(operator new (nothrow)): New fallback function.
	(operator new[] (nothrow), operator delete (nothrow),
	operator delete[] (nothrow)): Likewise.
	(default_cygwin_cxx_malloc): New struct of pointers to the above,
	for final last-resort fallback default.
	* cygwin-cxx.h: New file.
	(struct per_process_cxx_malloc): Define.
	(default_cygwin_cxx_malloc): Declare extern.
	* cygwin.din (__wrap__ZdaPv): Export new wrapper.
	(__wrap__ZdaPvRKSt9nothrow_t, __wrap__ZdlPv,
	__wrap__ZdlPvRKSt9nothrow_t, __wrap__Znaj,
	__wrap__ZnajRKSt9nothrow_t, __wrap__Znwj,
	__wrap__ZnwjRKSt9nothrow_t): Likewise.
	* globals.cc (__cygwin_user_data): Init newly-repurposed 'forkee'
	field (now 'cxx_malloc') to point to default_cygwin_cxx_malloc.
	* libstdcxx_wrapper.cc: New file.
	(__wrap__ZdaPv, __wrap__ZdaPvRKSt9nothrow_t, __wrap__ZdlPv,
	__wrap__ZdlPvRKSt9nothrow_t, __wrap__Znaj,
	__wrap__ZnajRKSt9nothrow_t, __wrap__Znwj,
	__wrap__ZnwjRKSt9nothrow_t): Define wrapper functions for libstdc++
	malloc operators and their overrides.
	* winsup.h (default_cygwin_cxx_malloc): Declare extern.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
	* include/sys/cygwin.h (struct per_process_cxx_malloc): Forward
	declare here.
	(struct per_process::forkee): Rename and repurpose from this ...
	(struct per_process::cxx_malloc): ... to this.
	* lib/_cygwin_crt0_common.cc: Include cygwin-cxx.h.
	(WEAK): Define shorthand helper macro.
	(__cygwin_cxx_malloc): Define and populate with weak references
	to whatever libstdc++ malloc operators will be visible at final
	link time for Cygwin apps and dlls.
	(_cygwin_crt0_common): Always look up cygwin DLL's internal
	per_process data, and don't test for (impossible) failure.  Inherit
	any members of __cygwin_cxx_malloc that we don't have overrides
	for from the DLL's default and store the resulting overall set of
	overrides back into the DLL's global per_process data.
2009-07-07 20:12:44 +00:00
Corinna Vinschen 6499c6e07b * cygtls.cc (_cygtls::remove): Fix typo. 2009-07-07 08:07:38 +00:00
Christopher Faylor 37b9360dc6 * Makefile.in (clean): Clean generated files in srcdir.
* tlsoffsets.h: Regenerate.
2009-07-06 23:19:08 +00:00
Christopher Faylor 421dde25fa * cygtls.cc (_cygtls::remove): Avoid closing a NULL handle. 2009-07-06 23:05:10 +00:00
Corinna Vinschen 58fc288ada * fhandler_socket.cc (fhandler_socket::recv_internal): Convert wsabuf
and wsacnt to references.  Fix handling of WSAEMSGSIZE.
2009-07-06 20:30:34 +00:00
Corinna Vinschen 023c25829c * cygtls.h (struct _local_storage): Add thread storage pointers for
memory used by socket select functions.  Combine them into a single
	struct select.
	* cygtls.cc: Accommodate above change throughout.
	(_cygtls::init_thread): Drop initalizing of sockevt to
	INVALID_HANDLE_VALUE.
	(_cygtls::fixup_after_fork): Reset sockevt to NULL.
	(_cygtls::remove): Don't use sockevt value to bail out prematurely.
	Set sockevt to NULL.  Free malloced select members.
	* select.h (struct select_socket_info): Drop max_w4 member.
	* select.cc (thread_socket): Use INFINITE timeout value if number of
	objects to wait for is <= MAXIMUM_WAIT_OBJECTS.  Use num_w4 member
	of select_socket_info struct rather than dropped max_w4.
	(init_tls_select_info): New inline function to initialize TLS select
	members.
	(start_thread_socket): Just call init_tls_select_info to initialize TLS
	select members and use them later on.
	(socket_cleanup): Don't free select_socket_info pointer members since
	they are thread local now.
2009-07-06 15:42:01 +00:00
Christopher Faylor 1183d7fb13 * dtable.cc (handle_to_fn): Detect failing NtQueryObject. 2009-07-06 15:11:30 +00:00
Corinna Vinschen e4001d4ccd * autoload.cc: Delete stray CR. 2009-07-06 10:44:14 +00:00
Christopher Faylor 5ea3e685eb * fhandler_console.cc: Change workstation -> windows station throughout. 2009-07-05 16:49:56 +00:00
Christopher Faylor cea37699d1 * cygwin-console-helper.cc: New file. 2009-07-05 00:01:26 +00:00
Christopher Faylor 01d8a2dfd6 * autoload.cc (SetParent): Add new import.
* fhandler.h (fhandler_console::create_invisible_console): Declare new
function.
(create_invisible_console_workaround): Ditto.
* fhandler_console.cc (fhandler_console::create_invisible_console): Define new
function.
(create_invisible_console_workaround): Ditto.  Add too much code to deal with
broken Windows 7.  Use a helper app to start an invisible console window.
(fhandler_console::need_invisible): Reorganize to use helper functions to
create invisible console.
* spawn.cc (spawn_guts): Avoid zeroing already zeroed fields in si.
2009-07-04 23:51:10 +00:00
Dave Korn 38a58dd13c * autoload.cc (AttachConsole): Correct size of args. 2009-07-04 14:51:09 +00:00
Christopher Faylor 3c4f2024a1 * dcrt0.cc (jit_debug): New global.
(initial_env): Set jit_debug when we are automatically starting a gdb process.
* dtable.cc (dtable::get_debugger_info): Don't tty tricks when we are being
debugged by our own captive gdb, as determined by jit_debug == true.
(dtable::init_std_file_from_handle): Detect errors when initializing a tty
early rather than at random points later.
* fhandler.h (fhandler_*::init): Return int to indicate success/failure.
* fhandler.cc (fhandler_base::init): Reflect change in return value.
* pipe.cc (fhandler_pipe::init): Ditto.
(fhandler_pipe::create_selectable): Don't say we're retrying when we aren't.
* fhandler_console.cc (fhandler_console::init): Ditto.  Return success/failure.
* fhandler_serial.cc (fhandler_serial::init): Ditto.
* fhandler_tty.cc (fhandler_tty_slave::init): Ditto.
(fhandler_tty_slave::open): Make debugging output more detailed.
* tty.cc (tty_list::terminate): Don't close I/O handles before all slaves have
checked in.
(tty::slave_alive): Make a non-inlined function.  Check if tty pipe handles can
be created as an additional exists check.
* tty.h (tty::slave_alive): Just define here.
2009-07-03 18:05:51 +00:00
Corinna Vinschen 3e62013829 * new-features.sgml (ov-new1.7-file): Add fpurge and mkstemps to new
API functions.
2009-07-03 13:06:34 +00:00
Corinna Vinschen 8d7471ab44 * posix.sgml: Add fpurge and mkstemps to BSD list. 2009-07-03 13:04:01 +00:00
Corinna Vinschen e5f37aa148 * cygwin.din (fpurge, mkstemps): New exports.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
	* mktemp.cc (_gettemp): Add parameter.
	(mkstemps): New function.
	(mkstemp, mkdtemp, mktemp): Adjust clients.
2009-07-03 13:01:17 +00:00
Corinna Vinschen a4175657bf * autoload.cc: Fix typo in comment.
(ShowWindowAsync): Define.
	(AttachConsole): Define.
	* fhandler_console.cc (fhandler_console::need_invisible): Add band-aid
	for Windows 7 AllocConsole bug.
2009-07-03 10:50:51 +00:00
Christopher Faylor 75da5017d7 Clean up some sources.redhat.com references. 2009-07-01 22:07:31 +00:00
Corinna Vinschen d3920e10ad * net.cc (get_xp_ifs): Fix typo in comment. 2009-07-01 15:45:23 +00:00
Corinna Vinschen 128b854b57 * lib/comctl32.def (StrCSpnA@8, StrCSpnIA@8, StrCSpnW@8, StrChrA@8,
StrChrIA@8, StrChrIW@8, StrChrW@8, StrCmpNA@12, StrCmpNIA@12,
	StrCmpNIW@12, StrCmpNW@12, StrRChrA@12, StrRChrIA@12, StrRChrW@12,
	StrRStrIA@12, StrRStrIW@12, StrStrA@8, StrStrIA@8, StrStrIW@8,
	StrStrW@8, StrToIntA@4, StrToIntW@4): Remove erroneously defined
	entry points.
2009-07-01 11:06:12 +00:00
Corinna Vinschen 975a630109 * fhandler.h (class fhandler_socket): Add class members and methods
to store and retrieve the SO_RCVBUF and SO_SNDBUF sizes.
	* fhandler_socket.cc (fhandler_socket::dup): Duplicate new members.
	(fhandler_socket::send_internal): Check for SO_SNDBUF size and
	restrict send to 1 byte less per KB 823764.  Leave loop immediately
	if WSASendMsg has been used.
	* net.cc (fdsock): Change comment again.  Set buffer sizes to 65536.
	Store values in fhandler_socket.
	(cygwin_setsockopt): Store SO_RCVBUF and SO_SNDBUF sizes in
	fhandler_socket.
	(cygwin_sendto): Drop call to sig_dispatch_pending.
	(cygwin_recvfrom): Ditto.
	(cygwin_recvmsg): Ditto.
	(cygwin_sendmsg): Ditto.
2009-07-01 09:16:17 +00:00
Christopher Faylor b4fa816474 * select.h: New file split from fhandler.h.
(select_record::select_record): Define do-nothing constructor for "new" to
avoid gratuitous zeroing.
(select_info): New base class.
(select_pipe_info): New class with methods for dealing with pipes.
(select_socket_info): New class with methods for dealing with sockets.
(select_serial_info): Dummy class for serial.
(select_mailslot_info): Dummy class for mailslots.
(select_stuff): Define device_specific_* as actual classes rather than void *.
* dtable.h (dtable::select_read): Accommodate return value change to 'bool' and
argument change to "select_stuff".
(dtable::select_write): Ditto.
(dtable::select_except): Ditto.
* dtable.cc (dtable::select_read): Accommodate return value change to 'bool'
and argument change to "select_stuff".
(dtable::select_write): Ditto.
(dtable::select_except): Ditto.
* fhandler.h: Excise select-related classes.
(fhandler_*::select_read): Change argument to select_stuff.
(fhandler_*::select_write): Ditto.
(fhandler_*::select_except): Ditto.
* select.cc (UNIX_FD_ZERO): Use memset rather than bzero.
(select_stuff::test_and_set): Change return type to bool.  Allocate
select_record on entry and let fhandler_*::select_* operate on the start.next
field of select_stuff.
(pipeinf): Delete.
(select_pipe_info::select_pipe_info): New constructor.  Allocates event for
controlling pipe waits.
(select_pipe_info::~select_pipe_info): New destructor.  Destroy event.  Stop
thread.
(select_pipe_info::add_watch_handle): New function.
(thread_pipe): Wait for the hEvent part of any overlapped pipes before peeking.
(start_thread_pipe): Don't allocate device_specific_pipe stuff here.  Assume
that it has been allocated earlier.
(pipe_cleanup): Rely on select_pipe_info destructor to clean up pipe
paraphenalia.
(fhandler_*::select_*): Derive select_record from new select_stuff argument.
(fhandler_pipe::select_*): Ditto.  Allocate pipe-specific field if not already
allocated.
(serialinf): Delete.
(thread_serial): serialinf -> select_serial_info.
(fhandler_base::ready_for_read): Rewrite to accommodate change in argument to
fhandler_*::select_*.
(socketinf): Delete.
(thread_socket): socketinf -> select_socket_info.
(mailslotinf): Delete.
(thread_mailslot): mailslotinf -> select_mailslot_info.
2009-06-30 21:18:44 +00:00
Christopher Faylor 840bb39798 * fhandler.cc (fhandler_base::has_ongoing_io): Accept an argument indicating
whether the overlapped event should be tested.
(fhandler_base::read_overlapped): Pass is_overlapped state to has_ongoing_io.
(fhandler_base::write_overlapped): Ditto.
* fhandler.h (fhandler_base::has_ongoing_io): Accommodate argument change.
* select.cc (peek_pipe): Ditto.
2009-06-30 14:36:11 +00:00
Corinna Vinschen 4a83803381 * net.cc (fdsock): Set default socket buffer sizes to 65520. Change
comment accordingly.
	* fhandler_socket.cc (fhandler_socket::send_internal): Set maximum
	send size to 65520 as well.
2009-06-30 10:36:40 +00:00
Christopher Faylor 9adef9ffef * select.cc (peek_pipe): Turn on (temporarily?) the experimental code which
tries to determine when a pipe is writable.
2009-06-29 14:32:58 +00:00
Christopher Faylor 7fc7ee1726 * select.cc (peek_pipe): Use has_ongoing_io() to determine if the pipe is ready
for writing rather than performing brute-force checks.
2009-06-28 19:27:15 +00:00
Christopher Faylor c81ceaefec * fhandler.h (fhandler_base::has_ongoing_io): Declare new function.
* fhandler.cc (fhandler_base::has_ongoing_io): Define new function.
(fhandler_base::read_overlapped): Use has_ongoing_io to avoid writing when
handle has not completed last I/O.
(fhandler_base::write_overlapped): Ditto.
* select.cc (peek_pipe): Be more careful about accessing hEvent field from
get_overlapped().
2009-06-28 19:23:13 +00:00
Christopher Faylor 91000b5d66 * gendef (cleanup): Rename from 'nocr'. Remove comments and trailing spaces.
* cygwin.din: Add long-needed comment describing what dll_crt0__FP11per_process
demangles to.
2009-06-28 18:23:35 +00:00
Corinna Vinschen 8d1d548fd8 * wincap.h (wincaps::has_broken_alloc_console): New element.
* wincap.cc: Implement above element throughout.
2009-06-26 15:12:06 +00:00
Corinna Vinschen 21a49eaeeb * sec_auth.cc (lsaauth): Close unused handle.
(lsaprivkeyauth): Ditto.
2009-06-25 08:22:09 +00:00
Corinna Vinschen 9ed8b4d807 * include/wtsapi32.h (WTSQueryUserToken, WTSEnumerateSessionsW,
WTSEnumerateSessionsA): Add function prototypes.
	(struct _WTS_SESSION_INFOW, struct _WTS_SESSION_INFOA): Add typedefs.
	(WTS_SESSION_INFO, PWTS_SESSION_INFO, WTSEnumerateSessions): Add
	defines dependent on UNICODE setting.
2009-06-24 10:30:07 +00:00
Corinna Vinschen e192c48eec * faq-setup.xml (faq.setup.setup-fails-on-ts): Fix another typo. 2009-06-24 07:57:03 +00:00
Corinna Vinschen f95b410d77 * faq-setup.xml (faq.setup.setup-fails-on-ts): Fix typo. 2009-06-24 07:49:37 +00:00
Corinna Vinschen f948b1050e * faq-setup.xml (faq.setup.setup-failes-on-ts): Change rebaseall to
rebase.
2009-06-23 16:16:57 +00:00
Corinna Vinschen fe0dbf69f9 * faq-setup.xml (faq.setup.setup-failes-on-ts): New FAQ entry. 2009-06-23 15:52:20 +00:00
Corinna Vinschen bc4020d725 * sec_auth.cc (get_server_groups): Ignore errors from
get_user_local_groups.
2009-06-23 10:23:16 +00:00
Corinna Vinschen d6bb3f330d * spawn.cc (spawn_guts): Don't run additional check for Win32
incompatible CWD if newargv.fixup bailed out already.
	(av::fixup): Check shell scripts for executability.
2009-06-22 15:40:59 +00:00
Corinna Vinschen d66550cae6 * new-features.sgml (ov-new1.7-misc): Add new link libs.
* setup2.sgml (setup-locale-ov): Explain locale-specific wcwidth
	feature.
2009-06-19 09:33:45 +00:00
Corinna Vinschen 1279c76b6a * path.cc (chdir): Check error conditions first. 2009-06-18 09:47:13 +00:00
Chris Sutcliffe 339dde8fe5 2009-06-16 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/stdlib.h (_wtof): Define.
2009-06-17 22:01:36 +00:00
Corinna Vinschen 3477392bd7 * fhandler_socket.cc (fhandler_socket::recv_internal): Mark WSARecvMsg
as NO_COPY.
2009-06-17 08:23:17 +00:00
Christopher Faylor 6a451dce26 * fhandler.cc (fhandler_base::read_overlapped): Use a better variable name. 2009-06-16 20:33:45 +00:00
Christopher Faylor 4844eaa5f8 * fhandler.cc (fhandler_base::read_overlapped): Preserve len when looping due
to received signal.
2009-06-16 19:05:43 +00:00
Corinna Vinschen ea3923078a * net.cc (get_flags): New static function to generate interface flags
value.
	(get_ipv4fromreg_ipcnt): New static function to fetch number of
	configured IPv4 addresses for a given NIC from registry.
	(get_ipv4fromreg): New static function to fetch configured IPv4
	addresses for a given NIC from registry.
	(get_friendlyname): New static function to generate friendly name.
	(get_hwaddr): New static function to copy hardware address.
	(get_xp_ifs): Restructure slightly.  Add code to generate IPv4 entries
	entries for interfaces which are disconnected.
2009-06-15 20:04:15 +00:00
Christopher Faylor fee56469d4 * errno.cc (errmap): Add mapping for ERROR_IO_INCOMPLETE.
* fhandler.cc (fhandler_base::fcntl): Fix comment.
(fhandler_base::wait_overlapped): Accept an optional len parameter.  Use the
len parameter when WriteFile fails with ERROR_IO_PENDING.  Make debug output
less alarming.
(fhandler_base::write_overlapped): Pass len to wait_overlapped.
* fhandler.h (fhandler_base::wait_overlapped): Add an optional argument
denoting the number of characters intended to be written.
* fhandler_tty.cc (fhandler_pty_master::close): Don't close archetype handles
when cygwin is still initializing since the handles aren't actually opened at
that point.
2009-06-14 23:42:09 +00:00
Corinna Vinschen 313c719cb8 * localtime.cc (time2): Take another stab at fixing a compiler warning. 2009-06-14 09:35:35 +00:00
Christopher Faylor b5b99c0486 * localtime.cc (time2): Take a stab at fixing a compiler warning. 2009-06-14 05:49:01 +00:00
Christopher Faylor 6a712635dd * fhandler.cc (fhandler_base::wait_overlapped): Honor nonblocking flag for
writes.  Don't reset event handle when we see a ERROR_IO_PENDING.
* sigproc.cc (stopped_or_terminated): Use bool constants for consistency.
* wait.cc (wait4): Remove nonsensical comment.
2009-06-14 05:38:55 +00:00
Corinna Vinschen 792c564b27 * fhandler_socket.cc (fhandler_socket::recv_internal): Set namelen
pointer to NULL if name pointer is NULL.  Explain why.
2009-06-13 16:13:01 +00:00
Corinna Vinschen 2476ec9bdf * faq-using.xml (faq.using.emacs): Update. 2009-06-12 15:16:27 +00:00
Corinna Vinschen c3d7820d5b * localtime.cc (time2): Change "spring gap" to "spring forward gap"
in comment.
2009-06-12 15:08:43 +00:00
Corinna Vinschen 7ce08eab6c * localtime.cc (time2): Add workaround for spring gap problem. Add
explaining comment.
2009-06-12 15:06:26 +00:00
Corinna Vinschen 06391373b0 * Makefile.in (SUBLIBS): Add librt.a.
(librt.a): New rule to build librt.a.
2009-06-12 10:19:36 +00:00
Corinna Vinschen bf79ee9167 Improve ChangeLog entry. Fix posix_ipc.cc copyright 2009-06-12 09:52:06 +00:00
Corinna Vinschen b32c31d117 * posix_ipc.cc (check_path): Fix typo in comment. Align naming
convention rules to Linux.  Add comment.
2009-06-12 09:50:05 +00:00
Corinna Vinschen 070a99e8aa * path.cc (oopts): Sort alphabetically, add missing "auto" and
"override" entries.
	(from_fstab_line): Handle mount points same as Cygwin itself.  Use
	"cygdrive prefix" as posix name of cygdrive prefix.
	(from_fstab): Add auto entries for /usr/bin and /usr/lib.  Add
	MOUNT_AUTOMATIC and MOUNT_IMMUTABLE flags to default root dir entry.
	Use "cygdrive prefix" as posix name of default cygdrive prefix.
	(getmntent): Allocate smaller buffers.  Align output closer to output
	of mount(1).
2009-06-10 10:42:22 +00:00
Corinna Vinschen 962082b91a * autoload.cc (GetSystemTimes): Remove.
* fhandler_proc.cc (format_proc_uptime): Use global system_info rather
	than retrieving a local copy of the SYSTEM_INFO.  Drop call to
	GetSystemTimes and retrieve SystemPerformanceInformation on all systems
	again with buffer size big enough for 64 bit systems.
	(format_proc_stat): Use global system_info rather than retrieving a
	local copy of the SYSTEM_INFO.  Retrieve SystemPerformanceInformation
	with buffer size big enough for 64 bit systems.
2009-06-09 09:45:29 +00:00
Corinna Vinschen e83d7b1835 Fix ChangeLog entry 2009-06-08 20:06:55 +00:00
Corinna Vinschen d8e551a1a7 * autoload.cc (GetSystemTimes): Define.
* fhandler_proc.cc (format_proc_uptime): Use GetSystemInfo to retrieve
	processor count.  Use GetSystemTimes when available to retrieve system
	idle time.  Improve debug output.
	(format_proc_stat): Use GetSystemInfo to retrieve processor
	count.  Improve debug output.  Ignore if SystemPerformanceInformation
	returns error.  Explain why.
2009-06-08 20:04:37 +00:00
Corinna Vinschen 3b80aa0156 * fork.cc (frok::parent): Remove ancient code erroneously flushing
stdout descriptor.
2009-06-08 19:45:39 +00:00
Corinna Vinschen c84bbb2d8f * cygerrno.h (save_errno::~save_errno): Set errno directly to avoid
flooding debug output.
2009-06-08 19:44:33 +00:00
Corinna Vinschen 590f450aa9 * path.cc (symlink_info::check): Return with error set to ENOENT if
STATUS_NO_MEDIA_IN_DEVICE is returned.
2009-06-08 15:22:52 +00:00
Christopher Faylor 71f53a2f62 * cygheap.h (mini_cygheap): New struct.
(init_cygheap): Inherit locale field via mini_cygheap.
* cygheap.cc (cygheap_at_start): Define new variable.
(cygheap): Initialize as cygheap_at_start so that locale information is always
available.
(cygheap_init): Initialize cygheap iff it is set to cygheap_at_start.
* shared_info.h (memory_init): Accommodate argument change.
* memory.cc (memory_init): Accept an argument indicating whether cygheap should
be initialized or not.
* dcrt0.cc (child_info_fork::handle_fork): Pass false to memory_init().
(child_info_spawn::handle_spawn): Ditto.
(dll_crt0_0): Pass true to memory_init when not forking or execing.
* cygheap.h (cygheap_types::HEAP_2_DLL): New enum.
* dll_init.h (dll): Remove unused namelen field.
(dll_list::load_after_fork): Accommodate change in arguments.
* dll_init.cc (dll_list::alloc): Allocate dll information in the cygwin heap.
(dll_list::detach): Free dll information from the cygwin heap.
(dll_list::load_after_fork): Use dll information in the cygwin heap directly
rather than querying parent.
* fork.cc (frok::first_dll): Delete.
(frok::child): Don't report on first_dll.  Don't pass it to load_on_fork.
(frok::parent): Don't set first_dll.
(fork): Ditto.
2009-06-08 03:53:40 +00:00
Corinna Vinschen 1866410bb8 * include/ddk/ntapi.h: Add NtXxx equivalent to ZwXxx where missing
and vice versa.
	* include/ddk/ntifs.h: Ditto.
	* include/ddk/winddk.h: Ditto.
	* lib/ntdll.def (NtPlugPlayControl, NtQueryInstallUILanguage,
	ZwPlugPlayControl, ZwQueryInstallUILanguage): Add entry points defined
	in header, but missing in lib.  Omit NT4-only entry points.
2009-06-07 11:40:09 +00:00
Corinna Vinschen cf2e7e9cbc * dll_init.cc (dll_list::alloc): Allocate memory using a section
object.  Explain why.  Drop call to GetSystemInfo, rather call
	getpagesize to get allocation granularity.  Only align to allocation
	granularity under WOW64.  Use roundup2 to align.
	(dll_list::detach): Call NtUnmapViewOfSection instead of VirtualFree.
2009-06-07 07:26:07 +00:00
Corinna Vinschen f985cc1c53 * mmap.cc: Use NtUnmapViewOfSection instead of UnmapViewOfFile
throughout for symmetry.
	(fhandler_dev_mem::munmap): Use correct process handle in call to
	NtUnmapViewOfSection.
2009-06-06 19:56:41 +00:00
Corinna Vinschen 1d95e198c1 * dll_init.h (struct dll): Set size of name element to ANYSIZE_ARRAY.
* dll_init.cc: Fix formatting.
	(dll_list::alloc): Only allocate as much memory for struct dll as
	necessary for given DLL name.
	(dll_list::load_after_fork): Only read a single page of parent memory.
	Only read more if namelen indicates that it's necessary.
2009-06-06 11:47:29 +00:00
Dave Korn 611fe46079 * winbase.h (ilockexch): Fix asm constraints.
(ilockcmpexch):  Likewise.
2009-06-05 13:53:01 +00:00
Corinna Vinschen a341aab5a5 * heap.cc (heap_init): Fix typo in comment. 2009-06-05 11:15:28 +00:00
Corinna Vinschen fbe1e28194 * fhandler_clipboard.cc: Avoid calling system_printf.
(set_clipboard): Add basic error checking.  Set errno here.  Per MSDN,
	don't call GlobalFree on data block transferred to clipboard.
	(fhandler_dev_clipboard::write): Drop setting errno after call to
	set_clipboard.
	(fhandler_dev_clipboard::read): Add basic error checking. Simplify code.
2009-06-04 17:14:53 +00:00
Corinna Vinschen 85401e530c * new-features.sgml: Add changes to console BS and Space key. 2009-06-04 15:13:40 +00:00
Corinna Vinschen 7774a4b029 * fhandler_console.cc (set_console_title): Convert title string to
wchar_t and call SetConsoleTitleW.
2009-06-04 14:59:47 +00:00
Corinna Vinschen f17f20c139 * fhandler_console.cc (fhandler_console::read): Allow Ctrl-Space to
emit a NUL byte.
2009-06-04 09:57:34 +00:00
Dave Korn b650c255ab * thread.cc (__cygwin_lock_lock): Delete racy optimisation.
(__cygwin_lock_unlock):  Likewise.
2009-06-04 01:45:05 +00:00
Corinna Vinschen b8c9d44669 * strfuncs.cc (sys_cp_mbstowcs): Fix condition. 2009-06-03 19:04:07 +00:00
Corinna Vinschen 397775c6f6 * strfuncs.cc (sys_cp_wcstombs): Implement reverse functionality
of the change to sys_cp_mbstowcs from 2009-05-30.
	(sys_cp_mbstowcs): Slightly reformat.  Fix comment to accommodate
	change to sys_cp_wcstombs.  Don't write to *ptr if dst is NULL.
2009-06-03 17:23:39 +00:00
Corinna Vinschen c48a1e46bf * fhandler_console.cc (fhandler_console::read): Convert Alt-Backspace
to \033\177 or to \377 dependent on the setting of dev_state->metabit.
2009-06-03 11:07:38 +00:00
Corinna Vinschen fa986bf9cd * path.cc (path_conv::check): Don't call set_exec for files on "noacl"
mount points.
2009-06-02 13:29:30 +00:00
Christopher Faylor e44b9069cd * strfuncs.cc (sys_cp_mbstowcs): Treat src as unsigned char *. Convert failure
of f_mbtowc into a single malformed utf-16 value.
2009-05-31 03:59:38 +00:00
Christopher Faylor 025e4859af * cygwin/include/sys/termios.h: Make default erase character "^?". 2009-05-30 17:21:22 +00:00
Christopher Faylor bfa7707bce * fhandler_console.cc (fhandler_console::read): Convert backspace key to DEL. 2009-05-30 05:51:41 +00:00
Christopher Faylor 992ddba949 * path.cc (cwdstuff::set): Rewrite previous change to properly test the end of
the buffer.
2009-05-29 20:18:50 +00:00
Christopher Faylor 9971adf5aa * path.cc (cwdstuff::set): Avoid removing a nonexistent trailing slash. 2009-05-28 05:10:03 +00:00
Christopher Faylor 1ccd407d79 Change explicitely to explicitly throughout. 2009-05-27 02:30:42 +00:00
Christopher Faylor 0a20e5a02b * net.cc (gethostby_helper): Use correct signedness. 2009-05-20 14:56:46 +00:00
Christopher Faylor 6b4d6adebd * mount.cc (mount_info::add_item): Avoid using any-old '/' as indicating root. 2009-05-19 00:42:35 +00:00
Christopher Faylor 3fdcac0b1c * mount.cc (mount_info::got_usr_bin): Mark as NO_COPY.
(mount_info::got_usr_lib): Ditto.
(mount_info::root_idx): Ditto.
2009-05-18 04:58:21 +00:00
Corinna Vinschen 0a23799aee * cygpath.cc (codepage): New variable.
(long_options): Add --codepage option.
	(options): Add -C option.
	(usage): Add -C/--codepage description.
	(my_wcstombs): New function.  Use througout instead of wcstombs.
	(do_options): Handle -C/--codepage option.
	* utils.sgml (cygpath): Add description for new -C/--codepage option.
2009-05-17 11:16:12 +00:00
Corinna Vinschen 48829c1d86 * Makefile.in (cygpath.exe): Link against cygwin.a before linking
against ntdll.dll to avoid linking symbols defined in both DLLs
	from ntdll.
	(ps.exe): Ditto.
2009-05-16 15:46:42 +00:00
Corinna Vinschen 7aa710a782 * setup2.sgml (setup-locale-console): Disable section for now. 2009-05-15 12:16:01 +00:00
Corinna Vinschen 73535010d7 * cygpath.cc (main): Only setlocale for LC_CTYPE category. Fallback
to UTF-8 if locale is "C".
	* ldd.cc (main): Ditto.
	* mkgroup.c (main): Ditto.
	* mkpasswd.c (main): Ditto.
	* passwd.c (main): Ditto.
2009-05-15 11:30:18 +00:00
Corinna Vinschen a972ea99d5 * wchar.h (sys_mbstowcs): Add missing __stdcall attribute. 2009-05-15 11:27:41 +00:00
Corinna Vinschen 6f401eccfb * cygheap.cc (cygheap_init): Set Cygwin default locale values.
* cygheap.h (struct cygheap_locale): New structure.
	(struct user_heap_info): Add cygheap_locale member locale.
	* dcrt0.cc (dll_crt0_1): Revert to calling _setlocale_r so that only
	the applications locale is reverted to "C".
	* environ.cc (environ_init): Remove unused got_lc variable.
	* fhandler.h (class dev_console): Remove now unsed locale variables.
	* fhandler_console.cc (fhandler_console::get_tty_stuff): Remove
	setting dev_console's locale members.
	(dev_console::con_to_str): Use internal locale settings.  Default to
	__ascii_wctomb if charset is "ASCII".
	(fhandler_console::write_normal): Ditto.
	* strfuncs.cc (__ascii_wctomb): Drop declaration.
	(__db_wctomb): Use fixed value 2 instead of not
	necessarily matching MB_CUR_MAX.
	(__eucjp_wctomb): Use 3 instead of MB_CUR_MAX.
	(sys_cp_wcstombs): Remove special case for "C" locale.
	(sys_wcstombs): Implement here.  Use internal locale data stored on
	cygheap.
	(sys_cp_mbstowcs): Remove special case for "C" locale.
	(sys_mbstowcs): Implement here.  Use internal locale data stored on
	cygheap.
	* syscalls.cc (internal_setlocale): New function to set cygheap locale
	data and to reset CWD posix path.
	(setlocale): Just call internal_setlocale from here if necessary.
	* wchar.h (__ascii_wctomb): Declare.
	(sys_wcstombs): Don't define inline, just declare.
	(sys_mbstowcs): Ditto.
2009-05-14 19:49:37 +00:00
Christopher Faylor ef5da523a9 * mount.cc (mount_info::init): Remove MOUNT_CYGWIN_EXEC setting when
auto-mounting /usr/bin.
2009-05-14 14:44:31 +00:00
Corinna Vinschen e8d534d51a * faq-setup.xml (faq.setup.upgrade-mountpoints): New entry.
* faq-using.xml (faq.using.directory-structure): Align example to
	latest mount output.
	* pathnames.sgml (mount-table): Add note about upgrade helper scripts
	to create /etc/fstab and /etc/fstab.f/${USER}.
2009-05-14 11:03:43 +00:00
Corinna Vinschen 3106abf042 * new-features.sgml: Add automounting of /, /usr/bin, and /usr/lib.
* pathnames.sgml (pathnames-intro): Be more verbose about POSIX and
	Win32 paths.
	(mount-table): Add "auto" flag.  Add a paragraph about /usr/bin and
	/usr/lib.
	(pathnames-mount-ex): Enhance flags output.
2009-05-14 10:03:25 +00:00
Corinna Vinschen f7c246620d * mount.cc (oopts): Add a no-op "auto" option.
(mount_info::create_root_entry): Set root dir to MOUNT_IMMUTABLE rather
	than to MOUNT_OVERRIDE.
2009-05-14 09:56:45 +00:00
Christopher Faylor e951743709 cygwin ChangeLog
2009-05-13  Corinna Vinschen  <corinna@vinschen.de>
	    Christopher Faylor  <me+cygwin@cgf.cx>

	* mount.cc (mount_info::got_usr_bin): Define.
	(mount_info::got_usr_lib): Ditto.
	(mount_info::root_idx): Ditto.
	(mount_info::create_root_entry): Create root entry as immutable and
	flag as automatic.
	(mount_info::init): Remove "Huh?  No /etc/fstab..." warning.
	Unconditionally call from_fstab for user and system tables.  Fill in
	/usr/bin and /usr/lib if they have not been specified in /etc/fstab.
	(oopts): Alphabetize.  Add "override" option to allow overriding
	immutable mount points.
	(mount_info::add_item): Accommodate new MOUNT_IMMUTABLE flag intended
	for root mount.
	(mount_info::add_item): Detect "/usr/bin", "/usr/lib", and "/" and set
	appropriate global state.
	(fillout_mntent): Add ,auto to mount points added by Cygwin DLL.
	(mount): Remove masking of MOUNT_SYSTEM.  Allow user to shoot
	themselves.  Add comment.
	* mount.h (mount_info::got_usr_bin): Declare.
	(mount_info::got_usr_lib): Ditto.
	(mount_info::root_idx): Ditto.
	* include/sys/mount.h: Reformat enum.
	Add MOUNT_{OVERRIDE,IMMUTABLE,AUTOMATIC}.

doc ChangeLog
2009-05-13  Corinna Vinschen  <corinna@vinschen.de>
	    Christopher Faylor  <me+cygwin@cgf.cx>

	* pathnames.sgml (mount-table): Sort mount options and add override
	option.  Add description of root mount handling.

utils ChangeLog
2009-05-13  Corinna Vinschen  <corinna@vinschen.de>
	    Christopher Faylor  <me+cygwin@cgf.cx>

	* mount.cc (oopts): Sort.  Add override option.  Add dummy "auto"
	option for consistency.
	(mount_entries): Avoid adding auto-mounted entries to -m output.

	* utils.sgml: Sort mount options.  Add description of override option.
2009-05-14 03:25:45 +00:00
Corinna Vinschen 40c66067fb * pathnames.sgml (pathnames-unusual): Talk about using UTF-8 in C
locale.
	* setup2.sgml (setup-locale-problems): Ditto.
2009-05-13 15:11:39 +00:00
Corinna Vinschen b6c6ea43f3 * cygheap.h (cwdstuff): Convert to class. Make posix and dir private.
(cwdstuff::get_posix): New method.
	(cwdstuff::reset_posix): New method.
	* dcrt0.cc (dll_crt0_1): Call setlocale rather than _setlocale_r.
	* environ.cc (environ_init): Ditto.  Prefer "C" locale over current
	codepage default locale.
	* path.cc (chdir): Use cwdstuff::get_posix method instead of accessing
	cwdstuff::posix directly.
	(cwdstuff::set): Defer creating posix path to first usage.
	(cwdstuff::get_posix): Create posix path if it's empty, and return it.
	(cwdstuff::get): Create posix path if it's empty.
	* strfuncs.cc (sys_cp_wcstombs): Use UTF-8 conversion in the "C"
	locale.
	(sys_cp_mbstowcs): Ditto.
	* syscalls.cc (gen_full_path_at): Fetch CWD posix path locked.
	(setlocale): Implement here.  Reset CWD posix path.
2009-05-13 15:00:06 +00:00
Corinna Vinschen 46777e0a3d * Makefile.in: Link ps.exe agains ntdll.dll.
* ps.cc (main): Enable SE_DEBUG_NAME privilege if Windows processes
	have to be enumerated.  Workaround EnumProcessModules problem when
	running under WOW64 and use NtQueryInformationProcess to fetch
	process image name.
2009-05-11 14:01:17 +00:00
Christopher Faylor 5aaaadc0e5 * cygwin/version.h (CYGWIN_VERSION_CYGWIN_CONV): New define. 2009-05-09 20:16:06 +00:00
Corinna Vinschen 9b98d6a8fb * dtable.cc (dtable::init_std_file_from_handle): Add workaround for
Windows 7 64 bit issue.  Add lengthy comment to explain what happens.
	* wincap.h (wincaps::has_console_handle_problem): New element.
	* wincap.cc: Implement above element throughout.
	(wincap_7): New wincaps structure for NT 6.1 kernels.
	(wincapc::init): Set has_console_handle_problem to false for 32 bit
	systems.

	Fix broken older ChangeLog entry.
2009-05-09 15:56:37 +00:00
Corinna Vinschen a22af4a956 * sec_auth.cc (str2uni_cat): Move from here...
* path.cc (str2uni_cat): ...to here.  Simplify.  Make static inline.
	(get_nt_native_path): Use RtlAppendUnicodeToString rather than
	str2uni_cat for constant strings for speed.
	* security.h (str2uni_cat): Drop declaration.
2009-05-09 15:08:16 +00:00
Corinna Vinschen 4dff3fed7d * strfuncs.cc (sys_cp_wcstombs): save and restore previous errno value.
(sys_cp_mbstowcs): Ditto.
2009-05-08 20:28:20 +00:00
Corinna Vinschen 0e6edb13c6 * strfuncs.cc (sys_cp_wcstombs): Set errno to 0 before converting
wide char to SO/UTF-8 sequence.
2009-05-08 19:38:33 +00:00
Corinna Vinschen 415867c378 * include/sys/select.h: Guard definitions with __USE_W32_SOCKETS as
the accompanying fd_set definitions in newlib's sys/types.h.
2009-05-08 10:54:58 +00:00
Christopher Faylor 6f5b891b7b * fhandler_console.cc (fhandler_console::ioctl): Properly treat TIOCLINUX
argument as a char.
* fhandler_tty.cc (fhandler_tty_slave::ioctl): Use coercion to properly set
char value.
2009-05-06 17:16:33 +00:00
Corinna Vinschen 967c052689 * Move ChangeLog entry. 2009-05-06 12:08:07 +00:00
Corinna Vinschen eed691a929 * libc/minires.c (scanline): Fix type in calls to ctype functions
to stay in unsigned char range for char values >= 0x80.
	* regex/regcomp.c: Ditto, throughout.
	* regex/regex2.h (ISWORD): Ditto.
2009-05-06 12:03:34 +00:00
Corinna Vinschen e1de7bfabd * faq-setup.xml: Fix entry explaing how the homedir is evaluated
according to recent change.
2009-05-06 12:02:51 +00:00
Corinna Vinschen 05e6f7b2b9 * mkpasswd.c (current_user): Don't use HOMEDRIVE/HOMEPATH to generate
user's homedir.

	* mkgroup.c: Accommodate ctype changes.
	* mkpasswd.c: Ditto.
	* setfacl.c: Ditto.
	* ssp.c: Ditto.
2009-05-06 11:54:24 +00:00
Corinna Vinschen 764d88e4a7 * cygheap.cc (cygheap_init): Set umask to a sane default.
* uinfo.cc (cygheap_user::ontherange): Don't use HOMEDRIVE/HOMEPATH
	to set HOME.  Default to /home/USERNAME.
2009-05-06 11:52:20 +00:00
Christopher Faylor 3227665e19 * cygcheck.cc (find_app_on_path): Avoid using NULL pointer if find_on_path
doesn't find the app on the path.
2009-05-04 18:51:08 +00:00
Corinna Vinschen 143cb0bed5 * cygcheck.cc (usage): Fix option order and print. 2009-05-04 10:15:48 +00:00
Corinna Vinschen 9d86c13dbb * security.cc (set_file_sd): Drop using FILE_OPEN_FOR_RECOVERY flag in
call to NtOpenFile.
	* exceptions.cc (open_stackdumpfile): Ditto in call to NtCreateFile.
	* fhandler.cc (fhandler_base::open): Ditto.  Simplify setting
	create_options.

	* mount.cc (fs_info::update): Recognize offline storage.
	(fillout_mntent): Report UDF and offline storage.
	* mount.h (class fs_info): Add is_csc_cache status flag.
2009-05-04 09:16:42 +00:00
Christopher Faylor 56a4d31a7f * fhandler_console.cc (fhandler_console::write_console): Eliminate unneeded
debugging output.
(fhandler_console::write_normal): Eliminate unneeded __seterrno.
2009-05-04 04:43:50 +00:00
Christopher Faylor b7a1552440 * libc/minires.c (scanline): Accommodate ctype changes which disallow use of an
unadorned char argument to is* macros.
* regex/regcomp.c: Ditto, throughout.
* regex/regex2.h (ISWORD): Ditto.
2009-05-04 04:30:37 +00:00
Christopher Faylor b65ec404a7 * fhandler.h (fhandler_console::MAX_WRITE_CHARS): Declare.
(fhandler_console::write_replacement_char): Declare as inline.
(fhandler_console::write_console): Declare new function.
* fhandler_console.cc (fhandler_console::MAX_WRITE_CHARS): Define.
(handler_console::write_console): Define.
(fhandler_console::write_replacement_char): Define as inline.
(fhandler_console::write_normal): Use write_console when writing buffers of
unknown length.
2009-05-04 03:51:16 +00:00
Chris Sutcliffe 1f5ea7a0db 2009-05-01 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/shellapi.h (SHIL_LARGE, SHIL_SMALL, SHIL_EXTRALARGE,
        SHIL_SYSSMALL, SHIL_JUMBO, SHIL_LAST SHIL_JUMBO, SHGetImageList): Define.
        * lib/shell32.def (SHGetImageList): Define.
2009-05-02 01:46:36 +00:00
Christopher Faylor a8fdf91d85 * include/cygwin/socket.h: Define SOL_IPV6. 2009-04-27 04:31:22 +00:00
Christopher Faylor 08825b6edc * strace.cc (create_child): Set CYGWIN=noglob when starting new process so that
Cygwin will leave already-parsed the command line alonw.
2009-04-22 19:08:53 +00:00
Corinna Vinschen 27378802ea * ctype.cc (__set_ctype): Copy exact part of the current active
character class array.
2009-04-21 20:10:55 +00:00
Corinna Vinschen 5698171a3f * flock.cc (lf_setlock): Handle border case which results in WFMO loop
exiting with ret == WAIT_TIMEOUT gracefully.  Add a system_printf to
	uncover other potential problems with WFMO loop.
2009-04-20 17:13:19 +00:00
Christopher Faylor b978c43ea0 * mkimport: Specify .text for stub explicitly.
* speclib: Add a dummy '.idata$7' section referring to the dll associated with
the real import library.
2009-04-18 17:23:45 +00:00
Corinna Vinschen 855762d6f4 * dcrt0.cc (globify): Only call mbtowc for non-ascii chars. 2009-04-18 11:08:37 +00:00
Corinna Vinschen 0351fbd504 * dcrt0.cc (globify): Make multibyte-aware. 2009-04-17 14:51:44 +00:00
Corinna Vinschen a74869c027 * flock.cc (class inode_t): Add i_wait member and matching methods
wait(), unwait(), and waiting().
	(inode_t::inode_t): Initialize i_wait to 0.
	(fhandler_disk_file::lock): Only remove node if no other thread is
	waiting for a blocking lock.
	(lf_setlock): Manipulate node->i_wait to signal that a thread is
	waiting for a blocking lock in this node.
	(lf_findoverlap): Reinstantiate SELF test as in original code.
2009-04-17 13:29:08 +00:00
Corinna Vinschen 54155bc37b * dlfcn.cc (get_full_path_of_dll): Just return a bool value. Drop
local path_conv in favor of getting it as parameter.  Add local string
	buffer instead of getting it as parameter.
	(dlopen): Accommodate get_full_path_of_dll change.  Fetch WCHAR Windows
	path from path_conv variable and call LoadLibraryW.
2009-04-16 16:17:58 +00:00
Corinna Vinschen 03897d8dda * ntdll.h (STATUS_LOCK_NOT_GRANTED): Define.
* syscalls.cc (unlink_nt): Handle STATUS_LOCK_NOT_GRANTED same as
	STATUS_SHARING_VIOLATION.  Add lengthy comment to explain why.
2009-04-16 12:16:35 +00:00
Corinna Vinschen 8c3a79bb97 * cygpath.cc (do_pathconv): Only skip \\?\ prefix if it's really
given.  Do backslash to slash conversion for mixed paths after
	handling \\?\ prefix.
2009-04-15 10:00:40 +00:00
Corinna Vinschen ca027229d5 * path.cc (path_conv::get_wide_win32_path): Allow relative paths.
(cygwin_conv_path): In case of CCP_POSIX_TO_WIN_W, convert relative
	paths to absolute paths if the relative pathname length exceeds
	MAX_PATH.
2009-04-15 09:58:41 +00:00
Corinna Vinschen d370bb56c8 * libc/bsdlib.cc: Align copyright with upstream.
* libc/fnmatch.c: Ditto.
	* libc/fts.c: Ditto.
	* libc/inet_addr.c: Ditto.
	* libc/inet_network.c: Ditto.
	* libc/rcmd.cc: Ditto.
	* libc/rexec.cc: Ditto.
2009-04-15 08:20:47 +00:00
Christopher Faylor fcea4c1c3d * speclib: Really revert to using tempdir. 2009-04-14 15:10:28 +00:00
Christopher Faylor d295466636 * speclib: Revert to using tempdir. 2009-04-14 14:28:34 +00:00
Corinna Vinschen 51291d61e2 * localtime.cc (tzload): Implement setting __tzrule's offset member
using newlib's __gettzinfo () interface also when tzload returns
	successfully.
2009-04-14 12:08:07 +00:00
Dave Korn 03d59fb47d * include/stdint.h (intptr_t): Remove long from type.
(uintptr_t):  Likewise.
	(INTPTR_MIN):  Remove 'L' suffix.
	(INTPTR_MAX, UINTPTR_MAX):  Likewise.
2009-04-13 22:55:00 +00:00
Dave Korn 228f0b11fd * Makefile.in (dumper.exe): Add -lz to ALL_LDFLAGS. 2009-04-13 22:51:02 +00:00
Christopher Faylor 73bd57524a * speclib: Initial stab at cleaning up temp files. More work needed.
* mkimport: Ditto.
2009-04-12 05:11:08 +00:00
Christopher Faylor d129941aef * Makefile.in (clean): Clean globals.h.
(LIBCOS): Depend on globals.h.
2009-04-12 04:14:31 +00:00
Christopher Faylor edd090a270 * mkimport: New script to perform all operations necessary to create
libcygwin.a.
* rmsym: Delete.
* newsym: Delete.
* Makefile.in (toolopts): New variable which holds options relating to
binutils/gcc tools.
(speclib): Use toolopts.  Add symbols to avoid copying to special libraries.
(OBSOLETE_FUNCTIONS): Delete.
(NEW_FUNCTIONS): Change to represent an argument to new mkimport script.
(libcygwin.a): Use only new mkimport script to create libcygwin.a.  Only rely
on ${LIBCOS}.
(*/lib*.a): Simplify speclib dependencies.
(speclib): Accept toolchain options.  Convert every argument to absolute path.
Simplify parsing of nm output.  Accommodate new exclude option.
2009-04-12 03:19:52 +00:00
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