X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=include%2Fopenssl%2Fbuffer.h;h=49581b826a6aaee1eb50ed7d4d40f745caea8928;hp=8868e854724e02cc85dc132e796f8d6aeb3a8cee;hb=3d48457478bd61030c370e4090c1462fc4453d81;hpb=a5d0d6b8fd1645c150e1b276863157bb29f0f598 diff --git a/include/openssl/buffer.h b/include/openssl/buffer.h index 8868e85472..49581b826a 100644 --- a/include/openssl/buffer.h +++ b/include/openssl/buffer.h @@ -1,17 +1,23 @@ /* - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. * - * Licensed under the OpenSSL license (the "License"). You may not use + * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ -#ifndef HEADER_BUFFER_H -# define HEADER_BUFFER_H +#ifndef OPENSSL_BUFFER_H +# define OPENSSL_BUFFER_H +# pragma once -# include -# ifndef HEADER_CRYPTO_H +# include +# if !OPENSSL_API_3 +# define HEADER_BUFFER_H +# endif + +# include +# ifndef OPENSSL_CRYPTO_H # include # endif # include @@ -24,16 +30,14 @@ extern "C" { # include # include -/* - * These names are outdated as of OpenSSL 1.1; a future release - * will move them to be deprecated. - */ -# define BUF_strdup(s) OPENSSL_strdup(s) -# define BUF_strndup(s, size) OPENSSL_strndup(s, size) -# define BUF_memdup(data, size) OPENSSL_memdup(data, size) -# define BUF_strlcpy(dst, src, size) OPENSSL_strlcpy(dst, src, size) -# define BUF_strlcat(dst, src, size) OPENSSL_strlcat(dst, src, size) -# define BUF_strnlen(str, maxlen) OPENSSL_strnlen(str, maxlen) +# if !OPENSSL_API_3 +# define BUF_strdup(s) OPENSSL_strdup(s) +# define BUF_strndup(s, size) OPENSSL_strndup(s, size) +# define BUF_memdup(data, size) OPENSSL_memdup(data, size) +# define BUF_strlcpy(dst, src, size) OPENSSL_strlcpy(dst, src, size) +# define BUF_strlcat(dst, src, size) OPENSSL_strlcat(dst, src, size) +# define BUF_strnlen(str, maxlen) OPENSSL_strnlen(str, maxlen) +# endif struct buf_mem_st { size_t length; /* current number of bytes */