[svn] GnuPG - r5295 - in trunk: . common tools

svn author wk cvs at cvs.gnupg.org
Mon Mar 15 14:08:51 CET 2010


Author: wk
Date: 2010-03-15 14:08:51 +0100 (Mon, 15 Mar 2010)
New Revision: 5295

Modified:
   trunk/autogen.sh
   trunk/common/ChangeLog
   trunk/common/localename.c
   trunk/common/logging.c
   trunk/common/util.h
   trunk/common/w32-afunix.c
   trunk/tools/ChangeLog
   trunk/tools/gpgconf-comp.c
Log:
Builds again for W32.


Modified: trunk/common/ChangeLog
===================================================================
--- trunk/common/ChangeLog	2010-03-15 11:15:45 UTC (rev 5294)
+++ trunk/common/ChangeLog	2010-03-15 13:08:51 UTC (rev 5295)
@@ -1,3 +1,12 @@
+2010-03-15  Werner Koch  <wk at g10code.com>
+
+	* logging.c (S_IRGRP, S_IROTH, S_IWGRP, S_IWOTH) [W32]: New.
+	(fun_writer, set_file_fd) [W32]: Disable socket code.
+
+	* localename.c: Include gpg-error.h.
+
+	* util.h (GPG_ERR_NOT_ENABLED): Remove this temporary definition.
+
 2010-03-12  Werner Koch  <wk at g10code.com>
 
 	* status.h (STATUS_ENTER): New.

Modified: trunk/tools/ChangeLog
===================================================================
--- trunk/tools/ChangeLog	2010-03-15 11:15:45 UTC (rev 5294)
+++ trunk/tools/ChangeLog	2010-03-15 13:08:51 UTC (rev 5295)
@@ -1,3 +1,8 @@
+2010-03-15  Werner Koch  <wk at g10code.com>
+
+	* gpgconf-comp.c (my_dgettext):
+	s/gettext_select_utf8/gettext_use_utf8/.
+
 2010-03-10  Werner Koch  <wk at g10code.com>
 
 	* Makefile.am (common_libs): Remove libjnlib.a.

Modified: trunk/autogen.sh
===================================================================
--- trunk/autogen.sh	2010-03-15 11:15:45 UTC (rev 5294)
+++ trunk/autogen.sh	2010-03-15 13:08:51 UTC (rev 5295)
@@ -123,7 +123,8 @@
 	     --with-zlib=${w32root} \
 	     --with-regex=${w32root} \
              --with-pth-prefix=${w32root} \
-             --with-adns=${w32root} "$@"
+             --with-adns=${w32root} \
+             --disable-g13 "$@"
     rc=$?
     exit $rc
 fi

Modified: trunk/common/localename.c
===================================================================
--- trunk/common/localename.c	2010-03-15 11:15:45 UTC (rev 5294)
+++ trunk/common/localename.c	2010-03-15 13:08:51 UTC (rev 5295)
@@ -29,6 +29,7 @@
 #ifdef HAVE_LOCALE_H
 #include <locale.h>
 #endif
+#include <gpg-error.h> /* We need gettext_localename for W32. */
 
 #include "../common/w32help.h"
 
@@ -101,7 +102,7 @@
   const char *s;
 
 #ifdef HAVE_W32_SYSTEM
-  /* We use the localname function from ../common/w32-gettext.c. */
+  /* We use the localename function libgpg-error.  */
   s = gettext_localename ();
 #else
   s = do_nl_locale_name (LC_MESSAGES, "LC_MESSAGES");

Modified: trunk/common/logging.c
===================================================================
--- trunk/common/logging.c	2010-03-15 11:15:45 UTC (rev 5294)
+++ trunk/common/logging.c	2010-03-15 13:08:51 UTC (rev 5295)
@@ -30,20 +30,28 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #ifndef HAVE_W32_SYSTEM
-#include <sys/socket.h>
-#include <sys/un.h>
-#endif /*!HAVE_W32_SYSTEM*/
+# include <sys/socket.h>
+# include <sys/un.h>
+#endif /*HAVE_W32_SYSTEM*/
 #include <unistd.h>
 #include <fcntl.h>
 #include <assert.h>
 
 
+
 #define JNLIB_NEED_LOG_LOGV 1
 #define JNLIB_NEED_AFLOCAL 1
 #include "libjnlib-config.h"
 #include "logging.h"
 
