From 3bbffc18de859c02130f135293e90a280101b79f Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Tue, 18 Apr 2006 19:04:30 +0000 Subject: [PATCH] Renamed 'byte' to 'byte_t'. --- ChangeLog | 5 +++++ src/net/imap/IMAPConnection.cpp | 4 ++-- src/net/pop3/POP3Store.cpp | 4 ++-- src/net/smtp/SMTPTransport.cpp | 4 ++-- src/net/tls/TLSSocket.cpp | 2 +- src/security/cert/X509Certificate.cpp | 8 ++++---- src/security/digest/md5/md5MessageDigest.cpp | 16 +++++++-------- src/security/digest/messageDigest.cpp | 3 +-- .../digest/sha1/sha1MessageDigest.cpp | 20 +++++++++---------- src/security/sasl/SASLContext.cpp | 6 +++--- src/security/sasl/SASLSession.cpp | 4 ++-- src/security/sasl/SASLSocket.cpp | 8 ++++---- src/security/sasl/builtinSASLMechanism.cpp | 18 ++++++++--------- src/utility/stream.cpp | 2 +- tests/security/digest/sha1Test.cpp | 2 +- vmime/security/cert/X509Certificate.hpp | 2 +- .../security/digest/md5/md5MessageDigest.hpp | 12 +++++------ vmime/security/digest/messageDigest.hpp | 12 +++++------ .../digest/sha1/sha1MessageDigest.hpp | 18 ++++++++--------- vmime/security/sasl/SASLContext.hpp | 4 ++-- vmime/security/sasl/SASLMechanism.hpp | 12 +++++------ vmime/security/sasl/SASLSession.hpp | 4 ++-- vmime/security/sasl/SASLSocket.hpp | 2 +- vmime/security/sasl/builtinSASLMechanism.hpp | 12 +++++------ vmime/types.hpp | 4 ++-- vmime/utility/stream.hpp | 4 ++-- 26 files changed, 98 insertions(+), 94 deletions(-) diff --git a/ChangeLog b/ChangeLog index 29bdf09b..e9d59b68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,11 @@ VERSION 0.8.1cvs ================ +2006-04-18 Vincent Richard + + * Renamed 'byte' to 'byte_t' to fix compilation problems on Fedora + core 5 (thanks to Rafael Fernandez). + 2006-02-20 Vincent Richard * net/imap/IMAPParser.hpp: added a "relaxed" mode to allow 8-bit diff --git a/src/net/imap/IMAPConnection.cpp b/src/net/imap/IMAPConnection.cpp index 9683b009..7f13cf48 100644 --- a/src/net/imap/IMAPConnection.cpp +++ b/src/net/imap/IMAPConnection.cpp @@ -370,10 +370,10 @@ void IMAPConnection::authenticateSASL() continue; } - byte* challenge = 0; + byte_t* challenge = 0; int challengeLen = 0; - byte* resp = 0; + byte_t* resp = 0; int respLen = 0; try diff --git a/src/net/pop3/POP3Store.cpp b/src/net/pop3/POP3Store.cpp index 24e5b9c3..ba4a5254 100644 --- a/src/net/pop3/POP3Store.cpp +++ b/src/net/pop3/POP3Store.cpp @@ -454,10 +454,10 @@ void POP3Store::authenticateSASL() } case RESPONSE_READY: { - byte* challenge = 0; + byte_t* challenge = 0; int challengeLen = 0; - byte* resp = 0; + byte_t* resp = 0; int respLen = 0; try diff --git a/src/net/smtp/SMTPTransport.cpp b/src/net/smtp/SMTPTransport.cpp index 4ce19716..1b634151 100644 --- a/src/net/smtp/SMTPTransport.cpp +++ b/src/net/smtp/SMTPTransport.cpp @@ -355,10 +355,10 @@ void SMTPTransport::authenticateSASL() } case 334: { - byte* challenge = 0; + byte_t* challenge = 0; int challengeLen = 0; - byte* resp = 0; + byte_t* resp = 0; int respLen = 0; try diff --git a/src/net/tls/TLSSocket.cpp b/src/net/tls/TLSSocket.cpp index 9dd8b625..b1896844 100644 --- a/src/net/tls/TLSSocket.cpp +++ b/src/net/tls/TLSSocket.cpp @@ -319,7 +319,7 @@ ref TLSSocket::getPeerCertificates() const gnutls_x509_crt_export(x509Certs[i], GNUTLS_X509_FMT_DER, NULL, &dataSize); - byte* data = new byte[dataSize]; + byte_t* data = new byte_t[dataSize]; gnutls_x509_crt_export(x509Certs[i], GNUTLS_X509_FMT_DER, data, &dataSize); diff --git a/src/security/cert/X509Certificate.cpp b/src/security/cert/X509Certificate.cpp index 2575ba5d..65de1093 100644 --- a/src/security/cert/X509Certificate.cpp +++ b/src/security/cert/X509Certificate.cpp @@ -92,12 +92,12 @@ ref X509Certificate::import(utility::inputStream& is) // static ref X509Certificate::import - (const byte* data, const unsigned int length) + (const byte_t* data, const unsigned int length) { ref cert = vmime::create (); gnutls_datum buffer; - buffer.data = const_cast (data); + buffer.data = const_cast (data); buffer.size = length; // Try DER format @@ -126,7 +126,7 @@ void X509Certificate::write gnutls_x509_crt_export(m_data->cert, fmt, NULL, &dataSize); - byte* data = new byte[dataSize]; + byte_t* data = new byte_t[dataSize]; gnutls_x509_crt_export(m_data->cert, fmt, data, &dataSize); @@ -210,7 +210,7 @@ const byteArray X509Certificate::getFingerprint(const DigestAlgorithm algo) cons gnutls_x509_crt_get_fingerprint (m_data->cert, galgo, NULL, &bufferSize); - byte* buffer = new byte[bufferSize]; + byte_t* buffer = new byte_t[bufferSize]; if (gnutls_x509_crt_get_fingerprint (m_data->cert, galgo, buffer, &bufferSize) == 0) diff --git a/src/security/digest/md5/md5MessageDigest.cpp b/src/security/digest/md5/md5MessageDigest.cpp index 852812f9..200af52e 100644 --- a/src/security/digest/md5/md5MessageDigest.cpp +++ b/src/security/digest/md5/md5MessageDigest.cpp @@ -117,7 +117,7 @@ static inline void swapUint32Array(vmime_uint32* buf, unsigned long words) } -void md5MessageDigest::update(const byte b) +void md5MessageDigest::update(const byte_t b) { update(&b, 1); } @@ -125,18 +125,18 @@ void md5MessageDigest::update(const byte b) void md5MessageDigest::update(const string& s) { - update(reinterpret_cast (s.data()), s.length()); + update(reinterpret_cast (s.data()), s.length()); } -void md5MessageDigest::update(const byte* data, const unsigned long offset, +void md5MessageDigest::update(const byte_t* data, const unsigned long offset, const unsigned long len) { update(data + offset, len); } -void md5MessageDigest::update(const byte* data, const unsigned long length) +void md5MessageDigest::update(const byte_t* data, const unsigned long length) { const unsigned long avail = 64 - (m_byteCount & 0x3f); unsigned long len = length; @@ -175,14 +175,14 @@ void md5MessageDigest::finalize(const string& s) } -void md5MessageDigest::finalize(const byte* buffer, const unsigned long len) +void md5MessageDigest::finalize(const byte_t* buffer, const unsigned long len) { update(buffer, len); finalize(); } -void md5MessageDigest::finalize(const byte* buffer, +void md5MessageDigest::finalize(const byte_t* buffer, const unsigned long offset, const unsigned long len) { update(buffer, offset, len); @@ -333,9 +333,9 @@ const int md5MessageDigest::getDigestLength() const } -const byte* md5MessageDigest::getDigest() const +const byte_t* md5MessageDigest::getDigest() const { - return reinterpret_cast (m_hash); + return reinterpret_cast (m_hash); } diff --git a/src/security/digest/messageDigest.cpp b/src/security/digest/messageDigest.cpp index 1f86b94f..bba80023 100644 --- a/src/security/digest/messageDigest.cpp +++ b/src/security/digest/messageDigest.cpp @@ -33,7 +33,7 @@ namespace digest { const string messageDigest::getHexDigest() const { - const byte* hash = getDigest(); + const byte_t* hash = getDigest(); const int len = getDigestLength(); static const unsigned char hex[] = "0123456789abcdef"; @@ -47,7 +47,6 @@ const string messageDigest::getHexDigest() const } return oss.str(); - } diff --git a/src/security/digest/sha1/sha1MessageDigest.cpp b/src/security/digest/sha1/sha1MessageDigest.cpp index f1726fd4..cd58f0c9 100644 --- a/src/security/digest/sha1/sha1MessageDigest.cpp +++ b/src/security/digest/sha1/sha1MessageDigest.cpp @@ -80,7 +80,7 @@ void sha1MessageDigest::init() } -void sha1MessageDigest::update(const byte b) +void sha1MessageDigest::update(const byte_t b) { update(&b, 1); } @@ -88,18 +88,18 @@ void sha1MessageDigest::update(const byte b) void sha1MessageDigest::update(const string& s) { - update(reinterpret_cast (s.data()), s.length()); + update(reinterpret_cast (s.data()), s.length()); } -void sha1MessageDigest::update(const byte* buffer, const unsigned long offset, +void sha1MessageDigest::update(const byte_t* buffer, const unsigned long offset, const unsigned long len) { update(buffer + offset, len); } -void sha1MessageDigest::update(const byte* buffer, const unsigned long len) +void sha1MessageDigest::update(const byte_t* buffer, const unsigned long len) { unsigned int i, j; @@ -142,10 +142,10 @@ void sha1MessageDigest::finalize() >> ((3-(i & 3)) * 8) ) & 255); // Endian independent } - update(reinterpret_cast ("\200"), 1); + update(reinterpret_cast ("\200"), 1); while ((m_count[0] & 504) != 448) - update(reinterpret_cast ("\0"), 1); + update(reinterpret_cast ("\0"), 1); update(finalcount, 8); // Should cause a transform() @@ -167,18 +167,18 @@ void sha1MessageDigest::finalize() void sha1MessageDigest::finalize(const string& s) { - finalize(reinterpret_cast (s.data()), s.length()); + finalize(reinterpret_cast (s.data()), s.length()); } -void sha1MessageDigest::finalize(const byte* buffer, const unsigned long len) +void sha1MessageDigest::finalize(const byte_t* buffer, const unsigned long len) { update(buffer, len); finalize(); } -void sha1MessageDigest::finalize(const byte* buffer, +void sha1MessageDigest::finalize(const byte_t* buffer, const unsigned long offset, const unsigned long len) { finalize(buffer + offset, len); @@ -252,7 +252,7 @@ const int sha1MessageDigest::getDigestLength() const } -const byte* sha1MessageDigest::getDigest() const +const byte_t* sha1MessageDigest::getDigest() const { return m_digest; } diff --git a/src/security/sasl/SASLContext.cpp b/src/security/sasl/SASLContext.cpp index cf7d94f6..a4e25feb 100644 --- a/src/security/sasl/SASLContext.cpp +++ b/src/security/sasl/SASLContext.cpp @@ -96,7 +96,7 @@ ref SASLContext::suggestMechanism } -void SASLContext::decodeB64(const string& input, byte** output, int* outputLen) +void SASLContext::decodeB64(const string& input, byte_t** output, int* outputLen) { string res; @@ -107,7 +107,7 @@ void SASLContext::decodeB64(const string& input, byte** output, int* outputLen) dec->decode(is, os); - byte* out = new byte[res.length()]; + byte_t* out = new byte_t[res.length()]; std::copy(res.begin(), res.end(), out); @@ -116,7 +116,7 @@ void SASLContext::decodeB64(const string& input, byte** output, int* outputLen) } -const string SASLContext::encodeB64(const byte* input, const int inputLen) +const string SASLContext::encodeB64(const byte_t* input, const int inputLen) { string res; diff --git a/src/security/sasl/SASLSession.cpp b/src/security/sasl/SASLSession.cpp index 64606d01..9e66baa0 100644 --- a/src/security/sasl/SASLSession.cpp +++ b/src/security/sasl/SASLSession.cpp @@ -93,8 +93,8 @@ ref SASLSession::getContext() const bool SASLSession::evaluateChallenge - (const byte* challenge, const int challengeLen, - byte** response, int* responseLen) + (const byte_t* challenge, const int challengeLen, + byte_t** response, int* responseLen) { return m_mech->step(thisRef().dynamicCast (), challenge, challengeLen, response, responseLen); diff --git a/src/security/sasl/SASLSocket.cpp b/src/security/sasl/SASLSocket.cpp index 1d2caff1..b4d1794f 100644 --- a/src/security/sasl/SASLSocket.cpp +++ b/src/security/sasl/SASLSocket.cpp @@ -105,11 +105,11 @@ const int SASLSocket::receiveRaw(char* buffer, const int count) const int n = m_wrapped->receiveRaw(buffer, count); - byte* output = 0; + byte_t* output = 0; int outputLen = 0; m_session->getMechanism()->decode - (m_session, reinterpret_cast (buffer), n, + (m_session, reinterpret_cast (buffer), n, &output, &outputLen); // If we can not copy all decoded data into the output buffer, put @@ -143,11 +143,11 @@ void SASLSocket::send(const string& buffer) void SASLSocket::sendRaw(const char* buffer, const int count) { - byte* output = 0; + byte_t* output = 0; int outputLen = 0; m_session->getMechanism()->encode - (m_session, reinterpret_cast (buffer), count, + (m_session, reinterpret_cast (buffer), count, &output, &outputLen); try diff --git a/src/security/sasl/builtinSASLMechanism.cpp b/src/security/sasl/builtinSASLMechanism.cpp index 45eddfd5..84819742 100644 --- a/src/security/sasl/builtinSASLMechanism.cpp +++ b/src/security/sasl/builtinSASLMechanism.cpp @@ -57,8 +57,8 @@ const string builtinSASLMechanism::getName() const const bool builtinSASLMechanism::step - (ref sess, const byte* challenge, const int challengeLen, - byte** response, int* responseLen) + (ref sess, const byte_t* challenge, const int challengeLen, + byte_t** response, int* responseLen) { char* output = 0; size_t outputLen = 0; @@ -69,7 +69,7 @@ const bool builtinSASLMechanism::step if (result == GSASL_OK || result == GSASL_NEEDS_MORE) { - byte* res = new byte[outputLen]; + byte_t* res = new byte_t[outputLen]; for (size_t i = 0 ; i < outputLen ; ++i) res[i] = output[i]; @@ -115,8 +115,8 @@ const bool builtinSASLMechanism::isComplete() const void builtinSASLMechanism::encode - (ref sess, const byte* input, const int inputLen, - byte** output, int* outputLen) + (ref sess, const byte_t* input, const int inputLen, + byte_t** output, int* outputLen) { char* coutput = 0; size_t coutputLen = 0; @@ -130,7 +130,7 @@ void builtinSASLMechanism::encode try { - byte* res = new byte[coutputLen]; + byte_t* res = new byte_t[coutputLen]; std::copy(coutput, coutput + coutputLen, res); @@ -148,8 +148,8 @@ void builtinSASLMechanism::encode void builtinSASLMechanism::decode - (ref sess, const byte* input, const int inputLen, - byte** output, int* outputLen) + (ref sess, const byte_t* input, const int inputLen, + byte_t** output, int* outputLen) { char* coutput = 0; size_t coutputLen = 0; @@ -163,7 +163,7 @@ void builtinSASLMechanism::decode throw exceptions::sasl_exception("Decoding error."); } - byte* res = new byte[coutputLen]; + byte_t* res = new byte_t[coutputLen]; std::copy(coutput, coutput + coutputLen, res); diff --git a/src/utility/stream.cpp b/src/utility/stream.cpp index 5a8e8989..ac219fbd 100644 --- a/src/utility/stream.cpp +++ b/src/utility/stream.cpp @@ -363,7 +363,7 @@ const stream::size_type inputStreamPointerAdapter::skip(const size_type count) // inputStreamByteBufferAdapter -inputStreamByteBufferAdapter::inputStreamByteBufferAdapter(const byte* buffer, const size_type length) +inputStreamByteBufferAdapter::inputStreamByteBufferAdapter(const byte_t* buffer, const size_type length) : m_buffer(buffer), m_length(length), m_pos(0) { } diff --git a/tests/security/digest/sha1Test.cpp b/tests/security/digest/sha1Test.cpp index f9bb9ee6..69f7bfc8 100644 --- a/tests/security/digest/sha1Test.cpp +++ b/tests/security/digest/sha1Test.cpp @@ -74,7 +74,7 @@ VMIME_TEST_SUITE_BEGIN { INIT_DIGEST(algo, "sha1"); - vmime::byte* buffer = new vmime::byte[1000000]; + vmime::byte_t* buffer = new vmime::byte_t[1000000]; for (int i = 0 ; i < 1000000 ; ++i) buffer[i] = 'a'; diff --git a/vmime/security/cert/X509Certificate.hpp b/vmime/security/cert/X509Certificate.hpp index f328e412..959abff7 100644 --- a/vmime/security/cert/X509Certificate.hpp +++ b/vmime/security/cert/X509Certificate.hpp @@ -83,7 +83,7 @@ public: * @return a X.509 certificate, or NULL if the given data does not * represent a valid certificate */ - static ref import(const byte* data, const unsigned int length); + static ref import(const byte_t* data, const unsigned int length); /** Exports this X.509 certificate to the specified format. * diff --git a/vmime/security/digest/md5/md5MessageDigest.hpp b/vmime/security/digest/md5/md5MessageDigest.hpp index 0b93c850..002ba0c6 100644 --- a/vmime/security/digest/md5/md5MessageDigest.hpp +++ b/vmime/security/digest/md5/md5MessageDigest.hpp @@ -40,18 +40,18 @@ public: md5MessageDigest(); - void update(const byte b); + void update(const byte_t b); void update(const string& s); - void update(const byte* buffer, const unsigned long len); - void update(const byte* buffer, const unsigned long offset, const unsigned long len); + void update(const byte_t* buffer, const unsigned long len); + void update(const byte_t* buffer, const unsigned long offset, const unsigned long len); void finalize(); void finalize(const string& s); - void finalize(const byte* buffer, const unsigned long len); - void finalize(const byte* buffer, const unsigned long offset, const unsigned long len); + void finalize(const byte_t* buffer, const unsigned long len); + void finalize(const byte_t* buffer, const unsigned long offset, const unsigned long len); const int getDigestLength() const; - const byte* getDigest() const; + const byte_t* getDigest() const; void reset(); diff --git a/vmime/security/digest/messageDigest.hpp b/vmime/security/digest/messageDigest.hpp index 230bbd64..8f375f3c 100644 --- a/vmime/security/digest/messageDigest.hpp +++ b/vmime/security/digest/messageDigest.hpp @@ -52,14 +52,14 @@ public: * * @param b the byte with which to update the digest. */ - virtual void update(const byte b) = 0; + virtual void update(const byte_t b) = 0; /** Updates the digest using the specified array of bytes. * * @param buffer array of bytes * @param len number of bytes to use in the buffer */ - virtual void update(const byte* buffer, const unsigned long len) = 0; + virtual void update(const byte_t* buffer, const unsigned long len) = 0; /** Updates the digest using the specified array of bytes, * starting at the specified offset. @@ -68,7 +68,7 @@ public: * @param offset offset to start from in the array of bytes * @param len number of bytes to use, starting at offset */ - virtual void update(const byte* buffer, + virtual void update(const byte_t* buffer, const unsigned long offset, const unsigned long len) = 0; @@ -87,14 +87,14 @@ public: * such as padding. This is equivalent to calling update() and * then finalize(). */ - virtual void finalize(const byte* buffer, + virtual void finalize(const byte_t* buffer, const unsigned long len) = 0; /** Completes the hash computation by performing final operations * such as padding. This is equivalent to calling update() and * then finalize(). */ - virtual void finalize(const byte* buffer, + virtual void finalize(const byte_t* buffer, const unsigned long offset, const unsigned long len) = 0; @@ -112,7 +112,7 @@ public: * * @return computed hash */ - virtual const byte* getDigest() const = 0; + virtual const byte_t* getDigest() const = 0; /** Returns the hash as an hexadecimal string. * You must call finalize() before using this function, or the diff --git a/vmime/security/digest/sha1/sha1MessageDigest.hpp b/vmime/security/digest/sha1/sha1MessageDigest.hpp index 78667d33..4268749d 100644 --- a/vmime/security/digest/sha1/sha1MessageDigest.hpp +++ b/vmime/security/digest/sha1/sha1MessageDigest.hpp @@ -40,18 +40,18 @@ public: sha1MessageDigest(); - void update(const byte b); + void update(const byte_t b); void update(const string& s); - void update(const byte* buffer, const unsigned long len); - void update(const byte* buffer, const unsigned long offset, const unsigned long len); + void update(const byte_t* buffer, const unsigned long len); + void update(const byte_t* buffer, const unsigned long offset, const unsigned long len); void finalize(); void finalize(const string& s); - void finalize(const byte* buffer, const unsigned long len); - void finalize(const byte* buffer, const unsigned long offset, const unsigned long len); + void finalize(const byte_t* buffer, const unsigned long len); + void finalize(const byte_t* buffer, const unsigned long offset, const unsigned long len); const int getDigestLength() const; - const byte* getDigest() const; + const byte_t* getDigest() const; void reset(); @@ -59,13 +59,13 @@ protected: void init(); - static void transform(unsigned long state[5], const byte buffer[64]); + static void transform(unsigned long state[5], const byte_t buffer[64]); unsigned long m_state[5]; unsigned long m_count[2]; - byte m_buffer[64]; + byte_t m_buffer[64]; - byte m_digest[20]; + byte_t m_digest[20]; }; diff --git a/vmime/security/sasl/SASLContext.hpp b/vmime/security/sasl/SASLContext.hpp index afc8a377..437ebb6e 100644 --- a/vmime/security/sasl/SASLContext.hpp +++ b/vmime/security/sasl/SASLContext.hpp @@ -87,7 +87,7 @@ public: * @param output output buffer * @param outputLen length of output buffer */ - void decodeB64(const string& input, byte** output, int* outputLen); + void decodeB64(const string& input, byte_t** output, int* outputLen); /** Helper function for encoding challenge in Base64. * @@ -95,7 +95,7 @@ public: * @param inputLen length of input buffer * @return Base64-encoded challenge */ - const string encodeB64(const byte* input, const int inputLen); + const string encodeB64(const byte_t* input, const int inputLen); private: diff --git a/vmime/security/sasl/SASLMechanism.hpp b/vmime/security/sasl/SASLMechanism.hpp index 4fd8ca00..f4f8aa91 100644 --- a/vmime/security/sasl/SASLMechanism.hpp +++ b/vmime/security/sasl/SASLMechanism.hpp @@ -66,8 +66,8 @@ public: */ virtual const bool step (ref sess, - const byte* challenge, const int challengeLen, - byte** response, int* responseLen) = 0; + const byte_t* challenge, const int challengeLen, + byte_t** response, int* responseLen) = 0; /** Check whether authentication has completed. If false, more * calls to evaluateChallenge() are needed to complete the @@ -92,8 +92,8 @@ public: * 'outputLen' are undetermined) */ virtual void encode(ref sess, - const byte* input, const int inputLen, - byte** output, int* outputLen) = 0; + const byte_t* input, const int inputLen, + byte_t** output, int* outputLen) = 0; /** Decode data according to negotiated SASL mechanism. This * might mean that data is integrity or privacy protected. @@ -109,8 +109,8 @@ public: * 'outputLen' are undetermined) */ virtual void decode(ref sess, - const byte* input, const int inputLen, - byte** output, int* outputLen) = 0; + const byte_t* input, const int inputLen, + byte_t** output, int* outputLen) = 0; }; diff --git a/vmime/security/sasl/SASLSession.hpp b/vmime/security/sasl/SASLSession.hpp index ec722b99..37080584 100644 --- a/vmime/security/sasl/SASLSession.hpp +++ b/vmime/security/sasl/SASLSession.hpp @@ -102,8 +102,8 @@ public: * 'responseLen' are undetermined) */ const bool evaluateChallenge - (const byte* challenge, const int challengeLen, - byte** response, int* responseLen); + (const byte_t* challenge, const int challengeLen, + byte_t** response, int* responseLen); /** Return a socket in which transmitted data is integrity * and/or privacy protected, depending on the QOP (Quality of diff --git a/vmime/security/sasl/SASLSocket.hpp b/vmime/security/sasl/SASLSocket.hpp index 1ab95afc..fb2e93fe 100644 --- a/vmime/security/sasl/SASLSocket.hpp +++ b/vmime/security/sasl/SASLSocket.hpp @@ -63,7 +63,7 @@ private: ref m_session; ref m_wrapped; - byte* m_pendingBuffer; + byte_t* m_pendingBuffer; int m_pendingPos; int m_pendingLen; diff --git a/vmime/security/sasl/builtinSASLMechanism.hpp b/vmime/security/sasl/builtinSASLMechanism.hpp index 93e6d9cd..11b27353 100644 --- a/vmime/security/sasl/builtinSASLMechanism.hpp +++ b/vmime/security/sasl/builtinSASLMechanism.hpp @@ -51,18 +51,18 @@ public: const bool step (ref sess, - const byte* challenge, const int challengeLen, - byte** response, int* responseLen); + const byte_t* challenge, const int challengeLen, + byte_t** response, int* responseLen); const bool isComplete() const; void encode(ref sess, - const byte* input, const int inputLen, - byte** output, int* outputLen); + const byte_t* input, const int inputLen, + byte_t** output, int* outputLen); void decode(ref sess, - const byte* input, const int inputLen, - byte** output, int* outputLen); + const byte_t* input, const int inputLen, + byte_t** output, int* outputLen); private: diff --git a/vmime/types.hpp b/vmime/types.hpp index 5cace618..06a1d8da 100644 --- a/vmime/types.hpp +++ b/vmime/types.hpp @@ -44,8 +44,8 @@ namespace vmime typedef int char_t; - typedef vmime_uint8 byte; - typedef std::vector byteArray; + typedef vmime_uint8 byte_t; + typedef std::vector byteArray; // Some aliases namespace utils = utility; diff --git a/vmime/utility/stream.hpp b/vmime/utility/stream.hpp index 5a057953..edde8444 100644 --- a/vmime/utility/stream.hpp +++ b/vmime/utility/stream.hpp @@ -362,7 +362,7 @@ class inputStreamByteBufferAdapter : public inputStream { public: - inputStreamByteBufferAdapter(const byte* buffer, size_type length); + inputStreamByteBufferAdapter(const byte_t* buffer, size_type length); const bool eof() const; void reset(); @@ -371,7 +371,7 @@ public: private: - const byte* m_buffer; + const byte_t* m_buffer; const size_type m_length; size_type m_pos;