Claude 74b259ef19 Wrap entire system.c with BUILD_TEST guard instead of nested conditionals
Simplified conditional compilation by wrapping the entire system.c file
with a single #ifdef BUILD_TEST guard, removing all nested conditionals
for simulation client code.

**Rationale:**
The entire system.c file contains simulation framework code (mock functions,
Process structure, spawn_simulated_process, update_simulation, etc.) that
is only used when BUILD_TEST is defined. Having nested #ifdef BUILD_TEST
conditionals within this file made no sense.

**Changes:**

**system.c:**
- Added #ifdef BUILD_TEST at the very beginning of the file (line 1)
- Added #endif // BUILD_TEST at the very end of the file (line 1486)
- Removed #ifdef BUILD_TEST around simulation_client.h include
- Removed #ifdef BUILD_TEST around PROCESS_TYPE_CLIENT enum value
- Removed #ifdef BUILD_TEST around SimulationClient union member
- Removed #ifdef BUILD_TEST around is_client() function
- Removed #ifdef BUILD_TEST around client detection in spawn_simulated_process()
- Removed #ifdef BUILD_TEST around PROCESS_TYPE_CLIENT cases in:
  - spawn_simulated_process() init switch
  - free_process() cleanup switch
  - update_simulation() step switch

**Result:**
- Much cleaner code with single top-level BUILD_TEST guard
- No nested conditionals cluttering the code
- All three build targets still compile successfully:
  - tinydfs_server.out (excludes system.c entirely)
  - example_client.out (excludes system.c entirely)
  - tinydfs_test.out (includes all of system.c)
- Simulation runs correctly with client support

The file structure now correctly reflects that system.c is purely test
infrastructure and not used in production builds.
2025-11-02 13:10:17 +00:00
2025-10-29 10:41:23 +01:00
2025-11-01 22:44:04 +01:00
2025-10-27 18:01:33 +01:00
2025-10-29 10:41:23 +01:00
2025-10-28 17:24:25 +01:00
S
Description
A simple, fault-tolerant, highly available object storage
MIT
1.1 MiB
Languages
C 98.4%
Shell 1%
Zig 0.4%
Batchfile 0.2%