Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

Commit

Permalink
#435: fixed compiling error if no regex.h
Browse files Browse the repository at this point in the history
  • Loading branch information
hugbug committed Aug 28, 2017
1 parent 9f80f45 commit 35d8aa5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions daemon/main/nzbget.h
Expand Up @@ -69,7 +69,9 @@ compiled */
#define SOCKLEN_T socklen_t

/* Define to 1 if you have the <regex.h> header file. */
#ifndef DISABLE_REGEX
#define HAVE_REGEX_H 1
#endif

/* Suppress warnings */
#define _CRT_SECURE_NO_DEPRECATE
Expand Down
2 changes: 1 addition & 1 deletion daemon/queue/QueueEditor.cpp
Expand Up @@ -650,7 +650,7 @@ void QueueEditor::PrepareList(ItemList* itemList, IdList* idList,
bool QueueEditor::BuildIdListFromNameList(IdList* idList, NameList* nameList, DownloadQueue::EMatchMode matchMode, DownloadQueue::EEditAction action)
{
#ifndef HAVE_REGEX_H
if (matchMode == mmRegEx)
if (matchMode == DownloadQueue::mmRegEx)
{
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion daemon/remote/BinRpc.cpp
Expand Up @@ -871,7 +871,7 @@ void EditQueueBinCommand::Execute()
else
{
#ifndef HAVE_REGEX_H
if ((QueueEditor::EMatchMode)matchMode == QueueEditor::mmRegEx)
if ((DownloadQueue::EMatchMode)matchMode == DownloadQueue::mmRegEx)
{
SendBoolResponse(false, "Edit-Command failed: the program was compiled without RegEx-support");
return;
Expand Down
2 changes: 1 addition & 1 deletion daemon/util/Util.cpp
Expand Up @@ -1687,7 +1687,7 @@ int RegEx::GetMatchStart(int index)
#ifdef HAVE_REGEX_H
return m_matches[index].rm_so;
#else
return nullptr;
return 0;
#endif
}

Expand Down

0 comments on commit 35d8aa5

Please sign in to comment.