Changeset 5c8349780e66ff4baaab082de1de3d85e5c244ae

Show
Ignore:
Timestamp:
10/09/05 00:10:57 (3 years ago)
Author:
Gildas Bazin <gbazin@videolan.org>
git-committer:
Gildas Bazin <gbazin@videolan.org> 1126303857 +0000
git-parent:

[5c0dd04bc176082a61302843720ace271b344811]

git-author:
Gildas Bazin <gbazin@videolan.org> 1126303857 +0000
Message:

* configure.ac, src/extras/libc.c, modules/misc/network/ipv4.c: fixed the WinCE build.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • configure.ac

    ra0d5817 r5c83497  
    172172        VLC_ADD_LDFLAGS([vcdx cddax],[-lwinmm]) 
    173173        VLC_ADD_LDFLAGS([ipv4 ipv6 access_http access_mms access_udp access_tcp access_ftp access_output_udp sap slp http stream_out_standard stream_out_rtp vod_rtsp telnet netsync],[-lws2_32]) 
    174         VLC_ADD_LDFLAGS([ipv4],[-liphlpapi]) 
    175174    fi 
    176175    if test "${SYS}" = "mingwce"; then 
     
    180179        VLC_ADD_LDFLAGS([vlc],[-lws2 -e WinMainCRTStartup]) 
    181180        VLC_ADD_LDFLAGS([ipv4 ipv6 access_http access_mms access_udp access_tcp access_ftp access_output_udp sap http netsync],[-lws2]) 
    182          VLC_ADD_LDFLAGS([ipv4],[-liphlpapi]) 
    183181   fi 
    184182    ;; 
     
    242240dnl Iconv stuff 
    243241dnl 
     242if test "${SYS}" != "mingwce"; then 
    244243AS_IF([test "$am_cv_func_iconv" != "yes"], 
    245244    [AC_MSG_ERROR([libiconv is needed for VLC to work properly])]) 
     245fi 
    246246VLC_ADD_CFLAGS([vlc],[${INCICONV}]) 
    247247VLC_ADD_LDFLAGS([vlc],[${LIBICONV}]) 
  • modules/misc/network/ipv4.c

    r22651b8 r5c83497  
    345345            else 
    346346            { 
     347                DWORD WINAPI (*OurGetBestInterface)(IPAddr,PDWORD); 
     348                DWORD WINAPI (*OurGetIpAddrTable)(PMIB_IPADDRTABLE,PULONG,BOOL); 
     349                HINSTANCE hiphlpapi = LoadLibrary(_T("Iphlpapi.dll")); 
    347350                DWORD i_index; 
    348                 if( GetBestInterface( sock.sin_addr.s_addr, 
    349                                       &i_index ) == NO_ERROR ) 
     351 
     352                if( hiphlpapi ) 
     353                { 
     354                    OurGetBestInterface = 
     355                        (void *)GetProcAddress( hiphlpapi, 
     356                                                _T("GetBestInterface") ); 
     357                    OurGetIpAddrTable = 
     358                        (void *)GetProcAddress( hiphlpapi, 
     359                                                _T("GetIpAddrTable") ); 
     360                } 
     361 
     362                if( hiphlpapi && OurGetBestInterface && OurGetIpAddrTable && 
     363                    OurGetBestInterface( sock.sin_addr.s_addr, 
     364                                         &i_index ) == NO_ERROR ) 
    350365                { 
    351366                    PMIB_IPADDRTABLE p_table; 
     
    354369                    msg_Dbg( p_this, "Winsock best interface is %lu", 
    355370                             (unsigned long)i_index ); 
    356                     GetIpAddrTable( NULL, &i, 0 ); 
     371                    OurGetIpAddrTable( NULL, &i, 0 ); 
    357372 
    358373                    p_table = (PMIB_IPADDRTABLE)malloc( i ); 
    359374                    if( p_table != NULL ) 
    360375                    { 
    361                         if( GetIpAddrTable( p_table, &i, 0 ) == NO_ERROR
     376                        if( OurGetIpAddrTable( p_table, &i, 0 ) == NO_ERROR
    362377                        { 
    363378                            for( i = 0; i < p_table->dwNumEntries; i-- ) 
     
    372387                            } 
    373388                        } 
    374                         else 
    375                             msg_Warn( p_this, "GetIpAddrTable failed" ); 
     389                        else msg_Warn( p_this, "GetIpAddrTable failed" ); 
    376390                        free( p_table ); 
    377391                    } 
    378392                } 
    379                 else 
    380                     msg_Dbg( p_this, "GetBestInterface failed" ); 
     393                else msg_Dbg( p_this, "GetBestInterface failed" ); 
     394 
     395                if( hiphlpapi ) FreeLibrary( hiphlpapi ); 
    381396            } 
    382397#endif 
  • src/extras/libc.c

    reacdb0f r5c83497  
    5656#endif 
    5757 
     58#ifdef UNDER_CE 
     59#   define strcoll strcmp 
     60#endif 
     61 
    5862/***************************************************************************** 
    5963 * getenv: just in case, but it should never be called 
     
    344348 * when called with an empty argument or just '\' 
    345349 *****************************************************************************/ 
    346 #if defined(WIN32) || defined(UNDER_CE) 
     350#if defined(WIN32) && !defined(UNDER_CE) 
    347351typedef struct vlc_DIR 
    348352{ 
     
    950954    } 
    951955 
    952 #elif defined( WIN32 ) 
     956#elif defined( WIN32 ) && !defined( UNDER_CE ) 
    953957    SECURITY_ATTRIBUTES saAttr;  
    954958    PROCESS_INFORMATION piProcInfo;