Commit Graph

10037 Commits

Author SHA1 Message Date
christos 14fcefd52e Introduce a HASH_BSIZE macro to return the blocksize; in the 64K case this
returns 0xffff to avoid overflow. This is used where sizes are stored.
2015-11-18 18:22:42 +00:00
christos 60aa2a0eb6 Account for the -1 hack to fit 0x10000 in a short in hash_page.c 2015-11-18 13:00:46 +00:00
christos 057be2c9f2 If MAX_BSIZE == hashp->BSIZE (65536) then it does not fit in a short, and
we end up storing 0... This means that every entry needs a page. We store
MAX_BSIZE - 1 here, but it would be better to always store (avail - 1) here
so that we don't waste a byte and be consistent.
2015-11-18 00:23:39 +00:00
christos 8b926f831a PR/50441: Manuel Bouyer: hash seq enumeration skips keys on big data.
XXX: pullup-7
2015-11-17 20:19:55 +00:00
christos 53ba0e3d35 revert 0b documentation. 2015-11-13 16:00:32 +00:00
christos 50ccfe1eab Generalize the test, compare on the protocol semantics instead of the name
since it could be udp6...
2015-11-13 15:23:17 +00:00
christos 6cd5630e13 Do proper accounting for the extra -1 slot. Perhaps this is too confusing
and it would be better to just access the array with [fd + 1] instead?
2015-11-13 15:22:12 +00:00
tron 25c8e9abea Remove now unnecessary cast. 2015-11-13 11:43:26 +00:00
tron 7655e3065e Don't try to use listen(2) on a UDP socket which will always fail.
Previously this was not a problem because the return value of listen(2)
was ignored. With this fix amd(8) no longer fails to start with the
error message "cannot create rpc/udp service".

TL;DR: Make amd(8) work again
2015-11-13 11:23:08 +00:00
tron 65a6071730 Avoid broken state if realloc(3) fails. 2015-11-13 10:43:32 +00:00
wiz 594b3ba9a8 Remove trailing whitespace. 2015-11-13 09:50:31 +00:00
christos 6ea48155ff Now that our source tree has binary constants, recognize them. 2015-11-12 17:30:03 +00:00
christos f5dda10488 fix compilation/lint 2015-11-10 20:56:20 +00:00
christos 9a91ff6ff5 CID 1338520: Check NULL
CID 1338521: Fix error (realloc returns different pointer)
2015-11-10 18:11:05 +00:00
christos aa158b270c CID 1338517: Check negative returns 2015-11-10 18:08:05 +00:00
christos 69deaff196 CID 1338515: Make it clear that the pfd variable can't be NULL 2015-11-10 18:06:53 +00:00
christos 5d9565aab9 CID 1338513: Check listen(2) return 2015-11-10 18:01:16 +00:00
christos 2a964e6106 Add debugging for pollfd 2015-11-08 19:30:53 +00:00
christos 6821cf5fc4 Only do the compat cruft if we are compiling libc. 2015-11-08 02:46:53 +00:00
joerg aae634b518 Soft-float support for rounding mode is currently not thread-safe, which
is not acceptable. Decision should be made on whether full fenv.h
support is desirable and then fix this appropiately.

Math functions (both libc and libm) should not touch errno, this creates
unnecessary problems for compilers.
2015-11-08 02:20:26 +00:00
christos 245e5bc63c initialize revents too. 2015-11-07 23:17:09 +00:00
christos df8f5914dc PR/50408: Pedro Giffuni: Provide a way for rpc to use poll(2) instead of
select(2), and the linux svc_pollfd and svc_maxpollfd members. Our select(2)
implementation does not suffer from the FD_SETSIZE limitation so this is
not turned on by default.
2015-11-07 23:09:20 +00:00
christos 7c3ee3b303 spell reserved. 2015-11-07 20:24:00 +00:00
wiz dec41c2e36 Use Dv for NULL. 2015-11-07 18:47:26 +00:00
wiz c9e587d5a6 Sort SEE ALSO. 2015-11-07 18:46:37 +00:00
christos f0421a30ec check for errors and recover instead of core-dumping. 2015-11-07 17:34:33 +00:00
christos 670a38d899 Put back NULL tests for allocation failures. 2015-11-07 16:58:24 +00:00
nros b16a5c9dec Add the C11 function aligned_alloc to libc. 2015-11-07 16:21:42 +00:00
christos addac9ec10 don't compile with SVC_LEGACY 2015-11-07 14:21:32 +00:00
christos 68e3906c09 simplify more. 2015-11-07 03:06:32 +00:00
christos 841c77b99c Introduce a binary compatible __fd_set_256 that is what the original fdset
size was for libc. Now we can bump it.
2015-11-07 00:42:04 +00:00
christos 01b6ad43e7 Cleanup and simplify.
undef svc_fdset and svc_maxfd to get to the real data for the compat code.
2015-11-06 23:11:09 +00:00
joerg 76218c7768 Don't use macros as types or variable names. 2015-11-06 23:05:09 +00:00
christos 2f904d5a7a - Provide multi-threaded fdset's for everyone not just rump if requested.
- Abstract fd_set access, and don't limit the fd_set size.
- Maintain binary compatibility by keeping the old global variables around.
2015-11-06 19:34:13 +00:00
christos 46615f7efe - Use -1 for the fake raw fd since we will be able to go beyond FD_SETSIZE.
- Poster boy for why it is bad to initialize in declarations :-)
2015-11-06 19:32:08 +00:00
pgoyette 82bcd0c81b Document the ms_flags field which is now exported in struct modstat 2015-11-04 04:31:53 +00:00
wiz c1ef8df3ab Fix macro. Remove trailing whitespace. 2015-11-01 08:52:29 +00:00
christos 94aa2c7cfc mention what we are allowed to do. 2015-10-31 17:45:32 +00:00
ginsbach 3219a72f94 Don't attempt to set TM_ZONE (name) for 'J' as isdst isn't known. 2015-10-31 03:42:00 +00:00
christos 3c0ef4294c make %Z and %z understand the same strings. 2015-10-31 02:14:08 +00:00
ginsbach b8b1230d48 - Add reference to RFC-3339
- Add J to military / nautical time zone description
2015-10-31 02:09:06 +00:00
ginsbach fb679626c8 Add 'J' (Juliett) as military time zone name meaning the local time zone. 2015-10-30 21:36:25 +00:00
christos eff9b12acf drop stray #endif 2015-10-30 18:20:16 +00:00
christos 5ba7c63c3a revert timezone() ifdef; it is wrong (pointed out by ginsbach) 2015-10-30 18:04:42 +00:00
ginsbach 862d86e79e ISO 8601 and RFC 3339 specify that an offset can be up to 23:59 and
not 12:00 east/west.  Just proves that one shouldn't use other
implementations as a canonical reference.  Thanks to all who pointed
this out.
2015-10-30 03:18:10 +00:00
christos f4d28d09d8 Add tzgetgmtoff() prototype I forgot to commit. 2015-10-30 03:08:56 +00:00
ginsbach a5eaa096be Reject timezone offsets more than 12 hours (east or west). 2015-10-30 01:49:36 +00:00
wiz 4bdb969ddc Whitespace. 2015-10-29 22:42:55 +00:00
christos fb1c722214 another lint warning for compat. 2015-10-29 19:18:32 +00:00
christos 5eac10702e - use #defined constants (from gisbach)
- back to setting tm_zone to NULL when we don't know.
2015-10-29 19:18:19 +00:00