mirror of
https://git.sr.ht/~cismonx/bookmarkfs
synced 2025-07-19 07:38:51 +00:00
defs: remove HAVE_PIPE2
macro
This feature check is only used in `xpipe2()`.
This commit is contained in:
parent
99ac2b79f8
commit
fb0d39dfc3
2 changed files with 3 additions and 7 deletions
|
@ -92,10 +92,6 @@
|
|||
# define UNUSED_VAR(name) name##_unused_ VARATTR_UNUSED_
|
||||
#endif /* defined(HAVE_STDC_23) */
|
||||
|
||||
#if defined(__FreeBSD__) || (defined(__linux__) && defined(_GNU_SOURCE))
|
||||
# define HAVE_PIPE2 1
|
||||
#endif
|
||||
|
||||
#ifndef __FreeBSD__
|
||||
# define O_RESOLVE_BENEATH 0
|
||||
# define PROT_MAX(prot) 0
|
||||
|
|
|
@ -111,14 +111,14 @@ xpipe2 (
|
|||
int pipefd[2],
|
||||
int flags
|
||||
) {
|
||||
#ifdef HAVE_PIPE2
|
||||
#if defined(__FreeBSD__) || (defined(__linux__) && defined(_GNU_SOURCE))
|
||||
if (0 != pipe2(pipefd, flags)) {
|
||||
log_printf("pipe2(): %s", xstrerror(errno));
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
#else /* !defined(HAVE_PIPE2) */
|
||||
#else
|
||||
if (0 != pipe(pipefd)) {
|
||||
log_printf("pipe(): %s", xstrerror(errno));
|
||||
return -1;
|
||||
|
@ -147,7 +147,7 @@ xpipe2 (
|
|||
close(pipefd[1]);
|
||||
return -1;
|
||||
|
||||
#endif /* defined(HAVE_PIPE2) */
|
||||
#endif
|
||||
}
|
||||
|
||||
void *
|
||||
|
|
Loading…
Add table
Reference in a new issue