mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-27 15:32:10 +08: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.
|
||||
- Add copy of copyright (Public domain) to the top of both files for Chromium's
|
||||
checklicenses step.
|
||||
- Compiled as .cc, and wrapped in namespace crashpad.
|
||||
|
@ -99,6 +99,8 @@ gpietsch@comcast.net
|
||||
#include "getopt.h"
|
||||
#endif
|
||||
|
||||
namespace crashpad {
|
||||
|
||||
/* macros */
|
||||
|
||||
/* 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);
|
||||
}
|
||||
|
||||
} // namespace crashpad
|
||||
|
||||
/* 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',
|
||||
'type': 'static_library',
|
||||
'sources': [
|
||||
'getopt.c',
|
||||
'getopt.cc',
|
||||
'getopt.h',
|
||||
],
|
||||
},
|
||||
|
40
third_party/getopt/getopt.h
vendored
40
third_party/getopt/getopt.h
vendored
@ -18,6 +18,8 @@ using it.
|
||||
|
||||
/* types defined by this include file */
|
||||
|
||||
namespace crashpad {
|
||||
|
||||
/* GETOPT_LONG_OPTION_T: The type of long option */
|
||||
typedef struct GETOPT_LONG_OPTION_T
|
||||
{
|
||||
@ -35,28 +37,26 @@ typedef struct GETOPT_LONG_OPTION_T
|
||||
|
||||
typedef GETOPT_LONG_OPTION_T option;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
/* externally-defined variables */
|
||||
extern char *optarg;
|
||||
extern int optind;
|
||||
extern int opterr;
|
||||
extern int optopt;
|
||||
|
||||
/* externally-defined variables */
|
||||
extern char *optarg;
|
||||
extern int optind;
|
||||
extern int opterr;
|
||||
extern int optopt;
|
||||
/* function prototypes */
|
||||
int getopt(int argc, char** argv, char* optstring);
|
||||
int getopt_long(int argc,
|
||||
char** argv,
|
||||
const char* shortopts,
|
||||
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);
|
||||
|
||||
/* function prototypes */
|
||||
int getopt (int argc, char **argv, char *optstring);
|
||||
int getopt_long (int argc, char **argv, const char *shortopts,
|
||||
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
|
||||
};
|
||||
|
||||
#endif
|
||||
} // namespace crashpad
|
||||
|
||||
#endif /* GETOPT_H */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user