From d7ff9fac45c43362e76d13c55f0e094b311e859b Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Wed, 29 Sep 2004 07:59:55 +0000 Subject: [PATCH] getopt() is already defined in unistd.h git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9100 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/bin/query.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/apps/bin/query.cpp b/src/apps/bin/query.cpp index c4356d492f..f97c9288b8 100644 --- a/src/apps/bin/query.cpp +++ b/src/apps/bin/query.cpp @@ -12,6 +12,8 @@ #include #include #include +#include + #include #include #include @@ -21,13 +23,6 @@ #include -extern "C" { - // ToDo: include the correct header - int32 getopt(int32, const char **, const char *); - extern char *optarg; - extern int32 optind; -} - // Option variables. bool o_all_volumes = false; // Query all volumes? bool o_escaping = true; // Escape metacharacters? @@ -89,7 +84,7 @@ main(int32 argc, const char **argv) strcpy(volumePath, "."); // Parse command-line arguments. - int32 opt; + int opt; while ((opt = getopt(argc, argv, "eav:")) != -1) { switch(opt) { case 'a':