Skip to content

Commit 60f1173

Browse files
committed
fix issue on missing min macro for mingw
1 parent 152bc24 commit 60f1173

2 files changed

Lines changed: 16 additions & 13 deletions

File tree

src/FTPSession.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ void FTPSession::QueueTimerHandler() {
217217
return;
218218
}
219219

220-
DWORD minSecs = min(mainSecs, transSecs);
220+
DWORD minSecs = std::min(mainSecs, transSecs);
221221

222222
OutDebug("[FTPSession] There has been %d seconds since last action with server", minSecs);
223223

src/StdInc.h

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
/*
2-
NppFTP: FTP/SFTP functionality for Notepad++
3-
Copyright (C) 2010 Harry (harrybharry@users.sourceforge.net)
2+
NppFTP: FTP/SFTP functionality for Notepad++
3+
Copyright (C) 2010 Harry (harrybharry@users.sourceforge.net)
44
5-
This program is free software: you can redistribute it and/or modify
6-
it under the terms of the GNU General Public License as published by
7-
the Free Software Foundation, either version 3 of the License, or
8-
(at your option) any later version.
5+
This program is free software: you can redistribute it and/or modify
6+
it under the terms of the GNU General Public License as published by
7+
the Free Software Foundation, either version 3 of the License, or
8+
(at your option) any later version.
99
10-
This program is distributed in the hope that it will be useful,
11-
but WITHOUT ANY WARRANTY; without even the implied warranty of
12-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13-
GNU General Public License for more details.
10+
This program is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
GNU General Public License for more details.
1414
15-
You should have received a copy of the GNU General Public License
16-
along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
You should have received a copy of the GNU General Public License
16+
along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

1919
//System headers
2020
#define _WIN32_IE 0x0501
2121
#define _WIN32_WINNT 0x0501
22+
#define NOMINMAX 1
23+
2224
#include <winsock2.h>
2325
#include <windows.h>
2426
#include <shellapi.h>
@@ -28,6 +30,7 @@
2830
#include <string>
2931
#include <vector>
3032
#include <deque>
33+
#include <algorithm>
3134

3235
//Library headers
3336
#include "tinyxml.h"

0 commit comments

Comments
 (0)