Bug#45288: pb2 returns a lot of compilation warnings
Ensure that fdatasync is properly declared as on Mac OS X, the function is available but there is no prototype. Also, port a fix for a warning from the InnoDB plugin over to the builtin. configure.in: Check that fdatasync is declared. mysys/my_sync.c: Use fdatasync only if it is declared. storage/innobase/include/ut0dbg.h: Port over from the plugin a fix for a warning.
This commit is contained in:
parent
be170c213f
commit
7406b38efa
@ -2073,6 +2073,13 @@ MYSQL_TYPE_QSORT
|
|||||||
AC_FUNC_UTIME_NULL
|
AC_FUNC_UTIME_NULL
|
||||||
AC_FUNC_VPRINTF
|
AC_FUNC_VPRINTF
|
||||||
|
|
||||||
|
AC_CHECK_DECLS([fdatasync],,,
|
||||||
|
[
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
])
|
||||||
|
|
||||||
AC_CHECK_FUNCS(alarm bfill bmove bsearch bzero \
|
AC_CHECK_FUNCS(alarm bfill bmove bsearch bzero \
|
||||||
chsize cuserid fchmod fcntl \
|
chsize cuserid fchmod fcntl \
|
||||||
fconvert fdatasync fesetround finite fpresetsticky fpsetmask fsync ftruncate \
|
fconvert fdatasync fesetround finite fpresetsticky fpsetmask fsync ftruncate \
|
||||||
|
@ -58,7 +58,7 @@ int my_sync(File fd, myf my_flags)
|
|||||||
/* Some file systems don't support F_FULLFSYNC and fail above: */
|
/* Some file systems don't support F_FULLFSYNC and fail above: */
|
||||||
DBUG_PRINT("info",("fcntl(F_FULLFSYNC) failed, falling back"));
|
DBUG_PRINT("info",("fcntl(F_FULLFSYNC) failed, falling back"));
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_FDATASYNC)
|
#if defined(HAVE_FDATASYNC) && HAVE_DECL_FDATASYNC
|
||||||
res= fdatasync(fd);
|
res= fdatasync(fd);
|
||||||
#elif defined(HAVE_FSYNC)
|
#elif defined(HAVE_FSYNC)
|
||||||
res= fsync(fd);
|
res= fsync(fd);
|
||||||
|
@ -39,7 +39,7 @@ extern ibool panic_shutdown;
|
|||||||
void ut_dbg_panic(void);
|
void ut_dbg_panic(void);
|
||||||
# define UT_DBG_PANIC ut_dbg_panic()
|
# define UT_DBG_PANIC ut_dbg_panic()
|
||||||
/* Stop threads in ut_a(). */
|
/* Stop threads in ut_a(). */
|
||||||
# define UT_DBG_STOP while (0) /* We do not do this on NetWare */
|
# define UT_DBG_STOP do {} while (0) /* We do not do this on NetWare */
|
||||||
#else /* __NETWARE__ */
|
#else /* __NETWARE__ */
|
||||||
# if defined(__WIN__) || defined(__INTEL_COMPILER)
|
# if defined(__WIN__) || defined(__INTEL_COMPILER)
|
||||||
# undef UT_DBG_USE_ABORT
|
# undef UT_DBG_USE_ABORT
|
||||||
@ -71,7 +71,7 @@ ut_dbg_stop_thread(
|
|||||||
/* Abort the execution. */
|
/* Abort the execution. */
|
||||||
# define UT_DBG_PANIC abort()
|
# define UT_DBG_PANIC abort()
|
||||||
/* Stop threads (null operation) */
|
/* Stop threads (null operation) */
|
||||||
# define UT_DBG_STOP while (0)
|
# define UT_DBG_STOP do {} while (0)
|
||||||
# else /* UT_DBG_USE_ABORT */
|
# else /* UT_DBG_USE_ABORT */
|
||||||
/* Abort the execution. */
|
/* Abort the execution. */
|
||||||
# define UT_DBG_PANIC \
|
# define UT_DBG_PANIC \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user