mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 15:59:00 +08:00
51 lines
1.5 KiB
Diff
51 lines
1.5 KiB
Diff
commit 81c35ed14e07138e44b5b30f52fbc2bb26ae1fed
|
|
Author: Max Khon <fjoe@samodelkin.net>
|
|
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
|
|
|