getopt() is already defined in unistd.h
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9100 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -12,6 +12,8 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <storage/Path.h>
|
#include <storage/Path.h>
|
||||||
#include <storage/Query.h>
|
#include <storage/Query.h>
|
||||||
#include <storage/Entry.h>
|
#include <storage/Entry.h>
|
||||||
@@ -21,13 +23,6 @@
|
|||||||
#include <support/String.h>
|
#include <support/String.h>
|
||||||
|
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
// ToDo: include the correct header
|
|
||||||
int32 getopt(int32, const char **, const char *);
|
|
||||||
extern char *optarg;
|
|
||||||
extern int32 optind;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Option variables.
|
// Option variables.
|
||||||
bool o_all_volumes = false; // Query all volumes?
|
bool o_all_volumes = false; // Query all volumes?
|
||||||
bool o_escaping = true; // Escape metacharacters?
|
bool o_escaping = true; // Escape metacharacters?
|
||||||
@@ -89,7 +84,7 @@ main(int32 argc, const char **argv)
|
|||||||
strcpy(volumePath, ".");
|
strcpy(volumePath, ".");
|
||||||
|
|
||||||
// Parse command-line arguments.
|
// Parse command-line arguments.
|
||||||
int32 opt;
|
int opt;
|
||||||
while ((opt = getopt(argc, argv, "eav:")) != -1) {
|
while ((opt = getopt(argc, argv, "eav:")) != -1) {
|
||||||
switch(opt) {
|
switch(opt) {
|
||||||
case 'a':
|
case 'a':
|
||||||
|
|||||||
Reference in New Issue
Block a user