From: Marcus Brinkmann Date: Fri, 7 Sep 2007 19:38:50 +0000 (+0000) Subject: 2007-09-07 Marcus Brinkmann X-Git-Tag: gpgme-1.1.6~34 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=414212ea5ebfa8a1f381e69c733aad303127410e;p=gpgme.git 2007-09-07 Marcus Brinkmann * 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 * 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. --- diff --git a/configure.ac b/configure.ac index a21aaa9..963ab6c 100644 --- a/configure.ac +++ b/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") diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog index 7d3ae58..75bd6a2 100644 --- a/gpgme/ChangeLog +++ b/gpgme/ChangeLog @@ -1,5 +1,9 @@ 2007-09-07 Marcus Brinkmann + * 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) diff --git a/gpgme/Makefile.am b/gpgme/Makefile.am index df233bb..8668b36 100644 --- a/gpgme/Makefile.am +++ b/gpgme/Makefile.am @@ -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 diff --git a/gpgme/gpgme.h b/gpgme/gpgme.h index 0617f3b..d15b921 100644 --- a/gpgme/gpgme.h +++ b/gpgme/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" diff --git a/gpgme/w32-io.c b/gpgme/w32-io.c index a4a4256..9031ffb 100644 --- a/gpgme/w32-io.c +++ b/gpgme/w32-io.c @@ -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) diff --git a/gpgme/w32-qt-io.cpp b/gpgme/w32-qt-io.cpp index 9117066..c2a231a 100644 --- a/gpgme/w32-qt-io.cpp +++ b/gpgme/w32-qt-io.cpp @@ -140,19 +140,15 @@ _gpgme_io_read (int fd, void *buffer, size_t count) } TRACE_LOG1 ("channel %p", chan); - { -// 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() ) ); - saved_errno = EIO; - nread = -1; + nread = chan->read ((char *) buffer, count); + if (nread < 0) + { + 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;