Changeset 3367 in CLRX


Ignore:
Timestamp:
Sep 13, 2017, 5:44:17 PM (13 months ago)
Author:
matszpk
Message:

CLRadeonExtender: Define STDC_XXXX_MACROS only if not defined. Use format macros in ReverseBits? (for portability).

Location:
CLRadeonExtender/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/CLRX/Config.h.in

    r3366 r3367  
    240240
    241241#if __cplusplus < 201103L || (__GNUC__ == 4 && __GNUC_MINOR__ < 8) || defined(HAVE_MINGW)
    242 #define __STDC_LIMIT_MACROS 1
    243 #define __STDC_FORMAT_MACROS 1
    244 #endif
    245 
    246 #endif
     242#  ifndef (__STDC_LIMIT_MACROS)
     243#    define __STDC_LIMIT_MACROS 1
     244#  endif
     245#  ifndef (__STDC_FORMAT_MACROS)
     246#    define __STDC_FORMAT_MACROS 1
     247#  endif
     248#endif
     249
     250#endif
  • CLRadeonExtender/trunk/samples/ReverseBits.cpp

    r3309 r3367  
    1919
    2020#include <cstdio>
     21#include <inttypes.h>
    2122#include <iostream>
    2223#include <memory>
     
    421422        printf("%08x:", cl_uint(i));
    422423        for (size_t j = i; j < size && j < i+16; j++)
    423             printf(" %02hhx", outData[j]);
     424            printf(" %02" PRIx8, outData[j]);
    424425        putchar('\n');
    425426    }
Note: See TracChangeset for help on using the changeset viewer.