commit | ef2bc8787c6b12bd69dc45dd38ab2f1eb2673778 | [log] [tgz] |
---|---|---|
author | Eli Friedman <eli.friedman@gmail.com> | Sun Jun 13 19:18:49 2010 +0000 |
committer | Eli Friedman <eli.friedman@gmail.com> | Sun Jun 13 19:18:49 2010 +0000 |
tree | d24186ac18a1b717e03d0bbadd3b918c468e4abd | |
parent | f05633b35544b5d095feb05680c8728be087e441 [diff] [blame] |
Make getopt() use portable to Linux. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105922 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/driver/Driver.cpp b/tools/driver/Driver.cpp index 0ae5187..6b0beb7 100644 --- a/tools/driver/Driver.cpp +++ b/tools/driver/Driver.cpp
@@ -349,9 +349,12 @@ } // Prepare for & make calls to getopt_long. - +#if __GLIBC__ + optind = 0; +#else optreset = 1; optind = 1; +#endif int val; while (1) {