[svn] assuan - r392 - in trunk: contrib/conf-w32ce-msc src
svn author marcus
cvs at cvs.gnupg.org
Mon Nov 1 17:23:35 CET 2010
Author: marcus
Date: 2010-11-01 17:23:33 +0100 (Mon, 01 Nov 2010)
New Revision: 392
Modified:
trunk/contrib/conf-w32ce-msc/build.mk
trunk/src/ChangeLog
trunk/src/assuan-buffer.c
trunk/src/assuan-inquire.c
trunk/src/assuan-pipe-connect.c
trunk/src/assuan-pipe-server.c
trunk/src/assuan-socket.c
trunk/src/assuan-uds.c
trunk/src/system-w32ce.c
trunk/src/system.c
trunk/src/sysutils.c
trunk/src/w32-includes.inc.h
Log:
2010-11-01 Marcus Brinkmann <marcus.brinkmann at ruhr-uni-bochum.de>
* configure.ac: Check for fcntl.h.
2010-11-01 Marcus Brinkmann <marcus.brinkmann at ruhr-uni-bochum.de>
* assuan-socket.c, assuan-uds.c, system.c, assuan-pipe-server.c,
assuan-pipe-connect.c [!HAVE_FCNTL_H]: Don't include fcntl.h.
* assuan-buffer.c [!HAVE_W32CE_SYSTEM]: Do not include process.h.
* assuan-socket.c [!HAVE_W32CE_SYSTEM]: Do not include io.h.
* w32-includes.inc.h: Include winsock2.h before ws2tcpip.h.
* sysutils.c (w32_read_registry): Replace goto label "leave" by
"out" (as leave is defined by some Windows header file).
* assuan-inquire.c: Likewise.
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2010-11-01 16:23:05 UTC (rev 391)
+++ trunk/src/ChangeLog 2010-11-01 16:23:33 UTC (rev 392)
@@ -1,3 +1,14 @@
+2010-11-01 Marcus Brinkmann <marcus.brinkmann at ruhr-uni-bochum.de>
+
+ * assuan-socket.c, assuan-uds.c, system.c, assuan-pipe-server.c,
+ assuan-pipe-connect.c [!HAVE_FCNTL_H]: Don't include fcntl.h.
+ * assuan-buffer.c [!HAVE_W32CE_SYSTEM]: Do not include process.h.
+ * assuan-socket.c [!HAVE_W32CE_SYSTEM]: Do not include io.h.
+ * w32-includes.inc.h: Include winsock2.h before ws2tcpip.h.
+ * sysutils.c (w32_read_registry): Replace goto label "leave" by
+ "out" (as leave is defined by some Windows header file).
+ * assuan-inquire.c: Likewise.
+
2010-11-01 Werner Koch <wk at g10code.com>
* assuan-socket.c (S_IRUSR) [W32]: Define if not defined.
Modified: trunk/contrib/conf-w32ce-msc/build.mk
===================================================================
--- trunk/contrib/conf-w32ce-msc/build.mk 2010-11-01 16:23:05 UTC (rev 391)
+++ trunk/contrib/conf-w32ce-msc/build.mk 2010-11-01 16:23:33 UTC (rev 392)
@@ -43,7 +43,7 @@
# -Fe Set executable output name (may be only a directory)
CFLAGS = -nologo -W3 -fp:fast -Os $(ce_defines) \
-DHAVE_CONFIG_H -DDLL_EXPORT -D_CRT_SECURE_NO_WARNINGS \
- -I. -Igpg-extra -I../libgpg-error
+ -I. -I../../libgpg-error/src -I../../libgpg-error/src/gpg-extra
LDFLAGS =
Modified: trunk/src/assuan-buffer.c
===================================================================
--- trunk/src/assuan-buffer.c 2010-11-01 16:23:05 UTC (rev 391)
+++ trunk/src/assuan-buffer.c 2010-11-01 16:23:33 UTC (rev 392)
@@ -27,8 +27,10 @@
#endif
#include <assert.h>
#ifdef HAVE_W32_SYSTEM
+#ifndef HAVE_W32CE_SYSTEM
# include <process.h>
#endif
+#endif
#include "assuan-defs.h"
Modified: trunk/src/assuan-inquire.c
===================================================================
--- trunk/src/assuan-inquire.c 2010-11-01 16:23:05 UTC (rev 391)
+++ trunk/src/assuan-inquire.c 2010-11-01 16:23:33 UTC (rev 392)
@@ -168,7 +168,7 @@
strcpy (stpcpy (cmdbuf, "INQUIRE "), keyword);
rc = assuan_write_line (ctx, cmdbuf);
if (rc)
- goto leave;
+ goto out;
for (;;)
{
@@ -178,7 +178,7 @@
rc = _assuan_read_line (ctx);
while (_assuan_error_is_eagain (ctx, rc));
if (rc)
- goto leave;
+ goto out;
line = (unsigned char *) ctx->inbound.line;
linelen = ctx->inbound.linelen;
}
@@ -196,13 +196,13 @@
&& (line[2] == 'N' || line[2] == 'n'))
{
rc = _assuan_error (ctx, GPG_ERR_ASS_CANCELED);
- goto leave;
+ goto out;
}
if ((line[0] != 'D' && line[0] != 'd')
|| line[1] != ' ' || nodataexpected)
{
rc = _assuan_error (ctx, GPG_ERR_ASS_UNEXPECTED_CMD);
- goto leave;
+ goto out;
}
if (linelen < 3)
continue;
@@ -229,7 +229,7 @@
if (mb.too_large)
{
rc = _assuan_error (ctx, GPG_ERR_ASS_TOO_MUCH_DATA);
- goto leave;
+ goto out;
}
}
@@ -240,7 +240,7 @@
rc = _assuan_error (ctx, gpg_err_code_from_syserror ());
}
- leave:
+ out:
if (!nodataexpected)
free_membuf (ctx, &mb);
ctx->in_inquire = 0;
@@ -281,7 +281,7 @@
&& (line[2] == 'N' || line[2] == 'n'))
{
rc = _assuan_error (ctx, GPG_ERR_ASS_CANCELED);
- goto leave;
+ goto out;
}
if ((line[0] == 'E'||line[0] == 'e')
&& (line[1] == 'N' || line[1] == 'n')
@@ -289,13 +289,13 @@
&& (!line[3] || line[3] == ' '))
{
rc = 0;
- goto leave;
+ goto out;
}
if ((line[0] != 'D' && line[0] != 'd') || line[1] != ' ' || mb == NULL)
{
rc = _assuan_error (ctx, GPG_ERR_ASS_UNEXPECTED_CMD);
- goto leave;
+ goto out;
}
if (linelen < 3)
@@ -323,12 +323,12 @@
if (mb->too_large)
{
rc = _assuan_error (ctx, GPG_ERR_ASS_TOO_MUCH_DATA);
- goto leave;
+ goto out;
}
return 0;
- leave:
+ out:
{
size_t buf_len = 0;
unsigned char *buf = NULL;
Modified: trunk/src/assuan-pipe-connect.c
===================================================================
--- trunk/src/assuan-pipe-connect.c 2010-11-01 16:23:05 UTC (rev 391)
+++ trunk/src/assuan-pipe-connect.c 2010-11-01 16:23:33 UTC (rev 392)
@@ -33,7 +33,9 @@
# include <unistd.h>
#endif
#include <errno.h>
+#ifdef HAVE_FCNTL_H
#include <fcntl.h>
+#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
Modified: trunk/src/assuan-pipe-server.c
===================================================================
--- trunk/src/assuan-pipe-server.c 2010-11-01 16:23:05 UTC (rev 391)
+++ trunk/src/assuan-pipe-server.c 2010-11-01 16:23:33 UTC (rev 392)
@@ -37,8 +37,10 @@
# include <winsock2.h>
# endif
# include <windows.h>
+#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif
+#endif
#include "assuan-defs.h"
#include "debug.h"
Modified: trunk/src/assuan-socket.c
===================================================================
--- trunk/src/assuan-socket.c 2010-11-01 16:23:05 UTC (rev 391)
+++ trunk/src/assuan-socket.c 2010-11-01 16:23:33 UTC (rev 392)
@@ -27,7 +27,9 @@
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# include <wincrypt.h>
+#ifndef HAVE_W32CE_SYSTEM
# include <io.h>
+#endif
#else
# include <sys/types.h>
# include <sys/socket.h>
@@ -36,7 +38,9 @@
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
+#ifdef HAVE_FCNTL_H
#include <fcntl.h>
+#endif
#include <assert.h>
#include "assuan-defs.h"
Modified: trunk/src/assuan-uds.c
===================================================================
--- trunk/src/assuan-uds.c 2010-11-01 16:23:05 UTC (rev 391)
+++ trunk/src/assuan-uds.c 2010-11-01 16:23:33 UTC (rev 392)
@@ -43,7 +43,9 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
+#ifdef HAVE_FCNTL_H
#include <fcntl.h>
+#endif
#include <string.h>
#include <assert.h>
Modified: trunk/src/system-w32ce.c
===================================================================
--- trunk/src/system-w32ce.c 2010-11-01 16:23:05 UTC (rev 391)
+++ trunk/src/system-w32ce.c 2010-11-01 16:23:33 UTC (rev 392)
@@ -25,7 +25,6 @@
#include <stdlib.h>
#include <errno.h>
#include <time.h>
-#include <fcntl.h>
# ifdef HAVE_WINSOCK2_H
# include <winsock2.h>
# endif
Modified: trunk/src/system.c
===================================================================
--- trunk/src/system.c 2010-11-01 16:23:05 UTC (rev 391)
+++ trunk/src/system.c 2010-11-01 16:23:33 UTC (rev 392)
@@ -29,7 +29,9 @@
# include <sys/types.h>
#endif
#include <time.h>
+#ifdef HAVE_FCNTL_H
#include <fcntl.h>
+#endif
#include "assuan-defs.h"
#include "debug.h"
Modified: trunk/src/sysutils.c
===================================================================
--- trunk/src/sysutils.c 2010-11-01 16:23:05 UTC (rev 391)
+++ trunk/src/sysutils.c 2010-11-01 16:23:33 UTC (rev 392)
@@ -70,33 +70,33 @@
nbytes = 1;
if (RegQueryValueEx (handle, name, 0, NULL, NULL, &nbytes))
- goto leave;
+ goto out;
buffer = malloc ((n=nbytes+2));
if (!buffer)
- goto leave;
+ goto out;
if (RegQueryValueEx (handle, name, 0, NULL, (PBYTE)buffer, &n))
{
free (buffer);
buffer = NULL;
- goto leave;
+ goto out;
}
n = WideCharToMultiByte (CP_UTF8, 0, buffer, nbytes, NULL, 0, NULL, NULL);
if (n < 0 || (n+1) <= 0)
- goto leave;
+ goto out;
result = malloc (n+1);
if (!result)
- goto leave;
+ goto out;
n = WideCharToMultiByte (CP_UTF8, 0, buffer, nbytes, result, n, NULL, NULL);
if (n < 0)
{
free (result);
result = NULL;
- goto leave;
+ goto out;
}
result[n] = 0;
- leave:
+ out:
free (buffer);
RegCloseKey (handle);
return result;
Modified: trunk/src/w32-includes.inc.h
===================================================================
--- trunk/src/w32-includes.inc.h 2010-11-01 16:23:05 UTC (rev 391)
+++ trunk/src/w32-includes.inc.h 2010-11-01 16:23:33 UTC (rev 392)
@@ -19,5 +19,6 @@
##
## This file is included by the mkheader tool. Lines starting with
## a double hash mark are not copied to the destination file.
+#include <winsock2.h>
#include <ws2tcpip.h>
##EOF##
More information about the Gnupg-commits
mailing list