aboutsummaryrefslogtreecommitdiffstats
path: root/jnlib
diff options
context:
space:
mode:
Diffstat (limited to 'jnlib')
-rw-r--r--jnlib/ChangeLog4
-rw-r--r--jnlib/Makefile.am4
-rw-r--r--jnlib/w32-pth.c42
-rw-r--r--jnlib/w32-pth.h6
4 files changed, 52 insertions, 4 deletions
diff --git a/jnlib/ChangeLog b/jnlib/ChangeLog
index 5ca33d5fb..cc3ec9f4f 100644
--- a/jnlib/ChangeLog
+++ b/jnlib/ChangeLog
@@ -1,3 +1,7 @@
+2004-12-07 Werner Koch <[email protected]>
+
+ * w32-pth.c, w32-pth.h: New.
+
2004-11-26 Werner Koch <[email protected]>
* logging.c [_WIN32]: Don't include socket headers.
diff --git a/jnlib/Makefile.am b/jnlib/Makefile.am
index bad3c5a71..69eac4bf7 100644
--- a/jnlib/Makefile.am
+++ b/jnlib/Makefile.am
@@ -37,7 +37,9 @@ libjnlib_a_SOURCES = \
argparse.c argparse.h \
logging.c logging.h \
dotlock.c dotlock.h \
- types.h mischelp.h
+ types.h mischelp.h \
+ w32-pth.c w32-pth.h \
+ w32-afunix.c w32-afunix.h
# xmalloc.c xmalloc.h
diff --git a/jnlib/w32-pth.c b/jnlib/w32-pth.c
new file mode 100644
index 000000000..c23cebf4a
--- /dev/null
+++ b/jnlib/w32-pth.c
@@ -0,0 +1,42 @@
+/* w32-pth.c - GNU Pth emulation for W32 (MS Windows).
+ * Copyright (C) 2004 g10 Code GmbH
+ *
+ * This file is part of GnuPG.
+ *
+ * GnuPG is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GnuPG is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+#include <config.h>
+#ifdef HAVE_W32_SYSTEM
+#include <stdio.h>
+#include <windows.h>
+#include <io.h>
+
+#include "w32-pth.h"
+
+ssize_t
+pth_read (int fd, void *buffer, size_t size)
+{
+ return read (fd, buffer, size);
+}
+
+ssize_t
+pth_write (int fd, const void *buffer, size_t size)
+{
+ return write (fd, buffer, size);
+}
+
+
+#endif /*HAVE_W32_SYSTEM*/
diff --git a/jnlib/w32-pth.h b/jnlib/w32-pth.h
index b9c03323f..6b57d9bd2 100644
--- a/jnlib/w32-pth.h
+++ b/jnlib/w32-pth.h
@@ -18,9 +18,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
-/* Note that this header is usually through a symlinked pth.h file.
- This is needed so that we don't have a pth.h file here which would
- conflict if a system really has pth available. */
+/* Note that this header is usually used through a symlinked pth.h
+ file. This is needed so that we don't have a pth.h file here which
+ would conflict if a system really has pth available. */
#ifndef W32_PTH_H
#define W32_PTH_H