Skip to content

Commit

Permalink
Fix an OS4 compilation error
Browse files Browse the repository at this point in the history
The version of GCC used in the OS4 Docker image was updated, causing an
error to appear due to an invalid comparison. Plus the dos.library
maintainer has been up to his old tricks again, renaming DOS functions.
  • Loading branch information
Colin Ward committed Nov 28, 2024
1 parent 14f905c commit 67bc0fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Args.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ TInt RArgs::open(const char *a_pccTemplate, TInt a_iNumOptions, const char *a_pc

for (Index = 1; Index < a_iArgC; ++Index)
{
if (strstr(a_pccArgV[Index], " ") > NULL) strcat(m_pcArgumentBuffer, "\"");
if (strstr(a_pccArgV[Index], " ") != NULL) strcat(m_pcArgumentBuffer, "\"");
strcat(m_pcArgumentBuffer, a_pccArgV[Index]);
if (strstr(a_pccArgV[Index], " ") > NULL) strcat(m_pcArgumentBuffer, "\"");
if (strstr(a_pccArgV[Index], " ") != NULL) strcat(m_pcArgumentBuffer, "\"");

/* If this is not the last argument, append a space to it */

Expand Down
8 changes: 7 additions & 1 deletion OS4Support.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,16 @@ void RefreshSetGadgetAttrs(struct Gadget *a_gadget, struct Window *a_window, str

#ifdef __amigaos4__

/* Functions renamed in OS4 but still compatible with their OS3 equivalents */
/* Functions pointlessly renamed in OS4 but still compatible with their OS3 equivalents */

#define GetCurrentDirName(buffer, length) GetCliCurrentDirName(buffer, length)

#ifndef Seek

#define Seek(file, position, mode) ChangeFilePosition(file, position, mode)

#endif /* ! Seek */

#endif /* __amigaos4__ */

#endif /* ! OS4SUPPORT_H */

0 comments on commit 67bc0fc

Please sign in to comment.