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

Unified Diff: fusl/include/stddef.h

Issue 1573973002: Add a "fork" of musl as //fusl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fusl/include/stdbool.h ('k') | fusl/include/stdint.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fusl/include/stddef.h
diff --git a/fusl/include/stddef.h b/fusl/include/stddef.h
new file mode 100644
index 0000000000000000000000000000000000000000..bd753853503d94ca3759b2e451fffb68675e869b
--- /dev/null
+++ b/fusl/include/stddef.h
@@ -0,0 +1,25 @@
+#ifndef _STDDEF_H
+#define _STDDEF_H
+
+#ifdef __cplusplus
+#define NULL 0L
+#else
+#define NULL ((void*)0)
+#endif
+
+#define __NEED_ptrdiff_t
+#define __NEED_size_t
+#define __NEED_wchar_t
+#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
+#define __NEED_max_align_t
+#endif
+
+#include <bits/alltypes.h>
+
+#if __GNUC__ > 3
+#define offsetof(type, member) __builtin_offsetof(type, member)
+#else
+#define offsetof(type, member) ((size_t)( (char *)&(((type *)0)->member) - (char *)0 ))
+#endif
+
+#endif
« no previous file with comments | « fusl/include/stdbool.h ('k') | fusl/include/stdint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698