disable __func__ in c89 compilers

This commit is contained in:
Daniel Mendler 2019-12-05 11:47:36 +01:00
parent 40177e18e5
commit 876c5fc3f6
No known key found for this signature in database
GPG Key ID: D88ADB2A2693CA43
2 changed files with 4 additions and 0 deletions

View File

@ -172,6 +172,7 @@ c89:
-e 's/\(PRI[iux]64\)/MP_\1/g' \
-e 's/uint\([0-9][0-9]*\)_t/mp_u\1/g' \
-e 's/int\([0-9][0-9]*\)_t/mp_i\1/g' \
-e 's/__func__/MP_FUNCTION_NAME/g' \
*.c tommath.h tommath_private.h demo/*.c demo/*.h etc/*.c
c99:
@ -194,6 +195,7 @@ c99:
-e 's/MP_\(PRI[iux]64\)/\1/g' \
-e 's/mp_u\([0-9][0-9]*\)/uint\1_t/g' \
-e 's/mp_i\([0-9][0-9]*\)/int\1_t/g' \
-e 's/MP_FUNCTION_NAME/__func__/g' \
*.c tommath.h tommath_private.h demo/*.c demo/*.h etc/*.c
astyle:

View File

@ -36,3 +36,5 @@ typedef __UINT64_TYPE__ mp_u64;
#define MP_PRIi64 MP_PRI64_PREFIX "i"
#define MP_PRIu64 MP_PRI64_PREFIX "u"
#define MP_PRIx64 MP_PRI64_PREFIX "x"
#define MP_FUNCTION_NAME __func__