Changeset 931 for cpp/common


Ignore:
Timestamp:
05/28/20 17:56:12 (5 years ago)
Author:
Maciej Komosinski
Message:

Supported all platforms using either qsort_r() or qsort_s()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/common/nonstd.h

    r886 r931  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2019  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    5555//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.
    5656
    57 
     57#ifdef _MSC_VER
     58#define QSORT_R_USING_QSORT_S //qsort_r callers use this macro to adjust argument order in comparator, because microsoft and gcc/clang are incompatible here
     59#define qsort_r(base,nmemb,size,compar,context) qsort_s((base),(nmemb),(size),(compar),(context))
     60#endif
    5861
    5962#ifdef __BORLANDC__
Note: See TracChangeset for help on using the changeset viewer.