Skip to content

Commit

Permalink
MDEV-8743: use mkostemp when available with O_CLOEXEC
Browse files Browse the repository at this point in the history
Closes #639
  • Loading branch information
grooverdan authored and vaintroub committed May 21, 2018
1 parent f56d141 commit 20fadaa
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions cmake/os/WindowsCache.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ SET(HAVE_MEMCPY 1 CACHE INTERNAL "")
SET(HAVE_MEMMOVE 1 CACHE INTERNAL "")
SET(HAVE_MEMORY_H 1 CACHE INTERNAL "")
SET(HAVE_MKSTEMP CACHE INTERNAL "")
SET(HAVE_MKOSTEMP CACHE INTERNAL "")
SET(HAVE_MLOCK CACHE INTERNAL "")
SET(HAVE_MLOCKALL CACHE INTERNAL "")
SET(HAVE_MMAP CACHE INTERNAL "")
Expand Down
1 change: 1 addition & 0 deletions config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@
#cmakedefine HAVE_MEMCPY 1
#cmakedefine HAVE_MEMMOVE 1
#cmakedefine HAVE_MKSTEMP 1
#cmakedefine HAVE_MKOSTEMP 1
#cmakedefine HAVE_MLOCKALL 1
#cmakedefine HAVE_MMAP 1
#cmakedefine HAVE_MMAP64 1
Expand Down
1 change: 1 addition & 0 deletions configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ CHECK_FUNCTION_EXISTS (mallinfo HAVE_MALLINFO)
CHECK_FUNCTION_EXISTS (memcpy HAVE_MEMCPY)
CHECK_FUNCTION_EXISTS (memmove HAVE_MEMMOVE)
CHECK_FUNCTION_EXISTS (mkstemp HAVE_MKSTEMP)
CHECK_FUNCTION_EXISTS (mkostemp HAVE_MKOSTEMP)
CHECK_FUNCTION_EXISTS (mlock HAVE_MLOCK)
CHECK_FUNCTION_EXISTS (mlockall HAVE_MLOCKALL)
CHECK_FUNCTION_EXISTS (mmap HAVE_MMAP)
Expand Down
4 changes: 3 additions & 1 deletion mysys/mf_tempfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
#include <paths.h>
#endif


#ifdef HAVE_MKOSTEMP
#define mkstemp(A) mkostemp(A, O_CLOEXEC)
#endif

/*
@brief
Expand Down

0 comments on commit 20fadaa

Please sign in to comment.