aboutsummaryrefslogtreecommitdiffstats
path: root/main/imagemagick/locale.patch
blob: 9d83f1169387f79a5ead561efb43b468b0316c49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
From dcc53fb77f056ffb5c2eb66922b389af65adbfaf Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Wed, 25 May 2011 07:00:00 +0000
Subject: [PATCH] uclibc locale

uclibc might not have locale_t. We only activate the staic c_locale code
when we have vprintf_l() which is the only time we will use it.
---
 magick/locale.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/magick/locale.c b/magick/locale.c
index 4b84b2e..ee1c11b 100644
--- a/magick/locale.c
+++ b/magick/locale.c
@@ -90,8 +90,10 @@ static SemaphoreInfo
 static SplayTreeInfo
   *locale_list = (SplayTreeInfo *) NULL;
 
+#if defined(MAGICKCORE_HAVE_VFPRINTF_L)
 static volatile locale_t
   c_locale = (locale_t) NULL;
+#endif
 
 static volatile MagickBooleanType
   instantiate_locale = MagickFalse;
@@ -122,6 +124,7 @@ static MagickBooleanType
 %      locale_t AcquireCLocale(void)
 %
 */
+#if defined(MAGICKCORE_HAVE_VFPRINTF_L)
 static locale_t AcquireCLocale(void)
 {
 #if defined(MAGICKCORE_HAVE_NEWLOCALE)
@@ -133,6 +136,7 @@ static locale_t AcquireCLocale(void)
 #endif
   return(c_locale);
 }
+#endif
 
 /*
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -155,6 +159,7 @@ static locale_t AcquireCLocale(void)
 */
 static void DestroyCLocale(void)
 {
+#if defined(MAGICKCORE_HAVE_VFPRINTF_L)
 #if defined(MAGICKCORE_HAVE_NEWLOCALE)
   if (c_locale != (locale_t) NULL)
     freelocale(c_locale);
@@ -163,6 +168,7 @@ static void DestroyCLocale(void)
     _free_locale(c_locale);
 #endif
   c_locale=(locale_t) NULL;
+#endif
 }
 
 /*
-- 
1.7.5.2