X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsrc%2Ftls.c;h=be9377665f0f46d118528b1fdb19e69f1b3ed4de;hb=2f680c0c44;hp=6b1a189a98dfaa5b87caccdabb3e2dceff9dedc5;hpb=3386088d5af4d4c61faa12ae29560e2c5bd43304;p=exim.git diff --git a/src/src/tls.c b/src/src/tls.c index 6b1a189a9..be9377665 100644 --- a/src/src/tls.c +++ b/src/src/tls.c @@ -2,7 +2,7 @@ * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2015 */ +/* Copyright (c) University of Cambridge 1995 - 2016 */ /* See the file NOTICE for conditions of use and distribution. */ /* This module provides TLS (aka SSL) support for Exim. The code for OpenSSL is @@ -87,19 +87,20 @@ return TRUE; static uschar * to_tz(uschar * tz) { - uschar * old = US getenv("TZ"); - setenv("TZ", CS tz, 1); - tzset(); - return old; +uschar * old = US getenv("TZ"); +(void) setenv("TZ", CCS tz, 1); +tzset(); +return old; } + static void restore_tz(uschar * tz) { - if (tz) - setenv("TZ", CS tz, 1); - else - unsetenv("TZ"); - tzset(); +if (tz) + (void) setenv("TZ", CCS tz, 1); +else + (void) os_unsetenv("TZ"); +tzset(); } /************************************************* @@ -107,18 +108,18 @@ restore_tz(uschar * tz) *************************************************/ #ifdef USE_GNUTLS -#include "tls-gnu.c" -#include "tlscert-gnu.c" +# include "tls-gnu.c" +# include "tlscert-gnu.c" -#define ssl_xfer_buffer (state_server.xfer_buffer) -#define ssl_xfer_buffer_lwm (state_server.xfer_buffer_lwm) -#define ssl_xfer_buffer_hwm (state_server.xfer_buffer_hwm) -#define ssl_xfer_eof (state_server.xfer_eof) -#define ssl_xfer_error (state_server.xfer_error) +# define ssl_xfer_buffer (state_server.xfer_buffer) +# define ssl_xfer_buffer_lwm (state_server.xfer_buffer_lwm) +# define ssl_xfer_buffer_hwm (state_server.xfer_buffer_hwm) +# define ssl_xfer_eof (state_server.xfer_eof) +# define ssl_xfer_error (state_server.xfer_error) #else -#include "tls-openssl.c" -#include "tlscert-openssl.c" +# include "tls-openssl.c" +# include "tlscert-openssl.c" #endif