Changeset 553ec57 in tol


Ignore:
Timestamp:
Jul 17, 2013, 1:39:10 PM (13 years ago)
Author:
Pedro Gea <pgea@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
1e1360e
Parents:
27e16c6
Message:

Refs #1710
Se incorpora una definición de snprintf análoga a la que se encuentra en libtolodbc.c para poder compilar este archivo.

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@5941 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/dbdrivers/libtolpgsql.c

    r27e16c6 r553ec57  
    4040#  endif
    4141#endif
     42
     43#ifdef _MSC_VER
     44
     45#define snprintf c99_snprintf
     46int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap)
     47{
     48    int count = -1;
     49    if (size != 0)
     50        count = _vsnprintf_s(str, size, _TRUNCATE, format, ap);
     51    if (count == -1)
     52        count = _vscprintf(format, ap);
     53    return count;
     54}
     55int c99_snprintf(char* str, size_t size, const char* format, ...)
     56{
     57    int count;
     58    va_list ap;
     59    va_start(ap, format);
     60    count = c99_vsnprintf(str, size, format, ap);
     61    va_end(ap);
     62    return count;
     63}
     64#endif // _MSC_VER
    4265
    4366#define PG_TYPE_BOOL 16
Note: See TracChangeset for help on using the changeset viewer.