-
-
Notifications
You must be signed in to change notification settings - Fork 782
MiNT (Atari) port #2334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mmuman
wants to merge
18
commits into
fastfetch-cli:dev
Choose a base branch
from
mmuman:freemint
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+467
−16
Open
MiNT (Atari) port #2334
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
b788495
Update nosupport stubs so they compile
mmuman f2187b9
Common/Detect: Add more nosupport stubs
mmuman 1750e5d
Build: Add Atari MiNT toolchains
mmuman 5d285a0
Separator: Allow 2 bytes wchars for MiNT
mmuman 687d0d8
Build: Add support for Atari MiNT
mmuman cbc476d
Common (MiNT): MiNT does not implement static_assert()
mmuman 8233da3
Platform (MiNT): implement getExePath()
mmuman 339a192
IO (MiNT): No dir entry d_type, no fstatat() or openat(), no O_CLOEXEC
mmuman 96dfe27
Processing (MiNT): No posix_spawn() on MiNT
mmuman 5c88595
Packages (MiNT): No fstatat(), no d_type in dir entries, no tv_sec field
mmuman 90bf89b
Loadavg (MiNT): MiNT implements it but in /kern
mmuman f1f57a3
Memory (MiNT): Same as on Linux but in /kern
mmuman 9f21222
BIOS (MiNT): implement
mmuman 4f561e1
Board (MiNT): implement
mmuman a1e3650
CPU (MiNT): implement
mmuman 6667be7
Time (MiNT): missing clock_gettime()
mmuman 36afc91
BIOS (MiNT): implement
mmuman b185d2e
DisplayServer (MiNT): minimal implementation
mmuman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # This Toolchain file is used to cross compile the windows | ||
| # version of Hatari under linux using mingw32 | ||
| # use : cmake -DCMAKE_TOOLCHAIN_FILE=Toolchain-atari.cmake | ||
|
|
||
| # The name of the target operating system | ||
| SET(CMAKE_SYSTEM_NAME MINT) | ||
|
|
||
| # MINT versions of the different tools | ||
| # (change these depending on your system settings) | ||
| SET(CMAKE_C_COMPILER m68k-atari-mint-gcc) | ||
| SET(CMAKE_CXX_COMPILER m68k-atari-mint-g++) | ||
| SET(CMAKE_RC_COMPILER m68k-atari-mint-windres) | ||
| SET(CMAKE_ASM_COMPILER m68k-atari-mint-as) | ||
| SET(CMAKE_STRIP m68k-atari-mint-strip) | ||
|
|
||
| # Base directory for the target environment | ||
| SET(CMAKE_FIND_ROOT_PATH /opt/netsurf/m68k-atari-mint/env ) | ||
|
|
||
| # FindSDL.cmake doesn't search correctly in CMAKE_FIND_ROOT_PATH | ||
| # so we force SDLDIR here | ||
| set ( ENV{SDLDIR} ${CMAKE_FIND_ROOT_PATH}/include/SDL ) | ||
|
|
||
| # Adjust the default behaviour of the FIND_XXX() commands: | ||
| # search headers and libraries in the target environment, search | ||
| # programs in the host environment | ||
| set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | ||
| set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | ||
| set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) | ||
|
|
||
| # | ||
| set(CMAKE_EXECUTABLE_SUFFIX .prg) | ||
| set(CMAKE_EXECUTABLE_SUFFIX_ASM .prg) | ||
| set(CMAKE_EXECUTABLE_SUFFIX_C .prg) | ||
| set(CMAKE_EXECUTABLE_SUFFIX_CXX .prg) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # This Toolchain file is used to cross compile the windows | ||
| # version of Hatari under linux using mingw32 | ||
| # use : cmake -DCMAKE_TOOLCHAIN_FILE=Toolchain-atari.cmake | ||
|
|
||
| # The name of the target operating system | ||
| SET(CMAKE_SYSTEM_NAME MINT) | ||
|
|
||
| # MINT versions of the different tools | ||
| # (change these depending on your system settings) | ||
| SET(CMAKE_C_COMPILER m68k-atari-mintelf-gcc) | ||
| SET(CMAKE_CXX_COMPILER m68k-atari-mintelf-g++) | ||
| SET(CMAKE_RC_COMPILER m68k-atari-mintelf-windres) | ||
| SET(CMAKE_ASM_COMPILER m68k-atari-mintelf-as) | ||
| SET(CMAKE_STRIP m68k-atari-mintelf-strip) | ||
|
|
||
| # Base directory for the target environment | ||
| SET(CMAKE_FIND_ROOT_PATH /usr/m68k-atari-mintelf ) | ||
|
|
||
| # FindSDL.cmake doesn't search correctly in CMAKE_FIND_ROOT_PATH | ||
| # so we force SDLDIR here | ||
| set ( ENV{SDLDIR} ${CMAKE_FIND_ROOT_PATH}/include/SDL ) | ||
|
|
||
| # Force pkg-config search paths as there's no symlink | ||
| set ( ENV{PKG_CONFIG_LIBDIR} ${CMAKE_FIND_ROOT_PATH}/lib/pkgconfig ) | ||
| set ( ENV{PKG_CONFIG_SYSTEM_INCLUDE_PATH} ${CMAKE_FIND_ROOT_PATH}/include ) | ||
| set ( ENV{PKG_CONFIG_SYSTEM_LIBRARY_PATH} ${CMAKE_FIND_ROOT_PATH}/lib ) | ||
|
|
||
| # Adjust the default behaviour of the FIND_XXX() commands: | ||
| # search headers and libraries in the target environment, search | ||
| # programs in the host environment | ||
| set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | ||
| set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | ||
| set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) | ||
|
|
||
| # | ||
| set(CMAKE_EXECUTABLE_SUFFIX .prg) | ||
| set(CMAKE_EXECUTABLE_SUFFIX_ASM .prg) | ||
| set(CMAKE_EXECUTABLE_SUFFIX_C .prg) | ||
| set(CMAKE_EXECUTABLE_SUFFIX_CXX .prg) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #include "common/netif.h" | ||
| #include "common/io.h" | ||
|
|
||
| bool ffNetifGetDefaultRouteImpl(char *iface, uint32_t* ifIndex) | ||
| { | ||
| return false; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| #include "fastfetch.h" | ||
| #include "common/networking.h" | ||
|
|
||
| const char* ffNetworkingSendHttpRequest(FFNetworkingState* state, const char* host, const char* path, const char* headers) | ||
| { | ||
| return "Not supported on this platform"; | ||
| } | ||
|
|
||
| const char* ffNetworkingRecvHttpResponse(FFNetworkingState* state, FFstrbuf* buffer) | ||
| { | ||
| return "Not supported on this platform"; | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #include <mint/sysvars.h> | ||
| #include <mint/osbind.h> | ||
|
|
||
| double mint_ticks_ms(void) | ||
| { | ||
| long oldmode = Super(0L); | ||
| double ticks = *_hz_200 * 5.; | ||
| Super(oldmode); | ||
|
|
||
| return ticks; | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 HIGH RISK
Recursive directory traversal is broken for MiNT. The variable
isDiris never set totruebecause thefstatatandS_ISDIRchecks are excluded. As this file is high-complexity and lacks coverage, this failure is high risk. Usestat()orlstat()as a fallback whenfstatatis unavailable to allow directory recursion.