aboutsummaryrefslogtreecommitdiffhomepage
path: root/embedfilesdir.c
blob: e2f223be76ff1adf4d381d5303fc0833574bb1b9 (plain) (blame)
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
#include <stddef.h>

struct embedfile {
   const char *name;
   const char *s;
   size_t len;
};

#define S(s) (char [4096]){s}, sizeof #s - 1

struct embedfile embedfilesdir[] = {
{"stddef.h", S("\
typedef __typeof__((char*)0 - (char*)0) ptrdiff_t;\n\
typedef __typeof__(sizeof 0) size_t;\n\
/*typedef __typeof__(L'a') wchar_t;*/\n\
#define NULL ((void *)0)\n\
#define offsetof(_Type, _Memb) ((size_t)(&((_Type *)0)->_Memb - (_Type *)0))\n\
")},

{"stdarg.h", S("\
typedef __builtin_va_list va_list;\n\
#ifndef __GNUC_VA_LIST\n\
#define __GNUC_VA_LIST\n\
typedef __builtin_va_list __gnuc_va_list;\n\
#endif\n\
#define va_start(ap,n)   __builtin_va_start(ap)\n\
#define va_arg(ap,type)  __builtin_va_arg(ap, type)\n\
#define va_copy(dst,src) (void)((dst)=(src))\n\
#define va_end(ap)       __builtin_va_end(ap)\n\
")},
   {NULL}
};

/* vim:set ts=3 sw=3 expandtab: */