Re: [gmime-devel] GMime 2.99 - no more global variables



Jeffrey Stedfast writes on februar 7, 2017 16:07:
Hey all,

This is just a status update. At this point, I've gotten GMime to the point
where there are no longer any global variables.


Hi there,

Looking good - I'm sure this is on your list, but tried to compile today
and had to make the appended changes. Still fails with:


```
make[2]: Entering directory '/home/gaute/dev/mail/gmime/gmime'
Making all in .
make[3]: Entering directory '/home/gaute/dev/mail/gmime/gmime'
 CCLD     libgmime-2.6.la
.libs/gmime.o: In function `g_mime_init':
/home/gaute/dev/mail/gmime/gmime/gmime.c:118: undefined reference to `g_mime_parser_options_init'
.libs/gmime.o: In function `g_mime_shutdown':
/home/gaute/dev/mail/gmime/gmime/gmime.c:210: undefined reference to `g_mime_parser_options_shutdown'
.libs/gmime-header.o: In function `g_mime_header_list_new':
/home/gaute/dev/mail/gmime/gmime/gmime-header.c:284: undefined reference to `_g_mime_parser_options_clone'
.libs/gmime-header.o: In function `_g_mime_header_list_set_options':
/home/gaute/dev/mail/gmime/gmime/gmime-header.c:360: undefined reference to `_g_mime_parser_options_clone'
/usr/bin/ld: .libs/libgmime-2.6.so.0.620.0: hidden symbol `g_mime_parser_options_shutdown' isn't defined
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:665: libgmime-2.6.la] Error 1
make[3]: Leaving directory '/home/gaute/dev/mail/gmime/gmime'
make[2]: *** [Makefile:863: all-recursive] Error 1
make[2]: Leaving directory '/home/gaute/dev/mail/gmime/gmime'
make[1]: *** [Makefile:486: all-recursive] Error 1
make[1]: Leaving directory '/home/gaute/dev/mail/gmime'
make: *** [Makefile:392: all] Error 2
```



- gaute

=========================================================


```
diff --git a/gmime/gmime-common.c b/gmime/gmime-common.c
index 5de50e62..3d1fc9a6 100644
--- a/gmime/gmime-common.c
+++ b/gmime/gmime-common.c
@@ -24,6 +24,9 @@
#endif

#include <string.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>

#include "gmime-table-private.h"
#include "gmime-common.h"
diff --git a/gmime/gmime-gpg-context.c b/gmime/gmime-gpg-context.c
index 797b5533..5c73f3a7 100644
--- a/gmime/gmime-gpg-context.c
+++ b/gmime/gmime-gpg-context.c
@@ -982,38 +982,3 @@ g_mime_gpg_context_new (GMimePasswordRequestFunc request_passwd)
#endif /* ENABLE_CRYPTO */
}

-
-/**
- * g_mime_gpg_context_get_auto_key_retrieve:
- * @ctx: a #GMimeGpgContext
- *
- * Gets whether or not gpg should auto-retrieve keys from a keyserver
- * when verifying signatures.
- *
- * Returns: %TRUE if gpg should auto-retrieve keys from a keyserver or
- * %FALSE otherwise.
- **/
-gboolean
-g_mime_gpg_context_get_auto_key_retrieve (GMimeGpgContext *ctx)
-{
-       g_return_val_if_fail (GMIME_IS_GPG_CONTEXT (ctx), FALSE);
-       
-       return ctx->auto_key_retrieve;
-}
-
-
-/**
- * g_mime_gpg_context_set_auto_key_retrieve:
- * @ctx: a #GMimeGpgContext
- * @auto_key_retrieve: %TRUE if gpg should auto-retrieve keys from a keys server
- *
- * Sets whether or not gpg should auto-retrieve keys from a keyserver
- * when verifying signatures.
- **/
-void
-g_mime_gpg_context_set_auto_key_retrieve (GMimeGpgContext *ctx, gboolean auto_key_retrieve)
-{
-       g_return_if_fail (GMIME_IS_GPG_CONTEXT (ctx));
-       
-       ctx->auto_key_retrieve = auto_key_retrieve;
-}
diff --git a/gmime/gmime-gpg-context.h b/gmime/gmime-gpg-context.h
index dae61ab7..5b8a1051 100644
--- a/gmime/gmime-gpg-context.h
+++ b/gmime/gmime-gpg-context.h
@@ -42,9 +42,6 @@ GType g_mime_gpg_context_get_type (void);

GMimeCryptoContext *g_mime_gpg_context_new (GMimePasswordRequestFunc request_passwd);

-gboolean g_mime_gpg_context_get_auto_key_retrieve (GMimeGpgContext *ctx);
-void g_mime_gpg_context_set_auto_key_retrieve (GMimeGpgContext *ctx, gboolean auto_key_retrieve);
-
G_END_DECLS

#endif /* __GMIME_GPG_CONTEXT_H__ */
```


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]