qnx6 patches

Sean Boudreau seanb at qnx.com
Fri Apr 13 18:02:57 CEST 2007


Hello:

Please find attached the QNX6 diffs I've been using
for gnupg-1.4.6.  I think most of these may be
applicable to other POSIX strict environments.

Regards,

Sean Boudreau
-------------- next part --------------
--- acinclude.m4.orig	2006-10-02 11:15:43.000000000 -0400
+++ acinclude.m4	2007-03-28 09:13:07.000000000 -0400
@@ -416,6 +416,42 @@
                 #include <sys/types.h>
                 #include <fcntl.h>
 
+                /* This mess was copied from the GNU getpagesize.h.  */
+                #ifndef HAVE_GETPAGESIZE
+                /* Assume that all systems that can run configure have sys/param.h.  */
+                # ifndef HAVE_SYS_PARAM_H
+                #  define HAVE_SYS_PARAM_H 1
+                # endif
+ 
+                # ifdef _SC_PAGESIZE
+                #  define getpagesize() sysconf(_SC_PAGESIZE)
+                # else /* no _SC_PAGESIZE */
+                #  ifdef HAVE_SYS_PARAM_H
+                #   include <sys/param.h>
+                #   ifdef EXEC_PAGESIZE
+                #    define getpagesize() EXEC_PAGESIZE
+                #   else /* no EXEC_PAGESIZE */
+                #    ifdef NBPG
+                #     define getpagesize() NBPG * CLSIZE
+                #     ifndef CLSIZE
+                #      define CLSIZE 1
+                #     endif /* no CLSIZE */
+                #    else /* no NBPG */
+                #     ifdef NBPC
+                #      define getpagesize() NBPC
+                #     else /* no NBPC */
+                #      ifdef PAGESIZE
+                #       define getpagesize() PAGESIZE
+                #      endif /* PAGESIZE */
+                #     endif /* no NBPC */
+                #    endif /* no NBPG */
+                #   endif /* no EXEC_PAGESIZE */
+                #  else /* no HAVE_SYS_PARAM_H */
+                #   define getpagesize() 8192	/* punt totally */
+                #  endif /* no HAVE_SYS_PARAM_H */
+                # endif /* no _SC_PAGESIZE */
+
+                #endif /* no HAVE_GETPAGESIZE */
                 int main()
                 {
                     char *pool;
--- configure.ac.orig	2006-12-05 07:17:02.000000000 -0500
+++ configure.ac	2007-03-28 09:13:07.000000000 -0400
@@ -619,12 +619,12 @@
   _dns_save_libs=$LIBS
   LIBS=""
   # the double underscore thing is a glibc-ism?
-  AC_SEARCH_LIBS(res_query,resolv bind,,
-                 AC_SEARCH_LIBS(__res_query,resolv bind,,have_resolver=no))
-  AC_SEARCH_LIBS(dn_expand,resolv bind,,
-                 AC_SEARCH_LIBS(__dn_expand,resolv bind,,have_resolver=no))
-  AC_SEARCH_LIBS(dn_skipname,resolv bind,,
-                 AC_SEARCH_LIBS(__dn_skipname,resolv bind,,have_resolver=no))
+  AC_SEARCH_LIBS(res_query,resolv bind socket,,
+                 AC_SEARCH_LIBS(__res_query,resolv bind socket,,have_resolver=no))
+  AC_SEARCH_LIBS(dn_expand,resolv bind socket,,
+                 AC_SEARCH_LIBS(__dn_expand,resolv bind socket,,have_resolver=no))
+  AC_SEARCH_LIBS(dn_skipname,resolv bind socket,,
+                 AC_SEARCH_LIBS(__dn_skipname,resolv bind socket,,have_resolver=no))
 
   if test x"$have_resolver" != xno ; then
 
--- g10/gpg.c.orig	2006-12-03 10:37:45.000000000 -0500
+++ g10/gpg.c	2007-03-28 09:13:07.000000000 -0400
@@ -25,6 +25,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <ctype.h>
 #include <unistd.h>
 #include <assert.h>
--- g10/pkclist.c.orig	2006-07-26 06:31:15.000000000 -0400
+++ g10/pkclist.c	2007-03-28 09:13:07.000000000 -0400
@@ -24,6 +24,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <errno.h>
 #include <assert.h>
 
--- keyserver/gpgkeys_curl.c.orig	2006-09-26 09:07:53.000000000 -0400
+++ keyserver/gpgkeys_curl.c	2007-03-28 09:13:07.000000000 -0400
@@ -33,6 +33,7 @@
 #include <config.h>
 #include <stdio.h>
 #include <string.h>
+#include <strings.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <unistd.h>
--- keyserver/gpgkeys_hkp.c.orig	2006-12-03 10:37:44.000000000 -0500
+++ keyserver/gpgkeys_hkp.c	2007-03-28 09:13:07.000000000 -0400
@@ -34,6 +34,7 @@
 #include <config.h>
 #include <stdio.h>
 #include <string.h>
+#include <strings.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <unistd.h>
--- keyserver/ksutil.c.orig	2006-12-04 03:36:46.000000000 -0500
+++ keyserver/ksutil.c	2007-03-28 09:13:07.000000000 -0400
@@ -35,6 +35,7 @@
 #include <unistd.h>
 #include <stdio.h>
 #include <string.h>
+#include <strings.h>
 #include <stdlib.h>
 
 #ifdef HAVE_LIBCURL
--- util/miscutil.c.orig	2006-10-02 08:07:23.000000000 -0400
+++ util/miscutil.c	2007-03-28 09:13:07.000000000 -0400
@@ -24,6 +24,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
+#include <strings.h>
 #include <time.h>
 #include <ctype.h>
 #ifdef HAVE_LANGINFO_H
--- tools/shmtest.c.orig	2005-07-27 13:02:56.000000000 -0400
+++ tools/shmtest.c	2007-03-28 09:13:09.000000000 -0400
@@ -39,12 +39,14 @@
 
 static int serverpid = -1;
 
+#ifdef USE_SHM_COPROCESSING
 static void
 my_usage(void)
 {
     fprintf(stderr, "usage: shmtest gpg-command-line\n");
     exit(1);
 }
+#endif
 
 const char *
 strusage( int level )
@@ -63,6 +65,7 @@
 }
 
 
