r27496 - in trunk/stream: asf_mmst_streaming.c asf_streaming.c http.c librtsp/rtsp_session.c network.c network.h pnm.c rtp.c stream.c stream_ftp.c stream_netstream.c stream_rtsp.c tcp.c udp.c
Author: diego Date: Sat Aug 30 00:55:39 2008 New Revision: 27496 Log: Move duplicated '#define closesocket close' into network.h along with network-related #include #ifdeffery. Modified: trunk/stream/asf_mmst_streaming.c trunk/stream/asf_streaming.c trunk/stream/http.c trunk/stream/librtsp/rtsp_session.c trunk/stream/network.c trunk/stream/network.h trunk/stream/pnm.c trunk/stream/rtp.c trunk/stream/stream.c trunk/stream/stream_ftp.c trunk/stream/stream_netstream.c trunk/stream/stream_rtsp.c trunk/stream/tcp.c trunk/stream/udp.c Modified: trunk/stream/asf_mmst_streaming.c ============================================================================== --- trunk/stream/asf_mmst_streaming.c (original) +++ trunk/stream/asf_mmst_streaming.c Sat Aug 30 00:55:39 2008 @@ -39,12 +39,6 @@ #include "mp_msg.h" #include "help_mp.h" -#ifndef HAVE_WINSOCK2_H -#define closesocket close -#else -#include <winsock2.h> -#endif - #ifndef CONFIG_SETLOCALE #undef CONFIG_ICONV #endif Modified: trunk/stream/asf_streaming.c ============================================================================== --- trunk/stream/asf_streaming.c (original) +++ trunk/stream/asf_streaming.c Sat Aug 30 00:55:39 2008 @@ -8,13 +8,6 @@ #include "config.h" #include "mp_msg.h" #include "help_mp.h" - -#ifndef HAVE_WINSOCK2_H -#define closesocket close -#else -#include <winsock2.h> -#endif - #include "url.h" #include "http.h" #include "libmpdemux/asf.h" Modified: trunk/stream/http.c ============================================================================== --- trunk/stream/http.c (original) +++ trunk/stream/http.c Sat Aug 30 00:55:39 2008 @@ -11,14 +11,6 @@ #include <string.h> #include <unistd.h> -#ifndef HAVE_WINSOCK2_H -#define closesocket close -#else -#include <winsock2.h> -#include <ws2tcpip.h> -#endif - -#include "http.h" #include "url.h" #include "mp_msg.h" Modified: trunk/stream/librtsp/rtsp_session.c ============================================================================== --- trunk/stream/librtsp/rtsp_session.c (original) +++ trunk/stream/librtsp/rtsp_session.c Sat Aug 30 00:55:39 2008 @@ -29,17 +29,6 @@ */ #include <sys/types.h> -#include "config.h" -#ifndef HAVE_WINSOCK2_H -#define closesocket close -#include <sys/socket.h> -#include <netinet/in.h> -#include <netdb.h> -#else -#include <winsock2.h> -#endif - - #include <unistd.h> #include <stdio.h> #include <fcntl.h> @@ -47,10 +36,12 @@ #include <string.h> #include <inttypes.h> +#include "config.h" #include "mp_msg.h" #include "rtsp.h" #include "rtsp_rtp.h" #include "rtsp_session.h" +#include "stream/network.h" #include "stream/url.h" #include "stream/rtp.h" #include "stream/realrtsp/real.h" Modified: trunk/stream/network.c ============================================================================== --- trunk/stream/network.c (original) +++ trunk/stream/network.c Sat Aug 30 00:55:39 2008 @@ -18,14 +18,6 @@ #include "mp_msg.h" #include "help_mp.h" - -#ifndef HAVE_WINSOCK2_H -#define closesocket close -#else -#include <winsock2.h> -#include <ws2tcpip.h> -#endif - #include "stream.h" #include "libmpdemux/demuxer.h" #include "m_config.h" Modified: trunk/stream/network.h ============================================================================== --- trunk/stream/network.h (original) +++ trunk/stream/network.h Sat Aug 30 00:55:39 2008 @@ -17,6 +17,10 @@ #include <netinet/in.h> #include <sys/socket.h> #include <arpa/inet.h> +#define closesocket close +#else +#include <winsock2.h> +#include <ws2tcpip.h> #endif #include "url.h" Modified: trunk/stream/pnm.c ============================================================================== --- trunk/stream/pnm.c (original) +++ trunk/stream/pnm.c Sat Aug 30 00:55:39 2008 @@ -35,17 +35,9 @@ #include <stdlib.h> #include <sys/time.h> #include <inttypes.h> -#ifndef HAVE_WINSOCK2_H -#define closesocket close -#include <sys/socket.h> -//#include <netinet/in.h> -//#include <netdb.h> -#else -#include <winsock2.h> -#endif #include "libavutil/intreadwrite.h" - +#include "network.h" #include "stream.h" #include "libmpdemux/demuxer.h" #include "help_mp.h" Modified: trunk/stream/rtp.c ============================================================================== --- trunk/stream/rtp.c (original) +++ trunk/stream/rtp.c Sat Aug 30 00:55:39 2008 @@ -12,17 +12,9 @@ #include <stdio.h> #include <sys/types.h> #include <ctype.h> -#include "config.h" -#ifndef HAVE_WINSOCK2_H -#include <netinet/in.h> -#include <sys/socket.h> -#include <arpa/inet.h> -#define closesocket close -#else -#include <winsock2.h> -#include <ws2tcpip.h> -#endif #include <errno.h> +#include "config.h" +#include "network.h" #include "stream.h" /* MPEG-2 TS RTP stack */ Modified: trunk/stream/stream.c ============================================================================== --- trunk/stream/stream.c (original) +++ trunk/stream/stream.c Sat Aug 30 00:55:39 2008 @@ -13,17 +13,10 @@ #include <strings.h> #include "config.h" - -#ifndef HAVE_WINSOCK2_H -#define closesocket close -#else -#include <winsock2.h> -#endif - #include "mp_msg.h" #include "help_mp.h" #include "osdep/shmem.h" - +#include "network.h" #include "stream.h" #include "libmpdemux/demuxer.h" Modified: trunk/stream/stream_ftp.c ============================================================================== --- trunk/stream/stream_ftp.c (original) +++ trunk/stream/stream_ftp.c Sat Aug 30 00:55:39 2008 @@ -9,14 +9,9 @@ #include <fcntl.h> #include <unistd.h> #include <errno.h> -#ifndef HAVE_WINSOCK2_H -#include <sys/socket.h> -#define closesocket close -#else -#include <winsock2.h> -#endif #include "mp_msg.h" +#include "network.h" #include "stream.h" #include "help_mp.h" #include "m_option.h" Modified: trunk/stream/stream_netstream.c ============================================================================== --- trunk/stream/stream_netstream.c (original) +++ trunk/stream/stream_netstream.c Sat Aug 30 00:55:39 2008 @@ -42,15 +42,6 @@ #include <inttypes.h> #include <errno.h> -#ifndef HAVE_WINSOCK2_H -#define closesocket close -#include <sys/socket.h> -#include <netinet/in.h> -#include <arpa/inet.h> -#else -#include <winsock2.h> -#endif - #include "mp_msg.h" #include "stream.h" #include "help_mp.h" Modified: trunk/stream/stream_rtsp.c ============================================================================== --- trunk/stream/stream_rtsp.c (original) +++ trunk/stream/stream_rtsp.c Sat Aug 30 00:55:39 2008 @@ -27,18 +27,10 @@ #include <stdio.h> #include <sys/types.h> #include <ctype.h> -#include "config.h" -#ifndef HAVE_WINSOCK2_H -#include <netinet/in.h> -#include <sys/socket.h> -#include <arpa/inet.h> -#define closesocket close -#else -#include <winsock2.h> -#include <ws2tcpip.h> -#endif #include <errno.h> +#include "config.h" +#include "network.h" #include "stream.h" #include "tcp.h" #include "librtsp/rtsp.h" Modified: trunk/stream/tcp.c ============================================================================== --- trunk/stream/tcp.c (original) +++ trunk/stream/tcp.c Sat Aug 30 00:55:39 2008 @@ -19,18 +19,7 @@ #include "mp_msg.h" #include "help_mp.h" - -#ifndef HAVE_WINSOCK2_H -#include <netdb.h> -#include <netinet/in.h> -#include <sys/socket.h> -#include <arpa/inet.h> -#define closesocket close -#else -#include <winsock2.h> -#include <ws2tcpip.h> -#endif - +#include "network.h" #include "stream.h" #include "tcp.h" Modified: trunk/stream/udp.c ============================================================================== --- trunk/stream/udp.c (original) +++ trunk/stream/udp.c Sat Aug 30 00:55:39 2008 @@ -31,18 +31,8 @@ #include <sys/time.h> #include <ctype.h> -#ifndef HAVE_WINSOCK2_H -#include <netdb.h> -#include <netinet/in.h> -#include <sys/socket.h> -#include <arpa/inet.h> -#define closesocket close -#else -#include <winsock2.h> -#include <ws2tcpip.h> -#endif - #include "mp_msg.h" +#include "network.h" #include "url.h" #include "udp.h"
diego wrote:
Author: diego Date: Sat Aug 30 00:55:39 2008 New Revision: 27496
Log: Move duplicated '#define closesocket close' into network.h along with network-related #include #ifdeffery.
Modified: trunk/stream/asf_mmst_streaming.c trunk/stream/asf_streaming.c trunk/stream/http.c trunk/stream/librtsp/rtsp_session.c trunk/stream/network.c trunk/stream/network.h trunk/stream/pnm.c trunk/stream/rtp.c trunk/stream/stream.c trunk/stream/stream_ftp.c trunk/stream/stream_netstream.c trunk/stream/stream_rtsp.c trunk/stream/tcp.c trunk/stream/udp.c
Hi, It looks like one of the hunks broke MinGW build. libmpdemux and the codecs under it cannot be compiled properly because definitions from "./loader/wine/*.h" is conflicting with the native headers. Conflicts with "loader/wine/windef.h" is especially visible. "ad_internal.h", used by many of the files under libmpdemux includes "stream/stream.h", which then includes "stream/network.h" if "CONFIG_NETWORK" is defined, which then in turn includes the native "ws2tcpip.h". r27495 builds with minor workarounds (read: local hacks) for HAVE_WINSOCK2_H and closesockets. Any ideas to fix the problem?
"JonY" <10walls@gmail.com> 写入消息新闻:48B96416.4040206@gmail.com...
diego wrote:
Author: diego Date: Sat Aug 30 00:55:39 2008 New Revision: 27496
Log: Move duplicated '#define closesocket close' into network.h along with network-related #include #ifdeffery.
Modified: trunk/stream/asf_mmst_streaming.c trunk/stream/asf_streaming.c trunk/stream/http.c trunk/stream/librtsp/rtsp_session.c trunk/stream/network.c trunk/stream/network.h trunk/stream/pnm.c trunk/stream/rtp.c trunk/stream/stream.c trunk/stream/stream_ftp.c trunk/stream/stream_netstream.c trunk/stream/stream_rtsp.c trunk/stream/tcp.c trunk/stream/udp.c
Hi, It looks like one of the hunks broke MinGW build.
libmpdemux and the codecs under it cannot be compiled properly because definitions from "./loader/wine/*.h" is conflicting with the native headers. Conflicts with "loader/wine/windef.h" is especially visible.
"ad_internal.h", used by many of the files under libmpdemux includes "stream/stream.h", which then includes "stream/network.h" if "CONFIG_NETWORK" is defined, which then in turn includes the native "ws2tcpip.h".
r27495 builds with minor workarounds (read: local hacks) for HAVE_WINSOCK2_H and closesockets.
Any ideas to fix the problem?
I'd say we'd better revert this mess first. -- Zuxy
On Saturday, 30 August 2008 at 18:21, Zuxy Meng wrote:
"JonY" <10walls@gmail.com> 写入消息新闻:48B96416.4040206@gmail.com...
diego wrote:
Author: diego Date: Sat Aug 30 00:55:39 2008 New Revision: 27496
Log: Move duplicated '#define closesocket close' into network.h along with network-related #include #ifdeffery.
Modified: trunk/stream/asf_mmst_streaming.c trunk/stream/asf_streaming.c trunk/stream/http.c trunk/stream/librtsp/rtsp_session.c trunk/stream/network.c trunk/stream/network.h trunk/stream/pnm.c trunk/stream/rtp.c trunk/stream/stream.c trunk/stream/stream_ftp.c trunk/stream/stream_netstream.c trunk/stream/stream_rtsp.c trunk/stream/tcp.c trunk/stream/udp.c
Hi, It looks like one of the hunks broke MinGW build.
libmpdemux and the codecs under it cannot be compiled properly because definitions from "./loader/wine/*.h" is conflicting with the native headers. Conflicts with "loader/wine/windef.h" is especially visible.
"ad_internal.h", used by many of the files under libmpdemux includes "stream/stream.h", which then includes "stream/network.h" if "CONFIG_NETWORK" is defined, which then in turn includes the native "ws2tcpip.h".
r27495 builds with minor workarounds (read: local hacks) for HAVE_WINSOCK2_H and closesockets.
Any ideas to fix the problem?
I'd say we'd better revert this mess first.
Why don't we have a look at the exact compilation failures first? The original commit was a major cleanup and I'd hate to see it reverted if it can be easily fixed. Regards, R. -- MPlayer http://mplayerhq.hu | Livna http://rpm.livna.org There should be a science of discontent. People need hard times and oppression to develop psychic muscles. -- from "Collected Sayings of Muad'Dib" by the Princess Irulan
On Sun, Aug 31, 2008 at 10:29:28AM +0200, Dominik 'Rathann' Mierzejewski wrote:
On Saturday, 30 August 2008 at 18:21, Zuxy Meng wrote:
"JonY" <10walls@gmail.com> 写入消息新闻:48B96416.4040206@gmail.com...
diego wrote:
Author: diego Date: Sat Aug 30 00:55:39 2008 New Revision: 27496
Log: Move duplicated '#define closesocket close' into network.h along with network-related #include #ifdeffery.
Modified: trunk/stream/asf_mmst_streaming.c trunk/stream/asf_streaming.c trunk/stream/http.c trunk/stream/librtsp/rtsp_session.c trunk/stream/network.c trunk/stream/network.h trunk/stream/pnm.c trunk/stream/rtp.c trunk/stream/stream.c trunk/stream/stream_ftp.c trunk/stream/stream_netstream.c trunk/stream/stream_rtsp.c trunk/stream/tcp.c trunk/stream/udp.c
Hi, It looks like one of the hunks broke MinGW build.
libmpdemux and the codecs under it cannot be compiled properly because definitions from "./loader/wine/*.h" is conflicting with the native headers. Conflicts with "loader/wine/windef.h" is especially visible.
"ad_internal.h", used by many of the files under libmpdemux includes "stream/stream.h", which then includes "stream/network.h" if "CONFIG_NETWORK" is defined, which then in turn includes the native "ws2tcpip.h".
r27495 builds with minor workarounds (read: local hacks) for HAVE_WINSOCK2_H and closesockets.
Any ideas to fix the problem?
I'd say we'd better revert this mess first.
Why don't we have a look at the exact compilation failures first? The original commit was a major cleanup and I'd hate to see it reverted if it can be easily fixed.
While I can not reproduce it, it probably is related to clashes with the STREAM_SEEK in some Windows headers. Also, reportedly using -DWIN32_LEAN_AND_MEAN seems to be a workaround too, and if it does not break anything IMO should be enabled as well, it somewhat limits the Windows header mess (where basically including _any_ header results in including all). I can not at all seen the loader problems though, there were a few issues in the past but I was rather sure they are all fixed. Greetings, Reimar Döffinger
"Dominik 'Rathann' Mierzejewski" <dominik@rangers.eu.org> 写入消息新闻:20080831082928.GA11794@mokona.greysector.net...
On Saturday, 30 August 2008 at 18:21, Zuxy Meng wrote:
"JonY" <10walls@gmail.com> 写入消息新闻:48B96416.4040206@gmail.com...
diego wrote:
Author: diego Date: Sat Aug 30 00:55:39 2008 New Revision: 27496
Log: Move duplicated '#define closesocket close' into network.h along with network-related #include #ifdeffery.
Modified: trunk/stream/asf_mmst_streaming.c trunk/stream/asf_streaming.c trunk/stream/http.c trunk/stream/librtsp/rtsp_session.c trunk/stream/network.c trunk/stream/network.h trunk/stream/pnm.c trunk/stream/rtp.c trunk/stream/stream.c trunk/stream/stream_ftp.c trunk/stream/stream_netstream.c trunk/stream/stream_rtsp.c trunk/stream/tcp.c trunk/stream/udp.c
Hi, It looks like one of the hunks broke MinGW build.
libmpdemux and the codecs under it cannot be compiled properly because definitions from "./loader/wine/*.h" is conflicting with the native headers. Conflicts with "loader/wine/windef.h" is especially visible.
"ad_internal.h", used by many of the files under libmpdemux includes "stream/stream.h", which then includes "stream/network.h" if "CONFIG_NETWORK" is defined, which then in turn includes the native "ws2tcpip.h".
r27495 builds with minor workarounds (read: local hacks) for HAVE_WINSOCK2_H and closesockets.
Any ideas to fix the problem?
I'd say we'd better revert this mess first.
Why don't we have a look at the exact compilation failures first? The original commit was a major cleanup and I'd hate to see it reverted if it can be easily fixed.
There're just too many. To name a few: 1. winsock2.h complains about lacking of definition for LPGUID, because codec-cfg.h only defines GUID. 2. Definitions of INT32 and boolean conflicts with jpeglib. 3. STREAM_SEEK conflicts with stream/stream.h 4. Lots of redefinition where any header under loader/wine/ is included. We should include <winsock2.h> only when it's needed, because it in turn includes <windows.h> which is *big* mess. -- Zuxy
Zuxy Meng wrote:
"Dominik 'Rathann' Mierzejewski"<dominik@rangers.eu.org> 写入消息新闻:20080831082928.GA11794@mokona.greysector.net...
On Saturday, 30 August 2008 at 18:21, Zuxy Meng wrote:
"JonY"<10walls@gmail.com> 写入消息新闻:48B96416.4040206@gmail.com...
diego wrote:
Author: diego Date: Sat Aug 30 00:55:39 2008 New Revision: 27496
Log: Move duplicated '#define closesocket close' into network.h along with network-related #include #ifdeffery.
Modified: trunk/stream/asf_mmst_streaming.c trunk/stream/asf_streaming.c trunk/stream/http.c trunk/stream/librtsp/rtsp_session.c trunk/stream/network.c trunk/stream/network.h trunk/stream/pnm.c trunk/stream/rtp.c trunk/stream/stream.c trunk/stream/stream_ftp.c trunk/stream/stream_netstream.c trunk/stream/stream_rtsp.c trunk/stream/tcp.c trunk/stream/udp.c
Hi, It looks like one of the hunks broke MinGW build.
libmpdemux and the codecs under it cannot be compiled properly because definitions from "./loader/wine/*.h" is conflicting with the native headers. Conflicts with "loader/wine/windef.h" is especially visible.
"ad_internal.h", used by many of the files under libmpdemux includes "stream/stream.h", which then includes "stream/network.h" if "CONFIG_NETWORK" is defined, which then in turn includes the native "ws2tcpip.h".
r27495 builds with minor workarounds (read: local hacks) for HAVE_WINSOCK2_H and closesockets.
Any ideas to fix the problem? I'd say we'd better revert this mess first. Why don't we have a look at the exact compilation failures first? The original commit was a major cleanup and I'd hate to see it reverted if it can be easily fixed.
There're just too many. To name a few:
1. winsock2.h complains about lacking of definition for LPGUID, because codec-cfg.h only defines GUID.
Include ws2tcpip.h first? Both have the same length, different member names though. From winnt.h typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID, *REFGUID, *LPGUID; From codec-cfg.h typedef struct { unsigned long f1; unsigned short f2; unsigned short f3; unsigned char f4[8]; } GUID;
2. Definitions of INT32 and boolean conflicts with jpeglib. 3. STREAM_SEEK conflicts with stream/stream.h Rename STREAM_SEEK?
4. Lots of redefinition where any header under loader/wine/ is included.
We should include<winsock2.h> only when it's needed, because it in turn includes<windows.h> which is *big* mess.
IMHO, this should be fixed so native MinGW interfaces are preferred over WINE interface when building under MinGW. I'm curious why wine headers are used at all for MinGW builds.
On Sun, Aug 31, 2008 at 10:29:28AM +0200, Dominik 'Rathann' Mierzejewski wrote:
On Saturday, 30 August 2008 at 18:21, Zuxy Meng wrote:
"JonY" <10walls@gmail.com> 写入消息新闻:48B96416.4040206@gmail.com...
diego wrote:
Log: Move duplicated '#define closesocket close' into network.h along with network-related #include #ifdeffery.
It looks like one of the hunks broke MinGW build.
libmpdemux and the codecs under it cannot be compiled properly because definitions from "./loader/wine/*.h" is conflicting with the native headers. Conflicts with "loader/wine/windef.h" is especially visible.
"ad_internal.h", used by many of the files under libmpdemux includes "stream/stream.h", which then includes "stream/network.h" if "CONFIG_NETWORK" is defined, which then in turn includes the native "ws2tcpip.h".
r27495 builds with minor workarounds (read: local hacks) for HAVE_WINSOCK2_H and closesockets.
Any ideas to fix the problem?
I'd say we'd better revert this mess first.
Why don't we have a look at the exact compilation failures first? The original commit was a major cleanup and I'd hate to see it reverted if it can be easily fixed.
I agree in principle, but this seems to be too much trouble in this case. I have a different idea for the cleanup, which I will implement in a moment after I revert this. Diego
participants (6)
-
diego -
Diego Biurrun -
Dominik 'Rathann' Mierzejewski -
JonY -
Reimar Döffinger -
Zuxy Meng