From 9144a3dfcb90f975762be6c189d2b99c66e55483 Mon Sep 17 00:00:00 2001 From: Greg Burd Date: Thu, 25 Jun 2026 09:14:44 -0400 Subject: [PATCH] build: remove Windows CE platform support Windows CE / Windows Mobile is an obsolete target. Its support was woven through the Windows OS layer as DB_WINCE conditionals alongside the desktop Windows code, plus a dedicated Visual Studio build tree and ADO.NET project generation. Remove it, keeping the desktop Windows paths the conditionals fell through to. OS layer and headers: - Resolve every DB_WINCE / _WIN32_WCE conditional in src/os_windows/ and src/dbinc/ to its desktop-Windows branch: os_open.c, os_map.c, os_config.c, os_handle.c, os_clock.c, os_errno.c, os_flock.c, os_getenv.c, os_rename.c, os_rw.c, os_stat.c, os_dir.c, mut_win32.c, win_db.h, globals.h, mutex_int.h, atomic.h, env_globals.c, os_atomic.c. - Drop the WinCE-only db_atomic_t "dummy" field and the WINCE_ATOMIC_MAGIC writes that padded it. - db_env_set_win_security is now unconditional on Windows; update its prototype guard in the generated ext_prot.in / ext_def.in. - Remove the WinCE vsnprintf shim in the SQL adapter. Build system: - Delete build_wince/, dist/wince_config.in, dist/win_projects/db_wince.projects and projects_wince.template.xml, dist/adodotnet/gen_wince_project.xq.in and testce.2008.csproj, dist/errno.h (only copied into build_wince), and lang/sql/sqlite/Makefile.arm-wince-mingw32ce-gcc. - Remove the WinCE steps from s_windows, s_windows_dsp, s_sql_drivers, and the WinCE variables and branches from the shared ADO.NET adapt_*.xq.in scripts. - Drop the build_wince filters from the validate scripts and the WinCE comment in clib_port.in and srcfiles.in. Docs: - Delete the Windows Mobile installation pages and remove their chapter from the installation table of contents. No configure regeneration is required: DB_WINCE was never an Autoconf template, only set by the deleted build_wince config header and the VS preprocessor. Incidental historical mentions in reference prose and vendored third-party files (config.sub, libtool, the SQLite amalgamation) are left untouched. --- build_wince/Berkeley_DB.sln | 224 -- build_wince/VS8/db.vcproj | 285 -- build_wince/VS8/db_small.vcproj | 245 -- build_wince/VS8/db_sql.vcproj | 203 -- build_wince/VS8/wce_sql.vcproj | 94 - build_wince/VS8/wce_tpcb.vcproj | 88 - build_wince/clib_port.h | 279 -- build_wince/db.h | 3150 ----------------- build_wince/db_config.h | 657 ---- build_wince/db_int.h | 1163 ------ build_wince/errno.h | 186 - .../adodotnet/adapt_SQLite.Interop.2008.xq.in | 106 +- dist/adodotnet/adapt_common.xq.in | 33 - dist/adodotnet/gen_wince_project.xq.in | 86 - dist/adodotnet/testce.2008.csproj | 132 - dist/clib_port.in | 4 +- dist/errno.h | 186 - dist/s_sql_drivers | 83 +- dist/s_windows | 25 +- dist/s_windows_dsp | 14 +- dist/srcfiles.in | 3 +- dist/validate/s_chk_offt | 1 - dist/validate/s_chk_tags | 1 - dist/win_projects/db_wince.projects | 5 - dist/win_projects/projects_wince.template.xml | 603 ---- dist/wince_config.in | 656 ---- docs/installation/build_wince.html | 380 -- docs/installation/build_wince_faq.html | 123 - docs/installation/build_wince_notes.html | 76 - docs/installation/index.html | 45 - lang/sql/adapter/db_sequence.c | 3 - .../sqlite/Makefile.arm-wince-mingw32ce-gcc | 138 - src/dbinc/atomic.h | 7 - src/dbinc/globals.h | 2 - src/dbinc/mutex_int.h | 2 +- src/dbinc/win_db.h | 6 - src/dbinc_auto/ext_def.in | 2 +- src/dbinc_auto/ext_prot.in | 2 +- src/env/env_globals.c | 2 - src/mutex/mut_win32.c | 20 +- src/os/os_atomic.c | 10 - src/os_windows/os_clock.c | 26 - src/os_windows/os_config.c | 16 - src/os_windows/os_dir.c | 5 +- src/os_windows/os_errno.c | 18 - src/os_windows/os_flock.c | 13 - src/os_windows/os_getenv.c | 6 - src/os_windows/os_handle.c | 13 - src/os_windows/os_map.c | 32 - src/os_windows/os_open.c | 53 +- src/os_windows/os_rename.c | 4 +- src/os_windows/os_rw.c | 2 - src/os_windows/os_stat.c | 4 +- 53 files changed, 23 insertions(+), 9499 deletions(-) delete mode 100644 build_wince/Berkeley_DB.sln delete mode 100644 build_wince/VS8/db.vcproj delete mode 100644 build_wince/VS8/db_small.vcproj delete mode 100644 build_wince/VS8/db_sql.vcproj delete mode 100644 build_wince/VS8/wce_sql.vcproj delete mode 100644 build_wince/VS8/wce_tpcb.vcproj delete mode 100644 build_wince/clib_port.h delete mode 100644 build_wince/db.h delete mode 100644 build_wince/db_config.h delete mode 100644 build_wince/db_int.h delete mode 100644 build_wince/errno.h delete mode 100644 dist/adodotnet/gen_wince_project.xq.in delete mode 100644 dist/adodotnet/testce.2008.csproj delete mode 100644 dist/errno.h delete mode 100644 dist/win_projects/db_wince.projects delete mode 100644 dist/win_projects/projects_wince.template.xml delete mode 100644 dist/wince_config.in delete mode 100644 docs/installation/build_wince.html delete mode 100644 docs/installation/build_wince_faq.html delete mode 100644 docs/installation/build_wince_notes.html delete mode 100644 lang/sql/sqlite/Makefile.arm-wince-mingw32ce-gcc diff --git a/build_wince/Berkeley_DB.sln b/build_wince/Berkeley_DB.sln deleted file mode 100644 index 60552dac7..000000000 --- a/build_wince/Berkeley_DB.sln +++ /dev/null @@ -1,224 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "db_sql", "VS8\db_sql.vcproj"", "{ACE41B30-04BB-11DF-8A39-0800200C9A66}" - ProjectSection(ProjectDependencies) = postProject - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085} = {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wce_sql", "VS8\wce_sql.vcproj"", "{75DF98AA-25DF-4183-A022-024CF918480D}" - ProjectSection(ProjectDependencies) = postProject - {ACE41B30-04BB-11DF-8A39-0800200C9A66} = {ACE41B30-04BB-11DF-8A39-0800200C9A66} - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085} = {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wce_tpcb", "VS8\wce_tpcb.vcproj"", "{F2CE670A-ABAE-414A-9A17-8079AB58613F}" - ProjectSection(ProjectDependencies) = postProject - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085} = {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "db", "VS8\db.vcproj"", "{CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "db_small", "VS8\db_small.vcproj"", "{F016AF0B-CBFD-4083-B501-4A1D0A934A2D}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Pocket PC 2003 (ARMV4) = Debug|Pocket PC 2003 (ARMV4) - Debug|Smartphone 2003 (ARMV4) = Debug|Smartphone 2003 (ARMV4) - Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) = Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - Release|Pocket PC 2003 (ARMV4) = Release|Pocket PC 2003 (ARMV4) - Release|Smartphone 2003 (ARMV4) = Release|Smartphone 2003 (ARMV4) - Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) = Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - Static Debug|Pocket PC 2003 (ARMV4) = Static Debug|Pocket PC 2003 (ARMV4) - Static Debug|Smartphone 2003 (ARMV4) = Static Debug|Smartphone 2003 (ARMV4) - Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) = Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - Static Release|Pocket PC 2003 (ARMV4) = Static Release|Pocket PC 2003 (ARMV4) - Static Release|Smartphone 2003 (ARMV4) = Static Release|Smartphone 2003 (ARMV4) - Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) = Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Debug|Smartphone 2003 (ARMV4).ActiveCfg = Debug|Smartphone 2003 (ARMV4) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Debug|Smartphone 2003 (ARMV4).Build.0 = Debug|Smartphone 2003 (ARMV4) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Debug|Smartphone 2003 (ARMV4).Deploy.0 = Debug|Smartphone 2003 (ARMV4) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Build.0 = Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Release|Smartphone 2003 (ARMV4).ActiveCfg = Release|Smartphone 2003 (ARMV4) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Release|Smartphone 2003 (ARMV4).Build.0 = Release|Smartphone 2003 (ARMV4) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Release|Smartphone 2003 (ARMV4).Deploy.0 = Release|Smartphone 2003 (ARMV4) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).ActiveCfg = Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Build.0 = Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Deploy.0 = Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Static Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Static Debug|Pocket PC 2003 (ARMV4) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Static Debug|Pocket PC 2003 (ARMV4).Build.0 = Static Debug|Pocket PC 2003 (ARMV4) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Static Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Static Debug|Pocket PC 2003 (ARMV4) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Static Debug|Smartphone 2003 (ARMV4).ActiveCfg = Static Debug|Smartphone 2003 (ARMV4) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Static Debug|Smartphone 2003 (ARMV4).Build.0 = Static Debug|Smartphone 2003 (ARMV4) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Static Debug|Smartphone 2003 (ARMV4).Deploy.0 = Static Debug|Smartphone 2003 (ARMV4) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).ActiveCfg = Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Build.0 = Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Deploy.0 = Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Static Release|Pocket PC 2003 (ARMV4).ActiveCfg = Static Release|Pocket PC 2003 (ARMV4) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Static Release|Pocket PC 2003 (ARMV4).Build.0 = Static Release|Pocket PC 2003 (ARMV4) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Static Release|Pocket PC 2003 (ARMV4).Deploy.0 = Static Release|Pocket PC 2003 (ARMV4) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Static Release|Smartphone 2003 (ARMV4).ActiveCfg = Static Release|Smartphone 2003 (ARMV4) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Static Release|Smartphone 2003 (ARMV4).Build.0 = Static Release|Smartphone 2003 (ARMV4) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Static Release|Smartphone 2003 (ARMV4).Deploy.0 = Static Release|Smartphone 2003 (ARMV4) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).ActiveCfg = Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Build.0 = Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {ACE41B30-04BB-11DF-8A39-0800200C9A66}.Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Deploy.0 = Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {75DF98AA-25DF-4183-A022-024CF918480D}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4) - {75DF98AA-25DF-4183-A022-024CF918480D}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4) - {75DF98AA-25DF-4183-A022-024CF918480D}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4) - {75DF98AA-25DF-4183-A022-024CF918480D}.Debug|Smartphone 2003 (ARMV4).ActiveCfg = Debug|Smartphone 2003 (ARMV4) - {75DF98AA-25DF-4183-A022-024CF918480D}.Debug|Smartphone 2003 (ARMV4).Build.0 = Debug|Smartphone 2003 (ARMV4) - {75DF98AA-25DF-4183-A022-024CF918480D}.Debug|Smartphone 2003 (ARMV4).Deploy.0 = Debug|Smartphone 2003 (ARMV4) - {75DF98AA-25DF-4183-A022-024CF918480D}.Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {75DF98AA-25DF-4183-A022-024CF918480D}.Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Build.0 = Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {75DF98AA-25DF-4183-A022-024CF918480D}.Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {75DF98AA-25DF-4183-A022-024CF918480D}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4) - {75DF98AA-25DF-4183-A022-024CF918480D}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4) - {75DF98AA-25DF-4183-A022-024CF918480D}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4) - {75DF98AA-25DF-4183-A022-024CF918480D}.Release|Smartphone 2003 (ARMV4).ActiveCfg = Release|Smartphone 2003 (ARMV4) - {75DF98AA-25DF-4183-A022-024CF918480D}.Release|Smartphone 2003 (ARMV4).Build.0 = Release|Smartphone 2003 (ARMV4) - {75DF98AA-25DF-4183-A022-024CF918480D}.Release|Smartphone 2003 (ARMV4).Deploy.0 = Release|Smartphone 2003 (ARMV4) - {75DF98AA-25DF-4183-A022-024CF918480D}.Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).ActiveCfg = Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {75DF98AA-25DF-4183-A022-024CF918480D}.Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Build.0 = Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {75DF98AA-25DF-4183-A022-024CF918480D}.Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Deploy.0 = Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {75DF98AA-25DF-4183-A022-024CF918480D}.Static Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4) - {75DF98AA-25DF-4183-A022-024CF918480D}.Static Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4) - {75DF98AA-25DF-4183-A022-024CF918480D}.Static Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4) - {75DF98AA-25DF-4183-A022-024CF918480D}.Static Debug|Smartphone 2003 (ARMV4).ActiveCfg = Debug|Smartphone 2003 (ARMV4) - {75DF98AA-25DF-4183-A022-024CF918480D}.Static Debug|Smartphone 2003 (ARMV4).Build.0 = Debug|Smartphone 2003 (ARMV4) - {75DF98AA-25DF-4183-A022-024CF918480D}.Static Debug|Smartphone 2003 (ARMV4).Deploy.0 = Debug|Smartphone 2003 (ARMV4) - {75DF98AA-25DF-4183-A022-024CF918480D}.Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {75DF98AA-25DF-4183-A022-024CF918480D}.Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Build.0 = Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {75DF98AA-25DF-4183-A022-024CF918480D}.Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {75DF98AA-25DF-4183-A022-024CF918480D}.Static Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4) - {75DF98AA-25DF-4183-A022-024CF918480D}.Static Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4) - {75DF98AA-25DF-4183-A022-024CF918480D}.Static Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4) - {75DF98AA-25DF-4183-A022-024CF918480D}.Static Release|Smartphone 2003 (ARMV4).ActiveCfg = Release|Smartphone 2003 (ARMV4) - {75DF98AA-25DF-4183-A022-024CF918480D}.Static Release|Smartphone 2003 (ARMV4).Build.0 = Release|Smartphone 2003 (ARMV4) - {75DF98AA-25DF-4183-A022-024CF918480D}.Static Release|Smartphone 2003 (ARMV4).Deploy.0 = Release|Smartphone 2003 (ARMV4) - {75DF98AA-25DF-4183-A022-024CF918480D}.Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).ActiveCfg = Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {75DF98AA-25DF-4183-A022-024CF918480D}.Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Build.0 = Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {75DF98AA-25DF-4183-A022-024CF918480D}.Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Deploy.0 = Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Debug|Smartphone 2003 (ARMV4).ActiveCfg = Debug|Smartphone 2003 (ARMV4) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Debug|Smartphone 2003 (ARMV4).Build.0 = Debug|Smartphone 2003 (ARMV4) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Debug|Smartphone 2003 (ARMV4).Deploy.0 = Debug|Smartphone 2003 (ARMV4) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Build.0 = Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Release|Smartphone 2003 (ARMV4).ActiveCfg = Release|Smartphone 2003 (ARMV4) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Release|Smartphone 2003 (ARMV4).Build.0 = Release|Smartphone 2003 (ARMV4) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Release|Smartphone 2003 (ARMV4).Deploy.0 = Release|Smartphone 2003 (ARMV4) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).ActiveCfg = Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Build.0 = Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Deploy.0 = Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Static Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Static Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Static Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Static Debug|Smartphone 2003 (ARMV4).ActiveCfg = Debug|Smartphone 2003 (ARMV4) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Static Debug|Smartphone 2003 (ARMV4).Build.0 = Debug|Smartphone 2003 (ARMV4) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Static Debug|Smartphone 2003 (ARMV4).Deploy.0 = Debug|Smartphone 2003 (ARMV4) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Build.0 = Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Static Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Static Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Static Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Static Release|Smartphone 2003 (ARMV4).ActiveCfg = Release|Smartphone 2003 (ARMV4) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Static Release|Smartphone 2003 (ARMV4).Build.0 = Release|Smartphone 2003 (ARMV4) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Static Release|Smartphone 2003 (ARMV4).Deploy.0 = Release|Smartphone 2003 (ARMV4) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).ActiveCfg = Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Build.0 = Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {F2CE670A-ABAE-414A-9A17-8079AB58613F}.Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Deploy.0 = Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Static Debug|Pocket PC 2003 (ARMV4) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Static Debug|Pocket PC 2003 (ARMV4) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Static Debug|Pocket PC 2003 (ARMV4) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Debug|Smartphone 2003 (ARMV4).ActiveCfg = Static Debug|Smartphone 2003 (ARMV4) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Debug|Smartphone 2003 (ARMV4).Build.0 = Static Debug|Smartphone 2003 (ARMV4) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Debug|Smartphone 2003 (ARMV4).Deploy.0 = Static Debug|Smartphone 2003 (ARMV4) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).ActiveCfg = Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Build.0 = Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Deploy.0 = Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Static Release|Pocket PC 2003 (ARMV4) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Release|Pocket PC 2003 (ARMV4).Build.0 = Static Release|Pocket PC 2003 (ARMV4) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Static Release|Pocket PC 2003 (ARMV4) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Release|Smartphone 2003 (ARMV4).ActiveCfg = Static Release|Smartphone 2003 (ARMV4) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Release|Smartphone 2003 (ARMV4).Build.0 = Static Release|Smartphone 2003 (ARMV4) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Release|Smartphone 2003 (ARMV4).Deploy.0 = Static Release|Smartphone 2003 (ARMV4) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).ActiveCfg = Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Build.0 = Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Deploy.0 = Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Static Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Static Debug|Pocket PC 2003 (ARMV4) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Static Debug|Pocket PC 2003 (ARMV4).Build.0 = Static Debug|Pocket PC 2003 (ARMV4) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Static Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Static Debug|Pocket PC 2003 (ARMV4) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Static Debug|Smartphone 2003 (ARMV4).ActiveCfg = Static Debug|Smartphone 2003 (ARMV4) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Static Debug|Smartphone 2003 (ARMV4).Build.0 = Static Debug|Smartphone 2003 (ARMV4) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Static Debug|Smartphone 2003 (ARMV4).Deploy.0 = Static Debug|Smartphone 2003 (ARMV4) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).ActiveCfg = Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Build.0 = Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Deploy.0 = Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Static Release|Pocket PC 2003 (ARMV4).ActiveCfg = Static Release|Pocket PC 2003 (ARMV4) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Static Release|Pocket PC 2003 (ARMV4).Build.0 = Static Release|Pocket PC 2003 (ARMV4) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Static Release|Pocket PC 2003 (ARMV4).Deploy.0 = Static Release|Pocket PC 2003 (ARMV4) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Static Release|Smartphone 2003 (ARMV4).ActiveCfg = Static Release|Smartphone 2003 (ARMV4) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Static Release|Smartphone 2003 (ARMV4).Build.0 = Static Release|Smartphone 2003 (ARMV4) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Static Release|Smartphone 2003 (ARMV4).Deploy.0 = Static Release|Smartphone 2003 (ARMV4) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).ActiveCfg = Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Build.0 = Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {CDE1C264-5E6C-11DF-AC8B-D58FDFD72085}.Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Deploy.0 = Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Static Debug|Pocket PC 2003 (ARMV4) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Static Debug|Pocket PC 2003 (ARMV4) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Static Debug|Pocket PC 2003 (ARMV4) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Debug|Smartphone 2003 (ARMV4).ActiveCfg = Static Debug|Smartphone 2003 (ARMV4) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Debug|Smartphone 2003 (ARMV4).Build.0 = Static Debug|Smartphone 2003 (ARMV4) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Debug|Smartphone 2003 (ARMV4).Deploy.0 = Static Debug|Smartphone 2003 (ARMV4) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).ActiveCfg = Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Build.0 = Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Deploy.0 = Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Static Release|Pocket PC 2003 (ARMV4) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Release|Pocket PC 2003 (ARMV4).Build.0 = Static Release|Pocket PC 2003 (ARMV4) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Static Release|Pocket PC 2003 (ARMV4) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Release|Smartphone 2003 (ARMV4).ActiveCfg = Static Release|Smartphone 2003 (ARMV4) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Release|Smartphone 2003 (ARMV4).Build.0 = Static Release|Smartphone 2003 (ARMV4) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Release|Smartphone 2003 (ARMV4).Deploy.0 = Static Release|Smartphone 2003 (ARMV4) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).ActiveCfg = Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Build.0 = Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Deploy.0 = Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Static Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Static Debug|Pocket PC 2003 (ARMV4) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Static Debug|Pocket PC 2003 (ARMV4).Build.0 = Static Debug|Pocket PC 2003 (ARMV4) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Static Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Static Debug|Pocket PC 2003 (ARMV4) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Static Debug|Smartphone 2003 (ARMV4).ActiveCfg = Static Debug|Smartphone 2003 (ARMV4) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Static Debug|Smartphone 2003 (ARMV4).Build.0 = Static Debug|Smartphone 2003 (ARMV4) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Static Debug|Smartphone 2003 (ARMV4).Deploy.0 = Static Debug|Smartphone 2003 (ARMV4) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).ActiveCfg = Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Build.0 = Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Deploy.0 = Static Debug|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Static Release|Pocket PC 2003 (ARMV4).ActiveCfg = Static Release|Pocket PC 2003 (ARMV4) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Static Release|Pocket PC 2003 (ARMV4).Build.0 = Static Release|Pocket PC 2003 (ARMV4) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Static Release|Pocket PC 2003 (ARMV4).Deploy.0 = Static Release|Pocket PC 2003 (ARMV4) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Static Release|Smartphone 2003 (ARMV4).ActiveCfg = Static Release|Smartphone 2003 (ARMV4) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Static Release|Smartphone 2003 (ARMV4).Build.0 = Static Release|Smartphone 2003 (ARMV4) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Static Release|Smartphone 2003 (ARMV4).Deploy.0 = Static Release|Smartphone 2003 (ARMV4) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).ActiveCfg = Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Build.0 = Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - {F016AF0B-CBFD-4083-B501-4A1D0A934A2D}.Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I).Deploy.0 = Static Release|Windows Mobile 6.5.3 Professional DTK (ARMV4I) - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/build_wince/VS8/db.vcproj b/build_wince/VS8/db.vcproj deleted file mode 100644 index 68294fd3f..000000000 --- a/build_wince/VS8/db.vcproj +++ /dev/null @@ -1,285 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build_wince/VS8/db_small.vcproj b/build_wince/VS8/db_small.vcproj deleted file mode 100644 index b85f2824a..000000000 --- a/build_wince/VS8/db_small.vcproj +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build_wince/VS8/db_sql.vcproj b/build_wince/VS8/db_sql.vcproj deleted file mode 100644 index 3920c078f..000000000 --- a/build_wince/VS8/db_sql.vcproj +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build_wince/VS8/wce_sql.vcproj b/build_wince/VS8/wce_sql.vcproj deleted file mode 100644 index 9c30c8ac5..000000000 --- a/build_wince/VS8/wce_sql.vcproj +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build_wince/VS8/wce_tpcb.vcproj b/build_wince/VS8/wce_tpcb.vcproj deleted file mode 100644 index 9f9838527..000000000 --- a/build_wince/VS8/wce_tpcb.vcproj +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build_wince/clib_port.h b/build_wince/clib_port.h deleted file mode 100644 index f301fd97b..000000000 --- a/build_wince/clib_port.h +++ /dev/null @@ -1,279 +0,0 @@ -/* DO NOT EDIT: automatically built from dist/clib_port.in. */ -/* - * Minimum/maximum values for various types. - */ -#ifndef UINT16_MAX /* Maximum 16-bit unsigned. */ -#define UINT16_MAX 65535 -#endif -#ifndef UINT32_MAX /* Maximum 32-bit unsigned. */ -#define UINT32_MAX 4294967295U -#endif - -#ifndef INT_MAX -#if SIZEOF_INT == 4 -#define INT_MAX 2147483647 -#endif -#if SIZEOF_INT == 8 -#define INT_MAX 9223372036854775807 -#endif -#endif - -#ifndef INT_MIN /* minimum (signed) int value */ -#define INT_MIN (-INT_MAX-1) -#endif - -#ifndef UINT_MAX /* maximum (signed) int value */ -#if SIZEOF_INT == 4 -#define UINT_MAX 4294967295U -#endif -#if SIZEOF_INT == 8 -#define UINT_MAX 18446744073709551615U -#endif -#endif - -#ifndef LONG_MAX /* maximum (signed) long value */ -#if SIZEOF_LONG == 4 -#define LONG_MAX 2147483647 -#endif -#if SIZEOF_LONG == 8 -#define LONG_MAX 9223372036854775807L -#endif -#endif - -#ifndef LONG_MIN /* minimum (signed) long value */ -#define LONG_MIN (-LONG_MAX-1) -#endif - -#ifndef ULONG_MAX /* maximum (unsigned) long value */ -#if SIZEOF_LONG == 4 -#define ULONG_MAX 4294967295U -#endif -#if SIZEOF_LONG == 8 -#define ULONG_MAX 18446744073709551615UL -#endif -#endif - -#if defined(HAVE_64BIT_TYPES) -/* - * Override the system's 64-bit min/max constants. AIX's 32-bit compiler can - * handle 64-bit values, but the system's constants don't include the LL/ULL - * suffix, and so can't be compiled using the 32-bit compiler. - */ -#undef INT64_MAX -#undef INT64_MIN -#undef UINT64_MAX - -#ifdef DB_WIN32 -#define INT64_MAX _I64_MAX -#define INT64_MIN _I64_MIN -#define UINT64_MAX _UI64_MAX -#else -#define INT64_MAX 9223372036854775807LL -#define INT64_MIN (-INT64_MAX-1) -#define UINT64_MAX 18446744073709551615ULL -#endif /* DB_WIN32 */ - -#define INT64_FMT "%I64d" -#define UINT64_FMT "%I64u" -#endif /* HAVE_64BIT_TYPES */ - -/* - * Exit success/failure macros. - */ -#ifndef HAVE_EXIT_SUCCESS -#define EXIT_FAILURE 1 -#define EXIT_SUCCESS 0 -#endif - -/* - * File modes. - */ -#ifdef DB_WIN32 -#ifndef S_IREAD /* WinCE doesn't have S_IREAD. */ -#define S_IREAD 0 -#endif -#ifndef S_IWRITE /* WinCE doesn't have S_IWRITE. */ -#define S_IWRITE 0 -#endif -#ifndef S_IRUSR -#define S_IRUSR S_IREAD /* R for owner */ -#endif -#ifndef S_IWUSR -#define S_IWUSR S_IWRITE /* W for owner */ -#endif -#ifndef S_IXUSR -#define S_IXUSR 0 /* X for owner */ -#endif -#ifndef S_IRGRP -#define S_IRGRP 0 /* R for group */ -#endif -#ifndef S_IWGRP -#define S_IWGRP 0 /* W for group */ -#endif -#ifndef S_IXGRP -#define S_IXGRP 0 /* X for group */ -#endif -#ifndef S_IROTH -#define S_IROTH 0 /* R for other */ -#endif -#ifndef S_IWOTH -#define S_IWOTH 0 /* W for other */ -#endif -#ifndef S_IXOTH -#define S_IXOTH 0 /* X for other */ -#endif -#else /* !DB_WIN32 */ -#ifndef S_IRUSR -#define S_IRUSR 0000400 /* R for owner */ -#endif -#ifndef S_IWUSR -#define S_IWUSR 0000200 /* W for owner */ -#endif -#ifndef S_IXUSR -#define S_IXUSR 0000100 /* X for owner */ -#endif -#ifndef S_IRGRP -#define S_IRGRP 0000040 /* R for group */ -#endif -#ifndef S_IWGRP -#define S_IWGRP 0000020 /* W for group */ -#endif -#ifndef S_IXGRP -#define S_IXGRP 0000010 /* X for group */ -#endif -#ifndef S_IROTH -#define S_IROTH 0000004 /* R for other */ -#endif -#ifndef S_IWOTH -#define S_IWOTH 0000002 /* W for other */ -#endif -#ifndef S_IXOTH -#define S_IXOTH 0000001 /* X for other */ -#endif -#endif /* !DB_WIN32 */ - -/* - * Don't step on the namespace. Other libraries may have their own - * implementations of these functions, we don't want to use their - * implementations or force them to use ours based on the load order. - */ -#ifndef HAVE_ATOI -#define atoi __db_Catoi -#endif -#ifndef HAVE_ATOL -#define atol __db_Catol -#endif -#ifndef HAVE_BSEARCH -#define bsearch __db_Cbsearch -#endif -#ifndef HAVE_FCLOSE -#define fclose __db_Cfclose -#endif -#ifndef HAVE_FGETC -#define fgetc __db_Cfgetc -#endif -#ifndef HAVE_FGETS -#define fgets __db_Cfgets -#endif -#ifndef HAVE_FOPEN -#define fopen __db_Cfopen -#endif -#ifndef HAVE_FWRITE -#define fwrite __db_Cfwrite -#endif -#ifndef HAVE_GETADDRINFO -#define freeaddrinfo(a) __db_Cfreeaddrinfo(a) -#define getaddrinfo(a, b, c, d) __db_Cgetaddrinfo(a, b, c, d) -#endif -#ifndef HAVE_GETCWD -#define getcwd __db_Cgetcwd -#endif -#ifndef HAVE_GETOPT -#define getopt __db_Cgetopt -#define optarg __db_Coptarg -#define opterr __db_Copterr -#define optind __db_Coptind -#define optopt __db_Coptopt -#define optreset __db_Coptreset -#endif -#ifndef HAVE_ISALPHA -#define isalpha __db_Cisalpha -#endif -#ifndef HAVE_ISDIGIT -#define isdigit __db_Cisdigit -#endif -#ifndef HAVE_ISPRINT -#define isprint __db_Cisprint -#endif -#ifndef HAVE_ISSPACE -#define isspace __db_Cisspace -#endif -#ifndef HAVE_LOCALTIME -#define localtime __db_Clocaltime -#endif -#ifndef HAVE_MEMCMP -#define memcmp __db_Cmemcmp -#endif -#ifndef HAVE_MEMCPY -#define memcpy __db_Cmemcpy -#endif -#ifndef HAVE_MEMMOVE -#define memmove __db_Cmemmove -#endif -#ifndef HAVE_PRINTF -#define printf __db_Cprintf -#define fprintf __db_Cfprintf -#endif -#ifndef HAVE_QSORT -#define qsort __db_Cqsort -#endif -#ifndef HAVE_RAISE -#define raise __db_Craise -#endif -#ifndef HAVE_RAND -#define rand __db_Crand -#define srand __db_Csrand -#endif -#ifndef HAVE_SNPRINTF -#define snprintf __db_Csnprintf -#endif -#ifndef HAVE_STRCASECMP -#define strcasecmp __db_Cstrcasecmp -#define strncasecmp __db_Cstrncasecmp -#endif -#ifndef HAVE_STRCAT -#define strcat __db_Cstrcat -#endif -#ifndef HAVE_STRCHR -#define strchr __db_Cstrchr -#endif -#ifndef HAVE_STRDUP -#define strdup __db_Cstrdup -#endif -#ifndef HAVE_STRERROR -#define strerror __db_Cstrerror -#endif -#ifndef HAVE_STRNCAT -#define strncat __db_Cstrncat -#endif -#ifndef HAVE_STRNCMP -#define strncmp __db_Cstrncmp -#endif -#ifndef HAVE_STRRCHR -#define strrchr __db_Cstrrchr -#endif -#ifndef HAVE_STRSEP -#define strsep __db_Cstrsep -#endif -#ifndef HAVE_STRTOL -#define strtol __db_Cstrtol -#endif -#ifndef HAVE_STRTOUL -#define strtoul __db_Cstrtoul -#endif -#ifndef HAVE_TIME -#define time __db_Ctime -#endif -#ifndef HAVE_VSNPRINTF -#define vsnprintf __db_Cvsnprintf -#endif diff --git a/build_wince/db.h b/build_wince/db.h deleted file mode 100644 index a24115c19..000000000 --- a/build_wince/db.h +++ /dev/null @@ -1,3150 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_windows. */ -/* - * See the file LICENSE for redistribution information. - * - * Copyright (c) 1996, 2013 Oracle and/or its affiliates. All rights reserved. - * - * $Id$ - * - * db.h include file layout: - * General. - * Database Environment. - * Locking subsystem. - * Logging subsystem. - * Shared buffer cache (mpool) subsystem. - * Transaction subsystem. - * Access methods. - * Access method cursors. - * Dbm/Ndbm, Hsearch historic interfaces. - */ - -#ifndef _DB_H_ -#define _DB_H_ - -#ifndef __NO_SYSTEM_INCLUDES -#include -#include -#include -#endif - -/* - * Turn off inappropriate compiler warnings - */ -#ifdef _MSC_VER -/* - * This warning is explicitly disabled in Visual C++ by default. - * It is necessary to explicitly enable the /Wall flag to generate this - * warning. - * Since this is a shared include file it should compile without warnings - * at the highest warning level, so third party applications can use - * higher warning levels cleanly. - * - * 4820: 'bytes' bytes padding added after member 'member' - * The type and order of elements caused the compiler to - * add padding to the end of a struct. - */ -#pragma warning(push) -#pragma warning(disable: 4820) -#endif /* _MSC_VER */ -#if defined(__cplusplus) -extern "C" { -#endif - - -#undef __P -#define __P(protos) protos - -/* - * Berkeley DB version information. - */ -#define DB_VERSION_FAMILY 11 -#define DB_VERSION_RELEASE 2 -#define DB_VERSION_MAJOR 5 -#define DB_VERSION_MINOR 3 -#define DB_VERSION_PATCH 29 -#define DB_VERSION_STRING "Berkeley DB 5.3.29: (September 9, 2013)" -#define DB_VERSION_FULL_STRING "Berkeley DB 11g Release 2, library version 11.2.5.3.29: (September 9, 2013)" - -/* - * !!! - * Berkeley DB uses specifically sized types. If they're not provided by - * the system, typedef them here. - * - * We protect them against multiple inclusion using __BIT_TYPES_DEFINED__, - * as does BIND and Kerberos, since we don't know for sure what #include - * files the user is using. - * - * !!! - * We also provide the standard u_int, u_long etc., if they're not provided - * by the system. - */ -#ifndef __BIT_TYPES_DEFINED__ -#define __BIT_TYPES_DEFINED__ -typedef unsigned char u_int8_t; -typedef short int16_t; -typedef unsigned short u_int16_t; -typedef int int32_t; -typedef unsigned int u_int32_t; -typedef __int64 int64_t; -typedef unsigned __int64 u_int64_t; -#endif - -#ifndef _WINSOCKAPI_ -typedef unsigned char u_char; -typedef unsigned int u_int; -typedef unsigned long u_long; -#endif -typedef unsigned short u_short; - -/* - * Missing ANSI types. - * - * uintmax_t -- - * Largest unsigned type, used to align structures in memory. We don't store - * floating point types in structures, so integral types should be sufficient - * (and we don't have to worry about systems that store floats in other than - * power-of-2 numbers of bytes). Additionally this fixes compilers that rewrite - * structure assignments and ANSI C memcpy calls to be in-line instructions - * that happen to require alignment. - * - * uintptr_t -- - * Unsigned type that's the same size as a pointer. There are places where - * DB modifies pointers by discarding the bottom bits to guarantee alignment. - * We can't use uintmax_t, it may be larger than the pointer, and compilers - * get upset about that. So far we haven't run on any machine where there's - * no unsigned type the same size as a pointer -- here's hoping. - */ -#if defined(_MSC_VER) && _MSC_VER < 1300 -typedef u_int32_t uintmax_t; -#else -typedef u_int64_t uintmax_t; -#endif -#ifdef _WIN64 -typedef u_int64_t uintptr_t; -#else -typedef u_int32_t uintptr_t; -#endif - -/* - * Windows defines off_t to long (i.e., 32 bits). We need to pass 64-bit - * file offsets, so we declare our own. - */ -#define off_t __db_off_t -typedef int64_t off_t; -typedef int32_t pid_t; -#ifdef HAVE_MIXED_SIZE_ADDRESSING -typedef u_int32_t db_size_t; -#else -typedef size_t db_size_t; -#endif -#ifdef _WIN64 -typedef int64_t ssize_t; -#else -typedef int32_t ssize_t; -#endif -#ifdef HAVE_MIXED_SIZE_ADDRESSING -typedef int32_t db_ssize_t; -#else -typedef ssize_t db_ssize_t; -#endif - -/* - * Sequences are only available on machines with 64-bit integral types. - */ -typedef int64_t db_seq_t; - -/* Thread and process identification. */ -typedef u_int32_t db_threadid_t; - -/* Basic types that are exported or quasi-exported. */ -typedef u_int32_t db_pgno_t; /* Page number type. */ -typedef u_int16_t db_indx_t; /* Page offset type. */ -#define DB_MAX_PAGES 0xffffffff /* >= # of pages in a file */ - -typedef u_int32_t db_recno_t; /* Record number type. */ -#define DB_MAX_RECORDS 0xffffffff /* >= # of records in a tree */ - -typedef u_int32_t db_timeout_t; /* Type of a timeout. */ - -/* - * Region offsets are the difference between a pointer in a region and the - * region's base address. With private environments, both addresses are the - * result of calling malloc, and we can't assume anything about what malloc - * will return, so region offsets have to be able to hold differences between - * arbitrary pointers. - */ -typedef db_size_t roff_t; - -/* - * Forward structure declarations, so we can declare pointers and - * applications can get type checking. - */ -struct __channel; typedef struct __channel CHANNEL; -struct __db; typedef struct __db DB; -struct __db_bt_stat; typedef struct __db_bt_stat DB_BTREE_STAT; -struct __db_channel; typedef struct __db_channel DB_CHANNEL; -struct __db_cipher; typedef struct __db_cipher DB_CIPHER; -struct __db_compact; typedef struct __db_compact DB_COMPACT; -struct __db_dbt; typedef struct __db_dbt DBT; -struct __db_distab; typedef struct __db_distab DB_DISTAB; -struct __db_env; typedef struct __db_env DB_ENV; -struct __db_h_stat; typedef struct __db_h_stat DB_HASH_STAT; -struct __db_heap_rid; typedef struct __db_heap_rid DB_HEAP_RID; -struct __db_heap_stat; typedef struct __db_heap_stat DB_HEAP_STAT; -struct __db_ilock; typedef struct __db_ilock DB_LOCK_ILOCK; -struct __db_lock_hstat; typedef struct __db_lock_hstat DB_LOCK_HSTAT; -struct __db_lock_pstat; typedef struct __db_lock_pstat DB_LOCK_PSTAT; -struct __db_lock_stat; typedef struct __db_lock_stat DB_LOCK_STAT; -struct __db_lock_u; typedef struct __db_lock_u DB_LOCK; -struct __db_locker; typedef struct __db_locker DB_LOCKER; -struct __db_lockreq; typedef struct __db_lockreq DB_LOCKREQ; -struct __db_locktab; typedef struct __db_locktab DB_LOCKTAB; -struct __db_log; typedef struct __db_log DB_LOG; -struct __db_log_cursor; typedef struct __db_log_cursor DB_LOGC; -struct __db_log_stat; typedef struct __db_log_stat DB_LOG_STAT; -struct __db_lsn; typedef struct __db_lsn DB_LSN; -struct __db_mpool; typedef struct __db_mpool DB_MPOOL; -struct __db_mpool_fstat;typedef struct __db_mpool_fstat DB_MPOOL_FSTAT; -struct __db_mpool_stat; typedef struct __db_mpool_stat DB_MPOOL_STAT; -struct __db_mpoolfile; typedef struct __db_mpoolfile DB_MPOOLFILE; -struct __db_mutex_stat; typedef struct __db_mutex_stat DB_MUTEX_STAT; -struct __db_mutex_t; typedef struct __db_mutex_t DB_MUTEX; -struct __db_mutexmgr; typedef struct __db_mutexmgr DB_MUTEXMGR; -struct __db_preplist; typedef struct __db_preplist DB_PREPLIST; -struct __db_qam_stat; typedef struct __db_qam_stat DB_QUEUE_STAT; -struct __db_rep; typedef struct __db_rep DB_REP; -struct __db_rep_stat; typedef struct __db_rep_stat DB_REP_STAT; -struct __db_repmgr_conn_err; - typedef struct __db_repmgr_conn_err DB_REPMGR_CONN_ERR; -struct __db_repmgr_site;typedef struct __db_repmgr_site DB_REPMGR_SITE; -struct __db_repmgr_stat;typedef struct __db_repmgr_stat DB_REPMGR_STAT; -struct __db_seq_record; typedef struct __db_seq_record DB_SEQ_RECORD; -struct __db_seq_stat; typedef struct __db_seq_stat DB_SEQUENCE_STAT; -struct __db_site; typedef struct __db_site DB_SITE; -struct __db_sequence; typedef struct __db_sequence DB_SEQUENCE; -struct __db_thread_info;typedef struct __db_thread_info DB_THREAD_INFO; -struct __db_txn; typedef struct __db_txn DB_TXN; -struct __db_txn_active; typedef struct __db_txn_active DB_TXN_ACTIVE; -struct __db_txn_stat; typedef struct __db_txn_stat DB_TXN_STAT; -struct __db_txn_token; typedef struct __db_txn_token DB_TXN_TOKEN; -struct __db_txnmgr; typedef struct __db_txnmgr DB_TXNMGR; -struct __dbc; typedef struct __dbc DBC; -struct __dbc_internal; typedef struct __dbc_internal DBC_INTERNAL; -struct __env; typedef struct __env ENV; -struct __fh_t; typedef struct __fh_t DB_FH; -struct __fname; typedef struct __fname FNAME; -struct __key_range; typedef struct __key_range DB_KEY_RANGE; -struct __mpoolfile; typedef struct __mpoolfile MPOOLFILE; -struct __db_logvrfy_config; -typedef struct __db_logvrfy_config DB_LOG_VERIFY_CONFIG; - -/* - * The Berkeley DB API flags are automatically-generated -- the following flag - * names are no longer used, but remain for compatibility reasons. - */ -#define DB_DEGREE_2 DB_READ_COMMITTED -#define DB_DIRTY_READ DB_READ_UNCOMMITTED -#define DB_JOINENV 0x0 - -/* Key/data structure -- a Data-Base Thang. */ -struct __db_dbt { - void *data; /* Key/data */ - u_int32_t size; /* key/data length */ - - u_int32_t ulen; /* RO: length of user buffer. */ - u_int32_t dlen; /* RO: get/put record length. */ - u_int32_t doff; /* RO: get/put record offset. */ - - void *app_data; - -#define DB_DBT_APPMALLOC 0x001 /* Callback allocated memory. */ -#define DB_DBT_BULK 0x002 /* Internal: Insert if duplicate. */ -#define DB_DBT_DUPOK 0x004 /* Internal: Insert if duplicate. */ -#define DB_DBT_ISSET 0x008 /* Lower level calls set value. */ -#define DB_DBT_MALLOC 0x010 /* Return in malloc'd memory. */ -#define DB_DBT_MULTIPLE 0x020 /* References multiple records. */ -#define DB_DBT_PARTIAL 0x040 /* Partial put/get. */ -#define DB_DBT_REALLOC 0x080 /* Return in realloc'd memory. */ -#define DB_DBT_READONLY 0x100 /* Readonly, don't update. */ -#define DB_DBT_STREAMING 0x200 /* Internal: DBT is being streamed. */ -#define DB_DBT_USERCOPY 0x400 /* Use the user-supplied callback. */ -#define DB_DBT_USERMEM 0x800 /* Return in user's memory. */ - u_int32_t flags; -}; - -/******************************************************* - * Mutexes. - *******************************************************/ -/* - * When mixed size addressing is supported mutexes need to be the same size - * independent of the process address size is. - */ -#ifdef HAVE_MIXED_SIZE_ADDRESSING -typedef db_size_t db_mutex_t; -#else -typedef uintptr_t db_mutex_t; -#endif - -struct __db_mutex_stat { /* SHARED */ - /* The following fields are maintained in the region's copy. */ - u_int32_t st_mutex_align; /* Mutex alignment */ - u_int32_t st_mutex_tas_spins; /* Mutex test-and-set spins */ - u_int32_t st_mutex_init; /* Initial mutex count */ - u_int32_t st_mutex_cnt; /* Mutex count */ - u_int32_t st_mutex_max; /* Mutex max */ - u_int32_t st_mutex_free; /* Available mutexes */ - u_int32_t st_mutex_inuse; /* Mutexes in use */ - u_int32_t st_mutex_inuse_max; /* Maximum mutexes ever in use */ - - /* The following fields are filled-in from other places. */ -#ifndef __TEST_DB_NO_STATISTICS - uintmax_t st_region_wait; /* Region lock granted after wait. */ - uintmax_t st_region_nowait; /* Region lock granted without wait. */ - roff_t st_regsize; /* Region size. */ - roff_t st_regmax; /* Region max. */ -#endif -}; - -/* This is the length of the buffer passed to DB_ENV->thread_id_string() */ -#define DB_THREADID_STRLEN 128 - -/******************************************************* - * Locking. - *******************************************************/ -#define DB_LOCKVERSION 1 - -#define DB_FILE_ID_LEN 20 /* Unique file ID length. */ - -/* - * Deadlock detector modes; used in the DB_ENV structure to configure the - * locking subsystem. - */ -#define DB_LOCK_NORUN 0 -#define DB_LOCK_DEFAULT 1 /* Default policy. */ -#define DB_LOCK_EXPIRE 2 /* Only expire locks, no detection. */ -#define DB_LOCK_MAXLOCKS 3 /* Select locker with max locks. */ -#define DB_LOCK_MAXWRITE 4 /* Select locker with max writelocks. */ -#define DB_LOCK_MINLOCKS 5 /* Select locker with min locks. */ -#define DB_LOCK_MINWRITE 6 /* Select locker with min writelocks. */ -#define DB_LOCK_OLDEST 7 /* Select oldest locker. */ -#define DB_LOCK_RANDOM 8 /* Select random locker. */ -#define DB_LOCK_YOUNGEST 9 /* Select youngest locker. */ - -/* - * Simple R/W lock modes and for multi-granularity intention locking. - * - * !!! - * These values are NOT random, as they are used as an index into the lock - * conflicts arrays, i.e., DB_LOCK_IWRITE must be == 3, and DB_LOCK_IREAD - * must be == 4. - */ -typedef enum { - DB_LOCK_NG=0, /* Not granted. */ - DB_LOCK_READ=1, /* Shared/read. */ - DB_LOCK_WRITE=2, /* Exclusive/write. */ - DB_LOCK_WAIT=3, /* Wait for event */ - DB_LOCK_IWRITE=4, /* Intent exclusive/write. */ - DB_LOCK_IREAD=5, /* Intent to share/read. */ - DB_LOCK_IWR=6, /* Intent to read and write. */ - DB_LOCK_READ_UNCOMMITTED=7, /* Degree 1 isolation. */ - DB_LOCK_WWRITE=8, /* Was Written. */ - DB_LOCK_SIREAD=9 /* Snapshot isolation read (SSI). */ -} db_lockmode_t; - -/* - * Request types. - */ -typedef enum { - DB_LOCK_DUMP=0, /* Display held locks. */ - DB_LOCK_GET=1, /* Get the lock. */ - DB_LOCK_GET_TIMEOUT=2, /* Get lock with a timeout. */ - DB_LOCK_INHERIT=3, /* Pass locks to parent. */ - DB_LOCK_PUT=4, /* Release the lock. */ - DB_LOCK_PUT_ALL=5, /* Release locker's locks. */ - DB_LOCK_PUT_OBJ=6, /* Release locker's locks on obj. */ - DB_LOCK_PUT_READ=7, /* Release locker's read locks. */ - DB_LOCK_TIMEOUT=8, /* Force a txn to timeout. */ - DB_LOCK_TRADE=9, /* Trade locker ids on a lock. */ - DB_LOCK_UPGRADE_WRITE=10 /* Upgrade writes for dirty reads. */ -} db_lockop_t; - -/* - * Status of a lock. - */ -typedef enum { - DB_LSTAT_ABORTED=1, /* Lock belongs to an aborted txn. */ - DB_LSTAT_EXPIRED=2, /* Lock has expired. */ - DB_LSTAT_FREE=3, /* Lock is unallocated. */ - DB_LSTAT_HELD=4, /* Lock is currently held. */ - DB_LSTAT_PENDING=5, /* Lock was waiting and has been - * promoted; waiting for the owner - * to run and upgrade it to held. */ - DB_LSTAT_WAITING=6 /* Lock is on the wait queue. */ -}db_status_t; - -/* Lock statistics structure. */ -struct __db_lock_stat { /* SHARED */ - u_int32_t st_id; /* Last allocated locker ID. */ - u_int32_t st_cur_maxid; /* Current maximum unused ID. */ - u_int32_t st_initlocks; /* Initial number of locks in table. */ - u_int32_t st_initlockers; /* Initial num of lockers in table. */ - u_int32_t st_initobjects; /* Initial num of objects in table. */ - u_int32_t st_locks; /* Current number of locks in table. */ - u_int32_t st_lockers; /* Current num of lockers in table. */ - u_int32_t st_objects; /* Current num of objects in table. */ - u_int32_t st_maxlocks; /* Maximum number of locks in table. */ - u_int32_t st_maxlockers; /* Maximum num of lockers in table. */ - u_int32_t st_maxobjects; /* Maximum num of objects in table. */ - u_int32_t st_partitions; /* number of partitions. */ - u_int32_t st_tablesize; /* Size of object hash table. */ - int32_t st_nmodes; /* Number of lock modes. */ - u_int32_t st_nlockers; /* Current number of lockers. */ -#ifndef __TEST_DB_NO_STATISTICS - u_int32_t st_nlocks; /* Current number of locks. */ - u_int32_t st_maxnlocks; /* Maximum number of locks so far. */ - u_int32_t st_maxhlocks; /* Maximum number of locks in any bucket. */ - uintmax_t st_locksteals; /* Number of lock steals so far. */ - uintmax_t st_maxlsteals; /* Maximum number steals in any partition. */ - u_int32_t st_maxnlockers; /* Maximum number of lockers so far. */ - u_int32_t st_nobjects; /* Current number of objects. */ - u_int32_t st_maxnobjects; /* Maximum number of objects so far. */ - u_int32_t st_maxhobjects; /* Maximum number of objectsin any bucket. */ - uintmax_t st_objectsteals; /* Number of objects steals so far. */ - uintmax_t st_maxosteals; /* Maximum number of steals in any partition. */ - uintmax_t st_nrequests; /* Number of lock gets. */ - uintmax_t st_nreleases; /* Number of lock puts. */ - uintmax_t st_nupgrade; /* Number of lock upgrades. */ - uintmax_t st_ndowngrade; /* Number of lock downgrades. */ - uintmax_t st_lock_wait; /* Lock conflicts w/ subsequent wait */ - uintmax_t st_lock_nowait; /* Lock conflicts w/o subsequent wait */ - uintmax_t st_ndeadlocks; /* Number of lock deadlocks. */ - db_timeout_t st_locktimeout; /* Lock timeout. */ - uintmax_t st_nlocktimeouts; /* Number of lock timeouts. */ - db_timeout_t st_txntimeout; /* Transaction timeout. */ - uintmax_t st_ntxntimeouts; /* Number of transaction timeouts. */ - uintmax_t st_part_wait; /* Partition lock granted after wait. */ - uintmax_t st_part_nowait; /* Partition lock granted without wait. */ - uintmax_t st_part_max_wait; /* Max partition lock granted after wait. */ - uintmax_t st_part_max_nowait; /* Max partition lock granted without wait. */ - uintmax_t st_objs_wait; /* Object lock granted after wait. */ - uintmax_t st_objs_nowait; /* Object lock granted without wait. */ - uintmax_t st_lockers_wait; /* Locker lock granted after wait. */ - uintmax_t st_lockers_nowait; /* Locker lock granted without wait. */ - uintmax_t st_region_wait; /* Region lock granted after wait. */ - uintmax_t st_region_nowait; /* Region lock granted without wait. */ - u_int32_t st_hash_len; /* Max length of bucket. */ - roff_t st_regsize; /* Region size. */ -#endif -}; - -struct __db_lock_hstat { /* SHARED */ - uintmax_t st_nrequests; /* Number of lock gets. */ - uintmax_t st_nreleases; /* Number of lock puts. */ - uintmax_t st_nupgrade; /* Number of lock upgrades. */ - uintmax_t st_ndowngrade; /* Number of lock downgrades. */ - u_int32_t st_nlocks; /* Current number of locks. */ - u_int32_t st_maxnlocks; /* Maximum number of locks so far. */ - u_int32_t st_nobjects; /* Current number of objects. */ - u_int32_t st_maxnobjects; /* Maximum number of objects so far. */ - uintmax_t st_lock_wait; /* Lock conflicts w/ subsequent wait */ - uintmax_t st_lock_nowait; /* Lock conflicts w/o subsequent wait */ - uintmax_t st_nlocktimeouts; /* Number of lock timeouts. */ - uintmax_t st_ntxntimeouts; /* Number of transaction timeouts. */ - u_int32_t st_hash_len; /* Max length of bucket. */ -}; - -struct __db_lock_pstat { /* SHARED */ - u_int32_t st_nlocks; /* Current number of locks. */ - u_int32_t st_maxnlocks; /* Maximum number of locks so far. */ - u_int32_t st_nobjects; /* Current number of objects. */ - u_int32_t st_maxnobjects; /* Maximum number of objects so far. */ - uintmax_t st_locksteals; /* Number of lock steals so far. */ - uintmax_t st_objectsteals; /* Number of objects steals so far. */ -}; - -/* - * DB_LOCK_ILOCK -- - * Internal DB access method lock. - */ -struct __db_ilock { /* SHARED */ - db_pgno_t pgno; /* Page being locked. */ - u_int8_t fileid[DB_FILE_ID_LEN];/* File id. */ -#define DB_HANDLE_LOCK 1 -#define DB_RECORD_LOCK 2 -#define DB_PAGE_LOCK 3 -#define DB_DATABASE_LOCK 4 - u_int32_t type; /* Type of lock. */ -}; - -/* - * DB_LOCK -- - * The structure is allocated by the caller and filled in during a - * lock_get request (or a lock_vec/DB_LOCK_GET). - */ -struct __db_lock_u { /* SHARED */ - roff_t off; /* Offset of the lock in the region */ - u_int32_t ndx; /* Index of the object referenced by - * this lock; used for locking. */ - u_int32_t gen; /* Generation number of this lock. */ - db_lockmode_t mode; /* mode of this lock. */ -}; - -/* Lock request structure. */ -struct __db_lockreq { - db_lockop_t op; /* Operation. */ - db_lockmode_t mode; /* Requested mode. */ - db_timeout_t timeout; /* Time to expire lock. */ - DBT *obj; /* Object being locked. */ - DB_LOCK lock; /* Lock returned. */ -}; - -/******************************************************* - * Logging. - *******************************************************/ -#define DB_LOGVERSION 19 /* Current log version. */ -#define DB_LOGVERSION_LATCHING 15 /* Log version using latching: db-4.8 */ -#define DB_LOGCHKSUM 12 /* Check sum headers: db-4.5 */ -#define DB_LOGOLDVER 8 /* Oldest version supported: db-4.2 */ -#define DB_LOGMAGIC 0x040988 - -/* - * A DB_LSN has two parts, a fileid which identifies a specific file, and an - * offset within that file. The fileid is an unsigned 4-byte quantity that - * uniquely identifies a file within the log directory -- currently a simple - * counter inside the log. The offset is also an unsigned 4-byte value. The - * log manager guarantees the offset is never more than 4 bytes by switching - * to a new log file before the maximum length imposed by an unsigned 4-byte - * offset is reached. - */ -struct __db_lsn { /* SHARED */ - u_int32_t file; /* File ID. */ - u_int32_t offset; /* File offset. */ -}; - -/* - * Application-specified log record types start at DB_user_BEGIN, and must not - * equal or exceed DB_debug_FLAG. - * - * DB_debug_FLAG is the high-bit of the u_int32_t that specifies a log record - * type. If the flag is set, it's a log record that was logged for debugging - * purposes only, even if it reflects a database change -- the change was part - * of a non-durable transaction. - */ -#define DB_user_BEGIN 10000 -#define DB_debug_FLAG 0x80000000 - -/* - * DB_LOGC -- - * Log cursor. - */ -struct __db_log_cursor { - ENV *env; /* Environment */ - - DB_FH *fhp; /* File handle. */ - DB_LSN lsn; /* Cursor: LSN */ - u_int32_t len; /* Cursor: record length */ - u_int32_t prev; /* Cursor: previous record's offset */ - - DBT dbt; /* Return DBT. */ - DB_LSN p_lsn; /* Persist LSN. */ - u_int32_t p_version; /* Persist version. */ - - u_int8_t *bp; /* Allocated read buffer. */ - u_int32_t bp_size; /* Read buffer length in bytes. */ - u_int32_t bp_rlen; /* Read buffer valid data length. */ - DB_LSN bp_lsn; /* Read buffer first byte LSN. */ - - u_int32_t bp_maxrec; /* Max record length in the log file. */ - - /* DB_LOGC PUBLIC HANDLE LIST BEGIN */ - int (*close) __P((DB_LOGC *, u_int32_t)); - int (*get) __P((DB_LOGC *, DB_LSN *, DBT *, u_int32_t)); - int (*version) __P((DB_LOGC *, u_int32_t *, u_int32_t)); - /* DB_LOGC PUBLIC HANDLE LIST END */ - -#define DB_LOG_DISK 0x01 /* Log record came from disk. */ -#define DB_LOG_LOCKED 0x02 /* Log region already locked */ -#define DB_LOG_SILENT_ERR 0x04 /* Turn-off error messages. */ - u_int32_t flags; -}; - -/* Log statistics structure. */ -struct __db_log_stat { /* SHARED */ - u_int32_t st_magic; /* Log file magic number. */ - u_int32_t st_version; /* Log file version number. */ - int32_t st_mode; /* Log file permissions mode. */ - u_int32_t st_lg_bsize; /* Log buffer size. */ - u_int32_t st_lg_size; /* Log file size. */ - u_int32_t st_wc_bytes; /* Bytes to log since checkpoint. */ - u_int32_t st_wc_mbytes; /* Megabytes to log since checkpoint. */ - u_int32_t st_fileid_init; /* Initial allocation for fileids. */ -#ifndef __TEST_DB_NO_STATISTICS - u_int32_t st_nfileid; /* Current number of fileids. */ - u_int32_t st_maxnfileid; /* Maximum number of fileids used. */ - uintmax_t st_record; /* Records entered into the log. */ - u_int32_t st_w_bytes; /* Bytes to log. */ - u_int32_t st_w_mbytes; /* Megabytes to log. */ - uintmax_t st_wcount; /* Total I/O writes to the log. */ - uintmax_t st_wcount_fill; /* Overflow writes to the log. */ - uintmax_t st_rcount; /* Total I/O reads from the log. */ - uintmax_t st_scount; /* Total syncs to the log. */ - uintmax_t st_region_wait; /* Region lock granted after wait. */ - uintmax_t st_region_nowait; /* Region lock granted without wait. */ - u_int32_t st_cur_file; /* Current log file number. */ - u_int32_t st_cur_offset; /* Current log file offset. */ - u_int32_t st_disk_file; /* Known on disk log file number. */ - u_int32_t st_disk_offset; /* Known on disk log file offset. */ - u_int32_t st_maxcommitperflush; /* Max number of commits in a flush. */ - u_int32_t st_mincommitperflush; /* Min number of commits in a flush. */ - roff_t st_regsize; /* Region size. */ -#endif -}; - -/* - * We need to record the first log record of a transaction. For user - * defined logging this macro returns the place to put that information, - * if it is need in rlsnp, otherwise it leaves it unchanged. We also - * need to track the last record of the transaction, this returns the - * place to put that info. - */ -#define DB_SET_TXN_LSNP(txn, blsnp, llsnp) \ - ((txn)->set_txn_lsnp(txn, blsnp, llsnp)) - -/* - * Definition of the structure which specifies marshalling of log records. - */ -typedef enum { - LOGREC_Done, - LOGREC_ARG, - LOGREC_HDR, - LOGREC_DATA, - LOGREC_DB, - LOGREC_DBOP, - LOGREC_DBT, - LOGREC_LOCKS, - LOGREC_OP, - LOGREC_PGDBT, - LOGREC_PGDDBT, - LOGREC_PGLIST, - LOGREC_POINTER, - LOGREC_TIME -} log_rec_type_t; - -typedef const struct __log_rec_spec { - log_rec_type_t type; - u_int32_t offset; - const char *name; - const char fmt[4]; -} DB_LOG_RECSPEC; - -/* - * Size of a DBT in a log record. - */ -#define LOG_DBT_SIZE(dbt) \ - (sizeof(u_int32_t) + ((dbt) == NULL ? 0 : (dbt)->size)) - -/******************************************************* - * Shared buffer cache (mpool). - *******************************************************/ -/* Priority values for DB_MPOOLFILE->{put,set_priority}. */ -typedef enum { - DB_PRIORITY_UNCHANGED=0, - DB_PRIORITY_VERY_LOW=1, - DB_PRIORITY_LOW=2, - DB_PRIORITY_DEFAULT=3, - DB_PRIORITY_HIGH=4, - DB_PRIORITY_VERY_HIGH=5 -} DB_CACHE_PRIORITY; - -/* Per-process DB_MPOOLFILE information. */ -struct __db_mpoolfile { - DB_FH *fhp; /* Underlying file handle. */ - - /* - * !!! - * The ref, pinref and q fields are protected by the region lock. - */ - u_int32_t ref; /* Reference count. */ - - u_int32_t pinref; /* Pinned block reference count. */ - - /* - * !!! - * Explicit representations of structures from queue.h. - * TAILQ_ENTRY(__db_mpoolfile) q; - */ - struct { - struct __db_mpoolfile *tqe_next; - struct __db_mpoolfile **tqe_prev; - } q; /* Linked list of DB_MPOOLFILE's. */ - - /* - * !!! - * The rest of the fields (with the exception of the MP_FLUSH flag) - * are not thread-protected, even when they may be modified at any - * time by the application. The reason is the DB_MPOOLFILE handle - * is single-threaded from the viewpoint of the application, and so - * the only fields needing to be thread-protected are those accessed - * by checkpoint or sync threads when using DB_MPOOLFILE structures - * to flush buffers from the cache. - */ - ENV *env; /* Environment */ - MPOOLFILE *mfp; /* Underlying MPOOLFILE. */ - - u_int32_t clear_len; /* Cleared length on created pages. */ - u_int8_t /* Unique file ID. */ - fileid[DB_FILE_ID_LEN]; - int ftype; /* File type. */ - int32_t lsn_offset; /* LSN offset in page. */ - u_int32_t gbytes, bytes; /* Maximum file size. */ - DBT *pgcookie; /* Byte-string passed to pgin/pgout. */ - int32_t priority; /* Cache priority. */ - - void *addr; /* Address of mmap'd region. */ - size_t len; /* Length of mmap'd region. */ - - u_int32_t config_flags; /* Flags to DB_MPOOLFILE->set_flags. */ - - /* DB_MPOOLFILE PUBLIC HANDLE LIST BEGIN */ - int (*close) __P((DB_MPOOLFILE *, u_int32_t)); - int (*get) - __P((DB_MPOOLFILE *, db_pgno_t *, DB_TXN *, u_int32_t, void *)); - int (*get_clear_len) __P((DB_MPOOLFILE *, u_int32_t *)); - int (*get_fileid) __P((DB_MPOOLFILE *, u_int8_t *)); - int (*get_flags) __P((DB_MPOOLFILE *, u_int32_t *)); - int (*get_ftype) __P((DB_MPOOLFILE *, int *)); - int (*get_last_pgno) __P((DB_MPOOLFILE *, db_pgno_t *)); - int (*get_lsn_offset) __P((DB_MPOOLFILE *, int32_t *)); - int (*get_maxsize) __P((DB_MPOOLFILE *, u_int32_t *, u_int32_t *)); - int (*get_pgcookie) __P((DB_MPOOLFILE *, DBT *)); - int (*get_priority) __P((DB_MPOOLFILE *, DB_CACHE_PRIORITY *)); - int (*open) __P((DB_MPOOLFILE *, const char *, u_int32_t, int, size_t)); - int (*put) __P((DB_MPOOLFILE *, void *, DB_CACHE_PRIORITY, u_int32_t)); - int (*set_clear_len) __P((DB_MPOOLFILE *, u_int32_t)); - int (*set_fileid) __P((DB_MPOOLFILE *, u_int8_t *)); - int (*set_flags) __P((DB_MPOOLFILE *, u_int32_t, int)); - int (*set_ftype) __P((DB_MPOOLFILE *, int)); - int (*set_lsn_offset) __P((DB_MPOOLFILE *, int32_t)); - int (*set_maxsize) __P((DB_MPOOLFILE *, u_int32_t, u_int32_t)); - int (*set_pgcookie) __P((DB_MPOOLFILE *, DBT *)); - int (*set_priority) __P((DB_MPOOLFILE *, DB_CACHE_PRIORITY)); - int (*sync) __P((DB_MPOOLFILE *)); - /* DB_MPOOLFILE PUBLIC HANDLE LIST END */ - - /* - * MP_FILEID_SET, MP_OPEN_CALLED and MP_READONLY do not need to be - * thread protected because they are initialized before the file is - * linked onto the per-process lists, and never modified. - * - * MP_FLUSH is thread protected because it is potentially read/set by - * multiple threads of control. - */ -#define MP_FILEID_SET 0x001 /* Application supplied a file ID. */ -#define MP_FLUSH 0x002 /* Was used to flush a buffer. */ -#define MP_FOR_FLUSH 0x004 /* Was opened to flush a buffer. */ -#define MP_MULTIVERSION 0x008 /* Opened for multiversion access. */ -#define MP_OPEN_CALLED 0x010 /* File opened. */ -#define MP_READONLY 0x020 /* File is readonly. */ -#define MP_DUMMY 0x040 /* File is dummy for __memp_fput. */ - u_int32_t flags; -}; - -/* Mpool statistics structure. */ -struct __db_mpool_stat { /* SHARED */ - u_int32_t st_gbytes; /* Total cache size: GB. */ - u_int32_t st_bytes; /* Total cache size: B. */ - u_int32_t st_ncache; /* Number of cache regions. */ - u_int32_t st_max_ncache; /* Maximum number of regions. */ - db_size_t st_mmapsize; /* Maximum file size for mmap. */ - int32_t st_maxopenfd; /* Maximum number of open fd's. */ - int32_t st_maxwrite; /* Maximum buffers to write. */ - db_timeout_t st_maxwrite_sleep; /* Sleep after writing max buffers. */ - u_int32_t st_pages; /* Total number of pages. */ -#ifndef __TEST_DB_NO_STATISTICS - u_int32_t st_map; /* Pages from mapped files. */ - uintmax_t st_cache_hit; /* Pages found in the cache. */ - uintmax_t st_cache_miss; /* Pages not found in the cache. */ - uintmax_t st_page_create; /* Pages created in the cache. */ - uintmax_t st_page_in; /* Pages read in. */ - uintmax_t st_page_out; /* Pages written out. */ - uintmax_t st_ro_evict; /* Clean pages forced from the cache. */ - uintmax_t st_rw_evict; /* Dirty pages forced from the cache. */ - uintmax_t st_page_trickle; /* Pages written by memp_trickle. */ - u_int32_t st_page_clean; /* Clean pages. */ - u_int32_t st_page_dirty; /* Dirty pages. */ - u_int32_t st_hash_buckets; /* Number of hash buckets. */ - u_int32_t st_hash_mutexes; /* Number of hash bucket mutexes. */ - u_int32_t st_pagesize; /* Assumed page size. */ - u_int32_t st_hash_searches; /* Total hash chain searches. */ - u_int32_t st_hash_longest; /* Longest hash chain searched. */ - uintmax_t st_hash_examined; /* Total hash entries searched. */ - uintmax_t st_hash_nowait; /* Hash lock granted with nowait. */ - uintmax_t st_hash_wait; /* Hash lock granted after wait. */ - uintmax_t st_hash_max_nowait; /* Max hash lock granted with nowait. */ - uintmax_t st_hash_max_wait; /* Max hash lock granted after wait. */ - uintmax_t st_region_nowait; /* Region lock granted with nowait. */ - uintmax_t st_region_wait; /* Region lock granted after wait. */ - uintmax_t st_mvcc_frozen; /* Buffers frozen. */ - uintmax_t st_mvcc_thawed; /* Buffers thawed. */ - uintmax_t st_mvcc_freed; /* Frozen buffers freed. */ - uintmax_t st_alloc; /* Number of page allocations. */ - uintmax_t st_alloc_buckets; /* Buckets checked during allocation. */ - uintmax_t st_alloc_max_buckets;/* Max checked during allocation. */ - uintmax_t st_alloc_pages; /* Pages checked during allocation. */ - uintmax_t st_alloc_max_pages; /* Max checked during allocation. */ - uintmax_t st_io_wait; /* Thread waited on buffer I/O. */ - uintmax_t st_sync_interrupted; /* Number of times sync interrupted. */ - roff_t st_regsize; /* Region size. */ - roff_t st_regmax; /* Region max. */ -#endif -}; - -/* - * Mpool file statistics structure. - * The first fields in this structure must mirror the __db_mpool_fstat_int - * structure, since content is mem copied between the two. - */ -struct __db_mpool_fstat { - u_int32_t st_pagesize; /* Page size. */ -#ifndef __TEST_DB_NO_STATISTICS - u_int32_t st_map; /* Pages from mapped files. */ - uintmax_t st_cache_hit; /* Pages found in the cache. */ - uintmax_t st_cache_miss; /* Pages not found in the cache. */ - uintmax_t st_page_create; /* Pages created in the cache. */ - uintmax_t st_page_in; /* Pages read in. */ - uintmax_t st_page_out; /* Pages written out. */ - uintmax_t st_backup_spins; /* Number of spins during a copy. */ -#endif - char *file_name; /* File name. */ -}; - -/******************************************************* - * Transactions and recovery. - *******************************************************/ -#define DB_TXNVERSION 1 - -typedef enum { - DB_TXN_ABORT=0, /* Public. */ - DB_TXN_APPLY=1, /* Public. */ - DB_TXN_BACKWARD_ROLL=3, /* Public. */ - DB_TXN_FORWARD_ROLL=4, /* Public. */ - DB_TXN_OPENFILES=5, /* Internal. */ - DB_TXN_POPENFILES=6, /* Internal. */ - DB_TXN_PRINT=7, /* Public. */ - DB_TXN_LOG_VERIFY=8 /* Internal. */ -} db_recops; - -/* - * BACKWARD_ALLOC is used during the forward pass to pick up any aborted - * allocations for files that were created during the forward pass. - * The main difference between _ALLOC and _ROLL is that the entry for - * the file not exist during the rollforward pass. - */ -#define DB_UNDO(op) ((op) == DB_TXN_ABORT || (op) == DB_TXN_BACKWARD_ROLL) -#define DB_REDO(op) ((op) == DB_TXN_FORWARD_ROLL || (op) == DB_TXN_APPLY) - -struct __db_txn { - DB_TXNMGR *mgrp; /* Pointer to transaction manager. */ - DB_TXN *parent; /* Pointer to transaction's parent. */ - DB_THREAD_INFO *thread_info; /* Pointer to thread information. */ - - u_int32_t txnid; /* Unique transaction id. */ - char *name; /* Transaction name. */ - DB_LOCKER *locker; /* Locker for this txn. */ - - void *td; /* Detail structure within region. */ - db_timeout_t lock_timeout; /* Timeout for locks for this txn. */ - void *txn_list; /* Undo information for parent. */ - - /* - * !!! - * Explicit representations of structures from queue.h. - * TAILQ_ENTRY(__db_txn) links; - */ - struct { - struct __db_txn *tqe_next; - struct __db_txn **tqe_prev; - } links; /* Links transactions off manager. */ - - /* - * !!! - * Explicit representations of structures from shqueue.h. - * SH_TAILQ_ENTRY xa_links; - * These links link together transactions that are active in - * the same thread of control. - */ - struct { - db_ssize_t stqe_next; - db_ssize_t stqe_prev; - } xa_links; /* Links XA transactions. */ - - /* - * !!! - * Explicit representations of structures from queue.h. - * TAILQ_HEAD(__kids, __db_txn) kids; - */ - struct __kids { - struct __db_txn *tqh_first; - struct __db_txn **tqh_last; - } kids; - - /* - * !!! - * Explicit representations of structures from queue.h. - * TAILQ_HEAD(__events, __txn_event) events; - */ - struct { - struct __txn_event *tqh_first; - struct __txn_event **tqh_last; - } events; /* Links deferred events. */ - - /* - * !!! - * Explicit representations of structures from queue.h. - * STAILQ_HEAD(__logrec, __txn_logrec) logs; - */ - struct { - struct __txn_logrec *stqh_first; - struct __txn_logrec **stqh_last; - } logs; /* Links in memory log records. */ - - /* - * !!! - * Explicit representations of structures from queue.h. - * TAILQ_ENTRY(__db_txn) klinks; - */ - struct { - struct __db_txn *tqe_next; - struct __db_txn **tqe_prev; - } klinks; /* Links of children in parent. */ - - /* - * !!! - * Explicit representations of structures from queue.h. - * TAILQ_HEAD(__my_cursors, __dbc) my_cursors; - */ - struct __my_cursors { - struct __dbc *tqh_first; - struct __dbc **tqh_last; - } my_cursors; - - /* - * !!! - * Explicit representations of structures from queue.h. - * TAILQ_HEAD(__femfs, MPOOLFILE) femfs; - * - * These are DBs involved in file extension in this transaction. - */ - struct __femfs { - DB *tqh_first; - DB **tqh_last; - } femfs; - - DB_TXN_TOKEN *token_buffer; /* User's commit token buffer. */ - void *api_internal; /* C++ API private. */ - void *xml_internal; /* XML API private. */ - - u_int32_t cursors; /* Number of cursors open for txn */ - - /* DB_TXN PUBLIC HANDLE LIST BEGIN */ - int (*abort) __P((DB_TXN *)); - int (*commit) __P((DB_TXN *, u_int32_t)); - int (*discard) __P((DB_TXN *, u_int32_t)); - int (*get_name) __P((DB_TXN *, const char **)); - int (*get_priority) __P((DB_TXN *, u_int32_t *)); - u_int32_t (*id) __P((DB_TXN *)); - int (*prepare) __P((DB_TXN *, u_int8_t *)); - int (*set_commit_token) __P((DB_TXN *, DB_TXN_TOKEN *)); - int (*set_name) __P((DB_TXN *, const char *)); - int (*set_priority) __P((DB_TXN *, u_int32_t)); - int (*set_timeout) __P((DB_TXN *, db_timeout_t, u_int32_t)); - /* DB_TXN PUBLIC HANDLE LIST END */ - - /* DB_TXN PRIVATE HANDLE LIST BEGIN */ - void (*set_txn_lsnp) __P((DB_TXN *txn, DB_LSN **, DB_LSN **)); - /* DB_TXN PRIVATE HANDLE LIST END */ - -#define TXN_XA_THREAD_NOTA 0 -#define TXN_XA_THREAD_ASSOCIATED 1 -#define TXN_XA_THREAD_SUSPENDED 2 -#define TXN_XA_THREAD_UNASSOCIATED 3 - u_int32_t xa_thr_status; - -#define TXN_CHILDCOMMIT 0x00001 /* Txn has committed. */ -#define TXN_COMPENSATE 0x00002 /* Compensating transaction. */ -#define TXN_DEADLOCK 0x00004 /* Txn has deadlocked. */ -#define TXN_FAMILY 0x00008 /* Cursors/children are independent. */ -#define TXN_IGNORE_LEASE 0x00010 /* Skip lease check at commit time. */ -#define TXN_INFAMILY 0x00020 /* Part of a transaction family. */ -#define TXN_LOCKTIMEOUT 0x00040 /* Txn has a lock timeout. */ -#define TXN_MALLOC 0x00080 /* Structure allocated by TXN system. */ -#define TXN_NOSYNC 0x00100 /* Do not sync on prepare and commit. */ -#define TXN_NOWAIT 0x00200 /* Do not wait on locks. */ -#define TXN_PRIVATE 0x00400 /* Txn owned by cursor. */ -#define TXN_READONLY 0x00800 /* CDS group handle. */ -#define TXN_READ_COMMITTED 0x01000 /* Txn has degree 2 isolation. */ -#define TXN_READ_UNCOMMITTED 0x02000 /* Txn has degree 1 isolation. */ -#define TXN_RESTORED 0x04000 /* Txn has been restored. */ -#define TXN_SNAPSHOT 0x08000 /* Snapshot Isolation. */ -#define TXN_SYNC 0x10000 /* Write and sync on prepare/commit. */ -#define TXN_WRITE_NOSYNC 0x20000 /* Write only on prepare/commit. */ -#define TXN_BULK 0x40000 /* Enable bulk loading optimization. */ -#define TXN_SNAPSHOT_SAFE 0x80000 /* Serializable snapshot isolation (SSI). */ - u_int32_t flags; -}; - -#define TXN_SYNC_FLAGS (TXN_SYNC | TXN_NOSYNC | TXN_WRITE_NOSYNC) - -/* - * Structure used for two phase commit interface. - * We set the size of our global transaction id (gid) to be 128 in order - * to match that defined by the XA X/Open standard. - */ -#define DB_GID_SIZE 128 -struct __db_preplist { - DB_TXN *txn; - u_int8_t gid[DB_GID_SIZE]; -}; - -/* Transaction statistics structure. */ -struct __db_txn_active { - u_int32_t txnid; /* Transaction ID */ - u_int32_t parentid; /* Transaction ID of parent */ - pid_t pid; /* Process owning txn ID */ - db_threadid_t tid; /* Thread owning txn ID */ - - DB_LSN lsn; /* LSN when transaction began */ - - DB_LSN read_lsn; /* Read LSN for MVCC */ - u_int32_t mvcc_ref; /* MVCC reference count */ - - u_int32_t priority; /* Deadlock resolution priority */ - -#define TXN_ABORTED 1 -#define TXN_COMMITTED 2 -#define TXN_NEED_ABORT 3 -#define TXN_PREPARED 4 -#define TXN_RUNNING 5 - u_int32_t status; /* Status of the transaction */ - -#define TXN_XA_ACTIVE 1 -#define TXN_XA_DEADLOCKED 2 -#define TXN_XA_IDLE 3 -#define TXN_XA_PREPARED 4 -#define TXN_XA_ROLLEDBACK 5 - u_int32_t xa_status; /* XA status */ - - u_int8_t gid[DB_GID_SIZE]; /* Global transaction ID */ - char name[51]; /* 50 bytes of name, nul termination */ -}; - -struct __db_txn_stat { - u_int32_t st_nrestores; /* number of restored transactions - after recovery. */ -#ifndef __TEST_DB_NO_STATISTICS - DB_LSN st_last_ckp; /* lsn of the last checkpoint */ - time_t st_time_ckp; /* time of last checkpoint */ - u_int32_t st_last_txnid; /* last transaction id given out */ - u_int32_t st_inittxns; /* inital txns allocated */ - u_int32_t st_maxtxns; /* maximum txns possible */ - uintmax_t st_naborts; /* number of aborted transactions */ - uintmax_t st_nbegins; /* number of begun transactions */ - uintmax_t st_ncommits; /* number of committed transactions */ - u_int32_t st_nactive; /* number of active transactions */ - u_int32_t st_nsnapshot; /* number of snapshot transactions */ - u_int32_t st_maxnactive; /* maximum active transactions */ - u_int32_t st_maxnsnapshot; /* maximum snapshot transactions */ - uintmax_t st_region_wait; /* Region lock granted after wait. */ - uintmax_t st_region_nowait; /* Region lock granted without wait. */ - roff_t st_regsize; /* Region size. */ - DB_TXN_ACTIVE *st_txnarray; /* array of active transactions */ -#endif -}; - -#define DB_TXN_TOKEN_SIZE 20 -struct __db_txn_token { - u_int8_t buf[DB_TXN_TOKEN_SIZE]; -}; - -/******************************************************* - * Replication. - *******************************************************/ -/* Special, out-of-band environment IDs. */ -#define DB_EID_BROADCAST -1 -#define DB_EID_INVALID -2 -#define DB_EID_MASTER -3 - -#define DB_REP_DEFAULT_PRIORITY 100 - -/* Acknowledgement policies; 0 reserved as OOB. */ -#define DB_REPMGR_ACKS_ALL 1 -#define DB_REPMGR_ACKS_ALL_AVAILABLE 2 -#define DB_REPMGR_ACKS_ALL_PEERS 3 -#define DB_REPMGR_ACKS_NONE 4 -#define DB_REPMGR_ACKS_ONE 5 -#define DB_REPMGR_ACKS_ONE_PEER 6 -#define DB_REPMGR_ACKS_QUORUM 7 - -/* Replication timeout configuration values. */ -#define DB_REP_ACK_TIMEOUT 1 /* RepMgr acknowledgements. */ -#define DB_REP_CHECKPOINT_DELAY 2 /* Master checkpoint delay. */ -#define DB_REP_CONNECTION_RETRY 3 /* RepMgr connections. */ -#define DB_REP_ELECTION_RETRY 4 /* RepMgr elect retries. */ -#define DB_REP_ELECTION_TIMEOUT 5 /* Rep normal elections. */ -#define DB_REP_FULL_ELECTION_TIMEOUT 6 /* Rep full elections. */ -#define DB_REP_HEARTBEAT_MONITOR 7 /* RepMgr client HB monitor. */ -#define DB_REP_HEARTBEAT_SEND 8 /* RepMgr master send freq. */ -#define DB_REP_LEASE_TIMEOUT 9 /* Master leases. */ - -/* - * Event notification types. (Tcl testing interface currently assumes there are - * no more than 32 of these.) - */ -#define DB_EVENT_PANIC 0 -#define DB_EVENT_REG_ALIVE 1 -#define DB_EVENT_REG_PANIC 2 -#define DB_EVENT_REP_CLIENT 3 -#define DB_EVENT_REP_CONNECT_BROKEN 4 -#define DB_EVENT_REP_CONNECT_ESTD 5 -#define DB_EVENT_REP_CONNECT_TRY_FAILED 6 -#define DB_EVENT_REP_DUPMASTER 7 -#define DB_EVENT_REP_ELECTED 8 -#define DB_EVENT_REP_ELECTION_FAILED 9 -#define DB_EVENT_REP_INIT_DONE 10 -#define DB_EVENT_REP_JOIN_FAILURE 11 -#define DB_EVENT_REP_LOCAL_SITE_REMOVED 12 -#define DB_EVENT_REP_MASTER 13 -#define DB_EVENT_REP_MASTER_FAILURE 14 -#define DB_EVENT_REP_NEWMASTER 15 -#define DB_EVENT_REP_PERM_FAILED 16 -#define DB_EVENT_REP_SITE_ADDED 17 -#define DB_EVENT_REP_SITE_REMOVED 18 -#define DB_EVENT_REP_STARTUPDONE 19 -#define DB_EVENT_REP_WOULD_ROLLBACK 20 /* Undocumented; C API only. */ -#define DB_EVENT_WRITE_FAILED 21 -#define DB_EVENT_NO_SUCH_EVENT 0xffffffff /* OOB sentinel value */ - -/* Replication Manager site status. */ -struct __db_repmgr_site { - int eid; - char *host; - u_int port; - -#define DB_REPMGR_CONNECTED 1 -#define DB_REPMGR_DISCONNECTED 2 - u_int32_t status; - -#define DB_REPMGR_ISPEER 0x01 - u_int32_t flags; -}; - -/* Replication statistics. */ -struct __db_rep_stat { /* SHARED */ - /* !!! - * Many replication statistics fields cannot be protected by a mutex - * without an unacceptable performance penalty, since most message - * processing is done without the need to hold a region-wide lock. - * Fields whose comments end with a '+' may be updated without holding - * the replication or log mutexes (as appropriate), and thus may be - * off somewhat (or, on unreasonable architectures under unlucky - * circumstances, garbaged). - */ - u_int32_t st_startup_complete; /* Site completed client sync-up. */ -#ifndef __TEST_DB_NO_STATISTICS - uintmax_t st_log_queued; /* Log records currently queued.+ */ - u_int32_t st_status; /* Current replication status. */ - DB_LSN st_next_lsn; /* Next LSN to use or expect. */ - DB_LSN st_waiting_lsn; /* LSN we're awaiting, if any. */ - DB_LSN st_max_perm_lsn; /* Maximum permanent LSN. */ - db_pgno_t st_next_pg; /* Next pg we expect. */ - db_pgno_t st_waiting_pg; /* pg we're awaiting, if any. */ - - u_int32_t st_dupmasters; /* # of times a duplicate master - condition was detected.+ */ - db_ssize_t st_env_id; /* Current environment ID. */ - u_int32_t st_env_priority; /* Current environment priority. */ - uintmax_t st_bulk_fills; /* Bulk buffer fills. */ - uintmax_t st_bulk_overflows; /* Bulk buffer overflows. */ - uintmax_t st_bulk_records; /* Bulk records stored. */ - uintmax_t st_bulk_transfers; /* Transfers of bulk buffers. */ - uintmax_t st_client_rerequests;/* Number of forced rerequests. */ - uintmax_t st_client_svc_req; /* Number of client service requests - received by this client. */ - uintmax_t st_client_svc_miss; /* Number of client service requests - missing on this client. */ - u_int32_t st_gen; /* Current generation number. */ - u_int32_t st_egen; /* Current election gen number. */ - uintmax_t st_lease_chk; /* Lease validity checks. */ - uintmax_t st_lease_chk_misses; /* Lease checks invalid. */ - uintmax_t st_lease_chk_refresh; /* Lease refresh attempts. */ - uintmax_t st_lease_sends; /* Lease messages sent live. */ - - uintmax_t st_log_duplicated; /* Log records received multiply.+ */ - uintmax_t st_log_queued_max; /* Max. log records queued at once.+ */ - uintmax_t st_log_queued_total; /* Total # of log recs. ever queued.+ */ - uintmax_t st_log_records; /* Log records received and put.+ */ - uintmax_t st_log_requested; /* Log recs. missed and requested.+ */ - db_ssize_t st_master; /* Env. ID of the current master. */ - uintmax_t st_master_changes; /* # of times we've switched masters. */ - uintmax_t st_msgs_badgen; /* Messages with a bad generation #.+ */ - uintmax_t st_msgs_processed; /* Messages received and processed.+ */ - uintmax_t st_msgs_recover; /* Messages ignored because this site - was a client in recovery.+ */ - uintmax_t st_msgs_send_failures;/* # of failed message sends.+ */ - uintmax_t st_msgs_sent; /* # of successful message sends.+ */ - uintmax_t st_newsites; /* # of NEWSITE msgs. received.+ */ - u_int32_t st_nsites; /* Current number of sites we will - assume during elections. */ - uintmax_t st_nthrottles; /* # of times we were throttled. */ - uintmax_t st_outdated; /* # of times we detected and returned - an OUTDATED condition.+ */ - uintmax_t st_pg_duplicated; /* Pages received multiply.+ */ - uintmax_t st_pg_records; /* Pages received and stored.+ */ - uintmax_t st_pg_requested; /* Pages missed and requested.+ */ - uintmax_t st_txns_applied; /* # of transactions applied.+ */ - uintmax_t st_startsync_delayed;/* # of STARTSYNC msgs delayed.+ */ - - /* Elections generally. */ - uintmax_t st_elections; /* # of elections held.+ */ - uintmax_t st_elections_won; /* # of elections won by this site.+ */ - - /* Statistics about an in-progress election. */ - db_ssize_t st_election_cur_winner; /* Current front-runner. */ - u_int32_t st_election_gen; /* Election generation number. */ - u_int32_t st_election_datagen; /* Election data generation number. */ - DB_LSN st_election_lsn; /* Max. LSN of current winner. */ - u_int32_t st_election_nsites; /* # of "registered voters". */ - u_int32_t st_election_nvotes; /* # of "registered voters" needed. */ - u_int32_t st_election_priority; /* Current election priority. */ - int32_t st_election_status; /* Current election status. */ - u_int32_t st_election_tiebreaker;/* Election tiebreaker value. */ - u_int32_t st_election_votes; /* Votes received in this round. */ - u_int32_t st_election_sec; /* Last election time seconds. */ - u_int32_t st_election_usec; /* Last election time useconds. */ - u_int32_t st_max_lease_sec; /* Maximum lease timestamp seconds. */ - u_int32_t st_max_lease_usec; /* Maximum lease timestamp useconds. */ - - /* Undocumented statistics only used by the test system. */ -#ifdef CONFIG_TEST - u_int32_t st_filefail_cleanups; /* # of FILE_FAIL cleanups done. */ -#endif -#endif -}; - -/* Replication Manager statistics. */ -struct __db_repmgr_stat { /* SHARED */ - uintmax_t st_perm_failed; /* # of insufficiently ack'ed msgs. */ - uintmax_t st_msgs_queued; /* # msgs queued for network delay. */ - uintmax_t st_msgs_dropped; /* # msgs discarded due to excessive - queue length. */ - uintmax_t st_connection_drop; /* Existing connections dropped. */ - uintmax_t st_connect_fail; /* Failed new connection attempts. */ - uintmax_t st_elect_threads; /* # of active election threads. */ - uintmax_t st_max_elect_threads; /* Max concurrent e-threads ever. */ -}; - -/* Replication Manager connection error. */ -struct __db_repmgr_conn_err { - int eid; /* Replication Environment ID. */ - int error; /* System networking error code. */ -}; - -/******************************************************* - * Sequences. - *******************************************************/ -/* - * The storage record for a sequence. - */ -struct __db_seq_record { - u_int32_t seq_version; /* Version size/number. */ - u_int32_t flags; /* DB_SEQ_XXX Flags. */ - db_seq_t seq_value; /* Current value. */ - db_seq_t seq_max; /* Max permitted. */ - db_seq_t seq_min; /* Min permitted. */ -}; - -/* - * Handle for a sequence object. - */ -struct __db_sequence { - DB *seq_dbp; /* DB handle for this sequence. */ - db_mutex_t mtx_seq; /* Mutex if sequence is threaded. */ - DB_SEQ_RECORD *seq_rp; /* Pointer to current data. */ - DB_SEQ_RECORD seq_record; /* Data from DB_SEQUENCE. */ - int32_t seq_cache_size; /* Number of values cached. */ - db_seq_t seq_last_value; /* Last value cached. */ - db_seq_t seq_prev_value; /* Last value returned. */ - DBT seq_key; /* DBT pointing to sequence key. */ - DBT seq_data; /* DBT pointing to seq_record. */ - - /* API-private structure: used by C++ and Java. */ - void *api_internal; - - /* DB_SEQUENCE PUBLIC HANDLE LIST BEGIN */ - int (*close) __P((DB_SEQUENCE *, u_int32_t)); - int (*get) __P((DB_SEQUENCE *, - DB_TXN *, int32_t, db_seq_t *, u_int32_t)); - int (*get_cachesize) __P((DB_SEQUENCE *, int32_t *)); - int (*get_db) __P((DB_SEQUENCE *, DB **)); - int (*get_flags) __P((DB_SEQUENCE *, u_int32_t *)); - int (*get_key) __P((DB_SEQUENCE *, DBT *)); - int (*get_range) __P((DB_SEQUENCE *, - db_seq_t *, db_seq_t *)); - int (*initial_value) __P((DB_SEQUENCE *, db_seq_t)); - int (*open) __P((DB_SEQUENCE *, - DB_TXN *, DBT *, u_int32_t)); - int (*remove) __P((DB_SEQUENCE *, DB_TXN *, u_int32_t)); - int (*set_cachesize) __P((DB_SEQUENCE *, int32_t)); - int (*set_flags) __P((DB_SEQUENCE *, u_int32_t)); - int (*set_range) __P((DB_SEQUENCE *, db_seq_t, db_seq_t)); - int (*stat) __P((DB_SEQUENCE *, - DB_SEQUENCE_STAT **, u_int32_t)); - int (*stat_print) __P((DB_SEQUENCE *, u_int32_t)); - /* DB_SEQUENCE PUBLIC HANDLE LIST END */ -}; - -struct __db_seq_stat { /* SHARED */ - uintmax_t st_wait; /* Sequence lock granted w/o wait. */ - uintmax_t st_nowait; /* Sequence lock granted after wait. */ - db_seq_t st_current; /* Current value in db. */ - db_seq_t st_value; /* Current cached value. */ - db_seq_t st_last_value; /* Last cached value. */ - db_seq_t st_min; /* Minimum value. */ - db_seq_t st_max; /* Maximum value. */ - int32_t st_cache_size; /* Cache size. */ - u_int32_t st_flags; /* Flag value. */ -}; - -/******************************************************* - * Access methods. - *******************************************************/ -/* - * Any new methods need to retain the original numbering. The type - * is written in a log record so must be maintained. - */ -typedef enum { - DB_BTREE=1, - DB_HASH=2, - DB_HEAP=6, - DB_RECNO=3, - DB_QUEUE=4, - DB_UNKNOWN=5 /* Figure it out on open. */ -} DBTYPE; - -#define DB_RENAMEMAGIC 0x030800 /* File has been renamed. */ - -#define DB_BTREEVERSION 9 /* Current btree version. */ -#define DB_BTREEOLDVER 8 /* Oldest btree version supported. */ -#define DB_BTREEMAGIC 0x053162 - -#define DB_HASHVERSION 9 /* Current hash version. */ -#define DB_HASHOLDVER 7 /* Oldest hash version supported. */ -#define DB_HASHMAGIC 0x061561 - -#define DB_HEAPVERSION 1 /* Current heap version. */ -#define DB_HEAPOLDVER 1 /* Oldest heap version supported. */ -#define DB_HEAPMAGIC 0x074582 - -#define DB_QAMVERSION 4 /* Current queue version. */ -#define DB_QAMOLDVER 3 /* Oldest queue version supported. */ -#define DB_QAMMAGIC 0x042253 - -#define DB_SEQUENCE_VERSION 2 /* Current sequence version. */ -#define DB_SEQUENCE_OLDVER 1 /* Oldest sequence version supported. */ - -/* - * DB access method and cursor operation values. Each value is an operation - * code to which additional bit flags are added. - */ -#define DB_AFTER 1 /* Dbc.put */ -#define DB_APPEND 2 /* Db.put */ -#define DB_BEFORE 3 /* Dbc.put */ -#define DB_CONSUME 4 /* Db.get */ -#define DB_CONSUME_WAIT 5 /* Db.get */ -#define DB_CURRENT 6 /* Dbc.get, Dbc.put, DbLogc.get */ -#define DB_FIRST 7 /* Dbc.get, DbLogc->get */ -#define DB_GET_BOTH 8 /* Db.get, Dbc.get */ -#define DB_GET_BOTHC 9 /* Dbc.get (internal) */ -#define DB_GET_BOTH_RANGE 10 /* Db.get, Dbc.get */ -#define DB_GET_RECNO 11 /* Dbc.get */ -#define DB_JOIN_ITEM 12 /* Dbc.get; don't do primary lookup */ -#define DB_KEYFIRST 13 /* Dbc.put */ -#define DB_KEYLAST 14 /* Dbc.put */ -#define DB_LAST 15 /* Dbc.get, DbLogc->get */ -#define DB_NEXT 16 /* Dbc.get, DbLogc->get */ -#define DB_NEXT_DUP 17 /* Dbc.get */ -#define DB_NEXT_NODUP 18 /* Dbc.get */ -#define DB_NODUPDATA 19 /* Db.put, Dbc.put */ -#define DB_NOOVERWRITE 20 /* Db.put */ -#define DB_OVERWRITE_DUP 21 /* Dbc.put, Db.put; no DB_KEYEXIST */ -#define DB_POSITION 22 /* Dbc.dup */ -#define DB_PREV 23 /* Dbc.get, DbLogc->get */ -#define DB_PREV_DUP 24 /* Dbc.get */ -#define DB_PREV_NODUP 25 /* Dbc.get */ -#define DB_SET 26 /* Dbc.get, DbLogc->get */ -#define DB_SET_RANGE 27 /* Dbc.get */ -#define DB_SET_RECNO 28 /* Db.get, Dbc.get */ -#define DB_UPDATE_SECONDARY 29 /* Dbc.get, Dbc.del (internal) */ -#define DB_SET_LTE 30 /* Dbc.get (internal) */ -#define DB_GET_BOTH_LTE 31 /* Dbc.get (internal) */ - -/* This has to change when the max opcode hits 255. */ -#define DB_OPFLAGS_MASK 0x000000ff /* Mask for operations flags. */ - -/* - * DB (user visible) error return codes. - * - * !!! - * We don't want our error returns to conflict with other packages where - * possible, so pick a base error value that's hopefully not common. We - * document that we own the error name space from -30,800 to -30,999. - */ -/* DB (public) error return codes. */ -#define DB_BUFFER_SMALL (-30999)/* User memory too small for return. */ -#define DB_DONOTINDEX (-30998)/* "Null" return from 2ndary callbk. */ -#define DB_FOREIGN_CONFLICT (-30997)/* A foreign db constraint triggered. */ -#define DB_HEAP_FULL (-30996)/* No free space in a heap file. */ -#define DB_KEYEMPTY (-30995)/* Key/data deleted or never created. */ -#define DB_KEYEXIST (-30994)/* The key/data pair already exists. */ -#define DB_LOCK_DEADLOCK (-30993)/* Deadlock. */ -#define DB_LOCK_NOTGRANTED (-30992)/* Lock unavailable. */ -#define DB_LOG_BUFFER_FULL (-30991)/* In-memory log buffer full. */ -#define DB_LOG_VERIFY_BAD (-30990)/* Log verification failed. */ -#define DB_NOSERVER (-30989)/* Server panic return. */ -#define DB_NOTFOUND (-30988)/* Key/data pair not found (EOF). */ -#define DB_OLD_VERSION (-30987)/* Out-of-date version. */ -#define DB_PAGE_NOTFOUND (-30986)/* Requested page not found. */ -#define DB_REP_DUPMASTER (-30985)/* There are two masters. */ -#define DB_REP_HANDLE_DEAD (-30984)/* Rolled back a commit. */ -#define DB_REP_HOLDELECTION (-30983)/* Time to hold an election. */ -#define DB_REP_IGNORE (-30982)/* This msg should be ignored.*/ -#define DB_REP_ISPERM (-30981)/* Cached not written perm written.*/ -#define DB_REP_JOIN_FAILURE (-30980)/* Unable to join replication group. */ -#define DB_REP_LEASE_EXPIRED (-30979)/* Master lease has expired. */ -#define DB_REP_LOCKOUT (-30978)/* API/Replication lockout now. */ -#define DB_REP_NEWSITE (-30977)/* New site entered system. */ -#define DB_REP_NOTPERM (-30976)/* Permanent log record not written. */ -#define DB_REP_UNAVAIL (-30975)/* Site cannot currently be reached. */ -#define DB_REP_WOULDROLLBACK (-30974)/* UNDOC: rollback inhibited by app. */ -#define DB_RUNRECOVERY (-30973)/* Panic return. */ -#define DB_SECONDARY_BAD (-30972)/* Secondary index corrupt. */ -#define DB_TIMEOUT (-30971)/* Timed out on read consistency. */ -#define DB_VERIFY_BAD (-30970)/* Verify failed; bad format. */ -#define DB_VERSION_MISMATCH (-30969)/* Environment version mismatch. */ -#define DB_SNAPSHOT_CONFLICT (-30968)/* SSI: conflicting snapshot update. */ -#define DB_SNAPSHOT_UNSAFE (-30967)/* SSI: potential snapshot anomaly. */ - -/* DB (private) error return codes. */ -#define DB_ALREADY_ABORTED (-30899) -#define DB_CHKSUM_FAIL (-30898)/* Checksum failed. */ -#define DB_DELETED (-30897)/* Recovery file marked deleted. */ -#define DB_EVENT_NOT_HANDLED (-30896)/* Forward event to application. */ -#define DB_NEEDSPLIT (-30895)/* Page needs to be split. */ -#define DB_REP_BULKOVF (-30894)/* Rep bulk buffer overflow. */ -#define DB_REP_LOGREADY (-30893)/* Rep log ready for recovery. */ -#define DB_REP_NEWMASTER (-30892)/* We have learned of a new master. */ -#define DB_REP_PAGEDONE (-30891)/* This page was already done. */ -#define DB_SURPRISE_KID (-30890)/* Child commit where parent - didn't know it was a parent. */ -#define DB_SWAPBYTES (-30889)/* Database needs byte swapping. */ -#define DB_TXN_CKP (-30888)/* Encountered ckp record in log. */ -#define DB_VERIFY_FATAL (-30887)/* DB->verify cannot proceed. */ - -/* Database handle. */ -struct __db { - /******************************************************* - * Public: owned by the application. - *******************************************************/ - u_int32_t pgsize; /* Database logical page size. */ - DB_CACHE_PRIORITY priority; /* Database priority in cache. */ - - /* Callbacks. */ - int (*db_append_recno) __P((DB *, DBT *, db_recno_t)); - void (*db_feedback) __P((DB *, int, int)); - int (*dup_compare) __P((DB *, const DBT *, const DBT *)); - - void *app_private; /* Application-private handle. */ - - /******************************************************* - * Private: owned by DB. - *******************************************************/ - DB_ENV *dbenv; /* Backing public environment. */ - ENV *env; /* Backing private environment. */ - - DBTYPE type; /* DB access method type. */ - - DB_MPOOLFILE *mpf; /* Backing buffer pool. */ - - db_mutex_t mutex; /* Synchronization for free threading */ - - char *fname, *dname; /* File/database passed to DB->open. */ - const char *dirname; /* Directory of DB file. */ - u_int32_t open_flags; /* Flags passed to DB->open. */ - - u_int8_t fileid[DB_FILE_ID_LEN];/* File's unique ID for locking. */ - - u_int32_t adj_fileid; /* File's unique ID for curs. adj. */ - -#define DB_LOGFILEID_INVALID -1 - FNAME *log_filename; /* File's naming info for logging. */ - - db_pgno_t meta_pgno; /* Meta page number */ - DB_LOCKER *locker; /* Locker for handle locking. */ - DB_LOCKER *cur_locker; /* Current handle lock holder. */ - DB_TXN *cur_txn; /* Opening transaction. */ - DB_LOCKER *associate_locker; /* Locker for DB->associate call. */ - DB_LOCK handle_lock; /* Lock held on this handle. */ - - time_t timestamp; /* Handle timestamp for replication. */ - u_int32_t fid_gen; /* Rep generation number for fids. */ - - /* - * Returned data memory for DB->get() and friends. - */ - DBT my_rskey; /* Secondary key. */ - DBT my_rkey; /* [Primary] key. */ - DBT my_rdata; /* Data. */ - - /* - * !!! - * Some applications use DB but implement their own locking outside of - * DB. If they're using fcntl(2) locking on the underlying database - * file, and we open and close a file descriptor for that file, we will - * discard their locks. The DB_FCNTL_LOCKING flag to DB->open is an - * undocumented interface to support this usage which leaves any file - * descriptors we open until DB->close. This will only work with the - * DB->open interface and simple caches, e.g., creating a transaction - * thread may open/close file descriptors this flag doesn't protect. - * Locking with fcntl(2) on a file that you don't own is a very, very - * unsafe thing to do. 'Nuff said. - */ - DB_FH *saved_open_fhp; /* Saved file handle. */ - - /* - * Linked list of DBP's, linked from the ENV, used to keep track - * of all open db handles for cursor adjustment. - * - * !!! - * Explicit representations of structures from queue.h. - * TAILQ_ENTRY(__db) dblistlinks; - */ - struct { - struct __db *tqe_next; - struct __db **tqe_prev; - } dblistlinks; - - /* - * Cursor queues. - * - * !!! - * Explicit representations of structures from queue.h. - * TAILQ_HEAD(__cq_fq, __dbc) free_queue; - * TAILQ_HEAD(__cq_aq, __dbc) active_queue; - * TAILQ_HEAD(__cq_jq, __dbc) join_queue; - */ - struct __cq_fq { - struct __dbc *tqh_first; - struct __dbc **tqh_last; - } free_queue; - struct __cq_aq { - struct __dbc *tqh_first; - struct __dbc **tqh_last; - } active_queue; - struct __cq_jq { - struct __dbc *tqh_first; - struct __dbc **tqh_last; - } join_queue; - - /* - * Secondary index support. - * - * Linked list of secondary indices -- set in the primary. - * - * !!! - * Explicit representations of structures from queue.h. - * LIST_HEAD(s_secondaries, __db); - */ - struct { - struct __db *lh_first; - } s_secondaries; - - /* - * List entries for secondaries, and reference count of how many - * threads are updating this secondary (see Dbc.put). - * - * !!! - * Note that these are synchronized by the primary's mutex, but - * filled in in the secondaries. - * - * !!! - * Explicit representations of structures from queue.h. - * LIST_ENTRY(__db) s_links; - */ - struct { - struct __db *le_next; - struct __db **le_prev; - } s_links; - u_int32_t s_refcnt; - - /* Secondary callback and free functions -- set in the secondary. */ - int (*s_callback) __P((DB *, const DBT *, const DBT *, DBT *)); - - /* Reference to primary -- set in the secondary. */ - DB *s_primary; - -#define DB_ASSOC_IMMUTABLE_KEY 0x00000001 /* Secondary key is immutable. */ -#define DB_ASSOC_CREATE 0x00000002 /* Secondary db populated on open. */ - - /* Flags passed to associate -- set in the secondary. */ - u_int32_t s_assoc_flags; - - /* - * Foreign key support. - * - * Linked list of primary dbs -- set in the foreign db - * - * !!! - * Explicit representations of structures from queue.h. - * LIST_HEAD(f_primaries, __db); - */ - struct { - struct __db_foreign_info *lh_first; - } f_primaries; - - /* - * !!! - * Explicit representations of structures from queue.h. - * TAILQ_ENTRY(__db) felink; - * - * Links in a list of DBs involved in file extension - * during a transaction. These are to be used only while the - * metadata is locked. - */ - struct { - struct __db *tqe_next; - struct __db **tqe_prev; - } felink; - - /* Reference to foreign -- set in the secondary. */ - DB *s_foreign; - - /* API-private structure: used by DB 1.85, C++, Java, Perl and Tcl */ - void *api_internal; - - /* Subsystem-private structure. */ - void *bt_internal; /* Btree/Recno access method. */ - void *h_internal; /* Hash access method. */ - void *heap_internal; /* Heap access method. */ - void *p_internal; /* Partition informaiton. */ - void *q_internal; /* Queue access method. */ - - /* DB PUBLIC HANDLE LIST BEGIN */ - int (*associate) __P((DB *, DB_TXN *, DB *, - int (*)(DB *, const DBT *, const DBT *, DBT *), u_int32_t)); - int (*associate_foreign) __P((DB *, DB *, - int (*)(DB *, const DBT *, DBT *, const DBT *, int *), - u_int32_t)); - int (*close) __P((DB *, u_int32_t)); - int (*compact) __P((DB *, - DB_TXN *, DBT *, DBT *, DB_COMPACT *, u_int32_t, DBT *)); - int (*cursor) __P((DB *, DB_TXN *, DBC **, u_int32_t)); - int (*del) __P((DB *, DB_TXN *, DBT *, u_int32_t)); - void (*err) __P((DB *, int, const char *, ...)); - void (*errx) __P((DB *, const char *, ...)); - int (*exists) __P((DB *, DB_TXN *, DBT *, u_int32_t)); - int (*fd) __P((DB *, int *)); - int (*get) __P((DB *, DB_TXN *, DBT *, DBT *, u_int32_t)); - int (*get_alloc) __P((DB *, void *(**)(size_t), - void *(**)(void *, size_t), void (**)(void *))); - int (*get_append_recno) __P((DB *, int (**)(DB *, DBT *, db_recno_t))); - int (*get_assoc_flags) __P((DB *, u_int32_t *)); - int (*get_bt_compare) - __P((DB *, int (**)(DB *, const DBT *, const DBT *))); - int (*get_bt_compress) __P((DB *, - int (**)(DB *, - const DBT *, const DBT *, const DBT *, const DBT *, DBT *), - int (**)(DB *, const DBT *, const DBT *, DBT *, DBT *, DBT *))); - int (*get_bt_minkey) __P((DB *, u_int32_t *)); - int (*get_bt_prefix) - __P((DB *, size_t (**)(DB *, const DBT *, const DBT *))); - int (*get_byteswapped) __P((DB *, int *)); - int (*get_cachesize) __P((DB *, u_int32_t *, u_int32_t *, int *)); - int (*get_create_dir) __P((DB *, const char **)); - int (*get_dbname) __P((DB *, const char **, const char **)); - int (*get_dup_compare) - __P((DB *, int (**)(DB *, const DBT *, const DBT *))); - int (*get_encrypt_flags) __P((DB *, u_int32_t *)); - DB_ENV *(*get_env) __P((DB *)); - void (*get_errcall) __P((DB *, - void (**)(const DB_ENV *, const char *, const char *))); - void (*get_errfile) __P((DB *, FILE **)); - void (*get_errpfx) __P((DB *, const char **)); - int (*get_feedback) __P((DB *, void (**)(DB *, int, int))); - int (*get_flags) __P((DB *, u_int32_t *)); - int (*get_h_compare) - __P((DB *, int (**)(DB *, const DBT *, const DBT *))); - int (*get_h_ffactor) __P((DB *, u_int32_t *)); - int (*get_h_hash) - __P((DB *, u_int32_t (**)(DB *, const void *, u_int32_t))); - int (*get_h_nelem) __P((DB *, u_int32_t *)); - int (*get_heapsize) __P((DB *, u_int32_t *, u_int32_t *)); - int (*get_heap_regionsize) __P((DB *, u_int32_t *)); - int (*get_lk_exclusive) __P((DB *, int *, int *)); - int (*get_lorder) __P((DB *, int *)); - DB_MPOOLFILE *(*get_mpf) __P((DB *)); - void (*get_msgcall) __P((DB *, - void (**)(const DB_ENV *, const char *))); - void (*get_msgfile) __P((DB *, FILE **)); - int (*get_multiple) __P((DB *)); - int (*get_open_flags) __P((DB *, u_int32_t *)); - int (*get_pagesize) __P((DB *, u_int32_t *)); - int (*get_partition_callback) __P((DB *, - u_int32_t *, u_int32_t (**)(DB *, DBT *key))); - int (*get_partition_dirs) __P((DB *, const char ***)); - int (*get_partition_keys) __P((DB *, u_int32_t *, DBT **)); - int (*get_priority) __P((DB *, DB_CACHE_PRIORITY *)); - int (*get_q_extentsize) __P((DB *, u_int32_t *)); - int (*get_re_delim) __P((DB *, int *)); - int (*get_re_len) __P((DB *, u_int32_t *)); - int (*get_re_pad) __P((DB *, int *)); - int (*get_re_source) __P((DB *, const char **)); - int (*get_transactional) __P((DB *)); - int (*get_type) __P((DB *, DBTYPE *)); - int (*join) __P((DB *, DBC **, DBC **, u_int32_t)); - int (*key_range) - __P((DB *, DB_TXN *, DBT *, DB_KEY_RANGE *, u_int32_t)); - int (*open) __P((DB *, - DB_TXN *, const char *, const char *, DBTYPE, u_int32_t, int)); - int (*pget) __P((DB *, DB_TXN *, DBT *, DBT *, DBT *, u_int32_t)); - int (*put) __P((DB *, DB_TXN *, DBT *, DBT *, u_int32_t)); - int (*remove) __P((DB *, const char *, const char *, u_int32_t)); - int (*rename) __P((DB *, - const char *, const char *, const char *, u_int32_t)); - int (*set_alloc) __P((DB *, void *(*)(size_t), - void *(*)(void *, size_t), void (*)(void *))); - int (*set_append_recno) __P((DB *, int (*)(DB *, DBT *, db_recno_t))); - int (*set_bt_compare) - __P((DB *, int (*)(DB *, const DBT *, const DBT *))); - int (*set_bt_compress) __P((DB *, - int (*)(DB *, const DBT *, const DBT *, const DBT *, const DBT *, DBT *), - int (*)(DB *, const DBT *, const DBT *, DBT *, DBT *, DBT *))); - int (*set_bt_minkey) __P((DB *, u_int32_t)); - int (*set_bt_prefix) - __P((DB *, size_t (*)(DB *, const DBT *, const DBT *))); - int (*set_cachesize) __P((DB *, u_int32_t, u_int32_t, int)); - int (*set_create_dir) __P((DB *, const char *)); - int (*set_dup_compare) - __P((DB *, int (*)(DB *, const DBT *, const DBT *))); - int (*set_encrypt) __P((DB *, const char *, u_int32_t)); - void (*set_errcall) __P((DB *, - void (*)(const DB_ENV *, const char *, const char *))); - void (*set_errfile) __P((DB *, FILE *)); - void (*set_errpfx) __P((DB *, const char *)); - int (*set_feedback) __P((DB *, void (*)(DB *, int, int))); - int (*set_flags) __P((DB *, u_int32_t)); - int (*set_h_compare) - __P((DB *, int (*)(DB *, const DBT *, const DBT *))); - int (*set_h_ffactor) __P((DB *, u_int32_t)); - int (*set_h_hash) - __P((DB *, u_int32_t (*)(DB *, const void *, u_int32_t))); - int (*set_h_nelem) __P((DB *, u_int32_t)); - int (*set_heapsize) __P((DB *, u_int32_t, u_int32_t, u_int32_t)); - int (*set_heap_regionsize) __P((DB *, u_int32_t)); - int (*set_lk_exclusive) __P((DB *, int)); - int (*set_lorder) __P((DB *, int)); - void (*set_msgcall) __P((DB *, void (*)(const DB_ENV *, const char *))); - void (*set_msgfile) __P((DB *, FILE *)); - int (*set_pagesize) __P((DB *, u_int32_t)); - int (*set_paniccall) __P((DB *, void (*)(DB_ENV *, int))); - int (*set_partition) __P((DB *, - u_int32_t, DBT *, u_int32_t (*)(DB *, DBT *key))); - int (*set_partition_dirs) __P((DB *, const char **)); - int (*set_priority) __P((DB *, DB_CACHE_PRIORITY)); - int (*set_q_extentsize) __P((DB *, u_int32_t)); - int (*set_re_delim) __P((DB *, int)); - int (*set_re_len) __P((DB *, u_int32_t)); - int (*set_re_pad) __P((DB *, int)); - int (*set_re_source) __P((DB *, const char *)); - int (*sort_multiple) __P((DB *, DBT *, DBT *, u_int32_t)); - int (*stat) __P((DB *, DB_TXN *, void *, u_int32_t)); - int (*stat_print) __P((DB *, u_int32_t)); - int (*sync) __P((DB *, u_int32_t)); - int (*truncate) __P((DB *, DB_TXN *, u_int32_t *, u_int32_t)); - int (*upgrade) __P((DB *, const char *, u_int32_t)); - int (*verify) - __P((DB *, const char *, const char *, FILE *, u_int32_t)); - /* DB PUBLIC HANDLE LIST END */ - - /* DB PRIVATE HANDLE LIST BEGIN */ - int (*dump) __P((DB *, const char *, - int (*)(void *, const void *), void *, int, int)); - int (*db_am_remove) __P((DB *, DB_THREAD_INFO *, - DB_TXN *, const char *, const char *, u_int32_t)); - int (*db_am_rename) __P((DB *, DB_THREAD_INFO *, - DB_TXN *, const char *, const char *, const char *)); - /* DB PRIVATE HANDLE LIST END */ - - /* - * Never called; these are a place to save function pointers - * so that we can undo an associate. - */ - int (*stored_get) __P((DB *, DB_TXN *, DBT *, DBT *, u_int32_t)); - int (*stored_close) __P((DB *, u_int32_t)); - - /* Alternative handle close function, used by C++ API. */ - int (*alt_close) __P((DB *, u_int32_t)); - -#define DB_OK_BTREE 0x01 -#define DB_OK_HASH 0x02 -#define DB_OK_HEAP 0x04 -#define DB_OK_QUEUE 0x08 -#define DB_OK_RECNO 0x10 - u_int32_t am_ok; /* Legal AM choices. */ - - /* - * This field really ought to be an AM_FLAG, but we have - * have run out of bits. If/when we decide to split up - * the flags, we can incorporate it. - */ - int preserve_fid; /* Do not free fileid on close. */ - -#define DB_AM_CHKSUM 0x00000001 /* Checksumming */ -#define DB_AM_COMPENSATE 0x00000002 /* Created by compensating txn */ -#define DB_AM_COMPRESS 0x00000004 /* Compressed BTree */ -#define DB_AM_CREATED 0x00000008 /* Database was created upon open */ -#define DB_AM_CREATED_MSTR 0x00000010 /* Encompassing file was created */ -#define DB_AM_DBM_ERROR 0x00000020 /* Error in DBM/NDBM database */ -#define DB_AM_DELIMITER 0x00000040 /* Variable length delimiter set */ -#define DB_AM_DISCARD 0x00000080 /* Discard any cached pages */ -#define DB_AM_DUP 0x00000100 /* DB_DUP */ -#define DB_AM_DUPSORT 0x00000200 /* DB_DUPSORT */ -#define DB_AM_ENCRYPT 0x00000400 /* Encryption */ -#define DB_AM_FIXEDLEN 0x00000800 /* Fixed-length records */ -#define DB_AM_INMEM 0x00001000 /* In-memory; no sync on close */ -#define DB_AM_INORDER 0x00002000 /* DB_INORDER */ -#define DB_AM_IN_RENAME 0x00004000 /* File is being renamed */ -#define DB_AM_NOT_DURABLE 0x00008000 /* Do not log changes */ -#define DB_AM_OPEN_CALLED 0x00010000 /* DB->open called */ -#define DB_AM_PAD 0x00020000 /* Fixed-length record pad */ -#define DB_AM_PARTDB 0x00040000 /* Handle for a database partition */ -#define DB_AM_PGDEF 0x00080000 /* Page size was defaulted */ -#define DB_AM_RDONLY 0x00100000 /* Database is readonly */ -#define DB_AM_READ_UNCOMMITTED 0x00200000 /* Support degree 1 isolation */ -#define DB_AM_RECNUM 0x00400000 /* DB_RECNUM */ -#define DB_AM_RECOVER 0x00800000 /* DB opened by recovery routine */ -#define DB_AM_RENUMBER 0x01000000 /* DB_RENUMBER */ -#define DB_AM_REVSPLITOFF 0x02000000 /* DB_REVSPLITOFF */ -#define DB_AM_SECONDARY 0x04000000 /* Database is a secondary index */ -#define DB_AM_SNAPSHOT 0x08000000 /* DB_SNAPSHOT */ -#define DB_AM_SUBDB 0x10000000 /* Subdatabases supported */ -#define DB_AM_SWAP 0x20000000 /* Pages need to be byte-swapped */ -#define DB_AM_TXN 0x40000000 /* Opened in a transaction */ -#define DB_AM_VERIFYING 0x80000000 /* DB handle is in the verifier */ - u_int32_t orig_flags; /* Flags at open, for refresh */ - u_int32_t flags; - -#define DB2_AM_EXCL 0x00000001 /* Exclusively lock the handle */ -#define DB2_AM_INTEXCL 0x00000002 /* Internal exclusive lock. */ -#define DB2_AM_NOWAIT 0x00000004 /* Do not wait for handle lock */ - u_int32_t orig_flags2; /* Second flags word; for refresh */ - u_int32_t flags2; /* Second flags word */ -}; - -/* - * Macros for bulk operations. These are only intended for the C API. - * For C++, use DbMultiple*Iterator or DbMultiple*Builder. - * - * Bulk operations store multiple entries into a single DBT structure. The - * following macros assist with creating and reading these Multiple DBTs. - * - * The basic layout for single data items is: - * - * ------------------------------------------------------------------------- - * | data1 | ... | dataN | ..... |-1 | dNLen | dNOff | ... | d1Len | d1Off | - * ------------------------------------------------------------------------- - * - * For the DB_MULTIPLE_KEY* macros, the items are in key/data pairs, so data1 - * would be a key, and data2 its corresponding value (N is always even). - * - * For the DB_MULTIPLE_RECNO* macros, the record number is stored along with - * the len/off pair in the "header" section, and the list is zero terminated - * (since -1 is a valid record number): - * - * -------------------------------------------------------------------------- - * | d1 |..| dN |..| 0 | dNLen | dNOff | recnoN |..| d1Len | d1Off | recno1 | - * -------------------------------------------------------------------------- - */ -#define DB_MULTIPLE_INIT(pointer, dbt) \ - (pointer = (u_int8_t *)(dbt)->data + \ - (dbt)->ulen - sizeof(u_int32_t)) - -#define DB_MULTIPLE_NEXT(pointer, dbt, retdata, retdlen) \ - do { \ - u_int32_t *__p = (u_int32_t *)(pointer); \ - if (*__p == (u_int32_t)-1) { \ - retdata = NULL; \ - pointer = NULL; \ - break; \ - } \ - retdata = (u_int8_t *)(dbt)->data + *__p--; \ - retdlen = *__p--; \ - pointer = __p; \ - if (retdlen == 0 && retdata == (u_int8_t *)(dbt)->data) \ - retdata = NULL; \ - } while (0) - -#define DB_MULTIPLE_KEY_NEXT(pointer, dbt, retkey, retklen, retdata, retdlen) \ - do { \ - u_int32_t *__p = (u_int32_t *)(pointer); \ - if (*__p == (u_int32_t)-1) { \ - retdata = NULL; \ - retkey = NULL; \ - pointer = NULL; \ - break; \ - } \ - retkey = (u_int8_t *)(dbt)->data + *__p--; \ - retklen = *__p--; \ - retdata = (u_int8_t *)(dbt)->data + *__p--; \ - retdlen = *__p--; \ - pointer = __p; \ - } while (0) - -#define DB_MULTIPLE_RECNO_NEXT(pointer, dbt, recno, retdata, retdlen) \ - do { \ - u_int32_t *__p = (u_int32_t *)(pointer); \ - if (*__p == (u_int32_t)0) { \ - recno = 0; \ - retdata = NULL; \ - pointer = NULL; \ - break; \ - } \ - recno = *__p--; \ - retdata = (u_int8_t *)(dbt)->data + *__p--; \ - retdlen = *__p--; \ - pointer = __p; \ - } while (0) - -#define DB_MULTIPLE_WRITE_INIT(pointer, dbt) \ - do { \ - (dbt)->flags |= DB_DBT_BULK; \ - pointer = (u_int8_t *)(dbt)->data + \ - (dbt)->ulen - sizeof(u_int32_t); \ - *(u_int32_t *)(pointer) = (u_int32_t)-1; \ - } while (0) - -#define DB_MULTIPLE_RESERVE_NEXT(pointer, dbt, writedata, writedlen) \ - do { \ - u_int32_t *__p = (u_int32_t *)(pointer); \ - u_int32_t __off = ((pointer) == (u_int8_t *)(dbt)->data +\ - (dbt)->ulen - sizeof(u_int32_t)) ? 0 : __p[1] + __p[2];\ - if ((u_int8_t *)(dbt)->data + __off + (writedlen) > \ - (u_int8_t *)(__p - 2)) \ - writedata = NULL; \ - else { \ - writedata = (u_int8_t *)(dbt)->data + __off; \ - __p[0] = __off; \ - __p[-1] = (u_int32_t)(writedlen); \ - __p[-2] = (u_int32_t)-1; \ - pointer = __p - 2; \ - } \ - } while (0) - -#define DB_MULTIPLE_WRITE_NEXT(pointer, dbt, writedata, writedlen) \ - do { \ - void *__destd; \ - DB_MULTIPLE_RESERVE_NEXT((pointer), (dbt), \ - __destd, (writedlen)); \ - if (__destd == NULL) \ - pointer = NULL; \ - else \ - memcpy(__destd, (writedata), (writedlen)); \ - } while (0) - -#define DB_MULTIPLE_KEY_RESERVE_NEXT(pointer, dbt, writekey, writeklen, writedata, writedlen) \ - do { \ - u_int32_t *__p = (u_int32_t *)(pointer); \ - u_int32_t __off = ((pointer) == (u_int8_t *)(dbt)->data +\ - (dbt)->ulen - sizeof(u_int32_t)) ? 0 : __p[1] + __p[2];\ - if ((u_int8_t *)(dbt)->data + __off + (writeklen) + \ - (writedlen) > (u_int8_t *)(__p - 4)) { \ - writekey = NULL; \ - writedata = NULL; \ - } else { \ - writekey = (u_int8_t *)(dbt)->data + __off; \ - __p[0] = __off; \ - __p[-1] = (u_int32_t)(writeklen); \ - __p -= 2; \ - __off += (u_int32_t)(writeklen); \ - writedata = (u_int8_t *)(dbt)->data + __off; \ - __p[0] = __off; \ - __p[-1] = (u_int32_t)(writedlen); \ - __p[-2] = (u_int32_t)-1; \ - pointer = __p - 2; \ - } \ - } while (0) - -#define DB_MULTIPLE_KEY_WRITE_NEXT(pointer, dbt, writekey, writeklen, writedata, writedlen) \ - do { \ - void *__destk, *__destd; \ - DB_MULTIPLE_KEY_RESERVE_NEXT((pointer), (dbt), \ - __destk, (writeklen), __destd, (writedlen)); \ - if (__destk == NULL) \ - pointer = NULL; \ - else { \ - memcpy(__destk, (writekey), (writeklen)); \ - if (__destd != NULL) \ - memcpy(__destd, (writedata), (writedlen));\ - } \ - } while (0) - -#define DB_MULTIPLE_RECNO_WRITE_INIT(pointer, dbt) \ - do { \ - (dbt)->flags |= DB_DBT_BULK; \ - pointer = (u_int8_t *)(dbt)->data + \ - (dbt)->ulen - sizeof(u_int32_t); \ - *(u_int32_t *)(pointer) = 0; \ - } while (0) - -#define DB_MULTIPLE_RECNO_RESERVE_NEXT(pointer, dbt, recno, writedata, writedlen) \ - do { \ - u_int32_t *__p = (u_int32_t *)(pointer); \ - u_int32_t __off = ((pointer) == (u_int8_t *)(dbt)->data +\ - (dbt)->ulen - sizeof(u_int32_t)) ? 0 : __p[1] + __p[2]; \ - if (((u_int8_t *)(dbt)->data + __off) + (writedlen) > \ - (u_int8_t *)(__p - 3)) \ - writedata = NULL; \ - else { \ - writedata = (u_int8_t *)(dbt)->data + __off; \ - __p[0] = (u_int32_t)(recno); \ - __p[-1] = __off; \ - __p[-2] = (u_int32_t)(writedlen); \ - __p[-3] = 0; \ - pointer = __p - 3; \ - } \ - } while (0) - -#define DB_MULTIPLE_RECNO_WRITE_NEXT(pointer, dbt, recno, writedata, writedlen)\ - do { \ - void *__destd; \ - DB_MULTIPLE_RECNO_RESERVE_NEXT((pointer), (dbt), \ - (recno), __destd, (writedlen)); \ - if (__destd == NULL) \ - pointer = NULL; \ - else if ((writedlen) != 0) \ - memcpy(__destd, (writedata), (writedlen)); \ - } while (0) - -struct __db_heap_rid { - db_pgno_t pgno; /* Page number. */ - db_indx_t indx; /* Index in the offset table. */ -}; -#define DB_HEAP_RID_SZ (sizeof(db_pgno_t) + sizeof(db_indx_t)) - -/******************************************************* - * Access method cursors. - *******************************************************/ -struct __dbc { - DB *dbp; /* Backing database */ - DB_ENV *dbenv; /* Backing environment */ - ENV *env; /* Backing environment */ - - DB_THREAD_INFO *thread_info; /* Thread that owns this cursor. */ - DB_TXN *txn; /* Associated transaction. */ - DB_CACHE_PRIORITY priority; /* Priority in cache. */ - - /* - * Active/free cursor queues. - * - * !!! - * Explicit representations of structures from queue.h. - * TAILQ_ENTRY(__dbc) links; - */ - struct { - DBC *tqe_next; - DBC **tqe_prev; - } links; - - /* - * Cursor queue of the owning transaction. - * - * !!! - * Explicit representations of structures from queue.h. - * TAILQ_ENTRY(__dbc) txn_cursors; - */ - struct { - DBC *tqe_next; /* next element */ - DBC **tqe_prev; /* address of previous next element */ - } txn_cursors; - - /* - * The DBT *'s below are used by the cursor routines to return - * data to the user when DBT flags indicate that DB should manage - * the returned memory. They point at a DBT containing the buffer - * and length that will be used, and "belonging" to the handle that - * should "own" this memory. This may be a "my_*" field of this - * cursor--the default--or it may be the corresponding field of - * another cursor, a DB handle, a join cursor, etc. In general, it - * will be whatever handle the user originally used for the current - * DB interface call. - */ - DBT *rskey; /* Returned secondary key. */ - DBT *rkey; /* Returned [primary] key. */ - DBT *rdata; /* Returned data. */ - - DBT my_rskey; /* Space for returned secondary key. */ - DBT my_rkey; /* Space for returned [primary] key. */ - DBT my_rdata; /* Space for returned data. */ - - DB_LOCKER *lref; /* Reference to default locker. */ - DB_LOCKER *locker; /* Locker for this operation. */ - DBT lock_dbt; /* DBT referencing lock. */ - DB_LOCK_ILOCK lock; /* Object to be locked. */ - DB_LOCK mylock; /* CDB lock held on this cursor. */ - - DBTYPE dbtype; /* Cursor type. */ - - DBC_INTERNAL *internal; /* Access method private. */ - - /* DBC PUBLIC HANDLE LIST BEGIN */ - int (*close) __P((DBC *)); - int (*cmp) __P((DBC *, DBC *, int *, u_int32_t)); - int (*count) __P((DBC *, db_recno_t *, u_int32_t)); - int (*del) __P((DBC *, u_int32_t)); - int (*dup) __P((DBC *, DBC **, u_int32_t)); - int (*get) __P((DBC *, DBT *, DBT *, u_int32_t)); - int (*get_priority) __P((DBC *, DB_CACHE_PRIORITY *)); - int (*pget) __P((DBC *, DBT *, DBT *, DBT *, u_int32_t)); - int (*put) __P((DBC *, DBT *, DBT *, u_int32_t)); - int (*set_priority) __P((DBC *, DB_CACHE_PRIORITY)); - /* DBC PUBLIC HANDLE LIST END */ - - /* The following are the method names deprecated in the 4.6 release. */ - int (*c_close) __P((DBC *)); - int (*c_count) __P((DBC *, db_recno_t *, u_int32_t)); - int (*c_del) __P((DBC *, u_int32_t)); - int (*c_dup) __P((DBC *, DBC **, u_int32_t)); - int (*c_get) __P((DBC *, DBT *, DBT *, u_int32_t)); - int (*c_pget) __P((DBC *, DBT *, DBT *, DBT *, u_int32_t)); - int (*c_put) __P((DBC *, DBT *, DBT *, u_int32_t)); - - /* DBC PRIVATE HANDLE LIST BEGIN */ - int (*am_bulk) __P((DBC *, DBT *, u_int32_t)); - int (*am_close) __P((DBC *, db_pgno_t, int *)); - int (*am_del) __P((DBC *, u_int32_t)); - int (*am_destroy) __P((DBC *)); - int (*am_get) __P((DBC *, DBT *, DBT *, u_int32_t, db_pgno_t *)); - int (*am_put) __P((DBC *, DBT *, DBT *, u_int32_t, db_pgno_t *)); - int (*am_writelock) __P((DBC *)); - /* DBC PRIVATE HANDLE LIST END */ - -/* - * DBC_DONTLOCK and DBC_RECOVER are used during recovery and transaction - * abort. If a transaction is being aborted or recovered then DBC_RECOVER - * will be set and locking and logging will be disabled on this cursor. If - * we are performing a compensating transaction (e.g. free page processing) - * then DB_DONTLOCK will be set to inhibit locking, but logging will still - * be required. DB_DONTLOCK is also used if the whole database is locked. - */ -#define DBC_ACTIVE 0x00001 /* Cursor in use. */ -#define DBC_BULK 0x00002 /* Bulk update cursor. */ -#define DBC_DONTLOCK 0x00004 /* Don't lock on this cursor. */ -#define DBC_DOWNREV 0x00008 /* Down rev replication master. */ -#define DBC_DUPLICATE 0x00010 /* Create a duplicate cursor. */ -#define DBC_ERROR 0x00020 /* Error in this request. */ -#define DBC_FAMILY 0x00040 /* Part of a locker family. */ -#define DBC_FROM_DB_GET 0x00080 /* Called from the DB->get() method. */ -#define DBC_MULTIPLE 0x00100 /* Return Multiple data. */ -#define DBC_MULTIPLE_KEY 0x00200 /* Return Multiple keys and data. */ -#define DBC_OPD 0x00400 /* Cursor references off-page dups. */ -#define DBC_OWN_LID 0x00800 /* Free lock id on destroy. */ -#define DBC_PARTITIONED 0x01000 /* Cursor for a partitioned db. */ -#define DBC_READ_COMMITTED 0x02000 /* Cursor has degree 2 isolation. */ -#define DBC_READ_UNCOMMITTED 0x04000 /* Cursor has degree 1 isolation. */ -#define DBC_RECOVER 0x08000 /* Recovery cursor; don't log/lock. */ -#define DBC_RMW 0x10000 /* Acquire write flag in read op. */ -#define DBC_TRANSIENT 0x20000 /* Cursor is transient. */ -#define DBC_WAS_READ_COMMITTED 0x40000 /* Cursor holds a read commited lock. */ -#define DBC_WRITECURSOR 0x80000 /* Cursor may be used to write (CDB). */ -#define DBC_WRITER 0x100000 /* Cursor immediately writing (CDB). */ - u_int32_t flags; -}; - -/* Key range statistics structure */ -struct __key_range { - double less; - double equal; - double greater; -}; - -/* Btree/Recno statistics structure. */ -struct __db_bt_stat { /* SHARED */ - u_int32_t bt_magic; /* Magic number. */ - u_int32_t bt_version; /* Version number. */ - u_int32_t bt_metaflags; /* Metadata flags. */ - u_int32_t bt_nkeys; /* Number of unique keys. */ - u_int32_t bt_ndata; /* Number of data items. */ - u_int32_t bt_pagecnt; /* Page count. */ - u_int32_t bt_pagesize; /* Page size. */ - u_int32_t bt_minkey; /* Minkey value. */ - u_int32_t bt_re_len; /* Fixed-length record length. */ - u_int32_t bt_re_pad; /* Fixed-length record pad. */ - u_int32_t bt_levels; /* Tree levels. */ - u_int32_t bt_int_pg; /* Internal pages. */ - u_int32_t bt_leaf_pg; /* Leaf pages. */ - u_int32_t bt_dup_pg; /* Duplicate pages. */ - u_int32_t bt_over_pg; /* Overflow pages. */ - u_int32_t bt_empty_pg; /* Empty pages. */ - u_int32_t bt_free; /* Pages on the free list. */ - uintmax_t bt_int_pgfree; /* Bytes free in internal pages. */ - uintmax_t bt_leaf_pgfree; /* Bytes free in leaf pages. */ - uintmax_t bt_dup_pgfree; /* Bytes free in duplicate pages. */ - uintmax_t bt_over_pgfree; /* Bytes free in overflow pages. */ -}; - -struct __db_compact { - /* Input Parameters. */ - u_int32_t compact_fillpercent; /* Desired fillfactor: 1-100 */ - db_timeout_t compact_timeout; /* Lock timeout. */ - u_int32_t compact_pages; /* Max pages to process. */ - /* Output Stats. */ - u_int32_t compact_empty_buckets; /* Empty hash buckets found. */ - u_int32_t compact_pages_free; /* Number of pages freed. */ - u_int32_t compact_pages_examine; /* Number of pages examine. */ - u_int32_t compact_levels; /* Number of levels removed. */ - u_int32_t compact_deadlock; /* Number of deadlocks. */ - db_pgno_t compact_pages_truncated; /* Pages truncated to OS. */ - /* Internal. */ - db_pgno_t compact_truncate; /* Exchange pages above here. */ -}; - -/* Hash statistics structure. */ -struct __db_h_stat { /* SHARED */ - u_int32_t hash_magic; /* Magic number. */ - u_int32_t hash_version; /* Version number. */ - u_int32_t hash_metaflags; /* Metadata flags. */ - u_int32_t hash_nkeys; /* Number of unique keys. */ - u_int32_t hash_ndata; /* Number of data items. */ - u_int32_t hash_pagecnt; /* Page count. */ - u_int32_t hash_pagesize; /* Page size. */ - u_int32_t hash_ffactor; /* Fill factor specified at create. */ - u_int32_t hash_buckets; /* Number of hash buckets. */ - u_int32_t hash_free; /* Pages on the free list. */ - uintmax_t hash_bfree; /* Bytes free on bucket pages. */ - u_int32_t hash_bigpages; /* Number of big key/data pages. */ - uintmax_t hash_big_bfree; /* Bytes free on big item pages. */ - u_int32_t hash_overflows; /* Number of overflow pages. */ - uintmax_t hash_ovfl_free; /* Bytes free on ovfl pages. */ - u_int32_t hash_dup; /* Number of dup pages. */ - uintmax_t hash_dup_free; /* Bytes free on duplicate pages. */ -}; - -/* Heap statistics structure. */ -struct __db_heap_stat { /* SHARED */ - u_int32_t heap_magic; /* Magic number. */ - u_int32_t heap_version; /* Version number. */ - u_int32_t heap_metaflags; /* Metadata flags. */ - u_int32_t heap_nrecs; /* Number of records. */ - u_int32_t heap_pagecnt; /* Page count. */ - u_int32_t heap_pagesize; /* Page size. */ - u_int32_t heap_nregions; /* Number of regions. */ - u_int32_t heap_regionsize; /* Number of pages in a region. */ -}; - -/* Queue statistics structure. */ -struct __db_qam_stat { /* SHARED */ - u_int32_t qs_magic; /* Magic number. */ - u_int32_t qs_version; /* Version number. */ - u_int32_t qs_metaflags; /* Metadata flags. */ - u_int32_t qs_nkeys; /* Number of unique keys. */ - u_int32_t qs_ndata; /* Number of data items. */ - u_int32_t qs_pagesize; /* Page size. */ - u_int32_t qs_extentsize; /* Pages per extent. */ - u_int32_t qs_pages; /* Data pages. */ - u_int32_t qs_re_len; /* Fixed-length record length. */ - u_int32_t qs_re_pad; /* Fixed-length record pad. */ - u_int32_t qs_pgfree; /* Bytes free in data pages. */ - u_int32_t qs_first_recno; /* First not deleted record. */ - u_int32_t qs_cur_recno; /* Next available record number. */ -}; - -/******************************************************* - * Environment. - *******************************************************/ -#define DB_REGION_MAGIC 0x120897 /* Environment magic number. */ - -/* - * Database environment structure. - * - * This is the public database environment handle. The private environment - * handle is the ENV structure. The user owns this structure, the library - * owns the ENV structure. The reason there are two structures is because - * the user's configuration outlives any particular DB_ENV->open call, and - * separate structures allows us to easily discard internal information without - * discarding the user's configuration. - * - * Fields in the DB_ENV structure should normally be set only by application - * DB_ENV handle methods. - */ - -/* - * Memory configuration types. - */ -typedef enum { - DB_MEM_LOCK=1, - DB_MEM_LOCKOBJECT=2, - DB_MEM_LOCKER=3, - DB_MEM_LOGID=4, - DB_MEM_TRANSACTION=5, - DB_MEM_THREAD=6 -} DB_MEM_CONFIG; - -/* - * Backup configuration types. - */ -typedef enum { - DB_BACKUP_READ_COUNT = 1, - DB_BACKUP_READ_SLEEP = 2, - DB_BACKUP_SIZE = 3, - DB_BACKUP_WRITE_DIRECT = 4 -} DB_BACKUP_CONFIG; - -struct __db_env { - ENV *env; /* Linked ENV structure */ - - /* - * The DB_ENV structure can be used concurrently, so field access is - * protected. - */ - db_mutex_t mtx_db_env; /* DB_ENV structure mutex */ - - /* Error message callback */ - void (*db_errcall) __P((const DB_ENV *, const char *, const char *)); - FILE *db_errfile; /* Error message file stream */ - const char *db_errpfx; /* Error message prefix */ - - /* Other message callback */ - void (*db_msgcall) __P((const DB_ENV *, const char *)); - FILE *db_msgfile; /* Other message file stream */ - - /* Other application callback functions */ - int (*app_dispatch) __P((DB_ENV *, DBT *, DB_LSN *, db_recops)); - void (*db_event_func) __P((DB_ENV *, u_int32_t, void *)); - void (*db_feedback) __P((DB_ENV *, int, int)); - void (*db_free) __P((void *)); - void (*db_paniccall) __P((DB_ENV *, int)); - void *(*db_malloc) __P((size_t)); - void *(*db_realloc) __P((void *, size_t)); - int (*is_alive) __P((DB_ENV *, pid_t, db_threadid_t, u_int32_t)); - void (*thread_id) __P((DB_ENV *, pid_t *, db_threadid_t *)); - char *(*thread_id_string) __P((DB_ENV *, pid_t, db_threadid_t, char *)); - - /* Application specified paths */ - char *db_log_dir; /* Database log file directory */ - char *db_md_dir; /* Persistent metadata directory */ - char *db_tmp_dir; /* Database tmp file directory */ - - char *db_create_dir; /* Create directory for data files */ - char **db_data_dir; /* Database data file directories */ - int data_cnt; /* Database data file slots */ - int data_next; /* Next database data file slot */ - - char *intermediate_dir_mode; /* Intermediate directory perms */ - - long shm_key; /* shmget key */ - - char *passwd; /* Cryptography support */ - size_t passwd_len; - - /* Private handle references */ - void *app_private; /* Application-private handle */ - void *api1_internal; /* C++, Perl API private */ - void *api2_internal; /* Java API private */ - - u_int32_t verbose; /* DB_VERB_XXX flags */ - - /* Mutex configuration */ - u_int32_t mutex_align; /* Mutex alignment */ - u_int32_t mutex_cnt; /* Number of mutexes to configure */ - u_int32_t mutex_inc; /* Number of mutexes to add */ - u_int32_t mutex_max; /* Max number of mutexes */ - u_int32_t mutex_tas_spins;/* Test-and-set spin count */ - - /* Locking configuration */ - u_int8_t *lk_conflicts; /* Two dimensional conflict matrix */ - int lk_modes; /* Number of lock modes in table */ - u_int32_t lk_detect; /* Deadlock detect on all conflicts */ - u_int32_t lk_max; /* Maximum number of locks */ - u_int32_t lk_max_lockers;/* Maximum number of lockers */ - u_int32_t lk_max_objects;/* Maximum number of locked objects */ - u_int32_t lk_init; /* Initial number of locks */ - u_int32_t lk_init_lockers;/* Initial number of lockers */ - u_int32_t lk_init_objects;/* Initial number of locked objects */ - u_int32_t lk_partitions ;/* Number of object partitions */ - db_timeout_t lk_timeout; /* Lock timeout period */ - /* Used during initialization */ - u_int32_t locker_t_size; /* Locker hash table size. */ - u_int32_t object_t_size; /* Object hash table size. */ - - /* Logging configuration */ - u_int32_t lg_bsize; /* Buffer size */ - u_int32_t lg_fileid_init; /* Initial allocation for fname structs */ - int lg_filemode; /* Log file permission mode */ - u_int32_t lg_regionmax; /* Region size */ - u_int32_t lg_size; /* Log file size */ - u_int32_t lg_flags; /* Log configuration */ - - /* Memory pool configuration */ - u_int32_t mp_gbytes; /* Cache size: GB */ - u_int32_t mp_bytes; /* Cache size: bytes */ - u_int32_t mp_max_gbytes; /* Maximum cache size: GB */ - u_int32_t mp_max_bytes; /* Maximum cache size: bytes */ - size_t mp_mmapsize; /* Maximum file size for mmap */ - int mp_maxopenfd; /* Maximum open file descriptors */ - int mp_maxwrite; /* Maximum buffers to write */ - u_int mp_ncache; /* Initial number of cache regions */ - u_int32_t mp_pagesize; /* Average page size */ - u_int32_t mp_tablesize; /* Approximate hash table size */ - u_int32_t mp_mtxcount; /* Number of mutexs */ - /* Sleep after writing max buffers */ - db_timeout_t mp_maxwrite_sleep; - - /* Transaction configuration */ - u_int32_t tx_init; /* Initial number of transactions */ - u_int32_t tx_max; /* Maximum number of transactions */ - time_t tx_timestamp; /* Recover to specific timestamp */ - db_timeout_t tx_timeout; /* Timeout for transactions */ - - /* Thread tracking configuration */ - u_int32_t thr_init; /* Thread count */ - u_int32_t thr_max; /* Thread max */ - roff_t memory_max; /* Maximum region memory */ - - /* - * The following fields are not strictly user-owned, but they outlive - * the ENV structure, and so are stored here. - */ - DB_FH *registry; /* DB_REGISTER file handle */ - u_int32_t registry_off; /* - * Offset of our slot. We can't use - * off_t because its size depends on - * build settings. - */ - db_timeout_t envreg_timeout; /* DB_REGISTER wait timeout */ - -#define DB_ENV_AUTO_COMMIT 0x00000001 /* DB_AUTO_COMMIT */ -#define DB_ENV_CDB_ALLDB 0x00000002 /* CDB environment wide locking */ -#define DB_ENV_FAILCHK 0x00000004 /* Failchk is running */ -#define DB_ENV_DIRECT_DB 0x00000008 /* DB_DIRECT_DB set */ -#define DB_ENV_DSYNC_DB 0x00000010 /* DB_DSYNC_DB set */ -#define DB_ENV_DATABASE_LOCKING 0x00000020 /* Try database-level locking */ -#define DB_ENV_MULTIVERSION 0x00000040 /* DB_MULTIVERSION set */ -#define DB_ENV_NOLOCKING 0x00000080 /* DB_NOLOCKING set */ -#define DB_ENV_NOMMAP 0x00000100 /* DB_NOMMAP set */ -#define DB_ENV_NOPANIC 0x00000200 /* Okay if panic set */ -#define DB_ENV_OVERWRITE 0x00000400 /* DB_OVERWRITE set */ -#define DB_ENV_REGION_INIT 0x00000800 /* DB_REGION_INIT set */ -#define DB_ENV_TIME_NOTGRANTED 0x00001000 /* DB_TIME_NOTGRANTED set */ -#define DB_ENV_TXN_NOSYNC 0x00002000 /* DB_TXN_NOSYNC set */ -#define DB_ENV_TXN_NOWAIT 0x00004000 /* DB_TXN_NOWAIT set */ -#define DB_ENV_TXN_SNAPSHOT 0x00008000 /* DB_TXN_SNAPSHOT set */ -#define DB_ENV_TXN_WRITE_NOSYNC 0x00010000 /* DB_TXN_WRITE_NOSYNC set */ -#define DB_ENV_YIELDCPU 0x00020000 /* DB_YIELDCPU set */ -#define DB_ENV_HOTBACKUP 0x00040000 /* DB_HOTBACKUP_IN_PROGRESS set */ -#define DB_ENV_NOFLUSH 0x00080000 /* DB_NOFLUSH set */ - u_int32_t flags; - - /* DB_ENV PUBLIC HANDLE LIST BEGIN */ - int (*add_data_dir) __P((DB_ENV *, const char *)); - int (*backup) __P((DB_ENV *, const char *, u_int32_t)); - int (*cdsgroup_begin) __P((DB_ENV *, DB_TXN **)); - int (*close) __P((DB_ENV *, u_int32_t)); - int (*dbbackup) __P((DB_ENV *, const char *, const char *, u_int32_t)); - int (*dbremove) __P((DB_ENV *, - DB_TXN *, const char *, const char *, u_int32_t)); - int (*dbrename) __P((DB_ENV *, - DB_TXN *, const char *, const char *, const char *, u_int32_t)); - void (*err) __P((const DB_ENV *, int, const char *, ...)); - void (*errx) __P((const DB_ENV *, const char *, ...)); - int (*failchk) __P((DB_ENV *, u_int32_t)); - int (*fileid_reset) __P((DB_ENV *, const char *, u_int32_t)); - int (*get_alloc) __P((DB_ENV *, void *(**)(size_t), - void *(**)(void *, size_t), void (**)(void *))); - int (*get_app_dispatch) - __P((DB_ENV *, int (**)(DB_ENV *, DBT *, DB_LSN *, db_recops))); - int (*get_cache_max) __P((DB_ENV *, u_int32_t *, u_int32_t *)); - int (*get_cachesize) __P((DB_ENV *, u_int32_t *, u_int32_t *, int *)); - int (*get_create_dir) __P((DB_ENV *, const char **)); - int (*get_data_dirs) __P((DB_ENV *, const char ***)); - int (*get_data_len) __P((DB_ENV *, u_int32_t *)); - int (*get_backup_callbacks) __P((DB_ENV *, - int (**)(DB_ENV *, const char *, const char *, void **), - int (**)(DB_ENV *, u_int32_t, u_int32_t, u_int32_t, u_int8_t *, void *), - int (**)(DB_ENV *, const char *, void *))); - int (*get_backup_config) __P((DB_ENV *, DB_BACKUP_CONFIG, u_int32_t *)); - int (*get_encrypt_flags) __P((DB_ENV *, u_int32_t *)); - void (*get_errcall) __P((DB_ENV *, - void (**)(const DB_ENV *, const char *, const char *))); - void (*get_errfile) __P((DB_ENV *, FILE **)); - void (*get_errpfx) __P((DB_ENV *, const char **)); - int (*get_flags) __P((DB_ENV *, u_int32_t *)); - int (*get_feedback) __P((DB_ENV *, void (**)(DB_ENV *, int, int))); - int (*get_home) __P((DB_ENV *, const char **)); - int (*get_intermediate_dir_mode) __P((DB_ENV *, const char **)); - int (*get_isalive) __P((DB_ENV *, - int (**)(DB_ENV *, pid_t, db_threadid_t, u_int32_t))); - int (*get_lg_bsize) __P((DB_ENV *, u_int32_t *)); - int (*get_lg_dir) __P((DB_ENV *, const char **)); - int (*get_lg_filemode) __P((DB_ENV *, int *)); - int (*get_lg_max) __P((DB_ENV *, u_int32_t *)); - int (*get_lg_regionmax) __P((DB_ENV *, u_int32_t *)); - int (*get_lk_conflicts) __P((DB_ENV *, const u_int8_t **, int *)); - int (*get_lk_detect) __P((DB_ENV *, u_int32_t *)); - int (*get_lk_max_lockers) __P((DB_ENV *, u_int32_t *)); - int (*get_lk_max_locks) __P((DB_ENV *, u_int32_t *)); - int (*get_lk_max_objects) __P((DB_ENV *, u_int32_t *)); - int (*get_lk_partitions) __P((DB_ENV *, u_int32_t *)); - int (*get_lk_priority) __P((DB_ENV *, u_int32_t, u_int32_t *)); - int (*get_lk_tablesize) __P((DB_ENV *, u_int32_t *)); - int (*get_memory_init) __P((DB_ENV *, DB_MEM_CONFIG, u_int32_t *)); - int (*get_memory_max) __P((DB_ENV *, u_int32_t *, u_int32_t *)); - int (*get_metadata_dir) __P((DB_ENV *, const char **)); - int (*get_mp_max_openfd) __P((DB_ENV *, int *)); - int (*get_mp_max_write) __P((DB_ENV *, int *, db_timeout_t *)); - int (*get_mp_mmapsize) __P((DB_ENV *, size_t *)); - int (*get_mp_mtxcount) __P((DB_ENV *, u_int32_t *)); - int (*get_mp_pagesize) __P((DB_ENV *, u_int32_t *)); - int (*get_mp_tablesize) __P((DB_ENV *, u_int32_t *)); - void (*get_msgcall) - __P((DB_ENV *, void (**)(const DB_ENV *, const char *))); - void (*get_msgfile) __P((DB_ENV *, FILE **)); - int (*get_open_flags) __P((DB_ENV *, u_int32_t *)); - int (*get_shm_key) __P((DB_ENV *, long *)); - int (*get_thread_count) __P((DB_ENV *, u_int32_t *)); - int (*get_thread_id_fn) - __P((DB_ENV *, void (**)(DB_ENV *, pid_t *, db_threadid_t *))); - int (*get_thread_id_string_fn) __P((DB_ENV *, - char *(**)(DB_ENV *, pid_t, db_threadid_t, char *))); - int (*get_timeout) __P((DB_ENV *, db_timeout_t *, u_int32_t)); - int (*get_tmp_dir) __P((DB_ENV *, const char **)); - int (*get_tx_max) __P((DB_ENV *, u_int32_t *)); - int (*get_tx_timestamp) __P((DB_ENV *, time_t *)); - int (*get_verbose) __P((DB_ENV *, u_int32_t, int *)); - int (*is_bigendian) __P((void)); - int (*lock_detect) __P((DB_ENV *, u_int32_t, u_int32_t, int *)); - int (*lock_get) __P((DB_ENV *, - u_int32_t, u_int32_t, DBT *, db_lockmode_t, DB_LOCK *)); - int (*lock_id) __P((DB_ENV *, u_int32_t *)); - int (*lock_id_free) __P((DB_ENV *, u_int32_t)); - int (*lock_put) __P((DB_ENV *, DB_LOCK *)); - int (*lock_stat) __P((DB_ENV *, DB_LOCK_STAT **, u_int32_t)); - int (*lock_stat_print) __P((DB_ENV *, u_int32_t)); - int (*lock_vec) __P((DB_ENV *, - u_int32_t, u_int32_t, DB_LOCKREQ *, int, DB_LOCKREQ **)); - int (*log_archive) __P((DB_ENV *, char **[], u_int32_t)); - int (*log_cursor) __P((DB_ENV *, DB_LOGC **, u_int32_t)); - int (*log_file) __P((DB_ENV *, const DB_LSN *, char *, size_t)); - int (*log_flush) __P((DB_ENV *, const DB_LSN *)); - int (*log_get_config) __P((DB_ENV *, u_int32_t, int *)); - int (*log_printf) __P((DB_ENV *, DB_TXN *, const char *, ...)); - int (*log_put) __P((DB_ENV *, DB_LSN *, const DBT *, u_int32_t)); - int (*log_put_record) __P((DB_ENV *, DB *, DB_TXN *, DB_LSN *, - u_int32_t, u_int32_t, u_int32_t, u_int32_t, - DB_LOG_RECSPEC *, ...)); - int (*log_read_record) __P((DB_ENV *, DB **, - void *, void *, DB_LOG_RECSPEC *, u_int32_t, void **)); - int (*log_set_config) __P((DB_ENV *, u_int32_t, int)); - int (*log_stat) __P((DB_ENV *, DB_LOG_STAT **, u_int32_t)); - int (*log_stat_print) __P((DB_ENV *, u_int32_t)); - int (*log_verify) __P((DB_ENV *, const DB_LOG_VERIFY_CONFIG *)); - int (*lsn_reset) __P((DB_ENV *, const char *, u_int32_t)); - int (*memp_fcreate) __P((DB_ENV *, DB_MPOOLFILE **, u_int32_t)); - int (*memp_register) __P((DB_ENV *, int, int (*)(DB_ENV *, db_pgno_t, - void *, DBT *), int (*)(DB_ENV *, db_pgno_t, void *, DBT *))); - int (*memp_stat) __P((DB_ENV *, - DB_MPOOL_STAT **, DB_MPOOL_FSTAT ***, u_int32_t)); - int (*memp_stat_print) __P((DB_ENV *, u_int32_t)); - int (*memp_sync) __P((DB_ENV *, DB_LSN *)); - int (*memp_trickle) __P((DB_ENV *, int, int *)); - int (*mutex_alloc) __P((DB_ENV *, u_int32_t, db_mutex_t *)); - int (*mutex_free) __P((DB_ENV *, db_mutex_t)); - int (*mutex_get_align) __P((DB_ENV *, u_int32_t *)); - int (*mutex_get_increment) __P((DB_ENV *, u_int32_t *)); - int (*mutex_get_init) __P((DB_ENV *, u_int32_t *)); - int (*mutex_get_max) __P((DB_ENV *, u_int32_t *)); - int (*mutex_get_tas_spins) __P((DB_ENV *, u_int32_t *)); - int (*mutex_lock) __P((DB_ENV *, db_mutex_t)); - int (*mutex_set_align) __P((DB_ENV *, u_int32_t)); - int (*mutex_set_increment) __P((DB_ENV *, u_int32_t)); - int (*mutex_set_init) __P((DB_ENV *, u_int32_t)); - int (*mutex_set_max) __P((DB_ENV *, u_int32_t)); - int (*mutex_set_tas_spins) __P((DB_ENV *, u_int32_t)); - int (*mutex_stat) __P((DB_ENV *, DB_MUTEX_STAT **, u_int32_t)); - int (*mutex_stat_print) __P((DB_ENV *, u_int32_t)); - int (*mutex_unlock) __P((DB_ENV *, db_mutex_t)); - int (*open) __P((DB_ENV *, const char *, u_int32_t, int)); - int (*remove) __P((DB_ENV *, const char *, u_int32_t)); - int (*rep_elect) __P((DB_ENV *, u_int32_t, u_int32_t, u_int32_t)); - int (*rep_flush) __P((DB_ENV *)); - int (*rep_get_clockskew) __P((DB_ENV *, u_int32_t *, u_int32_t *)); - int (*rep_get_config) __P((DB_ENV *, u_int32_t, int *)); - int (*rep_get_limit) __P((DB_ENV *, u_int32_t *, u_int32_t *)); - int (*rep_get_nsites) __P((DB_ENV *, u_int32_t *)); - int (*rep_get_priority) __P((DB_ENV *, u_int32_t *)); - int (*rep_get_request) __P((DB_ENV *, u_int32_t *, u_int32_t *)); - int (*rep_get_timeout) __P((DB_ENV *, int, u_int32_t *)); - int (*rep_process_message) - __P((DB_ENV *, DBT *, DBT *, int, DB_LSN *)); - int (*rep_set_clockskew) __P((DB_ENV *, u_int32_t, u_int32_t)); - int (*rep_set_config) __P((DB_ENV *, u_int32_t, int)); - int (*rep_set_limit) __P((DB_ENV *, u_int32_t, u_int32_t)); - int (*rep_set_nsites) __P((DB_ENV *, u_int32_t)); - int (*rep_set_priority) __P((DB_ENV *, u_int32_t)); - int (*rep_set_request) __P((DB_ENV *, u_int32_t, u_int32_t)); - int (*rep_set_timeout) __P((DB_ENV *, int, db_timeout_t)); - int (*rep_set_transport) __P((DB_ENV *, int, int (*)(DB_ENV *, - const DBT *, const DBT *, const DB_LSN *, int, u_int32_t))); - int (*rep_start) __P((DB_ENV *, DBT *, u_int32_t)); - int (*rep_stat) __P((DB_ENV *, DB_REP_STAT **, u_int32_t)); - int (*rep_stat_print) __P((DB_ENV *, u_int32_t)); - int (*rep_sync) __P((DB_ENV *, u_int32_t)); - int (*repmgr_channel) __P((DB_ENV *, int, DB_CHANNEL **, u_int32_t)); - int (*repmgr_get_ack_policy) __P((DB_ENV *, int *)); - int (*repmgr_local_site) __P((DB_ENV *, DB_SITE **)); - int (*repmgr_msg_dispatch) __P((DB_ENV *, - void (*)(DB_ENV *, DB_CHANNEL *, DBT *, u_int32_t, u_int32_t), - u_int32_t)); - int (*repmgr_set_ack_policy) __P((DB_ENV *, int)); - int (*repmgr_site) - __P((DB_ENV *, const char *, u_int, DB_SITE**, u_int32_t)); - int (*repmgr_site_by_eid) __P((DB_ENV *, int, DB_SITE**)); - int (*repmgr_site_list) __P((DB_ENV *, u_int *, DB_REPMGR_SITE **)); - int (*repmgr_start) __P((DB_ENV *, int, u_int32_t)); - int (*repmgr_stat) __P((DB_ENV *, DB_REPMGR_STAT **, u_int32_t)); - int (*repmgr_stat_print) __P((DB_ENV *, u_int32_t)); - int (*set_alloc) __P((DB_ENV *, void *(*)(size_t), - void *(*)(void *, size_t), void (*)(void *))); - int (*set_app_dispatch) - __P((DB_ENV *, int (*)(DB_ENV *, DBT *, DB_LSN *, db_recops))); - int (*set_cache_max) __P((DB_ENV *, u_int32_t, u_int32_t)); - int (*set_cachesize) __P((DB_ENV *, u_int32_t, u_int32_t, int)); - int (*set_create_dir) __P((DB_ENV *, const char *)); - int (*set_data_dir) __P((DB_ENV *, const char *)); - int (*set_data_len) __P((DB_ENV *, u_int32_t)); - int (*set_backup_callbacks) __P((DB_ENV *, - int (*)(DB_ENV *, const char *, const char *, void **), - int (*)(DB_ENV *, u_int32_t, - u_int32_t, u_int32_t, u_int8_t *, void *), - int (*)(DB_ENV *, const char *, void *))); - int (*set_backup_config) __P((DB_ENV *, DB_BACKUP_CONFIG, u_int32_t)); - int (*set_encrypt) __P((DB_ENV *, const char *, u_int32_t)); - void (*set_errcall) __P((DB_ENV *, - void (*)(const DB_ENV *, const char *, const char *))); - void (*set_errfile) __P((DB_ENV *, FILE *)); - void (*set_errpfx) __P((DB_ENV *, const char *)); - int (*set_event_notify) - __P((DB_ENV *, void (*)(DB_ENV *, u_int32_t, void *))); - int (*set_feedback) __P((DB_ENV *, void (*)(DB_ENV *, int, int))); - int (*set_flags) __P((DB_ENV *, u_int32_t, int)); - int (*set_intermediate_dir_mode) __P((DB_ENV *, const char *)); - int (*set_isalive) __P((DB_ENV *, - int (*)(DB_ENV *, pid_t, db_threadid_t, u_int32_t))); - int (*set_lg_bsize) __P((DB_ENV *, u_int32_t)); - int (*set_lg_dir) __P((DB_ENV *, const char *)); - int (*set_lg_filemode) __P((DB_ENV *, int)); - int (*set_lg_max) __P((DB_ENV *, u_int32_t)); - int (*set_lg_regionmax) __P((DB_ENV *, u_int32_t)); - int (*set_lk_conflicts) __P((DB_ENV *, u_int8_t *, int)); - int (*set_lk_detect) __P((DB_ENV *, u_int32_t)); - int (*set_lk_max_lockers) __P((DB_ENV *, u_int32_t)); - int (*set_lk_max_locks) __P((DB_ENV *, u_int32_t)); - int (*set_lk_max_objects) __P((DB_ENV *, u_int32_t)); - int (*set_lk_partitions) __P((DB_ENV *, u_int32_t)); - int (*set_lk_priority) __P((DB_ENV *, u_int32_t, u_int32_t)); - int (*set_lk_tablesize) __P((DB_ENV *, u_int32_t)); - int (*set_memory_init) __P((DB_ENV *, DB_MEM_CONFIG, u_int32_t)); - int (*set_memory_max) __P((DB_ENV *, u_int32_t, u_int32_t)); - int (*set_metadata_dir) __P((DB_ENV *, const char *)); - int (*set_mp_max_openfd) __P((DB_ENV *, int)); - int (*set_mp_max_write) __P((DB_ENV *, int, db_timeout_t)); - int (*set_mp_mmapsize) __P((DB_ENV *, size_t)); - int (*set_mp_mtxcount) __P((DB_ENV *, u_int32_t)); - int (*set_mp_pagesize) __P((DB_ENV *, u_int32_t)); - int (*set_mp_tablesize) __P((DB_ENV *, u_int32_t)); - void (*set_msgcall) - __P((DB_ENV *, void (*)(const DB_ENV *, const char *))); - void (*set_msgfile) __P((DB_ENV *, FILE *)); - int (*set_paniccall) __P((DB_ENV *, void (*)(DB_ENV *, int))); - int (*set_shm_key) __P((DB_ENV *, long)); - int (*set_thread_count) __P((DB_ENV *, u_int32_t)); - int (*set_thread_id) - __P((DB_ENV *, void (*)(DB_ENV *, pid_t *, db_threadid_t *))); - int (*set_thread_id_string) __P((DB_ENV *, - char *(*)(DB_ENV *, pid_t, db_threadid_t, char *))); - int (*set_timeout) __P((DB_ENV *, db_timeout_t, u_int32_t)); - int (*set_tmp_dir) __P((DB_ENV *, const char *)); - int (*set_tx_max) __P((DB_ENV *, u_int32_t)); - int (*set_tx_timestamp) __P((DB_ENV *, time_t *)); - int (*set_verbose) __P((DB_ENV *, u_int32_t, int)); - int (*txn_applied) __P((DB_ENV *, - DB_TXN_TOKEN *, db_timeout_t, u_int32_t)); - int (*stat_print) __P((DB_ENV *, u_int32_t)); - int (*txn_begin) __P((DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)); - int (*txn_checkpoint) __P((DB_ENV *, u_int32_t, u_int32_t, u_int32_t)); - int (*txn_recover) __P((DB_ENV *, - DB_PREPLIST *, long, long *, u_int32_t)); - int (*txn_stat) __P((DB_ENV *, DB_TXN_STAT **, u_int32_t)); - int (*txn_stat_print) __P((DB_ENV *, u_int32_t)); - /* DB_ENV PUBLIC HANDLE LIST END */ - - /* DB_ENV PRIVATE HANDLE LIST BEGIN */ - int (*prdbt) __P((DBT *, int, - const char *, void *, int (*)(void *, const void *), int, int)); - /* DB_ENV PRIVATE HANDLE LIST END */ -}; - -/* - * Dispatch structure for recovery, log verification and print routines. Since - * internal and external routines take different arguments (ENV versus DB_ENV), - * we need something more elaborate than a single pointer and size. - */ -struct __db_distab { - int (**int_dispatch) __P((ENV *, DBT *, DB_LSN *, db_recops, void *)); - size_t int_size; - int (**ext_dispatch) __P((DB_ENV *, DBT *, DB_LSN *, db_recops)); - size_t ext_size; -}; - -/* - * Log verification configuration structure. - */ -struct __db_logvrfy_config { - int continue_after_fail, verbose; - u_int32_t cachesize; - const char *temp_envhome; - const char *dbfile, *dbname; - DB_LSN start_lsn, end_lsn; - time_t start_time, end_time; -}; - -struct __db_channel { - CHANNEL *channel; /* Pointer to internal state details. */ - int eid; /* Env. ID passed in constructor. */ - db_timeout_t timeout; - - /* DB_CHANNEL PUBLIC HANDLE LIST BEGIN */ - int (*close) __P((DB_CHANNEL *, u_int32_t)); - int (*send_msg) __P((DB_CHANNEL *, DBT *, u_int32_t, u_int32_t)); - int (*send_request) __P((DB_CHANNEL *, - DBT *, u_int32_t, DBT *, db_timeout_t, u_int32_t)); - int (*set_timeout) __P((DB_CHANNEL *, db_timeout_t)); - /* DB_CHANNEL PUBLIC HANDLE LIST END */ -}; - -struct __db_site { - ENV *env; - int eid; - const char *host; - u_int port; - u_int32_t flags; - - /* DB_SITE PUBLIC HANDLE LIST BEGIN */ - int (*get_address) __P((DB_SITE *, const char **, u_int *)); - int (*get_config) __P((DB_SITE *, u_int32_t, u_int32_t *)); - int (*get_eid) __P((DB_SITE *, int *)); - int (*set_config) __P((DB_SITE *, u_int32_t, u_int32_t)); - int (*remove) __P((DB_SITE *)); - int (*close) __P((DB_SITE *)); - /* DB_SITE PUBLIC HANDLE LIST END */ -}; - -#if DB_DBM_HSEARCH != 0 -/******************************************************* - * Dbm/Ndbm historic interfaces. - *******************************************************/ -typedef struct __db DBM; - -#define DBM_INSERT 0 /* Flags to dbm_store(). */ -#define DBM_REPLACE 1 - -/* - * The DB support for ndbm(3) always appends this suffix to the - * file name to avoid overwriting the user's original database. - */ -#define DBM_SUFFIX ".db" - -#if defined(_XPG4_2) -typedef struct { - char *dptr; - size_t dsize; -} datum; -#else -typedef struct { - char *dptr; - int dsize; -} datum; -#endif - -/* - * Translate NDBM calls into DB calls so that DB doesn't step on the - * application's name space. - */ -#define dbm_clearerr(a) __db_ndbm_clearerr(a) -#define dbm_close(a) __db_ndbm_close(a) -#define dbm_delete(a, b) __db_ndbm_delete(a, b) -#define dbm_dirfno(a) __db_ndbm_dirfno(a) -#define dbm_error(a) __db_ndbm_error(a) -#define dbm_fetch(a, b) __db_ndbm_fetch(a, b) -#define dbm_firstkey(a) __db_ndbm_firstkey(a) -#define dbm_nextkey(a) __db_ndbm_nextkey(a) -#define dbm_open(a, b, c) __db_ndbm_open(a, b, c) -#define dbm_pagfno(a) __db_ndbm_pagfno(a) -#define dbm_rdonly(a) __db_ndbm_rdonly(a) -#define dbm_store(a, b, c, d) \ - __db_ndbm_store(a, b, c, d) - -/* - * Translate DBM calls into DB calls so that DB doesn't step on the - * application's name space. - * - * The global variables dbrdonly, dirf and pagf were not retained when 4BSD - * replaced the dbm interface with ndbm, and are not supported here. - */ -#define dbminit(a) __db_dbm_init(a) -#define dbmclose __db_dbm_close -#if !defined(__cplusplus) -#define delete(a) __db_dbm_delete(a) -#endif -#define fetch(a) __db_dbm_fetch(a) -#define firstkey __db_dbm_firstkey -#define nextkey(a) __db_dbm_nextkey(a) -#define store(a, b) __db_dbm_store(a, b) - -/******************************************************* - * Hsearch historic interface. - *******************************************************/ -typedef enum { - FIND, ENTER -} ACTION; - -typedef struct entry { - char *key; - char *data; -} ENTRY; - -#define hcreate(a) __db_hcreate(a) -#define hdestroy __db_hdestroy -#define hsearch(a, b) __db_hsearch(a, b) - -#endif /* DB_DBM_HSEARCH */ - -#if defined(__cplusplus) -} -#endif - -/* Restore default compiler warnings */ -#ifdef _MSC_VER -#pragma warning(pop) -#endif -#endif /* !_DB_H_ */ -/* DO NOT EDIT: automatically built by dist/s_apiflags. */ -#define DB_AGGRESSIVE 0x00000001 -#define DB_ARCH_ABS 0x00000001 -#define DB_ARCH_DATA 0x00000002 -#define DB_ARCH_LOG 0x00000004 -#define DB_ARCH_REMOVE 0x00000008 -#define DB_AUTO_COMMIT 0x00000100 -#define DB_BACKUP_CLEAN 0x00000002 -#define DB_BACKUP_FILES 0x00000008 -#define DB_BACKUP_NO_LOGS 0x00000010 -#define DB_BACKUP_SINGLE_DIR 0x00000020 -#define DB_BACKUP_UPDATE 0x00000040 -#define DB_BOOTSTRAP_HELPER 0x00000001 -#define DB_CDB_ALLDB 0x00000040 -#define DB_CHKSUM 0x00000008 -#define DB_CKP_INTERNAL 0x00000002 -#define DB_CREATE 0x00000001 -#define DB_CURSOR_BULK 0x00000001 -#define DB_CURSOR_TRANSIENT 0x00000008 -#define DB_CXX_NO_EXCEPTIONS 0x00000002 -#define DB_DATABASE_LOCKING 0x00000080 -#define DB_DIRECT 0x00000020 -#define DB_DIRECT_DB 0x00000200 -#define DB_DSYNC_DB 0x00000400 -#define DB_DUP 0x00000010 -#define DB_DUPSORT 0x00000002 -#define DB_DURABLE_UNKNOWN 0x00000040 -#define DB_ENCRYPT 0x00000001 -#define DB_ENCRYPT_AES 0x00000001 -#define DB_EXCL 0x00000004 -#define DB_EXTENT 0x00000100 -#define DB_FAILCHK 0x00000010 -#define DB_FAILCHK_ISALIVE 0x00000040 -#define DB_FAST_STAT 0x00000001 -#define DB_FCNTL_LOCKING 0x00000800 -#define DB_FLUSH 0x00000002 -#define DB_FORCE 0x00000001 -#define DB_FORCESYNC 0x00000001 -#define DB_FOREIGN_ABORT 0x00000001 -#define DB_FOREIGN_CASCADE 0x00000002 -#define DB_FOREIGN_NULLIFY 0x00000004 -#define DB_FREELIST_ONLY 0x00000001 -#define DB_FREE_SPACE 0x00000002 -#define DB_GROUP_CREATOR 0x00000002 -#define DB_HOTBACKUP_IN_PROGRESS 0x00000800 -#define DB_IGNORE_LEASE 0x00001000 -#define DB_IMMUTABLE_KEY 0x00000002 -#define DB_INIT_CDB 0x00000080 -#define DB_INIT_LOCK 0x00000100 -#define DB_INIT_LOG 0x00000200 -#define DB_INIT_MPOOL 0x00000400 -#define DB_INIT_MUTEX 0x00000800 -#define DB_INIT_REP 0x00001000 -#define DB_INIT_TXN 0x00002000 -#define DB_INORDER 0x00000020 -#define DB_INTERNAL_PERSISTENT_DB 0x00001000 -#define DB_INTERNAL_TEMPORARY_DB 0x00002000 -#define DB_JOIN_NOSORT 0x00000001 -#define DB_LEGACY 0x00000004 -#define DB_LOCAL_SITE 0x00000008 -#define DB_LOCKDOWN 0x00004000 -#define DB_LOCK_CHECK 0x00000001 -#define DB_LOCK_IGNORE_REC 0x00000002 -#define DB_LOCK_NOWAIT 0x00000004 -#define DB_LOCK_RECORD 0x00000008 -#define DB_LOCK_SET_TIMEOUT 0x00000010 -#define DB_LOCK_SWITCH 0x00000020 -#define DB_LOCK_UPGRADE 0x00000040 -#define DB_LOG_AUTO_REMOVE 0x00000001 -#define DB_LOG_CHKPNT 0x00000001 -#define DB_LOG_COMMIT 0x00000004 -#define DB_LOG_DIRECT 0x00000002 -#define DB_LOG_DSYNC 0x00000004 -#define DB_LOG_IN_MEMORY 0x00000008 -#define DB_LOG_NOCOPY 0x00000008 -#define DB_LOG_NOT_DURABLE 0x00000010 -#define DB_LOG_NO_DATA 0x00000002 -#define DB_LOG_VERIFY_CAF 0x00000001 -#define DB_LOG_VERIFY_DBFILE 0x00000002 -#define DB_LOG_VERIFY_ERR 0x00000004 -#define DB_LOG_VERIFY_FORWARD 0x00000008 -#define DB_LOG_VERIFY_INTERR 0x00000010 -#define DB_LOG_VERIFY_PARTIAL 0x00000020 -#define DB_LOG_VERIFY_VERBOSE 0x00000040 -#define DB_LOG_VERIFY_WARNING 0x00000080 -#define DB_LOG_WRNOSYNC 0x00000020 -#define DB_LOG_ZERO 0x00000010 -#define DB_MPOOL_CREATE 0x00000001 -#define DB_MPOOL_DIRTY 0x00000002 -#define DB_MPOOL_DISCARD 0x00000001 -#define DB_MPOOL_EDIT 0x00000004 -#define DB_MPOOL_FREE 0x00000008 -#define DB_MPOOL_LAST 0x00000010 -#define DB_MPOOL_NEW 0x00000020 -#define DB_MPOOL_NOFILE 0x00000001 -#define DB_MPOOL_NOLOCK 0x00000004 -#define DB_MPOOL_TRY 0x00000040 -#define DB_MPOOL_UNLINK 0x00000002 -#define DB_MULTIPLE 0x00000800 -#define DB_MULTIPLE_KEY 0x00004000 -#define DB_MULTIVERSION 0x00000008 -#define DB_MUTEX_ALLOCATED 0x00000001 -#define DB_MUTEX_LOCKED 0x00000002 -#define DB_MUTEX_LOGICAL_LOCK 0x00000004 -#define DB_MUTEX_PROCESS_ONLY 0x00000008 -#define DB_MUTEX_SELF_BLOCK 0x00000010 -#define DB_MUTEX_SHARED 0x00000020 -#define DB_NOERROR 0x00004000 -#define DB_NOFLUSH 0x00001000 -#define DB_NOLOCKING 0x00002000 -#define DB_NOMMAP 0x00000010 -#define DB_NOORDERCHK 0x00000002 -#define DB_NOPANIC 0x00004000 -#define DB_NOSYNC 0x00000001 -#define DB_NO_AUTO_COMMIT 0x00008000 -#define DB_NO_CHECKPOINT 0x00008000 -#define DB_ODDFILESIZE 0x00000080 -#define DB_ORDERCHKONLY 0x00000004 -#define DB_OVERWRITE 0x00008000 -#define DB_PANIC_ENVIRONMENT 0x00010000 -#define DB_PRINTABLE 0x00000008 -#define DB_PRIVATE 0x00010000 -#define DB_PR_PAGE 0x00000010 -#define DB_PR_RECOVERYTEST 0x00000020 -#define DB_RDONLY 0x00000400 -#define DB_RDWRMASTER 0x00010000 -#define DB_READ_COMMITTED 0x00000400 -#define DB_READ_UNCOMMITTED 0x00000200 -#define DB_RECNUM 0x00000040 -#define DB_RECOVER 0x00000002 -#define DB_RECOVER_FATAL 0x00020000 -#define DB_REGION_INIT 0x00020000 -#define DB_REGISTER 0x00040000 -#define DB_RENUMBER 0x00000080 -#define DB_REPMGR_CONF_2SITE_STRICT 0x00000001 -#define DB_REPMGR_CONF_ELECTIONS 0x00000002 -#define DB_REPMGR_NEED_RESPONSE 0x00000001 -#define DB_REPMGR_PEER 0x00000010 -#define DB_REP_ANYWHERE 0x00000001 -#define DB_REP_CLIENT 0x00000001 -#define DB_REP_CONF_AUTOINIT 0x00000004 -#define DB_REP_CONF_AUTOROLLBACK 0x00000008 -#define DB_REP_CONF_BULK 0x00000010 -#define DB_REP_CONF_DELAYCLIENT 0x00000020 -#define DB_REP_CONF_INMEM 0x00000040 -#define DB_REP_CONF_LEASE 0x00000080 -#define DB_REP_CONF_NOWAIT 0x00000100 -#define DB_REP_ELECTION 0x00000004 -#define DB_REP_MASTER 0x00000002 -#define DB_REP_NOBUFFER 0x00000002 -#define DB_REP_PERMANENT 0x00000004 -#define DB_REP_REREQUEST 0x00000008 -#define DB_REVSPLITOFF 0x00000100 -#define DB_RMW 0x00002000 -#define DB_SALVAGE 0x00000040 -#define DB_SA_SKIPFIRSTKEY 0x00000080 -#define DB_SA_UNKNOWNKEY 0x00000100 -#define DB_SEQ_DEC 0x00000001 -#define DB_SEQ_INC 0x00000002 -#define DB_SEQ_RANGE_SET 0x00000004 -#define DB_SEQ_WRAP 0x00000008 -#define DB_SEQ_WRAPPED 0x00000010 -#define DB_SET_LOCK_TIMEOUT 0x00000001 -#define DB_SET_REG_TIMEOUT 0x00000004 -#define DB_SET_TXN_NOW 0x00000008 -#define DB_SET_TXN_TIMEOUT 0x00000002 -#define DB_SHALLOW_DUP 0x00000100 -#define DB_SNAPSHOT 0x00000200 -#define DB_STAT_ALL 0x00000004 -#define DB_STAT_ALLOC 0x00000008 -#define DB_STAT_CLEAR 0x00000001 -#define DB_STAT_LOCK_CONF 0x00000010 -#define DB_STAT_LOCK_LOCKERS 0x00000020 -#define DB_STAT_LOCK_OBJECTS 0x00000040 -#define DB_STAT_LOCK_PARAMS 0x00000080 -#define DB_STAT_MEMP_HASH 0x00000010 -#define DB_STAT_MEMP_NOERROR 0x00000020 -#define DB_STAT_SUBSYSTEM 0x00000002 -#define DB_STAT_SUMMARY 0x00000010 -#define DB_ST_DUPOK 0x00000200 -#define DB_ST_DUPSET 0x00000400 -#define DB_ST_DUPSORT 0x00000800 -#define DB_ST_IS_RECNO 0x00001000 -#define DB_ST_OVFL_LEAF 0x00002000 -#define DB_ST_RECNUM 0x00004000 -#define DB_ST_RELEN 0x00008000 -#define DB_ST_TOPLEVEL 0x00010000 -#define DB_SYSTEM_MEM 0x00080000 -#define DB_THREAD 0x00000020 -#define DB_TIME_NOTGRANTED 0x00040000 -#define DB_TRUNCATE 0x00020000 -#define DB_TXN_BULK 0x00000010 -#define DB_TXN_FAMILY 0x00000040 -#define DB_TXN_NOSYNC 0x00000001 -#define DB_TXN_NOT_DURABLE 0x00000004 -#define DB_TXN_NOWAIT 0x00000002 -#define DB_TXN_SNAPSHOT 0x00000004 -#define DB_TXN_SNAPSHOT_SAFE 0x00000080 -#define DB_TXN_SYNC 0x00000008 -#define DB_TXN_WAIT 0x00000100 -#define DB_TXN_WRITE_NOSYNC 0x00000020 -#define DB_UNREF 0x00020000 -#define DB_UPGRADE 0x00000001 -#define DB_USE_ENVIRON 0x00000004 -#define DB_USE_ENVIRON_ROOT 0x00000008 -#define DB_VERB_BACKUP 0x00000001 -#define DB_VERB_DEADLOCK 0x00000002 -#define DB_VERB_FILEOPS 0x00000004 -#define DB_VERB_FILEOPS_ALL 0x00000008 -#define DB_VERB_RECOVERY 0x00000010 -#define DB_VERB_REGISTER 0x00000020 -#define DB_VERB_REPLICATION 0x00000040 -#define DB_VERB_REPMGR_CONNFAIL 0x00000080 -#define DB_VERB_REPMGR_MISC 0x00000100 -#define DB_VERB_REP_ELECT 0x00000200 -#define DB_VERB_REP_LEASE 0x00000400 -#define DB_VERB_REP_MISC 0x00000800 -#define DB_VERB_REP_MSGS 0x00001000 -#define DB_VERB_REP_SYNC 0x00002000 -#define DB_VERB_REP_SYSTEM 0x00004000 -#define DB_VERB_REP_TEST 0x00008000 -#define DB_VERB_WAITSFOR 0x00010000 -#define DB_VERIFY 0x00000002 -#define DB_VERIFY_PARTITION 0x00040000 -#define DB_WRITECURSOR 0x00000010 -#define DB_WRITELOCK 0x00000020 -#define DB_WRITEOPEN 0x00040000 -#define DB_XA_CREATE 0x00000001 -#define DB_YIELDCPU 0x00080000 - -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _DB_EXT_PROT_IN_ -#define _DB_EXT_PROT_IN_ - -#if defined(__cplusplus) -extern "C" { -#endif - -int db_copy __P((DB_ENV *, const char *, const char *, const char *)); -int db_create __P((DB **, DB_ENV *, u_int32_t)); -char *db_strerror __P((int)); -int db_env_set_func_assert __P((void (*)(const char *, const char *, int))); -int db_env_set_func_close __P((int (*)(int))); -int db_env_set_func_dirfree __P((void (*)(char **, int))); -int db_env_set_func_dirlist __P((int (*)(const char *, char ***, int *))); -int db_env_set_func_exists __P((int (*)(const char *, int *))); -int db_env_set_func_free __P((void (*)(void *))); -int db_env_set_func_fsync __P((int (*)(int))); -int db_env_set_func_ftruncate __P((int (*)(int, off_t))); -int db_env_set_func_ioinfo __P((int (*)(const char *, int, u_int32_t *, u_int32_t *, u_int32_t *))); -int db_env_set_func_malloc __P((void *(*)(size_t))); -int db_env_set_func_file_map __P((int (*)(DB_ENV *, char *, size_t, int, void **), int (*)(DB_ENV *, void *))); -int db_env_set_func_region_map __P((int (*)(DB_ENV *, char *, size_t, int *, void **), int (*)(DB_ENV *, void *))); -int db_env_set_func_pread __P((ssize_t (*)(int, void *, size_t, off_t))); -int db_env_set_func_pwrite __P((ssize_t (*)(int, const void *, size_t, off_t))); -int db_env_set_func_open __P((int (*)(const char *, int, ...))); -int db_env_set_func_read __P((ssize_t (*)(int, void *, size_t))); -int db_env_set_func_realloc __P((void *(*)(void *, size_t))); -int db_env_set_func_rename __P((int (*)(const char *, const char *))); -int db_env_set_func_seek __P((int (*)(int, off_t, int))); -int db_env_set_func_unlink __P((int (*)(const char *))); -int db_env_set_func_write __P((ssize_t (*)(int, const void *, size_t))); -int db_env_set_func_yield __P((int (*)(u_long, u_long))); -int db_env_create __P((DB_ENV **, u_int32_t)); -char *db_version __P((int *, int *, int *)); -char *db_full_version __P((int *, int *, int *, int *, int *)); -int log_compare __P((const DB_LSN *, const DB_LSN *)); -#if defined(DB_WIN32) && !defined(DB_WINCE) -int db_env_set_win_security __P((SECURITY_ATTRIBUTES *sa)); -#endif -int db_sequence_create __P((DB_SEQUENCE **, DB *, u_int32_t)); -#if DB_DBM_HSEARCH != 0 -int __db_ndbm_clearerr __P((DBM *)); -void __db_ndbm_close __P((DBM *)); -int __db_ndbm_delete __P((DBM *, datum)); -int __db_ndbm_dirfno __P((DBM *)); -int __db_ndbm_error __P((DBM *)); -datum __db_ndbm_fetch __P((DBM *, datum)); -datum __db_ndbm_firstkey __P((DBM *)); -datum __db_ndbm_nextkey __P((DBM *)); -DBM *__db_ndbm_open __P((const char *, int, int)); -int __db_ndbm_pagfno __P((DBM *)); -int __db_ndbm_rdonly __P((DBM *)); -int __db_ndbm_store __P((DBM *, datum, datum, int)); -int __db_dbm_close __P((void)); -int __db_dbm_delete __P((datum)); -datum __db_dbm_fetch __P((datum)); -datum __db_dbm_firstkey __P((void)); -int __db_dbm_init __P((char *)); -datum __db_dbm_nextkey __P((datum)); -int __db_dbm_store __P((datum, datum)); -#endif -#if DB_DBM_HSEARCH != 0 -int __db_hcreate __P((size_t)); -ENTRY *__db_hsearch __P((ENTRY, ACTION)); -void __db_hdestroy __P((void)); -#endif - -#if defined(__cplusplus) -} -#endif -#endif /* !_DB_EXT_PROT_IN_ */ diff --git a/build_wince/db_config.h b/build_wince/db_config.h deleted file mode 100644 index 4e4ea3104..000000000 --- a/build_wince/db_config.h +++ /dev/null @@ -1,657 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_windows. */ -/* Define to 1 if you want to build a version for running the test suite. */ -/* #undef CONFIG_TEST */ - -/* Defined to a size to limit the stack size of Berkeley DB threads. */ -/* #undef DB_STACKSIZE */ - -/* We use DB_WIN32 much as one would use _WIN32 -- to specify that we're using - an operating system environment that supports Win32 calls and semantics. We - don't use _WIN32 because Cygwin/GCC also defines _WIN32, even though - Cygwin/GCC closely emulates the Unix environment. */ -#define DB_WIN32 1 - -/* Define to 1 if you want a debugging version. */ -#if defined(_DEBUG) -#if !defined(DEBUG) -#define DEBUG 1 -#endif -#endif - -/* Define to 1 if you want a version that logs read operations. */ -/* #undef DEBUG_ROP */ - -/* Define to 1 if you want a version that logs write operations. */ -/* #undef DEBUG_WOP */ - -/* Define to 1 if you want a version with run-time diagnostic checking. */ -/* #undef DIAGNOSTIC */ - -/* Define to 1 if 64-bit types are available. */ -#define HAVE_64BIT_TYPES 1 - -/* Define to 1 if you have the `abort' function. */ -/* #undef HAVE_ABORT */ - -/* Define to 1 if you have the `atoi' function. */ -#define HAVE_ATOI 1 - -/* Define to 1 if you have the `atol' function. */ -#define HAVE_ATOL 1 - -/* Define to 1 if platform reads and writes files atomically. */ -/* #undef HAVE_ATOMICFILEREAD */ - -/* Define to 1 to use Solaris library routes for atomic operations. */ -/* #undef HAVE_ATOMIC_SOLARIS */ - -/* Define to 1 to use native atomic operations. */ -#define HAVE_ATOMIC_SUPPORT 1 - -/* Define to 1 to use GCC and x86 or x86_64 assemlby language atomic - operations. */ -/* #undef HAVE_ATOMIC_X86_GCC_ASSEMBLY */ - -/* Define to 1 if you have the `backtrace' function. */ -/* #undef HAVE_BACKTRACE */ - -/* Define to 1 if you have the `backtrace_symbols' function. */ -/* #undef HAVE_BACKTRACE_SYMBOLS */ - -/* Define to 1 if you have the `bsearch' function. */ -/* #undef HAVE_BSEARCH */ - -/* Define to 1 if you have the `clock_gettime' function. */ -/* #undef HAVE_CLOCK_GETTIME */ - -/* Define to 1 if clock_gettime supports CLOCK_MONOTONIC. */ -/* #undef HAVE_CLOCK_MONOTONIC */ - -/* Define to 1 if building compression support. */ -/* #undef HAVE_COMPRESSION */ - -/* Define to 1 if Berkeley DB release includes strong cryptography. */ -#ifndef HAVE_SMALLBUILD -#define HAVE_CRYPTO 1 -#endif - -/* Define to 1 if using Intel IPP for cryptography. */ -/* #undef HAVE_CRYPTO_IPP */ - -/* Define to 1 if you have the `ctime_r' function. */ -/* #undef HAVE_CTIME_R */ - -/* Define to 1 if ctime_r takes a buffer length as a third argument. */ -/* #undef HAVE_CTIME_R_3ARG */ - -/* Define to 1 if building the DBM API. */ -/* #undef HAVE_DBM */ - -/* Define to 1 if you have the `directio' function. */ -/* #undef HAVE_DIRECTIO */ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_DIRENT_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 to use dtrace for performance event tracing. */ -/* #undef HAVE_DTRACE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_EXECINFO_H */ - -/* Define to 1 if you have EXIT_SUCCESS/EXIT_FAILURE #defines. */ -#define HAVE_EXIT_SUCCESS 1 - -/* Define to 1 if you have the `fchmod' function. */ -/* #undef HAVE_FCHMOD */ - -/* Define to 1 if you have the `fclose' function. */ -#define HAVE_FCLOSE 1 - -/* Define to 1 if you have the `fcntl' function. */ -/* #undef HAVE_FCNTL */ - -/* Define to 1 if fcntl/F_SETFD denies child access to file descriptors. */ -/* #undef HAVE_FCNTL_F_SETFD */ - -/* Define to 1 if you have the `fdatasync' function. */ -/* #undef HAVE_FDATASYNC */ - -/* Define to 1 if you have the `fgetc' function. */ -#define HAVE_FGETC 1 - -/* Define to 1 if you have the `fgets' function. */ -#define HAVE_FGETS 1 - -/* Define to 1 if allocated filesystem blocks are not zeroed. */ -#define HAVE_FILESYSTEM_NOTZERO 1 - -/* Define to 1 if you have the `fopen' function. */ -#define HAVE_FOPEN 1 - -/* Define to 1 if you have the `ftruncate' function. */ -#define HAVE_FTRUNCATE 1 - -/* Define to 1 if you have the `fwrite' function. */ -#define HAVE_FWRITE 1 - -/* Define to 1 if you have the `getaddrinfo' function. */ -/* #undef HAVE_GETADDRINFO */ - -/* Define to 1 if you have the `getcwd' function. */ -/* #undef HAVE_GETCWD */ - -/* Define to 1 if you have the `getenv' function. */ -/* #undef HAVE_GETENV */ - -/* Define to 1 if you have the `getgid' function. */ -/* #undef HAVE_GETGID */ - -/* Define to 1 if you have the `getopt' function. */ -/* - * Windows does not have the getopt function, but as Berkeley DB example - * programs require getopt, we handle it outside of this configuration. - */ -#define HAVE_GETOPT 1 - -/* Define to 1 if getopt supports the optreset variable. */ -#define HAVE_GETOPT_OPTRESET 1 - -/* Define to 1 if you have the `getrusage' function. */ -/* #undef HAVE_GETRUSAGE */ - -/* Define to 1 if you have the `gettimeofday' function. */ -/* #undef HAVE_GETTIMEOFDAY */ - -/* Define to 1 if you have the `getuid' function. */ -/* #undef HAVE_GETUID */ - -/* Define to 1 if building Hash access method. */ -#ifndef HAVE_SMALLBUILD -#define HAVE_HASH 1 -#endif - -/* Define to 1 if building Heap access method. */ -#ifndef HAVE_SMALLBUILD -#define HAVE_HEAP 1 -#endif - -/* Define to 1 if you have the `hstrerror' function. */ -/* #undef HAVE_HSTRERROR */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INTTYPES_H */ - -/* Define to 1 if you have the `isalpha' function. */ -#define HAVE_ISALPHA 1 - -/* Define to 1 if you have the `isdigit' function. */ -#define HAVE_ISDIGIT 1 - -/* Define to 1 if you have the `isprint' function. */ -#define HAVE_ISPRINT 1 - -/* Define to 1 if you have localization function to support globalization. */ -/* #undef HAVE_LOCALIZATION */ - -/* Define to 1 if you have the `localtime' function. */ -/* #undef HAVE_LOCALTIME */ - -/* Define to 1 if you have the `isspace' function. */ -#define HAVE_ISSPACE 1 - -/* Define to 1 to enable log checksums. */ -#define HAVE_LOG_CHECKSUM 1 - -/* Define to 1 if you have the `memcmp' function. */ -#define HAVE_MEMCMP 1 - -/* Define to 1 if you have the `memcpy' function. */ -#define HAVE_MEMCPY 1 - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mlock' function. */ -/* #undef HAVE_MLOCK */ - -/* Define to 1 if you have the `mmap' function. */ -/* #undef HAVE_MMAP */ - -/* Define to 1 where mmap() incrementally extends the accessible mapping as - the underlying file grows. */ -/* #undef HAVE_MMAP_EXTEND */ - -/* Define to 1 if you have the `mprotect' function. */ -/* #undef HAVE_MPROTECT */ - -/* Define to 1 if you have the `munlock' function. */ -/* #undef HAVE_MUNLOCK */ - -/* Define to 1 if you have the `munmap' function. */ -/* #undef HAVE_MUNMAP */ - -/* Define to 1 to use the GCC compiler and 68K assembly language mutexes. */ -/* #undef HAVE_MUTEX_68K_GCC_ASSEMBLY */ - -/* Define to 1 to use the AIX _check_lock mutexes. */ -/* #undef HAVE_MUTEX_AIX_CHECK_LOCK */ - -/* Define to 1 to use the GCC compiler and Alpha assembly language mutexes. */ -/* #undef HAVE_MUTEX_ALPHA_GCC_ASSEMBLY */ - -/* Define to 1 to use the GCC compiler and ARM assembly language mutexes. */ -/* #undef HAVE_MUTEX_ARM_GCC_ASSEMBLY */ - -/* Define to 1 to use the Apple/Darwin _spin_lock_try mutexes. */ -/* #undef HAVE_MUTEX_DARWIN_SPIN_LOCK_TRY */ - -/* Define to 1 to use the UNIX fcntl system call mutexes. */ -/* #undef HAVE_MUTEX_FCNTL */ - -/* Define to 1 to use the GCC compiler and PaRisc assembly language mutexes. - */ -/* #undef HAVE_MUTEX_HPPA_GCC_ASSEMBLY */ - -/* Define to 1 to use the msem_XXX mutexes on HP-UX. */ -/* #undef HAVE_MUTEX_HPPA_MSEM_INIT */ - -/* Define to 1 to use test-and-set mutexes with blocking mutexes. */ -/* #undef HAVE_MUTEX_HYBRID */ - -/* Define to 1 to use the GCC compiler and IA64 assembly language mutexes. */ -/* #undef HAVE_MUTEX_IA64_GCC_ASSEMBLY */ - -/* Define to 1 to use the GCC compiler and MIPS assembly language mutexes. */ -/* #undef HAVE_MUTEX_MIPS_GCC_ASSEMBLY */ - -/* Define to 1 to use the msem_XXX mutexes on systems other than HP-UX. */ -/* #undef HAVE_MUTEX_MSEM_INIT */ - -/* Define to 1 to use the GCC compiler and PowerPC assembly language mutexes. - */ -/* #undef HAVE_MUTEX_PPC_GCC_ASSEMBLY */ - -/* Define to 1 to use POSIX 1003.1 pthread_XXX mutexes. */ -/* #undef HAVE_MUTEX_PTHREADS */ - -/* Define to 1 to use Reliant UNIX initspin mutexes. */ -/* #undef HAVE_MUTEX_RELIANTUNIX_INITSPIN */ - -/* Define to 1 to use the IBM C compiler and S/390 assembly language mutexes. - */ -/* #undef HAVE_MUTEX_S390_CC_ASSEMBLY */ - -/* Define to 1 to use the GCC compiler and S/390 assembly language mutexes. */ -/* #undef HAVE_MUTEX_S390_GCC_ASSEMBLY */ - -/* Define to 1 to use the SCO compiler and x86 assembly language mutexes. */ -/* #undef HAVE_MUTEX_SCO_X86_CC_ASSEMBLY */ - -/* Define to 1 to use the obsolete POSIX 1003.1 sema_XXX mutexes. */ -/* #undef HAVE_MUTEX_SEMA_INIT */ - -/* Define to 1 to use the SGI XXX_lock mutexes. */ -/* #undef HAVE_MUTEX_SGI_INIT_LOCK */ - -/* Define to 1 to use the Solaris _lock_XXX mutexes. */ -/* #undef HAVE_MUTEX_SOLARIS_LOCK_TRY */ - -/* Define to 1 to use the Solaris lwp threads mutexes. */ -/* #undef HAVE_MUTEX_SOLARIS_LWP */ - -/* Define to 1 to use the GCC compiler and Sparc assembly language mutexes. */ -/* #undef HAVE_MUTEX_SPARC_GCC_ASSEMBLY */ - -/* Define to 1 if the Berkeley DB library should support mutexes. */ -#define HAVE_MUTEX_SUPPORT 1 - -/* Define to 1 if mutexes hold system resources. */ -/* #undef HAVE_MUTEX_SYSTEM_RESOURCES */ - -/* Define to 1 to configure mutexes intra-process only. */ -/* #undef HAVE_MUTEX_THREAD_ONLY */ - -/* Define to 1 to use the CC compiler and Tru64 assembly language mutexes. */ -/* #undef HAVE_MUTEX_TRU64_CC_ASSEMBLY */ - -/* Define to 1 to use the UNIX International mutexes. */ -/* #undef HAVE_MUTEX_UI_THREADS */ - -/* Define to 1 to use the UTS compiler and assembly language mutexes. */ -/* #undef HAVE_MUTEX_UTS_CC_ASSEMBLY */ - -/* Define to 1 to use VMS mutexes. */ -/* #undef HAVE_MUTEX_VMS */ - -/* Define to 1 to use VxWorks mutexes. */ -/* #undef HAVE_MUTEX_VXWORKS */ - -/* Define to 1 to use the MSVC compiler and Windows mutexes. */ -#define HAVE_MUTEX_WIN32 1 - -/* Define to 1 to use the GCC compiler and Windows mutexes. */ -/* #undef HAVE_MUTEX_WIN32_GCC */ - -/* Define to 1 to use the GCC compiler and 64-bit x86 assembly language - mutexes. */ -/* #undef HAVE_MUTEX_X86_64_GCC_ASSEMBLY */ - -/* Define to 1 to use the GCC compiler and 32-bit x86 assembly language - mutexes. */ -/* #undef HAVE_MUTEX_X86_GCC_ASSEMBLY */ - -/* Define to 1 if you have the header file, and it defines `DIR'. */ -/* #undef HAVE_NDIR_H */ - -/* Define to 1 if you have the O_DIRECT flag. */ -/* #undef HAVE_O_DIRECT */ - -/* Define to 1 if building partitioned database support. */ -/* #undef HAVE_PARTITION */ - -/* Define to 1 to enable some kind of performance event monitoring. */ -/* #undef HAVE_PERFMON */ - -/* Define to 1 to enable performance event monitoring of *_stat() statistics. - */ -/* #undef HAVE_PERFMON_STATISTICS */ - -/* Define to 1 if you have the `pread' function. */ -/* #undef HAVE_PREAD */ - -/* Define to 1 if you have the `printf' function. */ -#define HAVE_PRINTF 1 - -/* Define to 1 if you have the `pstat_getdynamic' function. */ -/* #undef HAVE_PSTAT_GETDYNAMIC */ - -/* Define to 1 if it is OK to initialize an already initialized - pthread_cond_t. */ -/* #undef HAVE_PTHREAD_COND_REINIT_OKAY */ - -/* Define to 1 if it is OK to initialize an already initialized - pthread_rwlock_t. */ -/* #undef HAVE_PTHREAD_RWLOCK_REINIT_OKAY */ - -/* Define to 1 if you have the `pthread_self' function. */ -/* #undef HAVE_PTHREAD_SELF */ - -/* Define to 1 if you have the `pthread_yield' function. */ -/* #undef HAVE_PTHREAD_YIELD */ - -/* Define to 1 if you have the `pwrite' function. */ -/* #undef HAVE_PWRITE */ - -/* Define to 1 if building on QNX. */ -/* #undef HAVE_QNX */ - -/* Define to 1 if you have the `qsort' function. */ -#define HAVE_QSORT 1 - -/* Define to 1 if building Queue access method. */ -#ifndef HAVE_SMALLBUILD -#define HAVE_QUEUE 1 -#endif - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `rand' function. */ -#define HAVE_RAND 1 - -/* Define to 1 if you have the `random' function. */ -/* #undef HAVE_RANDOM */ - -/* Define to 1 if building replication support. */ -/* #undef HAVE_REPLICATION */ - -/* Define to 1 if building the Berkeley DB replication framework. */ -/* #undef HAVE_REPLICATION_THREADS */ - -/* Define to 1 if you have the `sched_yield' function. */ -/* #undef HAVE_SCHED_YIELD */ - -/* Define to 1 if you have the `select' function. */ -/* #undef HAVE_SELECT */ - -/* Define to 1 if you have the `setgid' function. */ -/* #undef HAVE_SETGID */ - -/* Define to 1 if you have the `setuid' function. */ -#define HAVE_SETUID 1 - -/* Define to 1 to configure Berkeley DB to use shared, read/write latches. */ -#define HAVE_SHARED_LATCHES 1 - -/* Define to 1 if shmctl/SHM_LOCK locks down shared memory segments. */ -/* #undef HAVE_SHMCTL_SHM_LOCK */ - -/* Define to 1 if you have the `shmget' function. */ -/* #undef HAVE_SHMGET */ - -/* Define to 1 if you have the `sigaction' function. */ -/* #undef HAVE_SIGACTION */ - -/* Define to 1 if thread identifier type db_threadid_t is integral. */ -#define HAVE_SIMPLE_THREAD_TYPE 1 - -/* Define to 1 if you have the `snprintf' function. */ -#define HAVE_SNPRINTF 1 - -/* Define to 1 if you have the `stat' function. */ -#define HAVE_STAT 1 - -/* Define to 1 if building statistics support. */ -#define HAVE_STATISTICS 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STDINT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `strcasecmp' function. */ -#define HAVE_STRCASECMP 1 - -/* Define to 1 if you have the `strcat' function. */ -#define HAVE_STRCAT 1 - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strdup' function. */ -/* #undef HAVE_STRDUP */ - -/* Define to 1 if you have the `strerror' function. */ -/* #undef HAVE_STRERROR */ - -/* Define to 1 if you have the `strftime' function. */ -/* #undef HAVE_STRFTIME */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if building without output message content. */ -#ifdef HAVE_SMALLBUILD -#define HAVE_STRIPPED_MESSAGES 1 -#endif - -/* Define to 1 if you have the `strncat' function. */ -#define HAVE_STRNCAT 1 - -/* Define to 1 if you have the `strncmp' function. */ -#define HAVE_STRNCMP 1 - -/* Define to 1 if you have the `strrchr' function. */ -#define HAVE_STRRCHR 1 - -/* Define to 1 if you have the `strsep' function. */ -/* #undef HAVE_STRSEP */ - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if `st_blksize' is member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BLKSIZE */ - -/* Define to 1 if you have the `sysconf' function. */ -/* #undef HAVE_SYSCONF */ - -/* Define to 1 if port includes files in the Berkeley DB source code. */ -/* #undef HAVE_SYSTEM_INCLUDE_FILES */ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_SYS_DIR_H */ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_SYS_NDIR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SDT_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SELECT_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SOCKET_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TIME_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `time' function. */ -/* #undef HAVE_TIME */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UNISTD_H */ - -/* Define to 1 if unlink of file with open file descriptors will fail. */ -/* #undef HAVE_UNLINK_WITH_OPEN_FAILURE */ - -/* Define to 1 if port includes historic database upgrade support. */ -/* #undef HAVE_UPGRADE_SUPPORT */ - -/* Define to 1 if building access method verification support. */ -#ifndef HAVE_SMALLBUILD -#define HAVE_VERIFY 1 -#endif - -/* Define to 1 if you have the `vsnprintf' function. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 if building VxWorks. */ -/* #undef HAVE_VXWORKS */ - -/* Define to 1 if you have the `yield' function. */ -/* #undef HAVE_YIELD */ - -/* Define to 1 if you have the `_fstati64' function. */ -#define HAVE__FSTATI64 1 - -/* Define to the sub-directory in which libtool stores uninstalled libraries. */ -/* #undef LT_OBJDIR */ - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "Oracle Technology Network Berkeley DB forum" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "Berkeley DB" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "Berkeley DB 5.3.29" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "db-5.3.29" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.oracle.com/technology/software/products/berkeley-db/index.html" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.3.29" - -/* The size of a `char', as computed by sizeof. */ -/* #undef SIZEOF_CHAR */ - -/* The size of a `char *', as computed by sizeof. */ -/* #undef SIZEOF_CHAR_P */ - -/* The size of a `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ - -/* The size of a `long', as computed by sizeof. */ -/* #undef SIZEOF_LONG */ - -/* The size of a `long long', as computed by sizeof. */ -/* #undef SIZEOF_LONG_LONG */ - -/* The size of a `short', as computed by sizeof. */ -/* #undef SIZEOF_SHORT */ - -/* The size of a `size_t', as computed by sizeof. */ -/* #undef SIZEOF_SIZE_T */ - -/* The size of a `unsigned char', as computed by sizeof. */ -/* #undef SIZEOF_UNSIGNED_CHAR */ - -/* The size of a `unsigned int', as computed by sizeof. */ -/* #undef SIZEOF_UNSIGNED_INT */ - -/* The size of a `unsigned long', as computed by sizeof. */ -/* #undef SIZEOF_UNSIGNED_LONG */ - -/* The size of a `unsigned long long', as computed by sizeof. */ -/* #undef SIZEOF_UNSIGNED_LONG_LONG */ - -/* The size of a `unsigned short', as computed by sizeof. */ -/* #undef SIZEOF_UNSIGNED_SHORT */ - -/* Define to 1 if the `S_IS*' macros in do not work properly. */ -/* #undef STAT_MACROS_BROKEN */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -/* #undef TIME_WITH_SYS_TIME */ - -/* Define to 1 to mask harmless uninitialized memory read/writes. */ -/* #undef UMRW */ - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#define inline __inline -#endif - -/* type to use in place of socklen_t if not defined */ -/* #undef socklen_t */ diff --git a/build_wince/db_int.h b/build_wince/db_int.h deleted file mode 100644 index b1453d5dc..000000000 --- a/build_wince/db_int.h +++ /dev/null @@ -1,1163 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_windows. */ -/*- - * See the file LICENSE for redistribution information. - * - * Copyright (c) 1996, 2013 Oracle and/or its affiliates. All rights reserved. - * - * $Id$ - */ - -#ifndef _DB_INT_H_ -#define _DB_INT_H_ - -/******************************************************* - * Berkeley DB ANSI/POSIX include files. - *******************************************************/ -#ifdef HAVE_SYSTEM_INCLUDE_FILES -#include -#ifdef DIAG_MVCC -#include -#endif -#include - -#if defined(HAVE_REPLICATION_THREADS) -#ifdef HAVE_SYS_SELECT_H -#include -#endif -#ifdef HAVE_VXWORKS -#include -#endif -#endif - -#if TIME_WITH_SYS_TIME -#include -#include -#else -#if HAVE_SYS_TIME_H -#include -#else -#include -#endif -#endif - -#ifdef HAVE_VXWORKS -#include -#else -#include -#endif - -#if defined(HAVE_REPLICATION_THREADS) -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#include -#include -#include -#endif - -#if defined(STDC_HEADERS) || defined(__cplusplus) -#include -#else -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif /* !HAVE_SYSTEM_INCLUDE_FILES */ - -#ifdef DB_WIN32 -#include "dbinc/win_db.h" -#endif - -#ifdef HAVE_DBM -#undef DB_DBM_HSEARCH -#define DB_DBM_HSEARCH 1 -#endif - -#include "db.h" -#include "clib_port.h" - -#include "dbinc/queue.h" -#include "dbinc/shqueue.h" -#include "dbinc/perfmon.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -/* - * The Windows compiler needs to be told about structures that are available - * outside a dll. - */ -#if defined(DB_WIN32) && defined(_MSC_VER) && \ - !defined(DB_CREATE_DLL) && !defined(_LIB) -#define __DB_IMPORT __declspec(dllimport) -#else -#define __DB_IMPORT -#endif - -/******************************************************* - * Forward structure declarations. - *******************************************************/ -struct __db_commit_info; typedef struct __db_commit_info DB_COMMIT_INFO; -struct __db_reginfo_t; typedef struct __db_reginfo_t REGINFO; -struct __db_txnhead; typedef struct __db_txnhead DB_TXNHEAD; -struct __db_txnlist; typedef struct __db_txnlist DB_TXNLIST; -struct __vrfy_childinfo;typedef struct __vrfy_childinfo VRFY_CHILDINFO; -struct __vrfy_dbinfo; typedef struct __vrfy_dbinfo VRFY_DBINFO; -struct __vrfy_pageinfo; typedef struct __vrfy_pageinfo VRFY_PAGEINFO; - -struct __db_log_verify_info; -struct __txn_verify_info; -struct __lv_filereg_info; -struct __lv_ckp_info; -struct __lv_timestamp_info; -typedef struct __db_log_verify_info DB_LOG_VRFY_INFO; -typedef struct __txn_verify_info VRFY_TXN_INFO; -typedef struct __lv_filereg_info VRFY_FILEREG_INFO; -typedef struct __lv_filelife VRFY_FILELIFE; -typedef struct __lv_ckp_info VRFY_CKP_INFO; -typedef struct __lv_timestamp_info VRFY_TIMESTAMP_INFO; - -/* - * TXNINFO_HANDLER -- - * Callback function pointer type for __iterate_txninfo. - */ -typedef int (*TXNINFO_HANDLER) __P((DB_LOG_VRFY_INFO *, VRFY_TXN_INFO *, void *)); - -typedef SH_TAILQ_HEAD(__hash_head) DB_HASHTAB; - -/******************************************************* - * General purpose constants and macros. - *******************************************************/ -#undef FALSE -#define FALSE 0 -#undef TRUE -#define TRUE (!FALSE) - -#define MEGABYTE 1048576 -#define GIGABYTE 1073741824 - -#define NS_PER_MS 1000000 /* Nanoseconds in a millisecond */ -#define NS_PER_US 1000 /* Nanoseconds in a microsecond */ -#define NS_PER_SEC 1000000000 /* Nanoseconds in a second */ -#define US_PER_MS 1000 /* Microseconds in a millisecond */ -#define US_PER_SEC 1000000 /* Microseconds in a second */ -#define MS_PER_SEC 1000 /* Milliseconds in a second */ - -#define RECNO_OOB 0 /* Illegal record number. */ - -/* - * Define a macro which has no runtime effect, yet avoids triggering empty - * statement compiler warnings. Use it as the text of conditionally-null macros. - */ -#define NOP_STATEMENT do { } while (0) - -/* Test for a power-of-two (tests true for zero, which doesn't matter here). */ -#define POWER_OF_TWO(x) (((x) & ((x) - 1)) == 0) - -/* Test for valid page sizes. */ -#define DB_MIN_PGSIZE 0x000200 /* Minimum page size (512). */ -#define DB_MAX_PGSIZE 0x010000 /* Maximum page size (65536). */ -#define IS_VALID_PAGESIZE(x) \ - (POWER_OF_TWO(x) && (x) >= DB_MIN_PGSIZE && ((x) <= DB_MAX_PGSIZE)) - -/* Minimum number of pages cached, by default. */ -#define DB_MINPAGECACHE 16 - -/* - * If we are unable to determine the underlying filesystem block size, use - * 8K on the grounds that most OS's use less than 8K for a VM page size. - */ -#define DB_DEF_IOSIZE (8 * 1024) - -/* Align an integer to a specific boundary. */ -#undef DB_ALIGN -#define DB_ALIGN(v, bound) \ - (((v) + (bound) - 1) & ~(((uintmax_t)(bound)) - 1)) - -/* Increment a pointer to a specific boundary. */ -#undef ALIGNP_INC -#define ALIGNP_INC(p, bound) \ - (void *)(((uintptr_t)(p) + (bound) - 1) & ~(((uintptr_t)(bound)) - 1)) - -/* - * DB_ALIGN8 adjusts structure alignments to make sure shared structures have - * fixed size and filed offset on both 32bit and 64bit platforms when - * HAVE_MIXED_SIZE_ADDRESSING is defined. - */ -#ifdef HAVE_MIXED_SIZE_ADDRESSING -#define DB_ALIGN8 __declspec(align(8)) -#else -#define DB_ALIGN8 -#endif - -/* - * Berkeley DB uses the va_copy macro from C99, not all compilers include - * it, so add a dumb implementation compatible with pre C99 implementations. - */ -#ifndef va_copy -#define va_copy(d, s) ((d) = (s)) -#endif - -/* - * Print an address as a u_long (a u_long is the largest type we can print - * portably). Most 64-bit systems have made longs 64-bits, so this should - * work. - */ -#define P_TO_ULONG(p) ((u_long)(uintptr_t)(p)) - -/* - * Convert a pointer to an integral value. - * - * The (u_int16_t)(uintptr_t) cast avoids warnings: the (uintptr_t) cast - * converts the value to an integral type, and the (u_int16_t) cast converts - * it to a small integral type so we don't get complaints when we assign the - * final result to an integral type smaller than uintptr_t. - */ -#define P_TO_UINT32(p) ((u_int32_t)(uintptr_t)(p)) -#define P_TO_UINT16(p) ((u_int16_t)(uintptr_t)(p)) -#define P_TO_ROFF(p) ((roff_t)(uintptr_t)(p)) - -/* The converse of P_TO_ROFF() above. */ -#define ROFF_TO_P(roff) ((void *)(uintptr_t)(roff)) - -/* - * There are several on-page structures that are declared to have a number of - * fields followed by a variable length array of items. The structure size - * without including the variable length array or the address of the first of - * those elements can be found using SSZ. - * - * This macro can also be used to find the offset of a structure element in a - * structure. This is used in various places to copy structure elements from - * unaligned memory references, e.g., pointers into a packed page. - * - * There are two versions because compilers object if you take the address of - * an array. - */ -#undef SSZ -#define SSZ(name, field) P_TO_UINT16(&(((name *)0)->field)) - -#undef SSZA -#define SSZA(name, field) P_TO_UINT16(&(((name *)0)->field[0])) - -/* Structure used to print flag values. */ -typedef struct __fn { - u_int32_t mask; /* Flag value. */ - const char *name; /* Flag name. */ -} FN; - -/* Set, clear and test flags. */ -#define FLD_CLR(fld, f) (fld) &= ~(f) -#define FLD_ISSET(fld, f) ((fld) & (f)) -#define FLD_SET(fld, f) (fld) |= (f) -#define F_CLR(p, f) (p)->flags &= ~(f) -#define F_ISSET(p, f) ((p)->flags & (f)) -#define F_SET(p, f) (p)->flags |= (f) -#define F2_CLR(p, f) ((p)->flags2 &= ~(f)) -#define F2_ISSET(p, f) ((p)->flags2 & (f)) -#define F2_SET(p, f) ((p)->flags2 |= (f)) -#define LF_CLR(f) ((flags) &= ~(f)) -#define LF_ISSET(f) ((flags) & (f)) -#define LF_SET(f) ((flags) |= (f)) - -/* - * Calculate a percentage. The values can overflow 32-bit integer arithmetic - * so we use floating point. - * - * When calculating a bytes-vs-page size percentage, we're getting the inverse - * of the percentage in all cases, that is, we want 100 minus the percentage we - * calculate. - */ -#define DB_PCT(v, total) \ - ((int)((total) == 0 ? 0 : ((double)(v) * 100) / (total))) -#define DB_PCT_PG(v, total, pgsize) \ - ((int)((total) == 0 ? 0 : \ - 100 - ((double)(v) * 100) / (((double)total) * (pgsize)))) - -/* - * Statistics update shared memory and so are expensive -- don't update the - * values unless we're going to display the results. - * When performance monitoring is enabled, the changed value can be published - * (via DTrace or SystemTap) along with another associated value or two. - */ -#undef STAT -#ifdef HAVE_STATISTICS -#define STAT(x) x -#define STAT_ADJUST(env, cat, subcat, val, amount, id) \ - do { \ - (val) += (amount); \ - STAT_PERFMON2((env), cat, subcat, (val), (id)); \ - } while (0) -#define STAT_ADJUST_VERB(env, cat, subcat, val, amount, id1, id2) \ - do { \ - (val) += (amount); \ - STAT_PERFMON3((env), cat, subcat, (val), (id1), (id2)); \ - } while (0) -#define STAT_INC(env, cat, subcat, val, id) \ - STAT_ADJUST(env, cat, subcat, (val), 1, (id)) -#define STAT_INC_VERB(env, cat, subcat, val, id1, id2) \ - STAT_ADJUST_VERB((env), cat, subcat, (val), 1, (id1), (id2)) -/* - * STAT_DEC() subtracts one rather than adding (-1) with STAT_ADJUST(); the - * latter might generate a compilation warning for an unsigned value. - */ -#define STAT_DEC(env, cat, subcat, val, id) \ - do { \ - (val)--; \ - STAT_PERFMON2((env), cat, subcat, (val), (id)); \ - } while (0) -/* N.B.: Add a verbose version of STAT_DEC() when needed. */ - -#define STAT_SET(env, cat, subcat, val, newval, id) \ - do { \ - (val) = (newval); \ - STAT_PERFMON2((env), cat, subcat, (val), (id)); \ - } while (0) -#define STAT_SET_VERB(env, cat, subcat, val, newval, id1, id2) \ - do { \ - (val) = (newval); \ - STAT_PERFMON3((env), cat, subcat, (val), (id1), (id2)); \ - } while (0) -#else -#define STAT(x) NOP_STATEMENT -#define STAT_ADJUST(env, cat, subcat, val, amt, id) NOP_STATEMENT -#define STAT_ADJUST_VERB(env, cat, subcat, val, amt, id1, id2) NOP_STATEMENT -#define STAT_INC(env, cat, subcat, val, id) NOP_STATEMENT -#define STAT_INC_VERB(env, cat, subcat, val, id1, id2) NOP_STATEMENT -#define STAT_DEC(env, cat, subcat, val, id) NOP_STATEMENT -#define STAT_SET(env, cat, subcat, val, newval, id) NOP_STATEMENT -#define STAT_SET_VERB(env, cat, subcat, val, newval, id1, id2) NOP_STATEMENT -#endif - -#if defined HAVE_SIMPLE_THREAD_TYPE -#define DB_THREADID_INIT(t) COMPQUIET((t), 0) -#else -#define DB_THREADID_INIT(t) memset(&(t), 0, sizeof(t)) -#endif - -/* - * These macros are used when an error condition is first noticed. They allow - * one to be notified (via e.g. DTrace, SystemTap, ...) when an error occurs - * deep inside DB, rather than when it is returned back through the API. - * - * The second actual argument to these is the second part of the error or - * warning event name. They work when 'errcode' is a symbolic name e.g. - * EINVAL or DB_LOCK_DEALOCK, not a variable. Noticing system call failures - * would be handled by tracing on syscall exit; when e.g., it returns < 0. - */ -#define ERR_ORIGIN(env, errcode) \ - (PERFMON0(env, error, errcode), errcode) - -#define ERR_ORIGIN_MSG(env, errcode, msg) \ - (PERFMON1(env, error, errcode, msg), errcode) - -#define WARNING_ORIGIN(env, errcode) \ - (PERFMON0(env, warning, errcode), errcode) - -/* - * Structure used for callback message aggregation. - * - * Display values in XXX_stat_print calls. - */ -typedef struct __db_msgbuf { - char *buf; /* Heap allocated buffer. */ - char *cur; /* Current end of message. */ - size_t len; /* Allocated length of buffer. */ -} DB_MSGBUF; -#define DB_MSGBUF_INIT(a) do { \ - (a)->buf = (a)->cur = NULL; \ - (a)->len = 0; \ -} while (0) -#define DB_MSGBUF_FLUSH(env, a) do { \ - if ((a)->buf != NULL) { \ - if ((a)->cur != (a)->buf) \ - __db_msg(env, "%s", (a)->buf); \ - __os_free(env, (a)->buf); \ - DB_MSGBUF_INIT(a); \ - } \ -} while (0) -#define DB_MSGBUF_REP_FLUSH(env, a, diag_msg, regular_msg) do { \ - if ((a)->buf != NULL) { \ - if ((a)->cur != (a)->buf && diag_msg) \ - __db_repmsg(env, "%s", (a)->buf); \ - if (regular_msg) \ - DB_MSGBUF_FLUSH(env, a); \ - else { \ - __os_free(env, (a)->buf); \ - DB_MSGBUF_INIT(a); \ - } \ - } \ -} while (0) -#define STAT_FMT(msg, fmt, type, v) do { \ - DB_MSGBUF __mb; \ - DB_MSGBUF_INIT(&__mb); \ - __db_msgadd(env, &__mb, fmt, (type)(v)); \ - __db_msgadd(env, &__mb, "\t%s", msg); \ - DB_MSGBUF_FLUSH(env, &__mb); \ -} while (0) -#define STAT_HEX(msg, v) \ - __db_msg(env, "%#lx\t%s", (u_long)(v), msg) -#define STAT_ISSET(msg, p) \ - __db_msg(env, "%sSet\t%s", (p) == NULL ? "!" : " ", msg) -#define STAT_LONG(msg, v) \ - __db_msg(env, "%ld\t%s", (long)(v), msg) -#define STAT_LSN(msg, lsnp) \ - __db_msg(env, "%lu/%lu\t%s", \ - (u_long)(lsnp)->file, (u_long)(lsnp)->offset, msg) -#define STAT_POINTER(msg, v) \ - __db_msg(env, "%#lx\t%s", P_TO_ULONG(v), msg) -#define STAT_STRING(msg, p) do { \ - const char *__p = p; /* p may be a function call. */ \ - __db_msg(env, "%s\t%s", __p == NULL ? "!Set" : __p, msg); \ -} while (0) -#define STAT_ULONG(msg, v) \ - __db_msg(env, "%lu\t%s", (u_long)(v), msg) - -/* - * The following macros are used to control how error and message strings are - * output by Berkeley DB. There are essentially three different controls - * available: - * - Default behavior is to output error strings with its unique identifier. - * - If HAVE_STRIPPED_MESSAGES is enabled, a unique identifier along with any - * parameters to the error string will be output. - * - If HAVE_LOCALIZATION is defined, and the '_()' macro is implemented, a - * gettext or ICU style translation will be done. - * - * Each new string that will be output should be wrapped in a DB_STR* macro. - * There are three versions of this macro for different scenarions: - * - DB_STR for strings that need an identifier, and don't have any argument. - * - DB_STR_A for strings that need an identifier, and have argument(s). - * - DB_STR_P for strings that don't need an identifier, and don't have - * arguments. - * - * Error message IDs are automatically assigned by dist/s_message_id script. - */ -#ifdef HAVE_LOCALIZATION -#define _(msg) msg /* Replace with localization function. */ -#else -#define _(msg) msg -#endif - -#ifdef HAVE_STRIPPED_MESSAGES -#define DB_STR_C(msg, fmt) fmt -#else -#define DB_STR_C(msg, fmt) _(msg) -#endif - -#define DB_MSGID(id) "BDB" id - -#define DB_STR(id, msg) DB_MSGID(id) " " DB_STR_C(msg, "") - -#define DB_STR_A(id, msg, fmt) DB_MSGID(id) " " DB_STR_C(msg, fmt) - -#define DB_STR_P(msg) _(msg) - -/* - * There are quite a few places in Berkeley DB where we want to initialize - * a DBT from a string or other random pointer type, using a length typed - * to size_t in most cases. This macro avoids a lot of casting. The macro - * comes in two flavors because we often want to clear the DBT first. - */ -#define DB_SET_DBT(dbt, d, s) do { \ - (dbt).data = (void *)(d); \ - (dbt).size = (u_int32_t)(s); \ -} while (0) -#define DB_INIT_DBT(dbt, d, s) do { \ - memset(&(dbt), 0, sizeof(dbt)); \ - DB_SET_DBT(dbt, d, s); \ -} while (0) - -/******************************************************* - * API return values - *******************************************************/ -/* - * Return values that are OK for each different call. Most calls have a - * standard 'return of 0 is only OK value', but some, like db->get have - * DB_NOTFOUND as a return value, but it really isn't an error. - */ -#define DB_RETOK_STD(ret) ((ret) == 0) -#define DB_RETOK_DBCDEL(ret) ((ret) == 0 || (ret) == DB_KEYEMPTY || \ - (ret) == DB_NOTFOUND) -#define DB_RETOK_DBCGET(ret) ((ret) == 0 || (ret) == DB_KEYEMPTY || \ - (ret) == DB_NOTFOUND) -#define DB_RETOK_DBCPUT(ret) ((ret) == 0 || (ret) == DB_KEYEXIST || \ - (ret) == DB_NOTFOUND) -#define DB_RETOK_DBDEL(ret) DB_RETOK_DBCDEL(ret) -#define DB_RETOK_DBGET(ret) DB_RETOK_DBCGET(ret) -#define DB_RETOK_DBPUT(ret) ((ret) == 0 || (ret) == DB_KEYEXIST) -#define DB_RETOK_EXISTS(ret) DB_RETOK_DBCGET(ret) -#define DB_RETOK_LGGET(ret) ((ret) == 0 || (ret) == DB_NOTFOUND) -#define DB_RETOK_MPGET(ret) ((ret) == 0 || (ret) == DB_PAGE_NOTFOUND) -#define DB_RETOK_REPPMSG(ret) ((ret) == 0 || \ - (ret) == DB_REP_IGNORE || \ - (ret) == DB_REP_ISPERM || \ - (ret) == DB_REP_NEWMASTER || \ - (ret) == DB_REP_NEWSITE || \ - (ret) == DB_REP_NOTPERM || \ - (ret) == DB_REP_WOULDROLLBACK) -#define DB_RETOK_REPMGR_LOCALSITE(ret) ((ret) == 0 || (ret) == DB_NOTFOUND) -#define DB_RETOK_REPMGR_START(ret) ((ret) == 0 || (ret) == DB_REP_IGNORE) -#define DB_RETOK_TXNAPPLIED(ret) ((ret) == 0 || \ - (ret) == DB_NOTFOUND || \ - (ret) == DB_TIMEOUT || \ - (ret) == DB_KEYEMPTY) - -/* Find a reasonable operation-not-supported error. */ -#ifdef EOPNOTSUPP -#define DB_OPNOTSUP EOPNOTSUPP -#else -#ifdef ENOTSUP -#define DB_OPNOTSUP ENOTSUP -#else -#define DB_OPNOTSUP EINVAL -#endif -#endif - -/******************************************************* - * Files. - *******************************************************/ -/* - * We use 1024 as the maximum path length. It's too hard to figure out what - * the real path length is, as it was traditionally stored in , - * and that file isn't always available. - */ -#define DB_MAXPATHLEN 1024 - -#define PATH_DOT "." /* Current working directory. */ - /* Path separator character(s). */ -#define PATH_SEPARATOR "\\/:" - -/******************************************************* - * Environment. - *******************************************************/ -/* Type passed to __db_appname(). */ -typedef enum { - DB_APP_NONE=0, /* No type (region). */ - DB_APP_DATA, /* Data file. */ - DB_APP_LOG, /* Log file. */ - DB_APP_META, /* Persistent metadata file. */ - DB_APP_RECOVER, /* We are in recovery. */ - DB_APP_TMP /* Temporary file. */ -} APPNAME; - -/* - * A set of macros to check if various functionality has been configured. - * - * ALIVE_ON The is_alive function is configured. - * CDB_LOCKING CDB product locking. - * CRYPTO_ON Security has been configured. - * LOCKING_ON Locking has been configured. - * LOGGING_ON Logging has been configured. - * MUTEX_ON Mutexes have been configured. - * MPOOL_ON Memory pool has been configured. - * REP_ON Replication has been configured. - * TXN_ON Transactions have been configured. - * - * REP_ON is more complex than most: if the BDB library was compiled without - * replication support, ENV->rep_handle will be NULL; if the BDB library has - * replication support, but it was not configured, the region reference will - * be NULL. - */ -#define ALIVE_ON(env) ((env)->dbenv->is_alive != NULL) -#define CDB_LOCKING(env) F_ISSET(env, ENV_CDB) -#define CRYPTO_ON(env) ((env)->crypto_handle != NULL) -#define LOCKING_ON(env) ((env)->lk_handle != NULL) -#define LOGGING_ON(env) ((env)->lg_handle != NULL) -#define MPOOL_ON(env) ((env)->mp_handle != NULL) -#define MUTEX_ON(env) ((env)->mutex_handle != NULL) -#define REP_ON(env) \ - ((env)->rep_handle != NULL && (env)->rep_handle->region != NULL) -#define TXN_ON(env) ((env)->tx_handle != NULL) - -/* - * STD_LOCKING Standard locking, that is, locking was configured and CDB - * was not. We do not do locking in off-page duplicate trees, - * so we check for that in the cursor first. - */ -#define STD_LOCKING(dbc) \ - (!F_ISSET(dbc, DBC_OPD) && \ - !CDB_LOCKING((dbc)->env) && LOCKING_ON((dbc)->env)) - -/* - * IS_RECOVERING: The system is running recovery. - */ -#define IS_RECOVERING(env) \ - (LOGGING_ON(env) && F_ISSET((env)->lg_handle, DBLOG_RECOVER)) - -/* Initialization methods are often illegal before/after open is called. */ -#define ENV_ILLEGAL_AFTER_OPEN(env, name) \ - if (F_ISSET((env), ENV_OPEN_CALLED)) \ - return (__db_mi_open(env, name, 1)); -#define ENV_ILLEGAL_BEFORE_OPEN(env, name) \ - if (!F_ISSET((env), ENV_OPEN_CALLED)) \ - return (__db_mi_open(env, name, 0)); - -/* We're not actually user hostile, honest. */ -#define ENV_REQUIRES_CONFIG(env, handle, i, flags) \ - if (handle == NULL) \ - return (__env_not_config(env, i, flags)); -#define ENV_REQUIRES_CONFIG_XX(env, handle, i, flags) \ - if ((env)->handle->region == NULL) \ - return (__env_not_config(env, i, flags)); -#define ENV_NOT_CONFIGURED(env, handle, i, flags) \ - if (F_ISSET((env), ENV_OPEN_CALLED)) \ - ENV_REQUIRES_CONFIG(env, handle, i, flags) - -#define ENV_ENTER_RET(env, ip, ret) do { \ - ret = 0; \ - PANIC_CHECK_RET(env, ret); \ - if (ret == 0) { \ - if ((env)->thr_hashtab == NULL) \ - ip = NULL; \ - else \ - ret = __env_set_state(env, &(ip), THREAD_ACTIVE);\ - } \ -} while (0) - -#define ENV_ENTER(env, ip) do { \ - int __ret; \ - ip = NULL; \ - ENV_ENTER_RET(env, ip, __ret); \ - if (__ret != 0) \ - return (__ret); \ -} while (0) - -#define FAILCHK_THREAD(env, ip) do { \ - if ((ip) != NULL) \ - (ip)->dbth_state = THREAD_FAILCHK; \ -} while (0) - -#define ENV_GET_THREAD_INFO(env, ip) ENV_ENTER(env, ip) - -#ifdef DIAGNOSTIC -#define ENV_LEAVE(env, ip) do { \ - if ((ip) != NULL) { \ - DB_ASSERT(env, ((ip)->dbth_state == THREAD_ACTIVE || \ - (ip)->dbth_state == THREAD_FAILCHK)); \ - (ip)->dbth_state = THREAD_OUT; \ - } \ -} while (0) -#else -#define ENV_LEAVE(env, ip) do { \ - if ((ip) != NULL) \ - (ip)->dbth_state = THREAD_OUT; \ -} while (0) -#endif -#ifdef DIAGNOSTIC -#define CHECK_THREAD(env) do { \ - if ((env)->thr_hashtab != NULL) \ - (void)__env_set_state(env, NULL, THREAD_VERIFY); \ -} while (0) -#ifdef HAVE_STATISTICS -#define CHECK_MTX_THREAD(env, mtx) do { \ - if (mtx->alloc_id != MTX_MUTEX_REGION && \ - mtx->alloc_id != MTX_ENV_REGION && \ - mtx->alloc_id != MTX_APPLICATION) \ - CHECK_THREAD(env); \ -} while (0) -#else -#define CHECK_MTX_THREAD(env, mtx) NOP_STATEMENT -#endif -#else -#define CHECK_THREAD(env) NOP_STATEMENT -#define CHECK_MTX_THREAD(env, mtx) NOP_STATEMENT -#endif - -typedef enum { - THREAD_SLOT_NOT_IN_USE=0, - THREAD_OUT, - THREAD_ACTIVE, - THREAD_BLOCKED, - THREAD_BLOCKED_DEAD, - THREAD_FAILCHK, - THREAD_VERIFY -} DB_THREAD_STATE; - -typedef struct __pin_list { - roff_t b_ref; /* offset to buffer. */ - int region; /* region containing buffer. */ -} PIN_LIST; -#define PINMAX 4 - -struct __db_thread_info { /* SHARED */ - pid_t dbth_pid; - db_threadid_t dbth_tid; - DB_THREAD_STATE dbth_state; - SH_TAILQ_ENTRY dbth_links; - /* - * The next field contains the (process local) reference to the XA - * transaction currently associated with this thread of control. - */ - SH_TAILQ_HEAD(__dbth_xatxn) dbth_xatxn; - u_int32_t dbth_xa_status; - /* - * The following fields track which buffers this thread of - * control has pinned in the mpool buffer cache. - */ - u_int16_t dbth_pincount; /* Number of pins for this thread. */ - u_int16_t dbth_pinmax; /* Number of slots allocated. */ - roff_t dbth_pinlist; /* List of pins. */ - PIN_LIST dbth_pinarray[PINMAX]; /* Initial array of slots. */ -#ifdef DIAGNOSTIC - roff_t dbth_locker; /* Current locker for this thread. */ - u_int32_t dbth_check_off; /* Count of number of LOCK_OFF calls. */ -#endif -}; -#ifdef DIAGNOSTIC -#define LOCK_CHECK_OFF(ip) if ((ip) != NULL) \ - (ip)->dbth_check_off++ - -#define LOCK_CHECK_ON(ip) if ((ip) != NULL) \ - (ip)->dbth_check_off-- - -#define LOCK_CHECK(dbc, pgno, mode, type) \ - DB_ASSERT((dbc)->dbp->env, (dbc)->locker == NULL || \ - __db_haslock((dbc)->dbp->env, \ - (dbc)->locker, (dbc)->dbp->mpf, pgno, mode, type) == 0) -#else -#define LOCK_CHECK_OFF(ip) NOP_STATEMENT -#define LOCK_CHECK_ON(ip) NOP_STATEMENT -#define LOCK_CHECK(dbc, pgno, mode) NOP_STATEMENT -#endif - -typedef struct __env_thread_info { - u_int32_t thr_count; - u_int32_t thr_init; - u_int32_t thr_max; - u_int32_t thr_nbucket; - roff_t thr_hashoff; -} THREAD_INFO; - -#define DB_EVENT(env, e, einfo) do { \ - DB_ENV *__dbenv = (env)->dbenv; \ - if (__dbenv->db_event_func != NULL) \ - __dbenv->db_event_func(__dbenv, e, einfo); \ -} while (0) - -typedef struct __flag_map { - u_int32_t inflag, outflag; -} FLAG_MAP; - -typedef struct __db_backup_handle { - int (*open) __P((DB_ENV *, const char *, const char *, void **)); - int (*write) __P((DB_ENV *, - u_int32_t, u_int32_t, u_int32_t, u_int8_t *, void *)); - int (*close) __P((DB_ENV *, const char *, void *)); - u_int32_t size; - u_int32_t read_count; - u_int32_t read_sleep; -#define BACKUP_WRITE_DIRECT 0x0001 - int flags; -} DB_BACKUP; - -/* - * Internal database environment structure. - * - * This is the private database environment handle. The public environment - * handle is the DB_ENV structure. The library owns this structure, the user - * owns the DB_ENV structure. The reason there are two structures is because - * the user's configuration outlives any particular DB_ENV->open call, and - * separate structures allows us to easily discard internal information without - * discarding the user's configuration. - */ -struct __env { - DB_ENV *dbenv; /* Linked DB_ENV structure */ - - /* - * The ENV structure can be used concurrently, so field access is - * protected. - */ - db_mutex_t mtx_env; /* ENV structure mutex */ - - /* - * Some fields are included in the ENV structure rather than in the - * DB_ENV structure because they are only set as arguments to the - * DB_ENV->open method. In other words, because of the historic API, - * not for any rational reason. - * - * Arguments to DB_ENV->open. - */ - char *db_home; /* Database home */ - u_int32_t open_flags; /* Flags */ - int db_mode; /* Default open permissions */ - - pid_t pid_cache; /* Cached process ID */ - - DB_FH *lockfhp; /* fcntl(2) locking file handle */ - - DB_LOCKER *env_lref; /* Locker in non-threaded handles */ - - DB_DISTAB recover_dtab; /* Dispatch table for recover funcs */ - - int dir_mode; /* Intermediate directory perms. */ - -#define ENV_DEF_DATA_LEN 100 - u_int32_t data_len; /* Data length in __db_prbytes. */ - - /* Thread tracking */ - u_int32_t thr_nbucket; /* Number of hash buckets */ - DB_HASHTAB *thr_hashtab; /* Hash table of DB_THREAD_INFO */ - - /* - * List of open DB handles for this ENV, used for cursor - * adjustment. Must be protected for multi-threaded support. - */ - db_mutex_t mtx_dblist; - int db_ref; /* DB handle reference count */ - TAILQ_HEAD(__dblist, __db) dblist; - - /* - * List of open file handles for this ENV. Must be protected - * for multi-threaded support. - */ - TAILQ_HEAD(__fdlist, __fh_t) fdlist; - - db_mutex_t mtx_mt; /* Mersenne Twister mutex */ - int mti; /* Mersenne Twister index */ - u_long *mt; /* Mersenne Twister state vector */ - - DB_CIPHER *crypto_handle; /* Crypto handle */ - DB_LOCKTAB *lk_handle; /* Lock handle */ - DB_LOG *lg_handle; /* Log handle */ - DB_MPOOL *mp_handle; /* Mpool handle */ - DB_MUTEXMGR *mutex_handle; /* Mutex handle */ - DB_REP *rep_handle; /* Replication handle */ - DB_TXNMGR *tx_handle; /* Txn handle */ - - DB_BACKUP *backup_handle; /* database copy configuration. */ - - /* - * XA support. - */ - int xa_rmid; /* XA Resource Manager ID */ - int xa_ref; /* XA Reference count */ - TAILQ_ENTRY(__env) links; /* XA environments */ - - /* Application callback to copy data to/from a custom data source */ -#define DB_USERCOPY_GETDATA 0x0001 -#define DB_USERCOPY_SETDATA 0x0002 - int (*dbt_usercopy) - __P((DBT *, u_int32_t, void *, u_int32_t, u_int32_t)); - - int (*log_verify_wrap) __P((ENV *, const char *, u_int32_t, - const char *, const char *, time_t, time_t, u_int32_t, u_int32_t, - u_int32_t, u_int32_t, int, int)); - - REGINFO *reginfo; /* REGINFO structure reference */ - -#define DB_TEST_ELECTINIT 1 /* after __rep_elect_init */ -#define DB_TEST_ELECTVOTE1 2 /* after sending VOTE1 */ -#define DB_TEST_NO_PAGES 3 /* before sending PAGE */ -#define DB_TEST_POSTDESTROY 4 /* after destroy op */ -#define DB_TEST_POSTLOG 5 /* after logging all pages */ -#define DB_TEST_POSTLOGMETA 6 /* after logging meta in btree */ -#define DB_TEST_POSTOPEN 7 /* after __os_open */ -#define DB_TEST_POSTSYNC 8 /* after syncing the log */ -#define DB_TEST_PREDESTROY 9 /* before destroy op */ -#define DB_TEST_PREOPEN 10 /* before __os_open */ -#define DB_TEST_REPMGR_PERM 11 /* repmgr perm/archiving tests */ -#define DB_TEST_SUBDB_LOCKS 12 /* subdb locking tests */ - int test_abort; /* Abort value for testing */ - int test_check; /* Checkpoint value for testing */ - int test_copy; /* Copy value for testing */ - -#define ENV_CDB 0x00000001 /* DB_INIT_CDB */ -#define ENV_DBLOCAL 0x00000002 /* Environment for a private DB */ -#define ENV_LITTLEENDIAN 0x00000004 /* Little endian system. */ -#define ENV_LOCKDOWN 0x00000008 /* DB_LOCKDOWN set */ -#define ENV_NO_OUTPUT_SET 0x00000010 /* No output channel set */ -#define ENV_OPEN_CALLED 0x00000020 /* DB_ENV->open called */ -#define ENV_PRIVATE 0x00000040 /* DB_PRIVATE set */ -#define ENV_RECOVER_FATAL 0x00000080 /* Doing fatal recovery in env */ -#define ENV_REF_COUNTED 0x00000100 /* Region references this handle */ -#define ENV_SYSTEM_MEM 0x00000200 /* DB_SYSTEM_MEM set */ -#define ENV_THREAD 0x00000400 /* DB_THREAD set */ -#define ENV_FORCE_TXN_BULK 0x00000800 /* Txns use bulk mode-for testing */ - u_int32_t flags; -}; - -/******************************************************* - * Database Access Methods. - *******************************************************/ -/* - * DB_IS_THREADED -- - * The database handle is free-threaded (was opened with DB_THREAD). - */ -#define DB_IS_THREADED(dbp) \ - ((dbp)->mutex != MUTEX_INVALID) - -/* Initialization methods are often illegal before/after open is called. */ -#define DB_ILLEGAL_AFTER_OPEN(dbp, name) \ - if (F_ISSET((dbp), DB_AM_OPEN_CALLED)) \ - return (__db_mi_open((dbp)->env, name, 1)); -#define DB_ILLEGAL_BEFORE_OPEN(dbp, name) \ - if (!F_ISSET((dbp), DB_AM_OPEN_CALLED)) \ - return (__db_mi_open((dbp)->env, name, 0)); -/* Some initialization methods are illegal if environment isn't local. */ -#define DB_ILLEGAL_IN_ENV(dbp, name) \ - if (!F_ISSET((dbp)->env, ENV_DBLOCAL)) \ - return (__db_mi_env((dbp)->env, name)); -#define DB_ILLEGAL_METHOD(dbp, flags) { \ - int __ret; \ - if ((__ret = __dbh_am_chk(dbp, flags)) != 0) \ - return (__ret); \ -} - -/* - * Common DBC->internal fields. Each access method adds additional fields - * to this list, but the initial fields are common. - */ -#define __DBC_INTERNAL \ - DBC *opd; /* Off-page duplicate cursor. */\ - DBC *pdbc; /* Pointer to parent cursor. */ \ - \ - void *page; /* Referenced page. */ \ - u_int32_t part; /* Partition number. */ \ - db_pgno_t root; /* Tree root. */ \ - db_pgno_t pgno; /* Referenced page number. */ \ - db_indx_t indx; /* Referenced key item index. */\ - \ - /* Streaming -- cache last position. */ \ - db_pgno_t stream_start_pgno; /* Last start pgno. */ \ - u_int32_t stream_off; /* Current offset. */ \ - db_pgno_t stream_curr_pgno; /* Current overflow page. */ \ - \ - DB_LOCK lock; /* Cursor lock. */ \ - db_lockmode_t lock_mode; /* Lock mode. */ - -struct __dbc_internal { - __DBC_INTERNAL -}; - -/* Actions that __db_master_update can take. */ -typedef enum { MU_REMOVE, MU_RENAME, MU_OPEN, MU_MOVE } mu_action; - -/* - * Access-method-common macro for determining whether a cursor - * has been initialized. - */ -#ifdef HAVE_PARTITION -#define IS_INITIALIZED(dbc) (DB_IS_PARTITIONED((dbc)->dbp) ? \ - ((PART_CURSOR *)(dbc)->internal)->sub_cursor != NULL && \ - ((PART_CURSOR *)(dbc)->internal)->sub_cursor-> \ - internal->pgno != PGNO_INVALID : \ - (dbc)->internal->pgno != PGNO_INVALID) -#else -#define IS_INITIALIZED(dbc) ((dbc)->internal->pgno != PGNO_INVALID) -#endif - -/* Free the callback-allocated buffer, if necessary, hanging off of a DBT. */ -#define FREE_IF_NEEDED(env, dbt) \ - if (F_ISSET((dbt), DB_DBT_APPMALLOC)) { \ - __os_ufree((env), (dbt)->data); \ - F_CLR((dbt), DB_DBT_APPMALLOC); \ - } - -/* - * Use memory belonging to object "owner" to return the results of - * any no-DBT-flag get ops on cursor "dbc". - */ -#define SET_RET_MEM(dbc, owner) \ - do { \ - (dbc)->rskey = &(owner)->my_rskey; \ - (dbc)->rkey = &(owner)->my_rkey; \ - (dbc)->rdata = &(owner)->my_rdata; \ - } while (0) - -/* Use the return-data memory src is currently set to use in dest as well. */ -#define COPY_RET_MEM(src, dest) \ - do { \ - (dest)->rskey = (src)->rskey; \ - (dest)->rkey = (src)->rkey; \ - (dest)->rdata = (src)->rdata; \ - } while (0) - -/* Reset the returned-memory pointers to their defaults. */ -#define RESET_RET_MEM(dbc) \ - do { \ - (dbc)->rskey = &(dbc)->my_rskey; \ - (dbc)->rkey = &(dbc)->my_rkey; \ - (dbc)->rdata = &(dbc)->my_rdata; \ - } while (0) - -#define COMPACT_TRUNCATE(c_data) do { \ - if (c_data->compact_truncate > 1) \ - c_data->compact_truncate--; \ -} while (0) - -/******************************************************* - * Mpool. - *******************************************************/ -/* - * File types for DB access methods. Negative numbers are reserved to DB. - */ -#define DB_FTYPE_SET -1 /* Call pgin/pgout functions. */ -#define DB_FTYPE_NOTSET 0 /* Don't call... */ -#define DB_LSN_OFF_NOTSET -1 /* Not yet set. */ -#define DB_CLEARLEN_NOTSET UINT32_MAX /* Not yet set. */ - -/* Structure used as the DB pgin/pgout pgcookie. */ -typedef struct __dbpginfo { - u_int32_t db_pagesize; /* Underlying page size. */ - u_int32_t flags; /* Some DB_AM flags needed. */ - DBTYPE type; /* DB type */ -} DB_PGINFO; - -/******************************************************* - * Log. - *******************************************************/ -/* Initialize an LSN to 'zero'. */ -#define ZERO_LSN(LSN) do { \ - (LSN).file = 0; \ - (LSN).offset = 0; \ -} while (0) -#define IS_ZERO_LSN(LSN) ((LSN).file == 0 && (LSN).offset == 0) - -#define IS_INIT_LSN(LSN) ((LSN).file == 1 && (LSN).offset == 0) -#define INIT_LSN(LSN) do { \ - (LSN).file = 1; \ - (LSN).offset = 0; \ -} while (0) - -#define MAX_LSN(LSN) do { \ - (LSN).file = UINT32_MAX; \ - (LSN).offset = UINT32_MAX; \ -} while (0) -#define IS_MAX_LSN(LSN) \ - ((LSN).file == UINT32_MAX && (LSN).offset == UINT32_MAX) - -/* If logging is turned off, smash the lsn. */ -#define LSN_NOT_LOGGED(LSN) do { \ - (LSN).file = 0; \ - (LSN).offset = 1; \ -} while (0) -#define IS_NOT_LOGGED_LSN(LSN) \ - ((LSN).file == 0 && (LSN).offset == 1) - -/* - * LOG_COMPARE -- compare two LSNs. - */ - -#define LOG_COMPARE(lsn0, lsn1) \ - ((lsn0)->file != (lsn1)->file ? \ - ((lsn0)->file < (lsn1)->file ? -1 : 1) : \ - ((lsn0)->offset != (lsn1)->offset ? \ - ((lsn0)->offset < (lsn1)->offset ? -1 : 1) : 0)) - -/******************************************************* - * Txn. - *******************************************************/ -#define DB_NONBLOCK(C) ((C)->txn != NULL && F_ISSET((C)->txn, TXN_NOWAIT)) -#define NOWAIT_FLAG(txn) \ - ((txn) != NULL && F_ISSET((txn), TXN_NOWAIT) ? DB_LOCK_NOWAIT : 0) -#define IS_REAL_TXN(txn) \ - ((txn) != NULL && !F_ISSET(txn, TXN_FAMILY)) -#define IS_SUBTRANSACTION(txn) \ - ((txn) != NULL && (txn)->parent != NULL) - -/* Checks for existence of an XA transaction in access method interfaces. */ -#define XA_CHECK_TXN(ip, txn) \ - if ((ip) != NULL && (txn) == NULL) { \ - (txn) = SH_TAILQ_FIRST(&(ip)->dbth_xatxn, __db_txn); \ - DB_ASSERT(env, txn == NULL || \ - txn->xa_thr_status == TXN_XA_THREAD_ASSOCIATED); \ - } - -/* Ensure that there is no XA transaction active. */ -#define XA_NO_TXN(ip, retval) { \ - DB_TXN *__txn; \ - retval = 0; \ - if ((ip) != NULL) { \ - __txn = SH_TAILQ_FIRST(&(ip)->dbth_xatxn, __db_txn); \ - if (__txn != NULL && \ - __txn->xa_thr_status == TXN_XA_THREAD_ASSOCIATED) \ - retval = EINVAL; \ - } \ -} - -/******************************************************* - * Crypto. - *******************************************************/ -#define DB_IV_BYTES 16 /* Bytes per IV */ -#define DB_MAC_KEY 20 /* Bytes per MAC checksum */ - -/******************************************************* - * Compression - *******************************************************/ -#define CMP_INT_SPARE_VAL 0xFC /* Smallest byte value that the integer - compression algorithm doesn't use */ - -#if defined(__cplusplus) -} -#endif - -/******************************************************* - * Remaining general DB includes. - *******************************************************/ - - -#include "dbinc/globals.h" -#include "dbinc/clock.h" -#include "dbinc/debug.h" -#include "dbinc/region.h" -#include "dbinc_auto/env_ext.h" -#include "dbinc/mutex.h" -#ifdef HAVE_REPLICATION_THREADS -#include "dbinc/repmgr.h" -#endif -#include "dbinc/rep.h" -#include "dbinc/os.h" -#include "dbinc_auto/clib_ext.h" -#include "dbinc_auto/common_ext.h" - -/******************************************************* - * Remaining Log. - * These need to be defined after the general includes - * because they need rep.h from above. - *******************************************************/ -/* - * Test if the environment is currently logging changes. If we're in recovery - * or we're a replication client, we don't need to log changes because they're - * already in the log, even though we have a fully functional log system. - */ -#define DBENV_LOGGING(env) \ - (LOGGING_ON(env) && !IS_REP_CLIENT(env) && (!IS_RECOVERING(env))) - -/* - * Test if we need to log a change. By default, we don't log operations without - * associated transactions, unless DIAGNOSTIC, DEBUG_ROP or DEBUG_WOP are on. - * This is because we want to get log records for read/write operations, and, if - * we are trying to debug something, more information is always better. - * - * The DBC_RECOVER flag is set when we're in abort, as well as during recovery; - * thus DBC_LOGGING may be false for a particular dbc even when DBENV_LOGGING - * is true. - * - * We explicitly use LOGGING_ON/IS_REP_CLIENT here because we don't want to pull - * in the log headers, which IS_RECOVERING (and thus DBENV_LOGGING) rely on, and - * because DBC_RECOVER should be set anytime IS_RECOVERING would be true. - * - * If we're not in recovery (master - doing an abort or a client applying - * a txn), then a client's only path through here is on an internal - * operation, and a master's only path through here is a transactional - * operation. Detect if either is not the case. - */ -#if defined(DIAGNOSTIC) || defined(DEBUG_ROP) || defined(DEBUG_WOP) -#define DBC_LOGGING(dbc) __dbc_logging(dbc) -#else -#define DBC_LOGGING(dbc) \ - ((dbc)->txn != NULL && LOGGING_ON((dbc)->env) && \ - !F_ISSET((dbc), DBC_RECOVER) && !IS_REP_CLIENT((dbc)->env)) -#endif - -#endif /* !_DB_INT_H_ */ diff --git a/build_wince/errno.h b/build_wince/errno.h deleted file mode 100644 index 24106609f..000000000 --- a/build_wince/errno.h +++ /dev/null @@ -1,186 +0,0 @@ -/*- - * Copyright (c) 1982, 1986, 1989, 1993 - * The Regents of the University of California. All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)errno.h 8.5 (Berkeley) 1/21/94 - * FreeBSD: /repoman/r/ncvs/src/sys/sys/errno.h,v 1.28 2005/04/02 12:33:28 das Exp $ - * - * $Id$ - */ - -#ifndef _SYS_ERRNO_H_ -#define _SYS_ERRNO_H_ - -#undef errno -#define errno DB_GLOBAL(db_errno) - -#define EPERM 1 /* Operation not permitted */ -#define ENOENT 2 /* No such file or directory */ -#define ESRCH 3 /* No such process */ -#define EINTR 4 /* Interrupted system call */ -#define EIO 5 /* Input/output error */ -#define ENXIO 6 /* Device not configured */ -#define E2BIG 7 /* Argument list too long */ -#define ENOEXEC 8 /* Exec format error */ -#define EBADF 9 /* Bad file descriptor */ -#define ECHILD 10 /* No child processes */ -#define EDEADLK 11 /* Resource deadlock avoided */ - /* 11 was EAGAIN */ -#define ENOMEM 12 /* Cannot allocate memory */ -#define EACCES 13 /* Permission denied */ -#define EFAULT 14 /* Bad address */ -#ifndef _POSIX_SOURCE -#define ENOTBLK 15 /* Block device required */ -#endif -#define EBUSY 16 /* Device busy */ -#define EEXIST 17 /* File exists */ -#define EXDEV 18 /* Cross-device link */ -#define ENODEV 19 /* Operation not supported by device */ -#define ENOTDIR 20 /* Not a directory */ -#define EISDIR 21 /* Is a directory */ -#define EINVAL 22 /* Invalid argument */ -#define ENFILE 23 /* Too many open files in system */ -#define EMFILE 24 /* Too many open files */ -#define ENOTTY 25 /* Inappropriate ioctl for device */ -#ifndef _POSIX_SOURCE -#define ETXTBSY 26 /* Text file busy */ -#endif -#define EFBIG 27 /* File too large */ -#define ENOSPC 28 /* No space left on device */ -#define ESPIPE 29 /* Illegal seek */ -#define EROFS 30 /* Read-only filesystem */ -#define EMLINK 31 /* Too many links */ -#define EPIPE 32 /* Broken pipe */ - -/* math software */ -#define EDOM 33 /* Numerical argument out of domain */ -#define ERANGE 34 /* Result too large */ - -/* non-blocking and interrupt i/o */ -#define EAGAIN 35 /* Resource temporarily unavailable */ -#ifndef _POSIX_SOURCE -#define EWOULDBLOCK EAGAIN /* Operation would block */ -#define EINPROGRESS 36 /* Operation now in progress */ - -#define EALREADY 37 /* Operation already in progress */ - -/* ipc/network software -- argument errors */ -#define ENOTSOCK 38 /* Socket operation on non-socket */ -#define EDESTADDRREQ 39 /* Destination address required */ -#define EMSGSIZE 40 /* Message too long */ -#define EPROTOTYPE 41 /* Protocol wrong type for socket */ -#define ENOPROTOOPT 42 /* Protocol not available */ -#define EPROTONOSUPPORT 43 /* Protocol not supported */ -#define ESOCKTNOSUPPORT 44 /* Socket type not supported */ -#define EOPNOTSUPP 45 /* Operation not supported */ -#define ENOTSUP EOPNOTSUPP /* Operation not supported */ -#define EPFNOSUPPORT 46 /* Protocol family not supported */ -#define EAFNOSUPPORT 47 /* Address family not supported by protocol family */ -#define EADDRINUSE 48 /* Address already in use */ -#define EADDRNOTAVAIL 49 /* Can't assign requested address */ - -/* ipc/network software -- operational errors */ -#define ENETDOWN 50 /* Network is down */ -#define ENETUNREACH 51 /* Network is unreachable */ -#define ENETRESET 52 /* Network dropped connection on reset */ -#define ECONNABORTED 53 /* Software caused connection abort */ -#define ECONNRESET 54 /* Connection reset by peer */ -#define ENOBUFS 55 /* No buffer space available */ -#define EISCONN 56 /* Socket is already connected */ -#define ENOTCONN 57 /* Socket is not connected */ -#define ESHUTDOWN 58 /* Can't send after socket shutdown */ -#define ETOOMANYREFS 59 /* Too many references: can't splice */ -#define ETIMEDOUT 60 /* Operation timed out */ -#define ECONNREFUSED 61 /* Connection refused */ - -#define ELOOP 62 /* Too many levels of symbolic links */ -#endif /* _POSIX_SOURCE */ -#define ENAMETOOLONG 63 /* File name too long */ - -/* should be rearranged */ -#ifndef _POSIX_SOURCE -#define EHOSTDOWN 64 /* Host is down */ -#define EHOSTUNREACH 65 /* No route to host */ -#endif /* _POSIX_SOURCE */ -#define ENOTEMPTY 66 /* Directory not empty */ - -/* quotas & mush */ -#ifndef _POSIX_SOURCE -#define EPROCLIM 67 /* Too many processes */ -#define EUSERS 68 /* Too many users */ -#define EDQUOT 69 /* Disc quota exceeded */ - -/* Network File System */ -#define ESTALE 70 /* Stale NFS file handle */ -#define EREMOTE 71 /* Too many levels of remote in path */ -#define EBADRPC 72 /* RPC struct is bad */ -#define ERPCMISMATCH 73 /* RPC version wrong */ -#define EPROGUNAVAIL 74 /* RPC prog. not avail */ -#define EPROGMISMATCH 75 /* Program version wrong */ -#define EPROCUNAVAIL 76 /* Bad procedure for program */ -#endif /* _POSIX_SOURCE */ - -#define ENOLCK 77 /* No locks available */ -#define ENOSYS 78 /* Function not implemented */ - -#ifndef _POSIX_SOURCE -#define EFTYPE 79 /* Inappropriate file type or format */ -#define EAUTH 80 /* Authentication error */ -#define ENEEDAUTH 81 /* Need authenticator */ -#define EIDRM 82 /* Identifier removed */ -#define ENOMSG 83 /* No message of desired type */ -#define EOVERFLOW 84 /* Value too large to be stored in data type */ -#define ECANCELED 85 /* Operation canceled */ -#define EILSEQ 86 /* Illegal byte sequence */ -#define ENOATTR 87 /* Attribute not found */ - -#define EDOOFUS 88 /* Programming error */ -#endif /* _POSIX_SOURCE */ - -#define EBADMSG 89 /* Bad message */ -#define EMULTIHOP 90 /* Multihop attempted */ -#define ENOLINK 91 /* Link has been severed */ -#define EPROTO 92 /* Protocol error */ - -#ifndef _POSIX_SOURCE -#define ELAST 92 /* Must be equal largest errno */ -#endif /* _POSIX_SOURCE */ - -#ifdef _KERNEL -/* pseudo-errors returned inside kernel to modify return to process */ -#define ERESTART (-1) /* restart syscall */ -#define EJUSTRETURN (-2) /* don't modify regs, just return */ -#define ENOIOCTL (-3) /* ioctl not handled by this layer */ -#define EDIRIOCTL (-4) /* do direct ioctl in GEOM */ -#endif - -#endif diff --git a/dist/adodotnet/adapt_SQLite.Interop.2008.xq.in b/dist/adodotnet/adapt_SQLite.Interop.2008.xq.in index 8079bf1f0..3d4271f42 100644 --- a/dist/adodotnet/adapt_SQLite.Interop.2008.xq.in +++ b/dist/adodotnet/adapt_SQLite.Interop.2008.xq.in @@ -4,7 +4,6 @@ :) declare variable $WINDOWS_PROJ_URL := '@BDB_PATH@/build_windows/VS8/db.vcproj'; declare variable $WINDOWS_FILES := fn:document($WINDOWS_PROJ_URL)/VisualStudioProject/Files; -declare variable $WINCE_FILES := fn:document($WINCE_PROJ_URL)/VisualStudioProject/Files; (: Copy File List and adapt it :) declare function local:getFileList($fileList) @@ -24,11 +23,10 @@ declare function local:getFileList($fileList) }; let $root := VisualStudioProject -let $isWinCE := fn:contains($root/@Keyword, 'WinCE') -let $fileList := if ($isWinCE) then ($WINCE_FILES) else ($WINDOWS_FILES) -let $cflags := if ($isWinCE) then ($WINCE_FLAGS) else ($WINDOWS_FLAGS) -let $includes := if ($isWinCE) then ($WINCE_INCLUDE) else ($WINDOWS_INCLUDE) -let $inputLib := if ($isWinCE) then ('') else ($WINDOWS_INPUT_LIB) +let $fileList := $WINDOWS_FILES +let $cflags := $WINDOWS_FLAGS +let $includes := $WINDOWS_INCLUDE +let $inputLib := $WINDOWS_INPUT_LIB return ( (: Add BDB Files :) @@ -51,10 +49,9 @@ return let $AdditionalDependencies := $VCLinkerTool/@AdditionalDependencies return ( - (: For Win32/x64/WinCE :) + (: For Win32/x64 :) if (fn:contains($config/@Name, "Win32") or - fn:contains($config/@Name, "x64") or - fn:contains($config/@Name, $WINCE_PLATFORM_NAME)) then ( + fn:contains($config/@Name, "x64")) then ( (: Update PreprocessorDefinitions :) ( @@ -64,11 +61,7 @@ return $DEBUG_ADDITIONAL_FLAGS ) else () let $combinedFlags := - if (fn:contains($config/@Name, $WINCE_PLATFORM_NAME)) then ( - fn:concat($cflags, $additionalFlags) - ) else ( - fn:concat($node/string(), $cflags, $additionalFlags) - ) + fn:concat($node/string(), $cflags, $additionalFlags) return replace value of node $node with $combinedFlags ), @@ -103,91 +96,6 @@ return for $node in $WarningLevel return replace value of node $node with '3' - ), - - (: Clean VCManifestTool for Windows CE/Mobile) :) - ( - if (fn:contains($config/@Name, $WINCE_PLATFORM_NAME)) then ( - for $node in $VCManifestTool - return replace node $node with - - ) else () - ), - - (: Set LinkTool for Windows CE/Mobile:) - ( - if (fn:contains($config/@Name, $WINCE_PLATFORM_NAME)) then ( - for $node in $VCLinkerTool - (: Update the attribute if exist. Otherwise, insert it:) - return ( - ( (: Set TargetMachine to Multi-threaded (/MT):) - let $value := $WINCE_TARGET_MACHINE - let $attr := $node/@TargetMachine - return - if (fn:exists($attr)) then ( - replace value of node $attr with $value - ) else ( - insert node attribute TargetMachine {$value} into $node - ) - ), - ( (: Change SubSystem for Windows CE/Mobile) :) - let $value := $WINCE_SUB_SYSTEM - let $attr := $node/@SubSystem - return - if (fn:exists($attr)) then ( - replace value of node $attr with $value - ) else ( - insert node attribute SubSystem {$value} into $node - ) - ) - ) - ) else () - ), - - (: Set ComplierTool for Windows CE/Mobile:) - ( - if (fn:contains($config/@Name, $WINCE_PLATFORM_NAME)) then ( - for $node in $VCCLCompilerTool - (: Update the attribute if exist. Otherwise, insert it:) - return ( - ( (: Set RuntimeLibrary to Multi-threaded (/MT):) - let $value := "0" - let $attr := $node/@RuntimeLibrary - return - if (fn:exists($attr)) then ( - replace value of node $attr with $value - ) else ( - insert node attribute RuntimeLibrary {$value} into $node - ) - ), - ( (: Set WholeProgramOptimization to false :) - let $value := "false" - let $attr := $node/@WholeProgramOptimization - return - if (fn:exists($attr)) then ( - replace value of node $attr with $value - ) else ( - insert node attribute WholeProgramOptimization {$value} into $node - ) - ), - ( (: Set default Optimization from 3 to 2 :) - let $value := "2" - for $attr in $node/@Optimization[string() = "3"] - return - replace value of node $attr with $value - ), - ( (: Favor Small Code (/Os) for Windows CE/Mobile :) - let $value := "2" - let $attr := $node/@FavorSizeOrSpeed - return - if (fn:exists($attr)) then ( - replace value of node $attr with $value - ) else ( - insert node attribute FavorSizeOrSpeed {$value} into $node - ) - ) - ) - ) else () ) ) else () diff --git a/dist/adodotnet/adapt_common.xq.in b/dist/adodotnet/adapt_common.xq.in index 475b23790..7e35bdc2f 100644 --- a/dist/adodotnet/adapt_common.xq.in +++ b/dist/adodotnet/adapt_common.xq.in @@ -3,10 +3,6 @@ :) declare boundary-space preserve; -declare variable $WINCE_PLATFORM_NAME := '@WINCE_PLATFORM_NAME@'; -declare variable $WINCE_TARGET_MACHINE := '3'; (: const value in Visual Studio :) -declare variable $WINCE_SUB_SYSTEM := '8'; (: const value in Visual Studio :) - declare variable $COMMON_FLAGS := fn:concat( '_WINDOWS;', '_LIB;', @@ -24,42 +20,13 @@ declare variable $WINDOWS_FLAGS := fn:concat(';', '_CRT_NONSTDC_NO_DEPRECATE;', 'DB_CREATE_DLL;'); -declare variable $WINCE_FLAGS := fn:concat( - $COMMON_FLAGS, - '_WIN32_WCE=$(CEVER);', - 'UNDER_CE=$(CEVER);', - 'WINCE;', - '$(CePlatform);', - '$(PLATFORMDEFINES);', - '$(ARCHFAM);', - '$(_ARCHFAM_);', - 'DB_WIN32;', - 'DB_WINCE;', - 'ARM;', - '_ARM_;', - 'ARMV4;', - 'HAVE_LOCALTIME;', - '__NO_SYSTEM_INCLUDES;', - 'SQLITE_THREADSAFE=1;', - 'BDBSQL_SINGLE_PROCESS;', - 'CPPSMART_EXPORTS;', - 'SQLITE_ENABLE_COLUMN_METADATA;', - 'SQLITE_ENABLE_FTS3;', - 'SQLITE_ENABLE_RTREE;', - 'SQLITE_ENABLE_LOAD_EXTENSION;', - 'SQLITE_SOUNDEX;', - 'SQLITE_OMIT_WAL;', - 'INVALID_FILE_ATTRIBUTES=((DWORD)-1);'); - declare variable $DEBUG_ADDITIONAL_FLAGS := fn:concat( 'DIAGNOSTIC;', '_DEBUG;', 'CONFIG_TEST'); (: Win32/x64 variables :) -declare variable $WINCE_PROJ_URL := '@BDB_PATH@/build_wince/VS8/db.vcproj'; declare variable $WINDOWS_INCLUDE := '..\@BDB_NAME@\build_windows,..\@BDB_NAME@\src'; -declare variable $WINCE_INCLUDE := '..\@BDB_NAME@\build_wince,..\@BDB_NAME@\src'; declare variable $WIN_SRC := '..\\@BDB_NAME@\\src'; declare variable $WINDOWS_INPUT_LIB := 'ws2_32.lib'; diff --git a/dist/adodotnet/gen_wince_project.xq.in b/dist/adodotnet/gen_wince_project.xq.in deleted file mode 100644 index 0830bd8eb..000000000 --- a/dist/adodotnet/gen_wince_project.xq.in +++ /dev/null @@ -1,86 +0,0 @@ -(: -* This script will copy a WinCE configuration from default Win32 -* configuration for SQLite.Interop.2008.vcproj -:) -declare variable $PLATFORM_NAME := '@PLATFORM_NAME@'; -declare variable $PROJECT_GUID := '@PROJECT_GUID@'; -declare variable $PROJECT_FILE := '@PROJECT_FILE@'; - -(: Copy WinCE Configurations from exisitng Win32 project :) -declare function local:renameConfig($config) -{ - copy $newConfig := $config - modify ( - (: Change Win32 to PLATFORM_NAME :) - replace value of node $newConfig/@Name with - fn:replace($config/@Name/string(), 'Win32', $PLATFORM_NAME) - ) - return $newConfig -}; - -let $root := VisualStudioProject -return -( - (: Change VisualStudioProject attributes :) - ( - (replace value of node $root/@ProjectGUID with '@PROJECT_GUID@'), - (replace value of node $root/@Keyword with 'WinCE_Proj'), - (replace value of node $root/@Name with '@PROJECT_FILE@') - ), - - (: Add WinCE Platform and remove others:) - ( - ( - for $platforms in $root/Platforms/* return delete node $platforms - ), - ( - for $platforms in $root/Platforms - return insert node as last into $platforms - ) - ), - - (: Copy WinCE Project from exisitng Win32 project :) - ( - for $config in $root/Configurations/Configuration - return - ( - ( - if (fn:contains($config/@Name, "Win32")) then ( - let $newConfig := local:renameConfig($config) - return replace node $config with $newConfig - ) else () - ), - - (: Remove Win32/x64 platform :) - ( - if (fn:contains($config/@Name, "Win32") or - fn:contains($config/@Name, "x64")) then ( - delete node $config - ) else () - ) - ) - ), - - (: Copy FileConfiguration for WinCE from exisitng Win32 FileConfiguration :) - ( - for $fconfig in $root/Files/Filter/File/FileConfiguration - return - ( - ( - if (fn:contains($fconfig/@Name, "Win32")) then ( - let $newConfig := local:renameConfig($fconfig) - return replace node $fconfig with $newConfig - ) else () - ), - - (: Remove Win32/x64 platform :) - ( - if (fn:contains($fconfig/@Name, "Win32") or - fn:contains($fconfig/@Name, "x64")) then ( - delete node $fconfig - ) else () - ) - ) - ) -) - diff --git a/dist/adodotnet/testce.2008.csproj b/dist/adodotnet/testce.2008.csproj deleted file mode 100644 index 141fe0c4a..000000000 --- a/dist/adodotnet/testce.2008.csproj +++ /dev/null @@ -1,132 +0,0 @@ - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {B86CE504-C4E4-496F-A0F0-E613BCFD3DF7} - WinExe - Properties - test - testce.2008 - {4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - WindowsCE - E2BECB1F-8C8C-41ba-B736-9BE7D946A398 - 5.00 - testce - v2.0 - - - - - %25CSIDL_PROGRAM_FILES%25 - - - 2.0 - - Windows CE - - - - - true - full - false - ..\bin\CompactFramework\ - - TRACE;DEBUG;PocketPC;PLATFORM_COMPACTFRAMEWORK - true - true - prompt - 512 - 4 - off - true - - - none - true - ..\bin\CompactFramework\ - - PocketPC;PLATFORM_COMPACTFRAMEWORK - true - true - prompt - 512 - 4 - off - - - - {E2BECB1F-8C8C-41ba-B736-9BE7D946A398} - System.Data.SQLite.Compact.2008 - False - - - - - - False - - - False - - - - False - - - False - - - False - - - - - - Form - - - Form1.cs - - - - - - - - Form1.cs - Designer - - - - - - - - - - - - - - - - diff --git a/dist/clib_port.in b/dist/clib_port.in index b29978d4c..247ce8bf0 100644 --- a/dist/clib_port.in +++ b/dist/clib_port.in @@ -89,10 +89,10 @@ * File modes. */ #ifdef DB_WIN32 -#ifndef S_IREAD /* WinCE doesn't have S_IREAD. */ +#ifndef S_IREAD #define S_IREAD 0 #endif -#ifndef S_IWRITE /* WinCE doesn't have S_IWRITE. */ +#ifndef S_IWRITE #define S_IWRITE 0 #endif #ifndef S_IRUSR diff --git a/dist/errno.h b/dist/errno.h deleted file mode 100644 index 24106609f..000000000 --- a/dist/errno.h +++ /dev/null @@ -1,186 +0,0 @@ -/*- - * Copyright (c) 1982, 1986, 1989, 1993 - * The Regents of the University of California. All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)errno.h 8.5 (Berkeley) 1/21/94 - * FreeBSD: /repoman/r/ncvs/src/sys/sys/errno.h,v 1.28 2005/04/02 12:33:28 das Exp $ - * - * $Id$ - */ - -#ifndef _SYS_ERRNO_H_ -#define _SYS_ERRNO_H_ - -#undef errno -#define errno DB_GLOBAL(db_errno) - -#define EPERM 1 /* Operation not permitted */ -#define ENOENT 2 /* No such file or directory */ -#define ESRCH 3 /* No such process */ -#define EINTR 4 /* Interrupted system call */ -#define EIO 5 /* Input/output error */ -#define ENXIO 6 /* Device not configured */ -#define E2BIG 7 /* Argument list too long */ -#define ENOEXEC 8 /* Exec format error */ -#define EBADF 9 /* Bad file descriptor */ -#define ECHILD 10 /* No child processes */ -#define EDEADLK 11 /* Resource deadlock avoided */ - /* 11 was EAGAIN */ -#define ENOMEM 12 /* Cannot allocate memory */ -#define EACCES 13 /* Permission denied */ -#define EFAULT 14 /* Bad address */ -#ifndef _POSIX_SOURCE -#define ENOTBLK 15 /* Block device required */ -#endif -#define EBUSY 16 /* Device busy */ -#define EEXIST 17 /* File exists */ -#define EXDEV 18 /* Cross-device link */ -#define ENODEV 19 /* Operation not supported by device */ -#define ENOTDIR 20 /* Not a directory */ -#define EISDIR 21 /* Is a directory */ -#define EINVAL 22 /* Invalid argument */ -#define ENFILE 23 /* Too many open files in system */ -#define EMFILE 24 /* Too many open files */ -#define ENOTTY 25 /* Inappropriate ioctl for device */ -#ifndef _POSIX_SOURCE -#define ETXTBSY 26 /* Text file busy */ -#endif -#define EFBIG 27 /* File too large */ -#define ENOSPC 28 /* No space left on device */ -#define ESPIPE 29 /* Illegal seek */ -#define EROFS 30 /* Read-only filesystem */ -#define EMLINK 31 /* Too many links */ -#define EPIPE 32 /* Broken pipe */ - -/* math software */ -#define EDOM 33 /* Numerical argument out of domain */ -#define ERANGE 34 /* Result too large */ - -/* non-blocking and interrupt i/o */ -#define EAGAIN 35 /* Resource temporarily unavailable */ -#ifndef _POSIX_SOURCE -#define EWOULDBLOCK EAGAIN /* Operation would block */ -#define EINPROGRESS 36 /* Operation now in progress */ - -#define EALREADY 37 /* Operation already in progress */ - -/* ipc/network software -- argument errors */ -#define ENOTSOCK 38 /* Socket operation on non-socket */ -#define EDESTADDRREQ 39 /* Destination address required */ -#define EMSGSIZE 40 /* Message too long */ -#define EPROTOTYPE 41 /* Protocol wrong type for socket */ -#define ENOPROTOOPT 42 /* Protocol not available */ -#define EPROTONOSUPPORT 43 /* Protocol not supported */ -#define ESOCKTNOSUPPORT 44 /* Socket type not supported */ -#define EOPNOTSUPP 45 /* Operation not supported */ -#define ENOTSUP EOPNOTSUPP /* Operation not supported */ -#define EPFNOSUPPORT 46 /* Protocol family not supported */ -#define EAFNOSUPPORT 47 /* Address family not supported by protocol family */ -#define EADDRINUSE 48 /* Address already in use */ -#define EADDRNOTAVAIL 49 /* Can't assign requested address */ - -/* ipc/network software -- operational errors */ -#define ENETDOWN 50 /* Network is down */ -#define ENETUNREACH 51 /* Network is unreachable */ -#define ENETRESET 52 /* Network dropped connection on reset */ -#define ECONNABORTED 53 /* Software caused connection abort */ -#define ECONNRESET 54 /* Connection reset by peer */ -#define ENOBUFS 55 /* No buffer space available */ -#define EISCONN 56 /* Socket is already connected */ -#define ENOTCONN 57 /* Socket is not connected */ -#define ESHUTDOWN 58 /* Can't send after socket shutdown */ -#define ETOOMANYREFS 59 /* Too many references: can't splice */ -#define ETIMEDOUT 60 /* Operation timed out */ -#define ECONNREFUSED 61 /* Connection refused */ - -#define ELOOP 62 /* Too many levels of symbolic links */ -#endif /* _POSIX_SOURCE */ -#define ENAMETOOLONG 63 /* File name too long */ - -/* should be rearranged */ -#ifndef _POSIX_SOURCE -#define EHOSTDOWN 64 /* Host is down */ -#define EHOSTUNREACH 65 /* No route to host */ -#endif /* _POSIX_SOURCE */ -#define ENOTEMPTY 66 /* Directory not empty */ - -/* quotas & mush */ -#ifndef _POSIX_SOURCE -#define EPROCLIM 67 /* Too many processes */ -#define EUSERS 68 /* Too many users */ -#define EDQUOT 69 /* Disc quota exceeded */ - -/* Network File System */ -#define ESTALE 70 /* Stale NFS file handle */ -#define EREMOTE 71 /* Too many levels of remote in path */ -#define EBADRPC 72 /* RPC struct is bad */ -#define ERPCMISMATCH 73 /* RPC version wrong */ -#define EPROGUNAVAIL 74 /* RPC prog. not avail */ -#define EPROGMISMATCH 75 /* Program version wrong */ -#define EPROCUNAVAIL 76 /* Bad procedure for program */ -#endif /* _POSIX_SOURCE */ - -#define ENOLCK 77 /* No locks available */ -#define ENOSYS 78 /* Function not implemented */ - -#ifndef _POSIX_SOURCE -#define EFTYPE 79 /* Inappropriate file type or format */ -#define EAUTH 80 /* Authentication error */ -#define ENEEDAUTH 81 /* Need authenticator */ -#define EIDRM 82 /* Identifier removed */ -#define ENOMSG 83 /* No message of desired type */ -#define EOVERFLOW 84 /* Value too large to be stored in data type */ -#define ECANCELED 85 /* Operation canceled */ -#define EILSEQ 86 /* Illegal byte sequence */ -#define ENOATTR 87 /* Attribute not found */ - -#define EDOOFUS 88 /* Programming error */ -#endif /* _POSIX_SOURCE */ - -#define EBADMSG 89 /* Bad message */ -#define EMULTIHOP 90 /* Multihop attempted */ -#define ENOLINK 91 /* Link has been severed */ -#define EPROTO 92 /* Protocol error */ - -#ifndef _POSIX_SOURCE -#define ELAST 92 /* Must be equal largest errno */ -#endif /* _POSIX_SOURCE */ - -#ifdef _KERNEL -/* pseudo-errors returned inside kernel to modify return to process */ -#define ERESTART (-1) /* restart syscall */ -#define EJUSTRETURN (-2) /* don't modify regs, just return */ -#define ENOIOCTL (-3) /* ioctl not handled by this layer */ -#define EDIRIOCTL (-4) /* do direct ioctl in GEOM */ -#endif - -#endif diff --git a/dist/s_sql_drivers b/dist/s_sql_drivers index c5f7a9606..d85678070 100755 --- a/dist/s_sql_drivers +++ b/dist/s_sql_drivers @@ -258,8 +258,6 @@ do rm -f ${sln}.tmp done -# Copy wince files -cp -r $START_DIR/../build_wince $BDB_ROOT # Move docs if [ -e "$START_DIR/../docs/bdb-sql-ado" ]; then mv "$START_DIR/../docs/bdb-sql-ado" Doc/ @@ -282,7 +280,6 @@ done # Replace SQLite source code with DBSQL source code cp -f $START_DIR/../lang/sql/generated/* SQLite.Interop/src/core/ -cp -f $START_DIR/adodotnet/testce.2008.csproj testce/ # Apply patches PATCH='adodotnet/adodotnet.patch' @@ -291,39 +288,10 @@ if [ $? -ne 0 ]; then die "Can not apply patch $PATCH" fi -# -# Generate WinCE projects -# WINDOWS_VCPROJ="SQLite.Interop/SQLite.Interop.2008.vcproj" WINDOWS_2010_VCPROJ="SQLite.Interop/SQLite.Interop.2010.vcxproj" -WINCE_VCPROJ_NAME="SQLite.Interop.2008.WinCE" -WINCE_VCPROJ="SQLite.Interop/${WINCE_VCPROJ_NAME}.vcproj" XQ_COMMON="$START_DIR/adodotnet/adapt_common.xq.in" -# Define WINCE_PLATFORM_NAME -# Use the most common project name for WinCE project file. -WINCE_PLATFORM_NAME='Pocket PC 2003 (ARMV4)' -WINCE_PROJECT_GUID='A7895F70-6FD5-11E0-A1F0-0800200C9A66' -XQ='gen_wince_project.xq' -XQ_IN="${XQ}.in" -XQ_IN_SRC="$START_DIR/adodotnet/${XQ_IN}" -# Generate XQuery script -cp $XQ_COMMON $XQ_IN -cat $XQ_IN_SRC >> $XQ_IN -sed -e "s/@DB_VERSION_MAJOR@/$DB_VERSION_MAJOR/g" \ - -e "s/@DB_VERSION_MINOR@/$DB_VERSION_MINOR/g" \ - -e "s/@PROJECT_GUID@/$WINCE_PROJECT_GUID/g" \ - -e "s/@PLATFORM_NAME@/$WINCE_PLATFORM_NAME/g" \ - -e "s/@PROJECT_FILE@/$WINCE_VCPROJ_NAME/g" \ - -e "s/@BDB_PATH@/$BDB_PATH4SED/g" \ - -e "s/@BDB_NAME@/$BDB_ROOT/g" \ - < $XQ_IN >> $XQ - -cp $WINDOWS_VCPROJ $WINCE_VCPROJ -xqilla -u -i $WINCE_VCPROJ $XQ -rm -f $XQ -rm -f $XQ_IN - # # Change SQLite.Interop/SQLite.Interop.2010.vcproj for Win32/x64 # @@ -338,7 +306,6 @@ cat $XQ_COMMON >> $XQ_IN cat $XQ_IN_SRC >> $XQ_IN sed -e "s/@DB_VERSION_MAJOR@/$DB_VERSION_MAJOR/g" \ -e "s/@DB_VERSION_MINOR@/$DB_VERSION_MINOR/g" \ - -e "s/@WINCE_PLATFORM_NAME@/$WINCE_PLATFORM_NAME/g" \ -e "s/@BDB_PATH@/$BDB_PATH4SED/g" \ -e "s/@BDB_NAME@/$BDB_ROOT/g" \ < $XQ_IN >> $XQ @@ -359,14 +326,12 @@ cp $XQ_COMMON $XQ_IN cat $XQ_IN_SRC >> $XQ_IN sed -e "s/@DB_VERSION_MAJOR@/$DB_VERSION_MAJOR/g" \ -e "s/@DB_VERSION_MINOR@/$DB_VERSION_MINOR/g" \ - -e "s/@WINCE_PLATFORM_NAME@/$WINCE_PLATFORM_NAME/g" \ -e "s/@BDB_PATH@/$BDB_PATH4SED/g" \ -e "s/@BDB_NAME@/$BDB_ROOT/g" \ < $XQ_IN >> $XQ # Change File list for vcproject file xqilla -u -i $WINDOWS_VCPROJ $XQ -xqilla -u -i $WINCE_VCPROJ $XQ rm -f $XQ rm -f $XQ_IN @@ -375,7 +340,7 @@ rm -f $XQ_IN # 1. Change xml version to 1.0, otherwise Visual Studio can not open it # 2. Remove unnecessary xmlns in VS2010 project file # -for f in $WINDOWS_VCPROJ $WINCE_VCPROJ $WINDOWS_2010_VCPROJ +for f in $WINDOWS_VCPROJ $WINDOWS_2010_VCPROJ do forward="cat" which tidy > /dev/null 2>&1 @@ -423,52 +388,6 @@ do rm ${sln}.tmp done -# -# Generate WinCE edition for Solution files -# -# Skip *.MSBuild.sln and *.2010.sln since they don't include CompactFramework -# components -# -for sln in SQLite.NET.2008.sln -do - dst=`echo $sln | sed -e 's/2008/2008.WinCE/g'` - - # Dos to unix - sed 's/$\r//' $sln > ${sln}.tmp - rm -f $TMP_FILE - - # Change Win32 projects to WinCE projects - sed -e "s/|Win32/|$WINCE_PLATFORM_NAME/g" ${sln}.tmp > $TMP_FILE - sed -e "s/SQLite.Interop.2008/SQLite.Interop.2008.WinCE/g" $TMP_FILE > ${sln}.tmp - # Remove x64 platform -- WinCE projects doesn't require it - sed -e "/|x64/d" ${sln}.tmp > $TMP_FILE - - # Remove SQLite.Designer, since it's not for Windows mobile/CE - guid=`grep 'SQLite.Designer' $TMP_FILE | head -n 1 | awk -F '[{}]' '{print $4}'` - if [ "$guid" != "" ]; then - sed -e '/SQLite.Designer/,/EndProject/d' \ - -e "/$guid/d" $TMP_FILE > ${sln}.tmp - else - cp $TMP_FILE ${sln}.tmp - fi - - # Change test.2008 to testce.2008 for WinCE testing - testceProj="$START_DIR/adodotnet/testce.2008.csproj" - test_GUID=`cat ${sln}.tmp | grep test\.2008 | awk -F "[{}]" '{print $4}'` - testce_GUID=`cat $testceProj | grep ProjectGuid | awk -F "[{}]" '{print $2}'` - - # Change test project name and UID - sed -e "s/test\\\/testce\\\/g" \ - -e "s/$test_GUID/$testce_GUID/g" \ - -e "s/test\.2008/testce\.2008/g" \ - ${sln}.tmp > $TMP_FILE - - # Change to dos format -- VisualStudio solution files must be dos format - sed -e 's/ //g' -e 's/$/ /' $TMP_FILE > $dst - - rm -f ${sln}.tmp -done - # # SQLITE_MEMDEBUG only suit (Tcl) testfixture. Disable it. # diff --git a/dist/s_windows b/dist/s_windows index 5e4d38eff..4f6b7a504 100755 --- a/dist/s_windows +++ b/dist/s_windows @@ -127,10 +127,6 @@ s/@DB_CONST@// s/@DB_PROTO1@/#undef __P/ s/@DB_PROTO2@/#define __P(protos) protos/ ENDOFSEDTEXT -# The db.h, db_int.h files are identical between Windows and WinCE. -# This may change in the future, for now have the script copy -# the headers into the build_wince directory. -# WinCE does not support the C++ API, so don't need to copy db_cxx.h (echo "$msgc" && sed -f $s ../src/dbinc/db.in && @@ -142,9 +138,6 @@ test `egrep '@.*@' $t` && { exit 1 } f=../build_windows/db.h -cmp $t $f > /dev/null 2>&1 || - (echo "Building $f" && rm -f $f && cp $t $f) -f=../build_wince/db.h cmp $t $f > /dev/null 2>&1 || (echo "Building $f" && rm -f $f && cp $t $f) @@ -175,13 +168,10 @@ test `egrep '@.*@' $t` && { exit 1 } f=../build_windows/db_int.h -cmp $t $f > /dev/null 2>&1 || - (echo "Building $f" && rm -f $f && cp $t $f) -f=../build_wince/db_int.h cmp $t $f > /dev/null 2>&1 || (echo "Building $f" && rm -f $f && cp $t $f) -# Build the Windows and WinCE db_config.h. +# Build the Windows db_config.h. # We don't fail, but we complain if the win_config.in file isn't up-to-date. check_config() { @@ -197,11 +187,6 @@ check_config() check_config win_config.in f=../build_windows/db_config.h (echo "$msgc" && sed "s/__EDIT_DB_VERSION__/$DB_VERSION/" win_config.in) > $t -cmp $t $f > /dev/null 2>&1 || - (echo "Building $f" && rm -f $f && cp $t $f) -check_config wince_config.in -f=../build_wince/db_config.h -(echo "$msgc" && sed "s/__EDIT_DB_VERSION__/$DB_VERSION/" wince_config.in) > $t cmp $t $f > /dev/null 2>&1 || (echo "Building $f" && rm -f $f && cp $t $f) @@ -252,9 +237,6 @@ test `egrep '@.*@' $t` && { exit 1 } f=../build_windows/clib_port.h -cmp $t $f > /dev/null 2>&1 || - (echo "Building $f" && rm -f $f && cp $t $f) -f=../build_wince/clib_port.h cmp $t $f > /dev/null 2>&1 || (echo "Building $f" && rm -f $f && cp $t $f) @@ -269,9 +251,4 @@ f=../build_windows/dbstl_common.h cmp $t $f > /dev/null 2>&1 || (echo "Building $f" && rm -f $f && cp $t $f) -# Copy in errno.h. -f=../build_wince/errno.h -cmp errno.h $f > /dev/null 2>&1 || - (echo "Building $f" && rm -f $f && cp errno.h $f) - rm -f $s $t diff --git a/dist/s_windows_dsp b/dist/s_windows_dsp index 35fd402fa..0cf92dcd7 100755 --- a/dist/s_windows_dsp +++ b/dist/s_windows_dsp @@ -35,14 +35,7 @@ create_projects() # location for output project files PROJECT_OUTPUT_PARENT_DIR=$3 - # judge Windows or Win CE for vs2010 - WinVersion=$4 - - if [ $WinVersion = "WinCE" ]; then - VLoop=VS8 - else - VLoop="VS8 VS10" - fi + VLoop="VS8 VS10" # for each project, substitute 2 variables in the XQuery script, then run it # temporarily use only VS10 here to omit the generation of VS8 @@ -172,11 +165,6 @@ echo "Building Visual Studio project files for Windows -- " echo " output only for modified projects (this can take a while)" create_projects db.projects projects.template.xml ../../build_windows Win -# Create/Update Windows CE project files -echo "Building Visual Studio project files for Windows CE -- " -echo " output only for modified projects (this can take a while)" -create_projects db_wince.projects projects_wince.template.xml ../../build_wince WinCE - # Create/Update C Sharp project files echo "Building C Sharp project files -- " echo " output only for modified projects (this can take a while)" diff --git a/dist/srcfiles.in b/dist/srcfiles.in index 48dbe770a..ec37a4d73 100644 --- a/dist/srcfiles.in +++ b/dist/srcfiles.in @@ -6,8 +6,7 @@ # # If you are adding a new file, putting the filename here in srcfiles.in and # indicate which modules require the file. Also make sure to add the file to -# dist/win_projects/projects.template.xml for Windows, and -# dist/win_projects/projects_wince.template.xml for Windows CE. +# dist/win_projects/projects.template.xml for Windows. # # Please keep this list sorted alphabetically! # diff --git a/dist/validate/s_chk_offt b/dist/validate/s_chk_offt index 81610b9b3..490f89807 100644 --- a/dist/validate/s_chk_offt +++ b/dist/validate/s_chk_offt @@ -20,7 +20,6 @@ t=__1 egrep -w off_t $d/src/*/*.[ch] $d/util/*.[ch] $d/src/*/*.in | sed -e "/#undef off_t/d" \ - -e "/build_wince\//d" \ -e "/build_windows\//d" \ -e "/db_env_set_func_ftruncate/d" \ -e "/db_env_set_func_pread/d" \ diff --git a/dist/validate/s_chk_tags b/dist/validate/s_chk_tags index 98f0e2ec3..0c100cbc6 100644 --- a/dist/validate/s_chk_tags +++ b/dist/validate/s_chk_tags @@ -23,7 +23,6 @@ t2=__2 sed -e 's/\///' \ -e '/^CVS$/d' \ -e '/^build_vxworks$/d' \ - -e '/^build_wince$/d' \ -e '/^build_windows$/d' \ -e '/^docs$/d' \ -e '/^docs_book$/d' \ diff --git a/dist/win_projects/db_wince.projects b/dist/win_projects/db_wince.projects deleted file mode 100644 index 69ffc6500..000000000 --- a/dist/win_projects/db_wince.projects +++ /dev/null @@ -1,5 +0,0 @@ -db_small -db -db_sql -wce_sql -wce_tpcb diff --git a/dist/win_projects/projects_wince.template.xml b/dist/win_projects/projects_wince.template.xml deleted file mode 100644 index 7a9cc3373..000000000 --- a/dist/win_projects/projects_wince.template.xml +++ /dev/null @@ -1,603 +0,0 @@ - - - ../../ - ../../build_wince/ - ../../build_wince/ - true - - DB_WIN32;DB_WINCE;_WIN32_WCE=$(CEVER);$(CePlatform);ARM;_ARM_;ARMV4;UNDER_CE=$(CEVER);UNICODE;_UNICODE;__NO_SYSTEM_INCLUDES - _WIN32_WCE=$(CEVER);$(CePlatform);ARM,_ARM_,ARMV4;UNDER_CE=$(CEVER);UNICODE;_UNICODE; - DEBUG - NDEBUG - _USRDLL - POCKETPC2003_UI_MODEL - _LIB; - - - - - libdb_small@DB_VERSION_MAJOR@@DB_VERSION_MINOR@d - libdb_small@DB_VERSION_MAJOR@@DB_VERSION_MINOR@ - libdb_small@DB_VERSION_MAJOR@@DB_VERSION_MINOR@sd - libdb_small@DB_VERSION_MAJOR@@DB_VERSION_MINOR@s - - - - libdb@DB_VERSION_MAJOR@@DB_VERSION_MINOR@d - libdb@DB_VERSION_MAJOR@@DB_VERSION_MINOR@ - libdb@DB_VERSION_MAJOR@@DB_VERSION_MINOR@sd - libdb@DB_VERSION_MAJOR@@DB_VERSION_MINOR@s - - - - libdb_sql@DB_VERSION_MAJOR@@DB_VERSION_MINOR@d - libdb_sql@DB_VERSION_MAJOR@@DB_VERSION_MINOR@ - libdb_sql@DB_VERSION_MAJOR@@DB_VERSION_MINOR@sd - libdb_sql@DB_VERSION_MAJOR@@DB_VERSION_MINOR@s - - - - ../../build_wince,../../src - ../../lang/sql/generated,../../lang/sql/adapter,../../lang/sql/sqlite/src - ../../lang/sql/generated - - - - - library - Static - all - - DB_CREATE_DLL - DIAGNOSTIC;CONFIG_TEST - DIAGNOSTIC; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - library - Static - all - HAVE_SMALLBUILD - DB_CREATE_DLL - DIAGNOSTIC - DIAGNOSTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - library - - Static - all - db_sql_src - SQLITE_EXPORTS;SQLITE_CORE;SQLITE_THREADSAFE=1;BDBSQL_SINGLE_PROCESS;SQLITE_OMIT_WAL - SQLITE_API=__declspec(dllexport) - SQLITE_TEST;SQLITE_DEBUG;SQLITE_MEMDEBUG - SQLITE_TEST;SQLITE_DEBUG;SQLITE_MEMDEBUG - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - app - - all - sql_app - - - - - - - - - - - - - - - app - - all - - - - - - - - diff --git a/dist/wince_config.in b/dist/wince_config.in deleted file mode 100644 index d20576fe2..000000000 --- a/dist/wince_config.in +++ /dev/null @@ -1,656 +0,0 @@ -/* Define to 1 if you want to build a version for running the test suite. */ -/* #undef CONFIG_TEST */ - -/* Defined to a size to limit the stack size of Berkeley DB threads. */ -/* #undef DB_STACKSIZE */ - -/* We use DB_WIN32 much as one would use _WIN32 -- to specify that we're using - an operating system environment that supports Win32 calls and semantics. We - don't use _WIN32 because Cygwin/GCC also defines _WIN32, even though - Cygwin/GCC closely emulates the Unix environment. */ -#define DB_WIN32 1 - -/* Define to 1 if you want a debugging version. */ -#if defined(_DEBUG) -#if !defined(DEBUG) -#define DEBUG 1 -#endif -#endif - -/* Define to 1 if you want a version that logs read operations. */ -/* #undef DEBUG_ROP */ - -/* Define to 1 if you want a version that logs write operations. */ -/* #undef DEBUG_WOP */ - -/* Define to 1 if you want a version with run-time diagnostic checking. */ -/* #undef DIAGNOSTIC */ - -/* Define to 1 if 64-bit types are available. */ -#define HAVE_64BIT_TYPES 1 - -/* Define to 1 if you have the `abort' function. */ -/* #undef HAVE_ABORT */ - -/* Define to 1 if you have the `atoi' function. */ -#define HAVE_ATOI 1 - -/* Define to 1 if you have the `atol' function. */ -#define HAVE_ATOL 1 - -/* Define to 1 if platform reads and writes files atomically. */ -/* #undef HAVE_ATOMICFILEREAD */ - -/* Define to 1 to use Solaris library routes for atomic operations. */ -/* #undef HAVE_ATOMIC_SOLARIS */ - -/* Define to 1 to use native atomic operations. */ -#define HAVE_ATOMIC_SUPPORT 1 - -/* Define to 1 to use GCC and x86 or x86_64 assemlby language atomic - operations. */ -/* #undef HAVE_ATOMIC_X86_GCC_ASSEMBLY */ - -/* Define to 1 if you have the `backtrace' function. */ -/* #undef HAVE_BACKTRACE */ - -/* Define to 1 if you have the `backtrace_symbols' function. */ -/* #undef HAVE_BACKTRACE_SYMBOLS */ - -/* Define to 1 if you have the `bsearch' function. */ -/* #undef HAVE_BSEARCH */ - -/* Define to 1 if you have the `clock_gettime' function. */ -/* #undef HAVE_CLOCK_GETTIME */ - -/* Define to 1 if clock_gettime supports CLOCK_MONOTONIC. */ -/* #undef HAVE_CLOCK_MONOTONIC */ - -/* Define to 1 if building compression support. */ -/* #undef HAVE_COMPRESSION */ - -/* Define to 1 if Berkeley DB release includes strong cryptography. */ -#ifndef HAVE_SMALLBUILD -#define HAVE_CRYPTO 1 -#endif - -/* Define to 1 if using Intel IPP for cryptography. */ -/* #undef HAVE_CRYPTO_IPP */ - -/* Define to 1 if you have the `ctime_r' function. */ -/* #undef HAVE_CTIME_R */ - -/* Define to 1 if ctime_r takes a buffer length as a third argument. */ -/* #undef HAVE_CTIME_R_3ARG */ - -/* Define to 1 if building the DBM API. */ -/* #undef HAVE_DBM */ - -/* Define to 1 if you have the `directio' function. */ -/* #undef HAVE_DIRECTIO */ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_DIRENT_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 to use dtrace for performance event tracing. */ -/* #undef HAVE_DTRACE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_EXECINFO_H */ - -/* Define to 1 if you have EXIT_SUCCESS/EXIT_FAILURE #defines. */ -#define HAVE_EXIT_SUCCESS 1 - -/* Define to 1 if you have the `fchmod' function. */ -/* #undef HAVE_FCHMOD */ - -/* Define to 1 if you have the `fclose' function. */ -#define HAVE_FCLOSE 1 - -/* Define to 1 if you have the `fcntl' function. */ -/* #undef HAVE_FCNTL */ - -/* Define to 1 if fcntl/F_SETFD denies child access to file descriptors. */ -/* #undef HAVE_FCNTL_F_SETFD */ - -/* Define to 1 if you have the `fdatasync' function. */ -/* #undef HAVE_FDATASYNC */ - -/* Define to 1 if you have the `fgetc' function. */ -#define HAVE_FGETC 1 - -/* Define to 1 if you have the `fgets' function. */ -#define HAVE_FGETS 1 - -/* Define to 1 if allocated filesystem blocks are not zeroed. */ -#define HAVE_FILESYSTEM_NOTZERO 1 - -/* Define to 1 if you have the `fopen' function. */ -#define HAVE_FOPEN 1 - -/* Define to 1 if you have the `ftruncate' function. */ -#define HAVE_FTRUNCATE 1 - -/* Define to 1 if you have the `fwrite' function. */ -#define HAVE_FWRITE 1 - -/* Define to 1 if you have the `getaddrinfo' function. */ -/* #undef HAVE_GETADDRINFO */ - -/* Define to 1 if you have the `getcwd' function. */ -/* #undef HAVE_GETCWD */ - -/* Define to 1 if you have the `getenv' function. */ -/* #undef HAVE_GETENV */ - -/* Define to 1 if you have the `getgid' function. */ -/* #undef HAVE_GETGID */ - -/* Define to 1 if you have the `getopt' function. */ -/* - * Windows does not have the getopt function, but as Berkeley DB example - * programs require getopt, we handle it outside of this configuration. - */ -#define HAVE_GETOPT 1 - -/* Define to 1 if getopt supports the optreset variable. */ -#define HAVE_GETOPT_OPTRESET 1 - -/* Define to 1 if you have the `getrusage' function. */ -/* #undef HAVE_GETRUSAGE */ - -/* Define to 1 if you have the `gettimeofday' function. */ -/* #undef HAVE_GETTIMEOFDAY */ - -/* Define to 1 if you have the `getuid' function. */ -/* #undef HAVE_GETUID */ - -/* Define to 1 if building Hash access method. */ -#ifndef HAVE_SMALLBUILD -#define HAVE_HASH 1 -#endif - -/* Define to 1 if building Heap access method. */ -#ifndef HAVE_SMALLBUILD -#define HAVE_HEAP 1 -#endif - -/* Define to 1 if you have the `hstrerror' function. */ -/* #undef HAVE_HSTRERROR */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INTTYPES_H */ - -/* Define to 1 if you have the `isalpha' function. */ -#define HAVE_ISALPHA 1 - -/* Define to 1 if you have the `isdigit' function. */ -#define HAVE_ISDIGIT 1 - -/* Define to 1 if you have the `isprint' function. */ -#define HAVE_ISPRINT 1 - -/* Define to 1 if you have localization function to support globalization. */ -/* #undef HAVE_LOCALIZATION */ - -/* Define to 1 if you have the `localtime' function. */ -/* #undef HAVE_LOCALTIME */ - -/* Define to 1 if you have the `isspace' function. */ -#define HAVE_ISSPACE 1 - -/* Define to 1 to enable log checksums. */ -#define HAVE_LOG_CHECKSUM 1 - -/* Define to 1 if you have the `memcmp' function. */ -#define HAVE_MEMCMP 1 - -/* Define to 1 if you have the `memcpy' function. */ -#define HAVE_MEMCPY 1 - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mlock' function. */ -/* #undef HAVE_MLOCK */ - -/* Define to 1 if you have the `mmap' function. */ -/* #undef HAVE_MMAP */ - -/* Define to 1 where mmap() incrementally extends the accessible mapping as - the underlying file grows. */ -/* #undef HAVE_MMAP_EXTEND */ - -/* Define to 1 if you have the `mprotect' function. */ -/* #undef HAVE_MPROTECT */ - -/* Define to 1 if you have the `munlock' function. */ -/* #undef HAVE_MUNLOCK */ - -/* Define to 1 if you have the `munmap' function. */ -/* #undef HAVE_MUNMAP */ - -/* Define to 1 to use the GCC compiler and 68K assembly language mutexes. */ -/* #undef HAVE_MUTEX_68K_GCC_ASSEMBLY */ - -/* Define to 1 to use the AIX _check_lock mutexes. */ -/* #undef HAVE_MUTEX_AIX_CHECK_LOCK */ - -/* Define to 1 to use the GCC compiler and Alpha assembly language mutexes. */ -/* #undef HAVE_MUTEX_ALPHA_GCC_ASSEMBLY */ - -/* Define to 1 to use the GCC compiler and ARM assembly language mutexes. */ -/* #undef HAVE_MUTEX_ARM_GCC_ASSEMBLY */ - -/* Define to 1 to use the Apple/Darwin _spin_lock_try mutexes. */ -/* #undef HAVE_MUTEX_DARWIN_SPIN_LOCK_TRY */ - -/* Define to 1 to use the UNIX fcntl system call mutexes. */ -/* #undef HAVE_MUTEX_FCNTL */ - -/* Define to 1 to use the GCC compiler and PaRisc assembly language mutexes. - */ -/* #undef HAVE_MUTEX_HPPA_GCC_ASSEMBLY */ - -/* Define to 1 to use the msem_XXX mutexes on HP-UX. */ -/* #undef HAVE_MUTEX_HPPA_MSEM_INIT */ - -/* Define to 1 to use test-and-set mutexes with blocking mutexes. */ -/* #undef HAVE_MUTEX_HYBRID */ - -/* Define to 1 to use the GCC compiler and IA64 assembly language mutexes. */ -/* #undef HAVE_MUTEX_IA64_GCC_ASSEMBLY */ - -/* Define to 1 to use the GCC compiler and MIPS assembly language mutexes. */ -/* #undef HAVE_MUTEX_MIPS_GCC_ASSEMBLY */ - -/* Define to 1 to use the msem_XXX mutexes on systems other than HP-UX. */ -/* #undef HAVE_MUTEX_MSEM_INIT */ - -/* Define to 1 to use the GCC compiler and PowerPC assembly language mutexes. - */ -/* #undef HAVE_MUTEX_PPC_GCC_ASSEMBLY */ - -/* Define to 1 to use POSIX 1003.1 pthread_XXX mutexes. */ -/* #undef HAVE_MUTEX_PTHREADS */ - -/* Define to 1 to use Reliant UNIX initspin mutexes. */ -/* #undef HAVE_MUTEX_RELIANTUNIX_INITSPIN */ - -/* Define to 1 to use the IBM C compiler and S/390 assembly language mutexes. - */ -/* #undef HAVE_MUTEX_S390_CC_ASSEMBLY */ - -/* Define to 1 to use the GCC compiler and S/390 assembly language mutexes. */ -/* #undef HAVE_MUTEX_S390_GCC_ASSEMBLY */ - -/* Define to 1 to use the SCO compiler and x86 assembly language mutexes. */ -/* #undef HAVE_MUTEX_SCO_X86_CC_ASSEMBLY */ - -/* Define to 1 to use the obsolete POSIX 1003.1 sema_XXX mutexes. */ -/* #undef HAVE_MUTEX_SEMA_INIT */ - -/* Define to 1 to use the SGI XXX_lock mutexes. */ -/* #undef HAVE_MUTEX_SGI_INIT_LOCK */ - -/* Define to 1 to use the Solaris _lock_XXX mutexes. */ -/* #undef HAVE_MUTEX_SOLARIS_LOCK_TRY */ - -/* Define to 1 to use the Solaris lwp threads mutexes. */ -/* #undef HAVE_MUTEX_SOLARIS_LWP */ - -/* Define to 1 to use the GCC compiler and Sparc assembly language mutexes. */ -/* #undef HAVE_MUTEX_SPARC_GCC_ASSEMBLY */ - -/* Define to 1 if the Berkeley DB library should support mutexes. */ -#define HAVE_MUTEX_SUPPORT 1 - -/* Define to 1 if mutexes hold system resources. */ -/* #undef HAVE_MUTEX_SYSTEM_RESOURCES */ - -/* Define to 1 to configure mutexes intra-process only. */ -/* #undef HAVE_MUTEX_THREAD_ONLY */ - -/* Define to 1 to use the CC compiler and Tru64 assembly language mutexes. */ -/* #undef HAVE_MUTEX_TRU64_CC_ASSEMBLY */ - -/* Define to 1 to use the UNIX International mutexes. */ -/* #undef HAVE_MUTEX_UI_THREADS */ - -/* Define to 1 to use the UTS compiler and assembly language mutexes. */ -/* #undef HAVE_MUTEX_UTS_CC_ASSEMBLY */ - -/* Define to 1 to use VMS mutexes. */ -/* #undef HAVE_MUTEX_VMS */ - -/* Define to 1 to use VxWorks mutexes. */ -/* #undef HAVE_MUTEX_VXWORKS */ - -/* Define to 1 to use the MSVC compiler and Windows mutexes. */ -#define HAVE_MUTEX_WIN32 1 - -/* Define to 1 to use the GCC compiler and Windows mutexes. */ -/* #undef HAVE_MUTEX_WIN32_GCC */ - -/* Define to 1 to use the GCC compiler and 64-bit x86 assembly language - mutexes. */ -/* #undef HAVE_MUTEX_X86_64_GCC_ASSEMBLY */ - -/* Define to 1 to use the GCC compiler and 32-bit x86 assembly language - mutexes. */ -/* #undef HAVE_MUTEX_X86_GCC_ASSEMBLY */ - -/* Define to 1 if you have the header file, and it defines `DIR'. */ -/* #undef HAVE_NDIR_H */ - -/* Define to 1 if you have the O_DIRECT flag. */ -/* #undef HAVE_O_DIRECT */ - -/* Define to 1 if building partitioned database support. */ -/* #undef HAVE_PARTITION */ - -/* Define to 1 to enable some kind of performance event monitoring. */ -/* #undef HAVE_PERFMON */ - -/* Define to 1 to enable performance event monitoring of *_stat() statistics. - */ -/* #undef HAVE_PERFMON_STATISTICS */ - -/* Define to 1 if you have the `pread' function. */ -/* #undef HAVE_PREAD */ - -/* Define to 1 if you have the `printf' function. */ -#define HAVE_PRINTF 1 - -/* Define to 1 if you have the `pstat_getdynamic' function. */ -/* #undef HAVE_PSTAT_GETDYNAMIC */ - -/* Define to 1 if it is OK to initialize an already initialized - pthread_cond_t. */ -/* #undef HAVE_PTHREAD_COND_REINIT_OKAY */ - -/* Define to 1 if it is OK to initialize an already initialized - pthread_rwlock_t. */ -/* #undef HAVE_PTHREAD_RWLOCK_REINIT_OKAY */ - -/* Define to 1 if you have the `pthread_self' function. */ -/* #undef HAVE_PTHREAD_SELF */ - -/* Define to 1 if you have the `pthread_yield' function. */ -/* #undef HAVE_PTHREAD_YIELD */ - -/* Define to 1 if you have the `pwrite' function. */ -/* #undef HAVE_PWRITE */ - -/* Define to 1 if building on QNX. */ -/* #undef HAVE_QNX */ - -/* Define to 1 if you have the `qsort' function. */ -#define HAVE_QSORT 1 - -/* Define to 1 if building Queue access method. */ -#ifndef HAVE_SMALLBUILD -#define HAVE_QUEUE 1 -#endif - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `rand' function. */ -#define HAVE_RAND 1 - -/* Define to 1 if you have the `random' function. */ -/* #undef HAVE_RANDOM */ - -/* Define to 1 if building replication support. */ -/* #undef HAVE_REPLICATION */ - -/* Define to 1 if building the Berkeley DB replication framework. */ -/* #undef HAVE_REPLICATION_THREADS */ - -/* Define to 1 if you have the `sched_yield' function. */ -/* #undef HAVE_SCHED_YIELD */ - -/* Define to 1 if you have the `select' function. */ -/* #undef HAVE_SELECT */ - -/* Define to 1 if you have the `setgid' function. */ -/* #undef HAVE_SETGID */ - -/* Define to 1 if you have the `setuid' function. */ -#define HAVE_SETUID 1 - -/* Define to 1 to configure Berkeley DB to use shared, read/write latches. */ -#define HAVE_SHARED_LATCHES 1 - -/* Define to 1 if shmctl/SHM_LOCK locks down shared memory segments. */ -/* #undef HAVE_SHMCTL_SHM_LOCK */ - -/* Define to 1 if you have the `shmget' function. */ -/* #undef HAVE_SHMGET */ - -/* Define to 1 if you have the `sigaction' function. */ -/* #undef HAVE_SIGACTION */ - -/* Define to 1 if thread identifier type db_threadid_t is integral. */ -#define HAVE_SIMPLE_THREAD_TYPE 1 - -/* Define to 1 if you have the `snprintf' function. */ -#define HAVE_SNPRINTF 1 - -/* Define to 1 if you have the `stat' function. */ -#define HAVE_STAT 1 - -/* Define to 1 if building statistics support. */ -#define HAVE_STATISTICS 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STDINT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `strcasecmp' function. */ -#define HAVE_STRCASECMP 1 - -/* Define to 1 if you have the `strcat' function. */ -#define HAVE_STRCAT 1 - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strdup' function. */ -/* #undef HAVE_STRDUP */ - -/* Define to 1 if you have the `strerror' function. */ -/* #undef HAVE_STRERROR */ - -/* Define to 1 if you have the `strftime' function. */ -/* #undef HAVE_STRFTIME */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if building without output message content. */ -#ifdef HAVE_SMALLBUILD -#define HAVE_STRIPPED_MESSAGES 1 -#endif - -/* Define to 1 if you have the `strncat' function. */ -#define HAVE_STRNCAT 1 - -/* Define to 1 if you have the `strncmp' function. */ -#define HAVE_STRNCMP 1 - -/* Define to 1 if you have the `strrchr' function. */ -#define HAVE_STRRCHR 1 - -/* Define to 1 if you have the `strsep' function. */ -/* #undef HAVE_STRSEP */ - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if `st_blksize' is member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BLKSIZE */ - -/* Define to 1 if you have the `sysconf' function. */ -/* #undef HAVE_SYSCONF */ - -/* Define to 1 if port includes files in the Berkeley DB source code. */ -/* #undef HAVE_SYSTEM_INCLUDE_FILES */ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_SYS_DIR_H */ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_SYS_NDIR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SDT_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SELECT_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SOCKET_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TIME_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `time' function. */ -/* #undef HAVE_TIME */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UNISTD_H */ - -/* Define to 1 if unlink of file with open file descriptors will fail. */ -/* #undef HAVE_UNLINK_WITH_OPEN_FAILURE */ - -/* Define to 1 if port includes historic database upgrade support. */ -/* #undef HAVE_UPGRADE_SUPPORT */ - -/* Define to 1 if building access method verification support. */ -#ifndef HAVE_SMALLBUILD -#define HAVE_VERIFY 1 -#endif - -/* Define to 1 if you have the `vsnprintf' function. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 if building VxWorks. */ -/* #undef HAVE_VXWORKS */ - -/* Define to 1 if you have the `yield' function. */ -/* #undef HAVE_YIELD */ - -/* Define to 1 if you have the `_fstati64' function. */ -#define HAVE__FSTATI64 1 - -/* Define to the sub-directory in which libtool stores uninstalled libraries. */ -/* #undef LT_OBJDIR */ - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "Oracle Technology Network Berkeley DB forum" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "Berkeley DB" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "Berkeley DB __EDIT_DB_VERSION__" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "db-__EDIT_DB_VERSION__" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.oracle.com/technology/software/products/berkeley-db/index.html" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "__EDIT_DB_VERSION__" - -/* The size of a `char', as computed by sizeof. */ -/* #undef SIZEOF_CHAR */ - -/* The size of a `char *', as computed by sizeof. */ -/* #undef SIZEOF_CHAR_P */ - -/* The size of a `int', as computed by sizeof. */ -/* #undef SIZEOF_INT */ - -/* The size of a `long', as computed by sizeof. */ -/* #undef SIZEOF_LONG */ - -/* The size of a `long long', as computed by sizeof. */ -/* #undef SIZEOF_LONG_LONG */ - -/* The size of a `short', as computed by sizeof. */ -/* #undef SIZEOF_SHORT */ - -/* The size of a `size_t', as computed by sizeof. */ -/* #undef SIZEOF_SIZE_T */ - -/* The size of a `unsigned char', as computed by sizeof. */ -/* #undef SIZEOF_UNSIGNED_CHAR */ - -/* The size of a `unsigned int', as computed by sizeof. */ -/* #undef SIZEOF_UNSIGNED_INT */ - -/* The size of a `unsigned long', as computed by sizeof. */ -/* #undef SIZEOF_UNSIGNED_LONG */ - -/* The size of a `unsigned long long', as computed by sizeof. */ -/* #undef SIZEOF_UNSIGNED_LONG_LONG */ - -/* The size of a `unsigned short', as computed by sizeof. */ -/* #undef SIZEOF_UNSIGNED_SHORT */ - -/* Define to 1 if the `S_IS*' macros in do not work properly. */ -/* #undef STAT_MACROS_BROKEN */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -/* #undef TIME_WITH_SYS_TIME */ - -/* Define to 1 to mask harmless uninitialized memory read/writes. */ -/* #undef UMRW */ - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#define inline __inline -#endif - -/* type to use in place of socklen_t if not defined */ -/* #undef socklen_t */ diff --git a/docs/installation/build_wince.html b/docs/installation/build_wince.html deleted file mode 100644 index b962abe04..000000000 --- a/docs/installation/build_wince.html +++ /dev/null @@ -1,380 +0,0 @@ - - - - - - Chapter 6.  Building Berkeley DB for Windows Mobile - - - - - - - - - -
-
-
-
-

Chapter 6.  - Building Berkeley DB for Windows Mobile -

-
-
-
- -
-
-
-
-

Building for Windows Mobile

-
-
-
- -

This page contains general instructions on building Berkeley DB for -Windows Mobile platforms using specific compilers.

-

The build_wince directory in the Berkeley DB distribution contains -project files for Microsoft Visual 2005 with the Mobile SDK installed:

-
- - - - - - - - - - - - - - - - - - - - - -
Project FileDescription
Berkeley_DB.slnVisual Studio 2005 solution
*.vcprojVisual Studio 2005 project files
-
-

These project files can be used to build Berkeley DB for the Windows Mobile platform.

-
-
-
-
-

Building Berkeley DB for Windows Mobile

-
-
-
-
-
-
-
-

Visual Studio 2005

-
-
-
-
-
    -
  1. Choose File -> Open Workspace.... -Navigate to the build_wince directory, select Berkeley_DB -and click Open.
  2. -
  3. Select the desired target platform from the platform drop-down menu.
  4. -
  5. Build the desired projects.
  6. -
-
-
-
-
-
-
-

Build results

-
-
-
-

The results of your build will be placed in any one of the following Berkeley DB subdirectories, -depending on the configuration that you chose: -

- - - - - - - - - - - - - -
- build_wince\(Platform)\Debug -
- build_wince\(Platform)\Release -
- build_wince\(Platform)\Debug_static -
- build_wince\(Platform)\Release_static -
-

-

-

When building your application during development, you must -link against -libdb_small53sd.lib or against libdb_sql53sd.lib for SQL features. You can -also build using a release version of the Berkeley DB libraries and tools, -which will be placed in the -build_wince\(Platform)\Release_static directory. -You must add the build_wince directory to the list -of include directories of your application's project, or copy the Berkeley DB -include files to a location in your Visual Studio include path.

-
-
-
-
-
-
-

Changing Build Configuration Type

-
-
-
-

-This section contains information on how to change between a dynamic -library (.dll) and static library (.lib). The library projects and their default -output and configuration in the Release build is as follows: -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ProjectDefault OutputDefault Configuration
db_small_staticlibdb_small53s.libStatic Library
db_staticlibdb53s.libStatic Library
db_sqllibdb_sql53.dllDynamic Library
db_sql_staticlibdb_sql53s.libStatic Library
-
-

-To change a project configuration type in Visual Studio 2005, select a -project and do the following: -

-
-
    -
  1. Choose Project->Properties and navigate to Configuration Properties.
  2. -
  3. Under Project Defaults, change the Configuration Type to your desired type.
  4. -
-
-

Note: After this change, the output file names change to the Visual Studio 2005 defaults based on the project name.

-
-
-
-
-
-

Building Berkeley DB for different target platforms

-
-
-
-

- There are many possible target CPU architectures for a Windows - Mobile application. This section outlines the process required to - add a new target architecture to the project files supplied with - Berkeley DB. -

-

- The Visual Studio 2005 project files will by default build for - Pocket PC 2003 and Smartphone 2003, and Windows Mobile 6.5.3 Professional. If you want to - build for other platforms such as Windows Mobile 6.0, 6.1, or 6.5, you need to follow the steps provided in this section. -

-

- Different target architectures are available in different Platform - SDK or DTK downloads from Microsoft. The appropriate SDK must be installed - for your mobile architecture before you can build for that - platform. You can find the downloads at the Microsoft Developer Center page. -

-
-
-
-
-

Visual Studio 2005

-
-
-
-
-
    -
  1. - Choose File -> Open Workspace.... - Navigate to the build_wince directory, - select Berkeley_DB and click Open. -
  2. -
  3. - From the Solution explorer window, - right-click the Solution Berkeley_DB and - select Configuration manager...
  4. -
  5. - In the Active solution platform: drop - down box select New...
  6. -
  7. - From the Type or select the new platform - drop-down box, select a configuration from the ones - available and click OK.
  8. -
  9. - Click Close from the - Configuration Manager dialog box. -
  10. -
  11. - The target platform drop-down now contains the platform - just added. -
  12. -
  13. - Build as per the instructions given at the beginning of this chapter. -
  14. -
-
-
-
-
-
-
-

BDB SQL Notes

-
-
-
-

- After building for a different platform, change the deployment remote directory for the db_sql project to run the wce_sql sample application: -

-
-
    -
  1. Select db_sql from the Solution explorer window.
  2. -
  3. Choose Project->Properties and navigate to Configuration Properties.
  4. -
  5. Under Deployment, change the remote directory to %CSIDL_PROGRAM_FILES%\wce_sql.
  6. -
-
-
-
-
-
- - - diff --git a/docs/installation/build_wince_faq.html b/docs/installation/build_wince_faq.html deleted file mode 100644 index e5f645286..000000000 --- a/docs/installation/build_wince_faq.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - Windows Mobile FAQ - - - - - - - - - -
-
-
-
-

Windows Mobile FAQ

-
-
-
-
-
    -
  1. - - What if my Windows Mobile device does not support SetFilePointer and/or SetEndOfFile? - -

    You can manually disable the truncate functionality from the build.

    -

    Do that by opening the db-X.X.X/build_wince/db_config.h file, and change the line that reads

    -
    #define HAVE_FTRUCATE 1
    -

    to read

    -
    #undef HAVE_FTRUNCATE
    -

    Making this change disables DB->compact() for btree databases.

    -
  2. -
  3. - - Why doesn't automatic log archiving work? - -

    The Windows Mobile platform does not have a concept of a working directory. This means that the DB_ARCH_REMOVE and DB_ARCH_ABS flags do not work properly within Windows Mobile, because they rely on having a working directory.

    -

    To work around this issue, you can call log_archive with the DB_ARCH_LOG flag, the list of returned file handles will not contain absolute paths. Your application can take this list of files, construct absolute paths, and delete the files.

    -
  4. -
  5. - - Does Berkeley DB support Windows Mobile? - -

    Yes.

    -

    Berkeley DB relies on a subset of the Windows API, and some standard C library APIs. These are provided by Windows CE. Windows Mobile is built "on top" of Windows CE.

    -
  6. -
  7. - - Does Berkeley DB support Windows CE? - -

    Yes.

    -

    Berkeley DB relies on a subset of the Windows API, and some standard C library APIs. These are provided by Windows CE.

    -
  8. -
  9. - - What platforms are the supplied sample applications designed for? - -

    The supplied sample applications were developed for the Pocket PC 2003 emulator. They are known to work on real pocket PC devices and later versions of the emulator as well.

    -

    The supplied applications are not designed to work with Smartphone devices. The screen size and input mechanisms are not compatible.

    -
  10. -
  11. - - I see a file mapping error when opening a Berkeley DB environment or database. What is wrong? - -

    The default behavior of Berkeley DB is to use memory mapped files in the environment. Windows Mobile does not allow memory mapped files to be created on flash storage.

    -

    There are two workarounds:

    -
    -
      -
    1. - Configure the Berkeley DB environment not to use memory mapped files. The options are discussed in detail in - Shared memory region. -
    2. -
    3. Create the Berkeley DB environment on non-flash storage. It is possible to store database and log files in a different location to using the DB_ENV->set_data_dir() and DB_ENV->set_lg_dir() APIs.
    4. -
    -
    -
  12. -
-
-
- - - diff --git a/docs/installation/build_wince_notes.html b/docs/installation/build_wince_notes.html deleted file mode 100644 index 3115feb37..000000000 --- a/docs/installation/build_wince_notes.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - Windows Mobile notes - - - - - - - - - -
-
-
-
-

Windows Mobile notes

-
-
-
-
-
    -
  1. The C++ API is not supported on Windows Mobile. The file stream and -exception handling functionality provided by the Berkeley DB C++ API are not -supported by Windows Mobile. It is possible to build a C++ application -against the Berkeley DB C API.
  2. -
  3. The Java API is not currently supported on Windows Mobile.
  4. -
  5. Tcl support is not currently supported on Windows Mobile.
  6. -
  7. Berkeley DB is shipped with support for the Pocket PC 2003 and Smartphone 2003 target platforms. It is possible to build Berkeley DB for different target platforms using Visual Studio's Configuration Manager. -

    This can be done using the following steps:

    1. Open Visual Studio, and load the build_wince/Berkeley_DB.sln solution file.
    2. Select the Build->Configuration Manager... menu item.
    3. In the Active Solution Platform... dropdown, select New...
    4. Select the desired target platform (you must have the desired Microsoft Platform SDK installed for it to appear in the list). Choose to copy settings from either the Pocket PC 2003 or Smartphone 2003 platforms.

    Before building the wce_tpcb sample application for the new platform, you will need to complete the following steps:

    1. Open the project properties page for wce_tpcb. Do this by: Right click wce_tpcb in the Solution Explorer then select Properties
    2. Select Configuration Properties->Linker->Input
    3. Remove secchk.lib and crtti.lib from the Additional Dependencies field.

    NOTE: These steps are based on Visual Studio 2005, and might vary slightly depending on which version of Visual Studio being used.

  8. -
-
-
- - - diff --git a/docs/installation/index.html b/docs/installation/index.html index 4df23ab22..6e653597c 100644 --- a/docs/installation/index.html +++ b/docs/installation/index.html @@ -420,51 +420,6 @@

Berkeley DB Installation and Build Guide< -
- - 6. - Building Berkeley DB for Windows Mobile - - -
-
-
-
- - Building for Windows Mobile - -
-
-
-
- - Building Berkeley DB for Windows Mobile - -
-
- - Changing Build Configuration Type - -
-
- - Building Berkeley DB for different target platforms - -
-
-
-
- - Windows Mobile notes - -
-
- - Windows Mobile FAQ - -
-
-
7. diff --git a/lang/sql/adapter/db_sequence.c b/lang/sql/adapter/db_sequence.c index 6c501884d..5c90113d2 100644 --- a/lang/sql/adapter/db_sequence.c +++ b/lang/sql/adapter/db_sequence.c @@ -41,9 +41,6 @@ #include "db.h" #include -#ifdef DB_WINCE -#define vsnprintf _vsnprintf -#endif #define SEQ_HANDLE_OPEN 0x0001 #define SEQ_HANDLE_CREATE 0x0002 diff --git a/lang/sql/sqlite/Makefile.arm-wince-mingw32ce-gcc b/lang/sql/sqlite/Makefile.arm-wince-mingw32ce-gcc deleted file mode 100644 index 323b7ea48..000000000 --- a/lang/sql/sqlite/Makefile.arm-wince-mingw32ce-gcc +++ /dev/null @@ -1,138 +0,0 @@ -#!/usr/make -# -# Makefile for SQLITE -# -# This is a template makefile for SQLite. Most people prefer to -# use the autoconf generated "configure" script to generate the -# makefile automatically. But that does not work for everybody -# and in every situation. If you are having problems with the -# "configure" script, you might want to try this makefile as an -# alternative. Create a copy of this file, edit the parameters -# below and type "make". -# - -#### The directory where to find the mingw32ce tools -MINGW32CE = /opt/mingw32ce/bin - -#### The target prefix of the mingw32ce tools -TARGET = arm-wince-mingw32ce - -#### The toplevel directory of the source tree. This is the directory -# that contains this "Makefile.in" and the "configure.in" script. -# -TOP = ../sqlite - -#### C Compiler and options for use in building executables that -# will run on the platform that is doing the build. -# -BCC = gcc -g -O2 -#BCC = /opt/ancic/bin/c89 -0 - -#### If the target operating system supports the "usleep()" system -# call, then define the HAVE_USLEEP macro for all C modules. -# -USLEEP = -#USLEEP = -DHAVE_USLEEP=1 - -#### If you want the SQLite library to be safe for use within a -# multi-threaded program, then define the following macro -# appropriately: -# -THREADSAFE = -DTHREADSAFE=1 -#THREADSAFE = -DTHREADSAFE=0 - -#### Specify any extra linker options needed to make the library -# thread safe -# -#THREADLIB = -lpthread -THREADLIB = - -#### Specify any extra libraries needed to access required functions. -# -#TLIBS = -lrt # fdatasync on Solaris 8 -TLIBS = - -#### Leave SQLITE_DEBUG undefined for maximum speed. Use SQLITE_DEBUG=1 -# to check for memory leaks. Use SQLITE_DEBUG=2 to print a log of all -# malloc()s and free()s in order to track down memory leaks. -# -# SQLite uses some expensive assert() statements in the inner loop. -# You can make the library go almost twice as fast if you compile -# with -DNDEBUG=1 -# -#OPTS = -DSQLITE_DEBUG=2 -#OPTS = -DSQLITE_DEBUG=1 -#OPTS = -OPTS = -DNDEBUG=1 -DSQLITE_OS_WIN=1 -D_WIN32_WCE=1 -#OPTS += -DHAVE_FDATASYNC=1 - -#### The suffix to add to executable files. ".exe" for windows. -# Nothing for unix. -# -EXE = .exe -#EXE = - -#### C Compile and options for use in building executables that -# will run on the target platform. This is usually the same -# as BCC, unless you are cross-compiling. -# -#TCC = gcc -O6 -#TCC = gcc -g -O0 -Wall -#TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage -#TCC = /opt/mingw/bin/i386-mingw32-gcc -O6 -TCC = $(MINGW32CE)/$(TARGET)-gcc -O2 -#TCC = /opt/ansic/bin/c89 -O +z -Wl,-a,archive - -#### Tools used to build a static library. -# -#AR = ar cr -#AR = /opt/mingw/bin/i386-mingw32-ar cr -AR = $(MINGW32CE)/$(TARGET)-ar cr -#RANLIB = ranlib -#RANLIB = /opt/mingw/bin/i386-mingw32-ranlib -RANLIB = $(MINGW32CE)/$(TARGET)-ranlib - -#MKSHLIB = gcc -shared -#SO = so -#SHPREFIX = lib -MKSHLIB = $(MINGW32CE)/$(TARGET)-gcc -shared -SO = dll -SHPREFIX = - -#### Extra compiler options needed for programs that use the TCL library. -# -#TCL_FLAGS = -#TCL_FLAGS = -DSTATIC_BUILD=1 -TCL_FLAGS = -I/home/drh/tcltk/8.5linux -#TCL_FLAGS = -I/home/drh/tcltk/8.5win -DSTATIC_BUILD=1 -#TCL_FLAGS = -I/home/drh/tcltk/8.3hpux - -#### Linker options needed to link against the TCL library. -# -#LIBTCL = -ltcl -lm -ldl -LIBTCL = /home/drh/tcltk/8.5linux/libtcl8.5g.a -lm -ldl -#LIBTCL = /home/drh/tcltk/8.5win/libtcl85s.a -lmsvcrt -#LIBTCL = /home/drh/tcltk/8.3hpux/libtcl8.3.a -ldld -lm -lc - -#### Additional objects for SQLite library when TCL support is enabled. -TCLOBJ = -#TCLOBJ = tclsqlite.o - -#### Compiler options needed for programs that use the readline() library. -# -READLINE_FLAGS = -#READLINE_FLAGS = -DHAVE_READLINE=1 -I/usr/include/readline - -#### Linker options needed by programs using readline() must link against. -# -LIBREADLINE = -#LIBREADLINE = -static -lreadline -ltermcap - -#### Which "awk" program provides nawk compatibilty -# -# NAWK = nawk -NAWK = awk - -# You should not have to change anything below this line -############################################################################### -include $(TOP)/main.mk diff --git a/src/dbinc/atomic.h b/src/dbinc/atomic.h index f25e7cc0f..824051cc0 100644 --- a/src/dbinc/atomic.h +++ b/src/dbinc/atomic.h @@ -84,16 +84,9 @@ typedef signed int atomic_value_t; * additional 32-bit value that can be harmlessly written for each value * used in Interlocked instructions. */ -#if defined(DB_WINCE) typedef struct { volatile atomic_value_t value; - volatile atomic_value_t dummy; } db_atomic_t; -#else -typedef struct { - volatile atomic_value_t value; -} db_atomic_t; -#endif /* * Memory ordering constants for future use with relaxed/acquire/release diff --git a/src/dbinc/globals.h b/src/dbinc/globals.h index 261967d1a..cc338a0c2 100644 --- a/src/dbinc/globals.h +++ b/src/dbinc/globals.h @@ -28,7 +28,6 @@ typedef struct __db_globals { SEM_ID db_global_lock; /* VxWorks: global semaphore */ #endif #ifdef DB_WIN32 -#ifndef DB_WINCE /* * These fields are used by the Windows implementation of mutexes. * Usually they are initialized by the first DB API call to lock a @@ -38,7 +37,6 @@ typedef struct __db_globals { */ SECURITY_DESCRIPTOR win_default_sec_desc; SECURITY_ATTRIBUTES win_default_sec_attr; -#endif SECURITY_ATTRIBUTES *win_sec_attr; #endif diff --git a/src/dbinc/mutex_int.h b/src/dbinc/mutex_int.h index a6e5751a1..2a546e58d 100644 --- a/src/dbinc/mutex_int.h +++ b/src/dbinc/mutex_int.h @@ -370,7 +370,7 @@ typedef LONG volatile tsl_t; * platforms, and it improves performance on Pentium 4 processor platforms." */ #ifdef HAVE_MUTEX_WIN32 -#if !defined(_WIN64) && !defined(DB_WINCE) +#if !defined(_WIN64) #define MUTEX_PAUSE {__asm{_emit 0xf3}; __asm{_emit 0x90}} #endif #endif diff --git a/src/dbinc/win_db.h b/src/dbinc/win_db.h index 6544558b9..14b1d7402 100644 --- a/src/dbinc/win_db.h +++ b/src/dbinc/win_db.h @@ -13,7 +13,6 @@ #define _WIN32_WINNT 0x0500 #endif -#ifndef DB_WINCE #include #include #include @@ -25,7 +24,6 @@ #include #include #include -#endif /* DB_WINCE */ #include #include @@ -45,9 +43,7 @@ #define WIN32_LEAN_AND_MEAN #include #include -#ifndef DB_WINCE #include -#endif #ifdef HAVE_GETADDRINFO /* @@ -64,9 +60,7 @@ */ #define fsync _commit -#ifndef DB_WINCE #define getcwd(buf, size) _getcwd(buf, size) -#endif #define getpid GetCurrentProcessId #define snprintf _snprintf #define strcasecmp _stricmp diff --git a/src/dbinc_auto/ext_def.in b/src/dbinc_auto/ext_def.in index 1a56f192a..902d3ed78 100644 --- a/src/dbinc_auto/ext_def.in +++ b/src/dbinc_auto/ext_def.in @@ -32,7 +32,7 @@ #define db_version db_version@DB_VERSION_UNIQUE_NAME@ #define db_full_version db_full_version@DB_VERSION_UNIQUE_NAME@ #define log_compare log_compare@DB_VERSION_UNIQUE_NAME@ -#if defined(DB_WIN32) && !defined(DB_WINCE) +#if defined(DB_WIN32) #define db_env_set_win_security db_env_set_win_security@DB_VERSION_UNIQUE_NAME@ #endif #define db_sequence_create db_sequence_create@DB_VERSION_UNIQUE_NAME@ diff --git a/src/dbinc_auto/ext_prot.in b/src/dbinc_auto/ext_prot.in index 371e5a3e7..e30319fcc 100644 --- a/src/dbinc_auto/ext_prot.in +++ b/src/dbinc_auto/ext_prot.in @@ -36,7 +36,7 @@ int db_env_create __P((DB_ENV **, u_int32_t)); char *db_version __P((int *, int *, int *)); char *db_full_version __P((int *, int *, int *, int *, int *)); int log_compare __P((const DB_LSN *, const DB_LSN *)); -#if defined(DB_WIN32) && !defined(DB_WINCE) +#if defined(DB_WIN32) int db_env_set_win_security __P((SECURITY_ATTRIBUTES *sa)); #endif int db_sequence_create __P((DB_SEQUENCE **, DB *, u_int32_t)); diff --git a/src/env/env_globals.c b/src/env/env_globals.c index 29d7996a9..1c19748a7 100644 --- a/src/env/env_globals.c +++ b/src/env/env_globals.c @@ -21,10 +21,8 @@ DB_GLOBALS __db_global_values = { NULL, /* VxWorks: db_global_lock */ #endif #ifdef DB_WIN32 -#ifndef DB_WINCE { 0 }, /* SECURITY_DESCRIPTOR win_default_sec_desc */ { 0 }, /* SECURITY_ATTRIBUTES win_default_sec_attr */ -#endif NULL, /* SECURITY_ATTRIBUTES *win_sec_attr */ #endif { NULL, NULL }, /* XA env list */ diff --git a/src/mutex/mut_win32.c b/src/mutex/mut_win32.c index 962d9255d..f8fb7a8af 100644 --- a/src/mutex/mut_win32.c +++ b/src/mutex/mut_win32.c @@ -51,7 +51,6 @@ static __inline int get_handle(env, mutexp, eventp) for (id = (mutexp)->id; id != 0; id >>= 4) *--p = hex_digits[id & 0xf]; -#ifndef DB_WINCE if (DB_GLOBAL(win_sec_attr) == NULL) { InitializeSecurityDescriptor(&DB_GLOBAL(win_default_sec_desc), SECURITY_DESCRIPTOR_REVISION); @@ -64,7 +63,6 @@ static __inline int get_handle(env, mutexp, eventp) &DB_GLOBAL(win_default_sec_desc); DB_GLOBAL(win_sec_attr) = &DB_GLOBAL(win_default_sec_attr); } -#endif if ((*eventp = CreateEvent(DB_GLOBAL(win_sec_attr), FALSE, FALSE, idbuf)) == NULL) { @@ -120,13 +118,6 @@ __db_win32_mutex_lock_int(env, mutex, timeout, wait) __clock_set_expires(env, &timeoutspec, timeout); } - /* - * See WINCE_ATOMIC_MAGIC definition for details. - * Use sharecount, because the value just needs to be a db_atomic_t - * memory mapped onto the same page as those being Interlocked*. - */ - WINCE_ATOMIC_MAGIC(&mutexp->sharecount); - event = NULL; ms = 50; ret = 0; @@ -341,13 +332,6 @@ __db_win32_mutex_readlock_int(env, mutex, nowait) CHECK_MTX_THREAD(env, mutexp); - /* - * See WINCE_ATOMIC_MAGIC definition for details. - * Use sharecount, because the value just needs to be a db_atomic_t - * memory mapped onto the same page as those being Interlocked*. - */ - WINCE_ATOMIC_MAGIC(&mutexp->sharecount); - event = NULL; ms = 50; ret = 0; @@ -576,14 +560,13 @@ __db_win32_mutex_destroy(env, mutex) return (0); } -#ifndef DB_WINCE /* * db_env_set_win_security * * Set the SECURITY_ATTRIBUTES to be used by BDB on Windows. * It should not be called while any BDB mutexes are locked. * - * EXTERN: #if defined(DB_WIN32) && !defined(DB_WINCE) + * EXTERN: #if defined(DB_WIN32) * EXTERN: int db_env_set_win_security __P((SECURITY_ATTRIBUTES *sa)); * EXTERN: #endif */ @@ -594,4 +577,3 @@ db_env_set_win_security(sa) DB_GLOBAL(win_sec_attr) = sa; return (0); } -#endif diff --git a/src/os/os_atomic.c b/src/os/os_atomic.c index cadad2281..4d620ccfe 100644 --- a/src/os/os_atomic.c +++ b/src/os/os_atomic.c @@ -1849,9 +1849,6 @@ __os_atomic_init(p, val) atomic_value_t val; { p->value = val; -#if defined(DB_WINCE) - p->dummy = 0; -#endif } /* @@ -1893,7 +1890,6 @@ __os_atomic_store(p, val) db_atomic_t *p; atomic_value_t val; { - WINCE_ATOMIC_MAGIC(p); InterlockedExchange( (interlocked_val)(&p->value), (LONG)val); } @@ -1915,7 +1911,6 @@ __os_atomic_inc(env, p) db_atomic_t *p; { COMPQUIET(env, NULL); - WINCE_ATOMIC_MAGIC(p); return ((atomic_value_t)InterlockedIncrement( (interlocked_val)(&p->value))); } @@ -1937,7 +1932,6 @@ __os_atomic_dec(env, p) db_atomic_t *p; { COMPQUIET(env, NULL); - WINCE_ATOMIC_MAGIC(p); return ((atomic_value_t)InterlockedDecrement( (interlocked_val)(&p->value))); } @@ -1962,7 +1956,6 @@ __os_atomic_cas(env, p, oldval, newval) atomic_value_t newval; { COMPQUIET(env, NULL); - WINCE_ATOMIC_MAGIC(p); return (InterlockedCompareExchange( (interlocked_val)(&p->value), (LONG)newval, (LONG)oldval) == (LONG)oldval); @@ -1986,7 +1979,6 @@ __os_atomic_add(env, p, val) atomic_value_t val; { COMPQUIET(env, NULL); - WINCE_ATOMIC_MAGIC(p); /* InterlockedExchangeAdd returns the OLD value. */ return ((atomic_value_t)InterlockedExchangeAdd( (interlocked_val)(&p->value), (LONG)val) + val); @@ -2010,7 +2002,6 @@ __os_atomic_fetch_add(env, p, val) atomic_value_t val; { COMPQUIET(env, NULL); - WINCE_ATOMIC_MAGIC(p); return ((atomic_value_t)InterlockedExchangeAdd( (interlocked_val)(&p->value), (LONG)val)); } @@ -2033,7 +2024,6 @@ __os_atomic_exchange(env, p, val) atomic_value_t val; { COMPQUIET(env, NULL); - WINCE_ATOMIC_MAGIC(p); return ((atomic_value_t)InterlockedExchange( (interlocked_val)(&p->value), (LONG)val)); } diff --git a/src/os_windows/os_clock.c b/src/os_windows/os_clock.c index b8a1cb163..053aaf057 100644 --- a/src/os_windows/os_clock.c +++ b/src/os_windows/os_clock.c @@ -44,36 +44,10 @@ __os_gettime(env, tp, monotonic) tp->tv_sec = base_seconds + (u_int32_t)(ticks / 1000); tp->tv_nsec = (u_int32_t)((ticks % 1000) * NS_PER_MS); } else { -#ifdef DB_WINCE - FILETIME ft; - LARGE_INTEGER large_int; - LONGLONG ns_since_epoch, utc1970; - SYSTEMTIME st; - - (void)GetSystemTime(&st); - (void)SystemTimeToFileTime(&st, &ft); - - /* - * A FILETIME expresses time as 100 nanosecond chunks from - * Jan 1, 1601; convert to a timespec where the time is - * is expressed in seconds and nanoseconds from Jan 1, 1970. - * - * UTC_1970 is the number of 100-nano-second chunks from - * 1601 to 1970. - */ -#define NS100_PER_SEC (NS_PER_SEC / 100) -#define UTC_1970 (((LONGLONG)27111902 << 32) + (LONGLONG)3577643008) - memcpy(&large_int, &ft, sizeof(large_int)); - utc1970 = UTC_1970; - ns_since_epoch = (large_int.QuadPart - utc1970); - tp->tv_sec = (time_t)(ns_since_epoch / NS100_PER_SEC); - tp->tv_nsec = (long)(ns_since_epoch % NS100_PER_SEC); -#else struct _timeb now; _ftime(&now); tp->tv_sec = now.time; tp->tv_nsec = now.millitm * NS_PER_MS; -#endif } } diff --git a/src/os_windows/os_config.c b/src/os_windows/os_config.c index c93888d4c..f49639498 100644 --- a/src/os_windows/os_config.c +++ b/src/os_windows/os_config.c @@ -19,9 +19,6 @@ int __os_is_winnt() { -#ifdef DB_WINCE - return (1); -#else static int __os_type = -1; /* @@ -35,7 +32,6 @@ __os_is_winnt() __os_type = 0; } return (__os_type); -#endif } /* @@ -45,9 +41,6 @@ __os_is_winnt() int __os_fs_notzero() { -#ifdef DB_WINCE - return (1); -#else static int __os_notzero = -1; OSVERSIONINFO osvi; @@ -91,7 +84,6 @@ __os_fs_notzero() __os_notzero = 1; /* Not Windows/NT */ } return (__os_notzero); -#endif } /* @@ -111,11 +103,7 @@ __os_support_direct_io() int __os_support_db_register() { -#ifdef DB_WINCE - return (0); -#else return (__os_is_winnt()); -#endif } /* @@ -125,9 +113,5 @@ __os_support_db_register() int __os_support_replication() { -#ifdef DB_WINCE - return (0); -#else return (__os_is_winnt()); -#endif } diff --git a/src/os_windows/os_dir.c b/src/os_windows/os_dir.c index 38b876e0a..ab79945c3 100644 --- a/src/os_windows/os_dir.c +++ b/src/os_windows/os_dir.c @@ -39,9 +39,8 @@ __os_dirlist(env, dir, returndir, namesp, cntp) _T("%s%hc*"), tdir, PATH_SEPARATOR[0]); /* - * On WinCE, FindFirstFile will return INVALID_HANDLE_VALUE when - * the searched directory is empty, and set last error to - * ERROR_NO_MORE_FILES, on Windows it will return "." instead. + * FindFirstFile can return INVALID_HANDLE_VALUE with last error set to + * ERROR_NO_MORE_FILES when the searched directory is empty. */ if ((dirhandle = FindFirstFile(tfilespec, &fdata)) == INVALID_HANDLE_VALUE) { diff --git a/src/os_windows/os_errno.c b/src/os_windows/os_errno.c index de8ae7ac2..a4a46295f 100644 --- a/src/os_windows/os_errno.c +++ b/src/os_windows/os_errno.c @@ -109,23 +109,6 @@ __os_strerror(error, buf, len) char *buf; size_t len; { -#ifdef DB_WINCE -#define MAX_TMPBUF_LEN 512 - _TCHAR tbuf[MAX_TMPBUF_LEN]; - size_t maxlen; - - DB_ASSERT(NULL, error != 0); - - memset(tbuf, 0, sizeof(_TCHAR)*MAX_TMPBUF_LEN); - maxlen = (len > MAX_TMPBUF_LEN ? MAX_TMPBUF_LEN : len); - FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, 0, (DWORD)error, - 0, tbuf, maxlen-1, NULL); - - if (WideCharToMultiByte(CP_UTF8, 0, tbuf, -1, - buf, len, 0, NULL) == 0) - strncpy(buf, DB_STR("0035", - "Error message translation failed."), len); -#else DB_ASSERT(NULL, error != 0); /* * Explicitly call FormatMessageA, since we want to receive a char @@ -134,7 +117,6 @@ __os_strerror(error, buf, len) FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, 0, (DWORD)error, 0, buf, (DWORD)(len - 1), NULL); buf[len - 1] = '\0'; -#endif return (buf); } diff --git a/src/os_windows/os_flock.c b/src/os_windows/os_flock.c index 442ebe5f4..31d20601e 100644 --- a/src/os_windows/os_flock.c +++ b/src/os_windows/os_flock.c @@ -21,18 +21,6 @@ __os_fdlock(env, fhp, offset, acquire, nowait) int acquire, nowait; off_t offset; { -#ifdef DB_WINCE - /* - * This functionality is not supported by WinCE, so just fail. - * - * Should only happen if an app attempts to open an environment - * with the DB_REGISTER flag. - */ - __db_errx(env, DB_STR("0019", - "fdlock API not implemented for WinCE, DB_REGISTER " - "environment flag not supported.")); - return (EFAULT); -#else DWORD low, high; DB_ENV *dbenv; OVERLAPPED over; @@ -86,5 +74,4 @@ __os_fdlock(env, fhp, offset, acquire, nowait) !UnlockFile(fhp->handle, low, high, 1, 0), ret); return (__os_posix_err(ret)); -#endif } diff --git a/src/os_windows/os_getenv.c b/src/os_windows/os_getenv.c index 5bf4c419c..2e333b630 100644 --- a/src/os_windows/os_getenv.c +++ b/src/os_windows/os_getenv.c @@ -21,11 +21,6 @@ __os_getenv(env, name, bpp, buflen) char **bpp; size_t buflen; { -#ifdef DB_WINCE - COMPQUIET(name, NULL); - /* WinCE does not have a getenv implementation. */ - return (0); -#else _TCHAR *tname, tbuf[1024]; int ret; char *p; @@ -99,5 +94,4 @@ __os_getenv(env, name, bpp, buflen) "%s: buffer too small to hold environment variable %s", "%s %s"), name, p); return (EINVAL); -#endif } diff --git a/src/os_windows/os_handle.c b/src/os_windows/os_handle.c index 642585ab3..1a978b58a 100644 --- a/src/os_windows/os_handle.c +++ b/src/os_windows/os_handle.c @@ -21,14 +21,6 @@ __os_openhandle(env, name, flags, mode, fhpp) int flags, mode; DB_FH **fhpp; { -#ifdef DB_WINCE - /* - * __os_openhandle API is not implemented on WinCE. - * It is not currently called from within the Berkeley DB library, - * so don't log the failure via the __db_err mechanism. - */ - return (EFAULT); -#else DB_FH *fhp; int ret, nrepeat, retries; @@ -96,7 +88,6 @@ __os_openhandle(env, name, flags, mode, fhpp) err: (void)__os_closehandle(env, fhp); return (ret); -#endif } /* @@ -136,11 +127,7 @@ __os_closehandle(env, fhp) if (fhp->handle != INVALID_HANDLE_VALUE) RETRY_CHK((!CloseHandle(fhp->handle)), ret); else -#ifdef DB_WINCE - ret = EFAULT; -#else RETRY_CHK((_close(fhp->fd)), ret); -#endif if (fhp->trunc_handle != INVALID_HANDLE_VALUE) { RETRY_CHK((!CloseHandle(fhp->trunc_handle)), t_ret); diff --git a/src/os_windows/os_map.c b/src/os_windows/os_map.c index 168914d99..3513c02a3 100644 --- a/src/os_windows/os_map.c +++ b/src/os_windows/os_map.c @@ -26,9 +26,7 @@ __os_attach(env, infop, rp) { int ret; int is_sparse; -#ifndef DB_WINCE DWORD dw; -#endif infop->fhp = NULL; /* @@ -55,7 +53,6 @@ __os_attach(env, infop, rp) } is_sparse = 0; -#ifndef DB_WINCE /* * Sparse file only works for NTFS filesystem. If we failed to set it, * just ignore the error and use the normal method. @@ -64,7 +61,6 @@ __os_attach(env, infop, rp) infop->fhp->handle, FSCTL_SET_SPARSE, NULL, 0, NULL, 0, &dw, NULL))) is_sparse = 1; -#endif /* * Map the file in. If we're creating an in-system-memory region, @@ -146,17 +142,6 @@ __os_mapfile(env, path, fhp, len, is_rdonly, addr) size_t len; void **addr; { -#ifdef DB_WINCE - /* - * Windows CE has special requirements for file mapping to work. - * * The input handle needs to be opened using CreateFileForMapping - * * Concurrent access via a non mapped file is not supported. - * So we disable support for memory mapping files on Windows CE. It is - * currently only used as an optimization in mpool for small read only - * databases. - */ - return (EFAULT); -#else DB_ENV *dbenv; dbenv = env == NULL ? NULL : env->dbenv; @@ -165,7 +150,6 @@ __os_mapfile(env, path, fhp, len, is_rdonly, addr) FLD_ISSET(dbenv->verbose, DB_VERB_FILEOPS | DB_VERB_FILEOPS_ALL)) __db_msg(env, DB_STR_A("0008", "fileops: mmap %s", "%s"), path); return (__os_map(env, path, NULL, fhp, len, 0, 0, is_rdonly, addr)); -#endif } /* @@ -296,12 +280,6 @@ __os_map(env, path, infop, fhp, len, is_region, is_system, is_rdonly, addr) * paging file namespace. */ if (use_pagefile) { -#ifdef DB_WINCE - __db_errx(env, DB_STR("0010", - "Unable to memory map regions using system " - "memory on WinCE.")); - return (EFAULT); -#endif TO_TSTRING(env, path, tpath, ret); if (ret != 0) return (ret); @@ -336,7 +314,6 @@ __os_map(env, path, infop, fhp, len, is_region, is_system, is_rdonly, addr) */ hMemory = NULL; if (use_pagefile) { -#ifndef DB_WINCE hMemory = OpenFileMapping( is_rdonly ? FILE_MAP_READ : FILE_MAP_ALL_ACCESS, 0, shmem_name); @@ -345,19 +322,10 @@ __os_map(env, path, infop, fhp, len, is_region, is_system, is_rdonly, addr) hMemory = CreateFileMapping((HANDLE)-1, 0, is_rdonly ? PAGE_READONLY : PAGE_READWRITE, (DWORD)(len64 >> 32), (DWORD)len64, shmem_name); -#endif } else { hMemory = CreateFileMapping(fhp->handle, 0, is_rdonly ? PAGE_READONLY : PAGE_READWRITE, (DWORD)(len64 >> 32), (DWORD)len64, NULL); -#ifdef DB_WINCE - /* - * WinCE automatically closes the handle passed in. - * Ensure DB does not attempt to close the handle again. - */ - fhp->handle = INVALID_HANDLE_VALUE; - F_CLR(fhp, DB_FH_OPENED); -#endif } if (hMemory == NULL) { diff --git a/src/os_windows/os_open.c b/src/os_windows/os_open.c index 59dfab201..2ba977bdc 100644 --- a/src/os_windows/os_open.c +++ b/src/os_windows/os_open.c @@ -24,11 +24,8 @@ __os_open(env, name, page_size, flags, mode, fhpp) { DB_ENV *dbenv; DB_FH *fhp; -#ifndef DB_WINCE DWORD cluster_size, sector_size, free_clusters, total_clusters; _TCHAR *drive, dbuf[4]; /* */ - -#endif int access, attr, createflag, nrepeat, ret, share; _TCHAR *tname; @@ -92,21 +89,9 @@ __os_open(env, name, page_size, flags, mode, fhpp) if (!LF_ISSET(DB_OSO_RDONLY)) access |= GENERIC_WRITE; -#ifdef DB_WINCE - /* - * WinCE translates these flags into share flags for - * CreateFileForMapping. - * Also WinCE does not support the FILE_SHARE_DELETE flag. - */ - if (LF_ISSET(DB_OSO_REGION)) - share = GENERIC_READ | GENERIC_WRITE; - else - share = FILE_SHARE_READ | FILE_SHARE_WRITE; -#else share = FILE_SHARE_READ | FILE_SHARE_WRITE; if (__os_is_winnt()) share |= FILE_SHARE_DELETE; -#endif attr = FILE_ATTRIBUTE_NORMAL; /* @@ -129,12 +114,10 @@ __os_open(env, name, page_size, flags, mode, fhpp) attr |= FILE_FLAG_WRITE_THROUGH; } -#ifndef DB_WINCE if (LF_ISSET(DB_OSO_SEQ)) attr |= FILE_FLAG_SEQUENTIAL_SCAN; else attr |= FILE_FLAG_RANDOM_ACCESS; -#endif if (LF_ISSET(DB_OSO_TEMP)) attr |= FILE_FLAG_DELETE_ON_CLOSE; @@ -144,11 +127,7 @@ __os_open(env, name, page_size, flags, mode, fhpp) * multiple of the disk's sector size. To find the sector size, * we call GetDiskFreeSpace, which expects a drive name like "d:\\" * or NULL for the current disk (i.e., a relative path). - * - * WinCE only has GetDiskFreeSpaceEx which does not - * return the sector size. */ -#ifndef DB_WINCE if (LF_ISSET(DB_OSO_DIRECT) && page_size != 0 && name[0] != '\0') { if (name[1] == ':') { drive = dbuf; @@ -165,37 +144,15 @@ __os_open(env, name, page_size, flags, mode, fhpp) page_size % sector_size == 0) attr |= FILE_FLAG_NO_BUFFERING; } -#endif fhp->handle = fhp->trunc_handle = INVALID_HANDLE_VALUE; for (nrepeat = 1;; ++nrepeat) { if (fhp->handle == INVALID_HANDLE_VALUE) { -#ifdef DB_WINCE - if (LF_ISSET(DB_OSO_REGION)) - fhp->handle = CreateFileForMapping(tname, - access, share, NULL, createflag, attr, 0); - else -#endif - fhp->handle = CreateFile(tname, + fhp->handle = CreateFile(tname, access, share, NULL, createflag, attr, 0); } #ifdef HAVE_FTRUNCATE - /* - * Older versions of WinCE may not support truncate, if so, the - * HAVE_FTRUNCATE macro should be #undef'ed, and we - * don't need to open this second handle. - * - * WinCE dose not support opening a second handle on the same - * file via CreateFileForMapping, but this dose not matter - * since we are not truncating region files but database files. - * - * But some older versions of WinCE even - * dose not allow a second handle opened via CreateFile. If - * this is the case, users will need to #undef the - * HAVE_FTRUNCATE macro in build_wince/db_config.h. - */ - /* * Windows does not provide truncate directly. There is no * safe way to use a handle for truncate concurrently with @@ -205,10 +162,6 @@ __os_open(env, name, page_size, flags, mode, fhpp) if (fhp->handle != INVALID_HANDLE_VALUE && !LF_ISSET(DB_OSO_RDONLY | DB_OSO_TEMP) && fhp->trunc_handle == INVALID_HANDLE_VALUE -#ifdef DB_WINCE - /* Do not open trunc handle for region files. */ - && (!LF_ISSET(DB_OSO_REGION)) -#endif ) fhp->trunc_handle = CreateFile( tname, access, share, NULL, OPEN_EXISTING, attr, 0); @@ -220,10 +173,6 @@ __os_open(env, name, page_size, flags, mode, fhpp) if (fhp->handle == INVALID_HANDLE_VALUE || (!LF_ISSET(DB_OSO_RDONLY | DB_OSO_TEMP) && fhp->trunc_handle == INVALID_HANDLE_VALUE -#ifdef DB_WINCE - /* Do not open trunc handle for region files. */ - && (!LF_ISSET(DB_OSO_REGION)) -#endif )) #endif { diff --git a/src/os_windows/os_rename.c b/src/os_windows/os_rename.c index e7de2a806..1ae3474da 100644 --- a/src/os_windows/os_rename.c +++ b/src/os_windows/os_rename.c @@ -47,16 +47,14 @@ __os_rename(env, oldname, newname, silent) if (__os_posix_err(ret) == EEXIST) { ret = 0; -#ifndef DB_WINCE if (__os_is_winnt()) { if (!MoveFileEx( toldname, tnewname, MOVEFILE_REPLACE_EXISTING)) ret = __os_get_syserr(); } else -#endif { /* - * There is no MoveFileEx for Win9x/Me/CE, so we have to + * There is no MoveFileEx for Win9x/Me, so we have to * do the best we can. Note that the MoveFile call * above would have succeeded if oldname and newname * refer to the same file, so we don't need to check diff --git a/src/os_windows/os_rw.c b/src/os_windows/os_rw.c index bfb489260..209daaada 100644 --- a/src/os_windows/os_rw.c +++ b/src/os_windows/os_rw.c @@ -26,7 +26,6 @@ __os_io(env, op, fhp, pgno, pgsize, relative, io_len, buf, niop) { int ret; -#ifndef DB_WINCE if (__os_is_winnt()) { DB_ENV *dbenv; DWORD nbytes; @@ -78,7 +77,6 @@ __os_io(env, op, fhp, pgno, pgsize, relative, io_len, buf, niop) } slow: -#endif MUTEX_LOCK(env, fhp->mtx_fh); if ((ret = __os_seek(env, fhp, pgno, pgsize, relative)) != 0) diff --git a/src/os_windows/os_stat.c b/src/os_windows/os_stat.c index 01f33012d..d422f1bc9 100644 --- a/src/os_windows/os_stat.c +++ b/src/os_windows/os_stat.c @@ -27,9 +27,9 @@ __os_get_cluster_size(path, psize) u_int32_t *psize; { -#if (WINVER < 0x500) || defined(DB_WINCE) +#if (WINVER < 0x500) /* - * WinCE and versions of Windows earlier than Windows NT don't have + * Versions of Windows earlier than Windows NT don't have * the APIs required to retrieve the cluster size. */ *psize = DB_DEF_IOSIZE;