fortrangoingonforty/fortsh / 13813da

Browse files

fix Linux build: preprocessor directives must start at column 1

#ifdef __APPLE__ had leading spaces in builtins.f90 kill signal
number blocks. gfortran requires preprocessor directives at column 1.
Also reduce ls_output buffer from 16KB to 8KB (with grep filter).
Authored by espadonne
SHA
13813da2117807bbd03b3551178812f78e317a96
Parents
0c6fbc9
Tree
70a2e69

2 changed files

StatusFile+-
M src/execution/builtins.f90 5 5
M src/io/readline.f90 1 1
src/execution/builtins.f90modified
@@ -1443,16 +1443,16 @@ contains
14431443
             case('INT', 'int', 'SIGINT')
14441444
               signal_num = 2
14451445
             case('STOP', 'stop', 'SIGSTOP')
1446
-  #ifdef __APPLE__
1447
-              signal_num = 18  ! SIGTSTP on macOS
1446
+#ifdef __APPLE__
1447
+              signal_num = 18
14481448
 #else
1449
-              signal_num = 20  ! SIGTSTP on Linux
1449
+              signal_num = 20
14501450
 #endif
14511451
             case('CONT', 'cont', 'SIGCONT')
14521452
 #ifdef __APPLE__
1453
-              signal_num = 19  ! SIGCONT on macOS
1453
+              signal_num = 19
14541454
 #else
1455
-              signal_num = 18  ! SIGCONT on Linux
1455
+              signal_num = 18
14561456
 #endif
14571457
             case('HUP', 'hup', 'SIGHUP')
14581458
               signal_num = 1
src/io/readline.f90modified
@@ -3492,7 +3492,7 @@ contains
34923492
 
34933493
     character(len=1024) :: ls_command, expanded_dir  ! Large enough for command
34943494
     character(len=:), allocatable :: ls_output_alloc  ! From execute_and_capture
3495
-    character(len=16384) :: ls_output  ! 16KB buffer for large directories
3495
+    character(len=8192) :: ls_output  ! 8KB buffer for large directories (with grep filter)
34963496
     character(len=MAX_LINE_LEN), allocatable :: entries(:)  ! Now allocatable to avoid stack overflow
34973497
     character(len=MAX_LINE_LEN) :: full_path
34983498
     character(len=:), allocatable :: home_dir, debug_mode