Windows: #undef min / max in portab.h

This commit is contained in:
kichikuou
2025-06-20 08:11:35 +09:00
parent 5bd4622031
commit 361ca89016
5 changed files with 9 additions and 8 deletions
-2
View File
@@ -21,8 +21,6 @@
#include <stdlib.h>
#ifdef _WIN32
#include <windows.h>
#undef max
#undef min
#else // _WIN32
#include <errno.h>
#include <fcntl.h>
+9
View File
@@ -28,6 +28,15 @@
#include <stdint.h>
#include "config.h"
#ifdef _WIN32
# ifdef min
# undef min
# endif
# ifdef max
# undef max
# endif
# define NOMINMAX
#endif
#define min(x,y) ((x) < (y) ? (x) : (y))
#define max(x,y) ((x) > (y) ? (x) : (y))
-2
View File
@@ -17,8 +17,6 @@
*
*/
#include <windows.h>
#undef min
#undef max
#include <stdio.h>
#include <signal.h>
#include "win/console.h"
-2
View File
@@ -18,8 +18,6 @@
*/
#include <windows.h>
#include <commctrl.h>
#undef min
#undef max
#include <SDL_syswm.h>
#include "menu.h"
#include "gfx_private.h"
-2
View File
@@ -17,8 +17,6 @@
*
*/
#include <windows.h>
#undef min
#undef max
#include <time.h>
#include <SDL_syswm.h>
#include "system.h"