Re: [libav-devel] [PATCH 1/2] ismindex: Fix build on mingw

2012-01-25 Thread Diego Biurrun
On Wed, Jan 25, 2012 at 01:48:46PM +0200, Martin Storsjö wrote:
 
 --- a/tools/ismindex.c
 +++ b/tools/ismindex.c
 @@ -35,6 +35,10 @@
  #include stdio.h
  #include string.h
  #include sys/stat.h
 +#ifdef _WIN32
 +#include io.h
 +#define mkdir(a, b) mkdir(a)
 +#endif
  #include libavformat/avformat.h
  #include libavutil/intreadwrite.h
  #include libavutil/mathematics.h

libavformat/os_support.h would seem like a better place to hide this
ugliness.

Also, an empty line between system and local headers would be nice.

Diego
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/2] ismindex: Fix build on mingw

2012-01-25 Thread Martin Storsjö

On Wed, 25 Jan 2012, Diego Biurrun wrote:


On Wed, Jan 25, 2012 at 01:48:46PM +0200, Martin Storsjö wrote:


--- a/tools/ismindex.c
+++ b/tools/ismindex.c
@@ -35,6 +35,10 @@
 #include stdio.h
 #include string.h
 #include sys/stat.h
+#ifdef _WIN32
+#include io.h
+#define mkdir(a, b) mkdir(a)
+#endif
 #include libavformat/avformat.h
 #include libavutil/intreadwrite.h
 #include libavutil/mathematics.h


libavformat/os_support.h would seem like a better place to hide this
ugliness.


os_support.h isn't an installed header, and I've tried to design this tool 
to only use the public API (so it could be built as a standalone external 
tool, too).



Also, an empty line between system and local headers would be nice.


Done locally.

// Martin___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/2] ismindex: Fix build on mingw

2012-01-25 Thread Martin Storsjö

On Wed, 25 Jan 2012, Martin Storsjö wrote:


On Wed, 25 Jan 2012, Diego Biurrun wrote:


On Wed, Jan 25, 2012 at 01:48:46PM +0200, Martin Storsjö wrote:


--- a/tools/ismindex.c
+++ b/tools/ismindex.c
@@ -35,6 +35,10 @@
 #include stdio.h
 #include string.h
 #include sys/stat.h
+#ifdef _WIN32
+#include io.h
+#define mkdir(a, b) mkdir(a)
+#endif
 #include libavformat/avformat.h
 #include libavutil/intreadwrite.h
 #include libavutil/mathematics.h


libavformat/os_support.h would seem like a better place to hide this
ugliness.


os_support.h isn't an installed header, and I've tried to design this tool to 
only use the public API (so it could be built as a standalone external tool, 
too).



Also, an empty line between system and local headers would be nice.


Done locally.


Is the patch ok with this reasoning, or do you still think it should be 
moved?


// Martin___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/2] ismindex: Fix build on mingw

2012-01-25 Thread Diego Biurrun
On Wed, Jan 25, 2012 at 11:49:28PM +0200, Martin Storsjö wrote:
 On Wed, 25 Jan 2012, Martin Storsjö wrote:
 
 On Wed, 25 Jan 2012, Diego Biurrun wrote:
 
 On Wed, Jan 25, 2012 at 01:48:46PM +0200, Martin Storsjö wrote:
 
 --- a/tools/ismindex.c
 +++ b/tools/ismindex.c
 @@ -35,6 +35,10 @@
  #include stdio.h
  #include string.h
  #include sys/stat.h
 +#ifdef _WIN32
 +#include io.h
 +#define mkdir(a, b) mkdir(a)
 +#endif
  #include libavformat/avformat.h
  #include libavutil/intreadwrite.h
  #include libavutil/mathematics.h
 
 libavformat/os_support.h would seem like a better place to hide this
 ugliness.
 
 os_support.h isn't an installed header, and I've tried to design
 this tool to only use the public API (so it could be built as a
 standalone external tool, too).
 
 Is the patch ok with this reasoning, or do you still think it should
 be moved?

I would move it, but if you prefer to keep it here, fine.

Diego
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/2] ismindex: Fix build on mingw

2012-01-25 Thread Martin Storsjö

On Wed, 25 Jan 2012, Diego Biurrun wrote:


On Wed, Jan 25, 2012 at 11:49:28PM +0200, Martin Storsjö wrote:

On Wed, 25 Jan 2012, Martin Storsjö wrote:


On Wed, 25 Jan 2012, Diego Biurrun wrote:


On Wed, Jan 25, 2012 at 01:48:46PM +0200, Martin Storsjö wrote:


--- a/tools/ismindex.c
+++ b/tools/ismindex.c
@@ -35,6 +35,10 @@
#include stdio.h
#include string.h
#include sys/stat.h
+#ifdef _WIN32
+#include io.h
+#define mkdir(a, b) mkdir(a)
+#endif
#include libavformat/avformat.h
#include libavutil/intreadwrite.h
#include libavutil/mathematics.h


libavformat/os_support.h would seem like a better place to hide this
ugliness.


os_support.h isn't an installed header, and I've tried to design
this tool to only use the public API (so it could be built as a
standalone external tool, too).


Is the patch ok with this reasoning, or do you still think it should
be moved?


I would move it, but if you prefer to keep it here, fine.


Pushed in this form then.

// Martin___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel