mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-10-26 22:20:59 +01:00
Revert "MINOR: compiler: add FIXED_SIZE(size, type, name) macro"
This reverts commit 466a603b59ed77e9787398ecf1baf77c46ae57b1. Due to the last 2 commits, this macro is now unused, and will probably never be used, so let's get rid of that for now.
This commit is contained in:
parent
8277f891d2
commit
a931779dde
@ -515,28 +515,6 @@
|
|||||||
# define ALWAYS_PAD(x) _ALWAYS_PAD(x, __LINE__)
|
# define ALWAYS_PAD(x) _ALWAYS_PAD(x, __LINE__)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* force the struct member named <name> handled as <type> to be stored using
|
|
||||||
* <size> bytes, even if the type used is actually smaller than the
|
|
||||||
* expected <size>.
|
|
||||||
*
|
|
||||||
* This can be useful to ensure struct mapping consistency between
|
|
||||||
* platforms for which native types may differ in size.
|
|
||||||
*
|
|
||||||
* /!\ you must ensure <size> cannot be smaller than actual member size
|
|
||||||
* on supported platforms, because it would result in undefined behaviors
|
|
||||||
* on such systems.
|
|
||||||
*/
|
|
||||||
#ifndef FIXED_SIZE
|
|
||||||
# define _FIXED_SIZE(size, type, name) union { char __fixed_##name[size]; type name; };
|
|
||||||
# define FIXED_SIZE(size, type, name) _FIXED_SIZE(size, type, name)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* same as FIXED_SIZE_ARRAY but for arrays */
|
|
||||||
#ifndef FIXED_SIZE_ARRAY
|
|
||||||
# define _FIXED_SIZE_ARRAY(size, number, type, name) union { char __fixed_##name[size * number]; type name[number]; };
|
|
||||||
# define FIXED_SIZE_ARRAY(size, number, type, name) _FIXED_SIZE_ARRAY(size, number, type, name)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The THREAD_LOCAL type attribute defines thread-local storage and is defined
|
/* The THREAD_LOCAL type attribute defines thread-local storage and is defined
|
||||||
* to __thread when threads are enabled or empty when disabled.
|
* to __thread when threads are enabled or empty when disabled.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user