[1/3] ismindex: Don't use os_support.h for mkdir

Message ID 1416314232-8484-1-git-send-email-martin@martin.st
State New
Headers show

Commit Message

Martin Storsjö Nov. 18, 2014, 12:37 p.m.
This reverts commit bea3d6f4363ff1bbbd99c1717f7498b9fdb12cfc.

This reduces the dependencies on the libavformat internal headers.
(ismindex doesn't have any runtime dependencies on the libavformat
internals, only build-time dependencies.)
---
 tools/ismindex.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Comments

Luca Barbato Nov. 18, 2014, 1:23 p.m. | #1
On 18/11/14 13:37, Martin Storsjö wrote:
> This reverts commit bea3d6f4363ff1bbbd99c1717f7498b9fdb12cfc.
> 
> This reduces the dependencies on the libavformat internal headers.
> (ismindex doesn't have any runtime dependencies on the libavformat
> internals, only build-time dependencies.)
> ---
>  tools/ismindex.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/ismindex.c b/tools/ismindex.c
> index 387b185..8f630d6 100644
> --- a/tools/ismindex.c
> +++ b/tools/ismindex.c
> @@ -46,10 +46,18 @@
>  
>  #include <stdio.h>
>  #include <string.h>
> +#include <sys/stat.h>
> +#ifdef _WIN32
> +#ifdef __MINGW32CE__
> +#include <io.h>
> +#else
> +#include <direct.h>
> +#endif
> +#define mkdir(a, b) _mkdir(a)
> +#endif
>  
>  #include "libavformat/avformat.h"
>  #include "libavformat/isom.h"
> -#include "libavformat/os_support.h"
>  #include "libavutil/intreadwrite.h"
>  #include "libavutil/mathematics.h"
>  
> 

Ok if you like it better.
Martin Storsjö Nov. 18, 2014, 1:38 p.m. | #2
On Tue, 18 Nov 2014, Luca Barbato wrote:

> On 18/11/14 13:37, Martin Storsjö wrote:
>> This reverts commit bea3d6f4363ff1bbbd99c1717f7498b9fdb12cfc.
>> 
>> This reduces the dependencies on the libavformat internal headers.
>> (ismindex doesn't have any runtime dependencies on the libavformat
>> internals, only build-time dependencies.)
>> ---
>>  tools/ismindex.c | 10 +++++++++-
>>  1 file changed, 9 insertions(+), 1 deletion(-)
>> 
>> diff --git a/tools/ismindex.c b/tools/ismindex.c
>> index 387b185..8f630d6 100644
>> --- a/tools/ismindex.c
>> +++ b/tools/ismindex.c
>> @@ -46,10 +46,18 @@
>>
>>  #include <stdio.h>
>>  #include <string.h>
>> +#include <sys/stat.h>
>> +#ifdef _WIN32
>> +#ifdef __MINGW32CE__
>> +#include <io.h>
>> +#else
>> +#include <direct.h>
>> +#endif
>> +#define mkdir(a, b) _mkdir(a)
>> +#endif
>>
>>  #include "libavformat/avformat.h"
>>  #include "libavformat/isom.h"
>> -#include "libavformat/os_support.h"
>>  #include "libavutil/intreadwrite.h"
>>  #include "libavutil/mathematics.h"
>> 
>> 
>
> Ok if you like it better.

Especially after patch 3/3 when the lavf internal ones would try to 
interpret strings as utf8, I'd rather not have the external tools use it 
(since they don't have paths in utf8 necessarily).

// Martin
Luca Barbato Nov. 18, 2014, 1:44 p.m. | #3
On 18/11/14 14:38, Martin Storsjö wrote:
> Especially after patch 3/3 when the lavf internal ones would try to
> interpret strings as utf8, I'd rather not have the external tools use it
> (since they don't have paths in utf8 necessarily).

then it is absolutely fine.

Patch

diff --git a/tools/ismindex.c b/tools/ismindex.c
index 387b185..8f630d6 100644
--- a/tools/ismindex.c
+++ b/tools/ismindex.c
@@ -46,10 +46,18 @@ 
 
 #include <stdio.h>
 #include <string.h>
+#include <sys/stat.h>
+#ifdef _WIN32
+#ifdef __MINGW32CE__
+#include <io.h>
+#else
+#include <direct.h>
+#endif
+#define mkdir(a, b) _mkdir(a)
+#endif
 
 #include "libavformat/avformat.h"
 #include "libavformat/isom.h"
-#include "libavformat/os_support.h"
 #include "libavutil/intreadwrite.h"
 #include "libavutil/mathematics.h"