mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-17 16:43:53 +00:00
win: Compile getopt as C++ and wrap in crashpad namespace
All our Main()s are in namespace crashpad already, so this just works. R=mark@chromium.org BUG=crashpad:76 Review URL: https://codereview.chromium.org/1439113002 .
This commit is contained in:
parent
6e89d45d7d
commit
7a7d66ca89
1
third_party/getopt/README.crashpad
vendored
1
third_party/getopt/README.crashpad
vendored
@ -12,3 +12,4 @@ Local Modifications:
|
|||||||
- Minor compilation fixes applied for Windows.
|
- Minor compilation fixes applied for Windows.
|
||||||
- Add copy of copyright (Public domain) to the top of both files for Chromium's
|
- Add copy of copyright (Public domain) to the top of both files for Chromium's
|
||||||
checklicenses step.
|
checklicenses step.
|
||||||
|
- Compiled as .cc, and wrapped in namespace crashpad.
|
||||||
|
@ -99,6 +99,8 @@ gpietsch@comcast.net
|
|||||||
#include "getopt.h"
|
#include "getopt.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
namespace crashpad {
|
||||||
|
|
||||||
/* macros */
|
/* macros */
|
||||||
|
|
||||||
/* types */
|
/* types */
|
||||||
@ -415,4 +417,6 @@ getopt_long_only (int argc, char **argv, const char *shortopts,
|
|||||||
return getopt_internal (argc, argv, (char*)shortopts, (GETOPT_LONG_OPTION_T*)longopts, longind, 1);
|
return getopt_internal (argc, argv, (char*)shortopts, (GETOPT_LONG_OPTION_T*)longopts, longind, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace crashpad
|
||||||
|
|
||||||
/* end of file GETOPT.C */
|
/* end of file GETOPT.C */
|
2
third_party/getopt/getopt.gyp
vendored
2
third_party/getopt/getopt.gyp
vendored
@ -23,7 +23,7 @@
|
|||||||
'target_name': 'getopt',
|
'target_name': 'getopt',
|
||||||
'type': 'static_library',
|
'type': 'static_library',
|
||||||
'sources': [
|
'sources': [
|
||||||
'getopt.c',
|
'getopt.cc',
|
||||||
'getopt.h',
|
'getopt.h',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
26
third_party/getopt/getopt.h
vendored
26
third_party/getopt/getopt.h
vendored
@ -18,6 +18,8 @@ using it.
|
|||||||
|
|
||||||
/* types defined by this include file */
|
/* types defined by this include file */
|
||||||
|
|
||||||
|
namespace crashpad {
|
||||||
|
|
||||||
/* GETOPT_LONG_OPTION_T: The type of long option */
|
/* GETOPT_LONG_OPTION_T: The type of long option */
|
||||||
typedef struct GETOPT_LONG_OPTION_T
|
typedef struct GETOPT_LONG_OPTION_T
|
||||||
{
|
{
|
||||||
@ -35,11 +37,6 @@ typedef struct GETOPT_LONG_OPTION_T
|
|||||||
|
|
||||||
typedef GETOPT_LONG_OPTION_T option;
|
typedef GETOPT_LONG_OPTION_T option;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* externally-defined variables */
|
/* externally-defined variables */
|
||||||
extern char *optarg;
|
extern char *optarg;
|
||||||
extern int optind;
|
extern int optind;
|
||||||
@ -48,15 +45,18 @@ extern "C"
|
|||||||
|
|
||||||
/* function prototypes */
|
/* function prototypes */
|
||||||
int getopt(int argc, char** argv, char* optstring);
|
int getopt(int argc, char** argv, char* optstring);
|
||||||
int getopt_long (int argc, char **argv, const char *shortopts,
|
int getopt_long(int argc,
|
||||||
const GETOPT_LONG_OPTION_T * longopts, int *longind);
|
char** argv,
|
||||||
int getopt_long_only (int argc, char **argv, const char *shortopts,
|
const char* shortopts,
|
||||||
const GETOPT_LONG_OPTION_T * longopts, int *longind);
|
const GETOPT_LONG_OPTION_T* longopts,
|
||||||
|
int* longind);
|
||||||
|
int getopt_long_only(int argc,
|
||||||
|
char** argv,
|
||||||
|
const char* shortopts,
|
||||||
|
const GETOPT_LONG_OPTION_T* longopts,
|
||||||
|
int* longind);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
} // namespace crashpad
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* GETOPT_H */
|
#endif /* GETOPT_H */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user