1 Return-Path: <Vladimir.Marek@oracle.com>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id E023C431FBD
\r
6 for <notmuch@notmuchmail.org>; Mon, 6 May 2013 08:16:33 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-2.299 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_MED=-2.3, UNPARSEABLE_RELAY=0.001]
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id MRRy4MrnAPnO for <notmuch@notmuchmail.org>;
\r
17 Mon, 6 May 2013 08:16:28 -0700 (PDT)
\r
18 Received: from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69])
\r
19 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 6FE98431FAE
\r
22 for <notmuch@notmuchmail.org>; Mon, 6 May 2013 08:16:28 -0700 (PDT)
\r
23 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94])
\r
24 by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with
\r
25 ESMTP id r46FGQlZ009942
\r
26 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
\r
27 Mon, 6 May 2013 15:16:26 GMT
\r
28 Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231])
\r
29 by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id
\r
31 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL);
\r
32 Mon, 6 May 2013 15:16:25 GMT
\r
33 Received: from abhmt119.oracle.com (abhmt119.oracle.com [141.146.116.71])
\r
34 by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id
\r
35 r46FGPTR003716; Mon, 6 May 2013 15:16:25 GMT
\r
36 Received: from vi64-x3-2e-prg06.cz.oracle.com (/10.163.102.127)
\r
37 by default (Oracle Beehive Gateway v4.0)
\r
38 with ESMTP ; Mon, 06 May 2013 08:16:24 -0700
\r
39 From: Vladimir.Marek@oracle.com
\r
40 To: notmuch@notmuchmail.org
\r
41 Subject: [PATCH 2/4] asctime: check for standards compliance (Solaris support)
\r
42 Date: Mon, 6 May 2013 17:16:00 +0200
\r
43 Message-Id: <1367853362-11846-3-git-send-email-Vladimir.Marek@oracle.com>
\r
44 X-Mailer: git-send-email 1.7.9.2
\r
45 In-Reply-To: <1367853362-11846-1-git-send-email-Vladimir.Marek@oracle.com>
\r
46 References: <1367853362-11846-1-git-send-email-Vladimir.Marek@oracle.com>
\r
47 X-Source-IP: ucsinet22.oracle.com [156.151.31.94]
\r
48 Cc: Vladimir Marek <vlmarek@volny.cz>
\r
49 X-BeenThere: notmuch@notmuchmail.org
\r
50 X-Mailman-Version: 2.1.13
\r
52 List-Id: "Use and development of the notmuch mail system."
\r
53 <notmuch.notmuchmail.org>
\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
55 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
57 List-Post: <mailto:notmuch@notmuchmail.org>
\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
60 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
61 X-List-Received-Date: Mon, 06 May 2013 15:16:34 -0000
\r
63 From: Vladimir Marek <vlmarek@volny.cz>
\r
65 Add checks to "configure" to see whether _POSIX_PTHREAD_SEMANTICS needs
\r
66 to be defined to get the right number of arguments in the prototypes for
\r
67 asctime_r(). Solaris' default implementation conforms to POSIX.1c
\r
68 Draft 6, rather than the final POSIX.1c spec. The standards-compliant
\r
69 version can be used by defining _POSIX_PTHREAD_SEMANTICS.
\r
71 This change also adds the file "compat/check_asctime.c", which
\r
72 configure uses to perform its check, and modifies compat/compat.h to
\r
73 define _POSIX_PTHREAD_SEMANTICS if configure detected it was needed.
\r
75 Signed-off-by: Vladimir Marek <vlmarek@volny.cz>
\r
77 compat/check_asctime.c | 11 +++++++++++
\r
78 compat/compat.h | 3 +++
\r
79 configure | 22 ++++++++++++++++++++--
\r
80 3 files changed, 34 insertions(+), 2 deletions(-)
\r
81 create mode 100644 compat/check_asctime.c
\r
83 diff --git a/compat/check_asctime.c b/compat/check_asctime.c
\r
84 new file mode 100644
\r
85 index 0000000..b0e56f0
\r
87 +++ b/compat/check_asctime.c
\r
96 + (void) asctime_r (&tm, NULL);
\r
100 diff --git a/compat/compat.h b/compat/compat.h
\r
101 index c1ee0f9..0c4ac66 100644
\r
102 --- a/compat/compat.h
\r
103 +++ b/compat/compat.h
\r
104 @@ -33,6 +33,9 @@ extern "C" {
\r
106 #define _POSIX_PTHREAD_SEMANTICS 1
\r
109 +#define _POSIX_PTHREAD_SEMANTICS 1
\r
114 diff --git a/configure b/configure
\r
115 index 8ef7bac..99ec71a 100755
\r
118 @@ -528,6 +528,17 @@ else
\r
120 rm -f compat/check_getpwuid
\r
122 +printf "Checking for standard version of asctime_r... "
\r
123 +if ${CC} -o compat/check_asctime "$srcdir"/compat/check_asctime.c > /dev/null 2>&1
\r
128 + printf "No (will define _POSIX_PTHREAD_SEMANTICS to get it).\n"
\r
131 +rm -f compat/check_asctime
\r
133 printf "int main(void){return 0;}\n" > minimal.c
\r
135 printf "Checking for rpath support... "
\r
136 @@ -692,6 +703,11 @@ HAVE_STRCASESTR = ${have_strcasestr}
\r
137 # to enable the standards-compliant version -- needed for Solaris)
\r
138 STD_GETPWUID = ${std_getpwuid}
\r
140 +# Whether the asctime_r function is standards-compliant
\r
141 +# (if not, then notmuch will #define _POSIX_PTHREAD_SEMANTICS
\r
142 +# to enable the standards-compliant version -- needed for Solaris)
\r
143 +STD_ASCTIME = ${std_asctime}
\r
145 # Supported platforms (so far) are: LINUX, MACOSX, SOLARIS, FREEBSD, OPENBSD
\r
146 PLATFORM = ${platform}
\r
148 @@ -738,11 +754,13 @@ CONFIGURE_CFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\
\r
149 \$(TALLOC_CFLAGS) -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \\
\r
150 \$(VALGRIND_CFLAGS) \\
\r
151 -DHAVE_STRCASESTR=\$(HAVE_STRCASESTR) \\
\r
152 - -DSTD_GETPWUID=\$(STD_GETPWUID)
\r
153 + -DSTD_GETPWUID=\$(STD_GETPWUID) \\
\r
154 + -DSTD_ASCTIME=\$(STD_ASCTIME)
\r
155 CONFIGURE_CXXFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS) \\
\r
156 \$(TALLOC_CFLAGS) -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \\
\r
157 \$(VALGRIND_CFLAGS) \$(XAPIAN_CXXFLAGS) \\
\r
158 -DHAVE_STRCASESTR=\$(HAVE_STRCASESTR) \\
\r
159 - -DSTD_GETPWUID=\$(STD_GETPWUID)
\r
160 + -DSTD_GETPWUID=\$(STD_GETPWUID) \\
\r
161 + -DSTD_ASCTIME=\$(STD_ASCTIME)
\r
162 CONFIGURE_LDFLAGS = \$(GMIME_LDFLAGS) \$(TALLOC_LDFLAGS) \$(XAPIAN_LDFLAGS)
\r