Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F422534
extern.diff
sbingner (Sam Bingner)
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
sbingner
Aug 17 2018, 11:11 AM
2018-08-17 11:11:59 (UTC+2)
Size
11 KB
Subscribers
None
extern.diff
View Options
diff -ur gnupg-2.2.9/agent/agent.h gnupg-2.2.9+iPhone/agent/agent.h
--- gnupg-2.2.9/agent/agent.h 2018-06-12 01:25:39.000000000 -1000
+++ gnupg-2.2.9+iPhone/agent/agent.h 2018-08-15 08:34:08.000000000 -1000
@@ -55,6 +55,7 @@
/* A large struct name "opt" to keep global flags */
+EXTERN_UNLESS_MAIN_MODULE
struct
{
unsigned int debug; /* Debug flags (DBG_foo_VALUE) */
diff -ur gnupg-2.2.9/agent/gpg-agent.c gnupg-2.2.9+iPhone/agent/gpg-agent.c
--- gnupg-2.2.9/agent/gpg-agent.c 2018-06-06 06:29:59.000000000 -1000
+++ gnupg-2.2.9+iPhone/agent/gpg-agent.c 2018-08-14 22:16:12.000000000 -1000
@@ -50,9 +50,11 @@
#include <npth.h>
#define GNUPG_COMMON_NEED_AFLOCAL
+#define INCLUDED_BY_MAIN_MODULE 1
#include "agent.h"
#include <assuan.h> /* Malloc hooks and socket wrappers. */
+#include "../common/iobuf.h"
#include "../common/i18n.h"
#include "../common/sysutils.h"
#include "../common/gc-opt-flags.h"
diff -ur gnupg-2.2.9/agent/preset-passphrase.c gnupg-2.2.9+iPhone/agent/preset-passphrase.c
--- gnupg-2.2.9/agent/preset-passphrase.c 2017-08-28 00:22:54.000000000 -1000
+++ gnupg-2.2.9+iPhone/agent/preset-passphrase.c 2018-08-14 22:16:12.000000000 -1000
@@ -44,6 +44,7 @@
# include <windows.h> /* To initialize the sockets. fixme */
#endif
+#define INCLUDED_BY_MAIN_MODULE 1
#include "agent.h"
#include "../common/simple-pwquery.h"
#include "../common/i18n.h"
diff -ur gnupg-2.2.9/agent/protect-tool.c gnupg-2.2.9+iPhone/agent/protect-tool.c
--- gnupg-2.2.9/agent/protect-tool.c 2018-03-26 20:13:47.000000000 -1000
+++ gnupg-2.2.9+iPhone/agent/protect-tool.c 2018-08-14 22:22:40.000000000 -1000
@@ -38,7 +38,9 @@
#include <fcntl.h> /* for setmode() */
#endif
+#define INCLUDED_BY_MAIN_MODULE 1
#include "agent.h"
+#include "../common/iobuf.h"
#include "../common/i18n.h"
#include "../common/get-passphrase.h"
#include "../common/sysutils.h"
diff -ur gnupg-2.2.9/agent/t-protect.c gnupg-2.2.9+iPhone/agent/t-protect.c
--- gnupg-2.2.9/agent/t-protect.c 2017-12-07 20:40:06.000000000 -1000
+++ gnupg-2.2.9+iPhone/agent/t-protect.c 2018-08-14 22:16:12.000000000 -1000
@@ -23,6 +23,7 @@
#include <stdlib.h>
#include <assert.h>
+#define INCLUDED_BY_MAIN_MODULE 1
#include "agent.h"
diff -ur gnupg-2.2.9/common/iobuf.h gnupg-2.2.9+iPhone/common/iobuf.h
--- gnupg-2.2.9/common/iobuf.h 2018-06-12 01:25:39.000000000 -1000
+++ gnupg-2.2.9+iPhone/common/iobuf.h 2018-08-14 22:16:12.000000000 -1000
@@ -250,7 +250,7 @@
};
#ifndef EXTERN_UNLESS_MAIN_MODULE
-#if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
+#if (defined (__riscos__) || defined (__APPLE__)) && !defined (INCLUDED_BY_MAIN_MODULE)
#define EXTERN_UNLESS_MAIN_MODULE extern
#else
#define EXTERN_UNLESS_MAIN_MODULE
diff -ur gnupg-2.2.9/common/t-iobuf.c gnupg-2.2.9+iPhone/common/t-iobuf.c
--- gnupg-2.2.9/common/t-iobuf.c 2017-08-28 00:22:54.000000000 -1000
+++ gnupg-2.2.9+iPhone/common/t-iobuf.c 2018-08-14 22:16:12.000000000 -1000
@@ -4,6 +4,7 @@
#include <assert.h>
#include <stdlib.h>
+#define INCLUDED_BY_MAIN_MODULE 1
#include "iobuf.h"
#include "stringhelp.h"
diff -ur gnupg-2.2.9/common/t-name-value.c gnupg-2.2.9+iPhone/common/t-name-value.c
--- gnupg-2.2.9/common/t-name-value.c 2017-08-28 00:22:54.000000000 -1000
+++ gnupg-2.2.9+iPhone/common/t-name-value.c 2018-08-14 22:16:12.000000000 -1000
@@ -25,6 +25,8 @@
#include <unistd.h>
#include <sys/stat.h>
+#define INCLUDED_BY_MAIN_MODULE 1
+#include "iobuf.h"
#include "util.h"
#include "name-value.h"
diff -ur gnupg-2.2.9/common/t-strlist.c gnupg-2.2.9+iPhone/common/t-strlist.c
--- gnupg-2.2.9/common/t-strlist.c 2017-08-28 00:22:54.000000000 -1000
+++ gnupg-2.2.9+iPhone/common/t-strlist.c 2018-08-14 22:16:12.000000000 -1000
@@ -31,6 +31,8 @@
#include <config.h>
#include <string.h>
+#define INCLUDED_BY_MAIN_MODULE 1
+#include "iobuf.h"
#include "strlist.h"
#include "t-support.h"
diff -ur gnupg-2.2.9/common/util.h gnupg-2.2.9+iPhone/common/util.h
--- gnupg-2.2.9/common/util.h 2018-06-12 01:25:39.000000000 -1000
+++ gnupg-2.2.9+iPhone/common/util.h 2018-08-15 08:24:16.000000000 -1000
@@ -55,6 +55,13 @@
# define GPG_ERR_DNS_TIMEOUT 718
#endif
+#ifndef EXTERN_UNLESS_MAIN_MODULE
+#if (defined (__riscos__) || defined (__APPLE__)) && !defined (INCLUDED_BY_MAIN_MODULE)
+#define EXTERN_UNLESS_MAIN_MODULE extern
+#else
+#define EXTERN_UNLESS_MAIN_MODULE
+#endif
+#endif
/* Hash function used with libksba. */
#define HASH_FNC ((void (*)(void *, const void*,size_t))gcry_md_write)
diff -ur gnupg-2.2.9/dirmngr/dirmngr.c gnupg-2.2.9+iPhone/dirmngr/dirmngr.c
--- gnupg-2.2.9/dirmngr/dirmngr.c 2018-06-12 01:25:39.000000000 -1000
+++ gnupg-2.2.9+iPhone/dirmngr/dirmngr.c 2018-08-14 22:28:37.000000000 -1000
@@ -56,10 +56,12 @@
#define GNUPG_COMMON_NEED_AFLOCAL
+#define INCLUDED_BY_MAIN_MODULE 1
#include "dirmngr.h"
#include <assuan.h>
+#include "../common/iobuf.h"
#include "certcache.h"
#include "crlcache.h"
#include "crlfetch.h"
diff -ur gnupg-2.2.9/dirmngr/dirmngr.h gnupg-2.2.9+iPhone/dirmngr/dirmngr.h
--- gnupg-2.2.9/dirmngr/dirmngr.h 2017-12-11 00:30:45.000000000 -1000
+++ gnupg-2.2.9+iPhone/dirmngr/dirmngr.h 2018-08-15 08:35:31.000000000 -1000
@@ -75,6 +75,7 @@
/* A large struct named "opt" to keep global flags. */
+EXTERN_UNLESS_MAIN_MODULE
struct
{
unsigned int debug; /* debug flags (DBG_foo_VALUE) */
diff -ur gnupg-2.2.9/g10/options.h gnupg-2.2.9+iPhone/g10/options.h
--- gnupg-2.2.9/g10/options.h 2018-06-12 01:25:39.000000000 -1000
+++ gnupg-2.2.9+iPhone/g10/options.h 2018-08-15 08:31:23.000000000 -1000
@@ -30,15 +30,6 @@
#include "../common/session-env.h"
#include "../common/compliance.h"
-#ifndef EXTERN_UNLESS_MAIN_MODULE
-/* Norcraft can't cope with common symbols */
-#if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
-#define EXTERN_UNLESS_MAIN_MODULE extern
-#else
-#define EXTERN_UNLESS_MAIN_MODULE
-#endif
-#endif
-
/* Declaration of a keyserver spec type. The definition is found in
../common/keyserver.h. */
struct keyserver_spec;
diff -ur gnupg-2.2.9/kbx/kbxutil.c gnupg-2.2.9+iPhone/kbx/kbxutil.c
--- gnupg-2.2.9/kbx/kbxutil.c 2018-06-12 01:25:39.000000000 -1000
+++ gnupg-2.2.9+iPhone/kbx/kbxutil.c 2018-08-14 22:16:12.000000000 -1000
@@ -29,6 +29,8 @@
#include <assert.h>
#include <gpg-error.h>
+#define INCLUDED_BY_MAIN_MODULE 1
+#include "../common/iobuf.h"
#include "../common/logging.h"
#include "../common/argparse.h"
#include "../common/stringhelp.h"
diff -ur gnupg-2.2.9/scd/scdaemon.c gnupg-2.2.9+iPhone/scd/scdaemon.c
--- gnupg-2.2.9/scd/scdaemon.c 2018-03-21 08:43:33.000000000 -1000
+++ gnupg-2.2.9+iPhone/scd/scdaemon.c 2018-08-14 22:25:31.000000000 -1000
@@ -38,12 +38,14 @@
#include <npth.h>
#define GNUPG_COMMON_NEED_AFLOCAL
+#define INCLUDED_BY_MAIN_MODULE 1
#include "scdaemon.h"
#include <ksba.h>
#include <gcrypt.h>
#include <assuan.h> /* malloc hooks */
+#include "../common/iobuf.h"
#include "../common/i18n.h"
#include "../common/sysutils.h"
#include "app-common.h"
diff -ur gnupg-2.2.9/scd/scdaemon.h gnupg-2.2.9+iPhone/scd/scdaemon.h
--- gnupg-2.2.9/scd/scdaemon.h 2017-08-28 00:22:54.000000000 -1000
+++ gnupg-2.2.9+iPhone/scd/scdaemon.h 2018-08-15 08:35:05.000000000 -1000
@@ -44,6 +44,7 @@
/* A large struct name "opt" to keep global flags. */
+EXTERN_UNLESS_MAIN_MODULE
struct
{
unsigned int debug; /* Debug flags (DBG_foo_VALUE). */
diff -ur gnupg-2.2.9/sm/gpgsm.c gnupg-2.2.9+iPhone/sm/gpgsm.c
--- gnupg-2.2.9/sm/gpgsm.c 2018-06-12 01:25:39.000000000 -1000
+++ gnupg-2.2.9+iPhone/sm/gpgsm.c 2018-08-14 22:16:12.000000000 -1000
@@ -28,6 +28,7 @@
#include <fcntl.h>
/*#include <mcheck.h>*/
+#define INCLUDED_BY_MAIN_MODULE 1
#include "gpgsm.h"
#include <gcrypt.h>
#include <assuan.h> /* malloc hooks */
diff -ur gnupg-2.2.9/sm/gpgsm.h gnupg-2.2.9+iPhone/sm/gpgsm.h
--- gnupg-2.2.9/sm/gpgsm.h 2018-06-12 01:25:39.000000000 -1000
+++ gnupg-2.2.9+iPhone/sm/gpgsm.h 2018-08-15 08:36:03.000000000 -1000
@@ -52,6 +52,7 @@
/* A large struct named "opt" to keep global flags. */
+EXTERN_UNLESS_MAIN_MODULE
struct
{
unsigned int debug; /* debug flags (DBG_foo_VALUE) */
diff -ur gnupg-2.2.9/tools/gpg-check-pattern.c gnupg-2.2.9+iPhone/tools/gpg-check-pattern.c
--- gnupg-2.2.9/tools/gpg-check-pattern.c 2017-08-28 00:22:54.000000000 -1000
+++ gnupg-2.2.9+iPhone/tools/gpg-check-pattern.c 2018-08-15 08:26:34.000000000 -1000
@@ -40,6 +40,8 @@
#include <regex.h>
#include <ctype.h>
+#define INCLUDED_BY_MAIN_MODULE 1
+#include "../common/iobuf.h"
#include "../common/util.h"
#include "../common/i18n.h"
#include "../common/sysutils.h"
diff -ur gnupg-2.2.9/tools/gpg-connect-agent.c gnupg-2.2.9+iPhone/tools/gpg-connect-agent.c
--- gnupg-2.2.9/tools/gpg-connect-agent.c 2017-08-28 00:22:54.000000000 -1000
+++ gnupg-2.2.9+iPhone/tools/gpg-connect-agent.c 2018-08-15 08:22:21.000000000 -1000
@@ -29,6 +29,8 @@
#include <unistd.h>
#include <assert.h>
+#define INCLUDED_BY_MAIN_MODULE 1
+#include "../common/iobuf.h"
#include "../common/i18n.h"
#include "../common/util.h"
#include "../common/asshelp.h"
diff -ur gnupg-2.2.9/tools/gpg-wks-client.c gnupg-2.2.9+iPhone/tools/gpg-wks-client.c
--- gnupg-2.2.9/tools/gpg-wks-client.c 2018-02-20 04:09:35.000000000 -1000
+++ gnupg-2.2.9+iPhone/tools/gpg-wks-client.c 2018-08-15 08:26:19.000000000 -1000
@@ -23,6 +23,8 @@
#include <stdlib.h>
#include <string.h>
+#define INCLUDED_BY_MAIN_MODULE 1
+#include "../common/iobuf.h"
#include "../common/util.h"
#include "../common/status.h"
#include "../common/i18n.h"
diff -ur gnupg-2.2.9/tools/gpg-wks.h gnupg-2.2.9+iPhone/tools/gpg-wks.h
--- gnupg-2.2.9/tools/gpg-wks.h 2018-02-20 04:06:52.000000000 -1000
+++ gnupg-2.2.9+iPhone/tools/gpg-wks.h 2018-08-14 22:16:12.000000000 -1000
@@ -30,6 +30,7 @@
/* We keep all global options in the structure OPT. */
+EXTERN_UNLESS_MAIN_MODULE
struct
{
int verbose;
diff -ur gnupg-2.2.9/tools/gpgconf.c gnupg-2.2.9+iPhone/tools/gpgconf.c
--- gnupg-2.2.9/tools/gpgconf.c 2018-04-09 02:40:19.000000000 -1000
+++ gnupg-2.2.9+iPhone/tools/gpgconf.c 2018-08-14 22:29:44.000000000 -1000
@@ -25,7 +25,9 @@
#include <string.h>
#include <unistd.h>
+#define INCLUDED_BY_MAIN_MODULE 1
#include "gpgconf.h"
+#include "../common/iobuf.h"
#include "../common/i18n.h"
#include "../common/sysutils.h"
#include "../common/init.h"
diff -ur gnupg-2.2.9/tools/gpgconf.h gnupg-2.2.9+iPhone/tools/gpgconf.h
--- gnupg-2.2.9/tools/gpgconf.h 2017-12-18 06:07:27.000000000 -1000
+++ gnupg-2.2.9+iPhone/tools/gpgconf.h 2018-08-15 08:32:29.000000000 -1000
@@ -23,6 +23,7 @@
#include "../common/util.h"
/* We keep all global options in the structure OPT. */
+EXTERN_UNLESS_MAIN_MODULE
struct
{
int verbose; /* Verbosity level. */
diff -ur gnupg-2.2.9/tools/gpgtar.c gnupg-2.2.9+iPhone/tools/gpgtar.c
--- gnupg-2.2.9/tools/gpgtar.c 2017-08-28 00:22:54.000000000 -1000
+++ gnupg-2.2.9+iPhone/tools/gpgtar.c 2018-08-15 08:25:45.000000000 -1000
@@ -34,6 +34,8 @@
#include <string.h>
#include <assert.h>
+#define INCLUDED_BY_MAIN_MODULE 1
+#include "../common/iobuf.h"
#include "../common/util.h"
#include "../common/i18n.h"
#include "../common/sysutils.h"
diff -ur gnupg-2.2.9/tools/gpgtar.h gnupg-2.2.9+iPhone/tools/gpgtar.h
--- gnupg-2.2.9/tools/gpgtar.h 2017-08-28 00:22:54.000000000 -1000
+++ gnupg-2.2.9+iPhone/tools/gpgtar.h 2018-08-15 08:31:48.000000000 -1000
@@ -24,6 +24,7 @@
#include "../common/strlist.h"
/* We keep all global options in the structure OPT. */
+EXTERN_UNLESS_MAIN_MODULE
struct
{
int verbose;
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
251945
Attached To
T4103: Compile with Apple Clang
Event Timeline
Log In to Comment