Skip to content

Commit 00fde82

Browse files
committed
CDRIVER-2719 omit example-resume on windows
1 parent 6de3f7f commit 00fde82

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/libmongoc/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,9 @@ endif ()
796796
# examples/
797797
mongoc_add_example (example-client TRUE ${PROJECT_SOURCE_DIR}/examples/example-client.c)
798798
mongoc_add_example (example-collection-watch TRUE ${PROJECT_SOURCE_DIR}/examples/example-collection-watch.c)
799-
mongoc_add_example (example-resume TRUE ${PROJECT_SOURCE_DIR}/examples/example-resume.c)
799+
if (NOT WIN32)
800+
mongoc_add_example (example-resume TRUE ${PROJECT_SOURCE_DIR}/examples/example-resume.c)
801+
endif()
800802
mongoc_add_example (example-start-at-optime TRUE ${PROJECT_SOURCE_DIR}/examples/example-start-at-optime.c)
801803
mongoc_add_example (example-command-monitoring TRUE ${PROJECT_SOURCE_DIR}/examples/example-command-monitoring.c)
802804
mongoc_add_example (example-command-with-opts TRUE ${PROJECT_SOURCE_DIR}/examples/example-command-with-opts.c)

src/libmongoc/examples/example-resume.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include <mongoc.h>
22

3-
#ifndef _WIN32
43
/* An example implementation of custom resume logic in a change stream.
54
* example-resume starts a client-wide change stream and persists the resume
65
* token in a file "resume-token.json". On restart, if "resume-token.json"
@@ -160,9 +159,3 @@ main ()
160159
mongoc_cleanup ();
161160
return exit_code;
162161
}
163-
#else
164-
int main() {
165-
printf("example-resume is not implemented on Windows.\n");
166-
return 1;
167-
}
168-
#endif

0 commit comments

Comments
 (0)