Changeset 5c8349780e66ff4baaab082de1de3d85e5c244ae
- 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
| ra0d5817 |
r5c83497 |
|
| 172 | 172 | VLC_ADD_LDFLAGS([vcdx cddax],[-lwinmm]) |
|---|
| 173 | 173 | 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]) |
|---|
| 175 | 174 | fi |
|---|
| 176 | 175 | if test "${SYS}" = "mingwce"; then |
|---|
| … | … | |
| 180 | 179 | VLC_ADD_LDFLAGS([vlc],[-lws2 -e WinMainCRTStartup]) |
|---|
| 181 | 180 | 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]) |
|---|
| 183 | 181 | fi |
|---|
| 184 | 182 | ;; |
|---|
| … | … | |
| 242 | 240 | dnl Iconv stuff |
|---|
| 243 | 241 | dnl |
|---|
| | 242 | if test "${SYS}" != "mingwce"; then |
|---|
| 244 | 243 | AS_IF([test "$am_cv_func_iconv" != "yes"], |
|---|
| 245 | 244 | [AC_MSG_ERROR([libiconv is needed for VLC to work properly])]) |
|---|
| | 245 | fi |
|---|
| 246 | 246 | VLC_ADD_CFLAGS([vlc],[${INCICONV}]) |
|---|
| 247 | 247 | VLC_ADD_LDFLAGS([vlc],[${LIBICONV}]) |
|---|
| r22651b8 |
r5c83497 |
|
| 345 | 345 | else |
|---|
| 346 | 346 | { |
|---|
| | 347 | DWORD WINAPI (*OurGetBestInterface)(IPAddr,PDWORD); |
|---|
| | 348 | DWORD WINAPI (*OurGetIpAddrTable)(PMIB_IPADDRTABLE,PULONG,BOOL); |
|---|
| | 349 | HINSTANCE hiphlpapi = LoadLibrary(_T("Iphlpapi.dll")); |
|---|
| 347 | 350 | 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 ) |
|---|
| 350 | 365 | { |
|---|
| 351 | 366 | PMIB_IPADDRTABLE p_table; |
|---|
| … | … | |
| 354 | 369 | msg_Dbg( p_this, "Winsock best interface is %lu", |
|---|
| 355 | 370 | (unsigned long)i_index ); |
|---|
| 356 | | GetIpAddrTable( NULL, &i, 0 ); |
|---|
| | 371 | OurGetIpAddrTable( NULL, &i, 0 ); |
|---|
| 357 | 372 | |
|---|
| 358 | 373 | p_table = (PMIB_IPADDRTABLE)malloc( i ); |
|---|
| 359 | 374 | if( p_table != NULL ) |
|---|
| 360 | 375 | { |
|---|
| 361 | | if( GetIpAddrTable( p_table, &i, 0 ) == NO_ERROR) |
|---|
| | 376 | if( OurGetIpAddrTable( p_table, &i, 0 ) == NO_ERROR ) |
|---|
| 362 | 377 | { |
|---|
| 363 | 378 | for( i = 0; i < p_table->dwNumEntries; i-- ) |
|---|
| … | … | |
| 372 | 387 | } |
|---|
| 373 | 388 | } |
|---|
| 374 | | else |
|---|
| 375 | | msg_Warn( p_this, "GetIpAddrTable failed" ); |
|---|
| | 389 | else msg_Warn( p_this, "GetIpAddrTable failed" ); |
|---|
| 376 | 390 | free( p_table ); |
|---|
| 377 | 391 | } |
|---|
| 378 | 392 | } |
|---|
| 379 | | else |
|---|
| 380 | | msg_Dbg( p_this, "GetBestInterface failed" ); |
|---|
| | 393 | else msg_Dbg( p_this, "GetBestInterface failed" ); |
|---|
| | 394 | |
|---|
| | 395 | if( hiphlpapi ) FreeLibrary( hiphlpapi ); |
|---|
| 381 | 396 | } |
|---|
| 382 | 397 | #endif |
|---|
| reacdb0f |
r5c83497 |
|
| 56 | 56 | #endif |
|---|
| 57 | 57 | |
|---|
| | 58 | #ifdef UNDER_CE |
|---|
| | 59 | # define strcoll strcmp |
|---|
| | 60 | #endif |
|---|
| | 61 | |
|---|
| 58 | 62 | /***************************************************************************** |
|---|
| 59 | 63 | * getenv: just in case, but it should never be called |
|---|
| … | … | |
| 344 | 348 | * when called with an empty argument or just '\' |
|---|
| 345 | 349 | *****************************************************************************/ |
|---|
| 346 | | #if defined(WIN32) || defined(UNDER_CE) |
|---|
| | 350 | #if defined(WIN32) && !defined(UNDER_CE) |
|---|
| 347 | 351 | typedef struct vlc_DIR |
|---|
| 348 | 352 | { |
|---|
| … | … | |
| 950 | 954 | } |
|---|
| 951 | 955 | |
|---|
| 952 | | #elif defined( WIN32 ) |
|---|
| | 956 | #elif defined( WIN32 ) && !defined( UNDER_CE ) |
|---|
| 953 | 957 | SECURITY_ATTRIBUTES saAttr; |
|---|
| 954 | 958 | PROCESS_INFORMATION piProcInfo; |
|---|