detached d0091a9

purego: Fix for darwin (#200)

Closes #201
commit
d0091a93debe061a7beccbdc1bb5fbc3c3abb088
author
TotallyGamerJet · · 2024-01-18 14:35 UTC
committer
Hajime Hoshi · · 2024-01-18 14:41 UTC
parent
11c42be
signature
unsigned
refs
tag: v0.5.2
5 files · +18 -13
M dlfcn_darwin.go +10 -0
@@ -12,3 +12,13 @@ const (
1212 RTLD_LOCAL = 0x4 // All symbols are not made available for relocation processing by other modules.
1313 RTLD_GLOBAL = 0x8 // All symbols are available for relocation processing of other modules.
1414 )
15+
16+//go:cgo_import_dynamic purego_dlopen dlopen "/usr/lib/libSystem.B.dylib"
17+//go:cgo_import_dynamic purego_dlsym dlsym "/usr/lib/libSystem.B.dylib"
18+//go:cgo_import_dynamic purego_dlerror dlerror "/usr/lib/libSystem.B.dylib"
19+//go:cgo_import_dynamic purego_dlclose dlclose "/usr/lib/libSystem.B.dylib"
20+
21+//go:cgo_import_dynamic purego_dlopen dlopen "/usr/lib/libSystem.B.dylib"
22+//go:cgo_import_dynamic purego_dlsym dlsym "/usr/lib/libSystem.B.dylib"
23+//go:cgo_import_dynamic purego_dlerror dlerror "/usr/lib/libSystem.B.dylib"
24+//go:cgo_import_dynamic purego_dlclose dlclose "/usr/lib/libSystem.B.dylib"
@@ -12,3 +12,13 @@ const (
12 RTLD_LOCAL = 0x4 // All symbols are not made available for relocation processing by other modules.12 RTLD_LOCAL = 0x4 // All symbols are not made available for relocation processing by other modules.
13 RTLD_GLOBAL = 0x8 // All symbols are available for relocation processing of other modules.13 RTLD_GLOBAL = 0x8 // All symbols are available for relocation processing of other modules.
14 )14 )
15+
16+//go:cgo_import_dynamic purego_dlopen dlopen "/usr/lib/libSystem.B.dylib"
17+//go:cgo_import_dynamic purego_dlsym dlsym "/usr/lib/libSystem.B.dylib"
18+//go:cgo_import_dynamic purego_dlerror dlerror "/usr/lib/libSystem.B.dylib"
19+//go:cgo_import_dynamic purego_dlclose dlclose "/usr/lib/libSystem.B.dylib"
20+
21+//go:cgo_import_dynamic purego_dlopen dlopen "/usr/lib/libSystem.B.dylib"
22+//go:cgo_import_dynamic purego_dlsym dlsym "/usr/lib/libSystem.B.dylib"
23+//go:cgo_import_dynamic purego_dlerror dlerror "/usr/lib/libSystem.B.dylib"
24+//go:cgo_import_dynamic purego_dlclose dlclose "/usr/lib/libSystem.B.dylib"
D dlfcn_nocgo_darwin.go +0 -11
@@ -1,11 +0,0 @@
1-// SPDX-License-Identifier: Apache-2.0
2-// SPDX-FileCopyrightText: 2024 The Ebitengine Authors
3-
4-//go:build !cgo
5-
6-package purego
7-
8-//go:cgo_import_dynamic purego_dlopen dlopen "/usr/lib/libSystem.B.dylib"
9-//go:cgo_import_dynamic purego_dlsym dlsym "/usr/lib/libSystem.B.dylib"
10-//go:cgo_import_dynamic purego_dlerror dlerror "/usr/lib/libSystem.B.dylib"
11-//go:cgo_import_dynamic purego_dlclose dlclose "/usr/lib/libSystem.B.dylib"
@@ -1,11 +0,0 @@
1-// SPDX-License-Identifier: Apache-2.0
2-// SPDX-FileCopyrightText: 2024 The Ebitengine Authors
3-
4-//go:build !cgo
5-
6-package purego
7-
8-//go:cgo_import_dynamic purego_dlopen dlopen "/usr/lib/libSystem.B.dylib"
9-//go:cgo_import_dynamic purego_dlsym dlsym "/usr/lib/libSystem.B.dylib"
10-//go:cgo_import_dynamic purego_dlerror dlerror "/usr/lib/libSystem.B.dylib"
11-//go:cgo_import_dynamic purego_dlclose dlclose "/usr/lib/libSystem.B.dylib"
M dlfcn_stubs.s +1 -1
@@ -1,7 +1,7 @@
11 // SPDX-License-Identifier: Apache-2.0
22 // SPDX-FileCopyrightText: 2022 The Ebitengine Authors
33
4-//go:build !cgo && (darwin || freebsd || linux)
4+//go:build darwin || !cgo && (freebsd || linux)
55
66 #include "textflag.h"
77
@@ -1,7 +1,7 @@
1 // SPDX-License-Identifier: Apache-2.01 // SPDX-License-Identifier: Apache-2.0
2 // SPDX-FileCopyrightText: 2022 The Ebitengine Authors2 // SPDX-FileCopyrightText: 2022 The Ebitengine Authors
3 3
4-//go:build !cgo && (darwin || freebsd || linux)4+//go:build darwin || !cgo && (freebsd || linux)
5 5
6 #include "textflag.h"6 #include "textflag.h"
7 7
M internal/cgo/dlfcn_cgo_unix.go +1 -1
@@ -1,7 +1,7 @@
11 // SPDX-License-Identifier: Apache-2.0
22 // SPDX-FileCopyrightText: 2024 The Ebitengine Authors
33
4-//go:build darwin || freebsd || linux
4+//go:build freebsd || linux
55
66 package cgo
77
@@ -1,7 +1,7 @@
1 // SPDX-License-Identifier: Apache-2.01 // SPDX-License-Identifier: Apache-2.0
2 // SPDX-FileCopyrightText: 2024 The Ebitengine Authors2 // SPDX-FileCopyrightText: 2024 The Ebitengine Authors
3 3
4-//go:build darwin || freebsd || linux4+//go:build freebsd || linux
5 5
6 package cgo6 package cgo
7 7
A internal/cgo/empty.go +6 -0
@@ -0,0 +1,6 @@
1+// SPDX-License-Identifier: Apache-2.0
2+// SPDX-FileCopyrightText: 2024 The Ebitengine Authors
3+
4+package cgo
5+
6+// Empty so that importing this package doesn't cause issue for certain platforms.
@@ -0,0 +1,6 @@
1+// SPDX-License-Identifier: Apache-2.0
2+// SPDX-FileCopyrightText: 2024 The Ebitengine Authors
3+
4+package cgo
5+
6+// Empty so that importing this package doesn't cause issue for certain platforms.

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 102

↑↓ moveenter openesc close