2 * Copyright (C) 2010-2012 Free Software Foundation, Inc.
4 * Author: Nikos Mavrogiannopoulos
6 * This file is part of GnuTLS.
8 * The GnuTLS is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 3 of
11 * the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>
26 #include <gnutls_int.h>
29 # include <sys/uio.h> /* for writev */
31 # include <windows.h> /* for Sleep */
34 int system_errno (gnutls_transport_ptr_t
);
35 int system_recv_timeout(gnutls_transport_ptr_t ptr
, unsigned int ms
);
38 ssize_t
system_write (gnutls_transport_ptr_t ptr
, const void *data
,
42 ssize_t
system_writev (gnutls_transport_ptr_t ptr
, const giovec_t
* iovec
,
45 ssize_t
system_read (gnutls_transport_ptr_t ptr
, void *data
, size_t data_size
);
48 #define HAVE_WIN32_LOCKS
50 #ifdef HAVE_LIBPTHREAD
51 #define HAVE_PTHREAD_LOCKS
57 extern gnutls_time_func gnutls_time
;
59 static inline void millisleep(unsigned int ms
)
66 ts
.tv_nsec
= ms
*1000*1000;
72 int _gnutls_find_config_path(char* path
, size_t max_size
);
74 int gnutls_system_global_init (void);
75 void gnutls_system_global_deinit (void);