summaryrefslogtreecommitdiff
path: root/protocols/Tox/libtox/src/toxcore/ccompat.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-02-15 12:18:35 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-02-15 12:18:35 +0300
commit31e72718ee54867accf0b739a24adc86f8b7ab54 (patch)
treef964c10c5d97d9fe4fd2bd8187c250faedcb0fd7 /protocols/Tox/libtox/src/toxcore/ccompat.h
parent282e9c18d9d3b726cce3d2ef0babc88029661cb8 (diff)
libtox update
Diffstat (limited to 'protocols/Tox/libtox/src/toxcore/ccompat.h')
-rw-r--r--protocols/Tox/libtox/src/toxcore/ccompat.h19
1 files changed, 5 insertions, 14 deletions
diff --git a/protocols/Tox/libtox/src/toxcore/ccompat.h b/protocols/Tox/libtox/src/toxcore/ccompat.h
index 9ea6739a7d..47ab9ed2bf 100644
--- a/protocols/Tox/libtox/src/toxcore/ccompat.h
+++ b/protocols/Tox/libtox/src/toxcore/ccompat.h
@@ -26,7 +26,6 @@
#if !defined(DISABLE_VLA) && !defined(_MSC_VER) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
// C99 VLAs.
#define ALLOC_VLA(type, name, size) type name[size]
-#define SIZEOF_VLA sizeof
#else
// Emulation using alloca.
@@ -47,9 +46,7 @@
#endif
#define ALLOC_VLA(type, name, size) \
- const size_t name##_vla_size = (size) * sizeof(type); \
- type *const name = (type *)alloca(name##_vla_size)
-#define SIZEOF_VLA(name) name##_vla_size
+ type *const name = (type *)alloca((size) * sizeof(type))
#endif
@@ -72,16 +69,10 @@
#define STATIC_ASSERT_(cond, msg, line) typedef int static_assert_##line[(cond) ? 1 : -1]
#define STATIC_ASSERT(cond, msg, line) STATIC_ASSERT_(cond, msg, line)
#define static_assert(cond, msg) STATIC_ASSERT(cond, msg, __LINE__)
-#endif // !__GNUC__
-#endif // !static_assert
-#endif // !__cplusplus
-
-#ifdef __GNUC__
-#define GNU_PRINTF(f, a) __attribute__((__format__(__printf__, f, a)))
-#else
-#define GNU_PRINTF(f, a)
-#endif
+#endif /* !__GNUC__ */
+#endif /* !static_assert */
+#endif /* !__cplusplus */
//!TOKSTYLE+
-#endif // C_TOXCORE_TOXCORE_CCOMPAT_H
+#endif /* C_TOXCORE_TOXCORE_CCOMPAT_H */