summaryrefslogtreecommitdiffstats
path: root/common/iobuf.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2003-09-23 19:48:33 +0200
committerWerner Koch <wk@gnupg.org>2003-09-23 19:48:33 +0200
commit4c66e94ff91d680eaf1d9c48a62d66d1951f90ef (patch)
tree66ede04edbfe1c45eece46e852093282832f8312 /common/iobuf.c
parent2003-09-22 Timo Schulz <twoaday@freakmail.de> (diff)
downloadgnupg2-4c66e94ff91d680eaf1d9c48a62d66d1951f90ef.tar.xz
gnupg2-4c66e94ff91d680eaf1d9c48a62d66d1951f90ef.zip
Merged most of David Shaw's changes in 1.3 since 2003-06-03.
Diffstat (limited to 'common/iobuf.c')
-rw-r--r--common/iobuf.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/common/iobuf.c b/common/iobuf.c
index 773e2993b..4d735397e 100644
--- a/common/iobuf.c
+++ b/common/iobuf.c
@@ -101,7 +101,7 @@ typedef struct close_cache_s *CLOSE_CACHE;
static CLOSE_CACHE close_cache;
#endif
-#ifdef __MINGW32__
+#ifdef _WIN32
typedef struct
{
int sock;
@@ -112,7 +112,7 @@ typedef struct
char fname[1]; /* name of the file */
}
sock_filter_ctx_t;
-#endif /*__MINGW32__*/
+#endif /*_WIN32*/
/* The first partial length header block must be of size 512
* to make it easier (and efficienter) we use a min. block size of 512
@@ -580,7 +580,7 @@ file_filter (void *opaque, int control, iobuf_t chain, byte * buf,
return rc;
}
-#ifdef __MINGW32__
+#ifdef _WIN32
/* Becuase sockets are an special object under Lose32 we have to
* use a special filter */
static int
@@ -667,7 +667,7 @@ sock_filter (void *opaque, int control, iobuf_t chain, byte * buf,
}
return rc;
}
-#endif /*__MINGW32__*/
+#endif /*_WIN32*/
/****************
* This is used to implement the block write mode.
@@ -1171,7 +1171,7 @@ check_special_filename (const char *fname)
int i;
fname += 2;
- for (i = 0; isdigit (fname[i]); i++)
+ for (i = 0; digitp (fname+i); i++)
;
if (!fname[i])
return atoi (fname);
@@ -1262,7 +1262,7 @@ iobuf_t
iobuf_sockopen (int fd, const char *mode)
{
iobuf_t a;
-#ifdef __MINGW32__
+#ifdef _WIN32
sock_filter_ctx_t *scx;
size_t len;
@@ -1405,7 +1405,7 @@ iobuf_ioctl (iobuf_t a, int cmd, int intval, void *ptrval)
b->keep_open = intval;
return 0;
}
-#ifdef __MINGW32__
+#ifdef _WIN32
else if (!a->chain && a->filter == sock_filter)
{
sock_filter_ctx_t *b = a->filter_ov;
@@ -1440,7 +1440,7 @@ iobuf_ioctl (iobuf_t a, int cmd, int intval, void *ptrval)
b->no_cache = intval;
return 0;
}
-#ifdef __MINGW32__
+#ifdef _WIN32
else if (!a->chain && a->filter == sock_filter)
{
sock_filter_ctx_t *b = a->filter_ov;
@@ -2363,7 +2363,7 @@ iobuf_read_line (iobuf_t a, byte ** addr_of_buffer,
int
iobuf_translate_file_handle (int fd, int for_write)
{
-#ifdef __MINGW32__
+#ifdef _WIN32
{
int x;
@@ -2387,7 +2387,7 @@ iobuf_translate_file_handle (int fd, int for_write)
static int
translate_file_handle (int fd, int for_write)
{
-#ifdef __MINGW32__
+#ifdef _WIN32
#ifdef FILE_FILTER_USES_STDIO
fd = iobuf_translate_file_handle (fd, for_write);
#else