// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CRYPTO_OPENSSL_BIO_STRING_H_
#define CRYPTO_OPENSSL_BIO_STRING_H_

#include <string>

#include "crypto/crypto_export.h"

// From <openssl/bio.h>
typedef struct bio_st BIO;

namespace crypto {

// Creates a new BIO that can be used with OpenSSL's various output functions,
// and which will write all output directly into |out|. This is primarily
// intended as a utility to reduce the amount of copying and separate
// allocations when performing extensive string modifications or streaming
// within OpenSSL.
//
// Note: |out| must remain valid for the duration of the BIO.
BIO* CRYPTO_EXPORT BIO_new_string(std::string* out);

}  // namespace crypto

#endif  // CRYPTO_OPENSSL_BIO_STRING_H_


// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CRYPTO_OPENSSL_BIO_STRING_H_
#define CRYPTO_OPENSSL_BIO_STRING_H_

#include <string>

#include "crypto/crypto_export.h"

// From <openssl/bio.h>
typedef struct bio_st BIO;

namespace crypto {

// Creates a new BIO that can be used with OpenSSL's various output functions,
// and which will write all output directly into |out|. This is primarily
// intended as a utility to reduce the amount of copying and separate
// allocations when performing extensive string modifications or streaming
// within OpenSSL.
//
// Note: |out| must remain valid for the duration of the BIO.
CRYPTO_EXPORT BIO* BIO_new_string(std::string* out);

}  // namespace crypto

#endif  // CRYPTO_OPENSSL_BIO_STRING_H_


Fix component build with gcc 4.6 on Android.
Fix component build with gcc 4.6 on Android.

CRYPTO_EXPORT macro has to be before the non-void return type.

BUG=None
TBR=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/296223002

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@272363 0039d316-1c4b-4281-b951-d872f2087c98
