forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[getopt-win32] Rename "extern C" macros as MS VC C++ headers use _END…
…_EXTERN_C macro (microsoft#22773)
- Loading branch information
Showing
5 changed files
with
59 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
commit 81c35ed14e07138e44b5b30f52fbc2bb26ae1fed | ||
Author: Max Khon <[email protected]> | ||
Date: Mon Jan 24 23:05:24 2022 +0700 | ||
|
||
Rename "extern C" macros as MS VC C++ headers use _END_EXTERN_C macro | ||
|
||
diff --git a/getopt.h b/getopt.h | ||
index 5ed4a46..5e33682 100644 | ||
--- a/getopt.h | ||
+++ b/getopt.h | ||
@@ -57,12 +57,12 @@ EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. | ||
|
||
// Change behavior for C\C++ | ||
#ifdef __cplusplus | ||
- #define _BEGIN_EXTERN_C extern "C" { | ||
- #define _END_EXTERN_C } | ||
+ #define _GETOPT_BEGIN_EXTERN_C extern "C" { | ||
+ #define _GETOPT_END_EXTERN_C } | ||
#define _GETOPT_THROW throw() | ||
#else | ||
- #define _BEGIN_EXTERN_C | ||
- #define _END_EXTERN_C | ||
+ #define _GETOPT_BEGIN_EXTERN_C | ||
+ #define _GETOPT_END_EXTERN_C | ||
#define _GETOPT_THROW | ||
#endif | ||
|
||
@@ -81,7 +81,7 @@ EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. | ||
#include <string.h> | ||
#include <wchar.h> | ||
|
||
-_BEGIN_EXTERN_C | ||
+_GETOPT_BEGIN_EXTERN_C | ||
|
||
extern _GETOPT_API int optind; | ||
extern _GETOPT_API int opterr; | ||
@@ -113,10 +113,10 @@ _BEGIN_EXTERN_C | ||
extern _GETOPT_API int getopt_long_w(int argc, wchar_t *const *argv, const wchar_t *options, const struct option_w *long_options, int *opt_index) _GETOPT_THROW; | ||
extern _GETOPT_API int getopt_long_only_w(int argc, wchar_t *const *argv, const wchar_t *options, const struct option_w *long_options, int *opt_index) _GETOPT_THROW; | ||
|
||
-_END_EXTERN_C | ||
+_GETOPT_END_EXTERN_C | ||
|
||
- #undef _BEGIN_EXTERN_C | ||
- #undef _END_EXTERN_C | ||
+ #undef _GETOPT_BEGIN_EXTERN_C | ||
+ #undef _GETOPT_END_EXTERN_C | ||
#undef _GETOPT_THROW | ||
#undef _GETOPT_API | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
{ | ||
"name": "getopt-win32", | ||
"version-string": "0.1", | ||
"port-version": 1, | ||
"port-version": 2, | ||
"description": "An implementation of getopt.", | ||
"homepage": "https://github.com/libimobiledevice-win32", | ||
"license": "LGPL-3.0-only", | ||
"supports": "windows" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters