Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
107cfed
Wrong Printf version requirement printing
afxgroup Jan 28, 2025
5b66b34
Merge branch 'development' of github.com:AmigaLabs/clib4 into develop…
afxgroup Apr 15, 2025
c7de956
Merge branch 'development' of github.com:AmigaLabs/clib4 into develop…
afxgroup Jun 11, 2025
183789d
Merge branch 'development' of github.com:AmigaLabs/clib4 into develop…
afxgroup Jun 18, 2025
8eb5426
Small profile fixes
afxgroup Jun 20, 2025
275ac3f
Merge branch 'development' of github.com:AmigaLabs/clib4 into develop…
afxgroup Jun 22, 2025
e4eee2e
Merge branch 'development' of github.com:AmigaLabs/clib4 into develop…
afxgroup Jun 28, 2025
838afc6
Fixed crash when debug is enabled
afxgroup Jun 29, 2025
065856b
Merge branch 'development' of github.com:AmigaLabs/clib4 into mutexes
afxgroup Jun 29, 2025
4d264b8
Semaphores are replaced by Mutexes when possible
afxgroup Jun 29, 2025
27e537e
Reworked ctype implementation using newlib one
afxgroup Jul 1, 2025
100e8f2
don't call check_abort in stdio functions that are calling it already…
afxgroup Jul 2, 2025
427448d
ctype functions was using wrong _P define (while ctype inline #define…
afxgroup Jul 2, 2025
f470c36
Merge branch 'development' of github.com:AmigaLabs/clib4 into ctype
afxgroup Jul 3, 2025
d737595
More optimizations on I/O functions that avoid useless check abort calls
afxgroup Jul 5, 2025
74744ce
More optimizations to I/O operations. Now stdout and stderr are fully…
afxgroup Jul 5, 2025
9a83362
Some more optimizations
afxgroup Jul 18, 2025
0909757
more read fixes
afxgroup Jul 27, 2025
91fb653
Merge branch 'development' of github.com:AmigaLabs/clib4 into ctype
afxgroup Jul 27, 2025
7c565c2
Fixed an error on pthreds was causing DSI in some occasions. Small fixes
afxgroup Jul 29, 2025
376d5eb
Merge branch 'development' of github.com:AmigaLabs/clib4 into ctype
afxgroup Jul 29, 2025
9ff4fe2
Merge branch 'development' of github.com:AmigaLabs/clib4 into ctype
afxgroup Aug 1, 2025
43a9caf
Fixed a problem cased by wrong Input/Output/Error streams created bef…
afxgroup Aug 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library/pthread/pthread_testcancel.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pthread_testcancel(void) {

inf = GetCurrentThreadInfo();

if (inf->canceled && (inf->cancelstate == PTHREAD_CANCEL_ENABLE))
if (inf && inf->canceled && (inf->cancelstate == PTHREAD_CANCEL_ENABLE))
pthread_exit(PTHREAD_CANCELED);

SetSignal(SIGBREAKF_CTRL_C, 0);
Expand Down
18 changes: 15 additions & 3 deletions library/stdio/file_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,13 @@ int
wb_file_init(struct _clib4 *__clib4) {
int result = ERROR;
STRPTR window_specifier = NULL;
ENTER();

__clib4->__original_current_directory = SetCurrentDir(__clib4->__WBenchMsg->sm_ArgList[0].wa_Lock);
__clib4->__current_directory_changed = TRUE;

if (__clib4->__WBenchMsg->sm_ToolWindow != NULL) {
__clib4->input = Open(__clib4->__WBenchMsg->sm_ToolWindow, MODE_OLDFILE);
__clib4->input = Open(__clib4->__WBenchMsg->sm_ToolWindow, MODE_NEWFILE);
} else {
STRPTR tool_name;
size_t len;
Expand All @@ -94,6 +95,7 @@ wb_file_init(struct _clib4 *__clib4) {
}

if (__clib4->input == BZERO) {
SHOWMSG((" __clib4->input is BZERO. Open NIL:\n"));
__clib4->input = Open("NIL:", MODE_OLDFILE);
}

Expand All @@ -118,8 +120,15 @@ wb_file_init(struct _clib4 *__clib4) {
if (__clib4->output == BZERO)
__clib4->output = Open("NIL:", MODE_OLDFILE);

if (__clib4->input == BZERO || __clib4->output == BZERO || __clib4->error == BZERO)
if (__clib4->input == BZERO || __clib4->output == BZERO || __clib4->error == BZERO) {
D(("One of stream still BZERO [%x %x %x].. Goto out\n", __clib4->input, __clib4->output, __clib4->error));
goto out;
}

// Reset FDs for input/output/error
__clib4->__fd[0]->fd_DefaultFile = __clib4->input;
__clib4->__fd[1]->fd_DefaultFile = __clib4->output;
__clib4->__fd[2]->fd_DefaultFile = __clib4->error;

__clib4->old_input = SelectInput(__clib4->input);
__clib4->old_output = SelectOutput(__clib4->output);
Expand All @@ -130,9 +139,12 @@ wb_file_init(struct _clib4 *__clib4) {

out:

if (window_specifier != NULL)
if (window_specifier != NULL) {
FreeVec(window_specifier);
window_specifier = NULL;
}

RETURN(result);
return (result);
}

Expand Down
1 change: 0 additions & 1 deletion library/stdio/fread.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ fread(void *ptr, size_t element_size, size_t count, FILE *stream) {
size_t total = element_size * count;
size_t nread = __fread_internal(ptr, element_size, count, stream);
struct iob *file = (struct iob *) stream;
DebugPrintF("Total: %ld\n", total);

if (FLAG_IS_SET(file->iob_Flags, IOBF_LITTLE_ENDIAN) && (total == 2 || total == 4 || total == 8)) {
DebugPrintF("[fread] Reading in Little endian mode\n");
Expand Down