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

Unified Diff: fusl/tools/mkalltypes.sed

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/tools/ld.musl-clang.in ('k') | fusl/tools/musl-clang.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fusl/tools/mkalltypes.sed
diff --git a/fusl/tools/mkalltypes.sed b/fusl/tools/mkalltypes.sed
new file mode 100644
index 0000000000000000000000000000000000000000..fa15efc35f64e06e5a53108ca8e7c2faf5835369
--- /dev/null
+++ b/fusl/tools/mkalltypes.sed
@@ -0,0 +1,15 @@
+/^TYPEDEF/s/TYPEDEF \(.*\) \([^ ]*\);$/#if defined(__NEED_\2) \&\& !defined(__DEFINED_\2)\
+typedef \1 \2;\
+#define __DEFINED_\2\
+#endif\
+/
+/^STRUCT/s/STRUCT * \([^ ]*\) \(.*\);$/#if defined(__NEED_struct_\1) \&\& !defined(__DEFINED_struct_\1)\
+struct \1 \2;\
+#define __DEFINED_struct_\1\
+#endif\
+/
+/^UNION/s/UNION * \([^ ]*\) \(.*\);$/#if defined(__NEED_union_\1) \&\& !defined(__DEFINED_union_\1)\
+union \1 \2;\
+#define __DEFINED_union_\1\
+#endif\
+/
« no previous file with comments | « fusl/tools/ld.musl-clang.in ('k') | fusl/tools/musl-clang.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698