mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-31 17:07:27 +08:00
FISH_USE_POSIX_SPAWN and HAVE_SPAWN_H fixes
FISH_USE_POSIX_SPAWN is always defined, thanks to the line #define FISH_USE_POSIX_SPAWN HAVE_SPAWN_H So replace #ifdef with #if to fix compilation on platforms lacking spawn.h. Also make the spawn.h inclusion condition consistent across files.
This commit is contained in:
parent
9f54c8d88b
commit
23518e7ad8
@ -10,7 +10,7 @@
|
||||
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#ifdef FISH_USE_POSIX_SPAWN
|
||||
#ifdef HAVE_SPAWN_H
|
||||
#include <spawn.h>
|
||||
#endif
|
||||
#include <cwchar>
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "maybe.h"
|
||||
#if HAVE_SPAWN_H
|
||||
#ifdef HAVE_SPAWN_H
|
||||
#include <spawn.h>
|
||||
#endif
|
||||
#ifndef FISH_USE_POSIX_SPAWN
|
||||
@ -53,7 +53,7 @@ pid_t execute_fork();
|
||||
void safe_report_exec_error(int err, const char *actual_cmd, const char *const *argv,
|
||||
const char *const *envv);
|
||||
|
||||
#ifdef FISH_USE_POSIX_SPAWN
|
||||
#if FISH_USE_POSIX_SPAWN
|
||||
/// A RAII type which wraps up posix_spawn's data structures.
|
||||
class posix_spawner_t {
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user