]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
fix: preprocessor complaining about macro redefinition
authorYang Tse <yangsita@gmail.com>
Mon, 26 May 2008 01:59:00 +0000 (01:59 +0000)
committerYang Tse <yangsita@gmail.com>
Mon, 26 May 2008 01:59:00 +0000 (01:59 +0000)
lib/nss.c
lib/security.c
lib/ssluse.c

index c8d728d3eb75fa8c8175e2d0ab98cb8d97e36765..20f8770d2884a0ac2a8e2a6c2325370fdfd2dbce 100644 (file)
--- a/lib/nss.c
+++ b/lib/nss.c
 /* The last #include file should be: */
 #include "memdebug.h"
 
-#ifndef min
-#define min(a, b)   ((a) < (b) ? (a) : (b))
-#endif
-
 #define SSL_DIR "/etc/pki/nssdb"
 
 /* enough to fit the string "PEM Token #[0|1]" */
index 60585a45ea8271f6ca6dabbc9067e343a44dad5a..da1e2fddeaa271e4041c875ed2bbc72ce882ec4e 100644 (file)
@@ -10,7 +10,7 @@
  * Copyright (c) 1998, 1999 Kungliga Tekniska Högskolan
  * (Royal Institute of Technology, Stockholm, Sweden).
  *
- * Copyright (C) 2001 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2001 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * All rights reserved.
  *
@@ -70,8 +70,6 @@
 /* The last #include file should be: */
 #include "memdebug.h"
 
-#define min(a, b)   ((a) < (b) ? (a) : (b))
-
 static const struct {
   enum protection_level level;
   const char *name;
@@ -179,7 +177,8 @@ sec_get_data(struct connectdata *conn,
 static size_t
 buffer_read(struct krb4buffer *buf, void *data, size_t len)
 {
-  len = min(len, buf->size - buf->index);
+  if(buf->size - buf->index < len)
+    len = buf->size - buf->index;
   memcpy(data, (char*)buf->data + buf->index, len);
   buf->index += len;
   return len;
index e5e1f6708068f0f251a81b0b5065b68a6d9d914e..b0d7fd038bf116df27a420c0955a8b1204089a62 100644 (file)
 /* The last #include file should be: */
 #include "memdebug.h"
 
-#ifndef min
-#define min(a, b)   ((a) < (b) ? (a) : (b))
-#endif
-
 #if OPENSSL_VERSION_NUMBER >= 0x0090581fL
 #define HAVE_SSL_GET1_SESSION 1
 #else