You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Brady Johnson (JIRA)" <tu...@ws.apache.org> on 2007/08/10 19:05:47 UTC

[jira] Created: (TUSCANY-1529) Tuscany SDO native for windows is not msvc backwards compatible

Tuscany SDO native for windows is not msvc backwards compatible 
----------------------------------------------------------------

                 Key: TUSCANY-1529
                 URL: https://issues.apache.org/jira/browse/TUSCANY-1529
             Project: Tuscany
          Issue Type: Bug
          Components: C++ SDO
    Affects Versions: Cpp-M3
         Environment: MSVC 8.0 and 7.1
            Reporter: Brady Johnson
            Priority: Minor
             Fix For: Cpp-Next



I've been trying to compile Tuscany on platforms other than VSExpress (which is msvc 8.0) and Linux. 
I came across something that doesn't compile on msvc7.1 in SDODate.cpp. The problem is the definition
of localtime for windows. Its #define'd  as localtime_s for windows. A simple check for compiler version
would allow it to be defined for msvc 8.0 and anything previous, as follows:

#ifndef tuscany_localtime_r
#if defined(WIN32)  || defined (_WINDOWS)
  #if _MSC_VER < 1400 // _MSC_VER: 1400 is msvc 8.0, so anything less is pre 8.0
    #define tuscany_localtime_r(value, ignore) localtime(&value);
  #else
    #define tuscany_localtime_r(value, tmp_tm) localtime_s(&tmp_tm, &value);
  #endif
#else
  #define tuscany_localtime_r(value, tmp_tm) localtime_r(&value, &tmp_tm);
#endif
#endif // tuscany_localtime_r

--------------------
Brady Johnson
Lead Software Developer - HydraSCA
Rogue Wave Software - brady.johnson@roguewave.com


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [jira] Created: (TUSCANY-1529) Tuscany SDO native for windows is not msvc backwards compatible

Posted by Caroline Maynard <ce...@php.net>.
Brady Johnson (JIRA) wrote:
> Tuscany SDO native for windows is not msvc backwards compatible 
> ----------------------------------------------------------------

Don't I know it. In the PHP project the automated build servers for Win 
use VC6, so we are obliged to use that compiler in the SDO for PHP 
project. Since the Tuscany team decided to support only VC8, I usually 
find some minor problems porting the code over - you'll find a trail of 
these in the issues database where I've sent the fixes back as patches. 
It's not really a big problem, more an inconvenience. However it was a 
policy decision by the Tuscany committers at the time. YMMV.

Again, with the localtime behaviour, this came from concerns about using 
non-reentrant versions of localtime(). You may not have noticed the 
SDOUserMacros.h file - this mechanism was introduced so that consumers 
of Tuscany C++ could adapt the macros to their environment. You can see 
the PHP version here:

http://cvs.php.net/viewvc.cgi/pecl/sdo/commonj/sdo/SDOUserMacros.h?view=markup

It would be helpful if you would keep this mechanism in place.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-1529) Tuscany SDO native for windows is not msvc backwards compatible

Posted by "Brady Johnson (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brady Johnson updated TUSCANY-1529:
-----------------------------------

    Attachment: tuscany_patch_jira1529


Uploading patch.


> Tuscany SDO native for windows is not msvc backwards compatible 
> ----------------------------------------------------------------
>
>                 Key: TUSCANY-1529
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1529
>             Project: Tuscany
>          Issue Type: Bug
>          Components: C++ SDO
>    Affects Versions: Cpp-M3
>         Environment: MSVC 8.0 and 7.1
>            Reporter: Brady Johnson
>            Priority: Minor
>             Fix For: Cpp-Next
>
>         Attachments: tuscany_patch_jira1529
>
>
> I've been trying to compile Tuscany on platforms other than VSExpress (which is msvc 8.0) and Linux. 
> I came across something that doesn't compile on msvc7.1 in SDODate.cpp. The problem is the definition
> of localtime for windows. Its #define'd  as localtime_s for windows. A simple check for compiler version
> would allow it to be defined for msvc 8.0 and anything previous, as follows:
> #ifndef tuscany_localtime_r
> #if defined(WIN32)  || defined (_WINDOWS)
>   #if _MSC_VER < 1400 // _MSC_VER: 1400 is msvc 8.0, so anything less is pre 8.0
>     #define tuscany_localtime_r(value, ignore) localtime(&value);
>   #else
>     #define tuscany_localtime_r(value, tmp_tm) localtime_s(&tmp_tm, &value);
>   #endif
> #else
>   #define tuscany_localtime_r(value, tmp_tm) localtime_r(&value, &tmp_tm);
> #endif
> #endif // tuscany_localtime_r
> --------------------
> Brady Johnson
> Lead Software Developer - HydraSCA
> Rogue Wave Software - brady.johnson@roguewave.com

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Closed: (TUSCANY-1529) Tuscany SDO native for windows is not msvc backwards compatible

Posted by "Pete Robbins (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pete Robbins closed TUSCANY-1529.
---------------------------------

    Resolution: Fixed

> Tuscany SDO native for windows is not msvc backwards compatible 
> ----------------------------------------------------------------
>
>                 Key: TUSCANY-1529
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1529
>             Project: Tuscany
>          Issue Type: Bug
>          Components: C++ SDO
>    Affects Versions: Cpp-M3
>         Environment: MSVC 8.0 and 7.1
>            Reporter: Brady Johnson
>            Priority: Minor
>             Fix For: Cpp-Next
>
>         Attachments: tuscany_patch_jira1529
>
>
> I've been trying to compile Tuscany on platforms other than VSExpress (which is msvc 8.0) and Linux. 
> I came across something that doesn't compile on msvc7.1 in SDODate.cpp. The problem is the definition
> of localtime for windows. Its #define'd  as localtime_s for windows. A simple check for compiler version
> would allow it to be defined for msvc 8.0 and anything previous, as follows:
> #ifndef tuscany_localtime_r
> #if defined(WIN32)  || defined (_WINDOWS)
>   #if _MSC_VER < 1400 // _MSC_VER: 1400 is msvc 8.0, so anything less is pre 8.0
>     #define tuscany_localtime_r(value, ignore) localtime(&value);
>   #else
>     #define tuscany_localtime_r(value, tmp_tm) localtime_s(&tmp_tm, &value);
>   #endif
> #else
>   #define tuscany_localtime_r(value, tmp_tm) localtime_r(&value, &tmp_tm);
> #endif
> #endif // tuscany_localtime_r
> --------------------
> Brady Johnson
> Lead Software Developer - HydraSCA
> Rogue Wave Software - brady.johnson@roguewave.com

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org