Changeset 842 for cpp/common


Ignore:
Timestamp:
12/08/18 05:33:49 (6 years ago)
Author:
Maciej Komosinski
Message:

Simple va_copy still needed for C++Builder

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/common/nonstd.h

    r424 r842  
    2020
    2121
    22 // ms visual c++
    23 #ifdef _MSC_VER
    24  #include <stdio.h> //this #include must be present before two #defines below can be used, otherwise one will see: '_vsnprintf': attributes inconsistent with previous declaration, stdio.h:358
    25  #define vsnprintf _vsnprintf
    26  #define snprintf _snprintf
    27 #endif
    28 
    29 #ifdef MOBILE2D
    30  #define strdup _strdup
    31 #endif
    3222
    3323/////////////////////////////////////////////////////// 64-bit int type and other macros
     
    6353#endif
    6454
     55
    6556//typedef unsigned char boolean; //niestety nie mozna uzyc 'bool' bo VC w rpcndr.h wlasnie tak definiuje booleana, jako unsigned char
    6657//typedef char byte; //rozne srodowiska c++ definiuja byte jako unsigned char! w javie jest inaczej -> trzeba i tak zmienic w portowanych zrodlach byte na char.
     58
     59
     60
     61#ifdef __BORLANDC__
     62 #define va_copy(to,from) ((to)=(from)) //borland's implementation of va_copy (the _Vacopy() function) copies from="" to to=NULL, and this behavior crashes our ssprintf_va(), so we prefer our simple macro since va_list is just a char* pointer in borland
     63#endif
     64
    6765
    6866//vsnprintf implementations support different standards, some only return -1 instead of the required number of characters
Note: See TracChangeset for help on using the changeset viewer.