diff options
author | Jens Rehsack <sno@netbsd.org> | 2020-02-21 19:29:49 +0100 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2020-03-31 01:07:43 -0400 |
commit | 289108cc9bef892a46bba9b11e6989b36107415d (patch) | |
tree | 42b3a994641bc191357b0cd1eb523ced86b67690 /src/output.h | |
parent | 61c413d5ea98593b204739604966f3ada7e29118 (diff) | |
download | make-git-289108cc9bef892a46bba9b11e6989b36107415d.tar.gz |
* src/output.h: [WINDOWS32] [SV 57888] Use gnulib fcntl if available
If gnulib fcntl is available (for MinGW32) use it rather than our
homegrown version.
Signed-off-by: Jens Rehsack <sno@netbsd.org>
Copyright-paperwork-exempt: yes
Diffstat (limited to 'src/output.h')
-rw-r--r-- | src/output.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/output.h b/src/output.h index a5065058..ece1c706 100644 --- a/src/output.h +++ b/src/output.h @@ -67,14 +67,21 @@ void output_dump (struct output *out); # ifdef WINDOWS32 /* For emulations in w32/compat/posixfcn.c. */ -# define F_GETFD 1 -# define F_SETLKW 2 +# ifndef F_GETFD +# define F_GETFD 1 +# endif +# ifndef F_SETLKW +# define F_SETLKW 2 +# endif /* Implementation note: None of the values of l_type below can be zero -- they are compared with a static instance of the struct, so zero means unknown/invalid, see w32/compat/posixfcn.c. */ -# define F_WRLCK 1 -# define F_UNLCK 2 - +# ifndef F_WRLCK +# define F_WRLCK 1 +# endif +# ifndef F_UNLCK +# define F_UNLCK 2 +# endif struct flock { short l_type; @@ -89,7 +96,9 @@ struct flock typedef intptr_t sync_handle_t; /* Public functions emulated/provided in posixfcn.c. */ +# if !defined(GNULIB_defined_rpl_fcntl) && !defined(GNULIB_defined_fcntl) int fcntl (intptr_t fd, int cmd, ...); +# endif intptr_t create_mutex (void); int same_stream (FILE *f1, FILE *f2); |