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
3755de85
Commit
3755de85
authored
Feb 24, 2003
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* configure.ac.in, modules/misc/httpd.c: compilation fixes for win32.
parent
7def7049
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
15 deletions
+35
-15
configure.ac.in
configure.ac.in
+8
-8
modules/misc/httpd.c
modules/misc/httpd.c
+27
-7
No files found.
configure.ac.in
View file @
3755de85
...
...
@@ -130,7 +130,7 @@ case "x${target_os}" in
LDFLAGS_access_ftp="${LDFLAGS_access_ftp} -lws2_32"
LDFLAGS_access_output_udp="${LDFLAGS_access_output_udp} -lws2_32"
LDFLAGS_sap="${LDFLAGS_sap} -lws2_32"
LDF
AL
GS_httpd="${LDFLAGS_httpd} -lws2_32"
LDF
LA
GS_httpd="${LDFLAGS_httpd} -lws2_32"
fi
;;
x*nto*)
...
...
@@ -1739,22 +1739,22 @@ AC_ARG_ENABLE(dv,
[ --enable-dv DV decoder support (default disabled)])
if test "x${enable_dv}" = "xyes"
then
AC_CHECK_HEADERS(
FLAC/stream_decoder
.h, [
PLUGINS="${PLUGINS}
flac flacdec
"
LDFLAGS_
flacdec="${LDFLAGS_flacdec} -lFLAC
"
AC_CHECK_HEADERS(
libdv/dv
.h, [
PLUGINS="${PLUGINS}
dv
"
LDFLAGS_
dv="${LDFLAGS_dv} -ldv
"
],[])
fi
dnl
dnl
DV
plugin
dnl
Flac
plugin
dnl
AC_ARG_ENABLE(flac,
[ --enable-falc flac decoder support (default disabled)])
if test "x${enable_flac}" = "xyes"
then
AC_CHECK_HEADERS(
libdv/dv
.h, [
PLUGINS="${PLUGINS}
dv
"
LDFLAGS_
dv="${LDFLAGS_dv} -ldv
"
AC_CHECK_HEADERS(
FLAC/stream_decoder
.h, [
PLUGINS="${PLUGINS}
flac flacdec
"
LDFLAGS_
flacdec="${LDFLAGS_flacdec} -lFLAC
"
],[])
fi
...
...
modules/misc/httpd.c
View file @
3755de85
...
...
@@ -2,7 +2,7 @@
* httpd.c
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: httpd.c,v 1.
1 2003/02/23 19:05:22 fenrir
Exp $
* $Id: httpd.c,v 1.
2 2003/02/24 11:14:16 gbazin
Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -73,9 +73,9 @@
#define FREE( p ) if( p ) { free( p); (p) = NULL; }
#if defined( WIN32 ) || defined( UNDER_CE )
#define SOCKET_CLOSE
closesocket;
#define SOCKET_CLOSE
(a) closesocket(a)
#else
#define SOCKET_CLOSE
close
#define SOCKET_CLOSE
(a) close(a)
#endif
/*****************************************************************************
...
...
@@ -389,14 +389,16 @@ static int BuildAddr( struct sockaddr_in * p_socket,
* listen on a host for a httpd instance
*/
static
httpd_host_t
*
_RegisterHost
(
httpd_sys_t
*
p_httpt
,
char
*
psz_host_addr
,
int
i_port
)
static
httpd_host_t
*
_RegisterHost
(
httpd_sys_t
*
p_httpt
,
char
*
psz_host_addr
,
int
i_port
)
{
httpd_host_t
*
p_host
;
struct
sockaddr_in
sock
;
int
i
;
int
fd
=
-
1
;
int
i_opt
;
#if !defined( WIN32 ) && !defined( UNDER_CE )
int
i_flags
;
#endif
if
(
BuildAddr
(
&
sock
,
psz_host_addr
,
i_port
)
)
{
...
...
@@ -440,12 +442,22 @@ static httpd_host_t *_RegisterHost( httpd_sys_t *p_httpt, char *psz_host_add
msg_Warn
(
p_httpt
,
"cannot configure socket (SO_REUSEADDR)"
);
}
/* bind it */
if
(
bind
(
fd
,
&
sock
,
sizeof
(
struct
sockaddr_in
)
)
<
0
)
if
(
bind
(
fd
,
(
struct
sockaddr
*
)
&
sock
,
sizeof
(
struct
sockaddr_in
)
)
<
0
)
{
msg_Err
(
p_httpt
,
"cannot bind socket"
);
goto
socket_failed
;
}
/* set to non-blocking */
#if defined( WIN32 ) || defined( UNDER_CE )
{
unsigned
long
i_dummy
=
1
;
if
(
ioctlsocket
(
fd
,
FIONBIO
,
&
i_dummy
)
!=
0
)
{
msg_Err
(
p_httpt
,
"cannot set socket to non-blocking mode"
);
goto
socket_failed
;
}
}
#else
if
(
(
i_flags
=
fcntl
(
fd
,
F_GETFL
,
0
)
)
<
0
)
{
msg_Err
(
p_httpt
,
"cannot F_GETFL socket"
);
...
...
@@ -456,6 +468,7 @@ static httpd_host_t *_RegisterHost( httpd_sys_t *p_httpt, char *psz_host_add
msg_Err
(
p_httpt
,
"cannot F_SETFL O_NONBLOCK"
);
goto
socket_failed
;
}
#endif
/* listen */
if
(
listen
(
fd
,
LISTEN_BACKLOG
)
<
0
)
{
...
...
@@ -1357,10 +1370,18 @@ static void httpd_Thread( httpd_sys_t *p_httpt )
struct
sockaddr_in
sock
;
int
fd
;
fd
=
accept
(
p_httpt
->
host
[
i
]
->
fd
,
&
sock
,
&
i_sock_size
);
fd
=
accept
(
p_httpt
->
host
[
i
]
->
fd
,
(
struct
sockaddr
*
)
&
sock
,
&
i_sock_size
);
if
(
fd
>
0
)
{
#if defined( WIN32 ) || defined( UNDER_CE )
{
unsigned
long
i_dummy
=
1
;
ioctlsocket
(
fd
,
FIONBIO
,
&
i_dummy
);
}
#else
fcntl
(
fd
,
F_SETFL
,
O_NONBLOCK
);
#endif
if
(
p_httpt
->
i_connection_count
>=
HTTPD_MAX_CONNECTION
)
{
...
...
@@ -1542,4 +1563,3 @@ static void httpd_Thread( httpd_sys_t *p_httpt )
_UnregisterFile
(
p_httpt
,
p_page_404
);
_UnregisterFile
(
p_httpt
,
p_page_admin
);
}
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