struct timeval include guards
Move struct timeval includes into e_os.h (where the Windows ones were). Enaure that the include is guarded canonically. Refer #4271 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4312)
This commit is contained in:
parent
75551e07bd
commit
4cff10dcbf
7 changed files with 14 additions and 35 deletions
|
@ -10,11 +10,8 @@
|
||||||
#ifndef HEADER_APPS_H
|
#ifndef HEADER_APPS_H
|
||||||
# define HEADER_APPS_H
|
# define HEADER_APPS_H
|
||||||
|
|
||||||
# include "e_os.h"
|
# include "e_os.h" /* struct timeval for DTLS */
|
||||||
# include "internal/nelem.h"
|
# include "internal/nelem.h"
|
||||||
# if defined(__unix) || defined(__unix__)
|
|
||||||
# include <sys/time.h> /* struct timeval for DTLS */
|
|
||||||
# endif
|
|
||||||
# include <assert.h>
|
# include <assert.h>
|
||||||
|
|
||||||
# include <openssl/e_os2.h>
|
# include <openssl/e_os2.h>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2005-2016 The OpenSSL Project Authors. All Rights Reserved.
|
* Copyright 2005-2017 The OpenSSL Project Authors. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||||
* this file except in compliance with the License. You can obtain a copy
|
* this file except in compliance with the License. You can obtain a copy
|
||||||
|
@ -13,10 +13,6 @@
|
||||||
#include "bio_lcl.h"
|
#include "bio_lcl.h"
|
||||||
#ifndef OPENSSL_NO_DGRAM
|
#ifndef OPENSSL_NO_DGRAM
|
||||||
|
|
||||||
# if !defined(_WIN32)
|
|
||||||
# include <sys/time.h>
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# ifndef OPENSSL_NO_SCTP
|
# ifndef OPENSSL_NO_SCTP
|
||||||
# include <netinet/sctp.h>
|
# include <netinet/sctp.h>
|
||||||
# include <fcntl.h>
|
# include <fcntl.h>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.
|
* Copyright 2006-2017 The OpenSSL Project Authors. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||||
* this file except in compliance with the License. You can obtain a copy
|
* this file except in compliance with the License. You can obtain a copy
|
||||||
|
@ -7,12 +7,9 @@
|
||||||
* https://www.openssl.org/source/license.html
|
* https://www.openssl.org/source/license.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "e_os.h"
|
||||||
#include "internal/cryptlib.h"
|
#include "internal/cryptlib.h"
|
||||||
|
|
||||||
#if defined(OPENSSL_SYS_UNIX)
|
|
||||||
# include <sys/time.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <openssl/objects.h>
|
#include <openssl/objects.h>
|
||||||
#include <openssl/ts.h>
|
#include <openssl/ts.h>
|
||||||
#include <openssl/pkcs7.h>
|
#include <openssl/pkcs7.h>
|
||||||
|
|
6
e_os.h
6
e_os.h
|
@ -234,6 +234,12 @@ extern FILE *_imp___iob;
|
||||||
|
|
||||||
# else /* The non-microsoft world */
|
# else /* The non-microsoft world */
|
||||||
|
|
||||||
|
# if defined(OPENSSL_SYS_VXWORKS)
|
||||||
|
# include <sys/times.h>
|
||||||
|
# else
|
||||||
|
# include <sys/time.h>
|
||||||
|
# endif
|
||||||
|
|
||||||
# ifdef OPENSSL_SYS_VMS
|
# ifdef OPENSSL_SYS_VMS
|
||||||
# define VMS 1
|
# define VMS 1
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -13,12 +13,6 @@
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include "ssl_locl.h"
|
#include "ssl_locl.h"
|
||||||
|
|
||||||
#if defined(OPENSSL_SYS_VXWORKS)
|
|
||||||
# include <sys/times.h>
|
|
||||||
#elif !defined(OPENSSL_SYS_WIN32)
|
|
||||||
# include <sys/time.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void get_current_time(struct timeval *t);
|
static void get_current_time(struct timeval *t);
|
||||||
static int dtls1_handshake_write(SSL *s);
|
static int dtls1_handshake_write(SSL *s);
|
||||||
static size_t dtls1_link_min_mtu(void);
|
static size_t dtls1_link_min_mtu(void);
|
||||||
|
|
|
@ -11,16 +11,13 @@
|
||||||
|
|
||||||
#ifndef HEADER_SSL_LOCL_H
|
#ifndef HEADER_SSL_LOCL_H
|
||||||
# define HEADER_SSL_LOCL_H
|
# define HEADER_SSL_LOCL_H
|
||||||
# include "e_os.h" /* struct timeval for Windows */
|
|
||||||
|
# include "e_os.h" /* struct timeval for DTLS */
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include <time.h>
|
# include <time.h>
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
# include <errno.h>
|
# include <errno.h>
|
||||||
|
|
||||||
# if defined(__unix) || defined(__unix__)
|
|
||||||
# include <sys/time.h> /* struct timeval for DTLS */
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# include <openssl/buffer.h>
|
# include <openssl/buffer.h>
|
||||||
# include <openssl/comp.h>
|
# include <openssl/comp.h>
|
||||||
# include <openssl/bio.h>
|
# include <openssl/bio.h>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
|
* Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||||
* this file except in compliance with the License. You can obtain a copy
|
* this file except in compliance with the License. You can obtain a copy
|
||||||
|
@ -10,18 +10,10 @@
|
||||||
#ifndef HEADER_PACKETED_BIO
|
#ifndef HEADER_PACKETED_BIO
|
||||||
#define HEADER_PACKETED_BIO
|
#define HEADER_PACKETED_BIO
|
||||||
|
|
||||||
|
#include "e_os.h"
|
||||||
#include <openssl/base.h>
|
#include <openssl/base.h>
|
||||||
#include <openssl/bio.h>
|
#include <openssl/bio.h>
|
||||||
|
|
||||||
#if defined(OPENSSL_SYS_WINDOWS)
|
|
||||||
OPENSSL_MSVC_PRAGMA(warning(push, 3))
|
|
||||||
#include <winsock2.h>
|
|
||||||
OPENSSL_MSVC_PRAGMA(warning(pop))
|
|
||||||
#else
|
|
||||||
#include <sys/time.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// PacketedBioCreate creates a filter BIO which implements a reliable in-order
|
// PacketedBioCreate creates a filter BIO which implements a reliable in-order
|
||||||
// blocking datagram socket. It internally maintains a clock and honors
|
// blocking datagram socket. It internally maintains a clock and honors
|
||||||
// |BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT| based on it.
|
// |BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT| based on it.
|
||||||
|
|
Loading…
Reference in a new issue