diff options
author | Chris Wilson <chris+github@qwirx.com> | 2013-09-30 08:28:58 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2013-09-30 08:28:58 +0000 |
commit | dae6303135c66acdd0e4f3985c6e5c95334aea7f (patch) | |
tree | 173acec5f3e34ef870f4e283c7403e10b097cd0e /infrastructure | |
parent | caa198fee3d6a9df3d2fbed4923b4b8ad554c706 (diff) |
Fix getopt header confusion.
Our copy of getopt.h in lib/win32 was beating the system getopt.h in the
search path, and providing different definitions, which clang picked up.
Renamed our getopt.h to bsd_getopt.h, and added a box_getopt.h to decide
whether to include this one instead of the system getopt.h.
Diffstat (limited to 'infrastructure')
-rw-r--r-- | infrastructure/buildenv-testmain-template.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/infrastructure/buildenv-testmain-template.cpp b/infrastructure/buildenv-testmain-template.cpp index e5b1360d..933c3608 100644 --- a/infrastructure/buildenv-testmain-template.cpp +++ b/infrastructure/buildenv-testmain-template.cpp @@ -25,10 +25,6 @@ #include <stdio.h> #include <unistd.h> -#ifdef HAVE_GETOPT_H - #include <getopt.h> -#endif - #ifdef HAVE_SYS_SOCKET_H # include <sys/socket.h> #endif @@ -43,6 +39,7 @@ #include <exception> #include <string> +#include "box_getopt.h" #include "Logging.h" #include "Test.h" #include "Timer.h" @@ -231,7 +228,6 @@ int main(int argc, char * const * argv) Logging::SetProgramName(BOX_MODULE); -#ifdef HAVE_GETOPT_H #ifdef BOX_RELEASE_BUILD int logLevel = Log::NOTICE; // need an int to do math with #else @@ -372,7 +368,6 @@ int main(int argc, char * const * argv) argc -= optind - 1; argv += optind - 1; -#endif // HAVE_GETOPT_H // If there is more than one argument, then the test is doing something advanced, so leave it alone bool fulltestmode = (argc == 1); |