]> git.mxchange.org Git - simgear.git/blobdiff - simgear/metar/Local.h
MSVC warning fixes
[simgear.git] / simgear / metar / Local.h
index 47bec5de112fabcdd0d2fa724fbbabd69ee4f3e6..10f9081cfe2fa0331a55ef47429a59a51ddbde8b 100644 (file)
 #define IMOD(i, j)   (((i) % (j)) < 0 ? ((i) % (j))+(j) : ((i) % (j)))
 #define IN_RANGE(n, lo, hi) ((lo) <= (n) && (n) <= (hi))
 #define LOOPDN(r, n) for ((r) = (n)+1; --(r) > 0;)
-#define MAX(x, y)    (((x) < (y)) ? (y) : (x))
+#ifndef MAX
+#  define MAX(x, y)    (((x) < (y)) ? (y) : (x))
+#endif
 #ifndef max
-#define max(x, y)    (((x) < (y)) ? (y) : (x))
+#  define max(x, y)    (((x) < (y)) ? (y) : (x))
+#endif
+#ifndef MIN
+#  define MIN(x, y)    (((x) < (y)) ? (x) : (y))
 #endif
-#define MIN(x, y)    (((x) < (y)) ? (x) : (y))
 #ifndef min
-#define min(x, y)    (((x) < (y)) ? (x) : (y))
+#  define min(x, y)    (((x) < (y)) ? (x) : (y))
 #endif
 #define STREQ(s, t)  (strcmp(s, t) == 0)
 #define STRGT(s, t)  (strcmp(s, t) > 0)
@@ -1092,8 +1096,8 @@ bool ccap2std(char *, Devaddr *, Diskaddr *);
  
 bool std2ccap(Devaddr *, Diskaddr *, char *);
  
-char *strupr(char *);
-char *strlwr(char *);
+//char *strupr(char *);
+//char *strlwr(char *);
 //char *strdup(char *);
 //int strcmpi(char *, char *);
  
@@ -1102,8 +1106,10 @@ char *strlwr(char *);
 char *rptstrip(char *);
 char *rptfmt(char *);
 char *rptfmti(char *, unsigned short int);
+
+#ifndef __FreeBSD__  // strnstr is already defined on FreeBSD
 char *strnstr(char *, char *, size_t);
+#endif
  
 int stregion(int);
 int ccregion(char *);