- 17 Mar, 2011 38 commits
-
-
Rusty Russell authored
-
Rusty Russell authored
This makes transition from tdb1 much simpler.
-
Rusty Russell authored
As per TDB1, except that the sequence number is 63 bit.
-
Rusty Russell authored
As per TDB1, with one enhancement: a non-NULL name argument passed to tdb_open() with the TDB_INTERNAL flag is preserved so you can identify internal TDBs too.
-
Rusty Russell authored
We don't need this now, since we use explicit error numbers.
-
Rusty Russell authored
Everyone writes their own, so provide a standard one.
-
Rusty Russell authored
These are the same as the TDB1 functions; but note that there is no reliable way to tell if tdb_exists() fails due to an error. This simplifies the API, but means you have to use tdb_fetch() if you really care.
-
Rusty Russell authored
-
Rusty Russell authored
Finally, we enable sharing of the struct tdb_file. We add a reference count so we can free the struct tdb_file when the last tdb is closed.
-
Rusty Russell authored
The last step before sharing struct tdb_file is to add a field to identify which tdb context is holding each lock, so we can fail when they conflict.
-
Rusty Russell authored
Internal reshuffle which makes things shorter and neater.
-
Rusty Russell authored
It makes sense to share the mmap between multiple openers.
-
Rusty Russell authored
This moves the fd and locking information into a new 'struct tdb_file', opening the way for it to be shared by multiple tdb_open calls on the same file.
-
Rusty Russell authored
-
Rusty Russell authored
Simply tidying up.
-
Rusty Russell authored
-
Rusty Russell authored
As detailed in doc/design.lyx section 2.16 "Record Headers Are Not Expandible", we make sure that if there is padding at the end of a record, the first byte of padding is a zero.
-
Rusty Russell authored
-
Rusty Russell authored
As detailed in doc/design.lyx section 2.15 "Extending The Header Is Difficult"; we add features_used and features_offered fields to the header, so we can identify if we add new features, and then if someone opens it who doesn't understand that feature.
-
Rusty Russell authored
-
Rusty Russell authored
This make sure that the data being handed to the function in tdb_traverse is the correct type.
-
Rusty Russell authored
This is vitally important for forwards compatibility.
-
Rusty Russell authored
Two missed cases in b2100462 (tdb2: change API to return the error value.)
-
Rusty Russell authored
-
Rusty Russell authored
-
Rusty Russell authored
-
Rusty Russell authored
-
Rusty Russell authored
It's now important, since it defines _GNU_SOURCE.
-
Rusty Russell authored
Recent changes shifted line numbers in tap.c, so the break is now in the wrong place. We should probably have an explicit function we can breakpoint instead.
-
Rusty Russell authored
Enable CCAN_STR_DEBUG in the default flags, so our tools get checked, and fix up the resulting errors.
-
Rusty Russell authored
The standard ctype.h variants will make you go insane if you contemplate them for too long.
-
Rusty Russell authored
isspace() and isdigit() want an unsigned value.
-
Rusty Russell authored
tolower(), toupper() and isupper want an unsigned value. Also, fix lazy cost-discarding inside strrchr for extra safety.
-
Rusty Russell authored
If we detect any mention of a problematic string function, try compiling the entire module with string debugging enabled.
-
Rusty Russell authored
In the former case, we were bitten by the fact that you don't pass a char to isalpha() et al: you pass an int. This means on most platforms you want to do: if (isalpha((unsigned char)c)) ... Insane? Yes, but I assure you I'm not making this up. Similarly, I've always wanted strstr, strchr and strrchr to return const char * when given a const char * argument to search, to avoid constness leak. In both cases, the actual versions from the headers may be macros, so we need to be very careful overriding them. The result is that they become out-of-line functions which is unacceptable for general performance. So we only activate these when CCAN_STR_DEBUG is defined.
-
Rusty Russell authored
Same thing (a BUILD_ASSERT which evaluates to zero), but there's a strong preference for all modules to stick with their own names as prefixes.
-
Rusty Russell authored
They're often out-of-date, and we're about to do special things to the str module compile flags, so we don't *ever* want the default. It doesn't add much to build times, and it eliminates a nasty source of weird errors.
-
Rusty Russell authored
We need to flush stdout before forking.
-
- 16 Mar, 2011 2 commits
-
-
Brad Hards authored
Also add a note about a possible segfault.
-
Rusty Russell authored
We don't use it for the moment, but Brad Hards noted that assigning to dest ten continuing was pointless, revealing this bug.
-