+#ifdef USE_SHM_COPROCESSING
 static void
 do_get_string( int mode, const char *keyword, byte *area, size_t areasize )
 {
@@ -93,12 +96,14 @@
     area[3] = 1; /* we should better use a semaphore */
     kill( serverpid, SIGUSR1 );
 }
+#endif
 
 
 
 int
 main(int argc, char **argv)
 {
+#ifdef USE_SHM_COPROCESSING
     void  *area = NULL;
     size_t areasize = 4096;
     int shm_id = -1;
@@ -107,6 +112,7 @@
     char *p, *p2;
     size_t n;
     int i;
+#endif
 
     log_set_name("shmtest");
     i18n_init();
@@ -193,9 +199,9 @@
 
     if( pclose(fp) )
 	log_error("pclose failed\n");
+#endif
 
     return 0;
-#endif
 }
 
 #endif
--- util/cert.c.orig	2006-04-03 04:13:21.000000000 -0400
+++ util/cert.c	2007-03-28 09:13:09.000000000 -0400
@@ -27,6 +27,7 @@
 #else
 #include <netinet/in.h>
 #include <arpa/nameser.h>
+#include <arpa/inet.h>
 #include <resolv.h>
 #endif
 #include <string.h>
--- util/pka.c.orig	2005-07-28 14:50:09.000000000 -0400
+++ util/pka.c	2007-03-28 09:13:09.000000000 -0400
@@ -32,6 +32,7 @@
 #else
 #include <netinet/in.h>
 #include <arpa/nameser.h>
+#include <arpa/inet.h>
 #include <resolv.h>
 #endif
 #endif /* USE_DNS_PKA */
--- util/srv.c.orig	2006-02-12 04:07:05.000000000 -0500
+++ util/srv.c	2007-03-28 09:13:09.000000000 -0400
@@ -26,6 +26,7 @@
 #else
 #include <netinet/in.h>
 #include <arpa/nameser.h>
+#include <arpa/inet.h>
 #include <resolv.h>
 #endif
 #include <unistd.h>


More information about the Gnupg-devel mailing list