mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Merged most of David Shaw's changes in 1.3 since 2003-06-03.
This commit is contained in:
parent
47959a306e
commit
4c66e94ff9
45 changed files with 1489 additions and 509 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue