Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
b3a59c07
Commit
b3a59c07
authored
Feb 28, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always build and use "our" getopt
(We still need -lgnugetopt for cachegen)
parent
880c1d98
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
43 deletions
+17
-43
bin/Makefile.am
bin/Makefile.am
+1
-0
configure.ac
configure.ac
+8
-13
src/Makefile.am
src/Makefile.am
+3
-11
src/config/cmdline.c
src/config/cmdline.c
+2
-8
src/extras/getopt.c
src/extras/getopt.c
+0
-4
src/extras/getopt.h
src/extras/getopt.h
+2
-2
src/extras/getopt1.c
src/extras/getopt1.c
+1
-5
No files found.
bin/Makefile.am
View file @
b3a59c07
...
@@ -57,5 +57,6 @@ vlc_win32_rc.$(OBJEXT): vlc_win32_rc.rc
...
@@ -57,5 +57,6 @@ vlc_win32_rc.$(OBJEXT): vlc_win32_rc.rc
vlc_cache_gen_SOURCES
=
cachegen.c
vlc_cache_gen_SOURCES
=
cachegen.c
vlc_cache_gen_LDADD
=
\
vlc_cache_gen_LDADD
=
\
$(GNUGETOPT_LIBS)
\
../compat/libcompat.la
\
../compat/libcompat.la
\
../src/libvlc.la ../src/libvlccore.la
../src/libvlc.la ../src/libvlccore.la
configure.ac
View file @
b3a59c07
...
@@ -646,19 +646,14 @@ AC_CHECK_FUNCS(inet_aton,,[
...
@@ -646,19 +646,14 @@ AC_CHECK_FUNCS(inet_aton,,[
])
])
])
])
dnl Check for getopt (always use builtin one on win32)
dnl FreeBSD has a gnugetopt library for this:
if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"; then
GNUGETOPT_LIBS=""
need_getopt=:
AC_CHECK_FUNC(getopt_long,, [
else
AC_CHECK_LIB([gnugetopt],[getopt_long], [
need_getopt=false
GNUGETOPT_LIBS="-lgnugetopt"
AC_CHECK_FUNCS(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
])
[ # FreeBSD has a gnugetopt library for this:
])
AC_CHECK_LIB([gnugetopt],[getopt_long],
AC_SUBST(GNUGETOPT_LIBS)
[AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support)
VLC_ADD_LIBS([libvlccore],[-lgnugetopt])],
[need_getopt=:])])
fi
AM_CONDITIONAL(BUILD_GETOPT, ${need_getopt})
if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
AC_CHECK_LIB(m,cos,[
AC_CHECK_LIB(m,cos,[
...
...
src/Makefile.am
View file @
b3a59c07
...
@@ -228,7 +228,6 @@ EXTRA_libvlccore_la_SOURCES = \
...
@@ -228,7 +228,6 @@ EXTRA_libvlccore_la_SOURCES = \
$(SOURCES_libvlc_win32)
\
$(SOURCES_libvlc_win32)
\
$(SOURCES_libvlc_other)
\
$(SOURCES_libvlc_other)
\
$(SOURCES_libvlc_dirent)
\
$(SOURCES_libvlc_dirent)
\
$(SOURCES_libvlc_getopt)
\
$(SOURCES_libvlc_httpd)
\
$(SOURCES_libvlc_httpd)
\
$(SOURCES_libvlc_sout)
\
$(SOURCES_libvlc_sout)
\
$(SOURCES_libvlc_vlm)
\
$(SOURCES_libvlc_vlm)
\
...
@@ -257,9 +256,6 @@ endif
...
@@ -257,9 +256,6 @@ endif
if
BUILD_DIRENT
if
BUILD_DIRENT
libvlccore_la_SOURCES
+=
$(SOURCES_libvlc_dirent)
libvlccore_la_SOURCES
+=
$(SOURCES_libvlc_dirent)
endif
endif
if
BUILD_GETOPT
libvlccore_la_SOURCES
+=
$(SOURCES_libvlc_getopt)
endif
if
BUILD_HTTPD
if
BUILD_HTTPD
libvlccore_la_SOURCES
+=
$(SOURCES_libvlc_httpd)
libvlccore_la_SOURCES
+=
$(SOURCES_libvlc_httpd)
endif
endif
...
@@ -302,12 +298,6 @@ SOURCES_libvlc_dirent = \
...
@@ -302,12 +298,6 @@ SOURCES_libvlc_dirent = \
extras/dirent.c
\
extras/dirent.c
\
$(NULL)
$(NULL)
SOURCES_libvlc_getopt
=
\
extras/getopt.c
\
extras/getopt.h
\
extras/getopt1.c
\
$(NULL)
SOURCES_libvlc_common
=
\
SOURCES_libvlc_common
=
\
libvlc.c
\
libvlc.c
\
libvlc.h
\
libvlc.h
\
...
@@ -456,6 +446,9 @@ SOURCES_libvlc_common = \
...
@@ -456,6 +446,9 @@ SOURCES_libvlc_common = \
misc/filter_chain.c
\
misc/filter_chain.c
\
misc/http_auth.c
\
misc/http_auth.c
\
misc/sql.c
\
misc/sql.c
\
extras/getopt.c
\
extras/getopt.h
\
extras/getopt1.c
\
$(NULL)
$(NULL)
SOURCES_libvlc_httpd
=
\
SOURCES_libvlc_httpd
=
\
...
@@ -482,7 +475,6 @@ SOURCES_libvlc = \
...
@@ -482,7 +475,6 @@ SOURCES_libvlc = \
$(OPT_SOURCES_libvlc_darwin)
\
$(OPT_SOURCES_libvlc_darwin)
\
$(OPT_SOURCES_libvlc_win32)
\
$(OPT_SOURCES_libvlc_win32)
\
$(OPT_SOURCES_libvlc_dirent)
\
$(OPT_SOURCES_libvlc_dirent)
\
$(OPT_SOURCES_libvlc_getopt)
\
$(NULL)
$(NULL)
SOURCES_libvlc_control
=
\
SOURCES_libvlc_control
=
\
...
...
src/config/cmdline.c
View file @
b3a59c07
...
@@ -30,13 +30,7 @@
...
@@ -30,13 +30,7 @@
#include <vlc_keys.h>
#include <vlc_keys.h>
#include <vlc_charset.h>
#include <vlc_charset.h>
#ifdef HAVE_GETOPT_LONG
#include "../extras/getopt.h"
# ifdef HAVE_GETOPT_H
# include <getopt.h>
/* getopt() */
# endif
#else
# include "../extras/getopt.h"
#endif
#include "configuration.h"
#include "configuration.h"
#include "modules/modules.h"
#include "modules/modules.h"
...
@@ -219,7 +213,7 @@ int config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc,
...
@@ -219,7 +213,7 @@ int config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc,
*/
*/
opterr
=
0
;
opterr
=
0
;
optind
=
0
;
/* set to 0 to tell GNU getopt to reinitialize */
optind
=
0
;
/* set to 0 to tell GNU getopt to reinitialize */
while
(
(
i_cmd
=
getopt_long
(
*
pi_argc
,
(
char
**
)
ppsz_argv
,
psz_shortopts
,
while
(
(
i_cmd
=
vlc_
getopt_long
(
*
pi_argc
,
(
char
**
)
ppsz_argv
,
psz_shortopts
,
p_longopts
,
&
i_index
)
)
!=
-
1
)
p_longopts
,
&
i_index
)
)
!=
-
1
)
{
{
/* A long option has been recognized */
/* A long option has been recognized */
...
...
src/extras/getopt.c
View file @
b3a59c07
...
@@ -61,8 +61,6 @@
...
@@ -61,8 +61,6 @@
#endif
#endif
#endif
#endif
#ifndef ELIDE_CODE
/* This needs to come after some library #include
/* This needs to come after some library #include
to get __GNU_LIBRARY__ defined. */
to get __GNU_LIBRARY__ defined. */
#ifdef __GNU_LIBRARY__
#ifdef __GNU_LIBRARY__
...
@@ -937,8 +935,6 @@ int
...
@@ -937,8 +935,6 @@ int
(
int
*
)
0
,
(
int
*
)
0
,
0
);
0
);
}
}
#endif
/* Not ELIDE_CODE. */
#ifdef TEST
#ifdef TEST
...
...
src/extras/getopt.h
View file @
b3a59c07
...
@@ -108,7 +108,7 @@ extern "C"
...
@@ -108,7 +108,7 @@ extern "C"
#else
/* not __GNU_LIBRARY__ */
#else
/* not __GNU_LIBRARY__ */
extern
int
getopt
();
extern
int
getopt
();
#endif
/* __GNU_LIBRARY__ */
#endif
/* __GNU_LIBRARY__ */
extern
int
getopt_long
(
int
argc
,
char
*
const
*
argv
,
const
char
*
shortopts
,
extern
int
vlc_
getopt_long
(
int
argc
,
char
*
const
*
argv
,
const
char
*
shortopts
,
const
struct
option
*
longopts
,
int
*
longind
);
const
struct
option
*
longopts
,
int
*
longind
);
extern
int
getopt_long_only
(
int
argc
,
char
*
const
*
argv
,
extern
int
getopt_long_only
(
int
argc
,
char
*
const
*
argv
,
const
char
*
shortopts
,
const
char
*
shortopts
,
...
@@ -121,7 +121,7 @@ extern "C"
...
@@ -121,7 +121,7 @@ extern "C"
int
long_only
);
int
long_only
);
#else
/* not __STDC__ */
#else
/* not __STDC__ */
extern
int
getopt
();
extern
int
getopt
();
extern
int
getopt_long
();
extern
int
vlc_
getopt_long
();
extern
int
getopt_long_only
();
extern
int
getopt_long_only
();
extern
int
_getopt_internal
();
extern
int
_getopt_internal
();
...
...
src/extras/getopt1.c
View file @
b3a59c07
...
@@ -51,8 +51,6 @@
...
@@ -51,8 +51,6 @@
#endif
#endif
#endif
#endif
#ifndef ELIDE_CODE
/* This needs to come after some library #include
/* This needs to come after some library #include
to get __GNU_LIBRARY__ defined. */
to get __GNU_LIBRARY__ defined. */
#ifdef __GNU_LIBRARY__
#ifdef __GNU_LIBRARY__
...
@@ -64,7 +62,7 @@
...
@@ -64,7 +62,7 @@
#endif
#endif
int
int
getopt_long
(
argc
,
argv
,
options
,
long_options
,
opt_index
)
vlc_
getopt_long
(
argc
,
argv
,
options
,
long_options
,
opt_index
)
int
argc
;
int
argc
;
char
*
const
*
argv
;
char
*
const
*
argv
;
const
char
*
options
;
const
char
*
options
;
...
@@ -89,8 +87,6 @@ int
...
@@ -89,8 +87,6 @@ int
{
{
return
_getopt_internal
(
argc
,
argv
,
options
,
long_options
,
opt_index
,
1
);
return
_getopt_internal
(
argc
,
argv
,
options
,
long_options
,
opt_index
,
1
);
}
}
#endif
/* Not ELIDE_CODE. */
#ifdef TEST
#ifdef TEST
...
...
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