Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(812)

Side by Side Diff: fusl/src/internal/libc.h

Issue 1714623002: [fusl] clang-format fusl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: headers too Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #ifndef LIBC_H 1 #ifndef LIBC_H
2 #define LIBC_H 2 #define LIBC_H
3 3
4 #include <stdlib.h> 4 #include <stdlib.h>
5 #include <stdio.h> 5 #include <stdio.h>
6 #include <limits.h> 6 #include <limits.h>
7 7
8 struct __locale_map; 8 struct __locale_map;
9 9
10 struct __locale_struct { 10 struct __locale_struct {
11 » const struct __locale_map *volatile cat[6]; 11 const struct __locale_map* volatile cat[6];
12 }; 12 };
13 13
14 struct tls_module { 14 struct tls_module {
15 » struct tls_module *next; 15 struct tls_module* next;
16 » void *image; 16 void* image;
17 » size_t len, size, align, offset; 17 size_t len, size, align, offset;
18 }; 18 };
19 19
20 struct __libc { 20 struct __libc {
21 » int can_do_threads; 21 int can_do_threads;
22 » int threaded; 22 int threaded;
23 » int secure; 23 int secure;
24 » volatile int threads_minus_1; 24 volatile int threads_minus_1;
25 » size_t *auxv; 25 size_t* auxv;
26 » struct tls_module *tls_head; 26 struct tls_module* tls_head;
27 » size_t tls_size, tls_align, tls_cnt; 27 size_t tls_size, tls_align, tls_cnt;
28 » size_t page_size; 28 size_t page_size;
29 » struct __locale_struct global_locale; 29 struct __locale_struct global_locale;
30 }; 30 };
31 31
32 #ifndef PAGE_SIZE 32 #ifndef PAGE_SIZE
33 #define PAGE_SIZE libc.page_size 33 #define PAGE_SIZE libc.page_size
34 #endif 34 #endif
35 35
36 #ifdef __PIC__ 36 #ifdef __PIC__
37 #define ATTR_LIBC_VISIBILITY __attribute__((visibility("hidden"))) 37 #define ATTR_LIBC_VISIBILITY __attribute__((visibility("hidden")))
38 #else 38 #else
39 #define ATTR_LIBC_VISIBILITY 39 #define ATTR_LIBC_VISIBILITY
40 #endif 40 #endif
41 41
42 extern struct __libc __libc ATTR_LIBC_VISIBILITY; 42 extern struct __libc __libc ATTR_LIBC_VISIBILITY;
43 #define libc __libc 43 #define libc __libc
44 44
45 extern size_t __hwcap ATTR_LIBC_VISIBILITY; 45 extern size_t __hwcap ATTR_LIBC_VISIBILITY;
46 extern size_t __sysinfo ATTR_LIBC_VISIBILITY; 46 extern size_t __sysinfo ATTR_LIBC_VISIBILITY;
47 extern char *__progname, *__progname_full; 47 extern char *__progname, *__progname_full;
48 48
49 /* Designed to avoid any overhead in non-threaded processes */ 49 /* Designed to avoid any overhead in non-threaded processes */
50 void __lock(volatile int *) ATTR_LIBC_VISIBILITY; 50 void __lock(volatile int*) ATTR_LIBC_VISIBILITY;
51 void __unlock(volatile int *) ATTR_LIBC_VISIBILITY; 51 void __unlock(volatile int*) ATTR_LIBC_VISIBILITY;
52 int __lockfile(FILE *) ATTR_LIBC_VISIBILITY; 52 int __lockfile(FILE*) ATTR_LIBC_VISIBILITY;
53 void __unlockfile(FILE *) ATTR_LIBC_VISIBILITY; 53 void __unlockfile(FILE*) ATTR_LIBC_VISIBILITY;
54 #define LOCK(x) __lock(x) 54 #define LOCK(x) __lock(x)
55 #define UNLOCK(x) __unlock(x) 55 #define UNLOCK(x) __unlock(x)
56 56
57 void __synccall(void (*)(void *), void *); 57 void __synccall(void (*)(void*), void*);
58 int __setxid(int, int, int, int); 58 int __setxid(int, int, int, int);
59 59
60 extern char **__environ; 60 extern char** __environ;
61 61
62 #undef weak_alias 62 #undef weak_alias
63 #define weak_alias(old, new) \ 63 #define weak_alias(old, new) \
64 » extern __typeof(old) new __attribute__((weak, alias(#old))) 64 extern __typeof(old) new __attribute__((weak, alias(#old)))
65 65
66 #undef LFS64_2 66 #undef LFS64_2
67 #define LFS64_2(x, y) weak_alias(x, y) 67 #define LFS64_2(x, y) weak_alias(x, y)
68 68
69 #undef LFS64 69 #undef LFS64
70 #define LFS64(x) LFS64_2(x, x##64) 70 #define LFS64(x) LFS64_2(x, x##64)
71 71
72 #endif 72 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698