Changeset 86

Show
Ignore:
Timestamp:
11/18/04 00:03:04
Author:
DenisG
Message:

[SubversionSharp] Fix calling convention of callback delegates to Cdecl. (Require CallConvHack project to work!)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/SubversionSharp/dev/src/SubversionSharp.csproj

    r82 r86  
    1818                OutputType = "Library" 
    1919                PreBuildEvent = "" 
    20                 PostBuildEvent = "" 
     20                PostBuildEvent = '"C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\ildasm.exe" /TEXT "$(TargetPath)" | "..\..\..\..\CallConvHack\hack\bin\Release\CallConvHack.exe" > "$(TargetDir)$(ProjectName).il" && "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\ilasm.exe" /DLL /QUIET /OUT:"$(TargetPath)" "$(TargetDir)$(TargetName).il"' 
    2121                RootNamespace = "SubversionSharp" 
    22                 RunPostBuildEvent = "OnBuildSuccess
     22                RunPostBuildEvent = "OnOutputUpdated
    2323                StartupObject = "" 
    2424            > 
     
    2929                    CheckForOverflowUnderflow = "false" 
    3030                    ConfigurationOverrideFile = "" 
    31                     DefineConstants = "
     31                    DefineConstants = "WIN32
    3232                    DocumentationFile = "" 
    3333                    DebugSymbols = "true" 
     
    4949                    CheckForOverflowUnderflow = "false" 
    5050                    ConfigurationOverrideFile = "" 
    51                     DefineConstants = "
     51                    DefineConstants = "WIN32
    5252                    DocumentationFile = "" 
    5353                    DebugSymbols = "false" 
     
    7575                    Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" 
    7676                /> 
     77                <Reference 
     78                    Name = "CallConvAttribute" 
     79                    Project = "{20FD254E-D5B1-4D10-B3CE-820C2A21786E}" 
     80                    Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" 
     81                /> 
    7782            </References> 
    7883        </Build> 
  • trunk/SubversionSharp/dev/src/Svn.cs

    r60 r86  
    5959        } 
    6060 
    61         internal delegate IntPtr svn_cancel_func_t(IntPtr baton); 
     61#if WIN32 
     62        [Softec.CallConvCdecl] 
     63#endif 
     64        internal delegate IntPtr svn_cancel_func_t(IntPtr baton); 
    6265        public delegate SvnError CancelFunc(IntPtr baton); 
    6366         
     
    163166 
    164167        #region SvnStream 
    165         internal delegate IntPtr svn_read_fn_t(IntPtr baton, IntPtr buffer, ref uint len); 
    166         internal delegate IntPtr svn_write_fn_t(IntPtr baton, IntPtr data, ref uint len); 
    167         internal delegate IntPtr svn_close_fn_t(IntPtr baton); 
     168        [Softec.CallConvCdecl]  
     169        internal delegate IntPtr svn_read_fn_t(IntPtr baton, IntPtr buffer, ref uint len); 
     170        [Softec.CallConvCdecl] 
     171        internal delegate IntPtr svn_write_fn_t(IntPtr baton, IntPtr data, ref uint len); 
     172        [Softec.CallConvCdecl] 
     173        internal delegate IntPtr svn_close_fn_t(IntPtr baton); 
    168174         
    169175        [DllImport("svn_client-1")] static extern 
     
    199205        internal IntPtr svn_client_create_context(out IntPtr ctx, IntPtr pool); 
    200206         
    201         internal delegate void svn_wc_notify_func_t(IntPtr baton, IntPtr path,  
     207#if WIN32 
     208        [Softec.CallConvCdecl] 
     209#endif 
     210        internal delegate void svn_wc_notify_func_t(IntPtr baton, IntPtr path,  
    202211                                                    int action, int kind,  
    203212                                                    IntPtr mime_type, int content_state,  
     
    214223         
    215224        #region SvnAuthProvider 
    216         internal delegate IntPtr svn_auth_simple_prompt_func_t(out IntPtr cred, IntPtr baton,  
     225#if WIN32 
     226        [Softec.CallConvCdecl] 
     227#endif 
     228        internal delegate IntPtr svn_auth_simple_prompt_func_t(out IntPtr cred, IntPtr baton,  
    217229                                                               IntPtr realm, IntPtr username,  
    218230                                                               int may_save, IntPtr pool); 
    219231 
     232#if WIN32 
     233        [Softec.CallConvCdecl] 
     234#endif 
    220235        internal delegate IntPtr svn_auth_username_prompt_func_t(out IntPtr cred, IntPtr baton,  
    221236                                                                 IntPtr realm, int may_save,  
    222237                                                                 IntPtr pool); 
    223238                                                                
    224         //[CLSCompliant(false)] 
     239#if WIN32 
     240        [Softec.CallConvCdecl] 
     241#endif 
    225242        internal delegate IntPtr svn_auth_ssl_server_trust_prompt_func_t(out IntPtr cred, IntPtr baton,  
    226243                                                                         IntPtr realm, uint failures,  
     
    228245                                                                         int may_save, IntPtr pool); 
    229246 
     247#if WIN32 
     248        [Softec.CallConvCdecl] 
     249#endif 
    230250        internal delegate IntPtr svn_auth_ssl_client_cert_prompt_func_t(out IntPtr cred, IntPtr baton, 
    231251                                                                        IntPtr realm, int may_save, 
    232252                                                                        IntPtr pool); 
    233253 
     254#if WIN32 
     255        [Softec.CallConvCdecl] 
     256#endif 
    234257        internal delegate IntPtr svn_auth_ssl_client_cert_pw_prompt_func_t(out IntPtr cred,  
    235258                                                                           IntPtr baton, 
     
    286309 
    287310        #region SvnClient 
    288         internal delegate IntPtr svn_client_get_commit_log_t(out IntPtr log_message,  
     311#if WIN32 
     312        [Softec.CallConvCdecl] 
     313#endif 
     314        internal delegate IntPtr svn_client_get_commit_log_t(out IntPtr log_message,  
    289315                                                             out IntPtr tmp_file,  
    290316                                                             IntPtr commit_items, IntPtr baton, 
    291317                                                             IntPtr pool); 
    292318                                                              
    293         internal delegate void svn_wc_status_func_t(IntPtr baton, IntPtr path, IntPtr status); 
    294          
    295         internal delegate IntPtr svn_log_message_receiver_t(IntPtr baton, IntPtr changed_paths,  
     319#if WIN32 
     320        [Softec.CallConvCdecl] 
     321#endif 
     322        internal delegate void svn_wc_status_func_t(IntPtr baton, IntPtr path, IntPtr status); 
     323         
     324#if WIN32 
     325        [Softec.CallConvCdecl] 
     326#endif 
     327        internal delegate IntPtr svn_log_message_receiver_t(IntPtr baton, IntPtr changed_paths,  
    296328                                                            int revision, IntPtr author,  
    297329                                                            IntPtr date, IntPtr message,  
    298330                                                            IntPtr pool); 
    299331                                                             
    300         internal delegate IntPtr svn_client_blame_receiver_t(IntPtr baton, long line_no,  
     332#if WIN32 
     333        [Softec.CallConvCdecl] 
     334#endif 
     335        internal delegate IntPtr svn_client_blame_receiver_t(IntPtr baton, long line_no,  
    301336                                                             int revision, IntPtr author,  
    302337                                                             IntPtr date, IntPtr line,  
  • trunk/SubversionSharp/windll/src/svnclient.vcproj

    r82 r86  
    2020                Name="VCCLCompilerTool" 
    2121                Optimization="0" 
    22                 AdditionalIncludeDirectories=""..\..\..\subversion-debug\include";"..\..\..\subversion-debug\include\apr";"..\..\..\subversion-debug\include\apr-util";"..\..\..\subversion-debug\include\apr-iconv"
     22                AdditionalIncludeDirectories="..\..\..\SVN\src-1.0.9\subversion\include;..\..\..\SVN\src-1.0.9\apr\include;..\..\..\SVN\src-1.0.9\apr-util\include;..\..\..\SVN\src-1.0.9\apr-iconv\include
    2323                PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SVNCLIENT_EXPORTS" 
    2424                MinimalRebuild="TRUE" 
     
    3333            <Tool 
    3434                Name="VCLinkerTool" 
    35                 AdditionalDependencies="libapr.lib libaprutil.lib xml.lib libapriconv.lib libsvn_client-1.lib libsvn_delta-1.lib libsvn_diff-1.lib libsvn_ra-1.lib libsvn_ra_dav-1.lib libsvn_ra_local-1.lib libsvn_ra_svn-1.lib libsvn_fs-1.lib libsvn_repos-1.lib libsvn_subr-1.lib libsvn_wc-1.lib libneon.lib libdb42.lib ws2_32.lib" 
     35                AdditionalDependencies="libapr.lib libaprutil.lib xml.lib libapriconv.lib libsvn_client-1.lib libsvn_delta-1.lib libsvn_diff-1.lib libsvn_ra-1.lib libsvn_ra_dav-1.lib libsvn_ra_local-1.lib libsvn_ra_svn-1.lib libsvn_fs-1.lib libsvn_repos-1.lib libsvn_subr-1.lib libsvn_wc-1.lib libneonD.lib libdb42.lib ws2_32.lib" 
    3636                OutputFile="$(OutDir)/svn_client-1.dll" 
    3737                LinkIncremental="2" 
    38                 AdditionalLibraryDirectories="..\..\..\subversion-debug\lib;..\..\..\subversion-debug\lib\apr;"..\..\..\subversion-debug\lib\apr-util";"..\..\..\subversion-debug\lib\apr-iconv";..\..\..\subversion-debug\lib\neon;"..\..\..\subversion-debug\db4-win32\lib"" 
    39                 IgnoreDefaultLibraryNames="LIBC;LIBCMTD;MSVCRTD
     38                AdditionalLibraryDirectories=""..\..\..\SVN\src-1.0.9\Debug\subversion\libsvn_client";"..\..\..\SVN\src-1.0.9\Debug\subversion\libsvn_delta";"..\..\..\SVN\src-1.0.9\Debug\subversion\libsvn_diff";"..\..\..\SVN\src-1.0.9\Debug\subversion\libsvn_ra";"..\..\..\SVN\src-1.0.9\Debug\subversion\libsvn_ra_dav";"..\..\..\SVN\src-1.0.9\Debug\subversion\libsvn_ra_local";"..\..\..\SVN\src-1.0.9\Debug\subversion\libsvn_ra_svn";"..\..\..\SVN\src-1.0.9\Debug\subversion\libsvn_fs";"..\..\..\SVN\src-1.0.9\Debug\subversion\libsvn_repos";"..\..\..\SVN\src-1.0.9\Debug\subversion\libsvn_subr";"..\..\..\SVN\src-1.0.9\Debug\subversion\libsvn_wc";"..\..\..\SVN\src-1.0.9\apr\Debug";"..\..\..\SVN\src-1.0.9\apr-iconv\Debug";"..\..\..\SVN\src-1.0.9\apr-util\Debug";"..\..\..\SVN\src-1.0.9\apr-util\xml\expat\lib\LibD";"..\..\..\SVN\src-1.0.9\neon";"..\..\..\SVN\src-1.0.9\db4-win32\lib"" 
     39                IgnoreDefaultLibraryNames="LIBC;LIBCMTD
    4040                ModuleDefinitionFile="svnclient.def" 
    4141                GenerateDebugInformation="TRUE" 
     
    7474                Name="VCCLCompilerTool" 
    7575                Optimization="2" 
    76                 AdditionalIncludeDirectories="..\..\..\subversion\include;..\..\..\subversion\include\apr;"..\..\..\subversion\include\apr-util";"..\..\..\subversion\include\apr-iconv"
     76                AdditionalIncludeDirectories="..\..\..\SVN\src-1.0.9\subversion\include;..\..\..\SVN\src-1.0.9\apr\include;..\..\..\SVN\src-1.0.9\apr-util\include;..\..\..\SVN\src-1.0.9\apr-iconv\include
    7777                PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SVNCLIENT_EXPORTS" 
    7878                BasicRuntimeChecks="0" 
     
    8989                OutputFile="$(OutDir)/svn_client-1.dll" 
    9090                LinkIncremental="1" 
    91                 AdditionalLibraryDirectories="..\..\..\subversion\lib;..\..\..\subversion\lib\apr;"..\..\..\subversion\lib\apr-util";"..\..\..\subversion\lib\apr-iconv";..\..\..\subversion\lib\neon;"..\..\..\subversion\db4-win32\lib"" 
     91                AdditionalLibraryDirectories=""..\..\..\SVN\src-1.0.9\Release\subversion\libsvn_client";"..\..\..\SVN\src-1.0.9\Release\subversion\libsvn_delta";"..\..\..\SVN\src-1.0.9\Release\subversion\libsvn_diff";"..\..\..\SVN\src-1.0.9\Release\subversion\libsvn_ra";"..\..\..\SVN\src-1.0.9\Release\subversion\libsvn_ra_dav";"..\..\..\SVN\src-1.0.9\Release\subversion\libsvn_ra_local";"..\..\..\SVN\src-1.0.9\Release\subversion\libsvn_ra_svn";"..\..\..\SVN\src-1.0.9\Release\subversion\libsvn_fs";"..\..\..\SVN\src-1.0.9\Release\subversion\libsvn_repos";"..\..\..\SVN\src-1.0.9\Release\subversion\libsvn_subr";"..\..\..\SVN\src-1.0.9\Release\subversion\libsvn_wc";"..\..\..\SVN\src-1.0.9\apr\Release";"..\..\..\SVN\src-1.0.9\apr-iconv\Release";"..\..\..\SVN\src-1.0.9\apr-util\Release";"..\..\..\SVN\src-1.0.9\apr-util\xml\expat\lib\LibR";"..\..\..\SVN\src-1.0.9\neon";"..\..\..\SVN\src-1.0.9\db4-win32\lib"" 
    9292                IgnoreDefaultLibraryNames="LIBC;LIBCMT" 
    9393                ModuleDefinitionFile="svnclient.def"