Skip to content

Commit

Permalink
libast: cleanup: remove obsolete exec(3) fallbacks
Browse files Browse the repository at this point in the history
execlp, execve and execvp have all been in POSIX since Issue 1, so
the need for those fallbacks expired many years ago.

execvpe is a GNU extension, so that fallback is not obsolete --
however, it is unused (even in the full original AST code base), so
let's remove that as well.
  • Loading branch information
McDutchie committed Jul 21, 2024
1 parent cca3bfa commit 7bd5d92
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 244 deletions.
34 changes: 0 additions & 34 deletions src/lib/libast/Mamfile
Original file line number Diff line number Diff line change
Expand Up @@ -2601,40 +2601,6 @@ make install virtual
exec - compile ${<}
done

make execlp.o
make comp/execlp.c
prev include/ast.h
prev ast_lib.h
done
exec - compile ${<}
done

make execve.o
make comp/execve.c
prev include/error.h
prev include/wait.h
prev sig.h
prev include/ast.h
done
exec - compile ${<}
done

make execvp.o
make comp/execvp.c
prev include/ast.h
prev ast_lib.h
done
exec - compile ${<}
done

make execvpe.o
make comp/execvpe.c
prev include/ast.h
prev ast_lib.h
done
exec - compile ${<}
done

make spawnveg.o
make comp/spawnveg.c
prev ast_tty.h
Expand Down
38 changes: 0 additions & 38 deletions src/lib/libast/comp/execlp.c

This file was deleted.

62 changes: 0 additions & 62 deletions src/lib/libast/comp/execve.c

This file was deleted.

38 changes: 0 additions & 38 deletions src/lib/libast/comp/execvp.c

This file was deleted.

66 changes: 0 additions & 66 deletions src/lib/libast/comp/execvpe.c

This file was deleted.

1 change: 0 additions & 1 deletion src/lib/libast/features/lib
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ dat _tzname,tzname
lib BSDsetpgrp
lib _cleanup
lib bcopy,bzero,confstr,dirread,dup2
lib execlp,execve,execvp,execvpe
lib fchmod,fcntl,fmtmsg,fnmatch,fork,fsync
lib getconf,getdents,getdirentries,getdtablesize,getdate
lib getgroups,gethostname,getlogin,getpagesize,getrlimit,getuniverse
Expand Down
5 changes: 0 additions & 5 deletions src/lib/libast/features/map.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ main(void)
#if !_lib_eaccess
printf("#undef eaccess\n");
printf("#define eaccess _ast_eaccess\n");
#endif
#if !_lib_execvpe
printf("#undef execvpe\n");
printf("#define execvpe _ast_execvpe\n");
printf("extern int execvpe(const char*, char* const[], char* const[]);\n");
#endif
printf("#undef fnmatch\n");
printf("#define fnmatch _ast_fnmatch\n");
Expand Down

0 comments on commit 7bd5d92

Please sign in to comment.