2007-09-07 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Work around for missing Qt cross compilation support. Check for glib and qt only on w32 targets. gpgme/ 2007-09-07 Marcus Brinkmann <marcus@g10code.de> * w32-qt-io.cpp (_gpgme_io_spawn): Fix several cast errors and typos. * w32-io.c (_gpgme_io_write): Use TRACE_SYSRES instead of TRACE_SYS. (libgpgme_qt_la_LIBADD): Add QT4_CORE_LIBS, not QT4_CORE_LIB.
This commit is contained in:
parent
becf580f61
commit
414212ea5e
31
configure.ac
31
configure.ac
@ -118,6 +118,8 @@ GPGSM_DEFAULT=no
|
||||
component_system=None
|
||||
have_dosish_system=no
|
||||
have_w32_system=no
|
||||
build_w32_glib=no
|
||||
build_w32_qt=no
|
||||
case "${host}" in
|
||||
*-mingw32*)
|
||||
# special stuff for Windoze NT
|
||||
@ -126,6 +128,23 @@ case "${host}" in
|
||||
GPG_DEFAULT='c:\\gnupg\\gpg.exe'
|
||||
GPGSM_DEFAULT='c:\\gnupg\\gpgsm.exe'
|
||||
#component_system='COM+'
|
||||
|
||||
AM_PATH_GLIB_2_0
|
||||
AC_ARG_ENABLE(w32-glib,
|
||||
AC_HELP_STRING([--enable-w32-glib], [build GPGME Glib for W32]),
|
||||
build_w32_glib=$enableval)
|
||||
|
||||
# Check disabled, because the qt-dev packages in gpg4win do
|
||||
# not provide any support for cross compilation.
|
||||
# PKG_CHECK_MODULES(QT4_CORE, QtCore)
|
||||
|
||||
# Use it like this:
|
||||
# ./configure --enable-w32-qt QT4_CORE_CFLAGS="..." QT4_CORE_LIBS="..."
|
||||
AC_SUBST(QT4_CORE_CFLAGS)
|
||||
AC_SUBST(QT4_CORE_LIBS)
|
||||
AC_ARG_ENABLE(w32-qt,
|
||||
AC_HELP_STRING([--enable-w32-qt], [build GPGME Qt for W32]),
|
||||
build_w32_qt=$enableval)
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_PTH(1.2.0,,,no,have_pth=yes)
|
||||
@ -155,19 +174,7 @@ if test "$have_w32_system" = yes; then
|
||||
AC_DEFINE(HAVE_W32_SYSTEM,1, [Defined if we run on a W32 API based system])
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
|
||||
|
||||
build_w32_glib=no
|
||||
AM_PATH_GLIB_2_0
|
||||
AC_ARG_ENABLE(w32-glib,
|
||||
AC_HELP_STRING([--enable-w32-glib], [build GPGME Glib for W32]),
|
||||
build_w32_glib=$enableval)
|
||||
AM_CONDITIONAL(BUILD_W32_GLIB, test "$build_w32_glib" = yes)
|
||||
|
||||
build_w32_qt=no
|
||||
PKG_CHECK_MODULES(QT4_CORE, QtCore)
|
||||
AC_ARG_ENABLE(w32-qt,
|
||||
AC_HELP_STRING([--enable-w32-qt], [build GPGME Qt for W32]),
|
||||
build_w32_qt=$enableval)
|
||||
AM_CONDITIONAL(BUILD_W32_QT, test "$build_w32_qt" = yes)
|
||||
|
||||
AM_CONDITIONAL(HAVE_PTH, test "$have_pth" = "yes")
|
||||
|
@ -1,5 +1,9 @@
|
||||
2007-09-07 Marcus Brinkmann <marcus@g10code.de>
|
||||
|
||||
* w32-qt-io.cpp (_gpgme_io_spawn): Fix several cast errors and typos.
|
||||
* w32-io.c (_gpgme_io_write): Use TRACE_SYSRES instead of TRACE_SYS.
|
||||
(libgpgme_qt_la_LIBADD): Add QT4_CORE_LIBS, not QT4_CORE_LIB.
|
||||
|
||||
* kdpipeiodevice.h, kdpipeiodevice.cpp, moc_kdpipeiodevice.cpp,
|
||||
kdpipeiodevice.moc, w32-qt-io.c: New files.
|
||||
* Makefile.am (ltlib_gpgme_extra): Rename to ltlib_gpgme_glib.
|
||||
@ -10,6 +14,7 @@
|
||||
(AM_CFLAGS): Add @QT4_CORE_CFLAGS@.
|
||||
(libgpgme_qt_la_LDFLAGS, libgpgme_qt_la_DEPENDENCIES)
|
||||
(libgpgme_qt_la_LIBADD): New variables.
|
||||
|
||||
* sema.h (struct critsect_s): Rename "private" to "priv" to make
|
||||
C++ users happy. Change users.
|
||||
* posix-sema.c (_gpgme_sema_cs_enter, _gpgme_sema_cs_leave)
|
||||
|
@ -208,7 +208,7 @@ libgpgme_qt_la_LDFLAGS = $(gpgme_res_ldflag) $(no_undefined) \
|
||||
libgpgme_qt_la_DEPENDENCIES = $(assuan_libobjs) \
|
||||
@LTLIBOBJS@ $(srcdir)/libgpgme.vers $(gpgme_deps)
|
||||
libgpgme_qt_la_LIBADD = $(assuan_libobjs) @LTLIBOBJS@ \
|
||||
@GPG_ERROR_LIBS@ @QT4_CORE_LIB@ @NETLIBS@
|
||||
@GPG_ERROR_LIBS@ @QT4_CORE_LIBS@ @NETLIBS@
|
||||
endif
|
||||
|
||||
status-table.h : gpgme.h
|
||||
|
@ -73,7 +73,7 @@ extern "C" {
|
||||
AM_PATH_GPGME macro) check that this header matches the installed
|
||||
library. Warning: Do not edit the next line. configure will do
|
||||
that for you! */
|
||||
#define GPGME_VERSION "1.1.5-cvs1228"
|
||||
#define GPGME_VERSION "1.1.5-cvs1250"
|
||||
|
||||
|
||||
|
||||
|
@ -727,7 +727,7 @@ _gpgme_io_write (int fd, const void *buffer, size_t count)
|
||||
TRACE_LOGBUF (buffer, count);
|
||||
|
||||
if (count == 0)
|
||||
return TRACE_SYS (0);
|
||||
return TRACE_SYSRES (0);
|
||||
|
||||
ctx = find_writer (fd, 1);
|
||||
if (!ctx)
|
||||
|
@ -140,19 +140,15 @@ _gpgme_io_read (int fd, void *buffer, size_t count)
|
||||
}
|
||||
TRACE_LOG1 ("channel %p", chan);
|
||||
|
||||
nread = chan->read ((char *) buffer, count);
|
||||
if (nread < 0)
|
||||
{
|
||||
// GError *err = NULL;
|
||||
// status = g_io_channel_read_chars (chan, (gchar *) buffer,
|
||||
// count, &nread, &err);
|
||||
nread = chan->read( buffer, count );
|
||||
if ( nread < 0 ) {
|
||||
TRACE_LOG1 ("err %s", qPrintable( chan->errorString() ) );
|
||||
TRACE_LOG1 ("err %s", qPrintable (chan->errorString ()));
|
||||
saved_errno = EIO;
|
||||
nread = -1;
|
||||
}
|
||||
}
|
||||
|
||||
TRACE_LOGBUF (buffer, nread);
|
||||
TRACE_LOGBUF ((char *) buffer, nread);
|
||||
|
||||
errno = saved_errno;
|
||||
return TRACE_SYSRES (nread);
|
||||
@ -166,7 +162,7 @@ _gpgme_io_write (int fd, const void *buffer, size_t count)
|
||||
QIODevice *chan;
|
||||
TRACE_BEG2 (DEBUG_SYSIO, "_gpgme_io_write", fd,
|
||||
"buffer=%p, count=%u", buffer, count);
|
||||
TRACE_LOGBUF (buffer, count);
|
||||
TRACE_LOGBUF ((char *) buffer, count);
|
||||
|
||||
chan = find_channel (fd, 0);
|
||||
if (!chan)
|
||||
@ -176,13 +172,13 @@ _gpgme_io_write (int fd, const void *buffer, size_t count)
|
||||
return -1;
|
||||
}
|
||||
|
||||
nwritten = chan->write( buffer, count );
|
||||
nwritten = chan->write ((char *) buffer, count);
|
||||
|
||||
if (nwritten < 0)
|
||||
{
|
||||
nwritten = -1;
|
||||
errno = EIO;
|
||||
return TRACE_SYSRES(-1)
|
||||
return TRACE_SYSRES(-1);
|
||||
}
|
||||
errno = 0;
|
||||
return TRACE_SYSRES (nwritten);
|
||||
@ -348,7 +344,7 @@ build_commandline (char **argv)
|
||||
/* And a trailing zero. */
|
||||
n++;
|
||||
|
||||
buf = p = malloc (n);
|
||||
buf = p = (char *) malloc (n);
|
||||
if (!buf)
|
||||
return NULL;
|
||||
for (i = 0; argv[i]; i++)
|
||||
@ -543,8 +539,8 @@ _gpgme_io_select (struct io_select_fd_s *fds, size_t nfds, int nonblock)
|
||||
TRACE_BEG2 (DEBUG_SYSIO, "_gpgme_io_select", fds,
|
||||
"nfds=%u, nonblock=%u", nfds, nonblock);
|
||||
|
||||
// we only implement the special case of nonblock == true
|
||||
assert( nonblock );
|
||||
/* We only implement the special case of nonblock == true. */
|
||||
assert (nonblock);
|
||||
|
||||
count = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user