+#ifdef HAVE_W32_SYSTEM
+# define S_IRGRP S_IRUSR
+# define S_IROTH S_IRUSR
+# define S_IWGRP S_IWUSR
+# define S_IWOTH S_IWUSR
+#endif
 
+
 static estream_t logstream;
 static int log_socket = -1;
 static char prefix_buffer[80];
@@ -121,6 +129,7 @@
      processes often close stderr and by writing to file descriptor 2
      we might send the log message to a file not intended for logging
      (e.g. a pipe or network connection). */
+#ifndef HAVE_W32_SYSTEM
   if (cookie->want_socket && cookie->fd == -1)
     {
       /* Not yet open or meanwhile closed due to an error. */
@@ -177,6 +186,7 @@
           cookie->is_socket = 1;
         }
     }
+#endif /*HAVE_W32_SYSTEM*/
 
   log_socket = cookie->fd;
   if (cookie->fd != -1 && !writen (cookie->fd, buffer, size))
@@ -239,6 +249,7 @@
       fd = fileno (stderr);
     }
 
+#ifndef HAVE_W32_SYSTEM
   if (name)
     {
       want_socket = (!strncmp (name, "socket://", 9) && name[9]);
@@ -246,6 +257,7 @@
         name += 9;
     }
   else
+#endif /*HAVE_W32_SYSTEM*/
     {
       want_socket = 0;
     }

Modified: trunk/common/util.h
===================================================================
--- trunk/common/util.h	2010-03-15 11:15:45 UTC (rev 5294)
+++ trunk/common/util.h	2010-03-15 13:08:51 UTC (rev 5295)
@@ -25,11 +25,6 @@
 #include <errno.h>  /* We need errno.  */
 #include <gpg-error.h> /* We need gpg_error_t. */
 
-/* Add error codes available only in newer versions of libgpg-error.  */
-#ifndef GPG_ERR_NOT_ENABLED
-#define GPG_ERR_NOT_ENABLED 179
-#endif
-
 /* Hash function used with libksba. */
 #define HASH_FNC ((void (*)(void *, const void*,size_t))gcry_md_write)
 

Modified: trunk/common/w32-afunix.c
===================================================================
--- trunk/common/w32-afunix.c	2010-03-15 11:15:45 UTC (rev 5294)
+++ trunk/common/w32-afunix.c	2010-03-15 13:08:51 UTC (rev 5295)
@@ -17,7 +17,7 @@
  * License along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-/* Use of this code is preprecated - you better use the sockt wrappers
+/* Use of this code is deprecated - you better use the socket wrappers
    from libassuan. */
 
 #ifdef _WIN32
@@ -51,15 +51,14 @@
   fclose (fp);
   if (!nread)
     {
-#warning remove this file
-      jnlib_set_errno (EIO);
+      gpg_err_set_errno (EIO);
       return -1;
     }
   buffer[nread] = 0;
   aval = atoi (buffer);
   if (aval < 1 || aval > 65535)
     {
-      jnlib_set_errno (EINVAL);
+      gpg_err_set_errno (EINVAL);
       return -1;
     }
   *port = (unsigned int)aval;
@@ -67,7 +66,7 @@
     ;
   if (*p != '\n' || nread != 17)
     {
-      jnlib_set_errno (EINVAL);
+      gpg_err_set_errno (EINVAL);
       return -1;
     }
   p++; nread--;
@@ -127,7 +126,7 @@
       ret = send (sockfd, nonce, 16, 0);
       if (ret >= 0 && ret != 16)
         {
-          jnlib_set_errno (EIO);
+          gpg_err_set_errno (EIO);
           ret = -1;
         }
     }

Modified: trunk/tools/gpgconf-comp.c
===================================================================
--- trunk/tools/gpgconf-comp.c	2010-03-15 11:15:45 UTC (rev 5294)
+++ trunk/tools/gpgconf-comp.c	2010-03-15 13:08:51 UTC (rev 5295)
@@ -1144,7 +1144,7 @@
       if (!switched_codeset)
         {
           switched_codeset = 1;
-          gettext_select_utf8 (1);
+          gettext_use_utf8 (1);
         }
 
       if (!strcmp (domain, "gnupg"))




More information about the Gnupg-commits mailing list