Corinna Vinschen [Tue, 28 Oct 2014 11:01:32 +0000 (11:01 +0000)]
* xidepend: Make PDF file dependent on the same input files as the
HTML file of the same name to trigger automatic rebuild of PDFs on
source file changes as well.
Corinna Vinschen [Tue, 28 Oct 2014 10:44:49 +0000 (10:44 +0000)]
* globals.cc (dos_file_warning): Set to false by default.
* path.cc (warn_msdos): Make static. Drop test for dos_file_warning.
(path_conv::check): Check for dos_file_warning here to avoid a function
call in the default case.
Corinna Vinschen [Mon, 27 Oct 2014 11:33:53 +0000 (11:33 +0000)]
* cygheap.cc (cygheap_fixup_in_child): Drop call to set_dll_dir.
(init_cygheap::init_installation_root): Set installation_dir_len.
(setup_cygheap): Drop call to set_dll_dir.
* cygheap.h (struct init_cygheap): Add installation_dir_len member.
(init_cygheap::set_dll_dir): Remove.
* environ.cc (win_env::add_cache): Use stpcpy for speed.
(posify_maybe): Use tmp_pathbuf buffer instead of stack.
(raise_envblock): New function to resize Windows environment block.
(build_env): Fix indentation. Call raise_envblock function. Check if
$PATH exists and is non-empty. If not, add PATH variable with Cygwin
installation directory as content to Windows environment. Explain why.
* uinfo.cc (cygheap_pwdgrp::_nss_init): Fill UNICODE_STRING members
on the fly. Drop call to RtlInitUnicodeString.
(pwdgrp::check_file): Ditto.
Corinna Vinschen [Sun, 26 Oct 2014 18:47:24 +0000 (18:47 +0000)]
* fhandler_socket.cc (fhandler_socket::af_local_connect): Drop
setting connect_state to connect_credxchg.
(fhandler_socket::af_local_accept): Ditto.
(fhandler_socket::recv_internal): Drop ill-advised connect_state check.
Add comment so as not to repeat the exercise.
* fhandler.h (enum conn_state): Drop now unneeded connect_credxchg
state.
Corinna Vinschen [Wed, 22 Oct 2014 20:04:42 +0000 (20:04 +0000)]
* Makefile.in: Create install targets.
(cygwin-ug-net/cygwin-ug-net.pdf): Create subdir to allow building PDF
even if subdir is missing.
(cygwin-api/cygwin-api.pdf): Ditto.
* configure.ac: Add AC_PROG_INSTALL rule.
* configure: Regenerate.
* new-features.xml (ov-new1.7.33): Add installation of docs.
Corinna Vinschen [Fri, 17 Oct 2014 14:36:59 +0000 (14:36 +0000)]
* cygheap.cc (cygheap_fixup_in_child): Call set_dll_dir.
(init_cygheap::init_installation_root): Just memmove contents of
installation_root instead of calling GetModuleFileNameW again.
Copy installation_root to installation_dir before stripping of
"bin" dir. Don't call SetDllDirectory here. Explain what we do.
(setup_cygheap): New function taking over initial cygheap setup
from memory_init. Additionally call set_dll_dir.
* cygheap.h (struct init_cygheap): Add installation_dir member.
(init_cygheap::set_dll_dir): Define.
(setup_cygheap): Declare.
* dcrt0.cc: Throughout drop parameter from memory_init call.
(dll_crt0_0): Call setup_cygheap prior to memory_init.
* dlfcn.cc (dlopen): Change comment to point to the right function.
* shared.cc (memory_init): Drop parameter. Drop cygheap setup.
* shared_info.h (memory_init): Change declaration accordingly.
Corinna Vinschen [Tue, 14 Oct 2014 19:14:33 +0000 (19:14 +0000)]
* cygheap.cc (init_cygheap::init_installation_root): Install Cygwin's
installation dir as DLL search path, instead of ".".
* cygheap.h (class cwdstuff): Add parameter names in function
declarations for readability.
(cwdstuff::get): Ad inline implementation fetching the CWD as wide char
string.
* dlfcn.cc (dlopen): Add searching for dependent DLLs in DLL
installation dir or CWD, if all else failed.
Add comment to explain scenarios this is accommodating.
Corinna Vinschen [Tue, 14 Oct 2014 19:08:27 +0000 (19:08 +0000)]
* fhandler_socket.cc (fhandler_socket::connect): Init connect_state to
connect_pending only on unconnected socket. Set connect_state to
connected on WSAEISCONN error. Set connect_state to connect_failed
on any other error except WSAEWOULDBLOCK if connect is still pending.
Add lots of comment to explain why all of the above.
Corinna Vinschen [Sun, 12 Oct 2014 19:03:52 +0000 (19:03 +0000)]
* dlfcn.cc (set_dl_error): Drop useless __stdcall.
(check_path_access): Ditto. Drop FE_CWD from call to find_exec.
(gfpod_helper): Call path_conv::check for all paths containing a dir
separator to more closely follow the Linux search algorithm.
(get_full_path_of_dll): Drop useless __stdcall.
(dlopen): Simplify RTLD_NOLOAD case by calling GetModuleHandleEx
instead of GetModuleHandle/LoadLibrary.
Corinna Vinschen [Sat, 11 Oct 2014 18:28:04 +0000 (18:28 +0000)]
Add setsockopt(sd, SOL_SOCKET, SO_PEERCRED, NULL, 0) to disable
initial handshake on AF_LOCAL sockets.
* fhandler.h (class fhandler_socket): Add no_getpeereid status flag.
(fhandler_socket::af_local_set_no_getpeereid): New prototype.
* fhandler_socket.cc (fhandler_socket::af_local_connect): Skip handshake
if no_getpeereid is set. Add debug output.
(fhandler_socket::af_local_accept): Likewise.
(fhandler_socket::af_local_set_no_getpeereid): New function.
(fhandler_socket::af_local_copy): Copy no_getpeereid.
(fhandler_socket::getpeereid): Fail if no_getpeereid is set.
* net.cc (cygwin_setsockopt): Add SO_PEERCRED for AF_LOCAL/SOCK_STREAM
sockets. Add comment to explain why we need it.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
Corinna Vinschen [Sat, 11 Oct 2014 16:37:29 +0000 (16:37 +0000)]
* fhandler_socket.cc (fhandler_socket::af_local_connect): Drop outdated
comment.
(fhandler_socket::evaluate_events): Only set connect_state and call
af_local_connect if connect_state is connect_pending. Explain why.
Drop redundant test for socket family and type.
(fhandler_socket::connect): Extend comment.
Corinna Vinschen [Sat, 11 Oct 2014 12:14:29 +0000 (12:14 +0000)]
* fhandler_socket.cc (fhandler_socket::evaluate_events): Handle
connect_state and af_local_connect connect call here, once, independent
of FD_CONNECT being requested. Add comment to explain why.
(fhandler_socket::connect): Drop connect_state handling and calling
af_local_connect. Move remaining AF_LOCAL stuff prior to calling
::connect and explain why. Simplify error case.
* poll.cc (poll): Handle connect state independently of POLLOUT being
requested for the descriptor to allow setting POLLIN if connect failed.
Add comment.
* select.cc (set_bits): Drop connect_state and AF_LOCAL handling here.
* fhandler_procsys.cc (fhandler_procsys::readdir): Just test
ObjectTypeName for object types rather than calling lstat to avoid
performance hit.
* globals.cc (ro_u_natdir): Define.
(ro_u_natsyml): Define.
(ro_u_natdev): Define.
Jeff Johnston [Thu, 11 Sep 2014 21:55:01 +0000 (21:55 +0000)]
2014-09-11 Freddie Chopin <freddie_chopin@op.pl>
* libc/time/month_lengths.c: New file with __month_lengths array
(previously mon_lengths array in mktm_r.c)
* libc/time/tzcalc_limits.c: New file with __tzcalc_limits() from
mktm_r.c
* libc/time/lcltime_r.c (localtime_r): Simplify by changing call to
_mktm_r() with call to gmtime_r() and code moved from _mktm_r() which
was used to do time zone adjustments
* libc/time/gmtime_r.c (gmtime_r): Simplify by moving all relevant
code from _mktm_r(), breaking all dependencies on time zone related
functions
* libc/time/mktm_r.c: Delete file
* libc/time/local.h: Update accordingly - remove declaration of
_mktm_r(), add declaration of __month_lengths[]
* libc/time/Makefile.am: Modify accordingly.
* libc/time/Makefile.in: Regenerate.