warning: "min" redefined of qsort.
Hi.
I have warning with MinGW....
qsort.c:53:1: warning: "min" redefined
In file included from C:/MinGW/include/windows.h:48,
from ../../src/include/pg_config_os.h:12,
from ../../src/include/c.h:88,
from qsort.c:46:
C:/MinGW/include/windef.h:143:1: warning: this is the location of the previous definition
qsort_arg.c:53:1: warning: "min" redefined
In file included from C:/MinGW/include/windows.h:48,
from ../../src/include/pg_config_os.h:12,
from ../../src/include/c.h:88,
from qsort_arg.c:46:
C:/MinGW/include/windef.h:143:1: warning: this is the location of the previous definition
qsort.c:53:1: warning: "min" redefined
In file included from C:/MinGW/include/windows.h:48,
from ../../src/include/pg_config_os.h:12,
from ../../src/include/c.h:88,
from qsort.c:46:
C:/MinGW/include/windef.h:143:1: warning: this is the location of the previous definition
qsort_arg.c:53:1: warning: "min" redefined
In file included from C:/MinGW/include/windows.h:48,
from ../../src/include/pg_config_os.h:12,
from ../../src/include/c.h:88,
from qsort_arg.c:46:
Therefore, please consider this.
Regards,
Hiroshi Saito
Attachments:
qsort_win32_patchapplication/octet-stream; name=qsort_win32_patchDownload
--- src/port/qsort.c.orig Thu Oct 12 09:14:34 2006
+++ src/port/qsort.c Thu Oct 12 09:29:15 2006
@@ -50,6 +50,7 @@
int (*) (const void *, const void *));
static void swapfunc(char *, char *, size_t, int);
+#undef min
#define min(a, b) ((a) < (b) ? (a) : (b))
/*
--- src/port/qsort_arg.c.orig Thu Oct 12 09:14:40 2006
+++ src/port/qsort_arg.c Thu Oct 12 09:29:32 2006
@@ -50,6 +50,7 @@
qsort_arg_comparator cmp, void *arg);
static void swapfunc(char *, char *, size_t, int);
+#undef min
#define min(a, b) ((a) < (b) ? (a) : (b))
/*
"Hiroshi Saito" <z-saito@guitar.ocn.ne.jp> writes:
I have warning with MinGW....
qsort.c:53:1: warning: "min" redefined
I've fixed this by using Min() from c.h instead.
regards, tom lane