contrib:mpg123: test unicode and ANSI pipes separately
authorSteve Lhomme <robux4@videolabs.io>
Mon, 16 May 2016 14:30:44 +0000 (16:30 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 16 May 2016 14:37:47 +0000 (16:37 +0200)
this will avoid a version bump when only Unicode is available

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
contrib/src/mpg123/rules.mak
contrib/src/mpg123/winstore.patch [new file with mode: 0644]

index 807a4f6..99c4250 100644 (file)
@@ -26,6 +26,9 @@ mpg123: mpg123-$(MPG123_VERSION).tar.bz2 .sum-mpg123
        $(APPLY) $(SRC)/mpg123/mpg123-libm.patch
 ifdef HAVE_ANDROID
        $(APPLY) $(SRC)/mpg123/mpg123_android_off_t.patch
+endif
+ifdef HAVE_WINSTORE
+       $(APPLY) $(SRC)/mpg123/winstore.patch
 endif
        $(MOVE)
 
diff --git a/contrib/src/mpg123/winstore.patch b/contrib/src/mpg123/winstore.patch
new file mode 100644 (file)
index 0000000..e55642d
--- /dev/null
@@ -0,0 +1,46 @@
+--- mpg123/configure.ac        2015-08-12 07:38:31.000000000 +0200
++++ mpg123/configure.ac.winstore       2016-05-16 16:23:05.234325900 +0200
+@@ -2290,23 +2292,41 @@ win32_fifo_working=no
+ if test x$win32_specific_codes = xenabled; then
+   AC_MSG_CHECKING([if we have Named Pipes])
+   if test "x$fifo" != "xdisabled"; then
++    if test "x$win32_wide_working" = xyes; then
+     AC_LINK_IFELSE([AC_LANG_SOURCE([
+     #include <windows.h>
+       int main(){
+-        CreateNamedPipeA(NULL,PIPE_ACCESS_DUPLEX|FILE_FLAG_OVERLAPPED,PIPE_TYPE_BYTE,1,255,255,0,NULL);
+         CreateNamedPipeW(NULL,PIPE_ACCESS_DUPLEX|FILE_FLAG_OVERLAPPED,PIPE_TYPE_BYTE,1,255,255,0,NULL);
+         return 0;
+       }])],[win32_fifo_working=yes],[win32_winver_bump=yes])
++    else
++    AC_LINK_IFELSE([AC_LANG_SOURCE([
++    #include <windows.h>
++      int main(){
++        CreateNamedPipeA(NULL,PIPE_ACCESS_DUPLEX|FILE_FLAG_OVERLAPPED,PIPE_TYPE_BYTE,1,255,255,0,NULL);
++        return 0;
++      }])],[win32_fifo_working=yes],[win32_winver_bump=yes])
++    fi
+     if test "x$win32_fifo_working" != "xyes"; then
++      if test "x$win32_wide_working" = xyes; then
+     AC_LINK_IFELSE([AC_LANG_SOURCE([
+     #define WINVER 0x501
+     #define _WIN32_WINNT 0x501
+     #include <windows.h>
+       int main(){
+-        CreateNamedPipeA(NULL,PIPE_ACCESS_DUPLEX|FILE_FLAG_OVERLAPPED,PIPE_TYPE_BYTE,1,255,255,0,NULL);
+         CreateNamedPipeW(NULL,PIPE_ACCESS_DUPLEX|FILE_FLAG_OVERLAPPED,PIPE_TYPE_BYTE,1,255,255,0,NULL);
+         return 0;
+       }])],[win32_fifo_working=yes],[win32_fifo_working=no])
++      else
++    AC_LINK_IFELSE([AC_LANG_SOURCE([
++    #define WINVER 0x501
++    #define _WIN32_WINNT 0x501
++    #include <windows.h>
++      int main(){
++        CreateNamedPipeA(NULL,PIPE_ACCESS_DUPLEX|FILE_FLAG_OVERLAPPED,PIPE_TYPE_BYTE,1,255,255,0,NULL);
++        return 0;
++      }])],[win32_fifo_working=yes],[win32_fifo_working=no])
++      fi
+     fi
+   fi
+   have_mkfifo=$win32_fifo_working