Added support for cmake 'Borland Makefiles' generator.
* Added __BORLAND__ flag to a number of places in the code. * Added BORLAND specific stuff to CMakeLists.txt files.
This commit is contained in:
@@ -112,7 +112,7 @@ typedef int ( *intFuncptr )();
|
||||
/******************************/
|
||||
|
||||
#if !defined(static_inline)
|
||||
#if (!defined(__GNUC__) && !defined(__MSVC__) && !defined(BORLAND)) || defined(__STRICT_ANSI)
|
||||
#if (!defined(__GNUC__) && !defined(__MSVC__)) || defined(__STRICT_ANSI)
|
||||
#define static_inline
|
||||
#undef supports_inline_functions
|
||||
#else
|
||||
|
||||
@@ -159,6 +159,8 @@ extern SCL_EXPRESS_EXPORT int LISTget_length PROTO( ( Linked_List ) );
|
||||
/* inline function definitions */
|
||||
/*******************************/
|
||||
|
||||
#if !defined(__BORLAND__)
|
||||
|
||||
#if supports_inline_functions || defined(LINKED_LIST_C)
|
||||
|
||||
static_inline
|
||||
@@ -175,4 +177,10 @@ LISTempty( Linked_List list ) {
|
||||
|
||||
#endif /* supports_inline_functions || defined(LINKED_LIST_C) */
|
||||
|
||||
#else
|
||||
|
||||
extern SCL_EXPRESS_EXPORT bool LISTempty( Linked_List list );
|
||||
|
||||
#endif
|
||||
|
||||
#endif /*LINKED_LIST_H*/
|
||||
|
||||
@@ -2265,7 +2265,7 @@ Severity STEPfile::AppendFile( istream * in, bool useTechCor ) {
|
||||
return SEVERITY_INPUT_ERROR;
|
||||
}
|
||||
|
||||
cout << "Reading Data from " << ( ( FileName().compare( "-" ) == 0 ) ? "standard input" : FileName() ) << "...\n";
|
||||
cout << "Reading Data from " << ( ( FileName().compare( "-" ) == 0 ) ? "standard input" : FileName().c_str() ) << "...\n";
|
||||
|
||||
// Read header
|
||||
rval = ReadHeader( *in );
|
||||
|
||||
+3
-1
@@ -24,8 +24,10 @@
|
||||
|
||||
//StrCmpIns - case-insensitive string compare. Original fct (replaced Sep 2011)
|
||||
//called PrettyTmpName(). Not doing so may affect sort order but that shouldn't hurt
|
||||
#ifdef _MSC_VER
|
||||
#if defined(__MSVC__)
|
||||
#define StrCmpIns(a,b) _stricmp(a,b)
|
||||
#elif defined(__BORLAND__)
|
||||
#define StrCmpIns(a,b) stricmp(a,b)
|
||||
#else
|
||||
#define StrCmpIns(a,b) strcasecmp(a,b)
|
||||
#endif
|
||||
|
||||
@@ -17,6 +17,10 @@ add_definitions( -DSCL_EXPPP_DLL_EXPORTS )
|
||||
add_definitions( -DSCL_EXPRESS_DLL_IMPORTS )
|
||||
endif()
|
||||
|
||||
if(BORLAND)
|
||||
add_definitions( -D__STDC__ )
|
||||
endif()
|
||||
|
||||
SCL_ADDLIB(libexppp "${LIBEXPPP_SOURCES}" express)
|
||||
set_target_properties(libexppp PROPERTIES PREFIX "")
|
||||
|
||||
|
||||
@@ -15,7 +15,11 @@ ELSE()
|
||||
set( YACC_FLAGS " " ) #FindYACC.cmake insists on 3, 5, or 7 args
|
||||
ENDIF()
|
||||
|
||||
IF(BORLAND)
|
||||
add_definitions( -DYYDEBUG=1 )#always define this. equivalent to 'bison -t'
|
||||
ELSE()
|
||||
add_definitions( -DYYDEBUG ) #always define this. equivalent to 'bison -t'
|
||||
ENDIF()
|
||||
|
||||
YACC_TARGET(ExpParser expparse.y ${CMAKE_CURRENT_BINARY_DIR}/expparse.c COMPILE_FLAGS ${YACC_FLAGS})
|
||||
LEX_TARGET(ExpScanner expscan.l ${CMAKE_CURRENT_BINARY_DIR}/expscan.c COMPILE_FLAGS ${LEX_FLAGS})
|
||||
@@ -74,6 +78,10 @@ if(MSVC OR BORLAND)
|
||||
add_definitions( -DYY_NO_UNISTD_H )
|
||||
endif()
|
||||
|
||||
if(BORLAND)
|
||||
add_definitions( -D__STDC__ )
|
||||
endif()
|
||||
|
||||
SCL_ADDLIB(express "${EXPRESS_SOURCES}" "")
|
||||
|
||||
if(APPLE)
|
||||
|
||||
@@ -220,3 +220,15 @@ LISTget_length( Linked_List list ) {
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
#if defined(__BORLAND__)
|
||||
bool LISTempty( Linked_List list ) {
|
||||
if( !list ) {
|
||||
return true;
|
||||
}
|
||||
if( list->mark->next == list->mark ) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2974,8 +2974,10 @@ void TYPEprint_typedefs( Type t, FILE * classes ) {
|
||||
}
|
||||
|
||||
/* Print the extern statement: */
|
||||
#if !defined(__BORLAND__)
|
||||
strncpy( nm, TYPEtd_name( t ), BUFSIZ );
|
||||
fprintf( classes, "extern %s *%s;\n", GetTypeDescriptorName( t ), nm );
|
||||
fprintf( classes, "extern %s *%s;\n", GetTypeDescriptorName( t ), nm );
|
||||
#endif
|
||||
}
|
||||
|
||||
/** return 1 if it is a multidimensional aggregate at the level passed in
|
||||
|
||||
Reference in New Issue
Block a user