Commit b878415e authored by Vivien Kraus's avatar Vivien Kraus
Browse files

Define a shortcut for frama-c

Frama-c does not know about =_Alignof=, because this is detected as a
compiler built-in.  I have not found any way more elegant than that.
parent 538197c1
......@@ -26,6 +26,11 @@
#include <assert.h>
#include "xalloc.h"
#ifdef __FRAMAC__
#undef alignof
#define alignof(x) (16)
#endif /* __FRAMAC__ */
TarotCounter *
tarot_counter_alloc (void)
{
......
......@@ -25,6 +25,11 @@
#include "xalloc.h"
#include <assert.h>
#ifdef __FRAMAC__
#undef alignof
#define alignof(x) (16)
#endif /* __FRAMAC__ */
TarotGameEventT
tarot_game_event_type (const TarotGameEvent * event)
{
......
......@@ -27,6 +27,11 @@
#include <stdalign.h>
#include "xalloc.h"
#ifdef __FRAMAC__
#undef alignof
#define alignof(x) (16)
#endif /* __FRAMAC__ */
void
tarot_features_variant (const TarotGame * game, size_t *n_players,
int *with_call)
......
......@@ -26,6 +26,11 @@
#include <stdalign.h>
#include "xalloc.h"
#ifdef __FRAMAC__
#undef alignof
#define alignof(x) (16)
#endif /* __FRAMAC__ */
TarotGame *
tarot_game_alloc (void)
{
......
......@@ -24,6 +24,11 @@
#include "xalloc.h"
#include <string.h>
#ifdef __FRAMAC__
#undef alignof
#define alignof(x) (16)
#endif /* __FRAMAC__ */
size_t
tarot_mcts_construct (size_t max_mem, char *mem, size_t *alignment,
size_t max_pool)
......
......@@ -32,6 +32,11 @@
#include <pool.h>
#include <tuneconfig.h>
#ifdef __FRAMAC__
#undef alignof
#define alignof(x) (16)
#endif /* __FRAMAC__ */
static void
select_next_move_deal (size_t n_players, TarotGameEvent * event,
struct yarrow256_ctx *rng)
......
......@@ -25,6 +25,11 @@
#include <tarot/mcts_private.h>
#include "xalloc.h"
#ifdef __FRAMAC__
#undef alignof
#define alignof(x) (16)
#endif /* __FRAMAC__ */
size_t
tarot_xml_parser_construct (size_t max_mem, char *mem, size_t *alignment,
const char *input)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment