Made changes to prevent compiler/linker errors of express.

* Renamed __in to __i in LISTdo_links macro because __in is a reserved macro for MSVC.
* Renamed isascii to __isascii for MSVC.
* Added __MSVC__ to compiler flags and use it.
This commit is contained in:
davyw
2011-12-07 18:45:42 -05:00
committed by Mark Pictor
parent 6226717d18
commit 879f5092b7
4 changed files with 11 additions and 7 deletions
+1 -1
View File
@@ -239,7 +239,7 @@ set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/include/scl_version_stri
if(MSVC)
# add_definitions( -Wall )
add_definitions( -D__STDC__ -D__WIN32__ )
add_definitions( -D__MSVC__ -D__STDC__ -D__WIN32__ )
# Disable warning for preferred usage of secure functions (example strcpy should be strcpy_s, ...)
add_definitions( -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS )
else()
+1 -1
View File
@@ -111,7 +111,7 @@ typedef int ( *intFuncptr )();
/******************************/
#if !defined(static_inline)
#if !defined(__GNUC__) || defined(__STRICT_ANSI)
#if (!defined(__GNUC__) && !defined(__MSVC__)) || defined(__STRICT_ANSI)
#define static_inline
#undef supports_inline_functions
#else
+5 -1
View File
@@ -162,7 +162,11 @@ SCANnextchar( char * buffer ) {
SCANbuffer.numRead--;
#endif
buffer[0] = *( SCANcurrent++ );
if( !isascii( buffer[0] ) ) {
#ifdef __MSVC__
if( !__isascii( buffer[0] ) ) {
#else
if( !isascii( buffer[0] ) ) {
#endif
ERRORreport_with_line( ERROR_nonascii_char, yylineno,
0xff & buffer[0] );
buffer[0] = ' '; /* substitute space */
+4 -4
View File
@@ -117,10 +117,10 @@ GLOBAL Linked_List LINK__l; /* for LISTcreate_with macro - ugh */
(elt) = (type)((__p)->data);
#define LISTdo_links(list, link) \
{Linked_List __in = (list); \
Link link; \
if (__in != LIST_NULL) { \
for ((link) = __in->mark; ((link) = (link)->next) != __in->mark; ) {
{Linked_List __i = (list); \
Link link; \
if (__i != LIST_NULL) { \
for ((link) = __i->mark; ((link) = (link)->next) != __i->mark; ) {
#define LISTod }}}
/* accessing */