From dc05d1b2d960b8ac51f1cb1b8d066af8f80517db Mon Sep 17 00:00:00 2001 From: Alex Hoppen Date: Thu, 2 May 2024 08:29:12 -0700 Subject: [PATCH] Rename `errno.h` and `stdio.h` to `swiftsyntax_errno.h` and `swiftsyntax_stdio.h` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In some build scenarios compilers get confused if a file named `errno.h` includes `errno.h`, even if it’s intended to be from a different directory. Renaming the files in swift-syntax works around that issue. --- .../include/{swiftsyntax => }/AtomicBool.h | 0 .../include/{swiftsyntax => }/_includes.h | 0 Sources/_SwiftSyntaxCShims/include/module.modulemap | 8 ++++---- .../include/{swiftsyntax/errno.h => swiftsyntax_errno.h} | 0 .../include/{swiftsyntax/stdio.h => swiftsyntax_stdio.h} | 0 5 files changed, 4 insertions(+), 4 deletions(-) rename Sources/_SwiftSyntaxCShims/include/{swiftsyntax => }/AtomicBool.h (100%) rename Sources/_SwiftSyntaxCShims/include/{swiftsyntax => }/_includes.h (100%) rename Sources/_SwiftSyntaxCShims/include/{swiftsyntax/errno.h => swiftsyntax_errno.h} (100%) rename Sources/_SwiftSyntaxCShims/include/{swiftsyntax/stdio.h => swiftsyntax_stdio.h} (100%) diff --git a/Sources/_SwiftSyntaxCShims/include/swiftsyntax/AtomicBool.h b/Sources/_SwiftSyntaxCShims/include/AtomicBool.h similarity index 100% rename from Sources/_SwiftSyntaxCShims/include/swiftsyntax/AtomicBool.h rename to Sources/_SwiftSyntaxCShims/include/AtomicBool.h diff --git a/Sources/_SwiftSyntaxCShims/include/swiftsyntax/_includes.h b/Sources/_SwiftSyntaxCShims/include/_includes.h similarity index 100% rename from Sources/_SwiftSyntaxCShims/include/swiftsyntax/_includes.h rename to Sources/_SwiftSyntaxCShims/include/_includes.h diff --git a/Sources/_SwiftSyntaxCShims/include/module.modulemap b/Sources/_SwiftSyntaxCShims/include/module.modulemap index 7c669d9a817..010d951f292 100644 --- a/Sources/_SwiftSyntaxCShims/include/module.modulemap +++ b/Sources/_SwiftSyntaxCShims/include/module.modulemap @@ -1,7 +1,7 @@ module _SwiftSyntaxCShims { - header "swiftsyntax/_includes.h" - header "swiftsyntax/AtomicBool.h" - header "swiftsyntax/errno.h" - header "swiftsyntax/stdio.h" + header "_includes.h" + header "AtomicBool.h" + header "swiftsyntax_errno.h" + header "swiftsyntax_stdio.h" export * } diff --git a/Sources/_SwiftSyntaxCShims/include/swiftsyntax/errno.h b/Sources/_SwiftSyntaxCShims/include/swiftsyntax_errno.h similarity index 100% rename from Sources/_SwiftSyntaxCShims/include/swiftsyntax/errno.h rename to Sources/_SwiftSyntaxCShims/include/swiftsyntax_errno.h diff --git a/Sources/_SwiftSyntaxCShims/include/swiftsyntax/stdio.h b/Sources/_SwiftSyntaxCShims/include/swiftsyntax_stdio.h similarity index 100% rename from Sources/_SwiftSyntaxCShims/include/swiftsyntax/stdio.h rename to Sources/_SwiftSyntaxCShims/include/swiftsyntax_stdio.h