summaryrefslogtreecommitdiff
path: root/examples/c/ex_data_source.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/c/ex_data_source.c')
-rw-r--r--examples/c/ex_data_source.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/examples/c/ex_data_source.c b/examples/c/ex_data_source.c
index dd2b835e6ae..6ed80dfcf19 100644
--- a/examples/c/ex_data_source.c
+++ b/examples/c/ex_data_source.c
@@ -58,6 +58,17 @@ my_create(WT_DATA_SOURCE *dsrc, WT_SESSION *session,
(void)config;
{
+#if !defined(ERROR_BAD_COMMAND)
+#define ERROR_BAD_COMMAND 37
+#endif
+ /*! [WT_EXTENSION_API map_windows_error] */
+ int posix_error =
+ wt_api->map_windows_error(wt_api, session, ERROR_BAD_COMMAND);
+ /*! [WT_EXTENSION_API map_windows_error] */
+ (void)posix_error;
+ }
+
+ {
const char *msg = "string";
/*! [WT_EXTENSION_API err_printf] */
(void)wt_api->err_printf(
@@ -667,7 +678,7 @@ main(void)
(void)wt_api->msg_printf(wt_api, NULL, "configuration complete");
/*! [WT_EXTENSION_API default_session] */
- (void)conn->close(conn, NULL);
+ ret = conn->close(conn, NULL);
- return (ret);
+ return (ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}