io: add io_conn_fd()

Useful for getsockname().

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
cpuid: apply the 32-bit fix

Signed-off-by: Ahmed Samy <f.fallen45@gmail.com>
cpuid: avoid unions in parsing data

This is a much more cleaner way to do it and _should_ be easier for people
to use.

Signed-off-by: Ahmed Samy <f.fallen45@gmail.com>
cpuid: use a sprintf-like function to get cputype as a string

Signed-off-by: Ahmed Samy <f.fallen45@gmail.com>
cpuid: Use __asm for MSVC

MSVC only supports inline assembly and does not support the keyword
volatile for assembly.

Signed-off-by: Ahmed Samy <f.fallen45@gmail.com>
Merge branch 'master' of ozlabs.org:ccan
time: to/from sec conversions.

Trivial, but they make coding easier and more predictable.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
daemonize / daemon_with_notify: ignore Ubuntu 13.10 brain death.

Apparently init --user adopts orphans.  To quote the author
Stewart Smith:

  As much as one can be happy in Ubuntu breaking something that has been
  true for what must be approaching 40 years, yep, I'm happy for you to
  make the changes.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
io: fix port clash in test.

Both run-set_alloc and run-15-timeout used the same port, so they sometimes
got stuck when running in parallel.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
cpuid: better parser for processor info

Signed-off-by: Ahmed Samy <f.fallen45@gmail.com>
cpuid: parse additional feature information for pCPU_PROCINFO_AND_FEATUREBITS

Signed-off-by: Ahmed Samy <f.fallen45@gmail.com>
cpuid: fix for MSVC in cpuid_is_supported()

Signed-off-by: Ahmed Samy <f.fallen45@gmail.com>
cpuid: drop support for testing extended features

For now, we will just test for normal features, later on it'll be added
back.

Signed-off-by: Ahmed Samy <f.fallen45@gmail.com>
cpuid: prefix cpuid_t enums with CPUID_* instead of CPU_*

Signed-off-by: Ahmed Samy <f.fallen45@gmail.com>
list: fix list_prev and list_next on const lists.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Merge branch 'master' of ozlabs.org:ccan
cpuid: small fix for non x86-cpus

Signed-off-by: Ahmed Samy <f.fallen45@gmail.com>
cpuid: parse L1 cache information for AMD.

Also take out additional feature information from processor information
and feature bits since they can be tested using cpuid_test_feature() and
cpuid_has_feature()

Signed-off-by: Ahmed Samy <f.fallen45@gmail.com>
io: closing one side of a duplex connection closes both.

Otherwise, it's a PITA to close a duplexed connection.  If necessary we
can introduce a half-close to de-deplex later.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Merge branch 'master' of ozlabs.org:ccan