mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-30 10:56:37 +02:00
win32: prototype _glib_get_dll_directory() and _glib_get_locale_dir()
Rather than using "extern" declarations of these win32 functions everywhere they're needed, just prototype them in glib-private.h. (Which also fixes the fact that they weren't prototyped in the files where they're defined.) https://bugzilla.gnome.org/show_bug.cgi?id=688109
This commit is contained in:
@@ -31,6 +31,10 @@
|
||||
|
||||
#include <gi18n.h>
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include "glib/glib-private.h"
|
||||
#endif
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
||||
G_GNUC_UNUSED static void completion_debug (const gchar *format, ...);
|
||||
@@ -1927,13 +1931,15 @@ main (gint argc, gchar *argv[])
|
||||
gboolean request_completion;
|
||||
gchar *completion_cur;
|
||||
gchar *completion_prev;
|
||||
#ifdef G_OS_WIN32
|
||||
gchar *tmp;
|
||||
#endif
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
textdomain (GETTEXT_PACKAGE);
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
extern gchar *_glib_get_locale_dir (void);
|
||||
gchar *tmp = _glib_get_locale_dir ();
|
||||
tmp = _glib_get_locale_dir ();
|
||||
bindtextdomain (GETTEXT_PACKAGE, tmp);
|
||||
g_free (tmp);
|
||||
#else
|
||||
|
@@ -47,6 +47,10 @@
|
||||
|
||||
#include "gconstructor_as_data.h"
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include "glib/glib-private.h"
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *filename;
|
||||
@@ -625,7 +629,6 @@ main (int argc, char **argv)
|
||||
};
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
extern gchar *_glib_get_locale_dir (void);
|
||||
gchar *tmp;
|
||||
#endif
|
||||
|
||||
|
@@ -36,6 +36,10 @@
|
||||
#include "gvdb/gvdb-builder.h"
|
||||
#include "strinfo.c"
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include "glib/glib-private.h"
|
||||
#endif
|
||||
|
||||
static void
|
||||
strip_string (GString *string)
|
||||
{
|
||||
@@ -2003,7 +2007,6 @@ main (int argc, char **argv)
|
||||
};
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
extern gchar *_glib_get_locale_dir (void);
|
||||
gchar *tmp;
|
||||
#endif
|
||||
|
||||
|
@@ -40,6 +40,10 @@
|
||||
#include <glib/gstdio.h>
|
||||
#include <gi18n.h>
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include "glib/glib-private.h"
|
||||
#endif
|
||||
|
||||
/* GResource functions {{{1 */
|
||||
static GResource *
|
||||
get_resource (const gchar *file)
|
||||
@@ -583,7 +587,6 @@ main (int argc, char *argv[])
|
||||
void (* function) (const gchar *, const gchar *, const gchar *, gboolean);
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
extern gchar *_glib_get_locale_dir (void);
|
||||
gchar *tmp;
|
||||
#endif
|
||||
|
||||
|
@@ -27,6 +27,10 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include "glib/glib-private.h"
|
||||
#endif
|
||||
|
||||
static gboolean
|
||||
contained (const gchar * const *items,
|
||||
const gchar *item)
|
||||
@@ -685,7 +689,6 @@ main (int argc, char **argv)
|
||||
const gchar *key;
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
extern gchar *_glib_get_locale_dir (void);
|
||||
gchar *tmp;
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user