summaryrefslogtreecommitdiff
path: root/lib/system.h
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-07-10 23:25:31 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-07-10 23:25:57 +0200
commit7692b5734a8e508d99c7a6c77f3c0fb482166353 (patch)
tree129ca1ca19fea316b5648d8181f80c24f4a91da5 /lib/system.h
parentd0a081ec1b276a80a4b1ca1dc5109fd27ad0abc2 (diff)
downloadgnutls-7692b5734a8e508d99c7a6c77f3c0fb482166353.tar.gz
system specific functions were moved to system.c
Diffstat (limited to 'lib/system.h')
-rw-r--r--lib/system.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/system.h b/lib/system.h
new file mode 100644
index 0000000000..54ebe90b5a
--- /dev/null
+++ b/lib/system.h
@@ -0,0 +1,32 @@
+#ifndef SYSTEM_H
+# define SYSTEM_H
+
+#include <gnutls_int.h>
+
+#ifndef _WIN32
+# include <sys/uio.h> /* for writev */
+#endif
+
+int system_errno(gnutls_transport_ptr);
+
+#ifdef _WIN32
+ssize_t system_write(gnutls_transport_ptr ptr, const void* data, size_t data_size);
+#else
+# define HAVE_WRITEV
+ssize_t system_writev(gnutls_transport_ptr ptr, const giovec_t * iovec, int iovec_cnt);
+#endif
+ssize_t system_read(gnutls_transport_ptr ptr, void* data, size_t data_size);
+
+#endif
+
+#ifdef _WIN32
+# define HAVE_WIN32_LOCKS
+#else
+# ifdef HAVE_LIBPTHREAD
+# define HAVE_PTHREAD_LOCKS
+# else
+# define HAVE_NO_LOCKS
+# endif
+#endif
+
+int _gnutls_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void));