Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Unified Diff: third_party/getopt/getopt.h

Issue 1439113002: win: Compile getopt as C++ and wrap in crashpad namespace (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/getopt/README.crashpad ('k') | third_party/getopt/getopt.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/getopt/getopt.h
diff --git a/third_party/getopt/getopt.h b/third_party/getopt/getopt.h
index dea4958511911e1f36427645247357627d05ba6b..282a489e8e15422bc1de691bb617bd8eae0dcb66 100644
--- a/third_party/getopt/getopt.h
+++ b/third_party/getopt/getopt.h
@@ -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;
-
- /* 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
+/* 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);
+
+} // namespace crashpad
#endif /* GETOPT_H */
« no previous file with comments | « third_party/getopt/README.crashpad ('k') | third_party/getopt/getopt.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698