1) doesn't do byte compares to find which byte matched
2) doesn't do byte compares if any top bits are set
3) doesn't use a loop when the input is misaligned
4) has less mispredicted branches
Passes regression tests and 'build.sh' doesn't explode (and more than usual).
Remove the 'answers' section from the test definition, instead use our
own version of strchr() to determine the what the answer should be.
On error report which test we are doing, and the answer we got.
If symbol "test_strchr" exists, test that function instead of strchr().
(With a very dodgy strchr() other things fail badly.
The IP_MINTTL option may be used on SOCK_STREAM sockets to discard
packets with a TTL lower than the option value. This can be used to
implement the Generalized TTL Security Mechanism (GTSM) according to
RFC 3682.
OK'ed by christos@.
duplicate symbols for index() and rindex().
libc and kernel build ok for affected archs (i386, amd64, vax, sun3,
evbmips-eb) all seem ok.
(vax might lose an asm index() - but comments imply it is worse than the C)
For the 10 keys on the editing keypad, these prefix/postfix
scancodes indicate the state of the Left Shift and Right Shift
keys and Num Lock indicator.
This change prevents a spurious WSCONS_EVENT_KEY_UP event upon
press as well as the corresponding WSCONS_EVENT_KEY_DOWN event
upon release.
Detachment may fail after freeing some but not all resources, so
take care not to re-release any resource during detachment.
Tested on a Dell PowerEdge 1950.
If the IP_RECVTTL option is enabled on a SOCK_DGRAM socket, the
recvmsg(2) call will return the TTL of the received datagram. The
msg_control field in the msghdr structure points to a buffer that
contains a cmsghdr structure followed by the TTL value.
Modeled after FreeBSD implementation.
across setjmp/longjmp.
Inspired by PR 41255 from Kurt Lidl, but this change makes "com" a
volatile pointer to const non-volatile data, whereas the PR made it a
non-volatile pointer to const volatile data.
This variable was not actually used uninitialised, but some compilers
(e.g. gcc-4.3.3) warned that the variable might be used uninitialised.
Inspired by PR 41255 from Kurt Lidl.