blob: 4e408f06fd373a5d60184a9fe921b7858630a8db (
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
|
/**************************************************/
/* compiler building blocks: common definitions */
/**************************************************/
#ifndef __ASSEMBLER__
#ifdef __cplusplus
extern "C" {
#endif
/* namespace */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE 1
#endif
/* a minimal, modernized libiberty */
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <errno.h>
void xexit(int status);
int xatexit(void (*function)(void));
void * xcalloc(size_t, size_t);
void * xrealloc(void *, size_t);
char * xstrdup(const char *);
char * xstrndup(const char *, size_t);
char * xstrerror(int);
/* compatibility layer */
#undef __GLIBC_PREREQ
#define __GLIBC_PREREQ (ig,nored) (1)
#define _GLIBCXX_BEGIN_NAMESPACE_VERSION
#define _GLIBCXX_END_NAMESPACE_VERSION
#define _GLIBCXX_VISIBILITY(V) __attribute__ ((__visibility__ (#V)))
#undef _GLIBCXX_C_LOCALE_GNU
#define _GLIBCXX_C_LOCALE_GNU (1)
#undef __GCC_ATOMIC_INT_LOCK_FREE
#define __GCC_ATOMIC_INT_LOCK_FREE (2)
#undef ATOMIC_INT_LOCK_FREE
#define ATOMIC_INT_LOCK_FREE __GCC_ATOMIC_INT_LOCK_FREE
#ifdef __cplusplus
}
#endif
#endif /* __ASSEMBLER__ */
|