Skip to content

Commit

Permalink
add uninitialized machine system and default to it.
Browse files Browse the repository at this point in the history
Prior to this dragonfly bsd happened to be the default system which was
pretty confusing when trying to use build/host machine before it was
initialized.
  • Loading branch information
annacrombie committed Dec 17, 2024
1 parent 04e6c62 commit ba6c33d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion include/machines.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#include "platform/uname.h"

enum machine_system {
machine_system_uninitialized = 0,
machine_system_unknown = 1,
machine_system_dragonfly,
machine_system_freebsd,
machine_system_gnu,
Expand All @@ -26,7 +28,6 @@ enum machine_system {
machine_system_cygwin,
machine_system_msys2,
machine_system_darwin,
machine_system_unknown,
};

enum machine_kind {
Expand Down
3 changes: 2 additions & 1 deletion src/machines.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ const char *
machine_system_to_s(enum machine_system sys)
{
switch (sys) {
case machine_system_uninitialized: return "<uninitialized>";
case machine_system_unknown: return "unknown";
case machine_system_dragonfly: return "dragonfly";
case machine_system_freebsd: return "freebsd";
case machine_system_gnu: return "gnu";
Expand All @@ -81,7 +83,6 @@ machine_system_to_s(enum machine_system sys)
case machine_system_cygwin: return "cygwin";
case machine_system_msys2: return "msys2";
case machine_system_darwin: return "darwin";
case machine_system_unknown: return "unknown";
}

UNREACHABLE_RETURN;
Expand Down

0 comments on commit ba6c33d

Please sign in to comment.