blob: 5dfa97272e53b01ce35639c5f2eb5c75fffcecc7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
/***************************************************************
__MPU_SYMBOLS.H
This file contains declarations of interface for define
WEAK, ALIAS symbols in object files.
PART OF : MPU - library .
USAGE : Internal only .
NOTE : Include "libmpu.h" before this FILE .
Copyright (C) 2000 - 2024 by Andrew V.Kosteltsev.
All Rights Reserved.
***************************************************************/
#ifndef __MPU_SYMBOLS_H
#define __MPU_SYMBOLS_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __ASSEMBLER__
#define __mpu_strong_alias( name, symbol ) \
extern __typeof(name) symbol __attribute__ ((alias( #name )))
#if defined( HAVE_WEAK_SYMBOLS ) && !defined( __CYGWIN__ )
/*********************************************************
HAVE_WEAK_SYMBOLS:
*/
#define __mpu_weak_alias( name, symbol ) \
extern __typeof(name) symbol __attribute__ ((weak, alias( #name )))
#define __MPU_WEAK 1
#else /* HAVE_WEAK_SYMBOLS */
/*********************************************************
don't HAVE_WEAK_SYMBOLS (for example, in Cygwin):
*/
#define __mpu_weak_alias( name, symbol ) \
__mpu_strong_alias( name, symbol )
#define __MPU_WEAK 0
#endif /* HAVE_WEAK_SYMBOLS */
#endif /* __ASSEMBLER__ */
#if defined( SHARED ) && defined( HAVE_HIDDEN_VISIBILITY_ATTRIBUTE )
#define __mpu_hidden_decl(name) \
extern __typeof (name) __attribute__ ((visibility ("hidden"))) name
#else
#define __mpu_hidden_decl(name)
#endif
#ifdef __cplusplus
} /* ... extern "C" */
#endif
#endif /* __MPU_SYMBOLS_H */
|