Skip to content
Browse files

Change the predefined macro being used to detect C++Builder during co…

…mpilatin. It was _CPPBUILDER but has been changed to use the compiler supplied one, __BORLANDC__. Closes gh-2.
1 parent 95b1dbb commit 4decb961194509791b9979bf5a18d7b7ccbe2d6e @saadware committed
View
2 cppbuilderprojects/config.h
@@ -1,4 +1,4 @@
-/* protobuf config.h for CPPBUILDER. On other platforms, this is generated
+/* protobuf config.h for C++ Builder. On other platforms, this is generated
* automatically by autoheader / autoconf / configure. */
/* the location of <hash_map> */
View
3 cppbuilderprojects/libprotobuf-lite.cbproj
@@ -22,10 +22,11 @@
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
+ <BCC_wrch>false</BCC_wrch>
<TLIB_PageSize>32</TLIB_PageSize>
<BCC_PCHWithExternalTypeFiles>false</BCC_PCHWithExternalTypeFiles>
<BCC_SmartPCHCache>false</BCC_SmartPCHCache>
- <Defines>_CPPBUILDER;$(Defines)</Defines>
+ <Defines>$(Defines)</Defines>
<BCC_PCHUsage>None</BCC_PCHUsage>
<OutputExt>lib</OutputExt>
<ProjectType>CppStaticLibrary</ProjectType>
View
7 cppbuilderprojects/libprotobuf.cbproj
@@ -22,6 +22,7 @@
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
+ <BCC_wrch>false</BCC_wrch>
<BCC_wcsu>false</BCC_wcsu>
<BCC_SmartPCHCache>false</BCC_SmartPCHCache>
<BCC_PCHWithExternalTypeFiles>false</BCC_PCHWithExternalTypeFiles>
@@ -30,7 +31,7 @@
<TLIB_PageSize>256</TLIB_PageSize>
<IncludePath>..\src\google\protobuf\compiler\;..\src\google\protobuf\io\;..\src\google\protobuf\stubs\;..\src\google\protobuf\;..\src\;$(IncludePath)</IncludePath>
<OutputExt>lib</OutputExt>
- <Defines>_CPPBUILDER;PROTOBUF_USE_EXCEPTIONS;$(Defines)</Defines>
+ <Defines>PROTOBUF_USE_EXCEPTIONS;$(Defines)</Defines>
<ProjectType>CppStaticLibrary</ProjectType>
<PackageImports>vcl.bpi;rtl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;VclSmp.bpi;vclimg.bpi;svnui.bpi;svn.bpi;bdertl.bpi;TeeUI.bpi;TeeDB.bpi;Tee.bpi;vcldb.bpi;dbrtl.bpi;vcldbx.bpi;vcltouch.bpi;dsnap.bpi;dsnapcon.bpi;vclib.bpi;ibxpress.bpi;adortl.bpi;IndyCore.bpi;IndySystem.bpi;IndyProtocols.bpi;inet.bpi;intrawebdb_110_150.bpi;Intraweb_110_150.bpi;vclie.bpi;inetdb.bpi;webdsnap.bpi;websnap.bpi;inetdbbde.bpi;inetdbxpress.bpi;soaprtl.bpi;vclribbon.bpi;DbxCommonDriver.bpi;DBXInterBaseDriver.bpi;DBXMySQLDriver.bpi;dbexpress.bpi;dbxcds.bpi;DbxClientDriver.bpi;AzureCloud.bpi;dxCoreC15.bpi;dxGDIPlusC15.bpi;cxLibraryC15.bpi;dxThemeC15.bpi;cxPageControlC15.bpi;cxEditorsC15.bpi;cxDataC15.bpi;cxExtEditorsC15.bpi;cxGridC15.bpi;cxExportC15.bpi;dxmdsC15.bpi;dxComnC15.bpi;dxdbtrC15.bpi;dxtrmdC15.bpi;dxOrgCC15.bpi;dxDBOrC15.bpi;MssComponents.bpi</PackageImports>
<_TCHARMapping>char</_TCHARMapping>
@@ -60,6 +61,8 @@
<ILINK_LibraryPath>$(BDSLIB)\$(PLATFORM)\debug;$(ILINK_LibraryPath)</ILINK_LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''">
+ <BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed>
+ <BCC_DisableOptimizations>false</BCC_DisableOptimizations>
<Defines>NDEBUG;$(Defines)</Defines>
<TASM_Debugging>None</TASM_Debugging>
</PropertyGroup>
@@ -254,7 +257,7 @@
</BuildConfiguration>
</ItemGroup>
<Import Condition="Exists('$(BDS)\Bin\CodeGear.Cpp.Targets')" Project="$(BDS)\Bin\CodeGear.Cpp.Targets"/>
- <Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\8.0\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\8.0\UserTools.proj"/>
+ <Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
<ProjectExtensions>
<Borland.Personality>CPlusPlusBuilder.Personality.12</Borland.Personality>
<Borland.ProjectType>CppStaticLibrary</Borland.ProjectType>
View
2 cppbuilderprojects/libprotoc.cbproj
@@ -29,7 +29,7 @@
<BCC_PCHWithExternalTypeFiles>false</BCC_PCHWithExternalTypeFiles>
<BCC_PCHUsage>None</BCC_PCHUsage>
<IncludePath>..\src\google\protobuf\compiler\python\;..\src\google\protobuf\compiler\cpp\;..\src\google\protobuf\compiler\java\;..\src\google\protobuf\compiler\;..\src\google\protobuf\io\;..\src\google\protobuf\stubs\;..\src\google\protobuf\;..\src\;$(IncludePath)</IncludePath>
- <Defines>_CPPBUILDER;PROTOBUF_USE_EXCEPTIONS;$(Defines)</Defines>
+ <Defines>PROTOBUF_USE_EXCEPTIONS;$(Defines)</Defines>
<LinkPackageStatics>rtl.lib;vcl.lib</LinkPackageStatics>
<PackageImports>vcl.bpi;rtl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;VclSmp.bpi;vclimg.bpi;svnui.bpi;svn.bpi;bdertl.bpi;TeeUI.bpi;TeeDB.bpi;Tee.bpi;vcldb.bpi;dbrtl.bpi;vcldbx.bpi;vcltouch.bpi;dsnap.bpi;dsnapcon.bpi;vclib.bpi;ibxpress.bpi;adortl.bpi;IndyCore.bpi;IndySystem.bpi;IndyProtocols.bpi;inet.bpi;intrawebdb_110_150.bpi;Intraweb_110_150.bpi;vclie.bpi;inetdb.bpi;webdsnap.bpi;websnap.bpi;inetdbbde.bpi;inetdbxpress.bpi;soaprtl.bpi;vclribbon.bpi;DbxCommonDriver.bpi;DBXInterBaseDriver.bpi;DBXMySQLDriver.bpi;dbexpress.bpi;dbxcds.bpi;DbxClientDriver.bpi;AzureCloud.bpi;dxCoreC15.bpi;dxGDIPlusC15.bpi;cxLibraryC15.bpi;dxThemeC15.bpi;cxPageControlC15.bpi;cxEditorsC15.bpi;cxDataC15.bpi;cxExtEditorsC15.bpi;cxGridC15.bpi;cxExportC15.bpi;dxmdsC15.bpi;dxComnC15.bpi;dxdbtrC15.bpi;dxtrmdC15.bpi;dxOrgCC15.bpi;dxDBOrC15.bpi;MssComponents.bpi</PackageImports>
<_TCHARMapping>char</_TCHARMapping>
View
2 cppbuilderprojects/lite-test.cbproj
@@ -23,7 +23,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
<BCC_wcsu>false</BCC_wcsu>
- <Defines>_CPPBUILDER;$(Defines)</Defines>
+ <Defines>$(Defines)</Defines>
<LinkPackageImports>rtl.bpi;vcl.bpi</LinkPackageImports>
<Multithreaded>true</Multithreaded>
<ILINK_LibraryPath>Debug\Win32\;google\protobuf\;..\src\google\protobuf\;$(ILINK_LibraryPath)</ILINK_LibraryPath>
View
2 cppbuilderprojects/protoc.cbproj
@@ -24,7 +24,7 @@
<PropertyGroup Condition="'$(Base)'!=''">
<BCC_wcsu>false</BCC_wcsu>
<BCC_DisableOptimizations>true</BCC_DisableOptimizations>
- <Defines>_CPPBUILDER;PROTOBUF_USE_EXCEPTIONS;$(Defines)</Defines>
+ <Defines>PROTOBUF_USE_EXCEPTIONS;$(Defines)</Defines>
<LinkPackageImports>rtl.bpi;vcl.bpi</LinkPackageImports>
<Multithreaded>true</Multithreaded>
<ILINK_LibraryPath>Debug\Win32\;..\src\google\protobuf\compiler\;$(ILINK_LibraryPath)</ILINK_LibraryPath>
View
2 cppbuilderprojects/test_plugin.cbproj
@@ -28,7 +28,7 @@
<BCC_wrch>false</BCC_wrch>
<BCC_wcsu>false</BCC_wcsu>
<BCC_PCHUsage>None</BCC_PCHUsage>
- <Defines>_CPPBUILDER;$(Defines)</Defines>
+ <Defines>$(Defines)</Defines>
<LinkPackageStatics>rtl.lib;vcl.lib</LinkPackageStatics>
<OutputExt>exe</OutputExt>
<ILINK_LibraryPath>..\gtest\codegear\Debug\;Debug\Win32\;google\protobuf\compiler\cpp\;google\protobuf\;..\src\google\protobuf\;..\src\google\protobuf\compiler\python\;..\src\google\protobuf\compiler\java\;..\src\google\protobuf\testing\;..\src\google\protobuf\compiler\cpp\;..\src\google\protobuf\stubs\;..\src\google\protobuf\compiler\;..\src\google\protobuf\io\;$(ILINK_LibraryPath)</ILINK_LibraryPath>
View
2 cppbuilderprojects/tests.cbproj
@@ -28,7 +28,7 @@
<BCC_wrch>false</BCC_wrch>
<BCC_wcsu>false</BCC_wcsu>
<BCC_PCHUsage>None</BCC_PCHUsage>
- <Defines>_CPPBUILDER;$(Defines)</Defines>
+ <Defines>$(Defines)</Defines>
<LinkPackageStatics>rtl.lib;vcl.lib</LinkPackageStatics>
<OutputExt>exe</OutputExt>
<ILINK_LibraryPath>..\gtest\codegear\Debug\;Debug\Win32\;google\protobuf\compiler\cpp\;google\protobuf\;..\src\google\protobuf\;..\src\google\protobuf\compiler\python\;..\src\google\protobuf\compiler\java\;..\src\google\protobuf\testing\;..\src\google\protobuf\compiler\cpp\;..\src\google\protobuf\stubs\;..\src\google\protobuf\compiler\;..\src\google\protobuf\io\;$(ILINK_LibraryPath)</ILINK_LibraryPath>
View
2 src/google/protobuf/compiler/command_line_interface.cc
@@ -95,7 +95,7 @@ namespace compiler {
#endif
#endif
-#ifdef _CPPBUILDER
+#ifdef __BORLANDC__
#define _setmode setmode // use the WIN32 definition of setmode
#endif
View
2 src/google/protobuf/compiler/command_line_interface_unittest.cc
@@ -35,7 +35,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#if defined(_MSC_VER) || defined(_CPPBUILDER)
+#if defined(_MSC_VER) || defined(__BORLANDC__)
#include <io.h>
#else
#include <unistd.h>
View
2 src/google/protobuf/compiler/importer.cc
@@ -32,7 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#if defined (_MSC_VER) || defined (_CPPBUILDER)
+#if defined (_MSC_VER) || defined (__BORLANDC__)
#include <io.h>
#else
#include <unistd.h>
View
2 src/google/protobuf/compiler/plugin.cc
@@ -48,7 +48,7 @@
#include <unistd.h>
#endif
-#ifdef _CPPBUILDER
+#ifdef __BORLANDC__
#define _setmode setmode // use the WIN32 definition of setmode
#endif
View
2 src/google/protobuf/io/coded_stream.h
@@ -110,7 +110,7 @@
#define GOOGLE_PROTOBUF_IO_CODED_STREAM_H__
#include <string>
-#if defined(_MSC_VER) || defined(_CPPBUILDER)
+#if defined(_MSC_VER) || defined(__BORLANDC__)
#if defined(_M_IX86) && \
!defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
#define PROTOBUF_LITTLE_ENDIAN 1
View
2 src/google/protobuf/io/zero_copy_stream_impl.cc
@@ -32,7 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
-#if defined(_MSC_VER) || defined(_CPPBUILDER)
+#if defined(_MSC_VER) || defined(__BORLANDC__)
#include <io.h>
#else
#include <unistd.h>
View
2 src/google/protobuf/io/zero_copy_stream_unittest.cc
@@ -48,7 +48,7 @@
#include "config.h"
-#if defined(_MSC_VER) || defined(_CPPBUILDER)
+#if defined(_MSC_VER) || defined(__BORLANDC__)
#include <io.h>
#else
#include <unistd.h>
View
2 src/google/protobuf/message_unittest.cc
@@ -37,7 +37,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#if defined(_MSC_VER) || defined(_CPPBUILDER)
+#if defined(_MSC_VER) || defined(__BORLANDC__)
#include <io.h>
#else
#include <unistd.h>
View
4 src/google/protobuf/stubs/hash.h
@@ -35,7 +35,7 @@
#ifndef GOOGLE_PROTOBUF_STUBS_HASH_H__
#define GOOGLE_PROTOBUF_STUBS_HASH_H__
-#ifdef _CPPBUILDER
+#ifdef __BORLANDC__
#include <string>
#else
#include <string.h>
@@ -102,7 +102,7 @@ template <typename Key,
class hash_set : public std::set<Key, HashFcn> {
};
-#elif (defined(_MSC_VER) || defined(_CPPBUILDER)) && !defined(_STLPORT_VERSION)
+#elif (defined(_MSC_VER) || defined(__BORLANDC__)) && !defined(_STLPORT_VERSION)
template <typename Key>
struct hash : public HASH_NAMESPACE::hash_compare<Key> {
View
2 src/google/protobuf/testing/file.cc
@@ -40,7 +40,7 @@
#include <windows.h> // Find*File(). :(
#include <io.h>
#include <direct.h>
-#elif defined(_CPPBUILDER)
+#elif defined(__BORLANDC__)
#include <dir.h>
#include <dirent.h>
#include <io.h>
View
2 src/google/protobuf/testing/googletest.cc
@@ -41,7 +41,7 @@
#if defined(_MSC_VER)
#include <io.h>
#include <direct.h>
-#elif defined(_CPPBUILDER)
+#elif defined(__BORLANDC__)
#include <dir.h>
#include <io.h>
#else

1 comment on commit 4decb96

@saadware
Owner

This fixed #2

Please sign in to comment.
Something went wrong with that request. Please try again.