Skip to content

Commit

Permalink
ioprio: Standardise HAVE_WINDOWS_IOPRIO macro as defined with either …
Browse files Browse the repository at this point in the history
…0 or 1
  • Loading branch information
luke-jr committed Feb 23, 2025
1 parent 8441867 commit a67b115
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1157,13 +1157,13 @@ AC_COMPILE_IFELSE([
SetFileInformationByHandle(hFile, FileIoPriorityHintInfo, &priorityHint, sizeof(priorityHint));
]])
],[
have_windows_ioprio=yes
AC_DEFINE(HAVE_WINDOWS_IOPRIO,1,[Define this symbol if you have Windows I/O priority functions])
AC_MSG_RESULT([yes])
HAVE_WINDOWS_IOPRIO=1
],[
have_windows_ioprio=no
AC_MSG_RESULT([no])
HAVE_WINDOWS_IOPRIO=0
])
AC_MSG_RESULT($have_windows_ioprio)
AM_CONDITIONAL([HAVE_WINDOWS_IOPRIO], [test "$have_windows_ioprio" = "yes"])
AC_DEFINE_UNQUOTED([HAVE_WINDOWS_IOPRIO], [$HAVE_WINDOWS_IOPRIO], [Define to 1 if Windows file IO functions are usable.])

dnl Check for different ways of gathering OS randomness
AC_MSG_CHECKING([for Linux getrandom function])
Expand Down
2 changes: 1 addition & 1 deletion src/util/ioprio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ int ioprio_set_idle() {
#endif


#ifdef HAVE_WINDOWS_IOPRIO
#if HAVE_WINDOWS_IOPRIO

#ifdef _WIN32_WINNT
#undef _WIN32_WINNT
Expand Down
2 changes: 1 addition & 1 deletion src/util/ioprio.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class ioprio_idler {
#define IOPRIO_IDLER(lowprio) (void)lowprio;
#endif

#ifdef HAVE_WINDOWS_IOPRIO
#if HAVE_WINDOWS_IOPRIO
bool ioprio_set_file_idle(FILE *);
#else
#define ioprio_set_file_idle(f) ((void)false)
Expand Down

0 comments on commit a67b115

Please sign in to comment.