Gentoo Archives: gentoo-commits

From: "Ryan Hill (dirtyepic)" <dirtyepic@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-util/codeblocks/files: codeblocks-8.02-gcc44.patch
Date: Wed, 29 Jul 2009 23:37:52
Message-Id: E1MWIiT-0004Ag-4s@stork.gentoo.org
1 dirtyepic 09/07/29 23:37:49
2
3 Added: codeblocks-8.02-gcc44.patch
4 Log:
5 Fix build w/ glibc-2.10. (bug #274256)
6 Remove unicode USE flag - wxGTK-2.8 is always unicode, and configure
7 option was removed. Use emake install.
8 (Portage version: 2.2_rc33/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.1 dev-util/codeblocks/files/codeblocks-8.02-gcc44.patch
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/codeblocks/files/codeblocks-8.02-gcc44.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/codeblocks/files/codeblocks-8.02-gcc44.patch?rev=1.1&content-type=text/plain
15
16 Index: codeblocks-8.02-gcc44.patch
17 ===================================================================
18 diff -Naurp codeblocks-8.02-orig/src/src/prefix.cpp codeblocks-8.02/src/src/prefix.cpp
19 --- codeblocks-8.02-orig/src/src/prefix.cpp 2008-02-27 07:15:26.000000000 -0600
20 +++ codeblocks-8.02/src/src/prefix.cpp 2009-07-29 17:05:52.797543317 -0600
21 @@ -12,7 +12,7 @@
22 * Written by: Mike Hearn <mike@×××××××××.com>
23 * Hongli Lai <h.lai@××××××.nl>
24 * http://autopackage.org/
25 - *
26 + *
27 * This source code is public domain. You can relicense this code
28 * under whatever license you want.
29 *
30 @@ -202,21 +202,20 @@ br_locate_prefix (void *symbol)
31 char *
32 br_prepend_prefix (void *symbol, char *path)
33 {
34 - char *tmp, *newpath;
35 -
36 - br_return_val_if_fail (symbol != NULL, (char*)NULL);
37 - br_return_val_if_fail (path != NULL, (char*)NULL);
38 + br_return_val_if_fail (symbol != 0, (char*)0);
39 + br_return_val_if_fail (path != 0, (char*)0);
40
41 - tmp = br_locate_prefix (symbol);
42 - if (!tmp) return (char*)NULL;
43 + char* tmp = br_locate_prefix (symbol);
44 + if (!tmp) return (char*)0;
45
46 + char *newpath;
47 if (strcmp (tmp, "/") == 0)
48 newpath = strdup (path);
49 else
50 newpath = br_strcat (tmp, path);
51
52 /* Get rid of compiler warning ("br_prepend_prefix never used") */
53 - if (0) br_prepend_prefix (NULL, (char*)NULL);
54 + if (0) br_prepend_prefix (0, (char*)0);
55
56 free (tmp);
57 return newpath;
58 @@ -240,9 +239,7 @@ static pthread_once_t br_thread_key_once
59 static void
60 br_thread_local_store_fini ()
61 {
62 - char *specific;
63 -
64 - specific = (char *) pthread_getspecific (br_thread_key);
65 + char* specific = (char *) pthread_getspecific (br_thread_key);
66 if (specific)
67 {
68 free (specific);
69 @@ -301,11 +298,9 @@ const char *
70 br_thread_local_store (char *str)
71 {
72 #if BR_PTHREADS
73 - char *specific;
74 -
75 pthread_once (&br_thread_key_once, br_thread_local_store_init);
76
77 - specific = (char *) pthread_getspecific (br_thread_key);
78 + char* specific = (char *) pthread_getspecific (br_thread_key);
79 br_str_free (specific);
80 pthread_setspecific (br_thread_key, str);
81
82 @@ -338,16 +333,13 @@ br_thread_local_store (char *str)
83 char *
84 br_strcat (const char *str1, const char *str2)
85 {
86 - char *result;
87 - size_t len1, len2;
88 -
89 if (!str1) str1 = "";
90 if (!str2) str2 = "";
91
92 - len1 = strlen (str1);
93 - len2 = strlen (str2);
94 + size_t len1 = strlen (str1);
95 + size_t len2 = strlen (str2);
96
97 - result = (char *) malloc (len1 + len2 + 1);
98 + char* result = (char *) malloc (len1 + len2 + 1);
99 memcpy (result, str1, len1);
100 memcpy (result + len1, str2, len2);
101 result[len1 + len2] = '\0';
102 @@ -360,16 +352,13 @@ br_strcat (const char *str1, const char
103 static char *
104 br_strndup (char *str, size_t size)
105 {
106 - char *result = (char *) NULL;
107 - size_t len;
108 + br_return_val_if_fail (str != (char *) 0, (char *) 0);
109
110 - br_return_val_if_fail (str != (char *) NULL, (char *) NULL);
111 -
112 - len = strlen (str);
113 + size_t len = strlen (str);
114 if (!len) return strdup ("");
115 if (size > len) size = len;
116
117 - result = (char *) calloc (sizeof (char), len + 1);
118 + char* result = (char *) calloc (sizeof (char), len + 1);
119 memcpy (result, str, size);
120 return result;
121 }
122 @@ -389,16 +378,16 @@ br_strndup (char *str, size_t size)
123 char *
124 br_extract_dir (const char *path)
125 {
126 - char *end, *result;
127 -
128 - br_return_val_if_fail (path != (char *) NULL, (char *) NULL);
129 + br_return_val_if_fail (path != (char *) 0, (char *) 0);
130
131 - end = strrchr (path, '/');
132 + const char* end = strrchr (path, '/');
133 if (!end) return strdup (".");
134
135 while (end > path && *end == '/')
136 + {
137 end--;
138 - result = br_strndup ((char *) path, end - path + 1);
139 + }
140 + char* result = br_strndup ((char *) path, end - path + 1);
141 if (!*result)
142 {
143 free (result);
144 @@ -424,15 +413,13 @@ br_extract_dir (const char *path)
145 char *
146 br_extract_prefix (const char *path)
147 {
148 - char *end, *tmp, *result;
149 -
150 - br_return_val_if_fail (path != (char *) NULL, (char *) NULL);
151 + br_return_val_if_fail (path != (char *) 0, (char *) 0);
152
153 if (!*path) return strdup ("/");
154 - end = strrchr (path, '/');
155 + const char* end = strrchr (path, '/');
156 if (!end) return strdup (path);
157
158 - tmp = br_strndup ((char *) path, end - path);
159 + char* tmp = br_strndup ((char *) path, end - path);
160 if (!*tmp)
161 {
162 free (tmp);
163 @@ -441,7 +428,7 @@ br_extract_prefix (const char *path)
164 end = strrchr (tmp, '/');
165 if (!end) return tmp;
166
167 - result = br_strndup (tmp, end - tmp);
168 + char* result = br_strndup (tmp, end - tmp);
169 free (tmp);
170
171 if (!*result)