Branch data Line data Source code
1 : : /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
2 : : *
3 : : * Copyright © 2020 Endless Mobile, Inc.
4 : : *
5 : : * This library is free software; you can redistribute it and/or
6 : : * modify it under the terms of the GNU Lesser General Public
7 : : * License as published by the Free Software Foundation; either
8 : : * version 2.1 of the License, or (at your option) any later version.
9 : : *
10 : : * This library is distributed in the hope that it will be useful,
11 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 : : * Lesser General Public License for more details.
14 : : *
15 : : * You should have received a copy of the GNU Lesser General Public
16 : : * License along with this library; if not, write to the Free Software
17 : : * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 : : *
19 : : * Authors:
20 : : * - Philip Withnall <withnall@endlessm.com>
21 : : */
22 : :
23 : : #include "config.h"
24 : :
25 : : #include <glib/gi18n-lib.h>
26 : : #include "gconstructor.h"
27 : :
28 : :
29 : : static void
30 : 7 : mct_init (void)
31 : : {
32 : 7 : bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
33 : 7 : bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
34 : 7 : }
35 : :
36 : : #ifdef G_HAS_CONSTRUCTORS
37 : :
38 : : #ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA
39 : : #pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(mct_init_ctor)
40 : : #endif
41 : : G_DEFINE_CONSTRUCTOR(mct_init_ctor)
42 : :
43 : : static void
44 : 7 : mct_init_ctor (void)
45 : : {
46 : 7 : mct_init ();
47 : 7 : }
48 : :
49 : : #else
50 : : #error Your platform/compiler is missing constructor support
51 : : #endif
|