[balsa/gtk3] Fix bgo #704159 (Igor Pashev)



commit be21ea9035e610fa23223c7718294e615d84ce72
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Sun Jul 14 10:49:08 2013 -0400

    Fix bgo #704159 (Igor Pashev)
    
        * configure.ac: add check for struct utsname.domainname, and
        AC_USE_SYSTEM_EXTENSIONS.
        * libbalsa/filter-file.c: do not define __EXTENSIONS__.
        * libbalsa/send.c (libbalsa_set_message_id): check
        HAVE_STRUCT_UTSNAME_DOMAINNAME as well as _GNU_SOURCE.

 ChangeLog              |   10 ++++++++++
 configure.ac           |    3 ++-
 libbalsa/filter-file.c |    2 --
 libbalsa/send.c        |    2 +-
 4 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b138af2..102e170 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2013-07-14  Peter Bloomfield
+
+       Fix bgo #704159 (Igor Pashev)
+
+       * configure.ac: add check for struct utsname.domainname, and
+       AC_USE_SYSTEM_EXTENSIONS.
+       * libbalsa/filter-file.c: do not define __EXTENSIONS__.
+       * libbalsa/send.c (libbalsa_set_message_id): check
+       HAVE_STRUCT_UTSNAME_DOMAINNAME as well as _GNU_SOURCE.
+
 2013-06-23  Peter Bloomfield
 
        * src/sendmsg-window.c (to_add), (create_email_entry): restore
diff --git a/configure.ac b/configure.ac
index 4e6d001..624ffc6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -215,6 +215,8 @@ dnl #####################################################################
 AC_PROG_CC
 m4_ifdef([AM_PROG_LIBTOOL],[AM_PROG_LIBTOOL],[AC_PROG_RANLIB])
 AC_PROG_LN_S
+AC_USE_SYSTEM_EXTENSIONS
+AC_CHECK_MEMBERS([struct utsname.domainname],[],[],[[#include<sys/utsname.h>]])
 
 # pkg-config
 #
@@ -860,7 +862,6 @@ dnl #####################################################################
 AC_C_CONST
 AC_STDC_HEADERS
 
-AC_DEFINE([_XOPEN_SOURCE],[500],[We strive for XOPEN compliance])
 AC_CHECK_DECLS([localtime_r, gmtime_r, ctime_r], [], [], [[#include <time.h>]])
 AC_CHECK_FUNCS([localtime_r gmtime_r ctime_r])
 AC_CHECK_HEADER([zlib.h],,AC_MSG_ERROR([zlib library required]))
diff --git a/libbalsa/filter-file.c b/libbalsa/filter-file.c
index aa8eeb4..cdb8849 100644
--- a/libbalsa/filter-file.c
+++ b/libbalsa/filter-file.c
@@ -32,8 +32,6 @@
 #endif                          /* HAVE_CONFIG_H */
 #include "filter-file.h"
 
-/* extensions  needed additonally on Solaris for strptime */
-#define __EXTENSIONS__
 #include <stdlib.h>
 #include <stdio.h>
 /* yellow dog has crappy libc and needs pthread.h to be included here */
diff --git a/libbalsa/send.c b/libbalsa/send.c
index abb630b..7bf28cf 100644
--- a/libbalsa/send.c
+++ b/libbalsa/send.c
@@ -2030,7 +2030,7 @@ libbalsa_set_message_id(GMimeMessage * mime_message)
     struct utsname utsbuf;
     const gchar *host = "localhost";
     gchar *message_id;
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) && defined(HAVE_STRUCT_UTSNAME_DOMAINNAME)
     gchar *fqdn;
     const gchar *domain = "localdomain";
 


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