Changeset 4765

Show
Ignore:
Timestamp:
04/07/10 14:26:23 (4 years ago)
Author:
douglask
Message:

Extract from pthreads-win32 README:

Define PTW32_STATIC_LIB when building your application. Also, your
application must call a two non-portable routines to initialise some
state on startup and cleanup before exit. One other routine needs
to be called to cleanup after any Win32 threads have called POSIX API
routines. See README.NONPORTABLE or the html reference manual pages for
details on these routines:

BOOL pthread_win32_process_attach_np (void);
BOOL pthread_win32_process_detach_np (void);
BOOL pthread_win32_thread_attach_np (void); // Currently a no-op
BOOL pthread_win32_thread_detach_np (void);

Location:
vic/branches/mpeg4
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • vic/branches/mpeg4/vic.2008.vcproj

    r4746 r4765  
    223223                                Optimization="0" 
    224224                                AdditionalIncludeDirectories=".\;codec;render;rtp;net;win32;video;..\common\src;codec\tmndec;"codec\tmn-x";codec\jpeg;codec\p64;x264\include;ffmpeg\include;C:\Tcl\include\tcl8.5;C:\msys\1.0\local\include;C:\msys\local\include;c:\mingw\local\include;"$(DXSDK_DIR)\include"" 
    225                                 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;HAVE_IPv6;USE_ZVFS;USE_DDRAW;HAVE_SWSCALE;HAVE_STDLIB_H;SASR;ED_YBITS=4;SIGRET=void;SIGARGS=int;NLAYER=8;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WIN32_WINNT=_WIN32_WINNT_WINXP" 
     225                                PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;PTW32_STATIC_LIB;HAVE_IPv6;USE_ZVFS;USE_DDRAW;HAVE_SWSCALE;HAVE_STDLIB_H;SASR;ED_YBITS=4;SIGRET=void;SIGARGS=int;NLAYER=8;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WIN32_WINNT=_WIN32_WINNT_WINXP" 
    226226                                MinimalRebuild="true" 
    227227                                BasicRuntimeChecks="3" 
     
    242242                        <Tool 
    243243                                Name="VCLinkerTool" 
    244                                 AdditionalDependencies="tcl85.lib tk85.lib uclmm.lib ws2_32.lib comsuppwd.lib iphlpapi.lib vfw32.lib ddraw.lib dxguid.lib strmiids.lib quartz.lib libgcc.a libmingwex.lib libavcodec.a libavutil.a libpostproc.a libswscale.a libpthread.a libx264.a libz.a" 
     244                                AdditionalDependencies="tcl85.lib tk85.lib uclmm.lib ws2_32.lib comsuppwd.lib iphlpapi.lib vfw32.lib ddraw.lib dxguid.lib strmiids.lib quartz.lib libgcc.a libmingwex.lib libavcodec.a libavutil.a libpostproc.a libswscale.a libx264.a libpthreadGC2.a libz.a" 
    245245                                LinkIncremental="2" 
    246246                                AdditionalLibraryDirectories="C:\Tcl\lib;ffmpeg\lib;x264\lib;&quot;$(DXSDK_DIR)\Lib\x86&quot;;C:\msys\1.0\lib;&quot;C:\mingw\lib\gcc\mingw32\4.2.1-sjlj&quot;;c:\mingw\local\lib;c:\mingw\local\bin;c:\mingw\lib;C:\msys\lib;&quot;$(SolutionDir)Debug&quot;;C:\msys\1.0\local\lib;C:\msys\local\lib;C:\msys\1.0\lib\gcc\mingw32\4.4.0;C:\msys\1.0\lib\gcc\mingw32\4.2.0;C:\msys\lib\gcc\mingw32\4.4.0;C:\msys\lib\gcc\mingw32\4.2.0" 
     
    310310                                EnableIntrinsicFunctions="true" 
    311311                                AdditionalIncludeDirectories=".\;codec;render;rtp;net;win32;video;..\common\src;codec\tmndec;&quot;codec\tmn-x&quot;;codec\jpeg;codec\p64;x264\include;ffmpeg\include;C:\Tcl\include\tcl8.5;C:\msys\1.0\local\include;C:\msys\local\include;&quot;$(DXSDK_DIR)\include&quot;" 
    312                                 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;HAVE_IPv6;USE_ZVFS;USE_DDRAW;HAVE_SWSCALE;HAVE_STDLIB_H;SASR;ED_YBITS=4;SIGRET=void;SIGARGS=int;NLAYER=8;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WIN32_WINNT=_WIN32_WINNT_WINXP" 
     312                                PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;PTW32_STATIC_LIB;HAVE_IPv6;USE_ZVFS;USE_DDRAW;HAVE_SWSCALE;HAVE_STDLIB_H;SASR;ED_YBITS=4;SIGRET=void;SIGARGS=int;NLAYER=8;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WIN32_WINNT=_WIN32_WINNT_WINXP" 
    313313                                RuntimeLibrary="2" 
    314314                                EnableFunctionLevelLinking="true" 
     
    328328                        <Tool 
    329329                                Name="VCLinkerTool" 
    330                                 AdditionalDependencies="tcl85.lib tk85.lib uclmm.lib ws2_32.lib comsuppwd.lib iphlpapi.lib vfw32.lib ddraw.lib dxguid.lib strmiids.lib quartz.lib libgcc.a libmingwex.lib libavcodec.a libavutil.a libpostproc.a libswscale.a libpthread.a libx264.a libz.a" 
     330                                AdditionalDependencies="tcl85.lib tk85.lib uclmm.lib ws2_32.lib comsuppwd.lib iphlpapi.lib vfw32.lib ddraw.lib dxguid.lib strmiids.lib quartz.lib libgcc.a libmingwex.lib libavcodec.a libavutil.a libpostproc.a libswscale.a libx264.a libpthreadGC2.a libz.a" 
    331331                                LinkIncremental="1" 
    332332                                AdditionalLibraryDirectories="C:\Tcl\lib;x264\lib;ffmpeg\lib;&quot;$(DXSDK_DIR)\Lib\x86&quot;;C:\msys\1.0\lib;&quot;C:\mingw\lib\gcc\mingw32\4.2.1-sjlj&quot;;c:\mingw\local\lib;c:\mingw\local\bin;c:\mingw\lib;C:\msys\lib;&quot;$(SolutionDir)Release&quot;;C:\msys\1.0\local\lib;C:\msys\local\lib;C:\msys\1.0\lib\gcc\mingw32\4.4.0;C:\msys\1.0\lib\gcc\mingw32\4.2.0;C:\msys\lib\gcc\mingw32\4.4.0;C:\msys\lib\gcc\mingw32\4.2.0" 
  • vic/branches/mpeg4/win32/win32.c

    r4572 r4765  
    6363    switch (sysinfo.wProcessorArchitecture) { 
    6464    case PROCESSOR_ARCHITECTURE_INTEL: 
    65                 (void)strcpy(ub->machine, "ix86"); 
     65                (void)strcpy(ub->machine, "x86"); 
    6666                break; 
    6767    case PROCESSOR_ARCHITECTURE_MIPS : 
     
    7474                (void)strcpy(ub->machine, "ppc"); 
    7575                break; 
     76#ifdef PROCESSOR_ARCHITECTURE_AMD64 
     77    case PROCESSOR_ARCHITECTURE_AMD64: 
     78                (void)strcpy(ub->machine, "x86-64"); 
     79                break; 
     80#endif 
    7681    default: 
    7782                (void)strcpy(ub->machine, "unknown"); 
     
    156161} 
    157162 
     163#ifdef PTW32_STATIC_LIB 
     164void detach_ptw32(void) 
     165{ 
     166    pthread_win32_process_attach_np(); 
     167    pthread_win32_thread_attach_np(); 
     168} 
     169#endif 
     170 
    158171extern void TkWinXInit(HINSTANCE hInstance); 
    159172extern int main(int argc, const char *argv[]); 
     
    172185    char *p; 
    173186    WSADATA WSAdata; 
    174          
     187 
     188#ifdef PTW32_STATIC_LIB 
     189        /* Necessity when linking with pthreads-win32 static library */ 
     190    pthread_win32_process_attach_np(); 
     191    pthread_win32_thread_attach_np(); 
     192    atexit(detach_ptw32); 
     193#endif 
     194 
    175195    /* XXX 
    176196        * initialize our socket interface plus the tcl 7.5 socket