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:
parent
2ebebc8356
commit
d7ff9fac45
@ -12,6 +12,8 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <storage/Path.h>
|
||||
#include <storage/Query.h>
|
||||
#include <storage/Entry.h>
|
||||
@ -21,13 +23,6 @@
|
||||
#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.
|
||||
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':
|
||||
|
Loading…
Reference in New Issue
Block a user