diff options
author | Yang Tse <yangsita@gmail.com> | 2008-05-26 01:59:00 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2008-05-26 01:59:00 +0000 |
commit | d6f8f1606850c8d814dec0dd65818960af88bbca (patch) | |
tree | 71646e8d6854f9856cc055cf707f1adb8716ab31 /lib | |
parent | 466429efb06c6b97f7e5c06651b88c9cf79eab54 (diff) |
fix: preprocessor complaining about macro redefinition
Diffstat (limited to 'lib')
-rw-r--r-- | lib/nss.c | 4 | ||||
-rw-r--r-- | lib/security.c | 7 | ||||
-rw-r--r-- | lib/ssluse.c | 4 |
3 files changed, 3 insertions, 12 deletions
@@ -66,10 +66,6 @@ /* 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]" */ diff --git a/lib/security.c b/lib/security.c index 60585a45e..da1e2fdde 100644 --- a/lib/security.c +++ b/lib/security.c @@ -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; diff --git a/lib/ssluse.c b/lib/ssluse.c index e5e1f6708..b0d7fd038 100644 --- a/lib/ssluse.c +++ b/lib/ssluse.c @@ -70,10 +70,6 @@ /* 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 |