[MPlayer-dev-eng] [PATCH] cygwin dvd, bswap, and vo2

Joey Parrish joey at yunamusic.com
Mon Jun 24 20:53:38 CEST 2002


Hello,

On Mon, Jun 24, 2002 at 09:47:48AM +0200, Felix Buenemann wrote:
> hmm, can you please tell me, wtf libmpdvdkit needs sockets? that's pretty 
> strange...
> -- 
> Best Regards,
>         Atmos

__USE_W32_SOCKETS forces the use of winsock socket code instead of the
cygwin socket code.  This is neccessary because the headers used for
mpdvdkit under cygwin will end up defining both the windows-like and
unix-like socket code.

Without defining __USE_W32_SOCKETS and you will get errors like this:

/usr/local/i386-cygwin/include/winsock.h:82: warning: #warning "fd_set and associated macros have been defined in sys/types.      This can cause runtime problems with W32 sockets" 
In file included from common.h:145,
                 from css.c:49:
/usr/local/i386-cygwin/include/winsock.h:473: conflicting types for `gethostname'
/usr/local/i386-cygwin/include/sys/unistd.h:142: previous declaration of `gethostname'

Should I try to resolve this another way?
One way that works is to replace the definition
of __USE_W32_SOCKETS with these two:
  #define USE_SYS_TYPES_FD_SET 1
  #define __INSIDE_CYGWIN__ 1
This way also allows it to compile, but
not cleanly as with __USE_W32_SOCKETS.

If you don't like either of these fixes, I
can try to find another.

--Joey

-- 

"Living in the complex world of the future is somewhat
like having bees live in your head.  But, there they are."



More information about the MPlayer-dev-eng mailing list