diff options
author | Terry Wilson <twilson@digium.com> | 2011-07-06 20:58:12 +0000 |
---|---|---|
committer | Terry Wilson <twilson@digium.com> | 2011-07-06 20:58:12 +0000 |
commit | efd040cd11cff99a9dccf54c030a134d9a1e2e07 (patch) | |
tree | b4a3f36ffe91a5226485088c3bb2c5c6ac698fa1 /utils/db1-ast/include/compat.h | |
parent | a7c6f0445e7bbd1f7aea1687eae52c3ca7cd5756 (diff) |
Replace Berkeley DB with SQLite 3
There were some bugs in the very ancient version of Berkeley DB that Asterisk
used. Instead of spending the time tracking down the bugs in the Berkeley code
we move to the much better documented SQLite 3.
Conversion of the old astdb happens at runtime by running the included
astdb2sqlite3 utility. The ast_db API with SQLite 3 backend should behave
identically to the old Berkeley backend, but in the future we could offer a
much more robust interface.
We do not include the SQLite 3 library in the source tree, but instead rely
upon the distribution-provided libraries. SQLite is so ubiquitous that this
should not place undue burden on administrators.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'utils/db1-ast/include/compat.h')
-rw-r--r-- | utils/db1-ast/include/compat.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/utils/db1-ast/include/compat.h b/utils/db1-ast/include/compat.h new file mode 100644 index 000000000..706e58265 --- /dev/null +++ b/utils/db1-ast/include/compat.h @@ -0,0 +1,49 @@ +/* Values for building 4.4 BSD db routines in the GNU C library. */ + +#ifndef _compat_h_ +#define _compat_h_ + +#include <fcntl.h> + +/* + * If you can't provide lock values in the open(2) call. Note, this + * allows races to happen. + */ +#ifndef O_EXLOCK /* 4.4BSD extension. */ +#define O_EXLOCK 0 +#endif + +#ifndef O_SHLOCK /* 4.4BSD extension. */ +#define O_SHLOCK 0 +#endif + +#include <errno.h> + +#ifndef EFTYPE +#define EFTYPE EINVAL /* POSIX 1003.1 format errno. */ +#endif + +#include <unistd.h> +#include <limits.h> + +#ifndef _POSIX_VDISABLE /* POSIX 1003.1 disabling char. */ +#define _POSIX_VDISABLE 0 /* Some systems used 0. */ +#endif + +#include <termios.h> + +#ifndef TCSASOFT /* 4.4BSD extension. */ +#define TCSASOFT 0 +#endif + +#include <sys/param.h> + +#ifndef MAX /* Usually found in <sys/param.h>. */ +#define MAX(_a,_b) ((_a)<(_b)?(_b):(_a)) +#endif +#ifndef MIN /* Usually found in <sys/param.h>. */ +#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b)) +#endif + + +#endif /* compat.h */ |