Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
cc0c26f4
Commit
cc0c26f4
authored
Jul 19, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/control/http.c: portability fix.
parent
491ca220
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
modules/control/http.c
modules/control/http.c
+9
-6
No files found.
modules/control/http.c
View file @
cc0c26f4
...
...
@@ -61,6 +61,11 @@
# include <dirent.h>
#endif
/* stat() support for large files on win32 */
#if defined( WIN32 ) && !defined( UNDER_CE )
# define stat _stati64
#endif
/*****************************************************************************
* Module descriptor
*****************************************************************************/
...
...
@@ -1045,7 +1050,8 @@ static mvar_t *mvar_FileSetNew( char *name, char *psz_dir )
}
/* remove traling / or \ */
for
(
p
=
&
psz_dir
[
strlen
(
psz_dir
)
-
1
];
p
>=
psz_dir
&&
(
*
p
==
'/'
||
*
p
==
'\\'
);
p
--
)
for
(
p
=
&
psz_dir
[
strlen
(
psz_dir
)
-
1
];
p
>=
psz_dir
&&
(
*
p
==
'/'
||
*
p
==
'\\'
);
p
--
)
{
*
p
=
'\0'
;
}
...
...
@@ -1064,11 +1070,7 @@ static mvar_t *mvar_FileSetNew( char *name, char *psz_dir )
continue
;
}
#if defined( WIN32 )
sprintf
(
tmp
,
"%s
\\
%s"
,
psz_dir
,
p_dir_content
->
d_name
);
#else
sprintf
(
tmp
,
"%s/%s"
,
psz_dir
,
p_dir_content
->
d_name
);
#endif
#ifdef HAVE_SYS_STAT_H
if
(
stat
(
tmp
,
&
stat_info
)
==
-
1
)
...
...
@@ -1078,6 +1080,7 @@ static mvar_t *mvar_FileSetNew( char *name, char *psz_dir )
#endif
f
=
mvar_New
(
name
,
"set"
);
mvar_AppendNewVar
(
f
,
"name"
,
tmp
);
#ifdef HAVE_SYS_STAT_H
if
(
S_ISDIR
(
stat_info
.
st_mode
)
)
{
...
...
@@ -1092,7 +1095,7 @@ static mvar_t *mvar_FileSetNew( char *name, char *psz_dir )
mvar_AppendNewVar
(
f
,
"type"
,
"unknown"
);
}
sprintf
(
tmp
,
"%lld"
,
stat_info
.
st_size
);
sprintf
(
tmp
,
I64Fd
,
(
int64_t
)
stat_info
.
st_size
);
mvar_AppendNewVar
(
f
,
"size"
,
tmp
);
/* FIXME memory leak FIXME */
...
...
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