[40365c]: pkg-config / glib-cygwin.patch  Maximize  Restore  History

Download this file

289 lines (251 with data), 8.7 kB

  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
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
--- origsrc/pkg-config-0.27.1/glib/glib/gatomic.c 2012-07-14 17:03:45.000000000 -0500
+++ src/pkg-config-0.27.1/glib/glib/gatomic.c 2013-03-08 14:56:54.644462500 -0600
@@ -464,7 +464,7 @@ gsize
return g_atomic_pointer_xor ((volatile gpointer *) atomic, val);
}
-#elif defined (G_PLATFORM_WIN32)
+#elif defined (G_OS_WIN32)
#include <windows.h>
#if !defined(_M_AMD64) && !defined (_M_IA64) && !defined(_M_X64)
--- origsrc/pkg-config-0.27.1/glib/glib/gcharset.c 2012-07-14 17:03:45.000000000 -0500
+++ src/pkg-config-0.27.1/glib/glib/gcharset.c 2013-03-08 14:58:07.538631800 -0600
@@ -496,7 +496,7 @@ guess_category_value (const gchar *categ
if ((retval != NULL) && (retval[0] != '\0'))
return retval;
-#ifdef G_PLATFORM_WIN32
+#ifdef G_OS_WIN32
/* g_win32_getlocale() first checks for LC_ALL, LC_MESSAGES and
* LANG, which we already did above. Oh well. The main point of
* calling g_win32_getlocale() is to get the thread's locale as used
--- origsrc/pkg-config-0.27.1/glib/glib/gconvert.c 2012-07-14 17:03:45.000000000 -0500
+++ src/pkg-config-0.27.1/glib/glib/gconvert.c 2013-03-08 14:58:07.549632500 -0600
@@ -33,9 +33,6 @@
#ifdef G_OS_WIN32
#include "win_iconv.c"
-#endif
-
-#ifdef G_PLATFORM_WIN32
#define STRICT
#include <windows.h>
#undef STRICT
@@ -1262,7 +1259,7 @@ g_locale_from_utf8 (const gchar *utf8str
charset, "UTF-8", bytes_read, bytes_written, error);
}
-#ifndef G_PLATFORM_WIN32
+#ifndef G_OS_WIN32
typedef struct _GFilenameCharsetCache GFilenameCharsetCache;
@@ -1378,7 +1375,7 @@ g_get_filename_charsets (const gchar ***
return cache->is_utf8;
}
-#else /* G_PLATFORM_WIN32 */
+#else /* G_OS_WIN32 */
gboolean
g_get_filename_charsets (const gchar ***filename_charsets)
@@ -1407,7 +1404,7 @@ g_get_filename_charsets (const gchar ***
#endif
}
-#endif /* G_PLATFORM_WIN32 */
+#endif /* G_OS_WIN32 */
static gboolean
get_filename_charset (const gchar **filename_charset)
--- origsrc/pkg-config-0.27.1/glib/glib/gfileutils.c 2012-08-22 08:03:52.000000000 -0500
+++ src/pkg-config-0.27.1/glib/glib/gfileutils.c 2013-03-08 14:58:07.565633400 -0600
@@ -2175,7 +2175,7 @@ g_path_skip_root (const gchar *file_name
{
g_return_val_if_fail (file_name != NULL, NULL);
-#ifdef G_PLATFORM_WIN32
+#ifdef G_OS_WIN32
/* Skip \\server\share or //server/share */
if (G_IS_DIR_SEPARATOR (file_name[0]) &&
G_IS_DIR_SEPARATOR (file_name[1]) &&
@@ -2185,7 +2185,6 @@ g_path_skip_root (const gchar *file_name
gchar *p;
p = strchr (file_name + 2, G_DIR_SEPARATOR);
-#ifdef G_OS_WIN32
{
gchar *q;
@@ -2193,7 +2192,6 @@ g_path_skip_root (const gchar *file_name
if (p == NULL || (q != NULL && q < p))
p = q;
}
-#endif
if (p && p > file_name + 2 && p[1])
{
--- origsrc/pkg-config-0.27.1/glib/glib/glib.h 2012-08-22 07:53:31.000000000 -0500
+++ src/pkg-config-0.27.1/glib/glib/glib.h 2013-03-08 14:58:07.577634100 -0600
@@ -95,7 +95,7 @@
#include <glib/gvariant.h>
#include <glib/gversion.h>
#include <glib/gversionmacros.h>
-#ifdef G_PLATFORM_WIN32
+#ifdef G_OS_WIN32
#include <glib/gwin32.h>
#endif
--- origsrc/pkg-config-0.27.1/glib/glib/gutf8.c 2012-08-22 08:03:52.000000000 -0500
+++ src/pkg-config-0.27.1/glib/glib/gutf8.c 2013-03-08 14:58:07.591634900 -0600
@@ -27,7 +27,7 @@
#endif
#include <string.h>
-#ifdef G_PLATFORM_WIN32
+#ifdef G_OS_WIN32
#include <stdio.h>
#define STRICT
#include <windows.h>
--- origsrc/pkg-config-0.27.1/glib/glib/gutils.c 2012-08-22 08:03:52.000000000 -0500
+++ src/pkg-config-0.27.1/glib/glib/gutils.c 2013-03-08 14:58:07.594635000 -0600
@@ -71,7 +71,7 @@
#include "garray.h"
#include "glibintl.h"
-#ifdef G_PLATFORM_WIN32
+#ifdef G_OS_WIN32
#include "gconvert.h"
#include "gwin32.h"
#endif
@@ -85,16 +85,13 @@
* These are portable utility functions.
*/
-#ifdef G_PLATFORM_WIN32
+#ifdef G_OS_WIN32
# include <windows.h>
# ifndef GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS
# define GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT 2
# define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 4
# endif
# include <lmcons.h> /* For UNLEN */
-#endif /* G_PLATFORM_WIN32 */
-
-#ifdef G_OS_WIN32
# include <direct.h>
# include <shlobj.h>
/* older SDK (e.g. msvc 5.0) does not have these*/
@@ -130,7 +127,7 @@
#include <langinfo.h>
#endif
-#ifdef G_PLATFORM_WIN32
+#ifdef G_OS_WIN32
gchar *
_glib_get_dll_directory (void)
--- origsrc/pkg-config-0.27.1/glib/glib/gutils.h 2012-08-22 08:03:52.000000000 -0500
+++ src/pkg-config-0.27.1/glib/glib/gutils.h 2013-03-08 14:58:07.597635200 -0600
@@ -342,7 +342,7 @@ G_END_DECLS
* On non-Windows platforms, expands to nothing.
*/
-#ifndef G_PLATFORM_WIN32
+#ifndef G_OS_WIN32
# define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name)
#else
# define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name) \
@@ -370,6 +370,6 @@ DllMain (HINSTANCE hinstDLL, \
#endif /* !G_DISABLE_DEPRECATED */
-#endif /* G_PLATFORM_WIN32 */
+#endif /* G_OS_WIN32 */
#endif /* __G_UTILS_H__ */
--- origsrc/pkg-config-0.27.1/glib/glib/gwin32.h 2012-07-14 17:03:45.000000000 -0500
+++ src/pkg-config-0.27.1/glib/glib/gwin32.h 2013-03-08 14:58:07.600635400 -0600
@@ -33,7 +33,7 @@
#include <glib/gtypes.h>
-#ifdef G_PLATFORM_WIN32
+#ifdef G_OS_WIN32
G_BEGIN_DECLS
@@ -41,8 +41,6 @@ G_BEGIN_DECLS
#define MAXPATHLEN 1024
#endif
-#ifdef G_OS_WIN32
-
/*
* To get prototypes for the following POSIXish functions, you have to
* include the indicated non-POSIX headers. The functions are defined
@@ -67,7 +65,6 @@ G_BEGIN_DECLS
*/
gint g_win32_ftruncate (gint f,
guint size);
-#endif /* G_OS_WIN32 */
/* The MS setlocale uses locale names of the form "English_United
* States.1252" etc. We want the Unixish standard form "en", "zh_TW"
@@ -113,6 +110,6 @@ gchar* g_win32_locale_filename_
G_END_DECLS
-#endif /* G_PLATFORM_WIN32 */
+#endif /* G_OS_WIN32 */
#endif /* __G_WIN32_H__ */
--- origsrc/pkg-config-0.27.1/glib/glib/libcharset/localcharset.c 2012-07-14 17:03:45.000000000 -0500
+++ src/pkg-config-0.27.1/glib/glib/libcharset/localcharset.c 2013-03-08 14:58:07.604635600 -0600
@@ -46,10 +46,6 @@
# include <locale.h>
# endif
# endif
-# ifdef __CYGWIN__
-# define WIN32_LEAN_AND_MEAN
-# include <windows.h>
-# endif
#elif defined WIN32_NATIVE
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
@@ -111,7 +107,7 @@ _g_locale_get_charset_aliases (void)
cp = charset_aliases;
if (cp == NULL)
{
-#if !(defined VMS || defined WIN32_NATIVE || defined __CYGWIN__)
+#if !(defined VMS || defined WIN32_NATIVE)
FILE *fp;
const char *dir;
const char *base = "charset.alias";
@@ -237,7 +233,7 @@ _g_locale_get_charset_aliases (void)
"DECKOREAN" "\0" "EUC-KR" "\0";
# endif
-# if defined WIN32_NATIVE || defined __CYGWIN__
+# if defined WIN32_NATIVE
/* To avoid the troubles of installing a separate file in the same
directory as the DLL and of retrieving the DLL's directory at
runtime, simply inline the aliases here. */
@@ -292,53 +288,6 @@ _g_locale_charset_raw (void)
/* Most systems support nl_langinfo (CODESET) nowadays. */
codeset = nl_langinfo (CODESET);
-# ifdef __CYGWIN__
- /* Cygwin 2006 does not have locales. nl_langinfo (CODESET) always
- returns "US-ASCII". As long as this is not fixed, return the suffix
- of the locale name from the environment variables (if present) or
- the codepage as a number. */
- if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0)
- {
- const char *locale;
- static char buf[2 + 10 + 1];
-
- locale = getenv ("LC_ALL");
- if (locale == NULL || locale[0] == '\0')
- {
- locale = getenv ("LC_CTYPE");
- if (locale == NULL || locale[0] == '\0')
- locale = getenv ("LANG");
- }
- if (locale != NULL && locale[0] != '\0')
- {
- /* If the locale name contains an encoding after the dot, return
- it. */
- const char *dot = strchr (locale, '.');
-
- if (dot != NULL)
- {
- const char *modifier;
-
- dot++;
- /* Look for the possible @... trailer and remove it, if any. */
- modifier = strchr (dot, '@');
- if (modifier == NULL)
- return dot;
- if (modifier - dot < sizeof (buf))
- {
- memcpy (buf, dot, modifier - dot);
- buf [modifier - dot] = '\0';
- return buf;
- }
- }
- }
-
- /* Woe32 has a function returning the locale's codepage as a number. */
- sprintf (buf, "CP%u", GetACP ());
- codeset = buf;
- }
-# endif
-
# else
/* On old systems which lack it, use setlocale or getenv. */

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks