Skip to content

Commit

Permalink
Can't use _GNU_SOURCE anymore because reasons. Read https://forums.sw…
Browse files Browse the repository at this point in the history
…ift.org/t/swift-5-9-compilation-failure-on-linux-when-using-system-modules-that-import-select-h/66275 for details. LinuxSys is no longer system target, but a shimmed thingy. Probably for the best
  • Loading branch information
smumriak committed Oct 20, 2023
1 parent 32dec91 commit 9006f58
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 34 deletions.
4 changes: 0 additions & 4 deletions CCore/include/CCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,4 @@
#define AK_GET_EXISTING_CLOSED_ENUM_MACRO(_1,_2,NAME,...) NAME
#define AK_EXISTING_CLOSED_ENUM(...) AK_GET_EXISTING_CLOSED_ENUM_MACRO(__VA_ARGS__, AK_EXISTING_CLOSED_ENUM_TYPED, AK_EXISTING_CLOSED_ENUM_IMPLICIT)(__VA_ARGS__)

#if defined(__linux__) && !defined(_GNU_SOURCE)
#define _GNU_SOURCE
#endif

#endif
4 changes: 2 additions & 2 deletions CairoGraphics/Sources/CPango/CPango_umbrella.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
#ifndef CPango_umbrella_h
#define CPango_umbrella_h 1

#include "../../../CCore/include/CCore.h"

struct _PangoLayout {};
struct _PangoFontDescription {};
struct _PangoContext {};

#include <pango/pango.h>
#include <pango/pangocairo.h>

#include "../../../CCore/include/CCore.h"

#endif
16 changes: 8 additions & 8 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"location" : "https://github.com/recp/cglm",
"state" : {
"branch" : "master",
"revision" : "cb4a1b2677eaf3bcf6e8039db2bd0c054355052f"
"revision" : "d93b46bab709c80c3c738462134ae96724e60f5c"
}
},
{
Expand All @@ -23,26 +23,26 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-argument-parser",
"state" : {
"revision" : "fee6933f37fde9a5e12a1e4aeaa93fe60116ff2a",
"version" : "1.2.2"
"revision" : "8f4d2753f0e4778c76d5f05ad16c74f707390531",
"version" : "1.2.3"
}
},
{
"identity" : "swift-atomics",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-atomics.git",
"state" : {
"revision" : "6c89474e62719ddcc1e9614989fff2f68208fe10",
"version" : "1.1.0"
"revision" : "cd142fd2f64be2100422d658e7411e39489da985",
"version" : "1.2.0"
}
},
{
"identity" : "swift-collections",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-collections",
"state" : {
"revision" : "937e904258d22af6e447a0b72c0bc67583ef64a2",
"version" : "1.0.4"
"revision" : "a902f1823a7ff3c9ab2fba0f992396b948eda307",
"version" : "1.0.5"
}
},
{
Expand Down Expand Up @@ -78,7 +78,7 @@
"location" : "https://github.com/apple/swift-tools-support-core",
"state" : {
"branch" : "main",
"revision" : "ef2db24dbe7e39ebfabca2c10905909708c5738b"
"revision" : "3b13e439a341bbbfe0f710c7d1be37221745ef1a"
}
},
{
Expand Down
6 changes: 3 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ let package = Package(
// .library(.cGLib),
// .library(.swiftyGLib, type: .dynamic),

.library(.linuxSys),
.library(.linuxSys, type: .static),

.library(.tinyFoundation),

.library(.cVulkan),
.library(.cVulkan, type: .static),
.library(.volcano, type: .dynamic),
.library(.vulkanMemoryAllocatorAdapted, type: .static),
] + {
Expand Down Expand Up @@ -489,7 +489,7 @@ extension Target {
}

extension Target {
static let linuxSys: Target = systemLibrary(
static let linuxSys: Target = target(
name: "LinuxSys",
path: "Sys/Sources/LinuxSys"
)
Expand Down
4 changes: 2 additions & 2 deletions SwiftXlib/Sources/CXlib/CXlib_umbrella.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#ifndef CXlib_umbrella_h
#define CXlib_umbrella_h 1

#include "../../../CCore/include/CCore.h"

#ifndef XLIB_ILLEGAL_ACCESS
#define XLIB_ILLEGAL_ACCESS 1
#endif
Expand All @@ -32,8 +34,6 @@ struct _XIC {};
#include <X11/extensions/XInput2.h>
#include <X11/extensions/XI.h>

#include "../../../CCore/include/CCore.h"

#include "XlibResult.h"
#include "XlibEventKeyMask.h"
#include "XlibEventButtonMask.h"
Expand Down
2 changes: 1 addition & 1 deletion Sys/Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 5.7
// swift-tools-version: 5.8
//
// Package.swift
// Sys
Expand Down
9 changes: 9 additions & 0 deletions Sys/Sources/LinuxSys/LinuxSysEmpty.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//
// LinuxSysEmpty.c
// Sys
//
// Created by Serhii Mumriak on 19.10.2023
//

#define _GNU_SOURCE
#include "include/LinuxSys.h"
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef LinuxSys_umbrella_h
#define LinuxSys_umbrella_h 1

#include "../../../CCore/include/CCore.h"
#include "../../../../CCore/include/CCore.h"

#ifdef __linux__

Expand Down Expand Up @@ -37,6 +37,12 @@ AK_EXISTING_OPTIONS(EPOLL_EVENTS);

#include "wait_macros.h"

extern __pid_t gettid (void) __THROW;
extern int ppoll (struct pollfd *__fds, nfds_t __nfds,
const struct timespec *__timeout,
const __sigset_t *__ss)
__fortified_attr_access (__write_only__, 1, 2);

#endif

#endif
File renamed without changes.
11 changes: 0 additions & 11 deletions Sys/Sources/LinuxSys/module.modulemap

This file was deleted.

4 changes: 2 additions & 2 deletions Volcano/Sources/CClang/CClang_umbrella.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
#ifndef CClang_umbrella_h
#define CClang_umbrella_h 1

struct CXTranslationUnitImpl {};

#include "../../../CCore/include/CCore.h"

struct CXTranslationUnitImpl {};

AK_EXISTING_ENUM(CXCursorKind);
AK_EXISTING_ENUM(CXChildVisitResult);
AK_EXISTING_ENUM(CXTypeKind);
Expand Down

0 comments on commit 9006f58

Please sign in to comment.