Corinna Vinschen
2599a694a6
* 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.
2014-10-14 19:08:27 +00:00
DJ Delorie
34e2edb76a
merge from gcc
2014-10-14 18:02:03 +00:00
Corinna Vinschen
6a56366a9e
* net.cc (cygwin_setsockopt): Drop redundant test for AF_LOCAL and
...
SOCK_STREAM in SO_PEERCRED case, as in the original patch.
2014-10-13 08:18:18 +00:00
Corinna Vinschen
7563a26d9b
* dlfcn.cc (gfpod_helper): Only check for POSIX dir separator, same as
...
in get_full_path_of_dll.
2014-10-12 19:14:07 +00:00
Corinna Vinschen
57cd3486e6
* 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.
2014-10-12 19:03:52 +00:00
Corinna Vinschen
697b9afe00
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.
2014-10-11 18:28:04 +00:00
Corinna Vinschen
a85ab1d482
* 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.
2014-10-11 16:37:29 +00:00
Corinna Vinschen
2483fa2719
* 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.
2014-10-11 12:14:29 +00:00
Corinna Vinschen
9f64fd8081
* fhandler_socket.cc (fhandler_socket::evaluate_events): Slightly
...
rearrange code. Rephrase a comment.
2014-10-11 10:50:36 +00:00
Corinna Vinschen
3ab591cf71
* dlfcn.cc (dlopen): Disable old 32 bit code on 64 bit.
...
* dcrt0.cc (check_sanity_and_sync): Ditto.
* dll_init.cc (dll_dllcrt0_1): Fix typo in comment.
2014-10-10 15:29:18 +00:00
Corinna Vinschen
7a84e9c4bc
* libc/include/_ansi.h: _LONG_LONG_TYPE definition removed.
...
* libc/include/math.h: _LONG_LONG_TYPE replaced by "long long".
Guards for C99 and C++11 functions fixed.
* libc/include/stdlib.h: Guards for C99 and C++11 functions fixed.
2014-10-10 14:43:19 +00:00
Corinna Vinschen
f49469bb1e
* 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.
2014-10-09 17:45:27 +00:00
Jeff Johnston
50f799240e
2014-10-09 Sebastian Huber <sebastian.huber@embedded-brains.de>
...
* libc/include/stdint.h: Include <sys/_intsup.h>.
(__STDINT_EXP): Delete.
(__have_long32): Likewise.
(__have_long64): Likewise.
(__have_longlong64): Likewise.
* libc/include/sys/_intsup.h: New file.
(__STDINT_EXP): Move from libc/include/stdint.h.
(__have_long32): Likewise.
(__have_long64): Likewise.
(__have_longlong64): Likewise.
* libc/include/inttypes.h: Include <sys/_intsup.h>.
(__INTTYPES_EXP): Delete and use __STDINT_EXP() instead.
2014-10-09 15:57:50 +00:00
Corinna Vinschen
0613efefc7
* fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Set d_type
...
for virtual directories.
2014-10-09 13:32:59 +00:00
Corinna Vinschen
54338f169f
* fhandler_proc.cc (fhandler_proc::readdir): Set dirent d_type.
...
* fhandler_process.cc (fhandler_process::readdir): Ditto.
* fhandler_procnet.cc (fhandler_procnet::readdir): Ditto.
* fhandler_procsys.cc (fhandler_procsys::readdir): Ditto.
* fhandler_procsysvipc.cc (fhandler_procsysvipc::readdir): Ditto.
* fhandler_virtual.h (virt_ftype_to_dtype): Define new inline function
to generate dirent d_type from virtual_ftype_t.
2014-10-09 13:24:37 +00:00
Corinna Vinschen
633cf9b5dd
* libc/string/memccpy.c (memccpy): Fix warning about signed-unsigned
...
comparison
* libc/string/memchr.c (memchr): Ditto.
* libc/string/memrchr.c (memrchr): Ditto.
* libc/string/memset.c: (memset): Ditto.
* libc/string/rawmemchr.c (rawmemchr): Ditto.
* libc/string/local.h (__locale_cjk_lang): Fix "function declaration
isn't a prototype" warning.
* libc/string/strcasestr.c (strcasestr): Ditto.
* libc/string/u_strerr.c (_user_strerror): Fix "unused parameter"
warnings.
* libc/string/rawmemchr.c (rawmemchr): Fix comment type
"// ..." -> "/* ... */".
2014-10-09 12:24:56 +00:00
Corinna Vinschen
657ca84427
Add accidentally missing ChangeLog for latest change.
2014-10-09 08:31:34 +00:00
Steve Ellcey
ca86eee8de
2014-10-08 Steve Ellcey <sellcey@mips.com>
...
* newlib/libc/machine/mips/strcmp.c: Remove.
* newlib/libc/machine/mips/strcmp.S: New.
* newlib/libc/machine/mips/Makefile.am (lib_a_SOURCES):
Replace strcmp.c with strcmp.S
* newlib/libc/machine/mips/Makefile.in: Regenerate.
2014-10-08 22:29:52 +00:00
Corinna Vinschen
da77c6d1e5
* libc/include/string.h (ffsl): Declare as GNU function.
...
(ffsll): Ditto.
2014-10-08 21:04:59 +00:00
Corinna Vinschen
d326f841c3
* common.din (ffsl): Export.
...
(ffsll): Export.
* syscalls.cc (ffs): Implement using GCC intrinsic.
(ffsl): Ditto.
(ffsll): Ditto.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2014-10-08 21:03:40 +00:00
Corinna Vinschen
2fb56bbfaa
* syscall.cc (ffs): Fix crash of ffs (0x80000000) on 64 bit.
2014-10-08 16:34:31 +00:00
Corinna Vinschen
2bf7d695ea
* fhandler_process.cc (format_process_statm): Fix output of dirty
...
pages. Add linefeed.
2014-10-08 15:25:52 +00:00
Corinna Vinschen
ee97a4e332
Fix typo
2014-10-08 14:41:44 +00:00
DJ Delorie
34fbc9859c
merge from gcc
2014-09-28 17:46:07 +00:00
Nick Clifton
c30356443e
* configure.in: Remove config_libnosys=false
...
* configure: Regenerated.
* msp430/nosyscalls.S: Rename to ciosyscalls.S
* msp430/Makefile.in: Change LIBNOSYS to LIB_CIO.
2014-09-22 15:26:46 +00:00
Jeff Johnston
99eb60455b
2014-09-17 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/include/sys/features.h: Add __NEWLIB__ and
__NEWLIB_MINOR__ macros.
2014-09-17 22:20:16 +00:00
Jeff Johnston
ad9ed96b6b
2014-09-17 Joel Sherrill <joel.sherrill@oarcorp.com>
...
Thomas Uhle <thomas.uhle@eas.iis.fraunhofer.de>
* libc/include/string.h: Correct guard for strnlen().
2014-09-16 19:59:01 +00:00
Jeff Johnston
3158e7d674
2014-09-15 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/time/month_lengths.c: Fix to define __month_lengths.
2014-09-15 16:05:37 +00:00
Jeff Johnston
78a52749b2
2014-09-12 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/time/tzcalc_limits.c: Fix __months_lengths reference.
2014-09-12 21:41:46 +00:00
Jeff Johnston
43b3310bc9
2014-09-12 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/time/month_lengths.c: Actually add file this time.
* libc/time/tzcalc_limits.c: Ditto.
2014-09-12 16:38:10 +00:00
Jeff Johnston
c9dded6775
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.
2014-09-11 21:55:01 +00:00
Jeff Johnston
1c5ab1f862
2014-09-08 Freddie Chopin <freddie_chopin@op.pl>
...
* libc/machine/arm/Makefile.am: Fix typo.
* libc/machine/arm/Makefile.in: Regenerated.
2014-09-08 18:57:52 +00:00
Corinna Vinschen
6e16a3169f
* pathnames.xml (cygdrive): Add /proc/cygdrive description.
2014-09-05 19:40:39 +00:00
Corinna Vinschen
f207699a53
* fhandler_proc.cc (proc_tab): Add entry for cygdrive symlink.
...
(format_proc_cygdrive): New function to implement /proc/cygdrive.
2014-09-05 19:11:01 +00:00
Jeff Johnston
c8a01afd97
2014-09-05 Hale Wang <hale.wang@arm.com>
...
* libc/machine/arm/memchr.S: Clean up the wrapper.
* libc/machine/arm/memcpy.S: Likewise.
* libc/machine/arm/memchr-stub.c: Delete this redundant file.
* libc/machine/arm/memcpy-stub.c: Likewise.
* libc/machine/arm/strcmp.S: Add speed-preferred wrapper.
* libc/machine/arm/strlen.S: Likewise.
* libc/machine/arm/Makefile.am: Add dependencies.
* libc/machine/arm/Makefile.in: Regenerated.
* libc/machine/arm/configure.in: Add dependencies.
* libc/machine/arm/configure: Regenerated.
2014-09-05 17:26:42 +00:00
Corinna Vinschen
bea3ef947a
* exception.h (class exception): Remove unnecessary #ifdef.
...
* uinfo.cc (client_request_pwdgrp::client_request_pwdgrp): Fix length
counter to include trailing NUL.
* sec_auth.cc (get_user_groups): Add experimental exception handler.
(get_user_local_groups): Ditto.
2014-09-05 11:47:33 +00:00
Corinna Vinschen
acc511d184
* uinfo.cc (pwdgrp::fetch_account_from_windows): Handle APPLICATION
...
PACKAGE AUTHORITY SIDs.
* winlean.h (DNLEN): Raise to 31. Explain why.
2014-09-05 09:46:26 +00:00
Corinna Vinschen
e7565f1088
* libc/stdio/findfp.c (_cleanup_r): Call _fflush_r when configuration
...
option "--enable-lite-exit" is in effect. Refactor the code.
2014-09-05 09:42:15 +00:00
Corinna Vinschen
1ec7de7271
* libc/stdio/fwalk.c (_fwalk_reent): Remove redundant test.
2014-09-05 09:31:32 +00:00
Corinna Vinschen
a015d9b507
Add missing libc/machine/arm/aeabi_memcpy.c file
2014-09-05 08:42:45 +00:00
Corinna Vinschen
9adec6fd79
* libc/time/mktm_r.c (_mktm_r): Optimize speed.
2014-09-04 09:47:14 +00:00
Corinna Vinschen
7d407cb678
Add missing libc/machine/arm/aeabi_memcpy-armv7a.S file
2014-09-04 08:27:35 +00:00
Corinna Vinschen
f9bafa4640
* libc/time/clock.c (clock): Fix warnings about signed-unsigned
...
comparisons.
* libc/time/strftime.c (strftime): Likewise.
* libc/time/strptime.c (match_string): Fix warning about discarding
'restrict' qualifier from pointer target type.
2014-09-04 08:27:03 +00:00
Corinna Vinschen
4a9103c410
* libc/machine/arm/aeabi_memcpy.c: New file.
...
* libc/machine/arm/aeabi_memcpy-armv7a.S: New file.
* libc/machine/arm/Makefile.am: Add dependencies.
* libc/machine/arm/Makefile.in: Regenerated.
2014-09-04 08:23:23 +00:00
Corinna Vinschen
e5110581dc
* sec_acl.cc (aclcheck32): Check for required default entries as well.
...
Enable check for missing CLASS_OBJ entries, now that setfacl creates
them.
2014-09-03 12:46:19 +00:00
Corinna Vinschen
ef1e66cfbf
* setfacl.c (addmissing): New function to add missing acl entries to
...
a modified acl per the rules set by aclcheck.
(setfacl): Call addmissing unless action is Delete.
2014-09-03 12:44:05 +00:00
Corinna Vinschen
3e61dde3f1
* utils.xml (setfacl): Align documentation to help text in setfacl.
2014-09-03 09:34:10 +00:00
Corinna Vinschen
451e1f4879
* setfacl.c (getaclentry): Fix previous fix again. Allow lone 'm' as
...
well as any lone default entry if action is Delete. Fix comments.
(usage): Align usage text.
2014-09-03 09:32:53 +00:00
Corinna Vinschen
89d195a7d1
* setfacl.c (getaclentry): Fix return value in case of a lone 'm' if
...
action is Delete. Drop requirement for a trailing colon if action is
Delete.
2014-09-03 08:57:20 +00:00
Corinna Vinschen
7a1cf1a003
* sec_acl.cc (aclsort32): Set errno to EINVAL if aclcheck32 failed.
2014-09-02 20:07:21 +00:00