-
Notifications
You must be signed in to change notification settings - Fork 457
CDRIVER-6085 Reorder + annotate include directives with "IWYU pragma: export" #2167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
739d320
c46a1e2
7832c51
545b141
0e747db
abadc65
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,8 +28,8 @@ | |
| #endif | ||
| #endif | ||
|
|
||
| #include <bson/config.h> | ||
| #include <bson/macros.h> | ||
| #include <bson/config.h> // IWYU pragma: export | ||
| #include <bson/macros.h> // IWYU pragma: export | ||
|
|
||
|
|
||
| #ifdef BSON_OS_WIN32 | ||
|
|
@@ -42,36 +42,37 @@ | |
| #ifndef NOMINMAX | ||
| #define NOMINMAX | ||
| #endif | ||
| #include <winsock2.h> | ||
| #include <winsock2.h> // IWYU pragma: export | ||
| #ifndef WIN32_LEAN_AND_MEAN | ||
| #define WIN32_LEAN_AND_MEAN | ||
| #include <windows.h> | ||
| #include <windows.h> // IWYU pragma: export | ||
| #undef WIN32_LEAN_AND_MEAN | ||
| #else | ||
| #include <windows.h> | ||
| #include <windows.h> // IWYU pragma: export | ||
| #endif | ||
| #include <direct.h> | ||
| #include <io.h> | ||
| #include <direct.h> // IWYU pragma: export | ||
| #include <io.h> // IWYU pragma: export | ||
| #endif | ||
|
|
||
|
|
||
| #ifdef BSON_OS_UNIX | ||
| #include <sys/time.h> | ||
| #include <unistd.h> | ||
| #include <sys/time.h> // IWYU pragma: export | ||
| #include <sys/types.h> // IWYU pragma: export | ||
| #include <unistd.h> // IWYU pragma: export | ||
| #endif | ||
|
|
||
|
|
||
| #include <bson/macros.h> | ||
|
|
||
| #include <fcntl.h> | ||
| #include <sys/stat.h> | ||
| #include <fcntl.h> // IWYU pragma: export | ||
| #include <sys/stat.h> // IWYU pragma: export | ||
|
|
||
| #include <ctype.h> | ||
|
||
| #include <errno.h> | ||
| #include <limits.h> | ||
| #include <stdarg.h> | ||
| #include <stdbool.h> | ||
| #include <stdint.h> | ||
| #include <limits.h> // IWYU pragma: export | ||
| #include <stdarg.h> // IWYU pragma: export | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove unneeded export pragma? Later code references #if !defined(va_copy) && defined(__va_copy)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As a compatibility header, this header conditionally provides |
||
| #include <stdbool.h> // IWYU pragma: export | ||
| #include <stdint.h> // IWYU pragma: export | ||
| #include <stdio.h> | ||
| #include <stdlib.h> | ||
| #include <string.h> | ||
|
|
@@ -81,7 +82,7 @@ | |
| BSON_BEGIN_DECLS | ||
|
|
||
| #if !defined(_MSC_VER) || (_MSC_VER >= 1800) | ||
| #include <inttypes.h> | ||
| #include <inttypes.h> // IWYU pragma: export | ||
| #endif | ||
| #ifdef _MSC_VER | ||
| #ifndef __cplusplus | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest removing export, since I do not think
bson-private.his the direct private analog tobson.h.Since
bson-private.hdefines the implementation types ofbson_t, I would rather rename tobson_t-private.h.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Changed the component header to
<bson/bson_t.h>and renamed it tobson_t-private.haccordingly.