Skip to content

Commit 10d0370

Browse files
authored
Merge pull request #440 from AmigaLabs/development
Preparing release v2.2
2 parents 5f72d7d + db79871 commit 10d0370

36 files changed

Lines changed: 1171 additions & 158 deletions

.github/workflows/_compile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- '${{ github.workspace }}:/opt/code'
3636
steps:
3737
- name: Pull code
38-
uses: actions/checkout@v4
38+
uses: actions/checkout@v6
3939

4040
- name: Add repository to git safe directories
4141
run: |

.github/workflows/makeRelease.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
runs-on: ubuntu-latest
3434
steps:
3535
- name: Notify on Discord on successful release
36-
uses: hunghg255/action-notifications@master
36+
uses: walkero-gr/action-notifications@master
3737
with:
3838
discord_webhook: https://discord.com/api/webhooks/${{ secrets.DISCORD_ANNOUNCEMENTS_ID }}/${{ secrets.DISCORD_ANNOUNCEMENTS_TOKEN }}
3939
title: "clib4 ${{ github.event.release.tag_name }} released"

.github/workflows/mergeMainBranches.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- '${{ github.workspace }}:/opt/code'
1919
steps:
2020
- name: Pull code
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v6
2222

2323
- name: Compile clib4
2424
uses: ./.github/actions/compile
@@ -38,7 +38,7 @@ jobs:
3838
- '${{ github.workspace }}:/opt/code'
3939
steps:
4040
- name: Pull code
41-
uses: actions/checkout@v4
41+
uses: actions/checkout@v6
4242

4343
- name: Compile clib4
4444
uses: ./.github/actions/compile
@@ -54,7 +54,7 @@ jobs:
5454
runs-on: ubuntu-latest
5555
steps:
5656
- name: PR notification
57-
uses: hunghg255/action-notifications@master
57+
uses: walkero-gr/action-notifications@master
5858
with:
5959
discord_webhook: https://discord.com/api/webhooks/${{ secrets.DISCORD_ANNOUNCEMENTS_ID }}/${{ secrets.DISCORD_ANNOUNCEMENTS_TOKEN }}
6060
title: "Deploy to ${{ github.event.pull_request.base.ref }}"

.github/workflows/nightly.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@ jobs:
1818
version: "nightly"
1919
steps:
2020
- name: Checkout Code
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v6
2222
with: { fetch-depth: 0 }
2323
- name: Set Tag
2424
id: tag
2525
run: |
2626
echo "version=nightly" >> "$GITHUB_OUTPUT"
2727
- name: Update Tag
28-
uses: richardsimko/update-tag@v1
28+
uses: richardsimko/update-tag@v2
2929
with:
3030
tag_name: "nightly"
3131
env:
3232
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3333
- name: Create Release
3434
id: create_release
35-
uses: softprops/action-gh-release@v2.2.2
35+
uses: softprops/action-gh-release@v3
3636
with:
3737
tag_name: "nightly"
3838
name: "clib4 nightly-builds"
@@ -54,7 +54,7 @@ jobs:
5454
- '${{ github.workspace }}:/opt/code'
5555
steps:
5656
- name: Checkout Code
57-
uses: actions/checkout@v4
57+
uses: actions/checkout@v6
5858
with: { fetch-depth: 0 }
5959

6060
- name: Compile clib4
@@ -70,7 +70,7 @@ jobs:
7070
mv clib4.lha clib4-nightly.lha
7171
7272
- name: Upload Files
73-
uses: softprops/action-gh-release@v2.2.2
73+
uses: softprops/action-gh-release@v3
7474
with:
7575
tag_name: "nightly"
7676
draft: false
@@ -89,7 +89,7 @@ jobs:
8989
- '${{ github.workspace }}:/opt/code'
9090
steps:
9191
- name: Checkout Code
92-
uses: actions/checkout@v4
92+
uses: actions/checkout@v6
9393
with: { fetch-depth: 0 }
9494

9595
- name: Compile clib4
@@ -105,7 +105,7 @@ jobs:
105105
mv clib4.lha clib4-nightly_SPE.lha
106106
107107
- name: Upload Files
108-
uses: softprops/action-gh-release@v2.2.2
108+
uses: softprops/action-gh-release@v3
109109
with:
110110
tag_name: "nightly"
111111
draft: false

.github/workflows/prChecks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- '${{ github.workspace }}:/opt/code'
1919
steps:
2020
- name: Pull code
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v6
2222

2323
- name: Compile clib4
2424
uses: ./.github/actions/compile
@@ -37,7 +37,7 @@ jobs:
3737
- '${{ github.workspace }}:/opt/code'
3838
steps:
3939
- name: Pull code
40-
uses: actions/checkout@v4
40+
uses: actions/checkout@v6
4141

4242
- name: Compile clib4
4343
uses: ./.github/actions/compile

GNUmakefile.os4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ WARNINGS := \
7373
-Wundef -Wmissing-declarations -Wunused -Wwrite-strings -Wno-unused-value -Wno-comment -Wno-missing-braces \
7474
-Wno-deprecated-declarations -Wno-unused-variable -Wno-parentheses -Wno-missing-prototypes \
7575
-Wstrict-aliasing -Wno-shadow -Wno-discarded-qualifiers -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing \
76-
-Wno-type-limits -Wno-cast-function-type -Wno-frame-address -Wno-error=unused-but-set-variable -Werror
76+
-Wno-type-limits -Wno-cast-function-type -Wno-frame-address -Wno-error=unused-but-set-variable -Werror
7777
# -Wbad-function-cast -Wconversion -Wformat
7878

