Changeset 51002a6c98cafc33e01f06eb2214612d4d983309

Show
Ignore:
Timestamp:
01/10/04 17:56:10 (4 years ago)
Author:
Gildas Bazin <gbazin@videolan.org>
git-committer:
Gildas Bazin <gbazin@videolan.org> 1096646170 +0000
git-parent:

[5cfa14809653862339f2234893d6883cbed78810]

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

* src/*: WinCE compilation fixes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/vlc/vlc.h

    r053a3a7 r51002a6  
    6060    vlc_list_t *    p_list; 
    6161 
    62 #if defined( WIN32 ) && !defined( __MINGW32__
     62#if (defined( WIN32 ) && !defined( __MINGW32__ )) || defined( UNDER_CE
    6363    signed __int64   i_time; 
    6464# else 
  • src/misc/configuration.c

    rcb98a99 r51002a6  
    923923        if( CreateDirectory( psz_new, NULL ) ) 
    924924        { 
    925             msg_Err( p_this, "could not create %s", psz_filename ); 
     925            msg_Err( p_this, "could not create %s", psz_dirname ); 
    926926        } 
    927927    } 
     
    15551555    typedef HRESULT (WINAPI *SHGETFOLDERPATH)( HWND, int, HANDLE, DWORD, 
    15561556                                               LPSTR ); 
     1557#ifndef CSIDL_FLAG_CREATE 
    15571558#   define CSIDL_FLAG_CREATE 0x8000 
     1559#endif 
     1560#ifndef CSIDL_APPDATA 
    15581561#   define CSIDL_APPDATA 0x1A 
     1562#endif 
     1563#ifndef SHGFP_TYPE_CURRENT 
    15591564#   define SHGFP_TYPE_CURRENT 0 
     1565#endif 
    15601566 
    15611567    HINSTANCE shfolder_dll; 
  • src/misc/httpd.c

    r2ba646a r51002a6  
    3030 
    3131#include <string.h> 
    32 #include <errno.h> 
     32#ifdef HAVE_ERRNO_H 
     33#   include <errno.h> 
     34#endif 
    3335#ifdef HAVE_UNISTD_H 
    3436#   include <unistd.h> 
    3537#endif 
    36 #include <fcntl.h> 
     38 
     39#ifdef HAVE_FCNTL_H 
     40#   include <fcntl.h> 
     41#endif 
    3742 
    3843#if defined( UNDER_CE ) 
     
    23382343                        &fds_read, &fds_write, NULL, &timeout ); 
    23392344 
     2345#if defined( WIN32 ) || defined( UNDER_CE ) 
     2346        if( i_ret == -1 ) 
     2347#else 
    23402348        if( i_ret == -1 && errno != EINTR ) 
     2349#endif 
    23412350        { 
    23422351            msg_Warn( host, "cannot select sockets" ); 
  • src/misc/net.c

    r2ba646a r51002a6  
    189189 
    190190        i_ret = select(fd + 1, &fds_r, NULL, &fds_e, &timeout); 
     191#ifdef HAVE_ERRNO_H 
    191192        if( (i_ret < 0 && errno == EINTR) || i_ret == 0 ) 
     193#else 
     194        if( i_ret == 0 ) 
     195#endif 
    192196        { 
    193197            if( b_block ) continue; 
     
    196200        else if( i_ret < 0 ) 
    197201        { 
    198 #ifdef WIN32 
     202#if defined(WIN32) || defined(UNDER_CE) 
    199203            msg_Err( p_this, "network select error (%i)", WSAGetLastError() ); 
    200204#else 
     
    206210        if( ( i_ret = accept( fd, 0, 0 ) ) <= 0 ) 
    207211        { 
    208 #ifdef WIN32 
     212#if defined(WIN32) || defined(UNDER_CE) 
    209213            msg_Err( p_this, "accept failed (%i)", WSAGetLastError() ); 
    210214#else 
     
    330334 
    331335        } while( (i_ret = select(fd + 1, &fds_r, NULL, &fds_e, &timeout)) == 0 
     336#ifdef HAVE_ERRNO_H 
    332337                 || ( i_ret < 0 && errno == EINTR ) ); 
     338#else 
     339                 ); 
     340#endif 
    333341 
    334342        if( i_ret < 0 ) 
    335343        { 
     344#if defined(WIN32) || defined(UNDER_CE) 
     345            msg_Err( p_this, "network select error" ); 
     346#else 
    336347            msg_Err( p_this, "network select error (%s)", strerror(errno) ); 
     348#endif 
    337349            return i_total > 0 ? i_total : -1; 
    338350        } 
     
    340352        if( ( i_recv = recv( fd, p_data, i_data, 0 ) ) < 0 ) 
    341353        { 
    342 #ifdef WIN32 
     354#if defined(WIN32) || defined(UNDER_CE) 
    343355            /* For udp only */ 
    344356            /* On win32 recv() will fail if the datagram doesn't fit inside 
     
    399411    i_ret = select(fd + 1, &fds_r, NULL, &fds_e, &timeout); 
    400412 
     413#ifdef HAVE_ERRNO_H 
    401414    if( i_ret < 0 && errno == EINTR ) 
     415#else 
     416    if( 0 ) 
     417#endif 
    402418    { 
    403419        return 0; 
     
    405421    else if( i_ret < 0 ) 
    406422    { 
     423#if defined(WIN32) || defined(UNDER_CE) 
     424        msg_Err( p_this, "network select error" ); 
     425#else 
    407426        msg_Err( p_this, "network select error (%s)", strerror(errno) ); 
     427#endif 
    408428        return -1; 
    409429    } 
     
    414434    else 
    415435    { 
    416         if( fd == 0 /*STDIN_FILENO*/ ) i_recv = read( fd, p_data, i_data ); else 
     436#if !defined(UNDER_CE) 
     437        if( fd == 0/*STDIN_FILENO*/ ) i_recv = read( fd, p_data, i_data ); else 
     438#endif 
    417439        if( ( i_recv = recv( fd, p_data, i_data, 0 ) ) <= 0 ) 
    418440        { 
    419 #ifdef WIN32 
     441#if defined(WIN32) || defined(UNDER_CE) 
    420442            /* For udp only */ 
    421443            /* On win32 recv() will fail if the datagram doesn't fit inside 
     
    473495 
    474496        } while( (i_ret = select(fd + 1, NULL, &fds_w, &fds_e, &timeout)) == 0 
     497#ifdef HAVE_ERRNO_H 
    475498                 || ( i_ret < 0 && errno == EINTR ) ); 
     499#else 
     500                 ); 
     501#endif 
    476502 
    477503        if( i_ret < 0 ) 
    478504        { 
     505#if defined(WIN32) || defined(UNDER_CE) 
     506            msg_Err( p_this, "network select error" ); 
     507#else 
    479508            msg_Err( p_this, "network select error (%s)", strerror(errno) ); 
     509#endif 
    480510            return i_total > 0 ? i_total : -1; 
    481511        } 
  • src/misc/vlm.c

    r99e83fd r51002a6  
    11311131        schedule->b_enabled = VLC_FALSE; 
    11321132    } 
     1133#if !defined( UNDER_CE ) 
    11331134    else if( strcmp( psz_cmd, "date" ) == 0 ) 
    11341135    { 
     
    12821283        schedule->i_period = ((mtime_t) date) * 1000000; 
    12831284    } 
     1285#endif /* UNDER_CE */ 
    12841286    else if( strcmp( psz_cmd, "repeat" ) == 0 ) 
    12851287    { 
     
    14531455                                        "yes" : "no" ) ); 
    14541456 
     1457#if !defined( UNDER_CE ) 
    14551458        if( schedule->i_date != 0 ) 
    14561459        { 
     
    15061509            vlm_MessageAdd( msg_schedule, vlm_MessageNew("period", "0") ); 
    15071510        } 
     1511#endif /* UNDER_CE */ 
    15081512 
    15091513        sprintf( buffer, "%d", schedule->i_repeat ); 
     
    16181622                time_t i_date = (time_t) (i_next_date / 1000000) ; 
    16191623 
     1624#if !defined( UNDER_CE ) 
    16201625#ifdef HAVE_CTIME_R 
    16211626                char psz_date[500]; 
     
    16271632                vlm_MessageAdd( msg_schedule, 
    16281633                                vlm_MessageNew( "next launch", psz_date ) ); 
     1634#endif 
    16291635            } 
    16301636        } 
     
    18931899 
    18941900    /* and now, the schedule scripts */ 
    1895  
     1901#if !defined( UNDER_CE ) 
    18961902    for( i = 0; i < vlm->i_schedule; i++ ) 
    18971903    { 
     
    19631969 
    19641970    } 
     1971#endif /* UNDER_CE */ 
    19651972 
    19661973    return save;