mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-19 01:55:02 -07:00
Move includes in crypto_onetimeauth_poly1305.h outside of extern C (#1345)
Includes being outside of `extern "C"` are de-facto standard in all other include files of libsodium. At the same time, having inside the `extern "C"` is causing problem with C++ vs. C toolchain being confused about which libraries should be linked. This was especially painful while working on `swift-sodium` integration with windows.
This commit is contained in:
parent
f62efca336
commit
b564794edd
@ -1,13 +1,6 @@
|
|||||||
#ifndef crypto_onetimeauth_poly1305_H
|
#ifndef crypto_onetimeauth_poly1305_H
|
||||||
#define crypto_onetimeauth_poly1305_H
|
#define crypto_onetimeauth_poly1305_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
# ifdef __GNUC__
|
|
||||||
# pragma GCC diagnostic ignored "-Wlong-long"
|
|
||||||
# endif
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -16,6 +9,13 @@ extern "C" {
|
|||||||
|
|
||||||
#include "export.h"
|
#include "export.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
# ifdef __GNUC__
|
||||||
|
# pragma GCC diagnostic ignored "-Wlong-long"
|
||||||
|
# endif
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct CRYPTO_ALIGN(16) crypto_onetimeauth_poly1305_state {
|
typedef struct CRYPTO_ALIGN(16) crypto_onetimeauth_poly1305_state {
|
||||||
unsigned char opaque[256];
|
unsigned char opaque[256];
|
||||||
} crypto_onetimeauth_poly1305_state;
|
} crypto_onetimeauth_poly1305_state;
|
||||||
|
Loading…
Reference in New Issue
Block a user