Changeset e98aae28c0040819f43bde6259ec95d3029deedf

Show
Ignore:
Timestamp:
04/05/02 05:27:27 (6 years ago)
Author:
Sam Hocevar <sam@videolan.org>
git-committer:
Sam Hocevar <sam@videolan.org> 1017977247 +0000
git-parent:

[cf5b3832dc6ad3fb4e55e9506e7e803d3e26ed53]

git-author:
Sam Hocevar <sam@videolan.org> 1017977247 +0000
Message:
  • ./plugins/win32/intfwin.bpr: we now build intfwin.so at the right place.
  • ./plugins/win32/Makefile: intfwin.so can be built using commandline.
  • ./configure.in, ./include/threads.h, ./include/common.h: a custom defs.h
    file isn't needed for the intfwin plugin anymore.
  • ./INSTALL.win32: updated compilation instructions for the intfwin plugin.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ChangeLog

    rd94ba35 re98aae2  
    55HEAD 
    66 
     7  * ./plugins/win32/intfwin.bpr: we now build intfwin.so at the right place. 
     8  * ./plugins/win32/Makefile: intfwin.so can be built using commandline. 
     9  * ./configure.in, ./include/threads.h, ./include/common.h: a custom defs.h 
     10    file isn't needed for the intfwin plugin anymore. 
     11  * ./INSTALL.win32: updated compilation instructions for the intfwin plugin. 
    712  * ./AUTHORS: added ipkiss. 
    813  * ./plugins/win32/mainframe.cpp: disabled the "hide interface" menu 
  • INSTALL.win32

    r22b05ce re98aae2  
    129129include\defs.h should be generated. 
    130130 
    131 2) Edit include\defs.h, and add the following lines if necessary: 
    132 #define WIN32 
    133 #define MODULE_NAME win32 
    134 #define MODULE_NAME_IS win32 
    135 #define PLUGIN 
    136 #define HAVE_DYNAMIC_PLUGINS 
    137  
    138 3) Still in defs.h, comment the following line to avoid compilation warnings: 
    139 #define PACKAGE "vlc" 
    140  
    141 4) From the plugin\win32 directory, use Borland C++ command-line tools 
     1312) From the plugin\win32 directory, use Borland C++ command-line tools 
    142132as follows: 
    143 bpr2mak intfwin.bpr     // Create a makefile from intfwin.bpr 
     133bpr2mak intfwin.bpr -s \ 
     134  | sed 's#^LIBPATH = .*#&;$$(RELEASELIBPATH)# ; s#^USERDEFINES = .*#& -DWIN32 -DPLUGIN -DMODULE_NAME_IS_intfwin -DMODULE_NAME=intfwin#' \ 
     135  > intfwin.mak         // Create a makefile from intfwin.bpr 
    144136make -fintfwin      // It's Borland's make utility ! 
    145137 
    146 5) This should create a intfwin.so 
     1383) This should create a intfwin.so 
    147139You can remove any other generated file. 
    148140 
  • Makefile

    r71b4ea0 re98aae2  
    143143        vcd/vcd \ 
    144144        win32/waveout \ 
    145         win32/win32
     145        win32/intfwin
    146146        x11/x11 \ 
    147147        x11/xvideo 
  • Makefile.modules

    rdd5d92a re98aae2  
    7474    $(CC) $(CFLAGS) $(CFLAGS_EXTRA) -c $< -o $@ 
    7575 
     76# foo_CUSTOM lets us override all target rules for foo.so and foo.a 
     77ifeq (,$($(module_name)_CUSTOM)) 
    7678../$(module_name).so: $(EXTRA_DEP) $(OBJ_ALL) 
    77     $(CC) $(OBJ_ALL) $(PLDFLAGS) $(LIB_$(MODULE_NAME)) $(LIB_COMMON) -o $@ && chmod a-x $@ 
     79    $(CC) $(OBJ_ALL) $(PLDFLAGS) $(LIB_$(MODULE_NAME)) $(LIB_COMMON) -o $@ 
     80    chmod a-x $@ 
    7881 
    7982../$(module_name).a: $(EXTRA_DEP) $(OBJ_ALL) 
    80     rm -f $@ && ar rc $@ $(OBJ_ALL) && $(RANLIB) $@ 
     83    rm -f $@ 
     84    ar rc $@ $(OBJ_ALL) 
     85    $(RANLIB) $@ 
     86endif 
    8187 
  • configure

    rcf5b383 re98aae2  
    12281228 
    12291229cat >> confdefs.h <<EOF 
    1230 #define PACKAGE "vlc" 
     1230#define VLC_PACKAGE "vlc" 
    12311231EOF 
    12321232 
    12331233cat >> confdefs.h <<EOF 
    1234 #define VERSION "$VERSION" 
     1234#define VLC_VERSION "$VERSION" 
    12351235EOF 
    12361236 
     
    82238223s%@MOC@%$MOC%g 
    82248224s%@DLL_PATH@%$DLL_PATH%g 
    8225 s%@PACKAGE@%$PACKAGE%g 
    8226 s%@VERSION@%$VERSION%g 
     8225s%@VLC_PACKAGE@%$VLC_PACKAGE%g 
     8226s%@VLC_VERSION@%$VLC_VERSION%g 
    82278227s%@PLDFLAGS@%$PLDFLAGS%g 
    82288228s%@LIB_COMMON@%$LIB_COMMON%g 
  • configure.in

    rcf5b383 re98aae2  
    4040ALL_LINGUAS="de fr ja no ru nl" 
    4141 
    42 AC_DEFINE_UNQUOTED(PACKAGE, "vlc", [Package name]) 
    43 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Package version]) 
     42AC_DEFINE_UNQUOTED(VLC_PACKAGE, "vlc", [Package name]) 
     43AC_DEFINE_UNQUOTED(VLC_VERSION, "$VERSION", [Package version]) 
    4444AM_GNU_GETTEXT 
    4545 
     
    14211421AC_SUBST(WINDRES) 
    14221422AC_SUBST(DLL_PATH) 
    1423 AC_SUBST(PACKAGE) 
    1424 AC_SUBST(VERSION) 
     1423AC_SUBST(VLC_PACKAGE) 
     1424AC_SUBST(VLC_VERSION) 
    14251425 
    14261426AC_SUBST(LDFLAGS) 
  • include/common.h

    rcf5b383 re98aae2  
    44 ***************************************************************************** 
    55 * Copyright (C) 1998, 1999, 2000 VideoLAN 
    6  * $Id: common.h,v 1.92 2002/04/05 01:05:22 gbazin Exp $ 
     6 * $Id: common.h,v 1.93 2002/04/05 03:27:27 sam Exp $ 
    77 * 
    88 * Authors: Samuel Hocevar <sam@via.ecp.fr> 
     
    477477 * I18n stuff 
    478478 *****************************************************************************/ 
    479 #if defined( ENABLE_NLS ) && defined ( HAVE_GETTEXT ) 
     479#ifndef PACKAGE 
     480#define PACKAGE VLC_PACKAGE 
     481#endif 
     482#define VERSION VLC_VERSION 
     483 
     484#if defined( ENABLE_NLS ) && defined ( HAVE_GETTEXT ) && !defined( __BORLANDC__ ) 
    480485#   include <libintl.h> 
    481486#else 
  • include/threads.h

    r4f08a70 re98aae2  
    44 ***************************************************************************** 
    55 * Copyright (C) 1999, 2000 VideoLAN 
    6  * $Id: threads.h,v 1.39 2002/04/02 23:43:57 gbazin Exp $ 
     6 * $Id: threads.h,v 1.40 2002/04/05 03:27:27 sam Exp $ 
    77 * 
    88 * Authors: Jean-Marc Dressler <polux@via.ecp.fr> 
     
    3636#   include <st.h> 
    3737 
     38#elif defined( WIN32 ) 
     39#   include <process.h> 
     40 
    3841#elif defined( PTHREAD_COND_T_IN_PTHREAD_H )  /* pthreads (like Linux & BSD) */ 
    3942#   include <pthread.h> 
     
    5356#   include <byteorder.h> 
    5457 
    55 #elif defined( WIN32 ) 
    56 #   include <process.h> 
    57  
    5858#else 
    5959#   error no threads available on your system ! 
     
    100100typedef st_mutex_t *     vlc_mutex_t; 
    101101typedef st_cond_t *      vlc_cond_t; 
     102 
     103#elif defined( WIN32 ) 
     104typedef HANDLE vlc_thread_t; 
     105 
     106typedef struct 
     107{ 
     108    CRITICAL_SECTION csection; 
     109    HANDLE           mutex; 
     110} vlc_mutex_t; 
     111 
     112typedef struct 
     113{ 
     114    int             i_waiting_threads; 
     115    HANDLE          signal; 
     116} vlc_cond_t; 
     117 
     118typedef unsigned (__stdcall *PTHREAD_START) (void *); 
    102119 
    103120#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) 
     
    145162} vlc_cond_t; 
    146163 
    147 #elif defined( WIN32 ) 
    148 typedef HANDLE vlc_thread_t; 
    149  
    150 typedef struct 
    151 { 
    152     CRITICAL_SECTION csection; 
    153     HANDLE           mutex; 
    154 } vlc_mutex_t; 
    155  
    156 typedef struct 
    157 { 
    158     int             i_waiting_threads; 
    159     HANDLE          signal; 
    160 } vlc_cond_t; 
    161  
    162 typedef unsigned (__stdcall *PTHREAD_START) (void *); 
    163  
    164164#endif 
    165165 
     
    217217    return st_init(); 
    218218 
    219 #elif defined( PTHREAD_COND_T_IN_PTHREAD_H
    220     return 0; 
    221  
    222 #elif defined( HAVE_CTHREADS_H ) 
    223     return 0; 
    224  
    225 #elif defined( HAVE_KERNEL_SCHEDULER_H ) 
    226     return 0; 
    227  
    228 #elif defined( WIN32
     219#elif defined( WIN32
     220    return 0; 
     221 
     222#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) 
     223    return 0; 
     224 
     225#elif defined( HAVE_CTHREADS_H ) 
     226    return 0; 
     227 
     228#elif defined( HAVE_KERNEL_SCHEDULER_H
    229229    return 0; 
    230230 
     
    243243    return 0; 
    244244 
    245 #elif defined( PTHREAD_COND_T_IN_PTHREAD_H
    246     return 0; 
    247  
    248 #elif defined( HAVE_CTHREADS_H ) 
    249     return 0; 
    250  
    251 #elif defined( HAVE_KERNEL_SCHEDULER_H ) 
    252     return 0; 
    253  
    254 #elif defined( WIN32
     245#elif defined( WIN32
     246    return 0; 
     247 
     248#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) 
     249    return 0; 
     250 
     251#elif defined( HAVE_CTHREADS_H ) 
     252    return 0; 
     253 
     254#elif defined( HAVE_KERNEL_SCHEDULER_H
    255255    return 0; 
    256256 
     
    269269    *p_mutex = st_mutex_new(); 
    270270    return ( *p_mutex == NULL ) ? errno : 0; 
     271 
     272#elif defined( WIN32 ) 
     273    /* We use mutexes on WinNT/2K/XP because we can use the SignalObjectAndWait 
     274     * function and have a 100% correct vlc_cond_wait() implementation. 
     275     * As this function is not available on Win9x, we can use the faster 
     276     * CriticalSections */ 
     277    if( (GetVersion() < 0x80000000) && !p_main_sys->b_fast_pthread ) 
     278    { 
     279        /* We are running on NT/2K/XP, we can use SignalObjectAndWait */ 
     280        p_mutex->mutex = CreateMutex( 0, FALSE, 0 ); 
     281        return ( p_mutex->mutex ? 0 : 1 ); 
     282    } 
     283    else 
     284    { 
     285        InitializeCriticalSection( &p_mutex->csection ); 
     286        p_mutex->mutex = NULL; 
     287        return 0; 
     288    } 
    271289 
    272290#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) 
     
    311329    return B_OK; 
    312330 
    313 #elif defined( WIN32 ) 
    314     /* We use mutexes on WinNT/2K/XP because we can use the SignalObjectAndWait 
    315      * function and have a 100% correct vlc_cond_wait() implementation. 
    316      * As this function is not available on Win9x, we can use the faster 
    317      * CriticalSections */ 
    318     if( (GetVersion() < 0x80000000) && !p_main_sys->b_fast_pthread ) 
    319     { 
    320         /* We are running on NT/2K/XP, we can use SignalObjectAndWait */ 
    321         p_mutex->mutex = CreateMutex( 0, FALSE, 0 ); 
    322         return ( p_mutex->mutex ? 0 : 1 ); 
    323     } 
    324     else 
    325     { 
    326         InitializeCriticalSection( &p_mutex->csection ); 
    327         p_mutex->mutex = NULL; 
    328         return 0; 
    329     } 
    330  
    331331#endif 
    332332} 
     
    352352    return st_mutex_lock( *p_mutex ); 
    353353 
     354#elif defined( WIN32 ) 
     355    if( p_mutex->mutex ) 
     356    { 
     357        WaitForSingleObject( p_mutex->mutex, INFINITE ); 
     358    } 
     359    else 
     360    { 
     361        EnterCriticalSection( &p_mutex->csection ); 
     362    } 
     363    return 0; 
     364 
    354365#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) 
    355366    int i_return = pthread_mutex_lock( p_mutex ); 
     
    380391    err = acquire_sem( p_mutex->lock ); 
    381392    return err; 
    382  
    383 #elif defined( WIN32 ) 
    384     if( p_mutex->mutex ) 
    385     { 
    386         WaitForSingleObject( p_mutex->mutex, INFINITE ); 
    387     } 
    388     else 
    389     { 
    390         EnterCriticalSection( &p_mutex->csection ); 
    391     } 
    392     return 0; 
    393393 
    394394#endif 
     
    415415    return st_mutex_unlock( *p_mutex ); 
    416416 
     417#elif defined( WIN32 ) 
     418    if( p_mutex->mutex ) 
     419    { 
     420        ReleaseMutex( p_mutex->mutex ); 
     421    } 
     422    else 
     423    { 
     424        LeaveCriticalSection( &p_mutex->csection ); 
     425    } 
     426    return 0; 
     427 
    417428#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) 
    418429    int i_return = pthread_mutex_unlock( p_mutex ); 
     
    441452    release_sem( p_mutex->lock ); 
    442453    return B_OK; 
    443  
    444 #elif defined( WIN32 ) 
    445     if( p_mutex->mutex ) 
    446     { 
    447         ReleaseMutex( p_mutex->mutex ); 
    448     } 
    449     else 
    450     { 
    451         LeaveCriticalSection( &p_mutex->csection ); 
    452     } 
    453     return 0; 
    454454 
    455455#endif 
     
    476476    return st_mutex_destroy( *p_mutex ); 
    477477 
     478#elif defined( WIN32 ) 
     479    if( p_mutex->mutex ) 
     480    { 
     481        CloseHandle( p_mutex->mutex ); 
     482    } 
     483    else 
     484    { 
     485        DeleteCriticalSection( &p_mutex->csection ); 
     486    } 
     487    return 0; 
     488 
    478489#elif defined( PTHREAD_COND_T_IN_PTHREAD_H )     
    479490    int i_return = pthread_mutex_destroy( p_mutex ); 
     
    497508    return B_OK; 
    498509 
    499 #elif defined( WIN32 ) 
    500     if( p_mutex->mutex ) 
    501     { 
    502         CloseHandle( p_mutex->mutex ); 
    503     } 
    504     else 
    505     { 
    506         DeleteCriticalSection( &p_mutex->csection ); 
    507     } 
    508     return 0; 
    509  
    510510#endif     
    511511} 
     
    522522    *p_condvar = st_cond_new(); 
    523523    return ( *p_condvar == NULL ) ? errno : 0; 
     524 
     525#elif defined( WIN32 ) 
     526    /* initialise counter */ 
     527    p_condvar->i_waiting_threads = 0; 
     528 
     529    /* Create an auto-reset event. */ 
     530    p_condvar->signal = CreateEvent( NULL, /* no security */ 
     531                                     FALSE,  /* auto-reset event */ 
     532                                     FALSE,  /* non-signaled initially */ 
     533                                     NULL ); /* unnamed */ 
     534 
     535    return( !p_condvar->signal ); 
    524536 
    525537#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) 
     
    550562    return 0; 
    551563 
    552 #elif defined( WIN32 ) 
    553     /* initialise counter */ 
    554     p_condvar->i_waiting_threads = 0; 
    555  
    556     /* Create an auto-reset event. */ 
    557     p_condvar->signal = CreateEvent( NULL, /* no security */ 
    558                                      FALSE,  /* auto-reset event */ 
    559                                      FALSE,  /* non-signaled initially */ 
    560                                      NULL ); /* unnamed */ 
    561  
    562     return( !p_condvar->signal ); 
    563      
    564564#endif 
    565565} 
     
    575575#elif defined( ST_INIT_IN_ST_H ) 
    576576    return st_cond_signal( *p_condvar ); 
     577 
     578#elif defined( WIN32 ) 
     579    /* Release one waiting thread if one is available. */ 
     580    /* For this trick to work properly, the vlc_cond_signal must be surrounded 
     581     * by a mutex. This will prevent another thread from stealing the signal */ 
     582    PulseEvent( p_condvar->signal ); 
     583    return 0; 
    577584 
    578585#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) 
     
    623630    return 0; 
    624631 
    625 #elif defined( WIN32 ) 
    626     /* Release one waiting thread if one is available. */ 
    627     /* For this trick to work properly, the vlc_cond_signal must be surrounded 
    628      * by a mutex. This will prevent another thread from stealing the signal */ 
    629     PulseEvent( p_condvar->signal ); 
    630     return 0; 
    631  
    632632#endif 
    633633} 
     
    648648#elif defined( ST_INIT_IN_ST_H ) 
    649649    return st_cond_broadcast( p_condvar ); 
     650 
     651#elif defined( WIN32 ) 
     652    /* Release all waiting threads. */ 
     653    /* For this trick to work properly, the vlc_cond_signal must be surrounded 
     654     * by a mutex. This will prevent another thread from stealing the signal */ 
     655    while( p_condvar->i_waiting_threads ) 
     656    { 
     657        PulseEvent( p_condvar->signal ); 
     658        Sleep( 1 ); /* deschedule the current thread */ 
     659    } 
     660    return 0; 
    650661 
    651662#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) 
     
    696707    return 0; 
    697708 
    698 #elif defined( WIN32 ) 
    699     /* Release all waiting threads. */ 
    700     /* For this trick to work properly, the vlc_cond_signal must be surrounded 
    701      * by a mutex. This will prevent another thread from stealing the signal */ 
    702     while( p_condvar->i_waiting_threads ) 
    703     { 
    704         PulseEvent( p_condvar->signal ); 
    705         Sleep( 1 ); /* deschedule the current thread */ 
    706     } 
    707     return 0; 
    708  
    709709#endif 
    710710} 
     
    736736 
    737737    return i_ret; 
    738  
    739 #elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) 
    740  
    741 #ifndef DEBUG 
    742     return pthread_cond_wait( p_condvar, p_mutex ); 
    743 #else 
    744     /* In debug mode, timeout */ 
    745     struct timeval now; 
    746     struct timespec timeout; 
    747     int    i_result; 
    748  
    749     for( ; ; ) 
    750     { 
    751         gettimeofday( &now, NULL ); 
    752         timeout.tv_sec = now.tv_sec + THREAD_COND_TIMEOUT; 
    753         timeout.tv_nsec = now.tv_usec * 1000; 
    754  
    755         i_result = pthread_cond_timedwait( p_condvar, p_mutex, &timeout ); 
    756  
    757         if( i_result == ETIMEDOUT ) 
    758         { 
    759             intf_WarnMsg( 1, "thread %d warning: Possible deadlock detected in cond_wait at %s:%d (%s)", 
    760                           pthread_self(), psz_file, i_line, strerror(i_result) ); 
    761             continue; 
    762         } 
    763  
    764         if( i_result ) 
    765         { 
    766             intf_ErrMsg( "thread %d error: cond_wait failed at %s:%d (%s)", 
    767                          pthread_self(), psz_file, i_line, strerror(i_result) ); 
    768         } 
    769         return( i_result ); 
    770     } 
    771 #endif 
    772  
    773 #elif defined( HAVE_CTHREADS_H ) 
    774     condition_wait( (condition_t)p_condvar, (mutex_t)p_mutex ); 
    775     return 0; 
    776  
    777 #elif defined( HAVE_KERNEL_SCHEDULER_H ) 
    778     if( !p_condvar ) 
    779     { 
    780         return B_BAD_VALUE; 
    781     } 
    782  
    783     if( !p_mutex ) 
    784     { 
    785         return B_BAD_VALUE; 
    786     } 
    787  
    788     if( p_condvar->init < 2000 ) 
    789     { 
    790         return B_NO_INIT; 
    791     } 
    792  
    793     /* The p_condvar->thread var is initialized before the unlock because 
    794      * it enables to identify when the thread is interrupted beetwen the 
    795      * unlock line and the suspend_thread line */ 
    796     p_condvar->thread = find_thread( NULL ); 
    797     vlc_mutex_unlock( p_mutex ); 
    798     suspend_thread( p_condvar->thread ); 
    799     p_condvar->thread = -1; 
    800  
    801     vlc_mutex_lock( p_mutex ); 
    802     return 0; 
    803738 
    804739#elif defined( WIN32 ) 
     
    834769    return( i_result == WAIT_FAILED ); 
    835770 
     771#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) 
     772 
     773#ifndef DEBUG 
     774    return pthread_cond_wait( p_condvar, p_mutex ); 
     775#else 
     776    /* In debug mode, timeout */ 
     777    struct timeval now; 
     778    struct timespec timeout; 
     779    int    i_result; 
     780 
     781    for( ; ; ) 
     782    { 
     783        gettimeofday( &now, NULL ); 
     784        timeout.tv_sec = now.tv_sec + THREAD_COND_TIMEOUT; 
     785        timeout.tv_nsec = now.tv_usec * 1000; 
     786 
     787        i_result = pthread_cond_timedwait( p_condvar, p_mutex, &timeout ); 
     788 
     789        if( i_result == ETIMEDOUT ) 
     790        { 
     791            intf_WarnMsg( 1, "thread %d warning: Possible deadlock detected in cond_wait at %s:%d (%s)", 
     792                          pthread_self(), psz_file, i_line, strerror(i_result) ); 
     793            continue; 
     794        } 
     795 
     796        if( i_result ) 
     797        { 
     798            intf_ErrMsg( "thread %d error: cond_wait failed at %s:%d (%s)", 
     799                         pthread_self(), psz_file, i_line, strerror(i_result) ); 
     800        } 
     801        return( i_result ); 
     802    } 
     803#endif 
     804 
     805#elif defined( HAVE_CTHREADS_H ) 
     806    condition_wait( (condition_t)p_condvar, (mutex_t)p_mutex ); 
     807    return 0; 
     808 
     809#elif defined( HAVE_KERNEL_SCHEDULER_H ) 
     810    if( !p_condvar ) 
     811    { 
     812        return B_BAD_VALUE; 
     813    } 
     814 
     815    if( !p_mutex ) 
     816    { 
     817        return B_BAD_VALUE; 
     818    } 
     819 
     820    if( p_condvar->init < 2000 ) 
     821    { 
     822        return B_NO_INIT; 
     823    } 
     824 
     825    /* The p_condvar->thread var is initialized before the unlock because 
     826     * it enables to identify when the thread is interrupted beetwen the 
     827     * unlock line and the suspend_thread line */ 
     828    p_condvar->thread = find_thread( NULL ); 
     829    vlc_mutex_unlock( p_mutex ); 
     830    suspend_thread( p_condvar->thread ); 
     831    p_condvar->thread = -1; 
     832 
     833    vlc_mutex_lock( p_mutex ); 
     834    return 0; 
     835 
    836836#endif 
    837837} 
     
    857857    return st_cond_destroy( *p_condvar ); 
    858858 
     859#elif defined( WIN32 ) 
     860    return( !CloseHandle( p_condvar->signal ) ); 
     861 
    859862#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) 
    860863    int i_result = pthread_cond_destroy( p_condvar ); 
     
    872875    p_condvar->init = 0; 
    873876    return 0; 
    874  
    875 #elif defined( WIN32 ) 
    876     return( !CloseHandle( p_condvar->signal ) ); 
    877877 
    878878#endif     
     
    923923    i_ret = ( p_thread == NULL ); 
    924924     
    925 #elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) 
    926     i_ret = pthread_create( p_thread, NULL, func, p_data ); 
    927  
    928 #elif defined( HAVE_CTHREADS_H ) 
    929     *p_thread = cthread_fork( (cthread_fn_t)func, (any_t)p_data ); 
    930     i_ret = 0; 
    931  
    932 #elif defined( HAVE_KERNEL_SCHEDULER_H ) 
    933     *p_thread = spawn_thread( (thread_func)func, psz_name, 
    934                               B_NORMAL_PRIORITY, p_data ); 
    935     i_ret = resume_thread( *p_thread ); 
    936  
    937925#elif defined( WIN32 ) 
    938926    unsigned threadID; 
     
    945933    i_ret = ( *p_thread ? 0 : 1 ); 
    946934 
     935#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) 
     936    i_ret = pthread_create( p_thread, NULL, func, p_data ); 
     937 
     938#elif defined( HAVE_CTHREADS_H ) 
     939    *p_thread = cthread_fork( (cthread_fn_t)func, (any_t)p_data ); 
     940    i_ret = 0; 
     941 
     942#elif defined( HAVE_KERNEL_SCHEDULER_H ) 
     943    *p_thread = spawn_thread( (thread_func)func, psz_name, 
     944                              B_NORMAL_PRIORITY, p_data ); 
     945    i_ret = resume_thread( *p_thread ); 
     946 
    947947#endif 
    948948 
     
    984984    st_thread_exit( &result ); 
    985985     
    986 #elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) 
    987     pthread_exit( 0 ); 
    988  
    989 #elif defined( HAVE_CTHREADS_H ) 
    990     int result; 
    991     cthread_exit( &result ); 
    992  
    993 #elif defined( HAVE_KERNEL_SCHEDULER_H ) 
    994     exit_thread( 0 ); 
    995  
    996986#elif defined( WIN32 ) 
    997987    /* For now we don't close the thread handles (because of race conditions). 
    998988     * Need to be looked at. */ 
    999989    _endthreadex(0); 
     990 
     991#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) 
     992    pthread_exit( 0 ); 
     993 
     994#elif defined( HAVE_CTHREADS_H ) 
     995    int result; 
     996    cthread_exit( &result ); 
     997 
     998#elif defined( HAVE_KERNEL_SCHEDULER_H ) 
     999    exit_thread( 0 ); 
    10001000 
    10011001#endif 
     
    10241024    i_ret = st_thread_join( thread, NULL ); 
    10251025     
     1026#elif defined( WIN32 ) 
     1027    WaitForSingleObject( thread, INFINITE ); 
     1028 
    10261029#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) 
    10271030    i_ret = pthread_join( thread, NULL ); 
     
    10341037    int32 exit_value; 
    10351038    wait_for_thread( thread, &exit_value ); 
    1036  
    1037 #elif defined( WIN32 ) 
    1038     WaitForSingleObject( thread, INFINITE ); 
    10391039 
    10401040#endif 
  • plugins/win32/Makefile

    rde32203 re98aae2  
    1 win32_SRC = win32.cpp 
     1
     2# Waveout module - the classic way to do things 
     3
    24waveout_SOURCES = waveout.c 
     5 
     6# 
     7# Borland C++ project 
     8# we override everything by setting intfwin_CUSTOM 
     9# 
     10intfwin_CUSTOM = yes 
     11BCBUILDER = "D:/Program Files/CBuilder5" 
     12 
     13../intfwin.so: Makefile 
     14    rm -f intfwin.mak 
     15    $(BCBUILDER)/Bin/bpr2mak intfwin.bpr -s | sed 's#^LIBPATH = .*#&;$$(RELEASELIBPATH)# ; s#^USERDEFINES = .*#& -DWIN32 -DPLUGIN -DMODULE_NAME_IS_intfwin -DMODULE_NAME=intfwin#' > intfwin.mak 
     16    $(BCBUILDER)/Bin/make -f intfwin.mak -b 
     17 
  • plugins/win32/intfwin.bpr

    r8092e41 re98aae2  
    44  <MACROS> 
    55    <VERSION value="BCB.05.03"/> 
    6     <PROJECT value="intfwin.so"/> 
     6    <PROJECT value="..\intfwin.so"/> 
    77    <OBJFILES value="win32.obj intf_win32.obj mainframe.obj network.obj playlist.obj  
    88      preferences.obj about.obj disc.obj control.obj menu.obj messages.obj"/>