Skip to content
Snippets Groups Projects
Commit 7c0a6b37 authored by Kostyantyn Vorobyov's avatar Kostyantyn Vorobyov
Browse files

Separate function aliases into their own header

parent 6b73d17c
No related branches found
No related tags found
No related merge requests found
/**************************************************************************/
/* */
/* This file is part of Frama-C. */
/* */
/* Copyright (C) 2007-2017 */
/* CEA (Commissariat à l'énergie atomique et aux énergies */
/* alternatives) */
/* */
/* you can redistribute it and/or modify it under the terms of the GNU */
/* Lesser General Public License as published by the Free Software */
/* Foundation, version 2.1. */
/* */
/* It is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU Lesser General Public License for more details. */
/* */
/* See the GNU Lesser General Public License version 2.1 */
/* for more details (enclosed in the file licenses/LGPLv2.1). */
/* */
/**************************************************************************/
/*! ***********************************************************************
* \file e_acsl_alias.h
*
* \brief Function aliasing
***************************************************************************/
#ifndef E_ACSL_ALIAS
#define E_ACSL_ALIAS
/** Define `aliasname` as a strong alias for `name`. */
# define strong_alias(name, aliasname) _strong_alias(name, aliasname)
# define _strong_alias(name, aliasname) \
extern __typeof (name) aliasname __attribute__ ((alias (#name)));
/** Define `aliasname` as a weak alias for `name`. */
# define weak_alias(name, aliasname) _weak_alias (name, aliasname)
# define _weak_alias(name, aliasname) \
extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
#endif
......@@ -29,11 +29,11 @@
/* Should be included after
* printf, debug and assert but before the actual code */
#include <stddef.h>
#ifndef E_ACSL_MALLOC
#define E_ACSL_MALLOC
#include <stddef.h>
/** Define `aliasname` as a strong alias for `name`. */
# define strong_alias(name, aliasname) _strong_alias(name, aliasname)
# define _strong_alias(name, aliasname) \
......
......@@ -34,6 +34,7 @@
#include "e_acsl_printf.h"
#include "e_acsl_debug.h"
#include "e_acsl_assert.h"
#include "e_acsl_alias.h"
#include "e_acsl_malloc.h"
#include "e_acsl_safe_locations.h"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment