[Pkg-gnupg-commit] [libassuan] 334/437: 2010-11-01 Marcus Brinkmann <marcus.brinkmann at ruhr-uni-bochum.de>
Eric Dorland
eric at moszumanska.debian.org
Fri May 22 05:34:00 UTC 2015
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository libassuan.
commit ce484b9aaff7331a36da08b6d9b42740d232c72d
Author: Marcus Brinkmann <mb at g10code.com>
Date: Mon Nov 1 16:23:33 2010 +0000
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.
---
contrib/conf-w32ce-msc/build.mk | 2 +-
src/ChangeLog | 11 +++++++++++
src/assuan-buffer.c | 2 ++
src/assuan-inquire.c | 22 +++++++++++-----------
src/assuan-pipe-connect.c | 2 ++
src/assuan-pipe-server.c | 2 ++
src/assuan-socket.c | 4 ++++
src/assuan-uds.c | 2 ++
src/system-w32ce.c | 1 -
src/system.c | 2 ++
src/sysutils.c | 14 +++++++-------
src/w32-includes.inc.h | 1 +
12 files changed, 45 insertions(+), 20 deletions(-)
diff --git a/contrib/conf-w32ce-msc/build.mk b/contrib/conf-w32ce-msc/build.mk
index b88ca43..30f870b 100755
--- a/contrib/conf-w32ce-msc/build.mk
+++ b/contrib/conf-w32ce-msc/build.mk
@@ -43,7 +43,7 @@ ce_defines = -DWINCE -D_WIN32_WCE=0x502 -DUNDER_CE \
# -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 =
diff --git a/src/ChangeLog b/src/ChangeLog
index 5a875a4..9e14b66 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -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.
diff --git a/src/assuan-buffer.c b/src/assuan-buffer.c
index 3c2e7be..96d1f99 100644
--- a/src/assuan-buffer.c
+++ b/src/assuan-buffer.c
@@ -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"
diff --git a/src/assuan-inquire.c b/src/assuan-inquire.c
index 265d37c..ebadaf2 100644
--- a/src/assuan-inquire.c
+++ b/src/assuan-inquire.c
@@ -168,7 +168,7 @@ assuan_inquire (assuan_context_t ctx, const char *keyword,
strcpy (stpcpy (cmdbuf, "INQUIRE "), keyword);
rc = assuan_write_line (ctx, cmdbuf);
if (rc)
- goto leave;
+ goto out;
for (;;)
{
@@ -178,7 +178,7 @@ assuan_inquire (assuan_context_t ctx, const char *keyword,
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 @@ assuan_inquire (assuan_context_t ctx, const char *keyword,
&& (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 @@ assuan_inquire (assuan_context_t ctx, const char *keyword,
if (mb.too_large)
{
rc = _assuan_error (ctx, GPG_ERR_ASS_TOO_MUCH_DATA);
- goto leave;
+ goto out;
}
}
@@ -240,7 +240,7 @@ assuan_inquire (assuan_context_t ctx, const char *keyword,
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 @@ _assuan_inquire_ext_cb (assuan_context_t ctx)
&& (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 @@ _assuan_inquire_ext_cb (assuan_context_t ctx)
&& (!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 @@ _assuan_inquire_ext_cb (assuan_context_t ctx)
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;
diff --git a/src/assuan-pipe-connect.c b/src/assuan-pipe-connect.c
index ed23cb2..d8c71e6 100644
--- a/src/assuan-pipe-connect.c
+++ b/src/assuan-pipe-connect.c
@@ -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
diff --git a/src/assuan-pipe-server.c b/src/assuan-pipe-server.c
index 3304498..017dc7b 100644
--- a/src/assuan-pipe-server.c
+++ b/src/assuan-pipe-server.c
@@ -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"
diff --git a/src/assuan-socket.c b/src/assuan-socket.c
index 937ff56..3814554 100644
--- a/src/assuan-socket.c
+++ b/src/assuan-socket.c
@@ -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"
diff --git a/src/assuan-uds.c b/src/assuan-uds.c
index 93fa957..dd77af4 100644
--- a/src/assuan-uds.c
+++ b/src/assuan-uds.c
@@ -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>
diff --git a/src/system-w32ce.c b/src/system-w32ce.c
index 3061f45..6b5c3c9 100644
--- a/src/system-w32ce.c
+++ b/src/system-w32ce.c
@@ -25,7 +25,6 @@
#include <stdlib.h>
#include <errno.h>
#include <time.h>
-#include <fcntl.h>
# ifdef HAVE_WINSOCK2_H
# include <winsock2.h>
# endif
diff --git a/src/system.c b/src/system.c
index 1c7d617..373fc5b 100644
--- a/src/system.c
+++ b/src/system.c
@@ -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"
diff --git a/src/sysutils.c b/src/sysutils.c
index 578e47d..5a1d9de 100644
--- a/src/sysutils.c
+++ b/src/sysutils.c
@@ -70,33 +70,33 @@ w32_read_registry (const wchar_t *dir, const wchar_t *name)
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;
diff --git a/src/w32-includes.inc.h b/src/w32-includes.inc.h
index 7e9216b..1945692 100644
--- a/src/w32-includes.inc.h
+++ b/src/w32-includes.inc.h
@@ -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##
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libassuan.git
More information about the Pkg-gnupg-commit
mailing list