mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-23 20:15:19 -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
3df3612c4c
commit
b3333f07fa
@ -1,13 +1,6 @@
|
||||
#ifndef 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 <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -16,6 +9,13 @@ extern "C" {
|
||||
|
||||
#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 {
|
||||
unsigned char opaque[256];
|
||||
} crypto_onetimeauth_poly1305_state;
|
||||
|
Loading…
Reference in New Issue
Block a user