Menu

Support for VC++ 6 and BCC 5.9

2008-04-28
2013-05-28
  • Dwayne Boone

    Dwayne Boone - 2008-04-28

    Hi,

    We (ZeroC) currently use mcpp with both MSVC++ 6.0 and BCC 5.9 (aka C++Builder 2007). The following 2.7 patch provides the changes needed to support these two compilers. Basically it is just the two new noconfig/*.dif files plus one change that was required to an ifdef in eval.c for VC++ 6.0. It would be appreciated if you could add this to mcpp 2.7.1

    Regards,
    Dwayne

    diff -N -r -c ../mcpp-2.7-old/noconfig/bc59.dif ./noconfig/bc59.dif
    *** ../mcpp-2.7-old/noconfig/bc59.dif   1969-12-31 20:30:00.000000000 -0330
    --- ./noconfig/bc59.dif 2008-04-28 09:36:41.000000000 -0230
    ***************
    *** 0 ****
    --- 1,44 ----
    + *** noconfig.H        2007-01-30 00:29:12.000000000 +0900
    + --- noconfig.H.bc59   2007-01-30 01:41:40.000000000 +0900
    + ***************
    + *** 15,21 ****
    +    */
    +  
    +   /* Define target operating-system.  */
    + ! #define SYSTEM              SYS_FREEBSD
    +  
    +   /* Define target compiler.          */
    +   #ifndef COMPILER
    + --- 15,21 ----
    +    */
    +  
    +   /* Define target operating-system.  */
    + ! #define SYSTEM              SYS_WIN32
    +  
    +   /* Define target compiler.          */
    +   #ifndef COMPILER
    + ***************
    + *** 26,36 ****
    +   #define HOST_SYSTEM         SYSTEM
    +  
    +   /* Define host compiler.            */
    + ! #define HOST_COMPILER       GNUC
    +  
    +   /* Version message.                 */
    +   /* "MCPP V.2.* (200y/mm) compiled by " precedes VERSION_MSG */
    + ! #define VERSION_MSG         "GCC 3.4"
    +   #if     0
    +       "LCC-Win32 2006-03"
    +       "Visual C 2005"
    + --- 26,36 ----
    +   #define HOST_SYSTEM         SYSTEM
    +  
    +   /* Define host compiler.            */
    + ! #define HOST_COMPILER       BORLANDC
    +  
    +   /* Version message.                 */
    +   /* "MCPP V.2.* (200y/mm) compiled by " precedes VERSION_MSG */
    + ! #define VERSION_MSG         "BCC V.5.9"
    +   #if     0
    +       "LCC-Win32 2006-03"
    +       "Visual C 2005"
    diff -N -r -c ../mcpp-2.7-old/noconfig/vc6.dif ./noconfig/vc6.dif
    *** ../mcpp-2.7-old/noconfig/vc6.dif    1969-12-31 20:30:00.000000000 -0330
    --- ./noconfig/vc6.dif  2008-04-28 09:35:32.000000000 -0230
    ***************
    *** 0 ****
    --- 1,67 ----
    + *** noconfig.H        2008-02-21 17:24:21.000000000 +0900
    + --- noconfig.H.vc6 2008-02-21 17:30:24.000000000 +0900
    + ***************
    + *** 15,21 ****
    +    */
    +  
    +   /* Define target operating-system.  */
    + ! #define SYSTEM              SYS_FREEBSD
    +  
    +   /* Define target compiler.          */
    +   #ifndef COMPILER
    + --- 15,21 ----
    +    */
    +  
    +   /* Define target operating-system.  */
    + ! #define SYSTEM              SYS_WIN32
    +  
    +   /* Define target compiler.          */
    +   #ifndef COMPILER
    + ***************
    + *** 26,36 ****
    +   #define HOST_SYSTEM         SYSTEM
    +  
    +   /* Define host compiler.            */
    + ! #define HOST_COMPILER       GNUC
    +  
    +   /* Version message.                 */
    +   /* "MCPP V.2.* (200y/mm) compiled by " precedes VERSION_MSG */
    + ! #define VERSION_MSG         "GCC 3.4"
    +   #if     0
    +       "LCC-Win32 2006-03"
    +       "Visual C 2005"
    + --- 26,36 ----
    +   #define HOST_SYSTEM         SYSTEM
    +  
    +   /* Define host compiler.            */
    + ! #define HOST_COMPILER       MSC
    +  
    +   /* Version message.                 */
    +   /* "MCPP V.2.* (200y/mm) compiled by " precedes VERSION_MSG */
    + ! #define VERSION_MSG         "Visual C 6"
    +   #if     0
    +       "LCC-Win32 2006-03"
    +       "Visual C 2005"
    + ***************
    + *** 266,275 ****
    +   #define ONE_PASS            TRUE
    +   #endif
    +   #define COMPILER_EXT        "_MSC_VER"
    + ! #define COMPILER_EXT_VAL    "1200"
    +       /* VC 2002: "1300", VC 2003: "1310", VC 2005: "1400", VC 2008: "1500"   */
    +   #define COMPILER_EXT2       "_MSC_FULL_VER"
    + ! #define COMPILER_EXT2_VAL   "12008804"
    +       /* VC 2002:13009466, VC 2003:13103077, VC 2005: "140050320" */
    +       /* VC 2008 "150021022"  */
    +   #define COMPILER_SP1        "_MSC_EXTENSIONS"
    + --- 266,275 ----
    +   #define ONE_PASS            TRUE
    +   #endif
    +   #define COMPILER_EXT        "_MSC_VER"
    + ! #define COMPILER_EXT_VAL    "1200"
    +       /* VC 2002: "1300", VC 2003: "1310", VC 2005: "1400", VC 2008: "1500"   */
    +   #define COMPILER_EXT2       "_MSC_FULL_VER"
    + ! #define COMPILER_EXT2_VAL   "12008804"
    +       /* VC 2002:13009466, VC 2003:13103077, VC 2005: "140050320" */
    +       /* VC 2008 "150021022"  */
    +   #define COMPILER_SP1        "_MSC_EXTENSIONS"
    diff -N -r -c ../mcpp-2.7-old/src/eval.c ./src/eval.c
    *** ../mcpp-2.7-old/src/eval.c  2008-03-17 01:16:53.000000000 -0230
    --- ./src/eval.c        2008-04-28 09:37:40.000000000 -0230
    ***************
    *** 196,202 ****
      #define S_PDOUBLE   (sizeof (double *))
      #define S_PFPTR     (sizeof (int (*)()))
      #if HAVE_LONG_LONG
    ! #if HOST_COMPILER == BORLANDC
      #define S_LLINT     (sizeof (__int64))
      #define S_PLLINT    (sizeof (__int64 *))
      #else
    --- 196,202 ----
      #define S_PDOUBLE   (sizeof (double *))
      #define S_PFPTR     (sizeof (int (*)()))
      #if HAVE_LONG_LONG
    ! #if (HOST_COMPILER == BORLANDC) || (defined(_MSC_VER) && (_MSC_VER < 1300))
      #define S_LLINT     (sizeof (__int64))
      #define S_PLLINT    (sizeof (__int64 *))
      #else

     
    • Kiyoshi Matsui

      Kiyoshi Matsui - 2008-04-29

      Thanks for the patches!
      Would you inform me also about the predefined macros __BORLANDC__, __BCPLUSPLUS__ and __TURBOC__ for C++Builder 2007?

       
    • Dwayne Boone

      Dwayne Boone - 2008-05-01

      C++Builder 2007 R2 (BCC 5.93) defines all three of those macros as 0x5930

       
    • Kiyoshi Matsui

      Kiyoshi Matsui - 2008-05-02

      Thanks.  I took the patches into vc6.dif and bc59.dif, and committed SVN revision 99.

       
    • Dwayne Boone

      Dwayne Boone - 2009-03-03

      We recently tried mcpp with C++Builder 2009 and it worked fine. If you want to add a diff file for the compiler, the version that bcc32.exe shows is 6.1 and __BORLANDC__, __BCPLUSPLUS__ and __TURBOC__ are all defined to 0x610.

       
    • Kiyoshi Matsui

      Kiyoshi Matsui - 2009-03-04

      Thanks for the information on C++ Builder 2009!

      On the next release of mcpp, I will remove the difference files for Visual C++, Borland C++ (C++ Builder) and LCC-Win32.  Instead, I will provide a macro named SAME_VERSION for the compiler-specific-build of Visual C++ and Borland C++.  If you specify SAME_VERSION on the 'make' command line, noconfig.H will assume that the target compiler and its version are the same with those of host (build) compiler, and the version macros such as _MSC_VER or __BORLANDC__ will be defined evaluating the values on the host compiler.  Else, you must edit noconfig.H referring the comments in it.

      I will add your information into the comments in noconfig.H.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.