7979
ifndef SPE
@@ -275,7 +275,7 @@ ifdef GITTAG
275275
$(VERBOSE)sed -i 's/Version: [0-9]*\.[0-9]*/Version: $(MAJOR).$(MINOR)/g' misc/control
276276
endif
277277

278-
ifdef NIGHTLY
278+
ifneq ($(filter YES yes,$(NIGHTLY)),)
279279
$(VERBOSE)sed -i 's/clib4.library \([0-9]*\.[0-9]*\)-\([a-z0-9]*\)/clib4.library \1-nightly-$(GIT_HASH)/g' library/c.lib_rev.h
280280
endif
281281

library/c.lib_rev.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#define VERSION 2
22
#define REVISION 1
33

4-
#define DATE "07.06.2026"
4+
#define DATE "19.06.2026"
55
#define VERS "clib4.library 2.1"
6-
#define VSTRING "clib4.library 2.1 (07.06.2026)\r\n"
7-
#define VERSTAG "\0$VER: clib4.library 2.1-nightly-c971606 (07.06.2026)"
6+
#define VSTRING "clib4.library 2.1 (19.06.2026)\r\n"
7+
#define VERSTAG "\0$VER: clib4.library 2.1-nightly-c971606 (19.06.2026)"

library/cpu/altivec/vec_strcpy.sx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,10 @@ vec_strcpy:
145145
mr DMS,SMD // IU1 |dst - src| = src - dst
146146
Pos_value:
147147
subf. QBC,DST,ADD // IU1 Bytes to even QW start of vect (min 32)
148-
addi ADD,DD,PAGE_SIZE // IU1 dst addr in next 4K page
148+
addi ADD,SRC,PAGE_SIZE // IU1 SRC addr in next 4K page (loads fault on
149+
// the SOURCE, so guard the source's page,
150+
// not the dest's -- else an unmapped page
151+
// just past src faults while dst is mid-page)
149152
cmpi cr7,0,DMS,MIN_VEC // IU1 Check for min byte count separation
150153

151154
mtctr QBC // IU2 Init counter
@@ -171,7 +174,12 @@ v_strcpy:
171174
#ifdef VRSAVE
172175
mfspr RSV,VRSV // IU2 Get current VRSAVE contents
173176
#endif
174-
subf. PBC,DD,ADD // IU1 Now bytes to next 4K page
177+
rlwinm Rt,DS,0,0,27 // IU1 Align src down to QW first: lvx loads are
178+
// 16-aligned (use DS&~15), so an unaligned
179+
// (rg-DS)/16 rounds to 0 and New_page_0 then
180+
// loads a whole page past the src page end
181+
subf. PBC,Rt,ADD // IU1 QW-exact bytes from aligned src to its 4K
182+
// page boundary (loads fault on SRC, not dest)
175183

176184
#ifdef VRSAVE
177185
oris Rt,RSV,0xff00 // IU1 Or in registers used by this routine

library/dos.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,7 @@ struct _clib4 {
309309

310310
APTR stdio_lock;
311311

312-
/* Wof Allocator main pointer */
313-
wmem_allocator_t *__wmem_allocator;
312+
void *unused1;
314313
APTR __environment_pool;
315314

316315
/* Names of files and directories to delete when shutting down. */
@@ -319,7 +318,7 @@ struct _clib4 {
319318

320319
/* Local timer I/O. */
321320
struct MsgPort *__timer_port;
322-
BOOL unused1;
321+
BOOL unused3;
323322
void *unused2;
324323
struct TimeRequest *__timer_request;
325324
struct Library *__TimerBase;
@@ -604,6 +603,14 @@ struct _clib4 {
604603
*/
605604
struct iob *__sf[3]; /* per-process stdin/stdout/stderr iob pointers */
606605
struct _glue *__sglue; /* per-process root glue node for FILE slots */
606+
607+
/*
608+
* Cached pointer to the global Clib4Resource.
609+
* Initialized once in stdlib_memory_init to avoid repeated OpenResource() calls
610+
* in malloc/free hot path. The resource itself is shared across all processes,
611+
* but each process caches its own pointer for fast access.
612+
*/
613+
struct Clib4Resource *__clib4_resource;
607614
};
608615

609616
#ifndef __getClib4

library/fcntl/fcntl.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,16 @@ fcntl(int file_descriptor, int cmd, ... /* int arg */) {
103103

104104
result = OK;
105105

106+
/* Access mode: mutually exclusive O_RDONLY/O_WRONLY/O_RDWR */
107+
if (FLAG_IS_SET(fd->fd_Flags, FDF_READ) && FLAG_IS_SET(fd->fd_Flags, FDF_WRITE))
108+
SET_FLAG(result, O_RDWR);
109+
else if (FLAG_IS_SET(fd->fd_Flags, FDF_WRITE))
110+
SET_FLAG(result, O_WRONLY);
111+
/* else: O_RDONLY == 0, already the default */
112+
113+
if (FLAG_IS_SET(fd->fd_Flags, FDF_APPEND))
114+
SET_FLAG(result, O_APPEND);
115+
106116
if (FLAG_IS_SET(fd->fd_Flags, FDF_NON_BLOCKING))
107117
SET_FLAG(result, O_NONBLOCK);
108118

0 commit comments

Comments
 (0)