[llvm-commits] CVS: llvm-test/MultiSource/Applications/kimwitu++/main.cc
John Criswell
criswell at cs.uiuc.edu
Mon Sep 13 11:57:01 PDT 2004
Changes in directory llvm-test/MultiSource/Applications/kimwitu++:
main.cc updated: 1.2 -> 1.3
---
Log message:
Removed the long options.
Don't use getopt.h. Instead, just use stdlib.h and unistd.h, as getopt()
is usually defined in one of those header files, and most systems provide
both.
---
Diffs of the changes: (+13 -1)
Index: llvm-test/MultiSource/Applications/kimwitu++/main.cc
diff -u llvm-test/MultiSource/Applications/kimwitu++/main.cc:1.2 llvm-test/MultiSource/Applications/kimwitu++/main.cc:1.3
--- llvm-test/MultiSource/Applications/kimwitu++/main.cc:1.2 Fri Sep 10 15:04:11 2004
+++ llvm-test/MultiSource/Applications/kimwitu++/main.cc Mon Sep 13 13:56:48 2004
@@ -39,7 +39,7 @@
#ifndef RCSMAKEID
# define RCSMAKEID "@(#) Makefile version unknown"
#endif
-static char kimwc_cAccesSid[] = "@(#)$Id: main.cc,v 1.2 2004/09/10 20:04:11 criswell Exp $";
+static char kimwc_cAccesSid[] = "@(#)$Id: main.cc,v 1.3 2004/09/13 18:56:48 criswell Exp $";
static char kimwitu_release[] = KIMWITURELEASE; // defined in Makefile
static char kimwitu_version[] = KIMWITUVERSIONSTRING; // defined in Makefile
static char Makefile_AccesSid[] = RCSMAKEID; // defined in Makefile
@@ -83,7 +83,13 @@
#include <vector>
using std::string;
+/* LLVM: Remove long option support for compatibility with other platforms */
+#if 0
#include "getopt.h"
+#else
+#include <stdlib.h>
+#include <unistd.h>
+#endif
extern int yyparse(void);
extern void yyrestart(FILE*);
@@ -265,6 +271,11 @@
g_progname = mkcasestring(get_basename(argv[0]));
enum { O_stdafx = 1, O_commment_line, O_dir_line, O_rw_loop, O_operator_cast };
+
+/*
+ * LLVM: Removed for portability with other platforms.
+ */
+#if 0
static struct option const long_options[] = {
{"no-csgio", no_argument, 0, 'c'},
{"no-rewrite", no_argument, 0, 'r'},
@@ -295,6 +306,7 @@
{"version", no_argument, 0, 'V'},
{0, 0, 0, 0}
};
+#endif
int c;
while ((c = getopt (argc, argv,
More information about the llvm-commits
mailing list