Skip to content

Commit

Permalink
Fix build when HAVE_POPEN is not set.
Browse files Browse the repository at this point in the history
  • Loading branch information
gwsw committed Apr 26, 2021
1 parent 0ead025 commit ea44c64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ AH_TOP([
* PIPEC is 1 if you wish to have the "|" command
* which allows the user to pipe data into a shell command.
*/
#define PIPEC (!SECURE)
#define PIPEC (!SECURE && HAVE_POPEN)
/*
* LOGFILE is 1 if you wish to allow the -o option (to create log files).
Expand Down
7 changes: 3 additions & 4 deletions filename.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ seek_filesize(f)
return ((POSITION) spos);
}

#if HAVE_POPEN
/*
* Read a string from a file.
* Return a pointer to the string in memory.
Expand Down Expand Up @@ -551,10 +552,6 @@ readfd(fd)
return (buf);
}



#if HAVE_POPEN

/*
* Execute a shell command.
* Return a pointer to a pipe connected to the shell command's standard output.
Expand Down Expand Up @@ -803,6 +800,7 @@ lrealpath(path)
return (save(path));
}

#if HAVE_POPEN
/*
* Return number of %s escapes in a string.
* Return a large number if there are any other % escapes besides %s.
Expand All @@ -828,6 +826,7 @@ num_pct_s(lessopen)
}
return (num);
}
#endif

/*
* See if we should open a "replacement file"
Expand Down

0 comments on commit ea44c64

Please sign in to comment.