Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
647c1a33
Commit
647c1a33
authored
Dec 10, 2002
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Dec 10, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gracefully degrade to getopt if getopt_long does not exist.
parent
9c627aae
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
1 deletion
+21
-1
configure
configure
+4
-0
configure.ac
configure.ac
+2
-0
config.h.in
include/config.h.in
+6
-0
wrc.c
tools/wrc/wrc.c
+9
-1
No files found.
configure
View file @
647c1a33
...
...
@@ -11554,6 +11554,7 @@ fi
for
ac_func
in
\
_lwp_create
\
_pclose
\
...
...
@@ -11570,6 +11571,7 @@ for ac_func in \
ftruncate64
\
getnetbyaddr
\
getnetbyname
\
getopt_long
\
getpagesize
\
getprotobyname
\
getprotobynumber
\
...
...
@@ -11745,6 +11747,7 @@ done
for
ac_header
in
\
arpa/inet.h
\
arpa/nameser.h
\
...
...
@@ -11752,6 +11755,7 @@ for ac_header in \
direct.h
\
elf.h
\
float.h
\
getopt.h
\
ieeefp.h
\
io.h
\
libio.h
\
...
...
configure.ac
View file @
647c1a33
...
...
@@ -932,6 +932,7 @@ AC_CHECK_FUNCS(\
ftruncate64 \
getnetbyaddr \
getnetbyname \
getopt_long \
getpagesize \
getprotobyname \
getprotobynumber \
...
...
@@ -980,6 +981,7 @@ AC_CHECK_HEADERS(\
direct.h \
elf.h \
float.h \
getopt.h \
ieeefp.h \
io.h \
libio.h \
...
...
include/config.h.in
View file @
647c1a33
...
...
@@ -134,6 +134,12 @@
/* Define to 1 if you have the `getnetbyname' function. */
#undef HAVE_GETNETBYNAME
/* Define to 1 if you have the <getopt.h> header file. */
#undef HAVE_GETOPT_H
/* Define to 1 if you have the `getopt_long' function. */
#undef HAVE_GETOPT_LONG
/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
...
...
tools/wrc/wrc.c
View file @
647c1a33
...
...
@@ -59,7 +59,9 @@
#include <assert.h>
#include <ctype.h>
#include <signal.h>
#include <getopt.h>
#ifdef HAVE_GETOPT_H
# include <getopt.h>
#endif
#include "wrc.h"
#include "utils.h"
...
...
@@ -284,6 +286,7 @@ int getopt (int argc, char *const *argv, const char *optstring);
static
void
rm_tempfile
(
void
);
static
void
segvhandler
(
int
sig
);
#ifdef HAVE_GETOPT_LONG
static
struct
option
long_options
[]
=
{
{
"input"
,
1
,
0
,
'i'
},
{
"output"
,
1
,
0
,
'o'
},
...
...
@@ -297,6 +300,7 @@ static struct option long_options[] = {
{
"version"
,
0
,
0
,
3
},
{
0
,
0
,
0
,
0
}
};
#endif
int
main
(
int
argc
,
char
*
argv
[])
{
...
...
@@ -327,7 +331,11 @@ int main(int argc,char *argv[])
strcat
(
cmdline
,
" "
);
}
#ifdef HAVE_GETOPT_LONG
while
((
optc
=
getopt_long
(
argc
,
argv
,
"a:AbB:cC:d:D:eEF:ghH:i:I:l:LmnNo:O:p:rstTVw:W"
,
long_options
,
&
opti
))
!=
EOF
)
#else
while
((
optc
=
getopt
(
argc
,
argv
,
"a:AbB:cC:d:D:eEF:ghH:i:I:l:LmnNo:O:p:rstTVw:W"
))
!=
EOF
)
#endif
{
switch
(
optc
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment